{"version":3,"sources":["webpack://PMA/webpack/bootstrap","webpack://PMA/./node_modules/ol/extent.js","webpack://PMA/./node_modules/ol/geom/GeometryType.js","webpack://PMA/./node_modules/ol/proj/epsg3857.js","webpack://PMA/./node_modules/ol/proj/epsg4326.js","webpack://PMA/./node_modules/ol/proj/projections.js","webpack://PMA/./node_modules/ol/proj/transforms.js","webpack://PMA/./node_modules/ol/proj.js","webpack://PMA/./src/components/js/components.js","webpack://PMA/./node_modules/ol/util.js","webpack://PMA/./src/view/definitions.js","webpack://PMA/./node_modules/ol/obj.js","webpack://PMA/./node_modules/ol/array.js","webpack://PMA/./node_modules/ol/math.js","webpack://PMA/./node_modules/ol/events/EventType.js","webpack://PMA/./node_modules/ol/events.js","webpack://PMA/./src/resources/resources.js","webpack://PMA/external \"jQuery\"","webpack://PMA/./node_modules/ol/asserts.js","webpack://PMA/./node_modules/ol/transform.js","webpack://PMA/./node_modules/ol/TileState.js","webpack://PMA/./node_modules/ol/geom/GeometryLayout.js","webpack://PMA/./node_modules/ol/render/canvas.js","webpack://PMA/./src/view/definitionsOl.js","webpack://PMA/./node_modules/ol/render/canvas/Instruction.js","webpack://PMA/./node_modules/ol/events/condition.js","webpack://PMA/./node_modules/ol/coordinate.js","webpack://PMA/./node_modules/ol/geom/Polygon.js","webpack://PMA/./node_modules/ol/ImageState.js","webpack://PMA/./node_modules/@babel/runtime/helpers/classCallCheck.js","webpack://PMA/./node_modules/ol/dom.js","webpack://PMA/./node_modules/ol/Feature.js","webpack://PMA/./node_modules/@babel/runtime/helpers/createClass.js","webpack://PMA/./node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack://PMA/./node_modules/ol/MapBrowserEventType.js","webpack://PMA/./node_modules/ol/functions.js","webpack://PMA/./node_modules/ol/geom/Point.js","webpack://PMA/./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack://PMA/./node_modules/ol/format/Feature.js","webpack://PMA/./node_modules/ol/render/canvas/BuilderType.js","webpack://PMA/./node_modules/ol/size.js","webpack://PMA/./node_modules/ol/css.js","webpack://PMA/./node_modules/ol/Collection.js","webpack://PMA/./node_modules/ol/interaction/Pointer.js","webpack://PMA/./node_modules/ol/source/State.js","webpack://PMA/./node_modules/ol/events/Event.js","webpack://PMA/./node_modules/ol/style/Style.js","webpack://PMA/./src/view/viewportHelpers.js","webpack://PMA/./node_modules/ol/geom/LineString.js","webpack://PMA/./src/view/helpers.js","webpack://PMA/./node_modules/ol/ViewHint.js","webpack://PMA/./node_modules/ol/Observable.js","webpack://PMA/./node_modules/ol/control/Control.js","webpack://PMA/./node_modules/ol/tilecoord.js","webpack://PMA/./node_modules/ol/CollectionEventType.js","webpack://PMA/./node_modules/ol/layer/Property.js","webpack://PMA/./node_modules/@babel/runtime/helpers/inherits.js","webpack://PMA/./node_modules/ol/proj/Units.js","webpack://PMA/./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack://PMA/./node_modules/ol/Object.js","webpack://PMA/./node_modules/ol/tilegrid.js","webpack://PMA/./node_modules/@turf/invariant/main.es.js","webpack://PMA/./node_modules/ol/has.js","webpack://PMA/./node_modules/ol/geom/MultiLineString.js","webpack://PMA/./node_modules/ol/style/Fill.js","webpack://PMA/./node_modules/@turf/helpers/main.es.js","webpack://PMA/./node_modules/ol/style/Stroke.js","webpack://PMA/./node_modules/ol/geom/SimpleGeometry.js","webpack://PMA/./node_modules/ol/geom/flat/transform.js","webpack://PMA/./node_modules/ol/source/VectorEventType.js","webpack://PMA/./node_modules/ol/layer/Vector.js","webpack://PMA/./node_modules/ol/loadingstrategy.js","webpack://PMA/./node_modules/ol/source/Vector.js","webpack://PMA/./node_modules/ol/style/IconOrigin.js","webpack://PMA/./node_modules/ol/geom/MultiPolygon.js","webpack://PMA/./node_modules/ol/geom/MultiPoint.js","webpack://PMA/./node_modules/ol/interaction/Interaction.js","webpack://PMA/./node_modules/ol/style/IconAnchorUnits.js","webpack://PMA/./node_modules/ol/extent/Relationship.js","webpack://PMA/./node_modules/ol/MapProperty.js","webpack://PMA/./node_modules/ol/easing.js","webpack://PMA/./node_modules/ol/geom/flat/inflate.js","webpack://PMA/./node_modules/ol/reproj/Tile.js","webpack://PMA/./node_modules/ol/source/TileImage.js","webpack://PMA/./node_modules/ol/geom/flat/deflate.js","webpack://PMA/./node_modules/ol/reproj/common.js","webpack://PMA/./node_modules/ol/layer/Layer.js","webpack://PMA/./node_modules/ol/format/FormatType.js","webpack://PMA/./node_modules/ol/tileurlfunction.js","webpack://PMA/./node_modules/ol/render/EventType.js","webpack://PMA/./node_modules/@babel/runtime/helpers/get.js","webpack://PMA/./node_modules/ol/source/common.js","webpack://PMA/./node_modules/ol/OverlayPositioning.js","webpack://PMA/./node_modules/ol/control/Attribution.js","webpack://PMA/./node_modules/ol/control/Rotate.js","webpack://PMA/./node_modules/ol/control/Zoom.js","webpack://PMA/./node_modules/ol/control/FullScreen.js","webpack://PMA/./node_modules/ol/control/MousePosition.js","webpack://PMA/./node_modules/ol/control/OverviewMap.js","webpack://PMA/./node_modules/ol/control/ScaleLine.js","webpack://PMA/./node_modules/ol/control/ZoomSlider.js","webpack://PMA/./node_modules/ol/control/ZoomToExtent.js","webpack://PMA/./node_modules/ol/control.js","webpack://PMA/./node_modules/@babel/runtime/helpers/typeof.js","webpack://PMA/./node_modules/ol/color.js","webpack://PMA/./node_modules/ol/geom/flat/closest.js","webpack://PMA/./node_modules/ol/geom/GeometryCollection.js","webpack://PMA/./node_modules/ol/ObjectEventType.js","webpack://PMA/./node_modules/ol/colorlike.js","webpack://PMA/./node_modules/ol/pointer/EventType.js","webpack://PMA/./node_modules/ol/render/canvas/hitdetect.js","webpack://PMA/./node_modules/ol/ViewProperty.js","webpack://PMA/./node_modules/ol/string.js","webpack://PMA/./node_modules/ol/renderer/vector.js","webpack://PMA/./node_modules/ol/events/Target.js","webpack://PMA/./node_modules/ol/style/Text.js","webpack://PMA/./node_modules/ol/geom/flat/simplify.js","webpack://PMA/./node_modules/ol/Image.js","webpack://PMA/./node_modules/ol/tilegrid/TileGrid.js","webpack://PMA/./node_modules/ol/tilegrid/common.js","webpack://PMA/./node_modules/ol/geom/flat/contains.js","webpack://PMA/./node_modules/ol/geom/flat/reverse.js","webpack://PMA/./node_modules/ol/geom/flat/orient.js","webpack://PMA/./node_modules/ol/MapBrowserEvent.js","webpack://PMA/./node_modules/turf-jsts/jsts.min.js","webpack://PMA/./node_modules/ol/source/Source.js","webpack://PMA/./node_modules/@mapbox/mapbox-gl-style-spec/dist/index.es.js","webpack://PMA/./node_modules/ol/layer/BaseTile.js","webpack://PMA/./node_modules/ol/layer/Tile.js","webpack://PMA/./node_modules/ol/Disposable.js","webpack://PMA/./node_modules/ol/render/canvas/Builder.js","webpack://PMA/./node_modules/ol/Tile.js","webpack://PMA/./node_modules/ol/geom/LinearRing.js","webpack://PMA/./node_modules/@turf/meta/main.es.js","webpack://PMA/./node_modules/ol/reproj.js","webpack://PMA/./node_modules/ol/MapEventType.js","webpack://PMA/./node_modules/ol/rotationconstraint.js","webpack://PMA/./node_modules/ol/TileRange.js","webpack://PMA/./node_modules/ol/layer/TileProperty.js","webpack://PMA/./node_modules/ol/source/Tile.js","webpack://PMA/./node_modules/ol/style/Icon.js","webpack://PMA/./node_modules/ol/centerconstraint.js","webpack://PMA/./node_modules/ol/resolutionconstraint.js","webpack://PMA/./node_modules/ol/View.js","webpack://PMA/./node_modules/ol/geom/flat/interpolate.js","webpack://PMA/./node_modules/ol/proj/Projection.js","webpack://PMA/./node_modules/ol/style/RegularShape.js","webpack://PMA/./node_modules/ol/geom/flat/intersectsextent.js","webpack://PMA/./node_modules/ol/layer/BaseVector.js","webpack://PMA/./node_modules/ol/format/IIIFInfo.js","webpack://PMA/./node_modules/magic-wand-tool/dist/magic-wand.js","webpack://PMA/./node_modules/ol/style.js","webpack://PMA/./node_modules/ol/interaction/DoubleClickZoom.js","webpack://PMA/./node_modules/ol/interaction/DragRotate.js","webpack://PMA/./node_modules/ol/render/Box.js","webpack://PMA/./node_modules/ol/interaction/DragBox.js","webpack://PMA/./node_modules/ol/interaction/DragZoom.js","webpack://PMA/./node_modules/ol/events/KeyCode.js","webpack://PMA/./node_modules/ol/interaction/KeyboardPan.js","webpack://PMA/./node_modules/ol/interaction/KeyboardZoom.js","webpack://PMA/./node_modules/ol/interaction/PinchRotate.js","webpack://PMA/./node_modules/ol/interaction/PinchZoom.js","webpack://PMA/./node_modules/ol/interaction/DragAndDrop.js","webpack://PMA/./node_modules/ol/interaction/DragRotateAndZoom.js","webpack://PMA/./node_modules/ol/interaction/Extent.js","webpack://PMA/./node_modules/ol/interaction.js","webpack://PMA/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://PMA/./node_modules/ol/style/Circle.js","webpack://PMA/./node_modules/ol/Overlay.js","webpack://PMA/./src/view/measure.js","webpack://PMA/./src/view/changeDpi.js","webpack://PMA/./src/view/viewport.js","webpack://PMA/./node_modules/ol/VectorTile.js","webpack://PMA/./node_modules/ol/VectorRenderTile.js","webpack://PMA/./node_modules/ol/source/VectorTile.js","webpack://PMA/./node_modules/ol/structs/RBush.js","webpack://PMA/./node_modules/ol/geom/flat/interiorpoint.js","webpack://PMA/./node_modules/ol/net.js","webpack://PMA/./node_modules/ol/interaction/Property.js","webpack://PMA/./node_modules/@turf/area/main.es.js","webpack://PMA/./node_modules/@turf/difference/main.es.js","webpack://PMA/./node_modules/ol/extent/Corner.js","webpack://PMA/./node_modules/ol/geom.js","webpack://PMA/./node_modules/ol/style/Image.js","webpack://PMA/./node_modules/ol/geom/Geometry.js","webpack://PMA/./node_modules/ol/format/MVT.js","webpack://PMA/./node_modules/ol/format/GeoJSON.js","webpack://PMA/./node_modules/ol/source/TileEventType.js","webpack://PMA/./node_modules/ol/source/UrlTile.js","webpack://PMA/./src/view/version.js","webpack://PMA/./node_modules/rbush/rbush.min.js","webpack://PMA/./node_modules/ol/ImageBase.js","webpack://PMA/./node_modules/ol/renderer/canvas/Layer.js","webpack://PMA/./node_modules/ol/render/Event.js","webpack://PMA/./node_modules/ol/geom/flat/area.js","webpack://PMA/./node_modules/ol/format/JSONFeature.js","webpack://PMA/./node_modules/ol/ImageCanvas.js","webpack://PMA/./node_modules/ol/format/TextFeature.js","webpack://PMA/./node_modules/@turf/union/main.es.js","webpack://PMA/./node_modules/@turf/clone/main.es.js","webpack://PMA/./node_modules/@turf/simplify/main.es.js","webpack://PMA/./src/view/controls/overview.js","webpack://PMA/./node_modules/ol/TileCache.js","webpack://PMA/./node_modules/ol/structs/LRUCache.js","webpack://PMA/./node_modules/ol/style/IconImageCache.js","webpack://PMA/./node_modules/ol/Map.js","webpack://PMA/./node_modules/ol/MapEvent.js","webpack://PMA/./node_modules/ol/render/canvas/ImageBuilder.js","webpack://PMA/./node_modules/ol/render/canvas/LineStringBuilder.js","webpack://PMA/./node_modules/ol/render/canvas/PolygonBuilder.js","webpack://PMA/./node_modules/ol/render/canvas/BuilderGroup.js","webpack://PMA/./node_modules/ol/geom/flat/textpath.js","webpack://PMA/./node_modules/ol/render/canvas/Executor.js","webpack://PMA/./node_modules/ol/render/canvas/ExecutorGroup.js","webpack://PMA/./node_modules/ol/geom/flat/straightchunk.js","webpack://PMA/./node_modules/ol/render/canvas/TextBuilder.js","webpack://PMA/./node_modules/ol/source/TileJSON.js","webpack://PMA/./node_modules/ol/geom/Circle.js","webpack://PMA/./node_modules/ol/interaction/MouseWheelZoom.js","webpack://PMA/./src/view/controls/rotationControl.js","webpack://PMA/./src/view/interactions/customMouseWheelZoom.js","webpack://PMA/./node_modules/jquery.fancytree/dist/modules/jquery.fancytree.js","webpack://PMA/./src/components/js/context.js","webpack://PMA/./node_modules/ol/sphere.js","webpack://PMA/./node_modules/ol/featureloader.js","webpack://PMA/./node_modules/ol/render/canvas/Immediate.js","webpack://PMA/./node_modules/ol/render/Feature.js","webpack://PMA/./node_modules/@turf/clean-coords/main.es.js","webpack://PMA/./src/view/controls/pathomationAttribution.js","webpack://PMA/./src/components/js/promptlogin.js","webpack://PMA/./node_modules/ol/TileQueue.js","webpack://PMA/./node_modules/ol/structs/PriorityQueue.js","webpack://PMA/./node_modules/ol/style/IconImage.js","webpack://PMA/./node_modules/ol/layer/Group.js","webpack://PMA/./node_modules/ol/interaction/DragPan.js","webpack://PMA/./node_modules/ol/interaction/Translate.js","webpack://PMA/./node_modules/ol/format/EsriJSON.js","webpack://PMA/./node_modules/ol/xml.js","webpack://PMA/./node_modules/ol/format/XMLFeature.js","webpack://PMA/./node_modules/ol/format/GMLBase.js","webpack://PMA/./node_modules/ol/format/xsd.js","webpack://PMA/./node_modules/ol/format/GML2.js","webpack://PMA/./node_modules/ol/format/GML3.js","webpack://PMA/./node_modules/ol/format/GML.js","webpack://PMA/./node_modules/ol/format/GPX.js","webpack://PMA/./node_modules/ol/format/KML.js","webpack://PMA/./node_modules/ol/format/IGC.js","webpack://PMA/./node_modules/ol/format/XML.js","webpack://PMA/./node_modules/ol/format/xlink.js","webpack://PMA/./node_modules/ol/format/OWS.js","webpack://PMA/./node_modules/ol/geom/flat/flip.js","webpack://PMA/./node_modules/ol/format/Polyline.js","webpack://PMA/./node_modules/ol/format/TopoJSON.js","webpack://PMA/./node_modules/ol/format/GML32.js","webpack://PMA/./node_modules/ol/format/filter/Filter.js","webpack://PMA/./node_modules/ol/format/filter/LogicalNary.js","webpack://PMA/./node_modules/ol/format/filter/And.js","webpack://PMA/./node_modules/ol/format/filter/Bbox.js","webpack://PMA/./node_modules/ol/format/filter/Spatial.js","webpack://PMA/./node_modules/ol/format/filter/Contains.js","webpack://PMA/./node_modules/ol/format/filter/DWithin.js","webpack://PMA/./node_modules/ol/format/filter/Disjoint.js","webpack://PMA/./node_modules/ol/format/filter/Comparison.js","webpack://PMA/./node_modules/ol/format/filter/During.js","webpack://PMA/./node_modules/ol/format/filter/ComparisonBinary.js","webpack://PMA/./node_modules/ol/format/filter/EqualTo.js","webpack://PMA/./node_modules/ol/format/filter/GreaterThan.js","webpack://PMA/./node_modules/ol/format/filter/GreaterThanOrEqualTo.js","webpack://PMA/./node_modules/ol/format/filter/Intersects.js","webpack://PMA/./node_modules/ol/format/filter/IsBetween.js","webpack://PMA/./node_modules/ol/format/filter/IsLike.js","webpack://PMA/./node_modules/ol/format/filter/IsNull.js","webpack://PMA/./node_modules/ol/format/filter/LessThan.js","webpack://PMA/./node_modules/ol/format/filter/LessThanOrEqualTo.js","webpack://PMA/./node_modules/ol/format/filter/Not.js","webpack://PMA/./node_modules/ol/format/filter/NotEqualTo.js","webpack://PMA/./node_modules/ol/format/filter/Or.js","webpack://PMA/./node_modules/ol/format/filter/ResourceId.js","webpack://PMA/./node_modules/ol/format/filter/Within.js","webpack://PMA/./node_modules/ol/format/WFS.js","webpack://PMA/./node_modules/ol/format/filter.js","webpack://PMA/./node_modules/ol/format/WMSCapabilities.js","webpack://PMA/./node_modules/ol/format/WMSGetFeatureInfo.js","webpack://PMA/./node_modules/ol/format/WMTSCapabilities.js","webpack://PMA/./node_modules/ol/layer/BaseImage.js","webpack://PMA/./node_modules/ol/layer/Image.js","webpack://PMA/./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack://PMA/./node_modules/ol/AssertionError.js","webpack://PMA/./node_modules/ol/style/TextPlacement.js","webpack://PMA/./node_modules/ol/render/VectorContext.js","webpack://PMA/./node_modules/ol/geom/flat/segments.js","webpack://PMA/./node_modules/ol/geom/flat/length.js","webpack://PMA/./node_modules/ol/renderer/canvas/VectorLayer.js","webpack://PMA/./node_modules/ol/renderer/Layer.js","webpack://PMA/./node_modules/ol/layer/Base.js","webpack://PMA/./node_modules/ol/renderer/canvas/ImageLayer.js","webpack://PMA/./node_modules/mapbox-to-css-font/index.js","webpack://PMA/./node_modules/ol/geom/flat/center.js","webpack://PMA/./node_modules/ol/renderer/canvas/TileLayer.js","webpack://PMA/./node_modules/ol/ImageTile.js","webpack://PMA/./node_modules/ol/reproj/Triangulation.js","webpack://PMA/./node_modules/ol/Kinetic.js","webpack://PMA/./src/view/controls/prevZoom.js","webpack://PMA/./src/view/controls/associatedImage.js","webpack://PMA/./src/view/controls/snapshot.js","webpack://PMA/./src/view/controls/filename.js","webpack://PMA/./src/view/controls/dimensionSelector.js","webpack://PMA/./src/view/controls/layerSwitch.js","webpack://PMA/./src/view/controls/colorAdjustment.js","webpack://PMA/./src/view/controls/magnifier.js","webpack://PMA/./src/components/js/sessionlogin.js","webpack://PMA/./node_modules/ol/MapBrowserEventHandler.js","webpack://PMA/./node_modules/ol/PluggableMap.js","webpack://PMA/./node_modules/ol/renderer/Map.js","webpack://PMA/./node_modules/ol/renderer/Composite.js","webpack://PMA/(webpack)/buildin/global.js","webpack://PMA/./node_modules/ol/geom/flat/geodesic.js","webpack://PMA/./node_modules/ol/layer/Graticule.js","webpack://PMA/./node_modules/ol/webgl.js","webpack://PMA/./node_modules/ol/render.js","webpack://PMA/./node_modules/ol/webgl/Buffer.js","webpack://PMA/./node_modules/ol/webgl/ContextEventType.js","webpack://PMA/./node_modules/ol/webgl/PostProcessingPass.js","webpack://PMA/./node_modules/ol/vec/mat4.js","webpack://PMA/./node_modules/ol/webgl/Helper.js","webpack://PMA/./node_modules/ol/renderer/webgl/Layer.js","webpack://PMA/./node_modules/ol/webgl/RenderTarget.js","webpack://PMA/./node_modules/ol/worker/webgl.js","webpack://PMA/./node_modules/ol/renderer/webgl/PointsLayer.js","webpack://PMA/./node_modules/ol/layer/Heatmap.js","webpack://PMA/./node_modules/ol/layer/VectorTileRenderType.js","webpack://PMA/./node_modules/ol/renderer/canvas/VectorTileLayer.js","webpack://PMA/./node_modules/ol/layer/VectorTile.js","webpack://PMA/./node_modules/ol-mapbox-style/dist/util.js","webpack://PMA/./node_modules/ol-mapbox-style/dist/stylefunction.js","webpack://PMA/./node_modules/ol-mapbox-style/dist/index.js","webpack://PMA/./node_modules/ol/layer/MapboxVector.js","webpack://PMA/./node_modules/ol/renderer/canvas/VectorImageLayer.js","webpack://PMA/./node_modules/ol/layer/VectorImage.js","webpack://PMA/./node_modules/ol/style/expressions.js","webpack://PMA/./node_modules/ol/webgl/ShaderBuilder.js","webpack://PMA/./node_modules/ol/layer/WebGLPoints.js","webpack://PMA/./node_modules/ol/source/BingMaps.js","webpack://PMA/./node_modules/ol/source/XYZ.js","webpack://PMA/./node_modules/ol/source/CartoDB.js","webpack://PMA/./node_modules/ol/source/Cluster.js","webpack://PMA/./node_modules/ol/source/Zoomify.js","webpack://PMA/./node_modules/ol/source/IIIF.js","webpack://PMA/./node_modules/ol/reproj/Image.js","webpack://PMA/./node_modules/ol/source/Image.js","webpack://PMA/./node_modules/ol/uri.js","webpack://PMA/./node_modules/ol/source/ImageArcGISRest.js","webpack://PMA/./node_modules/ol/source/ImageCanvas.js","webpack://PMA/./node_modules/ol/source/ImageMapGuide.js","webpack://PMA/./node_modules/ol/source/ImageStatic.js","webpack://PMA/./node_modules/ol/source/WMSServerType.js","webpack://PMA/./node_modules/ol/source/ImageWMS.js","webpack://PMA/./node_modules/ol/source/OSM.js","webpack://PMA/./node_modules/ol/source/Raster.js","webpack://PMA/./node_modules/ol/source/Stamen.js","webpack://PMA/./node_modules/ol/source/TileArcGISRest.js","webpack://PMA/./node_modules/ol/source/TileDebug.js","webpack://PMA/./node_modules/ol/source/TileWMS.js","webpack://PMA/./node_modules/ol/source/UTFGrid.js","webpack://PMA/./node_modules/ol/source/WMTSRequestEncoding.js","webpack://PMA/./node_modules/ol/tilegrid/WMTS.js","webpack://PMA/./node_modules/ol/source/WMTS.js","webpack://PMA/./src/components/js/tree.js","webpack://PMA/./src/components/js/autologin.js","webpack://PMA/./src/components/js/slideLoader.js","webpack://PMA/./node_modules/@turf/truncate/main.es.js","webpack://PMA/./node_modules/@turf/intersect/main.es.js","webpack://PMA/./src/view/interactions/transform.js","webpack://PMA/./node_modules/@turf/boolean-point-in-polygon/main.es.js","webpack://PMA/./node_modules/@turf/bbox/main.es.js","webpack://PMA/./node_modules/@turf/boolean-point-on-line/main.es.js","webpack://PMA/./node_modules/@turf/boolean-contains/main.es.js","webpack://PMA/./src/view/interactions/brush.js","webpack://PMA/./src/view/interactions/magicWand.js","webpack://PMA/./src/components/js/annotations.js","webpack://PMA/./node_modules/@babel/runtime/regenerator/index.js","webpack://PMA/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://PMA/./node_modules/ieee754/index.js","webpack://PMA/./node_modules/ol/interaction/Draw.js","webpack://PMA/./node_modules/ol/interaction/Modify.js","webpack://PMA/./node_modules/ol/interaction/Select.js","webpack://PMA/./node_modules/ol/interaction/Snap.js","webpack://PMA/./node_modules/ol/format/WKT.js","webpack://PMA/./node_modules/@babel/runtime/helpers/superPropBase.js","webpack://PMA/./node_modules/jquery.fancytree/dist/modules/jquery.fancytree.dnd5.js","webpack://PMA/./node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack://PMA/./node_modules/webfont-matcher/lib/fonts/google.js","webpack://PMA/./node_modules/pbf/index.js","webpack://PMA/./node_modules/@babel/runtime/helpers/set.js","webpack://PMA/./node_modules/nouislider/distribute/nouislider.js","webpack://PMA/./node_modules/file-saver/dist/FileSaver.min.js","webpack://PMA/./lib/jscolor/jscolor.js","webpack://PMA/./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack://PMA/./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack://PMA/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://PMA/./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack://PMA/./node_modules/regenerator-runtime/runtime.js","webpack://PMA/./node_modules/buffer/index.js","webpack://PMA/./node_modules/base64-js/index.js","webpack://PMA/./node_modules/isarray/index.js","webpack://PMA/./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack://PMA/./node_modules/jquery.fancytree/dist/modules/jquery.fancytree.ui-deps.js","webpack://PMA/./src/components/js/customlogin.js","webpack://PMA/./node_modules/perfect-scrollbar/dist/perfect-scrollbar.esm.js","webpack://PMA/./src/components/js/gallery.js","webpack://PMA/./src/components/js/forms.js","webpack://PMA/./src/components/js/metadatatree.js","webpack://PMA/./src/components/js/metaDataSearch.js","webpack://PMA/./src/components/js/syncview.js","webpack://PMA/./src/pma.ui.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","boundingExtent","coordinates","extent","createEmpty","ii","length","extendCoordinate","buffer","opt_extent","clone","slice","closestSquaredDistanceXY","x","y","dx","dy","containsCoordinate","coordinate","containsXY","containsExtent","extent1","extent2","coordinateRelationship","minX","minY","maxX","maxY","relationship","UNKNOWN","LEFT","RIGHT","BELOW","ABOVE","INTERSECTING","Infinity","createOrUpdate","createOrUpdateEmpty","createOrUpdateFromCoordinate","createOrUpdateFromCoordinates","extendCoordinates","createOrUpdateFromFlatCoordinates","flatCoordinates","offset","end","stride","extendFlatCoordinates","createOrUpdateFromRings","rings","extendRings","equals","approximatelyEquals","tolerance","Math","abs","extend","extendXY","min","max","forEachCorner","callback","val","getBottomLeft","getBottomRight","getTopRight","getTopLeft","getArea","area","isEmpty","getWidth","getHeight","getCenter","getCorner","corner","BOTTOM_LEFT","BOTTOM_RIGHT","TOP_LEFT","TOP_RIGHT","getEnlargedArea","getForViewAndSize","center","resolution","rotation","size","cosRotation","cos","sinRotation","sin","xCos","xSin","yCos","ySin","x0","x1","x2","x3","y0","y1","y2","y3","getIntersectionArea","getIntersection","intersection","intersects","getMargin","getSize","returnOrUpdate","scaleFromCenter","deltaX","deltaY","intersectsSegment","start","startRel","endRel","startX","startY","endX","endY","slope","applyTransform","transformFn","opt_stops","width","height","push","xs","ys","apply","_boundingExtentXYs","wrapX","projection","projectionExtent","getExtent","canWrapX","worldWidth","floor","POINT","LINE_STRING","LINEAR_RING","POLYGON","MULTI_POINT","MULTI_LINE_STRING","MULTI_POLYGON","GEOMETRY_COLLECTION","CIRCLE","extendStatics","__extends","b","setPrototypeOf","__proto__","Array","TypeError","String","__","this","constructor","HALF_SIZE","PI","EXTENT","WORLD_EXTENT","MAX_SAFE_Y","log","tan","_super","EPSG3857Projection","code","units","Units","METERS","global","worldExtent","getPointResolution","point","Projection","PROJECTIONS","fromEPSG4326","input","opt_output","opt_dimension","dimension","output","undefined","toEPSG4326","atan","exp","METERS_PER_UNIT","EPSG4326Projection","opt_axisOrientation","DEGREES","axisOrientation","metersPerUnit","cache","transforms","source","destination","sourceCode","getCode","destinationCode","cloneTransform","identityTransform","addProjection","add","addProjections","projections","forEach","projectionLike","replace","opt_units","pointResolution","getPointResolutionFunc","getUnits","getMetersPerUnit","toEPSG4326_1","getTransformFromProjections","vertices","addEquivalentProjections","addEquivalentTransforms","projections1","projections2","forwardTransform","inverseTransform","projection1","projection2","clearAllProjections","createProjection","defaultCode","createTransformFromCoordinateTransform","coordTransform","j","addCoordinateTransforms","forward","inverse","sourceProj","destProj","fromLonLat","opt_projection","toLonLat","lonLat","lon","equivalent","equalUnits","sourceProjection","destinationProjection","transformFunc","transform","getTransform","transformExtent","transformWithProjections","userProjection","setUserProjection","clearUserProjection","getUserProjection","useGeographic","toUserCoordinate","fromUserCoordinate","destProjection","toUserExtent","fromUserExtent","createSafeCoordinateTransform","coord","transformed","worldsAway","sourceX","sourceY","sourceExtent","sourceExtentWidth","addCommon","Events","DirectorySelected","SlideSelected","ServerSelected","ServerExpanded","DirectoryExpanded","MultiSelectionChanged","SlideDeSelected","TreeNodeDoubleClicked","SlideInfoError","BeforeSlideLoad","SlideLoaded","AnnotationAdded","AnnotationDrawing","AnnotationDeleted","AnnotationModified","AnnotationsSaved","AnnotationsSelectionChanged","AnnotationEditingStarted","AnnotationEditingEnded","FormSaved","FormEditClick","SyncChanged","SearchStarted","SearchFinished","SearchFailed","ValueExpanded","Dropped","SessionIdLoginFailed","BeforeDrop","ApiMethods","Authenticate","GetFiles","GetDirectories","GetImageInfo","GetImagesInfo","DeAuthenticate","GetForms","GetFormDefinitions","GetFormSubmissions","GetForm","SaveFormDefinition","DeleteFormDefinition","SaveFormData","GetFormData","GetAnnotations","AddAnnotation","UpdateAnnotation","DeleteAnnotation","GetVersionInfo","QueryFilename","SaveAnnotations","DistinctValues","Metadata","GetEvents","RunScripts","GetSlidesScope","Normal","OneLevel","Recursive","GalleryRenderOptions","All","Thumbnail","Barcode","DragDropMimeType","_sessionList","_list","set","clear","combinePath","parts","rx","rxLeftOnly","join","parseJson","response","obj","JSON","parse","parseDragData","dataTransfer","d1","getData","PMA","UI","Components","e","d2","formify","data","sData","encodeURIComponent","ajax","url","method","contentType","success","failure","toUpperCase","toLowerCase","stringify","http","XMLHttpRequest","open","setRequestHeader","onreadystatechange","readyState","status","send","callApiMethod","options","httpMethod","apiPath","infix","webapi","serverUrl","login","username","password","caller","authFailure","responseText","responseType","Message","Resources","translate","Promise","resolve","reject","localOptions","then","versionHttp","usePost","loginSupportsPost","Success","SessionId","getThumbnailUrl","sessionId","pathOrUid","orientation","getSnapshotUrl","snapshotParameters","thumbWidth","thumbHeight","format","channelsString","channels","selectedTimeFrame","timeframe","selectedLayer","layer","scale","flipHorizontally","flipVertically","getBarcodeUrl","abstract","Error","uidCounter_","getUid","ol_uid","VERSION","Themes","Default","Classic","Modern","ButtonLocations","N","S","E","W","NE","NW","SE","SW","Annotation","Rectangle","Arrow","Line","Icon","Point","MultiPoint","Freehand","ClosedFreehand","CompoundFreehand","Ellipse","Circle","Polygon","LineString","Edit","Transform","Modify","Wand","Brush","Eraser","AnnotationState","Pristine","Added","Modified","Deleted","Controls","ZoomSlider","ScaleLine","Overview","Magnifier","ColorAdjustments","LayerSwitch","DimensionSelector","Filename","Snapshot","Rotation","Attribution","Fullscreen","DefaultFillColor","DimensionsChanged","ViewChanged","TilesError","SlideLoadError","FilenameClick","AnnotationLayerChanged","ObjectiveResolutions","assign","target","var_sources","arguments","getValues","values","binarySearch","haystack","needle","opt_comparator","mid","cmp","comparator","numberSafeCompareFunction","low","high","found","a","includes","arr","indexOf","linearFindNearest","direction","reverseSubArray","begin","tmp","extension","isArray","find","func","arr1","arr2","len1","findIndex","index","every","el","idx","isSorted","opt_func","opt_strict","compare","currentVal","res","clamp","cosh","log2","LOG2E","squaredSegmentDistance","squaredDistance","solveLinearSystem","mat","maxRow","maxEl","absValue","coef","k","toDegrees","angleInRadians","toRadians","angleInDegrees","modulo","lerp","CHANGE","ERROR","BLUR","CLEAR","CONTEXTMENU","CLICK","DBLCLICK","DRAGENTER","DRAGOVER","DROP","FOCUS","KEYDOWN","KEYPRESS","LOAD","RESIZE","TOUCHMOVE","WHEEL","listen","type","listener","opt_this","opt_once","originalListener_1","removeEventListener","eventsKey","addEventListener","listenOnce","unlistenByKey","_culture","_labels","Labels","setCulture","culture","interpolate","text","jQuery","assert","assertion","errorCode","transformStringDiv","tmp_","reset","multiply","transform1","transform2","a1","b1","c1","e1","f1","a2","b2","c2","e2","f2","f","setFromArray","rotate","angle","makeScale","compose","dx1","dy1","sx","sy","dx2","dy2","makeInverse","det","toString","transformString","node","document","createElement","style","IDLE","LOADING","LOADED","EMPTY","XY","XYZ","XYM","XYZM","defaultFont","defaultFillStyle","defaultLineCap","defaultLineDash","defaultLineDashOffset","defaultLineJoin","defaultMiterLimit","defaultStrokeStyle","defaultTextAlign","defaultTextBaseline","defaultPadding","defaultLineWidth","checkedFonts","labelCache","setSize","console","warn","measureFont","measureElement","measureContext","textHeights","registerFont","interval","referenceWidth","referenceFonts","len","isAvailable","fontStyle","fontWeight","fontFamily","available","referenceFont","measureTextWidth","check","done","fonts","getKeys","font","split","clearInterval","fontSpec","families","family","weight","setInterval","measureTextHeight","metrics","measureText","isNaN","Number","lineHeight","actualBoundingBoxAscent","actualBoundingBoxDescent","innerHTML","minHeight","maxHeight","padding","border","position","display","left","body","appendChild","offsetHeight","removeChild","measureAndCacheTextWidth","measureTextWidths","lines","widths","numLines","currentWidth","drawImageOrLabel","context","opacity","labelOrImage","originX","originY","w","h","save","globalAlpha","setTransform","contextInstructions","label","executeLabelInstructions","drawImage","restore","ol","tilegrid","proj","olProj","control","olControls","olStyles","interaction","events","geom","Instruction","BEGIN_GEOMETRY","BEGIN_PATH","CLOSE_PATH","CUSTOM","DRAW_CHARS","DRAW_IMAGE","END_GEOMETRY","FILL","MOVE_TO_LINE_TO","SET_FILL_STYLE","SET_STROKE_STYLE","STROKE","fillInstruction","strokeInstruction","beginPathInstruction","closePathInstruction","all","var_args","conditions","event","pass","altKeyOnly","mapBrowserEvent","originalEvent","altKey","metaKey","ctrlKey","shiftKey","altShiftKeysOnly","focusWithTabindex","map","getTargetElement","hasAttribute","contains","activeElement","focus","always","click","mouseActionButton","button","never","pointerMove","singleClick","SINGLECLICK","noModifierKeys","shiftKeyOnly","targetNotEditable","tagName","mouseOnly","pointerEvent","pointerType","primaryAction","isPrimary","delta","closestOnCircle","circle","getRadius","sqrt","closestOnSegment","segment","along","degreesToStringHDMS","hemispheres","degrees","opt_fractionDigits","normalizedDegrees","dflPrecision","precision","pow","deg","sec","ceil","charAt","coordinate1","coordinate2","cosAngle","sinAngle","coord1","coord2","distance","squaredDistanceToSegment","getWorldsAway","opt_sourceExtentWidth","opt_layout","opt_ends","_this","ends_","flatInteriorPointRevision_","flatInteriorPoint_","maxDelta_","maxDeltaRevision_","orientedRevision_","orientedFlatCoordinates_","setFlatCoordinates","setCoordinates","appendLinearRing","linearRing","getFlatCoordinates","changed","polygon","layout","applyProperties","closestPointXY","closestPoint","minSquaredDistance","getRevision","getOrientedFlatCoordinates","getCoordinates","opt_right","getEnds","getFlatInteriorPoint","flatCenter","getInteriorPoint","getLinearRingCount","getLinearRing","getLinearRings","ends","linearRings","getSimplifiedGeometryInternal","squaredTolerance","simplifiedFlatCoordinates","simplifiedEnds","getType","intersectsExtent","setLayout","fromExtent","fromCircle","opt_sides","opt_angle","sides","getStride","getLayout","arrayLength","makeRegular","radius","startAngle","instance","Constructor","createCanvasContext2D","opt_width","opt_height","opt_canvasPool","opt_Context2DSettings","canvas","shift","OffscreenCanvas","getContext","outerWidth","element","offsetWidth","getComputedStyle","parseInt","marginLeft","marginRight","outerHeight","marginTop","marginBottom","replaceNode","newNode","oldNode","parent","parentNode","replaceChild","removeNode","removeChildren","lastChild","replaceChildren","children","oldChildren","childNodes","oldChild","newChild","insertBefore","Feature","opt_geometryOrProperties","on","once","un","id_","geometryName_","style_","styleFunction_","geometryChangeKey_","addChangeListener","handleGeometryChanged_","geometry","setGeometry","properties","setProperties","hasProperties","getProperties","setGeometryName","getGeometryName","getGeometry","getStyle","setStyle","getId","getStyleFunction","handleGeometryChange_","opt_style","styles_1","createStyleFunction","setId","id","removeChangeListener","_defineProperties","props","descriptor","configurable","writable","protoProps","staticProps","_getPrototypeOf","getPrototypeOf","POINTERDRAG","POINTERMOVE","POINTERDOWN","POINTERUP","POINTEROVER","POINTEROUT","POINTERENTER","POINTERLEAVE","POINTERCANCEL","TRUE","FALSE","VOID","memoizeOne","fn","lastResult","lastArgs","lastThis","called","nextArgs","computeExtent","self","ReferenceError","FeatureFormat","dataProjection","defaultFeatureProjection","getReadOptions","opt_options","readProjection","TILE_PIXELS","setWorldExtent","featureProjection","adaptOptions","readFeature","readFeatures","readGeometry","writeFeature","feature","writeFeatures","features","writeGeometry","transformGeometryWithOptions","write","decimals","power_1","round","transformExtentWithOptions","DEFAULT","IMAGE","TEXT","num","opt_size","hasArea","ratio","toSize","CLASS_HIDDEN","CLASS_SELECTABLE","CLASS_UNSELECTABLE","CLASS_UNSUPPORTED","CLASS_CONTROL","CLASS_COLLAPSED","fontRegEx","RegExp","fontRegExMatchIndex","getFontParameters","match","variant","Property","CollectionEvent","opt_element","opt_index","Collection","opt_array","unique_","unique","array_","assertUnique_","updateLength_","getLength","pop","array","getArray","item","insertAt","elem","splice","dispatchEvent","ADD","removeAt","remove","prev","REMOVE","setAt","opt_except","PointerInteraction","handleDownEvent","handleDragEvent","handleMoveEvent","handleUpEvent","stopDown","handlingDownUpSequence","trackedPointers_","targetPointers","getPointerCount","handleEvent","stopEvent","updateTrackedPointers_","preventDefault","handledUp","handled","isPointerDraggingEvent","event_1","pointerId","centroid","pointerEvents","clientX","clientY","UNDEFINED","READY","BaseEvent","propagationStopped","defaultPrevented","stopPropagation","evt","Style","geometry_","geometryFunction_","defaultGeometryFunction","fill_","fill","image_","image","renderer_","renderer","stroke_","stroke","text_","zIndex_","zIndex","getFill","getImage","getRenderer","getStroke","getText","getZIndex","setRenderer","getGeometryFunction","setFill","setImage","setStroke","setText","setZIndex","toFunction","styleFunction","defaultStyles","createDefaultStyle","color","createEditingStyle","styles","white","blue","concat","stateManager","initialize","imageInfo","serviceUrl","BaseUrl","imagesUrl","sessionID","loadImageInfo","findServerUrl","addEvent","eventName","attachEvent","hasClass","className","addClass","removeClass","tileLoad","imageTile","src","flip","horizontally","vertically","imageAdjustments","brightness","contrast","gamma","rgb","tileTransformers","tmpimg","Image","crossOrigin","onload","ctx","tx","ty","pixels","getImageData","lookupTable","brightnessContrastFilter","red","green","colorBalanceFilter","putImageData","toDataURL","getTileUrl","pixelRatio","MaxZoomLevel","channelClippingString","channelGammaString","getAnnotatedTileUrl","layerName","annotatedTileLoad","serverUrls","pmaCoreVersion","failCallback","userInfo","statusText","Reason","dataEncodeCallback","createOlViewer","fireEvent","error","errorMessage","errorResponse","Code","annotationTransform","loadAnnotations","vectorSource","annotations","loadAnnotationsByFingerprint","getFingerprint","fingerprint","getAnnotations","filter","filterCb","currentUserOnly","refresh","random","annot","initializeFeatures","addFeatures","readyCallback","addOrUpdateArrowPanInteraction","factor","viewportWidth","pxDelta","arrowPanInteraction","removeInteraction","KeyboardPan","pixelDelta","keyboardPanFactor","isFinite","duration","addInteraction","maxZoom","xPadding","yPadding","boxSize","TileSize","Width","Height","pixelPerUMeter","MicrometresPerPixelX","createMainView","zoom","tilesPerBoxSide","digitalZoomLevels","startZoom","iw","ih","allowedResolution","maxResolution","minResolution","mmpx","v","objective","view","View","showFullExtent","resolutions","constrainResolution","zoomFactor","createMagnifierControl","collapsed","createOverviewControl","querySelector","tipLabel","overview","tracking","TimeFrames","TimeFrame","Layers","LayerID","Channels","ChannelID","Color","Name","TimeID","tf","ImageLayer","Channel","fov","Active","DefaultGamma","Gamma","getActiveChannels","getChannelGammaString","tabIndex","theme","BackgroundColor","dimensions","backgroundColor","NumberOfZoomLevels","scaleLine","pixelProjection","Tile","tileUrlFunction","tileLoadFunction","attributions","cacheSize","tileGrid","createXYZ","tileSize","preload","mainLayer","loading","loaded","progressEl","olViewer","loadingBar","getSource","visibility","updateProgress","setTimeout","dragZoom","DragZoom","condition","olEventsCondition","dragRotate","DragRotate","controls","Zoom","zoomInTipLabel","zoomOutTipLabel","PrevZoom","FullScreen","fullScreenElement","labelActive","layerList","annotationsLayers","AnnotationsLayers","groupList","aLayerName","alayer","displayInLayerSwitcher","visible","loadLayers","title","group","Group","layers","Vector","annotationsLayer","updateWhileAnimating","updateWhileInteracting","showAnnotations","measureVectorSource","measureLayer","Fill","Stroke","Text","gridLayer","measureTooltips","dragPanInteraction","DragPan","kinetic","Kinetic","onFocusOnly","mouseWheelInteraction","PmaMouseWheelZoom","maxDelta","deltaPerZoom","timeout","Map","interactions","PinchZoom","PinchRotate","DoubleClickZoom","KeyboardZoom","loadTilesWhileAnimating","highQuality","loadTilesWhileInteracting","setControlVisibility","fullscreenControl","customButtons","createCustomButtons","setPosition","fitToExtent","initializeControls","totalLevels","percent","zsElement","digitalLevelsBgColor","zsStyle","window","testContainer","testEl","getPropertyValue","background","grid","showGrid","mapResize","setMapSizeClass","setGamma","overviewControl","changeOverviewSizePx","printObjectivesInZoomBar","oldEl","parseFloat","thumbButton","thumbButtonStyle","thumbButtonHeight","zoomBarHeight","zoomLevelHeight","objectiveHeights","obji","curObj","displayObjective","objectivesEl","html","top","valid","findClosestObjectiveValue","allowedValues","av","reduce","iMin","calculateObjective","getView","getResolution","toFixed","this_","applyImageAdjustments","colorAdjustmentsControl","update","drawScalebar","canvasCtx","location","pixelsPerUnit","totalUnits","firstChar","startpixely","startsWith","startpixelx","endsWith","fillStyle","fillRect","beginPath","moveTo","lineTo","textBaseline","fillText","drawTitle","strokeStyle","lineWidth","strokeText","drawBarcode","viewport","AssociatedImageTypes","img","fw","fh","strokeRect","onerror","getActiveServerUrl","getSessionID","drawOverview","buttons","defaultLocation","groupByLocations","div","btn","content","controlDiv","getControlVisibility","setScaleLineConfiguration","conf","scaleLineDiv","setControlsConfiguration","configuration","ControlTypes","setCollapsed","barcodeControl","magnifierControl","layerSwitcher","dimensionsControl","filenameControl","RotationControl","rotationControl","getControlsConfiguration","scaleLineControl","getCollapsed","filename","snapShotControl","attributionControl","zoomSliderControl","addControl","zoomSlider","meta","MetaData","Value","PathomationAttribution","ColorAdjustment","viewer","colorAdjustments","pmaViewport","barcode","AssociatedImage","imageType","renderSliders","filenameOptions","onClick","path","rotCollapsed","objectiveIndicator","snapshot","resetTipLabel","flipHorizontallyTipLabel","flipVerticallyTipLabel","magnifier","flatMidpoint_","flatMidpointRevision_","appendCoordinate","lineString","forEachSegment","getCoordinateAtM","opt_extrapolate","extrapolate","getCoordinateAt","fraction","opt_dest","getFlatMidpoint","alertedForIncompatibilty","checkBrowserCompatibility","targetElement","supported","HTMLElement","protocol","elID","getElementById","IncompatibilityRedirect","alert","requestOptions","guidGenerator","S4","substring","ANIMATING","INTERACTING","Observable","onInternal","onceInternal","unInternal","revision_","keys","ol_key","unByKey","Control","target_","map_","listenerKeys","render","setTarget","disposeInternal","getMap","setMap","getOverlayContainerStopEvent","POSTRENDER","mapEvent","z","opt_tileCoord","getKeyZXY","getKey","tileCoord","getCacheKeyForTileKey","tileKey","_a","lastIndexOf","fromKey","hash","withinExtentAndZ","getMinZoom","getMaxZoom","tileRange","getFullTileRange","OPACITY","VISIBLE","Z_INDEX","MAX_RESOLUTION","MIN_RESOLUTION","MAX_ZOOM","MIN_ZOOM","SOURCE","subClass","superClass","FEET","PIXELS","USFEET","_typeof","assertThisInitialized","ObjectEvent","oldValue","BaseObject","opt_values","values_","notify","eventType","PROPERTYCHANGE","opt_silent","unset","getForProjection","getDefaultTileGrid","createForProjection","setDefaultTileGrid","getTileCoordCenter","extentFromProjection","getTileCoordForCoordAndZ","createForExtent","opt_maxZoom","opt_tileSize","opt_corner","resolutionsFromExtent","origin","xyzOptions","gridOptions","minZoom","opt_maxResolution","half","getCoord","getCoords","containsNumber","getGeom","geojson","geometries","ua","navigator","userAgent","FIREFOX","WEBKIT","MAC","DEVICE_PIXEL_RATIO","devicePixelRatio","WORKER_OFFSCREEN_CANVAS","WorkerGlobalScope","IMAGE_DECODE","decode","PASSIVE_EVENT_LISTENERS","passive","MultiLineString","lineStrings","appendLineString","multiLineString","opt_interpolate","getLineString","getLineStrings","getFlatMidpoints","midpoints","midpoint","color_","getColor","setColor","isObject","bbox","validateBBox","validateId","feat","isNumber","lineCap_","lineCap","lineDash_","lineDash","lineDashOffset_","lineDashOffset","lineJoin_","lineJoin","miterLimit_","miterLimit","width_","getLineCap","getLineDash","getLineDashOffset","getLineJoin","getMiterLimit","setLineCap","setLineDash","setLineDashOffset","setLineJoin","setMiterLimit","setWidth","SimpleGeometry","getFirstCoordinate","getLastCoordinate","getSimplifiedGeometry","simplifiedGeometryRevision","simplifiedGeometryMaxMinSquaredTolerance","simplifiedGeometry","getStrideForLayout","nesting","getLayoutForStride","anchor","opt_sy","opt_anchor","transformGeom2D","simpleGeometry","transform2D","dest","anchorX","anchorY","ADDFEATURE","CHANGEFEATURE","REMOVEFEATURE","FEATURESLOADSTART","FEATURESLOADEND","FEATURESLOADERROR","VectorLayer","createRenderer","VectorSourceEvent","opt_feature","opt_features","Event","VectorSource","state","loader_","format_","overlaps_","overlaps","url_","loader","strategy_","strategy","collection","useSpatialIndex","featuresRtree_","RBush","loadedExtentsRtree_","loadingExtentsCount_","nullGeometryFeatures_","idIndex_","uidIndex_","featureChangeKeys_","featuresCollection_","addFeaturesInternal","bindFeaturesCollection_","addFeature","addFeatureInternal","featureKey","addToIndex_","setupChangeEvents_","insert","VectorEventType","EventType","handleFeatureChange_","ObjectEventType","extents","newFeatures","geometryFeatures","length_1","length_2","load","length_3","modifyingCollection","CollectionEventType","removeFeature","opt_fast","featureId","removeFeatureInternal","clearEvent","forEachFeature","forEachFeatureAtCoordinateDirect","forEachFeatureInExtent","intersectsCoordinate","forEachInExtent","forEachFeatureIntersectingExtent","result","getFeaturesCollection","getFeatures","getAll","getFeaturesAtCoordinate","getFeaturesInExtent","getInExtent","getClosestFeatureToCoordinate","opt_filter","closestFeature","NaN","previousMinSquaredDistance","minDistance","getFeatureById","getFeatureByUid","uid","getFormat","getOverlaps","getUrl","sid","removeFromIdIndex_","hasFeature","loadFeatures","loadedExtentsRtree","extentsToLoad","_loop_1","extentToLoad","this_1","removeLoadedExtent","removed","setLoader","setUrl","Source","MultiPolygon","opt_endss","endss_","flatInteriorPointsRevision_","flatInteriorPoints_","polygons","endss","jj","appendPolygon","newEndss","multiPolygon","getEndss","getFlatInteriorPoints","flatCenters","getInteriorPoints","simplifiedEndss","getPolygon","prevEnds","getPolygons","lastEnds","appendPoint","multiPoint","getPoint","getPoints","points","Interaction","setActive","getActive","ACTIVE","active","pan","opt_duration","currentCenter","getCenterInternal","animateInternal","easing","getConstrainedCenter","zoomByDelta","currentZoom","getZoom","newZoom","getConstrainedZoom","newResolution","getResolutionForZoom","getAnimating","cancelAnimations","animate","FRACTION","LAYERGROUP","SIZE","TARGET","VIEW","easeIn","easeOut","inAndOut","linear","inflateCoordinates","opt_coordinates","inflateCoordinatesArray","opt_coordinatess","coordinatess","inflateMultiCoordinatesArray","opt_coordinatesss","coordinatesss","ReprojTile","sourceTileGrid","targetProj","targetTileGrid","wrappedTileCoord","gutter","getTileFunction","opt_errorThreshold","opt_renderEdges","opt_contextOptions","TileState","renderEdges_","contextOptions_","pixelRatio_","gutter_","canvas_","sourceTileGrid_","targetTileGrid_","wrappedTileCoord_","sourceTiles_","sourcesListenerKeys_","sourceZ_","targetExtent","getTileCoordExtent","maxTargetExtent","maxSourceExtent","limitedTargetExtent","sourceProjExtent","targetResolution","sourceResolution","errorThresholdInPixels","triangulation_","Triangulation","getTriangles","getZForResolution","calculateSourceExtent","sourceRange","getTileRangeForExtentAndZ","srcX","srcY","tile","reproject_","sources","getState","getTileSize","leftToLoad_1","sourceListenKey_1","unlistenSources_","TileImage","opaque","defaultTileLoadFunction","tilePixelRatio","urls","transition","attributionsCollapsible","zDirection","tileClass","ImageTile","tileCacheForProjection","tileGridForProjection","reprojectionErrorThreshold_","reprojectionErrorThreshold","imageSmoothing","renderReprojectionEdges_","canExpireCache","tileCache","expireCache","usedTiles","usedTileCache","getTileCacheForProjection","getContextOptions","getGutterForProjection","getProjection","getGutter","getOpaque","getTileGridForProjection","thisProj","projKey","TileCache","highWaterMark","createTile_","urlTileCoord","getTileCoordForTileUrlFunction","tileUrl","tileOptions","handleTileChange","getTile","tileCoordKey","containsKey","newTile","getTilePixelRatio","getTileInternal","interimTile","refreshInterimChain","setRenderReprojectionEdges","setTileGridForProjection","UrlTile","deflateCoordinate","deflateCoordinates","deflateCoordinatesArray","deflateMultiCoordinatesArray","ERROR_THRESHOLD","ENABLE_RASTER_REPROJECTION","Layer","baseOptions","mapPrecomposeKey_","mapRenderKey_","sourceChangeKey_","handleSourcePropertyChange_","setSource","getLayersArray","getLayerStatesArray","opt_states","states","getLayerState","getSourceState","handleSourceChange_","pixel","frameState","layerRenderer","prepareFrame","renderFrame","PRECOMPOSE","layerStatesArray","layerState","some","arrayLayerState","hasRenderer","inView","viewState","ARRAY_BUFFER","XML","createFromTemplate","template","zRegEx","xRegEx","yRegEx","dashYRegEx","range","createFromTemplates","templates","tileUrlFunctions","createFromTileUrlFunctions","nullTileUrlFunction","expandUrl","exec","startCharCode","charCodeAt","stopCharCode","charCode","fromCharCode","stop_1","PRERENDER","POSTCOMPOSE","RENDERCOMPLETE","superPropBase","_get","receiver","Reflect","base","desc","getOwnPropertyDescriptor","DEFAULT_WMS_VERSION","IMAGE_SMOOTHING_DISABLED","imageSmoothingEnabled","msImageSmoothingEnabled","BOTTOM_CENTER","CENTER_LEFT","CENTER_CENTER","CENTER_RIGHT","TOP_CENTER","ulElement_","collapsed_","userCollapsed_","overrideCollapsible_","collapsible","collapsible_","expandClassName","collapseLabel","collapseClassName","collapseLabel_","textContent","label_","activeLabel","toggleButton_","setAttribute","handleClick_","cssClasses","renderedAttributions_","renderedVisible_","collectSourceAttributions_","lookup","visibleAttributions","attributionGetter","getAttributions","getAttributionsCollapsible","setCollapsible","updateElement_","handleToggle_","classList","toggle","getCollapsible","Rotate","compassClassName","callResetNorth_","resetNorth","duration_","autoHide_","autoHide","rotation_","resetNorth_","getRotation","setRotation","zoomInClassName","zoomOutClassName","zoomInLabel","zoomOutLabel","inElement","createTextNode","outElement","zoomByDelta_","setZoom","FullScreenEventType","isFullScreenSupported","requestFullscreen","fullscreenEnabled","isFullScreen","fullscreenElement","requestFullScreen","cssClassName_","activeClassName_","activeClassName","inactiveClassName_","inactiveClassName","labelNode_","labelActiveNode_","button_","setClassName_","keys_","source_","handleFullScreen_","exitFullscreen","requestFullScreenWithKeys","handleFullScreenChange_","updateSize","fullscreen","_b","_c","nextClassName","MousePosition","handleProjectionChanged_","coordinateFormat","setCoordinateFormat","setProjection","renderOnMouseOut","placeholder","undefinedHTML","placeholder_","renderOnMouseOut_","renderedHTML_","mapProjection_","transform_","getCoordinateFormat","handleMouseMove","updateHTML_","getEventPixel","handleMouseOut","getViewport","getCoordinateFromPixelInternal","ControlledMap","Composite","PluggableMap","OverviewMap","boundHandleRotationChanged_","handleRotationChanged_","rotateWithView_","rotateWithView","viewExtent_","ovmapDiv_","view_","ovmap_","ovmap","addLayer","box","boxSizing","boxOverlay_","Overlay","positioning","OverlayPositioning","addOverlay","scope","overlay","overlayBox","getElement","move","mousePosition","getEventCoordinateInternal","endMoving","setCenterInternal","oldMap","oldView","unbindView_","handleMapPropertyChange_","bindView_","isDef","resetExtent_","isRendered","updateBoxAfterOvmapIsRendered_","MapProperty","newView","setView","ViewProperty","ROTATION","validateExtent_","mapSize","calculateExtentInternal","ovmapSize","ovextent","topLeftPixel","getPixelFromCoordinateInternal","bottomRightPixel","boxWidth","boxHeight","ovmapWidth","ovmapHeight","recenter_","ovview","steps","MAX_RATIO","LN2","fitInternal","updateBox_","ovresolution","ovmapPostrenderKey_","MapEventType","getRotateWithView","setRotateWithView","getOverviewMap","LEADING_DIGITS","bar","innerElement_","viewState_","minWidth_","minWidth","renderedWidth_","handleUnitsChanged_","setUnits","scaleBar_","scaleBarSteps_","scaleBarText_","dpi_","dpi","setDpi","pointResolutionUnits","nominalCount","suffix","metersPerDegree","count","decimalCount","decimal","createScaleBar","mapScale","getScaleForResolution","toLocaleString","scaleSteps","stepWidth","createMarker","createStepText","isLast","lengthString","mpu","Direction","dragListenerKeys_","currentResolution_","direction_","dragging_","heightLimit_","widthLimit_","startX_","startY_","thumbSize_","sliderInitialized_","thumbElement","containerElement","handleDraggerStart_","handleDraggerDrag_","handleDraggerEnd_","handleContainerClick_","initSlider_","container","containerWidth","containerHeight","containerStyle","thumb","thumbStyle","relativePosition","getRelativePosition_","offsetX","offsetY","getResolutionForPosition_","getZoomForResolution","firstElementChild","beginInteraction","drag","doc","getOwnerDocument","setResolution","endInteraction","setThumbPosition_","getPositionForResolution_","amount","getResolutionForValueFunction","getValueForResolutionFunction","ZoomToExtent","handleZoomToExtent","defaults","zoomOptions","rotateOptions","attribution","attributionOptions","iterator","HEX_COLOR_RE_","NAMED_COLOR_RE_","asString","fromNamed","fromString","g","hasAlpha","substr","normalize","fromStringInternal_","asArray","isStringColor","test","assignClosest","offset1","offset2","maxSquaredDelta","squaredDelta","arrayMaxSquaredDelta","multiArrayMaxSquaredDelta","assignClosestPoint","isRing","opt_tmpPoint","tmpPoint","assignClosestArrayPoint","assignClosestMultiArrayPoint","GeometryCollection","opt_geometries","geometries_","changeEventsKeys_","listenGeometriesChange_","unlistenGeometriesChange_","geometryCollection","setGeometries","getGeometries","cloneGeometries","getGeometriesArray","getGeometriesArrayRecursive","geometriesArray","simplifiedGeometries","simplified","simplifiedGeometryCollection","setGeometriesArray","clonedGeometries","asColorLike","HIT_DETECT_RESOLUTION","createHitDetectionImageData","featureCount","indexFactor","featuresByZIndex","featureStyleFunction","originalStyle","getOpacity","imgSize","getImageSize","imgContext","alpha","getAnchor","anchorXUnits","anchorYUnits","getOrigin","getScale","byGeometryType","zIndexKeys","sort","geomAndStyle","kk","drawGeometry","hitDetect","imageData","resultFeatures","CENTER","RESOLUTION","padNumber","number","opt_precision","numberString","compareVersions","v1","v2","s1","s2","n1","n2","GEOMETRY_RENDERERS","builderGroup","opt_declutterBuilderGroup","declutterImageWithText","imageStyle","textStyle","getImageState","imageReplay","getBuilder","setImageStyle","drawPoint","textReplay","setTextStyle","drawText","lineStringReplay","setFillStrokeStyle","drawLineString","polygonReplay","drawPolygon","drawMultiPoint","drawMultiLineString","drawMultiPolygon","replayGroup","geometryRenderer","circleReplay","drawCircle","defaultOrder","feature1","feature2","getSquaredTolerance","getTolerance","renderFeature","opt_transform","imageState","unlistenImageChange","listenImageChange","simplifyTransformed","renderGeometry","drawCustom","renderFeatureInternal","Target","opt_target","eventTarget_","pendingRemovals_","dispatching_","listeners_","listeners","listenersForType","propagate","dispatching","pendingRemovals","pr","getListeners","hasListener","opt_type","font_","scale_","scaleArray_","textAlign_","textAlign","textBaseline_","maxAngle_","maxAngle","placement_","placement","overflow_","overflow","offsetX_","offsetY_","backgroundFill_","backgroundFill","backgroundStroke_","backgroundStroke","padding_","getFont","getPlacement","getMaxAngle","getOverflow","getTextAlign","getTextBaseline","getOffsetX","getOffsetY","getBackgroundFill","getBackgroundStroke","getPadding","getScaleArray","setOverflow","setFont","setMaxAngle","setOffsetX","setOffsetY","setPlacement","setScale","setTextAlign","setTextBaseline","setBackgroundFill","setBackgroundStroke","setPadding","douglasPeucker","simplifiedOffset","markers","stack","last","first","maxSquaredDistance","squaredDistance_1","douglasPeuckerArray","snap","quantize","quantizeArray","quantizeMultiArray","ImageWrapper","imageLoadFunction","src_","unlisten_","imageLoadFunction_","handleImageError_","unlistenImage_","handleImageLoad_","listenImage","loadHandler","errorHandler","promise","listening_1","catch","message","tmpTileCoord","TileGrid","resolutions_","origins","zoomFactor_","origin_","origins_","tileSizes_","tileSizes","tileSize_","extent_","fullTileRanges_","tmpSize_","tmpExtent_","sizes","restrictedTileRange","calculateTileRanges_","forEachTileCoord","forEachTileCoordParentTileRange","opt_tileRange","tileCoordExtent","getResolutions","getTileCoordChildTileRange","getTileRangeForTileCoordAndZ","tileCoordZ","tileCoordX","tileCoordY","getTileRangeExtent","getTileCoordForXYAndZ_","getTileCoordForCoordAndResolution","getTileCoordForXYAndResolution_","reverseIntersectionPolicy","adjustX","adjustY","xFromOrigin","yFromOrigin","getTileCoordResolution","opt_direction","fullTileRanges","DEFAULT_MAX_ZOOM","DEFAULT_TILE_SIZE","linearRingContainsExtent","linearRingContainsXY","wn","linearRingsContainsXY","linearRingssContainsXY","linearRingIsClockwise","edge","linearRingsAreOriented","right","isClockwise","linearRingssAreOriented","orientLinearRings","orientLinearRingsArray","MapBrowserEvent","opt_dragging","opt_frameState","pixel_","coordinate_","dragging","getCoordinateFromPixel","Mt","u","root_","size_","It","addAll","isInteger","trunc","_","interfaces_","getClass","equalsWithTolerance","I","MAX_VALUE","doubleToLongBits","longBitsToDouble","isInfinite","defineProperties","C","NULL_ORDINATE","DimensionalComparator","serialVersionUID","X","Y","Z","setOrdinate","equals2D","getOrdinate","equals3D","equalInZ","compareTo","copy","distance3D","hashCode","setCoordinate","L","_dimensionsToTest","O","INTERIOR","BOUNDARY","EXTERIOR","NONE","toLocationSymbol","T","R","P","LOG_10","log10","wrap","average","D","str","append","setCharAt","M","intValue","A","isWhitespace","F","_hi","_lo","init","G","TWO_PI","PI_2","EPS","SPLIT","MAX_PRINT_DIGITS","TEN","ONE","SCI_NOT_EXPONENT_CHAR","SCI_NOT_ZERO","le","extractSignificantDigits","magnitude","divide","gt","lt","subtract","valueOf","selfAdd","sqr","doubleValue","negate","isZero","selfSubtract","getSpecialNumberString","selfDivide","dump","createNaN","ge","selfMultiply","reciprocal","rint","setValue","isNegative","selfSqr","toStandardNotation","toSciNotation","stringOfChar","isPositive","signum","isDigit","q","B","DP_SAFE_EPSILON","orientationIndex","orientationIndexFilter","signOfDet2x2","V","U","getCoordinate","getCoordinateCopy","getDimension","getX","expandEnvelope","getY","toCoordinateArray","arraycopy","getProperty","_minx","_maxx","_miny","_maxy","H","isNull","getMaxX","getMaxY","getMinX","getMinY","covers","expandToInclude","minExtent","setToNull","maxExtent","expandBy","centre","typeStr","emptyTypeStr","spaces","parenComma","doubleParenComma","trimParens","K","geometryFactory","_e","read","search","Q","extractGeometry","getGeometryType","J","_coordinates","multipoint","_geometries","linestring","_points","linearring","multilinestring","_shell","_holes","multipolygon","geometrycollection","createPoint","trim","createMultiPoint","createLineString","createLinearRing","createMultiLineString","createPolygon","createMultiPolygon","createGeometryCollection","parser","toLineString","$","tt","et","shouldNeverReachHere","isTrue","nt","_result","_inputLines","_intPt","_intLineIndex","_isProper","_pa","_pb","_precisionModel","it","DONT_INTERSECT","DO_INTERSECT","COLLINEAR","NO_INTERSECTION","POINT_INTERSECTION","COLLINEAR_INTERSECTION","getIndexAlongSegment","computeIntLineIndex","getTopologySummary","isEndPoint","isCollinear","computeIntersection","computeIntersect","getIntersectionNum","getEdgeDistance","isProper","hasIntersection","setPrecisionModel","isInteriorIntersection","computeEdgeDistance","getEndpoint","isIntersection","getIntersectionAlongSegment","nonRobustComputeEdgeDistance","rt","isInSegmentEnvelopes","at","normalizeToMinimum","smallestInAbsValue","safeHCoordinateIntersection","nearestEndpoint","intersectionWithNormalization","makePrecise","checkDD","out","println","normalizeToEnvCentre","computeCollinearIntersection","distancePointLine","ot","st","_p","_crossingCount","_isPointOnSegment","countSegment","isPointInPolygon","getLocation","isOnSegment","locatePointInRing","ut","CLOCKWISE","COUNTERCLOCKWISE","STRAIGHT","signedArea","distanceLineLine","isPointInRing","computeLength","isCCW","computeOrientation","distancePointLinePerpendicular","isOnLine","ct","_envelope","_factory","_SRID","_userData","getSRID","pt","SORTINDEX_POINT","SORTINDEX_MULTIPOINT","SORTINDEX_LINESTRING","SORTINDEX_LINEARRING","SORTINDEX_MULTILINESTRING","SORTINDEX_POLYGON","SORTINDEX_MULTIPOLYGON","SORTINDEX_GEOMETRYCOLLECTION","geometryChangedFilter","isGeometryCollection","getSortIndex","getFactory","getGeometryN","isRectangle","equalsTopo","equalsExact","geometryChanged","geometryChangedAction","equalsNorm","norm","getNumGeometries","compareToSameClass","getUserData","getEnvelope","toGeometry","getEnvelopeInternal","checkNotGeometryCollection","equal","getPrecisionModel","computeEnvelopeInternal","setSRID","setUserData","hasNext","next","isGeometryCollectionOrDerived","hasNonEmptyElements","hasNullElements","ht","ft","dt","Mod2BoundaryNodeRule","EndPointBoundaryNodeRule","MultiValentEndPointBoundaryNodeRule","MonoValentEndPointBoundaryNodeRule","MOD2_BOUNDARY_RULE","ENDPOINT_BOUNDARY_RULE","MULTIVALENT_ENDPOINT_BOUNDARY_RULE","MONOVALENT_ENDPOINT_BOUNDARY_RULE","OGC_SFS_BOUNDARY_RULE","isInBoundary","yt","_t","mt","vt","toArray","Et","xt","Nt","ensureCapacity","Ct","arrayList_","position_","St","coordArrayType","closeRing","Lt","bt","ForwardComparator","BidirectionalComparator","wt","Ot","ptNotInList","scroll","hasRepeatedPoints","removeRepeatedPoints","reverse","removeNull","copyDeep","isEqualReversed","envelope","atLeastNCoordinatesOrNothing","increasingDirection","minCoordinate","extract","OLDcompare","Tt","put","entrySet","Rt","Pt","Dt","hashSet_","getValue","fixAfterInsertion","rotateLeft","rotateRight","getFirstEntry","successor","At","Ft","treeSet_","Gt","asList","qt","Bt","DONTCARE","SYM_FALSE","SYM_TRUE","SYM_DONTCARE","SYM_P","SYM_L","SYM_A","toDimensionSymbol","toDimensionValue","Vt","Ut","isDone","isGeometryChanged","zt","getNumPoints","isEquivalentClass","getBoundaryDimension","getBoundary","Xt","isClosed","Yt","_geom","_geomFact","_bnRule","_endpointMap","boundaryMultiLineString","getEmptyMultiPoint","computeBoundaryCoordinates","createMultiPointFromCoords","Kt","boundaryLineString","getStartPoint","getEndPoint","addEndpoint","getCoordinateN","kt","jt","Ht","NEWLINE","SIMPLE_ORDINATE_FORMAT","chars","getStackTrace","printStackTrace","readLine","Wt","copyCoord","isEqual","swap","ensureValidRing","createClosedRing","isSimple","getPointN","getCoordinateSequence","getCoordinateSequenceFactory","isCoordinate","Jt","Qt","Zt","$t","getNumInteriorRing","convexHull","getExteriorRing","getInteriorRingN","te","isValid","ee","validateConstruction","MINIMUM_VALID_SIZE","ne","ie","_isUserDataCopied","re","NoOpGeometryOperation","CoordinateOperation","CoordinateSequenceOperation","setCopyUserData","edit","editInternal","editGeometryCollection","editPolygon","getName","GeometryEditorOperation","oe","se","ae","editCoordinates","ue","_dimension","ce","pe","instanceObject","readResolve","he","entries","fe","_modelType","_scale","FLOATING","de","FIXED","maximumPreciseValue","getMaximumSignificantDigits","isFloating","FLOATING_SINGLE","mostPrecise","_name","nameToTypeMap","ye","Type","_coordinateSequenceFactory","getDefaultCoordinateSequenceFactory","me","buildGeometry","toGeometryArray","toPolygonArray","toLineStringArray","toPointArray","createGeometry","toMultiPolygonArray","toMultiLineStringArray","toMultiPointArray","toLinearRingArray","createPointFromInternalCoord","ve","Ie","Ee","xe","FeatureCollection","Ne","precisionModel","reducePrecision","Ce","Se","Le","ON","opposite","peek","empty","be","_minIndex","_minCoord","_minDe","_orientedDe","getRightmostSide","getRightmostSideOfSegment","checkForRightmostCoordinate","findRightmostEdgeAtVertex","getEdge","findRightmostEdgeAtNode","getNode","getEdges","getRightmostEdge","isForward","getSym","findEdge","we","msgWithCoord","Oe","addLast","removeFirst","Te","_finder","_dirEdgeList","_nodes","_rightMostCoord","_env","clearVisitedEdges","setVisited","getRightmostCoordinate","computeNodeDepth","isVisited","computeDepths","copySymDepths","computeDepth","setEdgeDepths","addReachable","findResultEdges","getDepth","isInteriorAreaEdge","setInResult","setDepth","getNodes","getDirectedEdges","Re","setAllLocations","setAllLocationsIfNull","isLine","merge","getLocations","setLocations","isArea","isAnyNull","setLocation","isEqualOnSide","allPositionsEqual","Pe","elt","getGeometryCount","toLine","toLineLabel","De","_startDe","_maxNodeDegree","_edges","_pts","_label","_ring","_isHole","_geometryFactory","computePoints","computeRing","isIsolated","getEdgeRing","getLabel","mergeLabel","addPoints","setEdgeRing","getNext","computeMaxNodeDegree","getOutgoingDegree","isHole","containsPoint","addHole","isShell","getMaxNodeDegree","getShell","setShell","toPolygon","Me","setMinEdgeRing","getNextMin","Ae","buildMinimalRings","getMinEdgeRing","linkDirectedEdgesForMinimalEdgeRings","linkMinimalDirectedEdges","Fe","_isInResult","_isCovered","_isCoveredSet","_isVisited","isCovered","isCoveredSet","setLabel","setCovered","updateIM","computeIM","isInResult","Ge","_coord","isIncidentEdgeInResult","print","computeMergedLocation","setNode","setLabelBoundary","qe","nodeMap","nodeFact","addNode","createNode","getBoundaryNodes","Be","Ve","isNorthern","isOpposite","commonHalfPlane","isInHalfPlane","quadrant","Ue","_edge","_node","_p0","_p1","_dx","_dy","_quadrant","compareDirection","getDy","atan2","getDirectedCoordinate","getDx","getQuadrant","computeLabel","ze","_isForward","_sym","_next","_nextMin","_edgeRing","_minEdgeRing","_depth","computeDirectedLabel","setNextMin","getDepthDelta","isLineEdge","printEdge","printReverse","setSym","setVisitedEdge","setNext","depthFactor","Xe","Ye","_edgeEndList","printEdges","eiList","getNodeIterator","linkResultDirectedEdges","debugPrintln","isBoundaryNode","linkAllDirectedEdges","matchInSameDirection","getEdgeEnds","debugPrint","getEdgeIterator","findEdgeInSameDirection","insertEdge","findEdgeEnd","addEdges","ke","_shellList","sortShellsAndHoles","computePolygons","placeFreeHoles","findEdgeRingContaining","buildMinimalEdgeRings","findShell","placePolygonHoles","buildMaximalEdgeRings","je","getBounds","He","_bounds","_item","getItem","We","_size","_items","poll","reorder","Ke","visitItem","Je","query","Qe","_childBoundables","_level","Ze","getLevel","getChildBoundables","addChildBoundable","computeBounds","$e","reverseOrder","singletonList","tn","_boundable1","_boundable2","_distance","_itemDistance","expandToQueue","isComposite","expand","isLeaves","getDistance","getBoundable","en","_root","_built","_itemBoundables","_nodeCapacity","DEFAULT_NODE_CAPACITY","nn","IntersectsOp","getNodeCapacity","lastNode","build","removeItem","itemsTree","boundablesAtLevel","getIntersectsOp","createHigherLevels","getRoot","createParentBoundables","depth","getComparator","compareDoubles","rn","sn","STRtreeNode","xComparator","yComparator","intersectsOp","createParentBoundablesFromVerticalSlices","createParentBoundablesFromVerticalSlice","an","verticalSlices","nearestNeighbour","POSITIVE_INFINITY","centreX","avg","centreY","relativeSign","compareValue","ln","_segString","segmentIndex","_segmentOctant","_isInterior","isInterior","cn","_nodeMap","getSplitCoordinates","addEndpoints","addEdgeCoordinates","addCollapsedNodes","findCollapsesFromInsertedNodes","findCollapsesFromExistingVertices","addSplitEdges","createSplitEdge","findCollapseIndex","gn","getSegmentOctant","checkSplitEdgesCorrectness","pn","octant","hn","setData","addIntersection","_nodeList","_data","safeOctant","addIntersectionNode","getNodeList","addIntersections","getNodedSubstrings","dn","p0","p1","yn","isVertical","project","projectionFactor","distancePerpendicular","midPoint","closestPoints","lineIntersection","pointAlongOffset","segmentFraction","isHorizontal","pointAlong","_n","tempEnv1","tempEnv2","_overlapSeg1","_overlapSeg2","overlap","getLineSegment","mn","_start","_end","_context","_id","computeSelect","select","computeOverlaps","computeOverlapsInternal","getEndIndex","getStartIndex","vn","getChainStartIndices","findChainEnd","toIntArray","getChains","In","computeNodes","En","_segInt","setSegmentIntersector","xn","_monoChains","_index","_idCounter","_nodedSegStrings","_nOverlaps","SegmentOverlapAction","getMonotoneChains","getIndex","intersectChains","Nn","_si","processIntersections","Cn","_quadrantSegments","DEFAULT_QUADRANT_SEGMENTS","_endCapStyle","CAP_ROUND","_joinStyle","JOIN_ROUND","_mitreLimit","DEFAULT_MITRE_LIMIT","_isSingleSided","_simplifyFactor","DEFAULT_SIMPLIFY_FACTOR","setQuadrantSegments","setEndCapStyle","setJoinStyle","setMitreLimit","Sn","CAP_FLAT","CAP_SQUARE","JOIN_MITRE","JOIN_BEVEL","getEndCapStyle","isSingleSided","getJoinStyle","setSimplifyFactor","getSimplifyFactor","getQuadrantSegments","getMitreLimit","setSingleSided","bufferDistanceError","Ln","_distanceTol","_isDeleted","_angleOrientation","_inputLine","bn","INIT","DELETE","KEEP","NUM_PTS_TO_CHECK","isDeletable","isConcave","isShallow","isShallowSampled","deleteShallowConcavities","findNextNonDeletedIndex","isShallowConcavity","simplify","collapseLine","_ptList","_minimimVertexDistance","On","COORDINATE_ARRAY_TYPE","addPt","isRedundant","revere","addPts","setMinimumVertexDistance","Tn","Rn","PI_TIMES_2","PI_OVER_2","PI_OVER_4","isAcute","isObtuse","interiorAngle","normalizePositive","angleBetween","diff","getTurn","angleBetweenOriented","Pn","_maxCurveSegmentError","_filletAngleQuantum","_closingSegLengthFactor","_segList","_bufParams","_li","_s0","_s1","_s2","_seg0","_seg1","_offset0","_offset1","_side","_hasNarrowConcaveAngle","MAX_CLOSING_SEG_LEN_FACTOR","Dn","OFFSET_SEGMENT_SEPARATION_FACTOR","INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR","CURVE_VERTEX_SNAP_DISTANCE_FACTOR","addNextSegment","computeOffsetSegment","addCollinear","addOutsideTurn","addInsideTurn","addLineEndCap","addFilletArc","addMitreJoin","addLimitedMitreJoin","addFilletCorner","addBevelJoin","createSquare","addSegments","addFirstSegment","addLastSegment","initSideSegments","createCircle","hasNarrowConcaveAngle","Mn","getOffsetCurve","getSegGen","computePointCurve","computeOffsetCurve","computeSingleSidedBufferCurve","simplifyTolerance","computeRingBufferCurve","computeLineBufferCurve","getLineCurve","getBufferParameters","getRingCurve","copyCoordinates","An","_subgraphs","_seg","_cga","Fn","DepthSegment","findStabbedSegments","Gn","_leftDepth","_upwardSeg","compareX","qn","p2","interpolateZ","longestSideLength","circumcentre","area3D","inCentre","perpendicularBisector","angleBisector","Bn","_inputGeom","_curveBuilder","_curveList","addPoint","addCurve","addPolygon","isErodedCompletely","addPolygonRing","isTriangleErodedCompletely","addLineString","getCurves","addCollection","Vn","locate","Un","_parent","_atStart","_max","_subcollectionIterator","isAtomic","zn","containsPointInPolygon","Xn","_edgeMap","_edgeList","_ptInAreaLocation","getNextCW","propagateSideLabels","isAreaLabelsConsistent","computeEdgeEndLabels","getBoundaryNodeRule","checkAreaLabelsConsistent","computeLabelling","getDegree","insertEdgeEnd","Yn","_resultAreaEdgeList","_SCANNING_FOR_INCOMING","_LINKING_TO_OUTGOING","getResultAreaEdges","updateLabelling","mergeSymLabels","findCoveredLineEdges","kn","jn","_orientation","compareOriented","Hn","_ocaMap","findEdgeIndex","findEqualEdge","Wn","Kn","_hasIntersection","_hasProper","_hasProperInterior","_hasInterior","_properIntersectionPoint","_isSelfIntersection","numIntersections","numInteriorIntersections","numProperIntersections","numTests","isTrivialIntersection","isAdjacentSegments","getProperIntersectionPoint","hasProperInteriorIntersection","getLineIntersector","hasProperIntersection","hasInteriorIntersection","Jn","dist","getSegmentIndex","Qn","pts","ni","Zn","$n","startIndex","env1","env2","computeIntersectsForChain","getStartIndexes","computeIntersects","ti","NULL_VALUE","ei","getDelta","depthAtLocation","_mce","_isIsolated","_depthDelta","getCollapsedEdge","setIsolated","setName","isCollapsed","getMaximumSegmentIndex","getMonotoneChainEdge","isPointwiseEqual","setDepthDelta","getEdgeIntersectionList","setAtLeastIfValid","_workingPrecisionModel","_workingNoder","_graph","setWorkingPrecisionModel","insertUniqueEdge","depthDelta","buildSubgraphs","createSubgraphs","createEmptyResultGeometry","getNoder","computeNodedEdges","setNoder","convertSegStrings","ri","_noder","_scaleFactor","_offsetX","_offsetY","_isScaled","isIntegerPrecision","rescale","oi","_segStrings","si","fact","checkEndPtVertexIntersections","checkInteriorIntersections","checkValid","checkCollapses","checkCollapse","ai","_pt","_originalPt","_ptScaled","_p0Scaled","_p1Scaled","_corner","_safeEnv","initCorners","ui","SAFE_ENV_EXPANSION_FACTOR","intersectsScaled","intersectsToleranceSquare","copyScaled","getSafeEnvelope","intersectsPixelClosure","addSnappedNode","li","selectedSegment","ci","pi","HotPixelSnapAction","hi","isNodeAdded","_hotPixel","_parentEdge","_hotPixelVertexIndex","_isNodeAdded","fi","_interiorIntersections","getInteriorIntersections","gi","_pm","_pointSnapper","checkCorrectness","snapRound","findInteriorIntersections","computeIntersectionSnaps","computeVertexSnaps","di","_argGeom","_resultGeometry","_saveException","yi","CAP_BUTT","MAX_PRECISION_DIGITS","bufferFixedPrecision","bufferReducedPrecision","precisionScaleFactor","computeGeometry","bufferOriginalPrecision","getResultGeometry","bufferOp","_i","_isNull","setMinimum","setMaximum","mi","computeDistance","vi","_maxPtDist","Ii","MaxPointDistanceFilter","MaxMidpointDistanceFilter","computeMaxMidpointDistance","xi","getMaxPointDistance","computeMaxVertexDistance","Ei","findDistance","getDistancePoints","_minPtDist","Ni","_comps","Ci","_lines","_isForcedToLineString","setForceToLineString","getLines","Si","_boundaryRule","_isIn","_numBoundaries","locateInternal","locateInPolygonRing","updateLocationInfo","computeLocation","Li","_component","_segIndex","INSIDE_AREA","bi","isInsideArea","getGeometryComponent","wi","Oi","_locations","Ti","_terminateDistance","_ptLocator","_minDistanceLocation","_minDistance","computeContainmentDistance","computeMinDistanceLinesPoints","computeMinDistance","computeFacetDistance","computeMinDistanceLines","updateMinDistance","computeMinDistancePoints","nearestLocations","nearestPoints","isWithinDistance","Ri","Pi","Di","_g0","_g1","_ptDist","_densifyFrac","Mi","MaxDensifiedByFractionDistanceFilter","setDensifyFraction","compute","computeOrientedDistance","Ai","Fi","orientedDistance","_euclideanDist","_numSubSegs","Gi","_minValidDistance","_maxValidDistance","_minDistanceFound","_maxDistanceFound","_isValid","_errMsg","_errorLocation","_errorIndicator","_input","_bufDistance","qi","VERBOSE","MAX_DISTANCE_DIFF_FRAC","checkMaximumDistance","checkPositiveValid","checkNegativeValid","getPolygonLines","checkMinimumDistance","getErrorIndicator","getErrorLocation","getErrorMessage","Bi","_errorMsg","Vi","MAX_ENV_DIFF_FRAC","checkPolygonal","checkExpectedEmpty","checkEnvelope","checkArea","checkDistance","report","isValidMsg","Ui","zi","_findAllIntersections","_isCheckEndSegmentsOnly","_interiorIntersection","_intSegments","_intersections","_intersectionCount","_keepIntersections","getInteriorIntersection","setCheckEndSegmentsOnly","getIntersectionSegments","getIntersections","setFindAllIntersections","setKeepIntersections","isEndSegment","createAllIntersectionsFinder","createAnyIntersectionFinder","createIntersectionCounter","Xi","execute","computeIntersections","Yi","_nv","toSegmentStrings","ki","_mapOp","ji","_op","_lineEdgesList","_resultLineList","collectLines","getGraph","collectLineEdge","collectBoundaryTouchEdge","labelIsolatedLine","getArgGeometry","buildLines","Lr","isResultOfOp","isCoveredByA","labelIsolatedLines","INTERSECTION","Hi","_resultPointList","filterCoveredNodeToPoint","isCoveredByLA","extractNonCoveredResultNodes","Wi","_pruneEmptyGeometry","_preserveGeometryCollectionType","_preserveCollections","_preserveType","transformPoint","transformCoordinates","transformPolygon","transformLinearRing","createCoordinateSequence","getInputGeometry","transformMultiLineString","transformLineString","transformMultiPoint","transformMultiPolygon","transformGeometryCollection","Ki","_snapTolerance","_srcPts","_allowSnappingToSourceVertices","_isClosed","snapVertices","findSnapForVertex","snapTo","snapSegments","findSegmentIndexToSnap","setAllowSnappingToSourceVertices","Ji","_srcGeom","Qi","SNAP_PRECISION_FACTOR","extractTargetCoordinates","Zi","snapToSelf","computeSnapTolerance","computeMinimumSegmentLength","computeOverlaySnapTolerance","computeSizeBasedSnapTolerance","_snapPts","_isSelfSnap","snapLine","$i","_isFirst","_commonMantissaBitsCount","_commonBits","_commonSignExp","getCommon","signExpBits","numCommonMostSigMantissaBits","zeroLowerBits","toBinaryString","getBit","tr","_commonCoord","_ccFilter","nr","er","CommonCoordinateFilter","Translater","addCommonBits","ir","removeCommonBits","getCommonCoordinate","_commonBitsX","_commonBitsY","trans","rr","_cbr","selfSnap","prepareResult","overlayOp","union","UNION","symDifference","SYMDIFFERENCE","difference","DIFFERENCE","or","sr","mce","chainIndex","ar","_xValue","_eventType","_insertEvent","_deleteEventIndex","_obj","INSERT","ur","isDelete","setDeleteEventIndex","getObject","getInsertEvent","isInsert","isSameLabel","getDeleteEventIndex","lr","cr","_includeProper","_recordIsolated","_numIntersections","_bdyNodes","_isDone","_isDoneWhenProperInt","setIsDoneIfProperInt","isBoundaryPointInternal","isBoundaryPoint","setBoundaryNodes","nOverlaps","prepareEvents","processOverlaps","addEdge","hr","_min","NEGATIVE_INFINITY","fr","NodeComparator","getMin","getMax","gr","dr","yr","_node1","_node2","buildExtent","_r","_leaves","buildTree","buildLevel","buildRoot","printNode","mr","getItems","vr","xr","Ir","SegmentVisitor","IntervalIndexedGeometry","Er","_counter","addLine","Nr","_parentGeom","_lineEdgeMap","_boundaryNodeRule","_useBoundaryDeterminationRule","_argIndex","_boundaryNodes","_hasTooFewPoints","_invalidPoint","_areaPtLocator","insertBoundaryPoint","determineBoundary","computeSelfNodes","createEdgeSetIntersector","addSelfIntersectionNodes","computeSplitEdges","computeEdgeIntersections","hasTooFewPoints","insertPoint","getInvalidPoint","getBoundaryPoints","addSelfIntersectionNode","Cr","_resultPrecisionModel","_arg","setComputationPrecision","Sr","MapOp","_resultGeom","_resultPolyList","cancelDuplicateResultEdges","createEmptyResult","replaceCollapsedEdges","updateNodeLabelling","computeOverlay","insertUniqueEdges","copyPoints","computeLabelsFromDepths","labelIncompleteNodes","findResultAreaEdges","labelIncompleteNode","resultDimension","br","_g","_boundaryDistanceTolerance","_linework","extractLinework","isWithinToleranceOfBoundary","wr","getLinework","Or","_doLeft","_doRight","extractPoints","computeOffsetPoints","setSidesToGenerate","Tr","_locFinder","_location","_invalidLocation","TOLERANCE","_testCoords","computeBoundaryDistanceTolerance","Rr","reportResult","addTestPts","hasLocation","isValidResult","getInvalidLocation","Pr","_geomFactory","_skipEmpty","_inputGeoms","extractFactory","extractElements","combine","createList","Dr","_inputPolys","Mr","STRTREE_NODE_CAPACITY","reduceToGeometries","unionTree","extractByEnvelope","unionOptimized","unionActual","unionUsingEnvelopeIntersection","binaryUnion","unionSafe","repeatedUnion","restrictToPolygons","bufferUnion","Ar","GeoJSONReader","GeoJSONWriter","OverlayOp","UnionOp","BufferOp","attributions_","adaptAttributions","attributionsCollapsible_","state_","wrapX_","getWrapX","setAttributions","setState","attributionLike","v8","$version","$root","version","required","example","metadata","bearing","period","pitch","light","intensity","terrain","fog","sprite","glyphs","delay","paint","source_vector","vector","tiles","bounds","scheme","xyz","tms","minzoom","maxzoom","promoteId","volatile","android","ios","source_raster","raster","source_raster_dem","encoding","terrarium","mapbox","source_geojson","maximum","minimum","cluster","clusterRadius","clusterMaxZoom","clusterMinPoints","clusterProperties","lineMetrics","generateId","source_video","video","source_image","js","macos","line","symbol","heatmap","hillshade","sky","layout_background","none","layout_sky","layout_fill","expression","interpolated","parameters","layout_circle","layout_heatmap","layout_line","butt","square","bevel","miter","requires","layout_symbol","auto","both","tokens","bottom","horizontal","vertical","uppercase","lowercase","layout_raster","layout_hillshade","filter_operator","any","has","within","geometry_type","stops","identity","exponential","categorical","colorSpace","lab","hcl","function_stop","expression_name","literal","coalesce","step","ln2","string","boolean","collator","rgba","accumulated","asin","acos","upcase","downcase","exaggeration","paint_fill","paint_line","paint_circle","paint_heatmap","paint_symbol","overridable","paint_raster","nearest","paint_hillshade","paint_background","paint_sky","gradient","atmosphere","constant","commonjsGlobal","globalThis","createCommonjsModule","commonjsRequire","punycode","root","freeExports","nodeType","freeModule","freeGlobal","maxInt","regexPunycode","regexNonASCII","regexSeparators","errors","stringFromCharCode","RangeError","mapDomain","ucs2decode","extra","counter","ucs2encode","digitToBasic","digit","flag","adapt","numPoints","firstTime","baseMinusTMin","basic","oldi","baseMinusT","codePoint","inputLength","bias","encode","handledCPCount","basicLength","currentValue","handledCPCountPlusOne","qMinusT","util","arg","prop","qs","sep","eq","regexp","maxKeys","kstr","vstr","decodeURIComponent","stringifyPrimitive","ks","querystring","Url","slashes","auth","host","port","hostname","pathname","href","protocolPattern","portPattern","simplePathPattern","unwise","autoEscape","nonHostChars","hostEndingChars","hostnamePartPattern","hostnamePartStart","unsafeProtocol","hostlessProtocol","slashedProtocol","urlParse","parseQueryString","slashesDenoteHost","queryIndex","splitter","uSplit","rest","simplePath","proto","lowerProto","atSign","hostEnd","hec","parseHost","ipv6Hostname","hostparts","part","newpart","validParts","notHost","bit","unshift","toASCII","esc","escape","qm","relative","resolveObject","rel","tkeys","tk","tkey","rkeys","rk","rkey","relPath","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","authInHost","hasTrailingSlash","up","isAbsolute","inputs","ParsingError","super","Scope","bindings","NullType","kind","NumberType","StringType","BooleanType","ColorType","ObjectType","ValueType","CollatorType","FormattedType","ResolvedImageType","itemType","valueMemberTypes","checkSubtype","expected","memberType","isValidType","provided","allowedTypes","isValidNativeType","csscolorparser","kCSSColorTable","clamp_css_byte","clamp_css_float","parse_css_int","parse_css_float","css_hue_to_rgb","m1","m2","parseCSSColor","css_str","iv","op","ep","fname","params","black","transparent","Collator","caseSensitive","diacriticSensitive","locale","sensitivity","Intl","usage","lhs","rhs","resolvedOptions","FormattedSection","fontStack","textColor","Formatted","sections","unformatted","section","serialized","ResolvedImage","validateRGBA","isValue","mixed","typeOf","toString$1","Literal","args","expectedType","serialize","RuntimeError","types","Assertion","parsed","evaluate","outputDefined","FormatExpression","firstArg","nextTokenMayBeObject","lastExpression","evaluatedContent","ImageExpression","evaluatedImageName","availableImages","types$1","Coercion","Boolean","parseColor","eachChild","child","geometryTypes","EvaluationContext","globals","featureState","formattedSection","_parseColorCache","canonical","cached","CompoundExpression","_evaluate","definition","definitions","availableOverloads","overloads","signature","signatureContext","ParsingContext","registry","parsedArgs","argParseFailed","signatures","stringifySignature","actualTypes","CollatorExpression","updateBBox","boxWithinBox","bbox1","bbox2","getTileCoordinates","lat","tilesAtZoom","onBoundary","pointWithinPolygon","inside","ring","len2","pointWithinPolygons","twoSided","q1","q2","det1","det2","lineIntersectLine","vectorP","vectorQ","lineIntersectPolygon","lineStringWithinPolygon","lineStringWithinPolygons","getTilePolygon","getTilePolygons","updatePoint","polyBBox","worldSize","halfWorldSize","getTilePoints","pointBBox","shifts","tilePoints","getTileLines","lineBBox","tileLines","tileLine","Within","canonicalID","geometryType","polygonGeometry","tilePolygon","tilePolygons","pointsWithinPolygons","linesWithinPolygons","isFeatureConstant","isStateConstant","isGlobalPropertyConstant","Var","boundExpression","expr","_parse","annotate","typeAnnotation","Expr","actual","isConstant","isTypeAnnotation","childrenConstant","ec","findStopLessThanOrEqualTo","lastIndex","nextValue","lowerIndex","upperIndex","currentIndex","Step","labels","outputs","outputType","labelKey","valueKey","stopCount","unitbezier","UnitBezier","p1x","p1y","p2x","p2y","cx","bx","ax","cy","by","ay","sampleCurveX","sampleCurveY","sampleCurveDerivativeX","solveCurveX","epsilon","t0","t1","t2","solve","freeze","from","to","deg2rad","rad2deg","xyz2lab","lab2xyz","xyz2rgb","rgb2xyz","rgbToLab","rgbColor","labToRgb","labColor","interpolateHue","hclColor","colorSpaces","Interpolate","operator","interpolation","lower","upper","exponentialInterpolation","controlPoints","interpolationFactor","outputLower","outputUpper","lowerValue","upperValue","progress","Coalesce","needsAnnotation","requestedImageName","argCount","Let","binding","IndexOf","fromIndex","Match","inputType","cases","otherwise","labelContext","MAX_SAFE_INTEGER","sortedLabels","groupedByOutput","outputLookup","outputIndex","coerceLabel","Case","branches","Slice","beginIndex","endIndex","isComparableType","eqCollate","makeComparison","compareBasic","compareWithCollator","isOrderComparison","Comparison","hasUntypedArgument","Equals","NotEquals","LessThan","GreaterThan","LessThanOrEqual","GreaterThanOrEqual","NumberFormat","currency","minFractionDigits","maxFractionDigits","minimumFractionDigits","maximumFractionDigits","Length","expressions","varargs","supportsPropertyExpression","spec","supportsZoomExpression","supportsInterpolation","isFunction$1","identityFunction","createFunction","propertySpec","isColor","zoomAndFeatureDependent","featureDependent","zoomDependent","stop","default","innerFun","hashedStops","categoricalKeyType","evaluateExponentialFunction","evaluateIntervalFunction","evaluateCategoricalFunction","evaluateIdentityFunction","featureFunctions","zoomStops","featureFunctionStops","interpolationType","keyType","interp","colorspace","evaluatedLower","evaluatedUpper","register","heatmapDensity","lineProgress","skyRadialProgress","LN10","isSupportedScript","resolvedLocale","StyleExpression","_warningHistory","_evaluator","_defaultValue","_enumValues","isExpression","createExpression","enum","formatted","resolvedImage","getExpectedType","ZoomConstantExpression","_styleExpression","isStateDependent","evaluateWithoutErrorHandling","ZoomDependentExpression","createPropertyExpression","isFeatureConstant$1","isZoomConstant","zoomCurve","findZoomCurve","childResult","StylePropertyFunction","specification","_parameters","_specification","convertLiteral","convertFunction","convertIdentityFunction","convertTokenString","featureFunctionParameters","getFunctionType","getInterpolateOperator","convertPropertyFunction","appendStopPair","fixupDegenerateStepCurve","convertZoomAndPropertyFunction","isStep","convertZoomFunction","getFallback","defaultValue","curve","pos","isExpressionFilter","filterSpec","createFilter","needGeometry","convertFilter","compiled","err","globalProperties","geometryNeeded","filters","convertComparisonOp","convertNegation","convertInOp","convertHasOp","refProperties","deref","derefLayers","ref","ValidationError","identifier","__line__","ParsingError$1","validateConstants","constants","unbundle","deepUnbundle","unbundledValue","validateObject","elementSpecs","valueSpec","elementValidators","objectElementValidators","styleSpec","objectKey","elementSpecKey","elementSpec","validateElement","validate","validateArray","arraySpec","validateArrayElement","arrayElementValidator","arrayElementSpec","function","arrayIndex","validateNumber","specMin","specMax","validateFunction","functionValueSpec","functionType","stopKeyType","previousStopDomainValue","previousStopDomainZoom","stopDomainValues","isZoomFunction","isPropertyFunction","isZoomAndPropertyFunction","validateFunctionStop","validateStopDomainValue","reportValue","validateExpression","expressionContext","expressionObj","propertyKey","propertyType","validateEnum","validateFilter","validateNonExpressionFilter","validateProperty","layerSpec","layerType","transitionMatch","tokenMatch","validatePaintProperty","validateLayoutProperty","validateLayer","layerId","otherLayer","sourceType","validateString","validateSource","mapExpr","reduceExpr","validateLight","lightSpec","rootType","validateTerrain","terrainSpec","validateFog","fogSpec","VALIDATORS","validateGlyphsURL","validateStyleMin","sortErrors","wrapCleanErrors","inner","paintProperty","layoutProperty","jsonlint","$V0","$V1","$V2","$V3","$V4","$V5","$V6","$V7","$V8","$V9","trace","yy","symbols_","terminals_","2","4","6","8","10","11","14","17","18","21","22","23","24","productions_","performAction","yytext","yyleng","yylineno","yystate","$$","_$","$0","first_line","table","3","5","7","9","12","13","15","16","1","19","20","25","defaultActions","parseError","recoverable","vstack","lstack","TERROR","EOF","lexer","sharedState","setInput","yylloc","yyloc","ranges","lex","token","action","newState","yyval","errStr","showPosition","loc","last_line","first_column","last_column","_more","_backtrack","matched","conditionStack","ch","unput","oldLines","more","backtrack_lexer","less","pastInput","past","upcomingInput","pre","test_match","indexed_rule","backup","matches","tempMatch","rules","_currentRules","flex","popState","topState","pushState","stateStackSize","yy_","$avoiding_name_collisions","YY_START","Parser","readStyle","Buffer","validateStyle","Set","expression$1","normalizePropertyExpression","isFunction","latest","BaseTile","BaseTileLayer","useInterimTilesOnError","setPreload","setUseInterimTilesOnError","getPreload","TileProperty","PRELOAD","getUseInterimTilesOnError","USE_INTERIM_TILES_ON_ERROR","TileLayer","Disposable","disposed","dispose","CanvasBuilder","maxLineWidth","beginGeometryInstruction1_","beginGeometryInstruction2_","bufferedMaxExtent_","instructions","tmpCoordinate_","hitDetectionInstructions","applyPixelRatio","dashArray","dash","appendFlatPointCoordinates","getBufferedMaxExtent","tmpCoord","myEnd","appendFlatLineCoordinates","closed","skipFirst","lastRel","nextRel","lastXCoord","lastYCoord","nextCoord","skipped","drawCustomCoordinates_","builderEnds","builderEnd","beginGeometry","builderEndss","builderBegin","myEnds","endGeometry","finish","reverseHitDetectionInstructions","instruction","fillStyleColor","strokeStyleColor","strokeStyleLineCap","strokeStyleLineDash","strokeStyleLineDashOffset","strokeStyleLineJoin","strokeStyleWidth","strokeStyleMiterLimit","createFill","applyStroke","createStroke","updateFillStyle","currentFillStyle","updateStrokeStyle","currentStrokeStyle","currentLineCap","currentLineDash","currentLineDashOffset","currentLineJoin","currentLineWidth","currentMiterLimit","endGeometryInstruction","transition_","transitionStarts_","release","getInterimTile","getTileCoord","getAlpha","time","inTransition","endTransition","LinearRing","coordEach","excludeWrapCoord","stopG","coords","geometryMaybeCollection","wrapShrink","coordIndex","isFeatureCollection","isFeature","featureIndex","geomIndex","multiFeatureIndex","geometryIndex","geomType","geomEach","featureProperties","featureBBox","geomReduce","initialValue","previousValue","currentGeometry","flattenEach","brokenDiagonalRendering_","drawTestTriangle","u1","u2","closePath","clip","verifyBrokenDiagonalRendering","calculateSourceResolution","targetCenter","sourceCenter","targetMetersPerUnit","sourceMetersPerUnit","compensationFactor","calculateSourceExtentResolution","triangulation","pixelRound","globalCompositeOperation","sourceDataExtent","canvasWidthInUnits","canvasHeightInUnits","stitchContext","stitchScale","xPos","yPos","srcWidth","srcHeight","targetTopLeft","triangle","u0","v0","sourceNumericalShiftX","sourceNumericalShiftY","augmentedMatrix","affineCoefs","isBrokenDiagonalRendering","ud","vd","MOVESTART","MOVEEND","disable","createSnapToN","theta","opt_isMoving","createSnapToZero","opt_tolerance","TileRange","containsTileRange","TileSource","opaque_","tilePixelRatio_","tmpSize","key_","forEachLoadedTile","covered","setKey","getTileGrid","getTilePixelSize","isGlobal","updateCacheSize","tileCount","useTile","TileSourceEvent","displacement","anchor_","normalizedAnchor_","anchorOrigin_","anchorOrigin","anchorXUnits_","anchorYUnits_","crossOrigin_","iconImage_","offset_","offsetOrigin_","offsetOrigin","getSrc","getDisplacement","setAnchor","getPixelRatio","getHitDetectionImage","iconImageSize","createExtent","onlyCenter","smooth","opt_centerShift","viewWidth","viewHeight","shiftX","shiftY","getViewportClampedResolution","viewportSize","xResolution","yResolution","getSmoothClampedResolution","createMinMaxResolution","opt_smooth","opt_maxExtent","opt_showFullExtent","cappedMaxRes","hints_","animations_","updateAnimationKey_","projection_","viewportSize_","targetCenter_","targetResolution_","targetRotation_","cancelAnchor_","applyOptions_","resolutionConstraintInfo","resolutionConstraint","multiWorld","smoothResolutionConstraint","projExtent","constrainOnlyCenter","capped","createSnapToResolutions","defaultMaxResolution","defaultMinResolution","defaultMaxZoom","power","opt_minResolution","minZoomLevel","cappedZoomLevel","zoomLevel","createSnapToPower","constraint","createResolutionConstraint","maxResolution_","minResolution_","minZoom_","centerConstraint","smoothExtentConstraint","createCenterConstraint","rotationConstraint","enableRotation","constrainRotation","createRotationConstraint","constraints_","options_","oldPadding","newPadding","getUpdatedOptions_","newOptions","resolveConstraints","animationCount","animationCallback","Date","now","series","animation","complete","sourceRotation","targetRotation","isNoopAnimation","setHint","ViewHint","updateAnimations_","getInteracting","cancelAnimationFrame","seriesComplete","elapsed","getViewportSize_","constrainedResolution","calculateCenterZoom","applyTargetState_","constrainedRotation","calculateCenterRotate","requestAnimationFrame","currentResolution","opt_rotation","setViewportSize","getConstraints","getConstrainResolution","getHints","opt_hints","calculateExtent","getViewportSizeMinusPadding_","getMaxResolution","getMinResolution","setMaxZoom","setMinZoom","setConstrainResolution","enabled","getResolutionForExtent","getResolutionForExtentInternal","opt_power","getConstrainedResolution","logPower","reducedSize","calculateCenterOn","baseLevel","fit","geometryOrExtent","GeometryType","rotatedExtentForGeometry","minRotX","minRotY","maxRotX","maxRotY","rotX","rotY","rotatedExtent","centerRot","centerX","centerY","centerOn","centerOnInternal","calculateCenterShift","centerShift","shiftedCenter","adjustCenter","deltaCoordinates","setCenter","adjustCenterInternal","adjustResolution","adjustResolutionInternal","isMoving","adjustZoom","adjustRotation","adjustRotationInternal","newRotation","hint","opt_doNotCancelAnims","opt_forceMoving","newCenter","opt_resolutionDirection","endInteractionInternal","opt_targetResolution","targetZoom","targetRes","returnValue","interpolatePoint","cumulativeLengths","lineStringCoordinateAtM","lo","m0","lineStringsCoordinateAtM","code_","units_","worldExtent_","axisOrientation_","global_","canWrapX_","getPointResolutionFunc_","defaultTileGrid_","metersPerUnit_","getWorldExtent","getAxisOrientation","setGlobal","setExtent","setGetPointResolution","RegularShape","hitDetectionCanvas_","points_","radius_","radius1","radius2_","radius2","angle_","renderOptions_","getRadius2","getAngle","setOpacity","createHitDetectionCanvas_","renderOptions","draw_","calculateLineJoinSize_","strokeWidth","r1","r2","miterRatio","bevelAdd","aa","dd","innerMiterRatio","innerLength","createRenderOptions","maxRadius","createPath_","drawHitDetectionCanvas_","arc","angle0","radiusC","intersectsLineString","coordinatesExtent","point1","point2","intersectsLineStringArray","intersectsLinearRingArray","intersectsLinearRing","intersectsLinearRingMultiArray","BaseVectorLayer","renderBuffer","declutter_","declutter","renderBuffer_","updateWhileAnimating_","updateWhileInteracting_","getDeclutter","getRenderBuffer","getRenderOrder","getUpdateWhileAnimating","getUpdateWhileInteracting","renderDeclutter","declutterTree","setRenderOrder","renderOrder","__spreadArray","il","Versions","VERSION1","VERSION2","VERSION3","IIIF_PROFILE_VALUES","supports","formats","qualities","COMPLIANCE_VERSION1","COMPLIANCE_VERSION2","COMPLIANCE_VERSION3","versionFunctions","iiifInfo","levelProfile","getComplianceLevelSupportedFeatures","scale_factors","tile_width","tile_height","additionalProfile","profile","profileSupports","profileFormats","profileQualities","scaleFactors","extraFormats","preferredFormat","preferredFormats","acc","extraFeatures","extraQualities","IIIFInfo","setImageInfo","getImageApiVersion","getComplianceLevelEntryFromProfile","getComplianceLevelFromProfile","complianceLevel","level","getTileSourceOptions","opt_preferredOptions","imageOptions","quality","lib","MagicWand","floodFill","px","py","colorThreshold","mask","includeBorders","newY","xl","dyl","dyr","checkY","bytes","Uint8Array","visited","sampleColor","dir","floodFillWithBorders","floodFillWithoutBorders","gaussBlur","k1","wg","Float32Array","total","dsq","ww","gaussBlurOnlyBorder","k2","visitedData","temp","createBorderForBlur","createBorderMask","rw","rh","getBorderIndices","traceContours","second","current","previous","prepareMask","contours","w2","directions","simplifyContours","simplifyTolerant","simplifyCount","resPoints","lst","ids","maxd","maxi","r12","pf","pl","lenContours","initialCount","delta_","MapBrowserEventType","browserEvent","condition_","lastAngle_","Pointer","RenderBox","element_","startPixel_","endPixel_","render_","startPixel","endPixel","getOverlayContainer","setPixels","createOrUpdateGeometry","DragBoxEventType","DragBoxEvent","DragBox","box_","minArea_","minArea","onBoxEnd","boxEndCondition_","boxEndCondition","defaultBoxEndCondition","completeBox","out_","defaultCondition_","pixelDelta_","keyEvent","keyCode","KeyCode","mapUnitsDelta","pointerOptions","rotating_","rotationDelta_","threshold_","threshold","rotationDelta","touch0","touch1","viewportPosition","getBoundingClientRect","lastDistance_","lastScaleDelta_","scaleDelta","DragAndDropEventType","DragAndDropEvent","file","DragAndDrop","readAsBuffer_","formats_","formatConstructors","FormatType","dropListenKeys_","handleResult_","TextDecoder","tryReadFeatures_","registerListeners_","dropArea","handleDrop","handleStop","unregisterListeners_","files","reader","FileReader","readAsArrayBuffer","readAsText","dropEffect","DragRotateAndZoom","lastMagnitude_","angleDelta","ExtentEventType","ExtentEvent","getDefaultPointerStyleFunction","getPointHandler","fixedPoint","getEdgeHandler","fixedP1","fixedP2","Extent","pointerHandler_","pixelTolerance_","pixelTolerance","snappedToVertex_","extentFeature_","vertexFeature_","extentOverlay_","boxStyle","vertexOverlay_","pointerStyle","snapToVertex_","pixelCoordinate","getExtentInternal","segments","getSegments","closestSegment","vertex","vertexPixel","pixel1","pixel2","squaredDist1","squaredDist2","handlePointerMove_","createOrUpdatePointerFeature_","createOrUpdateExtentFeature_","extentFeature","vertexFeature","getOpposingPoint","x_","y_","altShiftDragRotate","doubleClickZoom","zoomDelta","zoomDuration","dragPan","pinchRotate","pinchZoom","keyboard","mouseWheelZoom","MouseWheelZoom","shiftDragZoom","CircleStyle","setRadius","insertFirst","autoPan","autoPanAnimation","margin","autoPanMargin","rendered","mapPostrenderListenerKey","handleElementChanged","handleMapChanged","handleOffsetChanged","handlePositionChanged","handlePositioningChanged","setElement","setOffset","setPositioning","getOffset","getPosition","getPositioning","updatePixelPosition","performAutoPan","panIntoView","opt_panIntoViewOptions","mapRect","getRect","overlayRect","panIntoViewOptions","myMargin","offsetLeft","offsetRight","offsetTop","offsetBottom","centerPx","newCenterPx","panOptions","pageXOffset","pageYOffset","setVisible","getPixelFromCoordinate","updateRenderedPosition","posX","posY","msTransform","getOptions","createMeasureTooltip","measureTooltip","parentElement","removeOverlay","sketch","startMeasuring","measureDraw","Draw","geometryFunction","freehandCondition","tooltip","tooltipCoord","formatArea","formatLength","stopMeasuring","pngDataTable","calcCrc","buf","crcTable","Int32Array","createPngDataTable","PNG","JPEG","_P","_H","_Y","_S","changeDpiBlob","blob","headerChunk","fileReader","dataArray","tail","changedArray","changeDpiOnArray","Blob","overwritepHYs","physChunk","crc","crcChunk","startingIndex","searchStartOfPhys","chunkLength","finalHeader","Viewport","pixelCoords","calculateArea","MicrometresPerPixelY","tmpGeom","calculateLength","alwaysDisplayInMicrons","supscript","strokeColor","txt","getAnnotationFormattedLabel","olText","metaData","Notes","showMeasurements","Dimensions","FormattedLength","FormattedArea","show","hiddenAnnotations","forceLoadedAnnotationsByFingerprint","reloadAnnotations","hiddenAnnotationsByFingerprint","getChannelClippingString","redraw","Clipping","clipping","newH","newV","hasHorizontalChange","hasVerticalChange","oldExtent","oldPos","extentObj","overviewVisible","overviewCollapsed","removeControl","getLayers","getTileUrlFunction","getTileLoadFunction","tileloadstart","tileloadend","tileloaderror","removeLayer","groupLayers","mapResolution","skipAnimation","unrotate","mainView","rotateExtent","getFlip","getViewportCoordinates","download","objectiveResolution","drawScaleBar","Min","Max","leveli","poly","extraParams","that","ev","mapCanvas","mapContext","mainCanvases","querySelectorAll","mainCanvas","canvasList","firstCanvas","bgColor","matrix","CanvasRenderingContext2D","resetTransform","scalebar","scalebarLocation","scalebarFont","canvasDraw","msSaveBlob","msToBlob","blb","tab","readAsDataURL","bl","toBlob","saveAs","ex","renderSync","eventArgs","annotationId","sz","worldExt","transformer","transformers","getControls","cntrl","overviewMap","WKT","Geometry","AnnotationID","frmtArea","frmtLength","updateDate","AuditLastModifiedOn","updateMatches","createDate","AuditCreatedOn","createMatches","fillColor","FillColor","Classification","CreatedOn","CreatedBy","AuditCreatedBy","UpdateInfo","UpdatedOn","UpdatedBy","AuditLastModifiedBy","Area","State","LineThickness","PointCount","imageBaseUrl","imageScale","currentAnnotationStyle","getAnnotationTextStyle","getAnnotationStyle","sizeX","sizeY","xSteps","ySteps","getLayersVisibility","setLayersVisibility","MouseWheelMode","setMode","VectorTile","features_","tileLoadFunction_","onLoad","setFeatures","onError","canvasPool","VectorRenderTile","getSourceTiles","context_","executorGroups","declutterExecutorGroups","loadingSourceTiles","hitDetectionImageData","replayState_","sourceTiles","errorTileKeys","wantedResolution","hasContext","getReplayState","dirty","renderedRenderOrder","renderedResolution","renderedRevision","renderedTileResolution","renderedTileRevision","renderedTileZ","defaultLoadFunction","sourceTileCache","tileGrids_","getCount","peekFirstKey","sourceTile","tileFeatures","candidate","usedSourceTiles","cacheKey","sourceTileGrid_1","sourceZ","sourceTileCoord","sourceTileState","listenChange_1","sourceTileKey","coordKey","tileExtent","opt_maxEntries","rbush_","items_","items","forEach_","toJSON","rbush","getInteriorPointOfArray","flatCentersOffset","intersections","pointX","maxSegmentLength","segmentLength","getInteriorPointsOfMultiArray","interiorPoints","jsonp","opt_errback","opt_callbackParam","script","cleanup","async","timer","clearTimeout","getElementsByTagName","polygonArea","ringArea","middleIndex","coordsLength","rad","removeEmptyPolygon","feature$$1","polygon1","polygon2","geom1","geom2","differenced","ImageStyle","opacity_","displacement_","tmpTransform","extentRevision_","simplifyTransformedInternal","revision","getClosestPoint","opt_closestPoint","inCoordinates","outCoordinates","pixelExtent","projectedExtent","MVT","featureClass_","featureClass","geometryName","layerName_","layers_","idProperty_","idProperty","readRawGeometry_","pbf","readVarint","cmd","coordsLen","currentEnd","cmdLen","readSVarint","createFeature_","rawFeature","numEnds","prevEndIndex","ctor","pbfLayers","readFields","layersPBFReader","name_1","pbfLayer","readRawFeature","setLayers","tag","layerPBFReader","readString","readFloat","readDouble","readVarint64","readBoolean","featurePBFReader","GeoJSON","extractGeometryName_","extractGeometryName","readFeatureFromObject","geoJSONFeature","readFeaturesFromObject","geoJSONFeatures","readGeometryFromObject","readProjectionFromObject","crs","writeFeatureObject","writeFeaturesObject","objects","writeGeometryObject","readPointGeometry","readLineStringGeometry","readPolygonGeometry","readMultiPointGeometry","readMultiLineStringGeometry","readMultiPolygonGeometry","readGeometryCollectionGeometry","geoJSON","writePointGeometry","writeLineStringGeometry","rightHanded","writePolygonGeometry","writeMultiPointGeometry","writeMultiLineStringGeometry","writeMultiPolygonGeometry","writeGeometryCollectionGeometry","generateTileUrlFunction_","setUrls","tileLoadingKeys_","getUrls","tileState","TileEventType","setTileLoadFunction","setTileUrlFunction","pruneExceptNewestZ","json","getVersion","_maxEntries","_minEntries","leaf","_all","toBBox","collides","_build","_splitRoot","_insert","_condense","compareMinX","compareMinY","fromJSON","_chooseSubtree","_split","_adjustParentBBoxes","_chooseSplitAxis","_chooseSplitIndex","_allDistMargin","ImageBase","CanvasLayerRenderer","tempTransform","pixelTransform","inversePixelTransform","containerReused","useContainer","layerClassName","getLayer","getClassName","HTMLCanvasElement","transformOrigin","clipUnrotated","topLeft","topRight","bottomRight","bottomLeft","coordinateToPixelTransform","inverted","dispatchRenderEvent_","preRender","postRender","getRenderTransform","getDataAtPixel","hitTolerance","renderPixel","layerExtent","renderCoordinate","pixelToCoordinateTransform","newCanvas","newContext","clearRect","RenderEvent","opt_inversePixelTransform","opt_context","twiceArea","linearRingss","JSONFeature","ImageCanvas","opt_loader","error_","getError","handleLoad_","TextFeature","readFeatureFromText","readFeaturesFromText","readGeometryFromText","readProjectionFromText","writeFeatureText","writeFeaturesText","writeGeometryText","writer","cloneFeature","cloned","cloneProperties","cloneGeometry","deepSlice","cloneFeatureCollection","getSqSegDist","simplifyDouglasPeucker","sqTolerance","simplifyDPStep","maxSqDist","sqDist","simplify$2","highestQuality","prevPoint","newPoints","simplifyRadialDist","simplifyLine","simplifyPolygon","simpleRing","checkValidity","mutate","simplifyGeom","updateBox","trackingFlag","documentElement","buttonClk","ovmapDiv","enlargeButton","enlargeButtonClick","shrinkButton","shrinkButtonClick","trackingButton","trackingButtonClick","featureSelect","eventKeys","masterMap","olExtent","getBoxSize","resolutionFactor","mainMapSize","createOverviewView","vectorLayer","currentOverlayFeature","fogLayer","mainLayers","viewboxFeatures","diagonal","simplifyOptions","formatOptions","currentOverlayFeatureJson","featureStyle","polling","pollingRate","lastZoomValue","hit","forEachFeatureAtPixel","cursor","setTrackingEnabled","masterView","overviewView","masterMapSize","halfWidth","halfHeight","viewportExtent","masterMapExtent","projCenter","halfDiagonal","overviewExtent","finalExtent","zoomIndex","currentViewboxFeature","currentViewboxFeatureJson","previousViewboxFeatureJson","currentToPreviousFeatureUnionJson","overlayViewboxDiffJson","viewboxFeaturesDiff","previousLayerViewboxFeatureJson","previousSimplifiedJson","currentLayerViewboxFeatureJson","currentSimplifiedJson","currentToPreviousFeatureDiffJson","overlayMaskJson","simplifiedOverlayMaskJson","overlayViewboxDiff","currentFeatures","featureJson","clientWidth","clientHeight","sizePx","changeOverviewSize","blur","hideFocus","outline","LRUCache","opt_highWaterMark","count_","entries_","oldest_","newest_","entry","value_","newer","older","peekLast","peekLastKey","IconImageCache","cache_","cacheSize_","maxCacheSize_","expire","iconImage","maxCacheSize","shared","MapEvent","CanvasImageBuilder","hitDetectionImage_","imagePixelRatio_","anchorX_","anchorY_","height_","originX_","originY_","declutterImageWithText_","pointGeometry","myBegin","multiPointGeometry","opt_sharedData","hitDetectionImage","CanvasLineStringBuilder","drawFlatCoordinates_","moveToLineToInstruction","lineStringGeometry","multiLineStringGeometry","lastStroke","CanvasPolygonBuilder","drawFlatCoordinatess_","circleGeometry","setFillStrokeStyles_","circleInstruction","multiPolygonGeometry","BATCH_CONSTRUCTORS","PolygonBuilder","Builder","ImageBuilder","LineStringBuilder","TextBuilder","BuilderGroup","tolerance_","maxExtent_","resolution_","buildersByZIndex_","builderInstructions","zKey","builders","builderKey","builderInstruction","builderType","zIndexKey","replays","replay","drawTextOnPath","startM","segmentM","advance","beginX","beginY","startOffset","startLength","endM","flat","previousAngle","singleSegment","previousAngle_1","iStart","charLength","tmpExtent","p3","p4","getDeclutterBox","replayImageOrLabelArgs","declutterBox","rtlRegEx","horizontalTextAlign","align","Executor","alignFill_","coordinateCache_","renderedTransform_","pixelCoordinates_","viewRotation_","fillStates","strokeStates","textStates","widths_","labels_","createLabel","textKey","fillKey","strokeKey","strokeState","fillState","textState","renderWidth","OffscreenCanvasRenderingContext2D","leftRight","replayTextBackground_","setStrokeStyle_","calculateImageOrLabelDimensions_","sheetWidth","sheetHeight","snapToPixel","fillStroke","boxW","boxH","boxX","boxY","drawImageX","drawImageY","drawImageW","drawImageH","canvasTransform","replayImageOrLabel_","contextScale","imageOrLabel","strokePadding","origin_1","repeatSize","drawLabelWithPointPlacement_","baseline","execute_","opt_featureCallback","opt_hitExtent","opt_declutterTree","pixelCoordinates","prevX","prevY","roundX","roundY","pendingFill","pendingStroke","lastFillInstruction","lastStrokeInstruction","coordinateCache","viewRotation","viewRotationFromTransform","batchSize","labelWithAnchor","textOffsetX","textOffsetY","geometryWidths","widthIndex","imageArgs","imageDeclutterBox","measurePixelRatio","pixelRatioScale","textScale","cachedWidths","pathLength","textLength","drawChars","cc","i_1","ii_1","executeHitDetection","ORDER","BuilderType","ExecutorGroup","allInstructions","opt_renderBuffer","executorsByZIndex_","hitDetectionContext_","hitDetectionTransform_","createExecutors_","flatClipCoords","getClipCoords","executors","instructionByZindex","hasExecutors","candidates","forEachFeatureAtCoordinate","declutteredFeatures","contextSize","hitExtent","indexes","circlePixelIndexArrayCache","maxDistanceSq","distances","distanceSq","pixelIndex","getPixelIndexArray","featureCallback","result_1","executor","zs","opt_builderTypes","builderTypes","matchingChunk","m12","m23","x12","y12","x23","y23","chunkStart","chunkEnd","chunkM","TEXT_ALIGN","CanvasTextBuilder","textOffsetX_","textOffsetY_","textRotateWithView_","textRotation_","textFillState_","textStrokeState_","textState_","textKey_","fillKey_","strokeKey_","TextPlacement","LINE","beg_1","keep","saveTextStates_","pixelRatio_1","flatOffset","flatEnd","oo","drawChars_","textFillStyle","textStrokeStyle","textRotateWithView","textRotation","TileJSON","tileJSON_","handleTileJSONResponse","handleTileJSONError","client","onXHRLoad_","onXHRError_","tileJSON","getTileJSON","epsg4326Projection","gridExtent","attributionExtent_1","opt_radius","setCenterAndRadius","getRadiusSquared_","circleExtent","Mode","totalDelta_","lastDelta_","timeout_","useAnchor_","useAnchor","constrainResolution_","lastAnchor_","startTime_","timeoutId_","mode_","trackpadEventGap_","trackpadTimeoutId_","deltaPerZoom_","endInteraction_","wheelEvent","deltaMode","WheelEvent","DOM_DELTA_PIXEL","DOM_DELTA_LINE","timeLeft","handleWheelZoom_","setMouseAnchor","collapseButton","degree","rotationText","maxLength","rotationSlider","resetButton","flipHorizontalButton","flipVerticalButton","localChange","collapseControl","firstChild","setFlip","da","MouseWheelZoomMode","normal","objectives","fancytree","attr","FT","TEST_IMG","REX_HTML","REX_TOOLTIP","ENTITY_MAP","IGNORE_KEYCODES","SPECIAL_KEYCODES","27","32","33","34","35","36","37","38","39","40","45","46","59","61","96","97","98","99","100","101","102","103","104","105","106","107","109","110","111","112","113","114","115","116","117","118","119","120","121","122","123","144","145","173","186","187","188","189","190","191","192","219","220","221","222","MODIFIERS","91","93","MOUSE_BUTTONS","0","CLASS_ATTRS","CLASS_ATTR_MAP","TREE_ATTRS","NODE_ATTRS","NODE_ATTR_MAP","NODE_ATTR_LOWERCASE_MAP","NONE_NODE_DATA_MAP","_assert","getTime","FancytreeNode","_findDirectChild","ptr","cl","_setChildren","tree","_callHook","addChildren","firstNode","origFirstChild","getFirstChild","origLastChild","getLastChild","nodeList","isPlainObject","inArray","renderStatus","ul","selectMode","fixSelection3FromEndNodes","triggerModifyChild","toggleClass","getParent","getNextSibling","addPagingNode","strings","moreData","statusNodeType","icon","partload","appendSibling","applyCommand","opts","applyPatch","patch","_getResolvedPromise","IGNORE_MAP","expanded","isVisible","renderTitle","setExpanded","collapseSiblings","copyTo","toDict","countChildren","deep","debug","msg","debugLevel","consoleApply","discard","resetLazy","discardMarkup","includeSelf","findAll","_makeNodeTitleMatcher","visit","findFirst","findRelatedNode","where","includeHidden","_changeSelectStatusAttrs","unselectable","evalOption","unselectableStatus","selected","partsel","fixSelection3AfterClick","callOpts","isSelected","radiogroup","_walk","allSelected","someSelected","unselState","lazy","visitParents","fromDict","dict","getChildren","hasChildren","getIndexHier","separator","digits","each","getParentList","getKeyPath","excludeSelf","keyPathSeparator","getPath","dtn","ac","includeRoot","isFunc","getPrevSibling","getSelectedNodes","stopOnParents","isStatusNode","extraClasses","hasFocus","focusNode","info","isActive","activeNode","isBelowOf","otherNode","isChildOf","isDescendantOf","isExpanded","isFirstSibling","isFolder","folder","isLastSibling","isLazy","isLoaded","isLoading","_isLoading","isRoot","isRootNode","isPartsel","isPartload","rootNode","isPagingNode","isTopLevel","isUndefined","hasFilter","enableFilter","parents","subMatchCount","lazyLoad","forceReload","wasExpanded","_triggerNodeEvent","makeVisible","deferreds","dfd","Deferred","effects","noAnimation","scrollIntoView","when","targetNode","prevParent","targetParent","navigate","activate","KC","setFocus","childNode","force","replaceWith","fail","scheduleAction","ms","queue","scrollOfs","scrollParent","topNode","$scrollParent","$container","overflowY","css","jquery","tbody","topNodeY","nodeY","containerOffsetTop","nodeHeight","span","topOfs","bottomOfs","scrollTop","$animateTarget","isParentWindow","newScrollTop","innerHeight","resolveWith","setSelected","setStatus","details","setTitle","triggerModify","sortChildren","recursive","isEmptyObject","classNames","wasAdded","statusElem","statusClassPropName","curClasses","toggleExpanded","toggleSelected","operation","modifyChild","visitAndLoad","_recursion","loaders","visitSiblings","Fancytree","_makeHookContext","widget","typeInfo","funcName","contextObject","_extraArgs","_setExpiringValue","_tempCache","_getExpiringValue","_usesExtension","extensions","_requireExtension","before","thisName","_local","extList","isBefore","isMissing","ext","badOrder","activateKey","getNodeByKey","opts_","refNode","getActiveNode","editCreateNode","editStart","patchList","patchCount","deferredList","_makeResolveFunc","destroy","enable","enableUpdate","_enableUpdate","expandAll","findNextNode","startNode","reMatch","_checkNode","visitRows","BACKSPACE","HOME","END","UP","DOWN","generateFormElements","selectedName","activeName","$result","_appender","checked","hide","insertAfter","getFocusNode","getOption","optionName","option","searchRoot","idPrefix","ftnode","getRootNode","_hasFocus","_requestId","loadKeyPath","keyPathList","optsOrCallback","pathSegList","notifyWith","matchKey","_loadKeyPathImpl","nodeKey","remain","remainMap","tmpParent","segList","subDfd","__findChild","__lazyload","errMsg","rejectWith","reactivate","noFocus","reload","selectAll","setOption","debugTime","debugTimeEnd","timeEnd","_trigger","_triggerTreeEvent","_visitRowsUp","siblings","siblingOfs","skipFirstNode","checkFilter","nodeClick","targetType","focusOnSelect","clickFolderMode","nodeSetFocus","nodeCollapseSiblings","nodeDblclick","nodeKeydown","matchNode","stamp","which","specialModifiers","isAlnum","$target","autoActivate","quicksearch","is","lastQuicksearchTime","lastQuicksearchTerm","eventToString","nodeSetExpanded","nodeToggleSelected","nodeSetActive","nodeLoadChildren","resultDfd","ajaxDfd","isAsync","nodePrevParent","requestId","debugDelay","nodeSetStatus","textStatus","jqXHR","errorObj","dataType","postProcess","enableAspx","parseJSON","errorThrown","noDataRes","nodata","noData","ctxErr","nodeLoadKeyPath","nodeRemoveChild","subCtx","nodeRemoveChildren","nodeRemoveMarkup","nodeRemoveChildMarkup","nodeRenderStatus","nodeRender","_recursive","childLI","childNode1","childNode2","aria","successorLi","nextSibling","generateIds","nodeRenderTitle","renderNode","$div","checkbox","nodeTitle","role","iconTooltip","ares","minExpandLevel","iconClass","_escapeTooltip","imagePath","escapeHtml","titlesTabbable","escapeTitles","enhanceTitle","$title","$ariaElem","isLastSib","_classNames","cnList","focused","removeAttr","lastsib","_error","statusNodePrefix","combinedExpanderPrefix","combinedIconPrefix","noEvents","_getRejectedPromise","activeVisible","_afterLoad","prevAC","autoCollapse","autoScroll","effect","toggleEffect","animating","ctx2","isInput","calledByNode","uniqueId","nodeSetSelected","_lastSelectIntent","lastSelectedNode","_setStatusNode","_clearStatusNode","loadError","nodeToggleExpanded","treeClear","treeCreate","treeDestroy","$source","treeInit","tabindex","checkboxAutoHide","rtl","treeLoad","$ul","rootCtx","not","parseHtml","_getElementDataAsDict","contents","treeRegisterNode","treeSetFocus","_lastMousedownNode","treeSetOption","callDefault","callCreate","callRender","Widget","_setOption","treeStructureChanged","copyFunctionsToData","disabled","treeId","radio","_deprecationWarning","_create","extName","_extensions","_simpleDeepMerge","_subclassObject","icons","tabbable","_init","_bind","_destroy","_unbind","_ns","off","prevPhase","phase","getEventTarget","getTree","buildType","_nextId","_nextNodeKey","_FancytreeClass","_FancytreeNodeClass","jquerySupports","positionMyOfs","dottedVersion","major","minor","verParts","testParts","isVersionAtLeast","cond","createTree","$tree","debounce","invokeAsap","fixPositionOptions","my","myParts","atParts","tcn","closest","getEventTargetType","orgEl","Element","HTMLDocument","nodeObject","treeOptions","treeOpt","nodeOpt","setSpanIcon","baseClass","$span","keyEventToString","overrideMethod","methodName","handler","prevSuper","noop","classes","iPos","tmp2","$children","allData","lowerCaseAttr","$li","$liSpan","$liA","registerExtension","unescapeHtml","nodeValue","_makeVirtualFunction","prevFunc","baseFunc","_superApply","prevLocal","prevSuperApply","attrName","argArray","deferred","$el","uiFancytree","unselectableIgnore","hideCheckbox","defaultKey","lazyload","loaderror","fx","columns","systemFocusElement","ariaPropName","nodeContainerAttrName","fakeParent","class","appendTo","Context","authenticationProviders","provider","authenticate","clearCache","servers","maxAttempts","instances","times","avgTime","attempts","cb","startTime","instanceIndex","performance","nowTime","authenticateWithProvider","callApiMethodWithAuthentication","attemptCount","classification","layerID","notes","annotationID","added","updated","deleted","formIDs","rootDirectoryAlias","pathOrUids","formID","page","pageSize","cbFn","sId","Authentication","SessionLogin","pattern","formId","fieldID","fieldId","images","PmaStartUrl","PromptLogin","getSession","getImagesInfo","lat1","lat2","deltaLatBy2","deltaLonBy2","lon1","dByR","withCredentials","loadFeaturesXhr","xhr","responseXML","DOMParser","parseFromString","CanvasImmediateRenderer","opt_squaredTolerance","opt_userTransform","squaredTolerance_","userTransform_","contextFillState_","contextStrokeState_","contextTextState_","fillState_","strokeState_","imageAnchorX_","imageAnchorY_","imageHeight_","imageOpacity_","imageOriginX_","imageOriginY_","imageRotateWithView_","imageRotation_","imageScale_","imageWidth_","textScale_","tmpLocalTransform_","drawImages_","localTransform","drawText_","setContextFillState_","setContextStrokeState_","setContextTextState_","moveToLineTo_","close","drawRings_","drawGeometryCollection","drawFeature","flatMidpoint","geometryExtent","flatMidpoints","flatInteriorPoint","flatInteriorPoints","contextFillState","contextStrokeState","contextTextState","imageSize","imageAnchor","imageOrigin","textFillStyleColor","textStrokeStyleColor","textStrokeStyleLineCap","textStrokeStyleLineDash","textStrokeStyleLineDashOffset","textStrokeStyleLineJoin","textStrokeStyleWidth","textStrokeStyleMiterLimit","textFont","textText","textTextAlign","textTextBaseline","RenderFeature","type_","flatCoordinates_","flatMidpoints_","properties_","cleanLine","pt1","pt2","nextPoint","secondToLast","isPointOnLineSegment","dxl","newCoords","polyPoints","existing","loginClick","getCaller","successCallbacks","failureCallbacks","serverNameCallback","registerAuthenticationProvider","keypress","PriorityQueue","priorityFunction","keyFunction","priorityFunction_","keyFunction_","elements_","priorities_","queuedElements_","dequeue","elements","priorities","siftUp_","elementKey","enqueue","priority","siftDown_","getLeftChildIndex_","getRightChildIndex_","getParentIndex_","heapify_","isKeyQueued","isQueued","lIndex","rIndex","smallerChildIndex","parentIndex","reprioritize","TileQueue","tilePriorityFunction","tileChangeCallback","boundHandleTileChange_","tileChangeCallback_","tilesLoading_","tilesLoadingKeys_","getTilesLoading","loadMoreTiles","maxTotalLoading","maxNewLoads","newLoads","getTilePriority","tileSourceKey","tileCenter","tileResolution","wantedTiles","taintedTestContext","IconImage","imageState_","tainted_","isTainted_","dispatchChangeEvent_","replaceColor_","imgData","LayerGroup","layersListenerKeys_","listenerKeys_","handleLayersChanged_","handleLayerChange_","handleLayersAdd_","handleLayersRemove_","layersArray","collectionEvent","ownLayerState","defaultZIndex","kinetic_","lastCentroid","lastPointersCount_","panning_","noKinetic_","centerpx","TranslateEventType","TranslateEvent","startCoordinate","Translate","layerFilter","lastCoordinate_","startCoordinate_","layers_1","layerFilter_","filter_","hitTolerance_","lastFeature_","handleActiveChanged_","featuresAtPixel_","newCoordinate","deltaX_1","deltaY_1","getHitTolerance","setHitTolerance","updateState_","GEOMETRY_READERS","GeometryLayout","getGeometryLayout","paths","GEOMETRY_WRITERS","esriJSONPolygon","flatRing","outerRings","holes","deflate","hole","outerRing","convertRings","geometryReader","hasZ","hasM","getHasZM","geometryWriter","esriJSON","hasZM","EsriJSON","opt_idField","esriJSONFeature","attributes","esriJSONFeatures","objectIdFieldName","wkid","XML_SCHEMA_INSTANCE_URI","createElementNS","namespaceURI","qualifiedName","getDocument","getAllTextContent","normalizeWhitespace","getAllTextContent_","accumulator","Node","CDATA_SECTION_NODE","TEXT_NODE","isDocument","xml","makeArrayExtender","valueReader","objectStack","makeArrayPusher","makeReplacer","makeObjectPropertyPusher","opt_property","localName","makeObjectPropertySetter","makeChildAppender","nodeWriter","makeArraySerializer","serializersNS","nodeFactory","serializers","makeSimpleNodeFactory","opt_nodeName","opt_namespaceURI","fixedNodeName","nodeName","OBJECT_PROPERTY_NODE_FACTORY","makeSequence","orderedKeys","sequence","makeStructureNS","namespaceURIs","structure","opt_structureNS","structureNS","parseNode","parsersNS","nextElementSibling","parsers","pushParseAndPop","opt_keys","pushSerializeAndPop","xmlSerializer_","document_","implementation","createDocument","XMLFeature","XMLSerializer","readFeatureFromDocument","readFeatureFromNode","readFeaturesFromDocument","readFeaturesFromNode","ELEMENT_NODE","readGeometryFromDocument","readGeometryFromNode","readProjectionFromDocument","readProjectionFromNode","writeFeatureNode","serializeToString","writeFeaturesNode","writeGeometryNode","GMLNS","ONLY_WHITESPACE_RE","GMLBase","featureType","featureNS","srsName","schemaLocation","FEATURE_COLLECTION_PARSERS","namespace","readFeaturesInternal","uri","featureTypes","readFeatureElement","readGeometryElement","getAttribute","GEOMETRY_PARSERS","readFeatureElementInternal","asFeature","_content_","attName","fid","getAttributeNS","readPoint","readFlatCoordinatesFromNode","readMultiPoint","MULTIPOINT_PARSERS","readMultiLineString","MULTILINESTRING_PARSERS","readMultiPolygon","MULTIPOLYGON_PARSERS","pointMemberParser","POINTMEMBER_PARSERS","lineStringMemberParser","LINESTRINGMEMBER_PARSERS","polygonMemberParser","POLYGONMEMBER_PARSERS","readLineString","readFlatLinearRing","GEOMETRY_FLAT_COORDINATES_PARSERS","readLinearRing","readPolygon","flatLinearRings","FLAT_LINEAR_RINGS_PARSERS","RING_PARSERS","readBooleanString","readDateTime","dateTime","readDecimal","readDecimalString","readNonNegativeInteger","readNonNegativeIntegerString","writeBooleanTextNode","bool","writeStringTextNode","writeDecimalTextNode","toPrecision","writeNonNegativeIntegerTextNode","nonNegativeInteger","MULTIGEOMETRY_TO_MEMBER_NODENAME","GML2","readFlatCoordinates","containerSrs","coordsGroups","readBox","BOX_PARSERS_","innerBoundaryIsParser","flatLinearRing","outerBoundaryIsParser","GEOMETRY_NODE_FACTORY_","multiSurface","surface","multiCurve","writeFeatureElement","writeGeometryElement","writeCurveOrLineString","createCoordinatesNode_","writeCoordinates_","writeCurveSegments_","writeLineStringOrCurveMember","writeMultiCurveOrLineString","LINESTRINGORCURVEMEMBER_SERIALIZERS","MULTIGEOMETRY_MEMBER_NODE_FACTORY_","GEOMETRY_SERIALIZERS","getCoords_","writeSurfaceOrPolygon","RING_SERIALIZERS","RING_NODE_FACTORY_","patches","writeSurfacePatches_","exteriorWritten","writeRing","writeLinearRing","opt_srsName","opt_hasZ","writePoint","writeMultiPoint","POINTMEMBER_SERIALIZERS","writePointMember","writeMultiSurfaceOrPolygon","SURFACEORPOLYGONMEMBER_SERIALIZERS","writeSurfaceOrPolygonMember","writeEnvelope","ENVELOPE_SERIALIZERS","GML3","surface_","curve_","multiCurve_","multiSurface_","readMultiCurve","MULTICURVE_PARSERS","readMultiSurface","MULTISURFACE_PARSERS","curveMemberParser","CURVEMEMBER_PARSERS","surfaceMemberParser","SURFACEMEMBER_PARSERS","readPatch","PATCHES_PARSERS","readSegment","SEGMENTS_PARSERS","readPolygonPatch","readLineStringSegment","interiorParser","exteriorParser","readSurface","SURFACE_PARSERS","readCurve","CURVE_PARSERS","readEnvelope","ENVELOPE_PARSERS","readFlatPos","readFlatPosList","contextDimension","dim","writePos_","srsDimension","writePosList_","posList","writeFeatureMembers_","setAttributeNS","GML","NAMESPACE_URIS","FEATURE_READER","readRte","readTrk","readWpt","GPX_PARSERS","LINK_PARSERS","GPX_SERIALIZERS","RTE_SEQUENCE","RTE_SERIALIZERS","TRK_SEQUENCE","TRK_SERIALIZERS","writeWptType","GPX","readExtensions_","readExtensions","handleReadExtensions_","extensionsNode","featureReader","gpx","GPX_NODE_FACTORY","RTE_PARSERS","parseLink","parseExtensions","RTEPT_PARSERS","rteValues","layoutOptions","TRK_PARSERS","TRKSEG_PARSERS","TRKPT_PARSERS","trkValues","WPT_PARSERS","LINK_SEQUENCE","LINK_SERIALIZERS","writeLink","RTEPT_TYPE_SEQUENCE","TRKSEG_SERIALIZERS","TRKSEG_NODE_FACTORY","WPT_TYPE_SEQUENCE","WPT_TYPE_SERIALIZERS","date","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","GEOMETRY_TYPE_TO_NODENAME","applyLayoutOptions","link","DEFAULT_COLOR","DEFAULT_IMAGE_STYLE_ANCHOR","DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS","DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS","DEFAULT_IMAGE_STYLE_SIZE","DEFAULT_IMAGE_STYLE_SRC","DEFAULT_IMAGE_SCALE_MULTIPLIER","IGCZ","B_RECORD_RE","H_RECORD_RE","HFDTE_RECORD_RE","NEWLINE_RE","IGC","altitudeMode_","altitudeMode","year","month","day","lastDateTime","hour","minute","UTC","GX_NAMESPACE_URIS","ICON_ANCHOR_UNITS_MAP","IconAnchorUnits","PLACEMARK_PARSERS","extendedDataParser","regionParser","readMultiGeometry","styleMapValue","readStyleMapValue","placemarkObject","readStyleURL","GX_MULTITRACK_GEOMETRY_PARSERS","readGxTrack","NETWORK_LINK_PARSERS","readURI","REGION_PARSERS","LAT_LON_ALT_BOX_PARSERS","regionObject","LOD_PARSERS","lodObject","KML_SEQUENCE","KML_SERIALIZERS","DOCUMENT_SERIALIZERS","DOCUMENT_NODE_FACTORY","writePlacemark","DEFAULT_FILL_STYLE","DEFAULT_NO_IMAGE_STYLE","DEFAULT_IMAGE_STYLE","DEFAULT_TEXT_STROKE_STYLE","DEFAULT_STROKE_STYLE","DEFAULT_TEXT_STYLE","DEFAULT_STYLE","TEXTAREA","DEFAULT_STYLE_ARRAY","defaultIconUrlFunction","KML","IconOrigin","defaultStyle_","defaultStyle","extractStyles_","extractStyles","writeStyles_","writeStyles","sharedStyles_","showPointNames_","showPointNames","iconUrlFunction_","iconUrlFunction","readDocumentOrFolder_","readPlacemark_","readSharedStyle_","readSharedStyleMap_","styleUrl","sharedStyles","drawName","multiGeometryPoints","findStyle","styleValue","nameStyle","foundStyle","textOffset","createNameStyleFunction","createFeatureStyleFunction","styleUri","baseURI","URL","fs","readName","readNameFromDocument","readNameFromNode","name_2","readNetworkLinks","networkLinks","readNetworkLinksFromDocument","readNetworkLinksFromNode","readRegion","regions","readRegionFromDocument","readRegionFromNode","kml","xmlnsUri","readColor","hexColor","readScale","STYLE_MAP_PARSERS","pairObject","PAIR_PARSERS","ICON_STYLE_PARSERS","iconObject","ICON_PARSERS","xunits","yunits","LABEL_STYLE_PARSERS","LINE_STYLE_PARSERS","POLY_STYLE_PARSERS","FLAT_LINEAR_RING_PARSERS","GX_TRACK_PARSERS","whens","gxTrackObject","EXTRUDE_AND_ALTITUDE_MODE_PARSERS","MULTI_GEOMETRY_PARSERS","multiGeometry","homogeneous","setCommonGeometryProperties","innerBoundaryFlatLinearRings","INNER_BOUNDARY_IS_PARSERS","OUTER_BOUNDARY_IS_PARSERS","STYLE_PARSERS","styleObject","IconObject","drawIcon","hotSpot","heading","hasExtrude","hasTessellate","hasAltitudeMode","extrudes","tessellates","altitudeModes","DATA_PARSERS","EXTENDED_DATA_PARSERS","featureObject","displayName","SCHEMA_DATA_PARSERS","writeColorTextNode","abgr","hex","EXTENDEDDATA_NODE_SERIALIZERS","pair","createCDATASection","writeCDATASection","DATA_NODE_FACTORY","ICON_SEQUENCE","ICON_SERIALIZERS","GX_NODE_FACTORY","ICON_STYLE_SEQUENCE","ICON_STYLE_SERIALIZERS","vec2","writeScaleTextNode","LABEL_STYLE_SEQUENCE","LABEL_STYLE_SERIALIZERS","LINE_STYLE_SEQUENCE","LINE_STYLE_SERIALIZERS","GEOMETRY_NODE_FACTORY","POINT_NODE_FACTORY","LINE_STRING_NODE_FACTORY","LINEAR_RING_NODE_FACTORY","POLYGON_NODE_FACTORY","MULTI_GEOMETRY_SERIALIZERS","writePrimitiveGeometry","writePolygon","writeMultiGeometry","factory","BOUNDARY_IS_SERIALIZERS","writeBoundaryIs","PLACEMARK_SERIALIZERS","namesAndValues","names","pointStyles","lineStyles","polyStyles","STYLE_SEQUENCE","STYLE_SERIALIZERS","PLACEMARK_SEQUENCE","EXTENDEDDATA_NODE_FACTORY","styleArray","PRIMITIVE_GEOMETRY_SEQUENCE","PRIMITIVE_GEOMETRY_SERIALIZERS","POLY_STYLE_SEQUENCE","POLYGON_SERIALIZERS","INNER_BOUNDARY_NODE_FACTORY","OUTER_BOUNDARY_NODE_FACTORY","POLY_STYLE_SERIALIZERS","iconProperties","readFromDocument","readFromNode","readHref","PARSERS","SERVICE_IDENTIFICATION_PARSERS","SERVICE_PROVIDER_PARSERS","OPERATIONS_METADATA_PARSERS","OWS","owsObject","ADDRESS_PARSERS","ALLOWED_VALUES_PARSERS","CONSTRAINT_PARSERS","CONTACT_INFO_PARSERS","PHONE_PARSERS","DCP_PARSERS","HTTP_PARSERS","REQUEST_METHOD_PARSERS","OPERATION_PARSERS","SERVICE_CONTACT_PARSERS","flipXY","opt_destOffset","destOffset","encodeUnsignedInteger","encoded","Polyline","factor_","geometryLayout_","geometryLayout","opt_factor","lastNumbers","numbers","decodeUnsignedIntegers","decodeSignedIntegers","decodeFloats","decodeDeltas","inflate","encodeUnsignedIntegers","encodeSignedIntegers","encodeFloats","encodeDeltas","TopoJSON","topoJSONTopology","arcs","transformArc","transformArcs","topoJSONFeatures","objectName","readFeaturesFromGeometryCollection","readFeatureFromGeometry","transformVertex","concatenateArcs","polyArray","ringCoords","indices","GML32","Filter","tagName_","getTagName","LogicalNary","And","Bbox","Spatial","Contains","DWithin","unit","Disjoint","propertyName","During","ComparisonBinary","opt_matchCase","matchCase","EqualTo","GreaterThanOrEqualTo","Intersects","IsBetween","lowerBoundary","upperBoundary","IsLike","opt_wildCard","opt_singleChar","opt_escapeChar","wildCard","singleChar","escapeChar","IsNull","LessThanOrEqualTo","Not","NotEqualTo","ResourceId","rid","TRANSACTION_SUMMARY_PARSERS","TRANSACTION_RESPONSE_PARSERS","readTransactionSummary","readInsertResults","QUERY_SERIALIZERS","TRANSACTION_SERIALIZERS","writeUpdate","writeDelete","writeProperty","writeNative","XMLNS","OGCNS","WFSNS","FESNS","SCHEMA_LOCATIONS","GML_FORMATS","WFS","version_","featureType_","featureNS_","gmlFormat_","gmlFormat","schemaLocation_","getFeatureType","setFeatureType","readTransactionResponse","readTransactionResponseFromDocument","readTransactionResponseFromNode","readFeatureCollectionMetadata","readFeatureCollectionMetadataFromDocument","readFeatureCollectionMetadataFromNode","writeGetFeature","handle","outputFormat","maxFeatures","resultType","viewParams","featurePrefix","propertyNames","combineBboxAndFilter","completeFilter","bboxFilter","Function","and","writeTransaction","inserts","updates","deletes","baseObj","gmlOptions","request","gmlVersion","createTransactionRequest","serializeTransactionRequest","nativeElements","OGC_FID_PARSERS","fidParser","INSERT_RESULTS_PARSERS","writeOgcFidFilter","getTypeName","prefix","typeName","nativeElement","vendorId","safeToIgnore","GETFEATURE_SERIALIZERS","writeQuery","writeDuringFilter","writeLogicalFilter","writeNotFilter","writeBboxFilter","writeSpatialFilter","writeDWithinFilter","writeComparisonFilter","writeIsNullFilter","writeIsBetweenFilter","writeIsLikeFilter","typeNameAttr","getFilterNS","writeFilterCondition","writePropertyName","writeExpression","timePeriod","writeTimeInstant","writeLiteral","timeInstant","timePosition","SERVICE_PARSERS","CAPABILITY_PARSERS","REQUEST_PARSERS","EXCEPTION_PARSERS","layerObject","LAYER_PARSERS","readLayer","WMSCapabilities","wmsCapabilityObject","readKeywordList","CONTACT_INFORMATION_PARSERS","CONTACT_PERSON_PARSERS","CONTACT_ADDRESS_PARSERS","geographicBoundingBox","EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS","westBoundLongitude","southBoundLatitude","eastBoundLongitude","northBoundLatitude","ATTRIBUTION_PARSERS","authorityObject","readFormatOnlineresource","metadataObject","readSizedFormatOnlineresource","readOperationType","OPERATIONTYPE_PARSERS","DCPTYPE_PARSERS","FORMAT_ONLINERESOURCE_PARSERS","KEYWORDLIST_PARSERS","parentLayerObject","queryable","cascaded","noSubsets","fixedWidth","fixedHeight","childValue","parentValue","formatOnlineresource","WMSGetFeatureInfo","readFeatures_","layerElement","layerFeatures","gmlFeatures","CONTENTS_PARSERS","WMTSCapabilities","owsParser_","WMTSCapabilityObject","TMS_PARSERS","isDefault","TMS_LINKS_PARSERS","DIMENSION_PARSERS","resourceType","resource","legend","TMS_LIMITS_LIST_PARSERS","TMS_LIMITS_PARSERS","WGS84_BBOX_READERS","readCoordinates","TM_PARSERS","BaseImage","BaseImageLayer","arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread","AssertionError","VectorContext","geometryCollectionGeometry","opt_declutterImageWithText","ret","lineStringLength","CanvasVectorLayerRenderer","boundHandleStyleImageChange_","handleStyleImageChange_","animatingOrInteracting_","dirty_","hitDetectionImageData_","renderedFeatures_","renderedRevision_","renderedResolution_","renderedExtent_","wrappedRenderedExtent_","renderedRotation_","renderedCenter_","renderedProjection_","renderedRenderOrder_","replayGroup_","replayGroupChanged","declutterExecutorGroup","renderWorlds","executorGroup","viewHints","endWorld","world","layerIndex","clipped","handleFontsChanged","getVisible","renderIfReadyAndVisible","interacting","frameStateExtent","vectorLayerRevision","vectorLayerRenderBuffer","vectorLayerRenderOrder","renderedExtent","loadExtents","loadExtent","declutterBuilderGroup","userTransform","userExtent","replayGroupInstructions","LayerRenderer","boundHandleImageChange_","handleImageChange_","layer_","loadedTileCallback","createLoadedTileFinder","loadImage","BaseLayer","className_","opt_managed","managed","sourceState","setMaxResolution","setMinResolution","zindex","CanvasImageLayerRenderer","imageLayer","viewResolution","imageSource","hints","imageExtent","imageResolution","imagePixelRatio","viewCenter","size_1","dw","dh","previousAlpha","fontWeights","thin","hairline","book","regular","plain","roman","standard","medium","bold","heavy","fat","poster","italicRE","fontCache","cssData","fontFamilies","maybeWeight","CanvasTileLayerRenderer","tileLayer","extentChanged","renderedPixelRatio","renderedProjection","renderedTiles","newTiles_","tmpTileRange_","isDrawableTile","tileSource","sourceRevision","canvasExtent","tilesToDrawByZ","findLoadedTiles","tmpTileRange","childTileRange","canvasScale","clips","clipZs","currentClip","currentZ","currentTilePixelSize","currentScale","dx_1","dy_1","originTileCoord","originTileExtent","tileGutter","tilesToDraw","xIndex","nextX","yIndex","nextY","drawTileImage","updateUsedTiles","manageTilePyramid","scheduleExpireCache","getTileImage","tileAlpha","alphaChanged","postRenderFunction","postRenderFunctions","opt_tileCallback","tileQueue","naturalWidth","naturalHeight","errorThreshold","opt_destinationResolution","sourceProj_","targetProj_","transformInvCache","transformInv","transformInv_","maxSourceExtent_","errorThresholdSquared_","triangles_","wrapsXInSource_","canWrapXInSource_","sourceWorldWidth_","targetWorldWidth_","destinationTopLeft","destinationTopRight","destinationBottomRight","destinationBottomLeft","sourceTopLeft","sourceTopRight","sourceBottomRight","sourceBottomLeft","maxSubdivision","addQuad_","leftBound_1","newTriangle","addTriangle_","aSrc","bSrc","cSrc","dSrc","sourceQuadExtent","sourceCoverageX","sourceWorldWidth","wrapsX","needsSubdivision","targetQuadExtent","isNotFinite","centerSrc","bc","bcSrc","daSrc","ab","abSrc","cd","cdSrc","decay","minVelocity","decay_","minVelocity_","delay_","initialVelocity_","firstIndex","handleClick","prevResolution","associatedImage","imgEl","getImageUrl","rotateImage","imageElement","rotateBtn","zoomOutCb","zoomOutBtn","fileName","mainSpan","handleCollapseClick","dimensionSelector","sliders","slidersValues","currentStep","btnEventUsed","dimensionsDiv","renderDimensionsControl","dimensionControlsDiv","renderSelectors","lastSelection","chkChange","chans","chks","setActiveChannels","channelsHtml","channelSelectorId","checkboxes","destroySliders","initialRender","dimensionChange","setActiveTimeFrame","setActiveLayer","getActiveLayer","getActiveTimeFrame","frame","prevNextClicked","HTMLstring","selectedZStack","selects","btns","multiplier","slider","innerText","noUiSlider","tooltips","connect","keyboardSupport","channelIndex","setChannelRenderingOptions","layerSwitch","panel_","drawPanel","lName","liHtml","switchVisibility","opacityChange","updateHTML","btnbicon","btncicon","setBrightnessContrastGamma","btnbplus","btnbminus","btncplus","btncminus","btngplus","btngicon","btngminus","magnifierDiv","magnifierMap","mouseMoveFunc","diagonalSize","mapView","firstLayer","changing","changeMagnifierSize","serverSessions","MapBrowserEventHandler","moveTolerance","clickTimeoutId_","emulateClicks_","moveTolerance_","down_","activePointers_","trackedTouches_","pointerdownListenerKey_","handlePointerDown_","originalPointerMoveEvent_","relayedListenerKey_","relayEvent_","boundHandleTouchMove_","handleTouchMove_","emulateClick_","newEvent","updateActivePointers_","handlePointerUp_","isMouseActionButton_","isMoving_","cancelable","optionsInternal","keyboardEventTarget","overlays","layerGroup","createOptionsInternal","boundHandleBrowserEvent_","handleBrowserEvent","maxTilesLoading_","maxTilesLoading","postRenderTimeoutHandle_","animationDelayKey_","animationDelay_","renderFrame_","coordinateToPixelTransform_","pixelToCoordinateTransform_","frameIndex_","frameState_","previousExtent_","viewPropertyListenerKey_","viewChangeListenerKey_","layerGroupPropertyListenerKeys_","viewport_","overlayContainer_","overlayContainerStopEvent_","mapBrowserEventHandler_","keyboardEventTarget_","keyHandlerKeys_","overlays_","overlayIdIndex_","handleResize_","postRenderFunctions_","tileQueue_","handleTileChange_","handleLayerGroupChanged_","handleViewChanged_","handleSizeChanged_","handleTargetChanged_","addOverlayInternal_","getInteractions","getLayerGroup","getOverlays","checkWrapped","getFeaturesAtPixel","forEachLayerAtPixel","hasFeatureAtPixel","hasFeatureAtCoordinate","getEventCoordinate","eventPosition","changedTouches","getTarget","getOverlayById","getLoading","viewCoordinate","ownerDocument","handleMapBrowserEvent","interactionsArray","handlePostRender","lowOnFrameBudget","dispatchRenderEvent","handleViewPropertyChanged_","updateViewportSize_","redrawText","layerStates","previousFrameState","setLayerGroup","computedStyle","expireIconCache","MapRenderer","calculateMatrices2D","thisArg","thisArg2","translatedCoordinate","offsets","numLayers","callback_1","order","scheduleExpireIconCache","CompositeMapRenderer","fontChangeListenerKey_","children_","declutterLayers","previousElement","geoM","fracA","fracB","fracM","geoA","geoB","geoStack","fractionStack","fractions","maxIterations","supportedExtensions","INTERVALS","Graticule","maxLines","targetSize","showLabels","lonLabelFormatter","latLabelFormatter","lonLabelPosition","latLabelPosition","lonLabelStyle","latLabelStyle","intervals","maxLat_","maxLon_","minLat_","minLon_","maxX_","maxY_","minX_","minY_","targetSize_","maxLines_","meridians_","parallels_","strokeStyle_","fromLonLatTransform_","toLonLatTransform_","projectionCenterLonLat_","bottomLeft_","bottomRight_","topLeft_","topRight_","meridiansLabels_","parallelsLabels_","lonLabelFormatter_","latLabelFormatter_","lonLabelPosition_","latLabelPosition_","lonLabelStyleBase_","lonLabelStyle_","latLabelStyleBase_","latLabelStyle_","drawLabels_","intervals_","loaderFunction","strategyFunction","featurePool_","lineStyle_","loadedExtent_","realWorldExtent","renderExtent","updateProjectionInfo_","createGraticule_","featuresColl","poolIndex","addMeridian_","minLat","maxLat","getMeridian_","addParallel_","minLon","maxLon","getParallel_","rotationCenter","rotationExtent","unrotatedWidth","unrotatedHeight","startWorld","labelsAtStart","vectorContext","canvasPixelRatio","getVectorContext","textPoint","getMeridianPoint_","getParallelPoint_","getInterval_","validCenterP","centerLonLat","cnt","centerLon","centerLat","validExtentP","validExtent","clampedLat","frac","meridian","clampedBottom","clampedTop","getMeridians","lon2","parallel","clampedLeft","clampedRight","getParallels","toLonLatTransform","split_1","lonLatCoordinates","worldExtentP","CONTEXT_IDS","opt_attributes","BufferUsage","getArrayClassForType","Uint32Array","WebGLArrayBuffer","opt_usage","ofSize","fromArray","fromArrayBuffer","getUsage","WebGLPostProcessingPass","gl_","webGlContext","gl","scaleRatio_","scaleRatio","renderTargetTexture_","createTexture","renderTargetTextureSize_","frameBuffer_","createFramebuffer","vertexShader","createShader","VERTEX_SHADER","shaderSource","compileShader","fragmentShader","FRAGMENT_SHADER","renderTargetProgram_","createProgram","attachShader","linkProgram","renderTargetVerticesBuffer_","createBuffer","bindBuffer","bufferData","STATIC_DRAW","renderTargetAttribLocation_","getAttribLocation","renderTargetUniformLocation_","getUniformLocation","renderTargetTextureLocation_","uniforms_","uniforms","getGL","textureSize","drawingBufferWidth","drawingBufferHeight","bindFramebuffer","FRAMEBUFFER","getFrameBuffer","internalFormat","RGBA","UNSIGNED_BYTE","bindTexture","TEXTURE_2D","texImage2D","texParameteri","TEXTURE_MIN_FILTER","LINEAR","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","framebufferTexture2D","COLOR_ATTACHMENT0","nextPass","activeTexture","TEXTURE0","clearColor","COLOR_BUFFER_BIT","BLEND","blendFunc","ONE_MINUS_SRC_ALPHA","useProgram","enableVertexAttribArray","vertexAttribPointer","FLOAT","uniform2f","uniform1i","applyUniforms","drawArrays","TRIANGLES","textureSlot","uniform","ImageData","texture","uniform3f","uniform4f","uniform1f","fromTransform","mat4","DefaultUniform","AttributeType","UNSIGNED_SHORT","UNSIGNED_INT","getByteSizeFromType","BYTES_PER_ELEMENT","Uint16Array","WebGLHelper","boundHandleWebGLContextLost_","handleWebGLContextLost","boundHandleWebGLContextRestored_","handleWebGLContextRestored","bufferCache_","currentProgram_","getSupportedExtensions","getExtension","ContextEventType","offsetRotateMatrix_","offsetScaleMatrix_","tmpMat4_","uniformLocations_","attribLocations_","postProcessPasses_","postProcesses","shaderCompileErrors_","bufferKey","bufferCache","webGlBuffer","flushBufferData","deleteBuffer","bufferCacheEntry","isContextLost","prepareDraw","getCanvas","applyFrameState","prepareDrawToRenderTarget","renderTarget","opt_disableAlphaBlend","getFramebuffer","getTexture","ZERO","drawElements","elementType","numItems","offsetInBytes","finalizeDraw","offsetScaleMatrix","offsetRotateMatrix","setUniformMatrixValue","setUniformFloatValue","HTMLImageElement","prevValue","program","shader","getProgram","fragmentShaderSource","vertexShaderSource","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","deleteShader","getProgramParameter","LINK_STATUS","getAttributeLocation","makeProjectionTransform","uniformMatrix4fv","enableAttributeArray_","attribName","enableAttributes","computeAttributesStride","opt_data","opt_texture","WebGLWorkerMessageType","WebGLLayerRenderer","helper","tmpArray4","WebGLRenderTarget","helper_","texture_","framebuffer_","data_","dataCacheDirty_","updateSize_","clearCachedData","readAll","readPixels","readPixel","createObjectURL","WebGLPointsLayerRenderer","projectionMatrixTransform","sourceRevision_","verticesBuffer_","hitVerticesBuffer_","indicesBuffer_","program_","hitDetectionEnabled_","hitFragmentShader","hitVertexShader","hitProgram_","customAttributes","attribute","hitDetectionAttributes","currentTransform_","renderTransform_","invertRenderTransform_","renderInstructions_","hitRenderInstructions_","hitRenderTarget_","worker_","Worker","received","projectionTransform","hitDetection","vertexBuffer","indexBuffer","renderInstructions","featureCache_","featureCount_","sourceListenKeys_","handleSourceFeatureAdded_","handleSourceFeatureChanged_","handleSourceFeatureDelete_","handleSourceFeatureClear_","renderCount","renderHitDetection","viewNotMoving","sourceChanged","BaseVector","rebuildBuffers_","featureCache","totalInstructionsCount","totalHitInstructionsCount","hitColor","tmpCoords","tmpColor","renderIndex","hitIndex","featureUid","radix","customAttributesCount","postMessage","hitMessage","colorDecodeId","terminate","DEFAULT_GRADIENT","Heatmap","gradient_","handleGradientChanged_","setGradient","setBlur","weightFunction_","getBlur","getGradient","colors","createLinearGradient","addColorStop","createGradient","u_size","u_blurSlope","u_gradientTexture","IMAGE_REPLAYS","VECTOR_REPLAYS","CanvasVectorTileLayerRenderer","renderedLayerRevision_","renderedPixelToCoordinateTransform_","renderTileImageQueue_","tileListenerKeys_","tmpTransform_","prepareTile","tileUid","updateExecutorGroup_","tileImageNeedsRender_","listenerKey","getRenderMode","VectorTileRenderType","renderTileImage_","layerRevision","builderState","layerUid","sourceTileExtent","sharedExtent","builderExtent","bufferedExtent","executorGroupInstructions","replayExtent","renderingReplayGroup","_loop_2","extent_1","tilePixel","hifi","getTileRenderTransform","worldOffset","renderQueuedTileImages_","renderMode","replayTypes","replayState","renderPixelRatio","renderScale","pixelScale","VectorTileLayer","renderMode_","defaultResolutions","createCanvas","hairSpacePool","applyLetterSpacing","letterSpacing","textWithLetterSpacing","joinSpaceString","ll","getMeasureContext","measureCache","renderFeatureCoordinates","emptyObj","zoomObj","functionCache","layoutOrPaint","functions","value_1","isExpr","compiledExpression","rawExpression","expressionData","filterCache","colorWithOpacity","templateRegEx","fromTemplate","recordLayer","loadedFontFamilies","glStyle","spriteImage","spriteImgSize","spriteImageUrl","img_1","olLayer","worker","mapboxSource","allLayers","layersBySourceLayer","mapboxLayers","sourceLayer","source_1","textHalo","iconImageCache","patternCache","featureBelongsToLayer","stylesLength","layerData","evaluateFilter","fillIcon","icon_1","spriteData","icon_cache_key","spriteImageData","createPattern","width_1","hasImage","placementAngle","iconImg","skipLabel","styleGeom","iconRotationAlignment","iconSize","iconColor","circleRadius","circleStrokeColor","circleColor","circleStrokeWidth","cache_key","textSize","fontArray","textLineHeight","getFonts","textTransform","maxTextWidth","wrappedLabel","wrapText","em","hardLines","wrappedText","words","maxWidth","word","testLine","line_1","prevWidth","nextWidth","line_2","lineWords","lastWord","textAnchor","textHaloWidth","textTranslate","vOffset","hOffset","textRotationAlignment","haloColor","halfTextSize","textPadding","fontFamilyRegEx","stripQuotesRegEx","hasFontFamily","styleSheets","styleSheet","cssRules","cssRule","cssText","processedFontFamilies","googleFamilies","getNames","fontsKey","googleFontDescriptions","googleFontDescription","fontUrl","markup","head","spriteRegEx","withPath","toSpriteUrl","applyStyle","onChange","sizeFactor_1","spriteUrl_1","fetch","credentials","ok","spritesJson","getMapboxPath","ErrorEvent","SourceType","MapboxVector","MapboxVectorLayer","sourceId","accessToken","fetchStyle","mapboxPath","mapboxBaseUrl","normalizeStyleUrl","onStyleLoad","handleError","sourceIdOrLayersList","firstSource","normalizeSpriteUrl","normalizeGlyphsUrl","styleSource","CanvasVectorImageLayerRenderer","vectorRenderer_","layerImageRatio_","getImageRatio","coordinateToVectorPixelTransform_","vectorPixel","vectorRenderer","imageFrameState_1","image_1","ImageState","VectorImage","VectorImageLayer","imageRatio","imageRatio_","ValueTypes","Operators","getValueType","valueArr","getReturnType","numberToGlsl","arrayToGlsl","getStringNumberEquivalent","stringLiteralsMap","expressionToGlsl","typeHint","toGlsl","valueType","stringToGlsl","assertNumber","assertNumbers","assertString","assertBoolean","assertArgsCount","assertArgsMinCount","assertArgsMaxCount","assertArgsEven","assertUniqueInferredType","uniformNameForVariable","variableName","getEqualOperator","getDecisionOperator","inFragmentShader","variables","opt_typeHint","stop1","output1","stop2","fallback","assertArgsOdd","ShaderBuilder","varyings","sizeExpression","rotationExpression","offsetExpression","colorExpression","texCoordExpression","discardExpression","addUniform","addAttribute","addVarying","setSizeExpression","setRotationExpression","setSymbolOffsetExpression","setColorExpression","setTextureCoordinateExpression","setFragmentDiscardExpression","setSymbolRotateWithView","getSizeExpression","getOffsetExpression","getColorExpression","getTextureCoordinateExpression","getFragmentDiscardExpression","getSymbolVertexShader","forHitDetection","offsetMatrix","varying","getSymbolFragmentShader","hitDetectionBypass","WebGLPoints","WebGLPointsLayer","parseResult_","symbStyle","texCoord","textureCoord","vertContext","parsedSize","parsedOffset","parsedTexCoord","parsedRotation","fragContext","parsedColor","parsedOpacity","opacityFilter","visibleSize","symbolType","builder","parsedFilter","varName","uniformName","attributeName","parseLiteralStyle","hitDetectionDisabled_","disableHitDetection","BingMaps","hidpi","hidpi_","culture_","maxZoom_","apiKey_","imagerySet_","imagerySet","handleImageryMetadataResponse","getApiKey","getImagerySet","statusCode","statusDescription","authenticationResultCode","resourceSets","resources","zoomMax","imageWidth","imageHeight","zoomMin","imageUrlSubdomains","subdomain","quadKeyTileCoord","imageUrl","quadKey","imageryProviders","transform_1","imageryProvider","intersecting","coverageAreas","coverageArea","epsg4326Extent","CartoDB","account_","account","mapId_","config_","config","templateCache_","initializeMap_","getConfig","updateConfig","setConfig","paramHash","applyTemplate_","mapUrl","handleInitResponse_","handleInitError_","tilesUrl","cdn_url","https","layergroupid","Cluster","interpolationRatio","boundRefresh_","updateDistance","setDistance","setMinDistance","getMinDistance","mapDistance","clustered","neighbors","neighbor","createCluster","geometry_1","searchCenter","TierSizeCalculation","CustomTile","zoomifyImage_","Zoomify","tierSizeCalculation","tierSizeInTiles","tileSizeForTierSizeCalculation","tileCountUpToTier","tileWidth","tileIndex","localContext_1","ZoomifyTileClass","testTileUrl","formatPercentage","percentage","IIIF","baseUrl","tileHeight","supportsListedSizes","supportsListedTiles","supportsArbitraryTiling","maxScaleFactor","ignoredSizesIndex","IiifTileClass","regionParam","sizeParam","tileX","tileY","regionX","regionY","regionW","regionH","sizeW","sizeH","regionWidth","regionHeight","ReprojImage","getImageFunction","sourceImage","sourcePixelRatio","targetExtent_","sourceImage_","sourcePixelRatio_","sourceListenerKey_","unlistenSource_","ImageSourceEventType","ImageSourceEvent","defaultImageLoadFunction","ImageSource","reprojectedImage_","reprojectedRevision_","findNearestResolution","getImageInternal","handleImageChange","appendParams","keyParams","ImageArcGISRest","params_","imageSize_","ratio_","getParams","getRequestUrl_","getImageLoadFunction","srid","modifiedUrl","setImageLoadFunction","updateParams","ImageCanvasSource","canvasFunction_","canvasFunction","canvasElement","ImageMapGuide","displayDpi_","displayDpi","useOverlay_","useOverlay","mcsW","mcsH","devW","devH","mpp","baseParams","Static","imageExtent_","getImageExtent","extentWidth","extentHeight","targetWidth","targetHeight","GETFEATUREINFO_IMAGE_SIZE","ImageWMS","v13_","updateV13_","serverType_","getFeatureInfoUrl","projectionObj","sourceProjectionObj","getLegendUrl","LAYERS","viewExtent","requestWidth","requestHeight","requestExtent","WMSServerType","ATTRIBUTION","OSM","hasImageData","createMinion","workerHasImageData","newWorkerImageData","buffers","imageOps","numBuffers","numBytes","byteLength","Uint8ClampedArray","arrays","createWorker","onMessage","Processor","threads","_imageOps","workers","_onWorkerMessage","minion","terminated","createFauxWorker","_workers","_queue","_maxQueueLength","_running","_dataLookup","_job","process","_enqueue","_dispatch","job","slices","_resolveJob","createImageData","newImageData","RasterEventType","RasterOperationType","RasterSourceEvent","RasterSource","processor_","operationType_","operationType","threads_","createLayer","createLayers","requestedFrameState_","renderedImageCanvas_","iMax","sourceOrLayer","sourceAttribution","setOperation","opt_lib","updateFrameState_","allSourcesReady_","ready","processSources_","imageDatas","onWorkerComplete_","sharedContext","layerOrSource","Raster","ATTRIBUTIONS","LayerConfig","ProviderConfig","Stamen","providerConfig","layerConfig","TileArcGISRest","getKeyForParams_","TileDebug","TileWMS","preemptive","preemptive_","grid_","jsonp_","xRelative","yRelative","row","forDataAtCoordinate","opt_request","loadInternal_","handleError_","UTFGrid","tileUrlFunction_","template_","getTemplate","forDataAtCoordinateAndResolution","grids","WMTSTileGrid","matrixIds_","matrixIds","getMatrixId","getMatrixIds","WMTS","requestEncoding","WMTSRequestEncoding","dimensions_","matrixSet_","matrixSet","requestEncoding_","getKeyForDimensions_","createFromWMTSTemplate","getDimensions","getMatrixSet","getRequestEncoding","updateDimensions","Tree","navigating","lastNavigatePathRequest","autoExpand","autoExpandNodes","lastSearchResults","lastSearchHash","previewEnabled","rootDirSortCb","sourceData","serverNode","serverIndex","dirPath","getVersionInfo","serverVersionResult","searchBox","cls","searchClass","dnd5","dragStart","dragEnd","wide","iconWidth","iconSpacing","levelOfs","searching","rootDir","loadNode","selectionArray","dblclick","isSlide","preview","enablePreview","autoDetectPmaStart","addPmaStartServer","searchTimeout","startSearch","disablePreview","server","serverInfo","removeServer","rnd","addServer","virtualPathToTreePath","navigateTo","clearSearchResults","showFiles","deAuthenticate","isRootDir","getDirectories","directories","getSlides","searchResultsSuccess","searchNode","searchHash","results","searchServerNode","resultCount","thispart","currentLevel","serverDone","serversSearched","searchResultError","searchResultsNode","searchResultsNodeInfo","queryFilename","initialPath","hoverTimeout","tUrl","pageY","pageX","fadeIn","AutoLogin","serverCredentials","checkReloadImage","doneCb","dropped","lastLoadImageRequest","onDragOver","hasData","onDrop","nodeData","initializeDropZone","SlideLoader","slideLoaderOptions","loadingImage","mainViewport","beforeLoadEa","cancel","newSessionId","returns","truncateCoords","poly1","poly2","ol_interaction_Transform","selection_","ol_Collection","handles_","overlayLayer_","ol_layer_Vector","ol_source_Vector","ol_interaction_Pointer","handleDownEvent_","handleDragEvent_","handleMoveEvent_","handleUpEvent_","_filter","_handleEvent","addFn_","addCondition","translateFeature","translateBBox","stretch","keepAspectRatio","modifyCenter","noFlip","selection","enableRotatedTransform","drawSketch_","setDefaultStyle","Cursors","previousCursor_","isTouch","ol_style_Stroke","strokedash","fill0","ol_style_Fill","ol_style_RegularShape","bigpt","smallpt","createStyle","ol_style_Style","olstyle","im","getFeatureAtPixel_","bbox_","getGeometryRotateToZero_","origGeom","rotGeom","ol_extent_buffer","extendExt","ol_extent_extend","ispt_","ol_Feature","ol_geom_Point","center_","ol_geom_Polygon_fromExtent","ol_extent_boundingExtent","iscircle_","watchFeatures_","setSelection","_featureListeners","ol_Observable_unByKey","isUpdating_","sel","opt_","constraint_","geoms_","rotatedGeoms_","ol_extent_createEmpty","rotExtent","rotatedExtent_","ol_extent_getCenter","rotate0","pt0","ispt","extentCoordinates","downCoordinate","dragCoordinate","downPoint","dragPoint","scx","scy","centerPoint","g1","g2","oldgeom","oldgeoms","inRing","ignoreBoundary","isInside","xj","yj","polys","inBBox","insidePoly","inHole","BBox","lineSegmentStart","lineSegmentEnd","excludeBoundary","ignoreEndVertices","ptCoords","lineCoords","doBBoxOverlap","compareCoords","pair1","pair2","type1","type2","coords1","coords2","isPointInMultiPoint","multiPoint1","multiPoint2","matchFound","i2","isMultiPointInMultiPoint","lineString1","lineString2","haveFoundInteriorPoint","isLineOnLine","isMultiPointOnLine","polyBbox","lineBbox","isLineInPoly","poly1Bbox","poly2Bbox","isPolyInPoly","isMultiPointInPoly","ol_interaction_Brush","pointer_","sel_","feature_","idToDelete_","translate_","brushSize","brushType","BRUSHTYPES","brushMode","BRUSHMODES","BRUSH","SQUARE","ERASER","setBrushSize","setPointer_","getBrushSize","setBrushType","getBrushType","setBrushMode","getBrushMode","olFormat","formatOptions_","pointerGeom","GeomCircle","pointer","penSize","ol_interaction_Translate","currentBrushFeature","metaNotes","metaColor","metaFillColor","metaPenSize","metaIcon","inputPolygonFeatureJson","pointerFeatureJson","intersect","outputFeatureJson","unify_","booleanContains","differentiate_","newFeature","stopEditing","ol_Extent","unifiedFeatureJson","differentiatedFeatureJson","pixels0","tol","getFeature","TileMask","border_","hatchInterval_","hatchOffset_","hatchLength","hatchTimeout","contextWithoutMask","loading_","lock_","mapKeys_","layersKeys_","mapKeyOnceComplete","mapKeyOnceRender","connectToMap","hatchInterval","hatchTick_","setCanvasSize","clearMask","disconnectFromMap","disconnectFromLayers","onViewResChanged_","onMapSizeChanged_","onMapMoved_","onPostRender_","scan","connectToLayers","hasVisibleLayers_","getRenderLayers_","cnv","drawBorder","layerCtx","needBorder","ix","iy","sw","sh","rx0","ry0","getMainWorldOffset","w1","gf","globalOffset","maskOffsets","offsetsLen","MagicWandLib","ind","hatchLength2","hatchOffset","isReady","blurRadius","currentThreshold_","history","MaskHistory","tileMask_","isMapConnect_","allowDraw_","addMode_","oldMask_","downPoint_","allowAdd_","addMode","isDebug_","debugMode","waitClass","drawClass","adx","ady","sign","thres","drawMask_","addMask","cs","getContours","ps","outer","redo","undo","setMask","onActivate_","onDeactivate_","annotationManager","createMask","clearHistory_","keyDownListener","onMapKeyDown_","keyUpListener","onMapKeyUp_","onMapContextMenuListener_","old","data1","data2","px1","py1","px2","py2","subarray","oldOffset","visibleData","concatMask_","maskW","masks","allowUndo","getCurrent","allowRedo","supportsColorPicker","colorInput","toggleDragPanInteraction","olInteraction","getStrokeColor","scolor","getPenSize","opt_icon","styleGeometryFunction","styleCircleGeometryFunction","styleBoxGeometryFunction","multiPointGeometryFunction","boxGeometryFunction","circleGeometryFunction","opt_geometry","ellipseGeometryFunction","radiusY","ellipseCoords","vectorLength","arrowGeometryFunction","lenth","normDirection","inv","normalizeVector","crossProduct","bodyWidth","bodyLength","spearheadWidth","showDrawingControls","annotationType","drawingControlsContainer","endDrawingButton","removeLastButton","continueDrawingButton","cancelDrawingButton","counterButton","changeFeatureKey","finishDrawing","drawing","draw","removeLastPoint","startDrawing","lastAnnotationStyle","penWidth","iconRelativePath","iconPath","compoundFreehandList","deleteAnnotation","mergeSelection","showEditingControls","editType","editingControlsContainer","endEditingButton","cancelEditingButton","saveEditingButton","brushSizeIncreaseEditingButton","brushSizeDecreaseEditingButton","brushTypeCircleEditingButton","brushTypeSquareEditingButton","saveMagicWandAnnotation","brushStep","maxPoints","minPoints","finishCondition","stopDrawingOnMouseUp","selectionAdded","hoverInteraction","selectInteraction","tmpStl","snapInteraction","updateExisting","drawingType","getAnnotationLabelsVisible","featureChangeKey","shouldRejectDrawing","evtArgs","temporary","pixelCoord","getEnabled","stl","geomClone","geometryWkt","DrawingType","updateCurrentInteraction","drawClick","tp","prompt","getSelection","jsColorPicker","createControls","jscolor","valueElement","closable","closeText","change","newcol","saveAnnotations","createSelectInteraction","sqrt2","defaultStyleFn","oStyle","oFill","side","saveAnnotationsNew","edited","toAdd","toEdit","toDelete","deletedAnnotations","annotationIds","saveAddedAnnotations","addAnnotation","saveEditedAnnotations","updateAnnotation","saveDeletedAnnotations","entity","checkPMACore2","isPMACore2","Annotations","setEnabled","annotationsSource","annotation","accept","mustRemove","clearHighlight","clearSelection","feats","tmpSelection","sqDistanceFirst","sqDistanceLast","sqDistanceFirstFirst","sqDistanceLastFirst","minIndex","minItem","reversed","resultGeometry","featuresArray","gJson","inputPolygonFeature","polygonFeatureToDifferentiate","annotationId1","annotationId2","inputFeaturesArray","featuresArrayToDifferentiate","outputFeaturesArray","polygonFeatureToDifferentiateJson","editedFeature","transformInteraction","modifyInteraction","saveTransformedAnnotations","magicWandInteraction","MagicWandInteraction","eraser","brush","editing","enterModifyMode","enterTransformMode","enterMagicWandMode","enterBrushMode","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","DrawEventType","DrawEvent","shouldHandle_","downPx_","downTimeout_","lastDragTime_","pointerType_","freehand_","snapTolerance_","snapTolerance","getMode","stopClick_","stopClick","minPoints_","maxPoints_","finishCondition_","Constructor_1","mode_1","squaredLength","dragVertexDelay_","dragVertexDelay","finishCoordinate_","sketchFeature_","sketchPoint_","sketchCoords_","sketchLine_","sketchLineCoords_","squaredClickTolerance_","clickTolerance","overlay_","freehandCondition_","freehand","getOverlay","addToDrawing_","startDrawing_","startingToDraw","atFinish_","abortDrawing","downPx","clickPx","modifyDrawing_","createOrUpdateSketchPoint_","potentiallyDone","potentiallyFinishCoordinates","sketchCoords","finishCoordinate","finishPixel","updateSketchFeatures_","createOrUpdateCustomSketchLine_","sketchLineGeom","sketchFeature","abortDrawing_","appendCoordinates","newDrawing","ending","sketchFeatures","overlaySource","tempExtent","tempSegment","ModifyEventType","ModifyEvent","boundHandleFeatureChange_","defaultDeleteCondition_","deleteCondition_","deleteCondition","insertVertexCondition_","insertVertexCondition","vertexSegments_","lastPixel_","ignoreNextSingleClick_","featuresBeingModified_","rBush_","changingFeature_","dragSegments_","SEGMENT_WRITERS_","writePointGeometry_","writeLineStringGeometry_","writePolygonGeometry_","writeMultiPointGeometry_","writeMultiLineStringGeometry_","writeMultiPolygonGeometry_","writeCircleGeometry_","writeGeometryCollectionGeometry_","hitDetection_","handleSourceAdd_","handleSourceRemove_","addFeature_","handleFeatureAdd_","handleFeatureRemove_","lastPointerEvent_","snapToPointer_","snapToPointer","handlePointerAtPixel_","willModifyFeatures_","ss","removeFeature_","removeFeatureSegmentData_","rBush","nodesToRemove","nodeToRemove","segmentData","centerSegmentData","circumferenceSegmentData","featureSegments","createOrUpdateVertexFeature_","removePoint","dragSegment","setGeometryCoordinates_","insertVertices","vertexExtent","segmentDataMatches","componentSegments","compareIndexes","segmentDataMatch","closestVertex","closestOnSegmentData","insertVertex_","opt_coordinate","nodes","hitPointGeometry","projectedDistanceToSegmentDataSquared","vertexSegments","geometryUid","rTree","updateSegmentIndices_","newSegmentData","newSegmentData2","removeVertex_","component","newIndex","dragSegments","segmentsByFeature","pointCoordinates","distanceToCenterSquared","distanceToCircumference","SelectEventType","SelectEvent","deselected","originalFeatureStyles","Select","boundAddFeature_","boundRemoveFeature_","addCondition_","removeCondition_","removeCondition","toggleCondition_","toggleCondition","multi_","multi","featureLayerAssociation_","addFeatureLayerAssociation_","restorePreviousStyle_","applySelectedStyle_","removeFeatureLayerAssociation_","getFeatureFromEvent","Snap","vertex_","edge_","featuresListenerKeys_","featureChangeListenerKeys_","indexedFeaturesExtents_","pendingFeatures_","opt_listen","feature_uid","segmentWriter","forEachFeatureAdd_","forEachFeatureRemove_","getFeatures_","snapped","updateFeature_","featuresToUpdate","opt_unlisten","unregister","nodesToRemove_1","currentMap","lowerLeft","upperRight","closestSegmentData","projectedCoordinate","isCircle","GeometryConstructor","TokenType","WKTGeometryType","Lexer","wkt","index_","isAlpha_","isNumeric_","opt_decimal","isWhiteSpace_","nextChar_","nextToken","readNumber_","readText_","scientificNotation","lexer_","token_","layout_","consume_","isTokenType","isMatch","parseGeometry_","parseGeometryLayout_","dimToken","dimInfo","parseGeometryCollectionText_","formatErrorMessage_","parsePointText_","parsePoint_","parseLineStringText_","parsePointList_","parsePolygonText_","parseLineStringTextList_","parseMultiPointText_","parsePointTextList_","parseMultiLineStringText_","parseMultiPolygonText_","parsePolygonTextList_","isEmptyGeometry_","splitCollection_","splitCollection","parse_","encodePointGeometry","encodeLineStringGeometry","encodePolygonGeometry","GeometryEncoder","components","geoms","enc","geometryEncoder","encodeGeometryLayout","$dragImage","$extraHelper","isMac","platform","classDropOver","nodeMimeType","$dropMarker","SOURCE_NODE","SOURCE_NODE_LIST","$sourceList","DRAG_ENTER_RESPONSE","SUGGESTED_DROP_EFFECT","REQUESTED_DROP_EFFECT","REQUESTED_EFFECT_ALLOWED","LAST_HIT_MODE","DRAG_OVER_STAMP","_clearGlobals","classDragSource","offsetString","prepareDropEffectCallback","effectAllowed","dropEffectDefault","dropEffectSuggested","effectDefault","evalEffectModifiers","isMove","applyDropEffectCallback","allowDrop","handleDragOver","spOfs","dndOpts","sp","scrollSensitivity","speed","scrollSpeed","scrolled","scrollHeight","markerOffsetX","nodeOfs","relPosY","hitMode","sourceNode","markerAt","$targetTitle","after","over","preventVoidMoves","dragOver","dropMarkerOffsetX","dropMarkerInsertOffsetX","of","onDragEvent","useDefaultImage","isCancelled","multiSource","setTextTypeJson","setDragImage","dragDrag","onDropEvent","isSourceFtNode","otherNodeList","otherNodeData","classDropAccept","preventNonNodes","preventForeignNodes","preventSameParent","preventRecursion","preventLazyParents","normalizeDragEnterResponse","dragEnter","autoExpandMS","dragExpand","dragLeave","orgSourceElem","orgSourceTree","dragDrop","getDragNodeList","getDragNode","dropMarkerParent","$temp","glyph","dragStop","preventRecursiveMoves","draggable","prependTo","_addClass","dropMarker","asyncGeneratorStep","gen","_throw","getLink","normalizeName","Pbf","ieee754","ArrayBuffer","isView","Varint","Fixed64","Bytes","Fixed32","utf8TextDecoder","readPackedEnd","toNum","isSigned","makeRoomForExtraLength","startPos","extraLen","realloc","writePackedVarint","writeVarint","writePackedSVarint","writeSVarint","writePackedFloat","writeFloat","writePackedDouble","writeDouble","writePackedBoolean","writeBoolean","writePackedFixed32","writeFixed32","writePackedSFixed32","writeSFixed32","writePackedFixed64","writeFixed64","writePackedSFixed64","writeSFixed64","readUInt32","writeInt32","readInt32","readField","skip","readMessage","readFixed32","readSFixed32","readFixed64","readSFixed64","readVarintRemainder","readUtf8TextDecoder","b3","b0","bytesPerSequence","readUtf8","readBytes","readPackedVarint","readPackedSVarint","readPackedBoolean","readPackedFloat","readPackedDouble","readPackedFixed32","readPackedSFixed32","readPackedFixed64","readPackedSFixed64","writeTag","writeBigVarintLow","lsb","writeBigVarintHigh","writeBigVarint","writeString","lead","writeUtf8","writeBytes","writeRawMessage","writeMessage","writeBytesField","writeFixed32Field","writeSFixed32Field","writeFixed64Field","writeSFixed64Field","writeVarintField","writeSVarintField","writeStringField","writeFloatField","writeDoubleField","writeBooleanField","isStrict","removeElement","isSet","isNumeric","addClassFor","limit","countDecimals","numStr","pieces","getPageOffset","supportPageOffset","isCSS1Compat","compatMode","scrollLeft","subRangeRatio","pa","pb","fromPercentage","startRange","getJ","toStepping","xVal","xPct","va","vb","toPercentage","getStep","handleEntryPoint","xHighestCompleteStep","handleStepPoint","totalSteps","xNumSteps","highestStep","Spectrum","singleStep","ordered","getAbsoluteDistance","start_factor","xPct_index","rest_factor","rest_rel_distance","range_pct","rel_range_distance","abs_distance_counter","range_counter","fromStepping","isPercentage","getDefaultStep","isDown","getNearbySteps","stepBefore","startValue","thisStep","stepAfter","countStepDecimals","stepDecimals","convert","defaultFormatter","handleLower","handleUpper","touchArea","connects","ltr","textDirectionLtr","textDirectionRtl","tap","pips","pipsHorizontal","pipsVertical","marker","markerHorizontal","markerVertical","markerNormal","markerLarge","markerSub","valueHorizontal","valueVertical","valueNormal","valueLarge","valueSub","validateFormat","isValidFormatter","testStep","testKeyboardPageMultiplier","keyboardPageMultiplier","testKeyboardDefaultStep","keyboardDefaultStep","testRange","spectrum","testStart","handles","testSnap","testAnimate","testAnimationDuration","animationDuration","testConnect","testOrientation","ort","testMargin","testLimit","testPadding","totalPadding","firstValue","testDirection","testBehaviour","fixed","hover","unconstrained","testTooltips","formatter","testAriaFormat","ariaFormat","testFormat","testKeyboardSupport","testDocumentElement","testCssPrefix","cssPrefix","testCssClasses","testOptions","tests","behaviour","msPrefix","noPrefix","transformRule","originalOptions","scope_Base","scope_Handles","scope_Connects","scope_Pips","scope_Tooltips","scope_Self","addTarget","actions","pointerEnabled","msPointerEnabled","supportsPassive","CSS","getSupportsPassive","scope_Target","scope_Spectrum","scope_Values","scope_Locations","scope_HandleNumbers","scope_ActiveHandlesCount","scope_Events","scope_Document","scope_DocumentElement","scope_Body","scope_DirOffset","addNodeTo","addOrigin","handleNumber","isSliderDisabled","isHandleDisabled","horizontalKeys","verticalKeys","largeStepKeys","edgeKeys","isLargeDown","isLargeUp","isUp","isMin","isMax","getNextStepsForHandle","setHandle","eventKeydown","addConnect","addTooltip","removeTooltips","removeEvent","bindEvent","unencoded","formattedValue","addMarking","spread","filterFunc","valueSizeClasses","markerSizeClasses","valueOrientationClasses","markerOrientationClasses","getClasses","sizeClasses","addSpread","removePips","density","stepped","getGroup","firstInRange","lastInRange","ignoreFirst","ignoreLast","prevPct","newPct","pctDifference","pctPos","realSteps","stepSize","isSteps","generateSpread","baseSize","rect","alt","pageOffset","eventTarget","touch","mouse","isTouchOnTarget","checkTouch","shadowRoot","targetTouches","touches","targetTouch","fixEvent","doNotReject","calcPoint","methods","calcPointToPercentage","docElem","proposal","clientTop","clientLeft","documentLeave","relatedTarget","eventEnd","eventMove","appVersion","buttonsProperty","movement","startCalcPoint","moveHandles","locations","handleNumbers","setZindex","eventStart","moveEvent","endEvent","outEvent","eventTap","clickedPosition","smallestDifference","handlePosition","differenceWithThisHandle","getClosestHandle","eventHover","targetEvent","namespacedEvent","tEvent","tNamespace","checkHandlePosition","reference","lookBackward","lookForward","inRuleOrder","upward","proposals","transformDirection","translateRule","updateConnect","updateHandlePosition","connectWidth","scaleRule","resolveToValue","valueSet","fireSetEvent","isInit","valueGet","nearbySteps","increment","decrement","connectOptions","connectBase","addElements","handleBefore","handleAfter","eventHolders","eventHolder","positions","__moveHandles","updateOptions","optionsToUpdate","updateAble","getTooltips","getOrigins","__spectrum","api","MouseEvent","createEvent","initMouseEvent","HTMLAnchorElement","webkitURL","revokeObjectURL","msSaveOrOpenBlob","autoBom","safari","onloadend","BoxShadow","getSupportedProp","elm","jsc","attachDOMReadyEvent","onDocumentMouseDown","onDocumentTouchStart","onWindowResize","lookupClass","installByClassName","tryInstallOnElements","elms","matchClass","isColorAttrSupported","targetElm","optsStr","dataOptions","getDataAttr","eParseError","isCanvasSupported","fetchElement","isElementType","attrValue","evnt","detachEvent","_attachedGroupEvents","attachGroupEvent","groupName","detachGroupEvents","fired","fireOnce","callee","doScroll","tryScroll","captureTarget","setCapture","_capturedTarget","releaseTarget","releaseCapture","initEvent","createEventObject","classNameToList","setClass","unsetClass","repl","currentStyle","borderRadius","boxShadow","alphaOpacity","setBorderRadius","setBoxShadow","getElementPos","relativeToViewport","viewPos","getViewPos","getElementSize","getAbsPointerPos","getRelPointerPos","targetRect","srcElement","getViewSize","innerWidth","redrawPosition","picker","owner","vp","thisObj","ts","vs","getPickerOuterDims","smartPosition","pp","positionValue","contractShadow","_drawPosition","vShadow","shadowBlur","boxS","shadow","shadowColor","getPickerDims","displaySlider","getSliderComponent","insetWidth","getPadToSliderPadding","sliderSize","buttonHeight","dims","borderWidth","pointerBorderWidth","pointerThickness","getPadYComponent","_jscLinkedInstance","showOnClick","_jscControlName","onControlPointerStart","onParentScroll","_pointerMoveEvent","_pointerEndEvent","_pointerOrigin","controlName","_jscInstance","registerDragEvents","onDocumentPointerMove","onDocumentPointerEnd","frameElement","ofs","hsv","fromHSV","setPad","setSld","dispatchFineChange","dispatchChange","onFineChange","ofsX","ofsY","pointerAbs","yVal","leaveSld","leavePad","_vmlNS","_vmlCSS","_vmlReady","initVML","namespaces","tags","createStyleSheet","owningElement","addRule","createPalette","paletteObj","drawFunc","hGrad","vGrad","vmlContainer","hRect","stroked","vRect","color2","createSliderGradient","sliderObj","color1","grad","leaveValue","leaveStyle","hShadow","inset","vals","opt","styleElement","refine","activeClass","minS","maxS","minV","maxV","crossSize","buttonColor","borderColor","insetColor","pointerColor","pointerBorderColor","HSV_RGB","drawPicker","THIS","_processParentElementsInDOM","boxB","pad","padB","padM","padPal","cross","crossBY","crossBX","crossLY","crossLX","sld","sldB","sldM","sldGrad","sldPtrS","sldPtrIB","sldPtrMB","sldPtrOB","btnT","insetColors","outsetColor","crossOuterSize","padToSliderPadding","sliderPtrSpace","eOldIE","onmousedown","redrawPad","redrawSld","yComponent","rgb1","rgb2","sldComponent","isPickerOwner","importColor","backgroundImage","_jscOrigStyle","exportColor","flags","isLight","fromRGB","RGB_HSV","mR","mG","mB","toHEXString","toRGBString","_linkedElementsProcessed","currStyle","_jscEventsAttached","onclick","origCallback","updateField","inputElms","buttonElms","arrayLikeToArray","iter","minLen","runtime","Op","hasOwn","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","define","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","_invoke","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","NativeIteratorPrototype","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","invoke","__await","unwrapped","resultName","nextLoc","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","iterable","iteratorMethod","isGeneratorFunction","genFun","mark","awrap","skipTempReset","rootRecord","rval","exception","caught","hasCatch","hasFinally","finallyEntry","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","base64","kMaxLength","TYPED_ARRAY_SUPPORT","encodingOrOffset","allocUnsafe","byteOffset","fromArrayLike","isEncoding","isBuffer","fromObject","assertSize","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","bidirectionalIndexOf","arrayIndexOf","indexSize","arrLength","valLength","readUInt16BE","foundIndex","hexWrite","remaining","strLen","utf8Write","blitBuffer","asciiWrite","byteArray","asciiToBytes","latin1Write","base64Write","ucs2Write","utf16leToBytes","fromByteArray","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoints","decodeCodePointsArray","SlowBuffer","alloc","INSPECT_MAX_BYTES","foo","typedArraySupport","poolSize","_augment","species","allocUnsafeSlow","_isBuffer","list","swap16","swap32","swap64","inspect","thisStart","thisEnd","thisCopy","targetCopy","_arr","toHex","checkOffset","checkInt","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","noAssert","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","INVALID_BASE64_RE","leadSurrogate","toByteArray","stringtrim","base64clean","dst","b64","lens","getLens","validLen","placeHoldersLen","Arr","_byteLength","curByte","revLookup","uint8","extraBytes","encodeChunk","_setPrototypeOf","orig","uuid","widgetUuid","widgetSlice","cleanData","elems","triggerHandler","existingConstructor","basePrototype","proxiedPrototype","fullName","_createWidget","_proto","_childConstructors","__super","__superApply","widgetEventPrefix","widgetName","widgetFullName","childPrototype","bridge","inputIndex","isMethodCall","methodValue","pushStack","defaultElement","eventNamespace","hoverable","focusable","classesElementLookup","_on","defaultView","parentWindow","_getCreateOptions","_setOptionDisabled","_getCreateEventData","_removeClass","removeData","curOption","_setOptions","_setOptionClasses","classKey","currentElements","_classes","_toggleClass","full","processClassString","checkOption","_untrackClassesElement","suppressDisabledCheck","handlers","delegateElement","handlerProxy","guid","selector","_off","_delay","_hoverable","mouseenter","currentTarget","mouseleave","_focusable","focusin","focusout","trigger","isDefaultPrevented","defaultEffect","hasOptions","effectName","cachedScrollbarWidth","rhorizontal","rvertical","roffset","rposition","rpercent","_position","getOffsets","parseCss","raw","isWindow","scrollbarWidth","innerDiv","getScrollInfo","overflowX","hasOverflowX","scrollWidth","getWithinInfo","withinElement","atOffset","targetOffset","basePosition","scrollInfo","collision","horizontalOffset","verticalOffset","collisionPosition","using","elemWidth","elemHeight","collisionWidth","collisionHeight","myOffset","feedback","important","newOverRight","withinOffset","collisionPosLeft","overLeft","overRight","newOverBottom","collisionPosTop","overTop","overBottom","newOverLeft","newOverTop","flipfit","COMMA","ENTER","ESCAPE","PAGE_DOWN","PAGE_UP","PERIOD","SPACE","TAB","excludeStaticParent","overflowRegex","removeUniqueId","CustomLogin","authenticateCb","elMatches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","queryChildren","rail","consuming","clicking","scrolling","scrollingClassTimeout","addScrollingClass","removeScrollingClass","isAlive","settings","scrollingThreshold","EventElement","prototypeAccessors","unbind","this$1","unbindAll","EventManager","eventElements","CustomEvent","initCustomEvent","processScrollDiff","axis","useScrollingClass","forceFireReachEvent","fields","contentHeight","down","reach","setScrollingClassInstantly","processScrollDiff$1","toInt","eventElement","onceHandler","env","isWebKit","supportsTouch","maxTouchPoints","DocumentTouch","supportsIePointer","msMaxTouchPoints","isChrome","updateGeometry","roundedScrollTop","contentWidth","scrollbarXRail","scrollbarYRail","suppressScrollX","scrollXMarginOffset","scrollbarXActive","railXWidth","railXMarginWidth","railXRatio","scrollbarXWidth","getThumbSize","scrollbarXLeft","negativeScrollAdjustment","suppressScrollY","scrollYMarginOffset","scrollbarYActive","railYHeight","railYMarginHeight","railYRatio","scrollbarYHeight","scrollbarYTop","xRailOffset","isRtl","isScrollbarXUsingBottom","scrollbarXBottom","scrollbarXTop","yRailOffset","isScrollbarYUsingRight","scrollbarYRight","scrollbarYOuterWidth","scrollbarYLeft","scrollbarX","railBorderXWidth","scrollbarY","railBorderYWidth","updateCss","thumbSize","minScrollbarLength","maxScrollbarLength","bindMouseScrollHandler","startingScrollTop","startingMousePageY","scrollBy","mouseMoveHandler","mouseUpHandler","bindMoves","touchMode","contentDocument","wheelPropagation","shouldPreventDefault","wheel","mousewheelHandler","wheelDeltaX","wheelDeltaY","wheelDelta","getDeltaFromEvent","maxScrollTop","maxScrollLeft","shouldBeConsumedByChild","shouldPrevent","useBothWheelAxes","wheelSpeed","isTop","isBottom","isLeft","isRight","onwheel","onmousewheel","easingLoop","touchStart","touchMove","touchEnd","PointerEvent","MSPointerEvent","applyTouchMove","differenceX","differenceY","getTouch","shouldHandle","MSPOINTER_TYPE_MOUSE","currentOffset","currentTime","timeGap","magnitudeX","magnitudeY","scrollY","swipeEasing","isInitialized","PerfectScrollbar","userSettings","originalScrollLeft","isNegativeScroll","railXStyle","borderLeftWidth","borderRightWidth","railYStyle","paddingLeft","paddingRight","borderTopWidth","borderBottomWidth","handlerName","lastScrollTop","lastScrollLeft","onScroll","removePsClasses","loadVisibleX","elLeft","elRight","loadVisibleY","elTop","elBottom","rot","thumbnailWidth","thumbnailHeight","factorWidth","factorHeight","barcodeImage","imageClick","fromUserInteraction","alreadySelected","userInteraction","multiSelect","printMessage","renderImages","showBarcodeNormal","showBarcodeOnly","imagesObj","hasBarcode","imagesInfo","continueRenderImages","loadingImgMarginX","loadingImgMarginY","aStyle","listStyle","liStyle","tw","th","extrastyle","extradata","thumbUrl","rInt","barcodeUrl","barcodeRotation","showFileName","filenameCallback","additionalHtmlCallback","dragstart","horUl","horWidth","Ps","swipePropagation","lazyLoadTimeOut","loadSlides","lastLoadedImages","ondragover","ondrop","imageArray","Gallery","showBarcode","directory","getSessionFunc","gallery","highlight","arrayContains","Forms","field","cssClass","strVal","FormValue","FieldType","CheckBox","FormList","FormListValues","IsOtherValue","IsBelowDetectableLimit","Paragraph","chkValues","Percentage","HyperLink","Tooltip","NewWindow","Label","loadFormData","dataFilter","FormData","getForm","form","ReadOnly","readOnly","originalData","renderForm","ClientID","submitForm","hasChangesProperty","getCheckboxesValue","createPostData","FormFields","otherElVal","getFieldId","below","other","DateTime","Integer","Double","AllowBelowDetectableLimit","ListBox","AllowOther","RadioButton","FieldId","FieldID","FormID","fieldValues","validateForm","postData","errorMsg","clearValidationErrors","validationSpan","Required","numVal","LowerBound","UpperBound","bindClearFieldValueWhenBelowCheckedEvent","bindUncheckBelowEvent","bindClearFieldValueWhenOtherChangedEvent","bindClearOtherWhenValueSelectedEvent","bindFormElementEvents","submit","saveForm","fieldIndex","getDataRecord","dataSet","FieldValues","renderField","fieldCb","fieldGroupClass","ExtraStyle","fieldContainerClass","requiredStr","inputClassStr","inputClass","fieldClass","renderReadOnlyField","ValueID","strValues","Interval","minv","maxv","fieldValidationClass","additionalHtml","formClass","FormName","editButton","Instructions","DisplayOrder","validationClass","btnContainerClass","btnSaveClass","btnResetClass","Login","nodeTypes","loadServerNode","forms","formNode","showAllFields","formListValues","getFormDefinitions","distinctValues","Operator","slides","slide","MetadataTree","MetadataSearch","currentFocus","initializeTextBox","retries","queryString","searchToken","initServer","getFormSuggestions","getSuggestions","processedQuery","searchTerms","isExpressionValid","findForm","findField","listLabelToID","searchTermsJson","lastSearchTerms","searchWithDelay","tokenTypeEnum","inputBox","readonly","loadForms","slideSearchExpressions","searchFilesOnly","metaSearchQuery","searchPaths","pathResults","headers","metaResults","canRead","skipWhitespace","parseToken","quoted","getLastToken","lastExpr","suggestions","readChar","peekChar","isTokenComplete","trimmed","trimRight","getFieldSuggestions","getOperatorSuggestions","getValueSuggestions","localeCompare","formObj","getOperators","fieldObject","valuesToListLabels","char","isOperatorChar","isTokenChar","tokenChars","isQuoted","parseOperator","tokenString","tokenType","autocomplete","inputInput","inputKeyDown","closeAllLists","showSuggestions","io","lastToken","itemSelected","itemValue","curActive","getElementsByClassName","SyncView","slideLoaders","eventsKeys","posSync","overridePosition","disableSync","slideLoader","parameter","viewChanged","ViewEvents","ek","unlisten","flipState","sl","flipStateI","ViewerEvents","Types","AnnotationTypes","ComponentEvents","OpenL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,IACdy6H,YAAaA,GAEjBuZ,WAAY,CACR/uT,WAAY,CACRO,QAASA,MAEb/lB,QAASA,KACTw0U,KAAM,CACFlxV,MAAOA,KACPO,QAASA,MAEbumB,MAAO,CACHA,MAAOA,KACP/mB,KAAMA,KACNu2B,KAAMA,KACNF,KAAMA,KACNC,OAAQA,MAEZ6b,OAAQ,CACJrc,OAAQgX,MAEZ6P,MAAO,CACH7mB,OAAQ0W","file":"pma.ui.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 260);\n","/**\n * @module ol/extent\n */\nimport Corner from './extent/Corner.js';\nimport Relationship from './extent/Relationship.js';\nimport { assert } from './asserts.js';\n/**\n * An array of numbers representing an extent: `[minx, miny, maxx, maxy]`.\n * @typedef {Array<number>} Extent\n * @api\n */\n/**\n * Build an extent that includes all given coordinates.\n *\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @return {Extent} Bounding extent.\n * @api\n */\nexport function boundingExtent(coordinates) {\n    var extent = createEmpty();\n    for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n        extendCoordinate(extent, coordinates[i]);\n    }\n    return extent;\n}\n/**\n * @param {Array<number>} xs Xs.\n * @param {Array<number>} ys Ys.\n * @param {Extent} [opt_extent] Destination extent.\n * @private\n * @return {Extent} Extent.\n */\nfunction _boundingExtentXYs(xs, ys, opt_extent) {\n    var minX = Math.min.apply(null, xs);\n    var minY = Math.min.apply(null, ys);\n    var maxX = Math.max.apply(null, xs);\n    var maxY = Math.max.apply(null, ys);\n    return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n}\n/**\n * Return extent increased by the provided value.\n * @param {Extent} extent Extent.\n * @param {number} value The amount by which the extent should be buffered.\n * @param {Extent} [opt_extent] Extent.\n * @return {Extent} Extent.\n * @api\n */\nexport function buffer(extent, value, opt_extent) {\n    if (opt_extent) {\n        opt_extent[0] = extent[0] - value;\n        opt_extent[1] = extent[1] - value;\n        opt_extent[2] = extent[2] + value;\n        opt_extent[3] = extent[3] + value;\n        return opt_extent;\n    }\n    else {\n        return [\n            extent[0] - value,\n            extent[1] - value,\n            extent[2] + value,\n            extent[3] + value,\n        ];\n    }\n}\n/**\n * Creates a clone of an extent.\n *\n * @param {Extent} extent Extent to clone.\n * @param {Extent} [opt_extent] Extent.\n * @return {Extent} The clone.\n */\nexport function clone(extent, opt_extent) {\n    if (opt_extent) {\n        opt_extent[0] = extent[0];\n        opt_extent[1] = extent[1];\n        opt_extent[2] = extent[2];\n        opt_extent[3] = extent[3];\n        return opt_extent;\n    }\n    else {\n        return extent.slice();\n    }\n}\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {number} Closest squared distance.\n */\nexport function closestSquaredDistanceXY(extent, x, y) {\n    var dx, dy;\n    if (x < extent[0]) {\n        dx = extent[0] - x;\n    }\n    else if (extent[2] < x) {\n        dx = x - extent[2];\n    }\n    else {\n        dx = 0;\n    }\n    if (y < extent[1]) {\n        dy = extent[1] - y;\n    }\n    else if (extent[3] < y) {\n        dy = y - extent[3];\n    }\n    else {\n        dy = 0;\n    }\n    return dx * dx + dy * dy;\n}\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} The coordinate is contained in the extent.\n * @api\n */\nexport function containsCoordinate(extent, coordinate) {\n    return containsXY(extent, coordinate[0], coordinate[1]);\n}\n/**\n * Check if one extent contains another.\n *\n * An extent is deemed contained if it lies completely within the other extent,\n * including if they share one or more edges.\n *\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The second extent is contained by or on the edge of the\n *     first.\n * @api\n */\nexport function containsExtent(extent1, extent2) {\n    return (extent1[0] <= extent2[0] &&\n        extent2[2] <= extent1[2] &&\n        extent1[1] <= extent2[1] &&\n        extent2[3] <= extent1[3]);\n}\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @param {number} x X coordinate.\n * @param {number} y Y coordinate.\n * @return {boolean} The x, y values are contained in the extent.\n * @api\n */\nexport function containsXY(extent, x, y) {\n    return extent[0] <= x && x <= extent[2] && extent[1] <= y && y <= extent[3];\n}\n/**\n * Get the relationship between a coordinate and extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate The coordinate.\n * @return {import(\"./extent/Relationship.js\").default} The relationship (bitwise compare with\n *     import(\"./extent/Relationship.js\").Relationship).\n */\nexport function coordinateRelationship(extent, coordinate) {\n    var minX = extent[0];\n    var minY = extent[1];\n    var maxX = extent[2];\n    var maxY = extent[3];\n    var x = coordinate[0];\n    var y = coordinate[1];\n    var relationship = Relationship.UNKNOWN;\n    if (x < minX) {\n        relationship = relationship | Relationship.LEFT;\n    }\n    else if (x > maxX) {\n        relationship = relationship | Relationship.RIGHT;\n    }\n    if (y < minY) {\n        relationship = relationship | Relationship.BELOW;\n    }\n    else if (y > maxY) {\n        relationship = relationship | Relationship.ABOVE;\n    }\n    if (relationship === Relationship.UNKNOWN) {\n        relationship = Relationship.INTERSECTING;\n    }\n    return relationship;\n}\n/**\n * Create an empty extent.\n * @return {Extent} Empty extent.\n * @api\n */\nexport function createEmpty() {\n    return [Infinity, Infinity, -Infinity, -Infinity];\n}\n/**\n * Create a new extent or update the provided extent.\n * @param {number} minX Minimum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxX Maximum X.\n * @param {number} maxY Maximum Y.\n * @param {Extent} [opt_extent] Destination extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdate(minX, minY, maxX, maxY, opt_extent) {\n    if (opt_extent) {\n        opt_extent[0] = minX;\n        opt_extent[1] = minY;\n        opt_extent[2] = maxX;\n        opt_extent[3] = maxY;\n        return opt_extent;\n    }\n    else {\n        return [minX, minY, maxX, maxY];\n    }\n}\n/**\n * Create a new empty extent or make the provided one empty.\n * @param {Extent} [opt_extent] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateEmpty(opt_extent) {\n    return createOrUpdate(Infinity, Infinity, -Infinity, -Infinity, opt_extent);\n}\n/**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {Extent} [opt_extent] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordinate(coordinate, opt_extent) {\n    var x = coordinate[0];\n    var y = coordinate[1];\n    return createOrUpdate(x, y, x, y, opt_extent);\n}\n/**\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {Extent} [opt_extent] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordinates(coordinates, opt_extent) {\n    var extent = createOrUpdateEmpty(opt_extent);\n    return extendCoordinates(extent, coordinates);\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Extent} [opt_extent] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromFlatCoordinates(flatCoordinates, offset, end, stride, opt_extent) {\n    var extent = createOrUpdateEmpty(opt_extent);\n    return extendFlatCoordinates(extent, flatCoordinates, offset, end, stride);\n}\n/**\n * @param {Array<Array<import(\"./coordinate.js\").Coordinate>>} rings Rings.\n * @param {Extent} [opt_extent] Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromRings(rings, opt_extent) {\n    var extent = createOrUpdateEmpty(opt_extent);\n    return extendRings(extent, rings);\n}\n/**\n * Determine if two extents are equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The two extents are equivalent.\n * @api\n */\nexport function equals(extent1, extent2) {\n    return (extent1[0] == extent2[0] &&\n        extent1[2] == extent2[2] &&\n        extent1[1] == extent2[1] &&\n        extent1[3] == extent2[3]);\n}\n/**\n * Determine if two extents are approximately equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {number} tolerance Tolerance in extent coordinate units.\n * @return {boolean} The two extents differ by less than the tolerance.\n */\nexport function approximatelyEquals(extent1, extent2, tolerance) {\n    return (Math.abs(extent1[0] - extent2[0]) < tolerance &&\n        Math.abs(extent1[2] - extent2[2]) < tolerance &&\n        Math.abs(extent1[1] - extent2[1]) < tolerance &&\n        Math.abs(extent1[3] - extent2[3]) < tolerance);\n}\n/**\n * Modify an extent to include another extent.\n * @param {Extent} extent1 The extent to be modified.\n * @param {Extent} extent2 The extent that will be included in the first.\n * @return {Extent} A reference to the first (extended) extent.\n * @api\n */\nexport function extend(extent1, extent2) {\n    if (extent2[0] < extent1[0]) {\n        extent1[0] = extent2[0];\n    }\n    if (extent2[2] > extent1[2]) {\n        extent1[2] = extent2[2];\n    }\n    if (extent2[1] < extent1[1]) {\n        extent1[1] = extent2[1];\n    }\n    if (extent2[3] > extent1[3]) {\n        extent1[3] = extent2[3];\n    }\n    return extent1;\n}\n/**\n * @param {Extent} extent Extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n */\nexport function extendCoordinate(extent, coordinate) {\n    if (coordinate[0] < extent[0]) {\n        extent[0] = coordinate[0];\n    }\n    if (coordinate[0] > extent[2]) {\n        extent[2] = coordinate[0];\n    }\n    if (coordinate[1] < extent[1]) {\n        extent[1] = coordinate[1];\n    }\n    if (coordinate[1] > extent[3]) {\n        extent[3] = coordinate[1];\n    }\n}\n/**\n * @param {Extent} extent Extent.\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @return {Extent} Extent.\n */\nexport function extendCoordinates(extent, coordinates) {\n    for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n        extendCoordinate(extent, coordinates[i]);\n    }\n    return extent;\n}\n/**\n * @param {Extent} extent Extent.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Extent} Extent.\n */\nexport function extendFlatCoordinates(extent, flatCoordinates, offset, end, stride) {\n    for (; offset < end; offset += stride) {\n        extendXY(extent, flatCoordinates[offset], flatCoordinates[offset + 1]);\n    }\n    return extent;\n}\n/**\n * @param {Extent} extent Extent.\n * @param {Array<Array<import(\"./coordinate.js\").Coordinate>>} rings Rings.\n * @return {Extent} Extent.\n */\nexport function extendRings(extent, rings) {\n    for (var i = 0, ii = rings.length; i < ii; ++i) {\n        extendCoordinates(extent, rings[i]);\n    }\n    return extent;\n}\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n */\nexport function extendXY(extent, x, y) {\n    extent[0] = Math.min(extent[0], x);\n    extent[1] = Math.min(extent[1], y);\n    extent[2] = Math.max(extent[2], x);\n    extent[3] = Math.max(extent[3], y);\n}\n/**\n * This function calls `callback` for each corner of the extent. If the\n * callback returns a truthy value the function returns that value\n * immediately. Otherwise the function returns `false`.\n * @param {Extent} extent Extent.\n * @param {function(import(\"./coordinate.js\").Coordinate): S} callback Callback.\n * @return {S|boolean} Value.\n * @template S\n */\nexport function forEachCorner(extent, callback) {\n    var val;\n    val = callback(getBottomLeft(extent));\n    if (val) {\n        return val;\n    }\n    val = callback(getBottomRight(extent));\n    if (val) {\n        return val;\n    }\n    val = callback(getTopRight(extent));\n    if (val) {\n        return val;\n    }\n    val = callback(getTopLeft(extent));\n    if (val) {\n        return val;\n    }\n    return false;\n}\n/**\n * Get the size of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Area.\n * @api\n */\nexport function getArea(extent) {\n    var area = 0;\n    if (!isEmpty(extent)) {\n        area = getWidth(extent) * getHeight(extent);\n    }\n    return area;\n}\n/**\n * Get the bottom left coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Bottom left coordinate.\n * @api\n */\nexport function getBottomLeft(extent) {\n    return [extent[0], extent[1]];\n}\n/**\n * Get the bottom right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Bottom right coordinate.\n * @api\n */\nexport function getBottomRight(extent) {\n    return [extent[2], extent[1]];\n}\n/**\n * Get the center coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Center.\n * @api\n */\nexport function getCenter(extent) {\n    return [(extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2];\n}\n/**\n * Get a corner coordinate of an extent.\n * @param {Extent} extent Extent.\n * @param {import(\"./extent/Corner.js\").default} corner Corner.\n * @return {import(\"./coordinate.js\").Coordinate} Corner coordinate.\n */\nexport function getCorner(extent, corner) {\n    var coordinate;\n    if (corner === Corner.BOTTOM_LEFT) {\n        coordinate = getBottomLeft(extent);\n    }\n    else if (corner === Corner.BOTTOM_RIGHT) {\n        coordinate = getBottomRight(extent);\n    }\n    else if (corner === Corner.TOP_LEFT) {\n        coordinate = getTopLeft(extent);\n    }\n    else if (corner === Corner.TOP_RIGHT) {\n        coordinate = getTopRight(extent);\n    }\n    else {\n        assert(false, 13); // Invalid corner\n    }\n    return coordinate;\n}\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Enlarged area.\n */\nexport function getEnlargedArea(extent1, extent2) {\n    var minX = Math.min(extent1[0], extent2[0]);\n    var minY = Math.min(extent1[1], extent2[1]);\n    var maxX = Math.max(extent1[2], extent2[2]);\n    var maxY = Math.max(extent1[3], extent2[3]);\n    return (maxX - minX) * (maxY - minY);\n}\n/**\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {import(\"./size.js\").Size} size Size.\n * @param {Extent} [opt_extent] Destination extent.\n * @return {Extent} Extent.\n */\nexport function getForViewAndSize(center, resolution, rotation, size, opt_extent) {\n    var dx = (resolution * size[0]) / 2;\n    var dy = (resolution * size[1]) / 2;\n    var cosRotation = Math.cos(rotation);\n    var sinRotation = Math.sin(rotation);\n    var xCos = dx * cosRotation;\n    var xSin = dx * sinRotation;\n    var yCos = dy * cosRotation;\n    var ySin = dy * sinRotation;\n    var x = center[0];\n    var y = center[1];\n    var x0 = x - xCos + ySin;\n    var x1 = x - xCos - ySin;\n    var x2 = x + xCos - ySin;\n    var x3 = x + xCos + ySin;\n    var y0 = y - xSin - yCos;\n    var y1 = y - xSin + yCos;\n    var y2 = y + xSin + yCos;\n    var y3 = y + xSin - yCos;\n    return createOrUpdate(Math.min(x0, x1, x2, x3), Math.min(y0, y1, y2, y3), Math.max(x0, x1, x2, x3), Math.max(y0, y1, y2, y3), opt_extent);\n}\n/**\n * Get the height of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Height.\n * @api\n */\nexport function getHeight(extent) {\n    return extent[3] - extent[1];\n}\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Intersection area.\n */\nexport function getIntersectionArea(extent1, extent2) {\n    var intersection = getIntersection(extent1, extent2);\n    return getArea(intersection);\n}\n/**\n * Get the intersection of two extents.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {Extent} [opt_extent] Optional extent to populate with intersection.\n * @return {Extent} Intersecting extent.\n * @api\n */\nexport function getIntersection(extent1, extent2, opt_extent) {\n    var intersection = opt_extent ? opt_extent : createEmpty();\n    if (intersects(extent1, extent2)) {\n        if (extent1[0] > extent2[0]) {\n            intersection[0] = extent1[0];\n        }\n        else {\n            intersection[0] = extent2[0];\n        }\n        if (extent1[1] > extent2[1]) {\n            intersection[1] = extent1[1];\n        }\n        else {\n            intersection[1] = extent2[1];\n        }\n        if (extent1[2] < extent2[2]) {\n            intersection[2] = extent1[2];\n        }\n        else {\n            intersection[2] = extent2[2];\n        }\n        if (extent1[3] < extent2[3]) {\n            intersection[3] = extent1[3];\n        }\n        else {\n            intersection[3] = extent2[3];\n        }\n    }\n    else {\n        createOrUpdateEmpty(intersection);\n    }\n    return intersection;\n}\n/**\n * @param {Extent} extent Extent.\n * @return {number} Margin.\n */\nexport function getMargin(extent) {\n    return getWidth(extent) + getHeight(extent);\n}\n/**\n * Get the size (width, height) of an extent.\n * @param {Extent} extent The extent.\n * @return {import(\"./size.js\").Size} The extent size.\n * @api\n */\nexport function getSize(extent) {\n    return [extent[2] - extent[0], extent[3] - extent[1]];\n}\n/**\n * Get the top left coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Top left coordinate.\n * @api\n */\nexport function getTopLeft(extent) {\n    return [extent[0], extent[3]];\n}\n/**\n * Get the top right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Top right coordinate.\n * @api\n */\nexport function getTopRight(extent) {\n    return [extent[2], extent[3]];\n}\n/**\n * Get the width of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Width.\n * @api\n */\nexport function getWidth(extent) {\n    return extent[2] - extent[0];\n}\n/**\n * Determine if one extent intersects another.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent.\n * @return {boolean} The two extents intersect.\n * @api\n */\nexport function intersects(extent1, extent2) {\n    return (extent1[0] <= extent2[2] &&\n        extent1[2] >= extent2[0] &&\n        extent1[1] <= extent2[3] &&\n        extent1[3] >= extent2[1]);\n}\n/**\n * Determine if an extent is empty.\n * @param {Extent} extent Extent.\n * @return {boolean} Is empty.\n * @api\n */\nexport function isEmpty(extent) {\n    return extent[2] < extent[0] || extent[3] < extent[1];\n}\n/**\n * @param {Extent} extent Extent.\n * @param {Extent} [opt_extent] Extent.\n * @return {Extent} Extent.\n */\nexport function returnOrUpdate(extent, opt_extent) {\n    if (opt_extent) {\n        opt_extent[0] = extent[0];\n        opt_extent[1] = extent[1];\n        opt_extent[2] = extent[2];\n        opt_extent[3] = extent[3];\n        return opt_extent;\n    }\n    else {\n        return extent;\n    }\n}\n/**\n * @param {Extent} extent Extent.\n * @param {number} value Value.\n */\nexport function scaleFromCenter(extent, value) {\n    var deltaX = ((extent[2] - extent[0]) / 2) * (value - 1);\n    var deltaY = ((extent[3] - extent[1]) / 2) * (value - 1);\n    extent[0] -= deltaX;\n    extent[2] += deltaX;\n    extent[1] -= deltaY;\n    extent[3] += deltaY;\n}\n/**\n * Determine if the segment between two coordinates intersects (crosses,\n * touches, or is contained by) the provided extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} start Segment start coordinate.\n * @param {import(\"./coordinate.js\").Coordinate} end Segment end coordinate.\n * @return {boolean} The segment intersects the extent.\n */\nexport function intersectsSegment(extent, start, end) {\n    var intersects = false;\n    var startRel = coordinateRelationship(extent, start);\n    var endRel = coordinateRelationship(extent, end);\n    if (startRel === Relationship.INTERSECTING ||\n        endRel === Relationship.INTERSECTING) {\n        intersects = true;\n    }\n    else {\n        var minX = extent[0];\n        var minY = extent[1];\n        var maxX = extent[2];\n        var maxY = extent[3];\n        var startX = start[0];\n        var startY = start[1];\n        var endX = end[0];\n        var endY = end[1];\n        var slope = (endY - startY) / (endX - startX);\n        var x = void 0, y = void 0;\n        if (!!(endRel & Relationship.ABOVE) && !(startRel & Relationship.ABOVE)) {\n            // potentially intersects top\n            x = endX - (endY - maxY) / slope;\n            intersects = x >= minX && x <= maxX;\n        }\n        if (!intersects &&\n            !!(endRel & Relationship.RIGHT) &&\n            !(startRel & Relationship.RIGHT)) {\n            // potentially intersects right\n            y = endY - (endX - maxX) * slope;\n            intersects = y >= minY && y <= maxY;\n        }\n        if (!intersects &&\n            !!(endRel & Relationship.BELOW) &&\n            !(startRel & Relationship.BELOW)) {\n            // potentially intersects bottom\n            x = endX - (endY - minY) / slope;\n            intersects = x >= minX && x <= maxX;\n        }\n        if (!intersects &&\n            !!(endRel & Relationship.LEFT) &&\n            !(startRel & Relationship.LEFT)) {\n            // potentially intersects left\n            y = endY - (endX - minX) * slope;\n            intersects = y >= minY && y <= maxY;\n        }\n    }\n    return intersects;\n}\n/**\n * Apply a transform function to the extent.\n * @param {Extent} extent Extent.\n * @param {import(\"./proj.js\").TransformFunction} transformFn Transform function.\n * Called with `[minX, minY, maxX, maxY]` extent coordinates.\n * @param {Extent} [opt_extent] Destination extent.\n * @param {number} [opt_stops] Number of stops per side used for the transform.\n * By default only the corners are used.\n * @return {Extent} Extent.\n * @api\n */\nexport function applyTransform(extent, transformFn, opt_extent, opt_stops) {\n    var coordinates = [];\n    if (opt_stops > 1) {\n        var width = extent[2] - extent[0];\n        var height = extent[3] - extent[1];\n        for (var i = 0; i < opt_stops; ++i) {\n            coordinates.push(extent[0] + (width * i) / opt_stops, extent[1], extent[2], extent[1] + (height * i) / opt_stops, extent[2] - (width * i) / opt_stops, extent[3], extent[0], extent[3] - (height * i) / opt_stops);\n        }\n    }\n    else {\n        coordinates = [\n            extent[0],\n            extent[1],\n            extent[2],\n            extent[1],\n            extent[2],\n            extent[3],\n            extent[0],\n            extent[3],\n        ];\n    }\n    transformFn(coordinates, coordinates, 2);\n    var xs = [];\n    var ys = [];\n    for (var i = 0, l = coordinates.length; i < l; i += 2) {\n        xs.push(coordinates[i]);\n        ys.push(coordinates[i + 1]);\n    }\n    return _boundingExtentXYs(xs, ys, opt_extent);\n}\n/**\n * Modifies the provided extent in-place to be within the real world\n * extent.\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./proj/Projection.js\").default} projection Projection\n * @return {Extent} The extent within the real world extent.\n */\nexport function wrapX(extent, projection) {\n    var projectionExtent = projection.getExtent();\n    var center = getCenter(extent);\n    if (projection.canWrapX() &&\n        (center[0] < projectionExtent[0] || center[0] >= projectionExtent[2])) {\n        var worldWidth = getWidth(projectionExtent);\n        var worldsAway = Math.floor((center[0] - projectionExtent[0]) / worldWidth);\n        var offset = worldsAway * worldWidth;\n        extent[0] -= offset;\n        extent[2] -= offset;\n    }\n    return extent;\n}\n//# sourceMappingURL=extent.js.map","/**\n * @module ol/geom/GeometryType\n */\n/**\n * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,\n * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,\n * `'GeometryCollection'`, `'Circle'`.\n * @enum {string}\n */\nexport default {\n    POINT: 'Point',\n    LINE_STRING: 'LineString',\n    LINEAR_RING: 'LinearRing',\n    POLYGON: 'Polygon',\n    MULTI_POINT: 'MultiPoint',\n    MULTI_LINE_STRING: 'MultiLineString',\n    MULTI_POLYGON: 'MultiPolygon',\n    GEOMETRY_COLLECTION: 'GeometryCollection',\n    CIRCLE: 'Circle',\n};\n//# sourceMappingURL=GeometryType.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/proj/epsg3857\n */\nimport Projection from './Projection.js';\nimport Units from './Units.js';\nimport { cosh } from '../math.js';\n/**\n * Radius of WGS84 sphere\n *\n * @const\n * @type {number}\n */\nexport var RADIUS = 6378137;\n/**\n * @const\n * @type {number}\n */\nexport var HALF_SIZE = Math.PI * RADIUS;\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport var EXTENT = [-HALF_SIZE, -HALF_SIZE, HALF_SIZE, HALF_SIZE];\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport var WORLD_EXTENT = [-180, -85, 180, 85];\n/**\n * Maximum safe value in y direction\n * @const\n * @type {number}\n */\nexport var MAX_SAFE_Y = RADIUS * Math.log(Math.tan(Math.PI / 2));\n/**\n * @classdesc\n * Projection object for web/spherical Mercator (EPSG:3857).\n */\nvar EPSG3857Projection = /** @class */ (function (_super) {\n    __extends(EPSG3857Projection, _super);\n    /**\n     * @param {string} code Code.\n     */\n    function EPSG3857Projection(code) {\n        return _super.call(this, {\n            code: code,\n            units: Units.METERS,\n            extent: EXTENT,\n            global: true,\n            worldExtent: WORLD_EXTENT,\n            getPointResolution: function (resolution, point) {\n                return resolution / cosh(point[1] / RADIUS);\n            },\n        }) || this;\n    }\n    return EPSG3857Projection;\n}(Projection));\n/**\n * Projections equal to EPSG:3857.\n *\n * @const\n * @type {Array<import(\"./Projection.js\").default>}\n */\nexport var PROJECTIONS = [\n    new EPSG3857Projection('EPSG:3857'),\n    new EPSG3857Projection('EPSG:102100'),\n    new EPSG3857Projection('EPSG:102113'),\n    new EPSG3857Projection('EPSG:900913'),\n    new EPSG3857Projection('http://www.opengis.net/gml/srs/epsg.xml#3857'),\n];\n/**\n * Transformation from EPSG:4326 to EPSG:3857.\n *\n * @param {Array<number>} input Input array of coordinate values.\n * @param {Array<number>} [opt_output] Output array of coordinate values.\n * @param {number} [opt_dimension] Dimension (default is `2`).\n * @return {Array<number>} Output array of coordinate values.\n */\nexport function fromEPSG4326(input, opt_output, opt_dimension) {\n    var length = input.length;\n    var dimension = opt_dimension > 1 ? opt_dimension : 2;\n    var output = opt_output;\n    if (output === undefined) {\n        if (dimension > 2) {\n            // preserve values beyond second dimension\n            output = input.slice();\n        }\n        else {\n            output = new Array(length);\n        }\n    }\n    for (var i = 0; i < length; i += dimension) {\n        output[i] = (HALF_SIZE * input[i]) / 180;\n        var y = RADIUS * Math.log(Math.tan((Math.PI * (+input[i + 1] + 90)) / 360));\n        if (y > MAX_SAFE_Y) {\n            y = MAX_SAFE_Y;\n        }\n        else if (y < -MAX_SAFE_Y) {\n            y = -MAX_SAFE_Y;\n        }\n        output[i + 1] = y;\n    }\n    return output;\n}\n/**\n * Transformation from EPSG:3857 to EPSG:4326.\n *\n * @param {Array<number>} input Input array of coordinate values.\n * @param {Array<number>} [opt_output] Output array of coordinate values.\n * @param {number} [opt_dimension] Dimension (default is `2`).\n * @return {Array<number>} Output array of coordinate values.\n */\nexport function toEPSG4326(input, opt_output, opt_dimension) {\n    var length = input.length;\n    var dimension = opt_dimension > 1 ? opt_dimension : 2;\n    var output = opt_output;\n    if (output === undefined) {\n        if (dimension > 2) {\n            // preserve values beyond second dimension\n            output = input.slice();\n        }\n        else {\n            output = new Array(length);\n        }\n    }\n    for (var i = 0; i < length; i += dimension) {\n        output[i] = (180 * input[i]) / HALF_SIZE;\n        output[i + 1] =\n            (360 * Math.atan(Math.exp(input[i + 1] / RADIUS))) / Math.PI - 90;\n    }\n    return output;\n}\n//# sourceMappingURL=epsg3857.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/proj/epsg4326\n */\nimport Projection from './Projection.js';\nimport Units from './Units.js';\n/**\n * Semi-major radius of the WGS84 ellipsoid.\n *\n * @const\n * @type {number}\n */\nexport var RADIUS = 6378137;\n/**\n * Extent of the EPSG:4326 projection which is the whole world.\n *\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport var EXTENT = [-180, -90, 180, 90];\n/**\n * @const\n * @type {number}\n */\nexport var METERS_PER_UNIT = (Math.PI * RADIUS) / 180;\n/**\n * @classdesc\n * Projection object for WGS84 geographic coordinates (EPSG:4326).\n *\n * Note that OpenLayers does not strictly comply with the EPSG definition.\n * The EPSG registry defines 4326 as a CRS for Latitude,Longitude (y,x).\n * OpenLayers treats EPSG:4326 as a pseudo-projection, with x,y coordinates.\n */\nvar EPSG4326Projection = /** @class */ (function (_super) {\n    __extends(EPSG4326Projection, _super);\n    /**\n     * @param {string} code Code.\n     * @param {string} [opt_axisOrientation] Axis orientation.\n     */\n    function EPSG4326Projection(code, opt_axisOrientation) {\n        return _super.call(this, {\n            code: code,\n            units: Units.DEGREES,\n            extent: EXTENT,\n            axisOrientation: opt_axisOrientation,\n            global: true,\n            metersPerUnit: METERS_PER_UNIT,\n            worldExtent: EXTENT,\n        }) || this;\n    }\n    return EPSG4326Projection;\n}(Projection));\n/**\n * Projections equal to EPSG:4326.\n *\n * @const\n * @type {Array<import(\"./Projection.js\").default>}\n */\nexport var PROJECTIONS = [\n    new EPSG4326Projection('CRS:84'),\n    new EPSG4326Projection('EPSG:4326', 'neu'),\n    new EPSG4326Projection('urn:ogc:def:crs:OGC:1.3:CRS84'),\n    new EPSG4326Projection('urn:ogc:def:crs:OGC:2:84'),\n    new EPSG4326Projection('http://www.opengis.net/gml/srs/epsg.xml#4326', 'neu'),\n];\n//# sourceMappingURL=epsg4326.js.map","/**\n * @module ol/proj/projections\n */\n/**\n * @type {Object<string, import(\"./Projection.js\").default>}\n */\nvar cache = {};\n/**\n * Clear the projections cache.\n */\nexport function clear() {\n    cache = {};\n}\n/**\n * Get a cached projection by code.\n * @param {string} code The code for the projection.\n * @return {import(\"./Projection.js\").default} The projection (if cached).\n */\nexport function get(code) {\n    return (cache[code] ||\n        cache[code.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\\w+)$/, 'EPSG:$3')] ||\n        null);\n}\n/**\n * Add a projection to the cache.\n * @param {string} code The projection code.\n * @param {import(\"./Projection.js\").default} projection The projection to cache.\n */\nexport function add(code, projection) {\n    cache[code] = projection;\n}\n//# sourceMappingURL=projections.js.map","/**\n * @module ol/proj/transforms\n */\nimport { isEmpty } from '../obj.js';\n/**\n * @private\n * @type {!Object<string, Object<string, import(\"../proj.js\").TransformFunction>>}\n */\nvar transforms = {};\n/**\n * Clear the transform cache.\n */\nexport function clear() {\n    transforms = {};\n}\n/**\n * Registers a conversion function to convert coordinates from the source\n * projection to the destination projection.\n *\n * @param {import(\"./Projection.js\").default} source Source.\n * @param {import(\"./Projection.js\").default} destination Destination.\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform.\n */\nexport function add(source, destination, transformFn) {\n    var sourceCode = source.getCode();\n    var destinationCode = destination.getCode();\n    if (!(sourceCode in transforms)) {\n        transforms[sourceCode] = {};\n    }\n    transforms[sourceCode][destinationCode] = transformFn;\n}\n/**\n * Unregisters the conversion function to convert coordinates from the source\n * projection to the destination projection.  This method is used to clean up\n * cached transforms during testing.\n *\n * @param {import(\"./Projection.js\").default} source Source projection.\n * @param {import(\"./Projection.js\").default} destination Destination projection.\n * @return {import(\"../proj.js\").TransformFunction} transformFn The unregistered transform.\n */\nexport function remove(source, destination) {\n    var sourceCode = source.getCode();\n    var destinationCode = destination.getCode();\n    var transform = transforms[sourceCode][destinationCode];\n    delete transforms[sourceCode][destinationCode];\n    if (isEmpty(transforms[sourceCode])) {\n        delete transforms[sourceCode];\n    }\n    return transform;\n}\n/**\n * Get a transform given a source code and a destination code.\n * @param {string} sourceCode The code for the source projection.\n * @param {string} destinationCode The code for the destination projection.\n * @return {import(\"../proj.js\").TransformFunction|undefined} The transform function (if found).\n */\nexport function get(sourceCode, destinationCode) {\n    var transform;\n    if (sourceCode in transforms && destinationCode in transforms[sourceCode]) {\n        transform = transforms[sourceCode][destinationCode];\n    }\n    return transform;\n}\n//# sourceMappingURL=transforms.js.map","/**\n * @module ol/proj\n */\n/**\n * The ol/proj module stores:\n * * a list of {@link module:ol/proj/Projection}\n * objects, one for each projection supported by the application\n * * a list of transform functions needed to convert coordinates in one projection\n * into another.\n *\n * The static functions are the methods used to maintain these.\n * Each transform function can handle not only simple coordinate pairs, but also\n * large arrays of coordinates such as vector geometries.\n *\n * When loaded, the library adds projection objects for EPSG:4326 (WGS84\n * geographic coordinates) and EPSG:3857 (Web or Spherical Mercator, as used\n * for example by Bing Maps or OpenStreetMap), together with the relevant\n * transform functions.\n *\n * Additional transforms may be added by using the http://proj4js.org/\n * library (version 2.2 or later). You can use the full build supplied by\n * Proj4js, or create a custom build to support those projections you need; see\n * the Proj4js website for how to do this. You also need the Proj4js definitions\n * for the required projections. These definitions can be obtained from\n * https://epsg.io/, and are a JS function, so can be loaded in a script\n * tag (as in the examples) or pasted into your application.\n *\n * After all required projection definitions are added to proj4's registry (by\n * using `proj4.defs()`), simply call `register(proj4)` from the `ol/proj/proj4`\n * package. Existing transforms are not changed by this function. See\n * examples/wms-image-custom-proj for an example of this.\n *\n * Additional projection definitions can be registered with `proj4.defs()` any\n * time. Just make sure to call `register(proj4)` again; for example, with user-supplied data where you don't\n * know in advance what projections are needed, you can initially load minimal\n * support and then load whichever are requested.\n *\n * Note that Proj4js does not support projection extents. If you want to add\n * one for creating default tile grids, you can add it after the Projection\n * object has been created with `setExtent`, for example,\n * `get('EPSG:1234').setExtent(extent)`.\n *\n * In addition to Proj4js support, any transform functions can be added with\n * {@link module:ol/proj.addCoordinateTransforms}. To use this, you must first create\n * a {@link module:ol/proj/Projection} object for the new projection and add it with\n * {@link module:ol/proj.addProjection}. You can then add the forward and inverse\n * functions with {@link module:ol/proj.addCoordinateTransforms}. See\n * examples/wms-custom-proj for an example of this.\n *\n * Note that if no transforms are needed and you only need to define the\n * projection, just add a {@link module:ol/proj/Projection} with\n * {@link module:ol/proj.addProjection}. See examples/wms-no-proj for an example of\n * this.\n */\nimport Projection from './proj/Projection.js';\nimport Units, { METERS_PER_UNIT } from './proj/Units.js';\nimport { PROJECTIONS as EPSG3857_PROJECTIONS, fromEPSG4326, toEPSG4326, } from './proj/epsg3857.js';\nimport { PROJECTIONS as EPSG4326_PROJECTIONS } from './proj/epsg4326.js';\nimport { add as addProj, clear as clearProj, get as getProj, } from './proj/projections.js';\nimport { add as addTransformFunc, clear as clearTransformFuncs, get as getTransformFunc, } from './proj/transforms.js';\nimport { applyTransform, getWidth } from './extent.js';\nimport { clamp, modulo } from './math.js';\nimport { getDistance } from './sphere.js';\nimport { getWorldsAway } from './coordinate.js';\n/**\n * A projection as {@link module:ol/proj/Projection}, SRS identifier\n * string or undefined.\n * @typedef {Projection|string|undefined} ProjectionLike\n * @api\n */\n/**\n * A transform function accepts an array of input coordinate values, an optional\n * output array, and an optional dimension (default should be 2).  The function\n * transforms the input coordinate values, populates the output array, and\n * returns the output array.\n *\n * @typedef {function(Array<number>, Array<number>=, number=): Array<number>} TransformFunction\n * @api\n */\nexport { METERS_PER_UNIT };\nexport { Projection };\n/**\n * @param {Array<number>} input Input coordinate array.\n * @param {Array<number>} [opt_output] Output array of coordinate values.\n * @param {number} [opt_dimension] Dimension.\n * @return {Array<number>} Output coordinate array (new array, same coordinate\n *     values).\n */\nexport function cloneTransform(input, opt_output, opt_dimension) {\n    var output;\n    if (opt_output !== undefined) {\n        for (var i = 0, ii = input.length; i < ii; ++i) {\n            opt_output[i] = input[i];\n        }\n        output = opt_output;\n    }\n    else {\n        output = input.slice();\n    }\n    return output;\n}\n/**\n * @param {Array<number>} input Input coordinate array.\n * @param {Array<number>} [opt_output] Output array of coordinate values.\n * @param {number} [opt_dimension] Dimension.\n * @return {Array<number>} Input coordinate array (same array as input).\n */\nexport function identityTransform(input, opt_output, opt_dimension) {\n    if (opt_output !== undefined && input !== opt_output) {\n        for (var i = 0, ii = input.length; i < ii; ++i) {\n            opt_output[i] = input[i];\n        }\n        input = opt_output;\n    }\n    return input;\n}\n/**\n * Add a Projection object to the list of supported projections that can be\n * looked up by their code.\n *\n * @param {Projection} projection Projection instance.\n * @api\n */\nexport function addProjection(projection) {\n    addProj(projection.getCode(), projection);\n    addTransformFunc(projection, projection, cloneTransform);\n}\n/**\n * @param {Array<Projection>} projections Projections.\n */\nexport function addProjections(projections) {\n    projections.forEach(addProjection);\n}\n/**\n * Fetches a Projection object for the code specified.\n *\n * @param {ProjectionLike} projectionLike Either a code string which is\n *     a combination of authority and identifier such as \"EPSG:4326\", or an\n *     existing projection object, or undefined.\n * @return {Projection} Projection object, or null if not in list.\n * @api\n */\nexport function get(projectionLike) {\n    return typeof projectionLike === 'string'\n        ? getProj(/** @type {string} */ (projectionLike))\n        : /** @type {Projection} */ (projectionLike) || null;\n}\n/**\n * Get the resolution of the point in degrees or distance units.\n * For projections with degrees as the unit this will simply return the\n * provided resolution. For other projections the point resolution is\n * by default estimated by transforming the 'point' pixel to EPSG:4326,\n * measuring its width and height on the normal sphere,\n * and taking the average of the width and height.\n * A custom function can be provided for a specific projection, either\n * by setting the `getPointResolution` option in the\n * {@link module:ol/proj/Projection~Projection} constructor or by using\n * {@link module:ol/proj/Projection~Projection#setGetPointResolution} to change an existing\n * projection object.\n * @param {ProjectionLike} projection The projection.\n * @param {number} resolution Nominal resolution in projection units.\n * @param {import(\"./coordinate.js\").Coordinate} point Point to find adjusted resolution at.\n * @param {import(\"./proj/Units.js\").default} [opt_units] Units to get the point resolution in.\n * Default is the projection's units.\n * @return {number} Point resolution.\n * @api\n */\nexport function getPointResolution(projection, resolution, point, opt_units) {\n    projection = get(projection);\n    var pointResolution;\n    var getter = projection.getPointResolutionFunc();\n    if (getter) {\n        pointResolution = getter(resolution, point);\n        if (opt_units && opt_units !== projection.getUnits()) {\n            var metersPerUnit = projection.getMetersPerUnit();\n            if (metersPerUnit) {\n                pointResolution =\n                    (pointResolution * metersPerUnit) / METERS_PER_UNIT[opt_units];\n            }\n        }\n    }\n    else {\n        var units = projection.getUnits();\n        if ((units == Units.DEGREES && !opt_units) || opt_units == Units.DEGREES) {\n            pointResolution = resolution;\n        }\n        else {\n            // Estimate point resolution by transforming the center pixel to EPSG:4326,\n            // measuring its width and height on the normal sphere, and taking the\n            // average of the width and height.\n            var toEPSG4326_1 = getTransformFromProjections(projection, get('EPSG:4326'));\n            if (toEPSG4326_1 === identityTransform && units !== Units.DEGREES) {\n                // no transform is available\n                pointResolution = resolution * projection.getMetersPerUnit();\n            }\n            else {\n                var vertices = [\n                    point[0] - resolution / 2,\n                    point[1],\n                    point[0] + resolution / 2,\n                    point[1],\n                    point[0],\n                    point[1] - resolution / 2,\n                    point[0],\n                    point[1] + resolution / 2,\n                ];\n                vertices = toEPSG4326_1(vertices, vertices, 2);\n                var width = getDistance(vertices.slice(0, 2), vertices.slice(2, 4));\n                var height = getDistance(vertices.slice(4, 6), vertices.slice(6, 8));\n                pointResolution = (width + height) / 2;\n            }\n            var metersPerUnit = opt_units\n                ? METERS_PER_UNIT[opt_units]\n                : projection.getMetersPerUnit();\n            if (metersPerUnit !== undefined) {\n                pointResolution /= metersPerUnit;\n            }\n        }\n    }\n    return pointResolution;\n}\n/**\n * Registers transformation functions that don't alter coordinates. Those allow\n * to transform between projections with equal meaning.\n *\n * @param {Array<Projection>} projections Projections.\n * @api\n */\nexport function addEquivalentProjections(projections) {\n    addProjections(projections);\n    projections.forEach(function (source) {\n        projections.forEach(function (destination) {\n            if (source !== destination) {\n                addTransformFunc(source, destination, cloneTransform);\n            }\n        });\n    });\n}\n/**\n * Registers transformation functions to convert coordinates in any projection\n * in projection1 to any projection in projection2.\n *\n * @param {Array<Projection>} projections1 Projections with equal\n *     meaning.\n * @param {Array<Projection>} projections2 Projections with equal\n *     meaning.\n * @param {TransformFunction} forwardTransform Transformation from any\n *   projection in projection1 to any projection in projection2.\n * @param {TransformFunction} inverseTransform Transform from any projection\n *   in projection2 to any projection in projection1..\n */\nexport function addEquivalentTransforms(projections1, projections2, forwardTransform, inverseTransform) {\n    projections1.forEach(function (projection1) {\n        projections2.forEach(function (projection2) {\n            addTransformFunc(projection1, projection2, forwardTransform);\n            addTransformFunc(projection2, projection1, inverseTransform);\n        });\n    });\n}\n/**\n * Clear all cached projections and transforms.\n */\nexport function clearAllProjections() {\n    clearProj();\n    clearTransformFuncs();\n}\n/**\n * @param {Projection|string|undefined} projection Projection.\n * @param {string} defaultCode Default code.\n * @return {Projection} Projection.\n */\nexport function createProjection(projection, defaultCode) {\n    if (!projection) {\n        return get(defaultCode);\n    }\n    else if (typeof projection === 'string') {\n        return get(projection);\n    }\n    else {\n        return /** @type {Projection} */ (projection);\n    }\n}\n/**\n * Creates a {@link module:ol/proj~TransformFunction} from a simple 2D coordinate transform\n * function.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} coordTransform Coordinate\n *     transform.\n * @return {TransformFunction} Transform function.\n */\nexport function createTransformFromCoordinateTransform(coordTransform) {\n    return (\n    /**\n     * @param {Array<number>} input Input.\n     * @param {Array<number>} [opt_output] Output.\n     * @param {number} [opt_dimension] Dimension.\n     * @return {Array<number>} Output.\n     */\n    function (input, opt_output, opt_dimension) {\n        var length = input.length;\n        var dimension = opt_dimension !== undefined ? opt_dimension : 2;\n        var output = opt_output !== undefined ? opt_output : new Array(length);\n        for (var i = 0; i < length; i += dimension) {\n            var point = coordTransform([input[i], input[i + 1]]);\n            output[i] = point[0];\n            output[i + 1] = point[1];\n            for (var j = dimension - 1; j >= 2; --j) {\n                output[i + j] = input[i + j];\n            }\n        }\n        return output;\n    });\n}\n/**\n * Registers coordinate transform functions to convert coordinates between the\n * source projection and the destination projection.\n * The forward and inverse functions convert coordinate pairs; this function\n * converts these into the functions used internally which also handle\n * extents and coordinate arrays.\n *\n * @param {ProjectionLike} source Source projection.\n * @param {ProjectionLike} destination Destination projection.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} forward The forward transform\n *     function (that is, from the source projection to the destination\n *     projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns\n *     the transformed {@link module:ol/coordinate~Coordinate}.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} inverse The inverse transform\n *     function (that is, from the destination projection to the source\n *     projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns\n *     the transformed {@link module:ol/coordinate~Coordinate}.\n * @api\n */\nexport function addCoordinateTransforms(source, destination, forward, inverse) {\n    var sourceProj = get(source);\n    var destProj = get(destination);\n    addTransformFunc(sourceProj, destProj, createTransformFromCoordinateTransform(forward));\n    addTransformFunc(destProj, sourceProj, createTransformFromCoordinateTransform(inverse));\n}\n/**\n * Transforms a coordinate from longitude/latitude to a different projection.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate as longitude and latitude, i.e.\n *     an array with longitude as 1st and latitude as 2nd element.\n * @param {ProjectionLike} [opt_projection] Target projection. The\n *     default is Web Mercator, i.e. 'EPSG:3857'.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate projected to the target projection.\n * @api\n */\nexport function fromLonLat(coordinate, opt_projection) {\n    return transform(coordinate, 'EPSG:4326', opt_projection !== undefined ? opt_projection : 'EPSG:3857');\n}\n/**\n * Transforms a coordinate to longitude/latitude.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Projected coordinate.\n * @param {ProjectionLike} [opt_projection] Projection of the coordinate.\n *     The default is Web Mercator, i.e. 'EPSG:3857'.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate as longitude and latitude, i.e. an array\n *     with longitude as 1st and latitude as 2nd element.\n * @api\n */\nexport function toLonLat(coordinate, opt_projection) {\n    var lonLat = transform(coordinate, opt_projection !== undefined ? opt_projection : 'EPSG:3857', 'EPSG:4326');\n    var lon = lonLat[0];\n    if (lon < -180 || lon > 180) {\n        lonLat[0] = modulo(lon + 180, 360) - 180;\n    }\n    return lonLat;\n}\n/**\n * Checks if two projections are the same, that is every coordinate in one\n * projection does represent the same geographic point as the same coordinate in\n * the other projection.\n *\n * @param {Projection} projection1 Projection 1.\n * @param {Projection} projection2 Projection 2.\n * @return {boolean} Equivalent.\n * @api\n */\nexport function equivalent(projection1, projection2) {\n    if (projection1 === projection2) {\n        return true;\n    }\n    var equalUnits = projection1.getUnits() === projection2.getUnits();\n    if (projection1.getCode() === projection2.getCode()) {\n        return equalUnits;\n    }\n    else {\n        var transformFunc = getTransformFromProjections(projection1, projection2);\n        return transformFunc === cloneTransform && equalUnits;\n    }\n}\n/**\n * Searches in the list of transform functions for the function for converting\n * coordinates from the source projection to the destination projection.\n *\n * @param {Projection} sourceProjection Source Projection object.\n * @param {Projection} destinationProjection Destination Projection\n *     object.\n * @return {TransformFunction} Transform function.\n */\nexport function getTransformFromProjections(sourceProjection, destinationProjection) {\n    var sourceCode = sourceProjection.getCode();\n    var destinationCode = destinationProjection.getCode();\n    var transformFunc = getTransformFunc(sourceCode, destinationCode);\n    if (!transformFunc) {\n        transformFunc = identityTransform;\n    }\n    return transformFunc;\n}\n/**\n * Given the projection-like objects, searches for a transformation\n * function to convert a coordinates array from the source projection to the\n * destination projection.\n *\n * @param {ProjectionLike} source Source.\n * @param {ProjectionLike} destination Destination.\n * @return {TransformFunction} Transform function.\n * @api\n */\nexport function getTransform(source, destination) {\n    var sourceProjection = get(source);\n    var destinationProjection = get(destination);\n    return getTransformFromProjections(sourceProjection, destinationProjection);\n}\n/**\n * Transforms a coordinate from source projection to destination projection.\n * This returns a new coordinate (and does not modify the original).\n *\n * See {@link module:ol/proj.transformExtent} for extent transformation.\n * See the transform method of {@link module:ol/geom/Geometry~Geometry} and its\n * subclasses for geometry transforms.\n *\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {ProjectionLike} source Source projection-like.\n * @param {ProjectionLike} destination Destination projection-like.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n * @api\n */\nexport function transform(coordinate, source, destination) {\n    var transformFunc = getTransform(source, destination);\n    return transformFunc(coordinate, undefined, coordinate.length);\n}\n/**\n * Transforms an extent from source projection to destination projection.  This\n * returns a new extent (and does not modify the original).\n *\n * @param {import(\"./extent.js\").Extent} extent The extent to transform.\n * @param {ProjectionLike} source Source projection-like.\n * @param {ProjectionLike} destination Destination projection-like.\n * @param {number} [opt_stops] Number of stops per side used for the transform.\n * By default only the corners are used.\n * @return {import(\"./extent.js\").Extent} The transformed extent.\n * @api\n */\nexport function transformExtent(extent, source, destination, opt_stops) {\n    var transformFunc = getTransform(source, destination);\n    return applyTransform(extent, transformFunc, undefined, opt_stops);\n}\n/**\n * Transforms the given point to the destination projection.\n *\n * @param {import(\"./coordinate.js\").Coordinate} point Point.\n * @param {Projection} sourceProjection Source projection.\n * @param {Projection} destinationProjection Destination projection.\n * @return {import(\"./coordinate.js\").Coordinate} Point.\n */\nexport function transformWithProjections(point, sourceProjection, destinationProjection) {\n    var transformFunc = getTransformFromProjections(sourceProjection, destinationProjection);\n    return transformFunc(point);\n}\n/**\n * @type {?Projection}\n */\nvar userProjection = null;\n/**\n * Set the projection for coordinates supplied from and returned by API methods.\n * Note that this method is not yet a part of the stable API.  Support for user\n * projections is not yet complete and should be considered experimental.\n * @param {ProjectionLike} projection The user projection.\n */\nexport function setUserProjection(projection) {\n    userProjection = get(projection);\n}\n/**\n * Clear the user projection if set.  Note that this method is not yet a part of\n * the stable API.  Support for user projections is not yet complete and should\n * be considered experimental.\n */\nexport function clearUserProjection() {\n    userProjection = null;\n}\n/**\n * Get the projection for coordinates supplied from and returned by API methods.\n * Note that this method is not yet a part of the stable API.  Support for user\n * projections is not yet complete and should be considered experimental.\n * @return {?Projection} The user projection (or null if not set).\n */\nexport function getUserProjection() {\n    return userProjection;\n}\n/**\n * Use geographic coordinates (WGS-84 datum) in API methods.  Note that this\n * method is not yet a part of the stable API.  Support for user projections is\n * not yet complete and should be considered experimental.\n */\nexport function useGeographic() {\n    setUserProjection('EPSG:4326');\n}\n/**\n * Return a coordinate transformed into the user projection.  If no user projection\n * is set, the original coordinate is returned.\n * @param {Array<number>} coordinate Input coordinate.\n * @param {ProjectionLike} sourceProjection The input coordinate projection.\n * @return {Array<number>} The input coordinate in the user projection.\n */\nexport function toUserCoordinate(coordinate, sourceProjection) {\n    if (!userProjection) {\n        return coordinate;\n    }\n    return transform(coordinate, sourceProjection, userProjection);\n}\n/**\n * Return a coordinate transformed from the user projection.  If no user projection\n * is set, the original coordinate is returned.\n * @param {Array<number>} coordinate Input coordinate.\n * @param {ProjectionLike} destProjection The destination projection.\n * @return {Array<number>} The input coordinate transformed.\n */\nexport function fromUserCoordinate(coordinate, destProjection) {\n    if (!userProjection) {\n        return coordinate;\n    }\n    return transform(coordinate, userProjection, destProjection);\n}\n/**\n * Return an extent transformed into the user projection.  If no user projection\n * is set, the original extent is returned.\n * @param {import(\"./extent.js\").Extent} extent Input extent.\n * @param {ProjectionLike} sourceProjection The input extent projection.\n * @return {import(\"./extent.js\").Extent} The input extent in the user projection.\n */\nexport function toUserExtent(extent, sourceProjection) {\n    if (!userProjection) {\n        return extent;\n    }\n    return transformExtent(extent, sourceProjection, userProjection);\n}\n/**\n * Return an extent transformed from the user projection.  If no user projection\n * is set, the original extent is returned.\n * @param {import(\"./extent.js\").Extent} extent Input extent.\n * @param {ProjectionLike} destProjection The destination projection.\n * @return {import(\"./extent.js\").Extent} The input extent transformed.\n */\nexport function fromUserExtent(extent, destProjection) {\n    if (!userProjection) {\n        return extent;\n    }\n    return transformExtent(extent, userProjection, destProjection);\n}\n/**\n * Creates a safe coordinate transform function from a coordinate transform function.\n * \"Safe\" means that it can handle wrapping of x-coordinates for global projections,\n * and that coordinates exceeding the source projection validity extent's range will be\n * clamped to the validity range.\n * @param {Projection} sourceProj Source projection.\n * @param {Projection} destProj Destination projection.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} transform Transform function (source to destiation).\n * @return {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} Safe transform function (source to destiation).\n */\nexport function createSafeCoordinateTransform(sourceProj, destProj, transform) {\n    return function (coord) {\n        var sourceX = coord[0];\n        var sourceY = coord[1];\n        var transformed, worldsAway;\n        if (sourceProj.canWrapX()) {\n            var sourceExtent = sourceProj.getExtent();\n            var sourceExtentWidth = getWidth(sourceExtent);\n            worldsAway = getWorldsAway(coord, sourceProj, sourceExtentWidth);\n            if (worldsAway) {\n                // Move x to the real world\n                sourceX = sourceX - worldsAway * sourceExtentWidth;\n            }\n            sourceX = clamp(sourceX, sourceExtent[0], sourceExtent[2]);\n            sourceY = clamp(sourceY, sourceExtent[1], sourceExtent[3]);\n            transformed = transform([sourceX, sourceY]);\n        }\n        else {\n            transformed = transform(coord);\n        }\n        if (worldsAway && destProj.canWrapX()) {\n            // Move transformed coordinate back to the offset world\n            transformed[0] += worldsAway * getWidth(destProj.getExtent());\n        }\n        return transformed;\n    };\n}\n/**\n * Add transforms to and from EPSG:4326 and EPSG:3857.  This function is called\n * by when this module is executed and should only need to be called again after\n * `clearAllProjections()` is called (e.g. in tests).\n */\nexport function addCommon() {\n    // Add transformations that don't alter coordinates to convert within set of\n    // projections with equal meaning.\n    addEquivalentProjections(EPSG3857_PROJECTIONS);\n    addEquivalentProjections(EPSG4326_PROJECTIONS);\n    // Add transformations to convert EPSG:4326 like coordinates to EPSG:3857 like\n    // coordinates and back.\n    addEquivalentTransforms(EPSG4326_PROJECTIONS, EPSG3857_PROJECTIONS, fromEPSG4326, toEPSG4326);\n}\naddCommon();\n//# sourceMappingURL=proj.js.map","/**\r\n * PMA.UI.Components contains UI and utility components that interact with a viewport and PMA.core\r\n * @namespace PMA.UI.Components\r\n */\r\n\r\nimport { Resources } from \"../../resources/resources\";\r\nimport { loginSupportsPost } from \"../../view/version\";\r\n\r\n/**\r\n * Events fired by components\r\n * @readonly\r\n * @enum {string}\r\n * @namespace Components.Events\r\n */\r\nexport const Events = {\r\n    /**\r\n     * Fires when a directory has been selected by a PMA.UI.Components.Tree instance\r\n     * @event Components.Events#DirectorySelected\r\n     * @param {Object} args\r\n     * @param {string} args.serverUrl\r\n     * @param {string} args.path\r\n     */\r\n    DirectorySelected: \"directorySelected\",\r\n\r\n    /**\r\n     * Fires when a slide image has been selected by a PMA.UI.Components.Tree or PMA.UI.Components.Gallery or a PMA.UI.Components.MetadataTree instance\r\n     * @event Components.Events#SlideSelected\r\n     * @param {Object} args\r\n     * @param {string} args.serverUrl - The server url this slide belongs to\r\n     * @param {string} args.path - The path to the slide\r\n     * @param {Number} [args.index] - The index of the slide selected in the gallery components (PMA.UI.Components.Gallery only)\r\n     * @param {boolean} [args.userInteraction] - Whether this event was fired by a user interaction or programmatically (PMA.UI.Components.Gallery only)\r\n     */\r\n    SlideSelected: \"slideSelected\",\r\n\r\n    /**\r\n     * Fires when a server node has been selected by a PMA.UI.Components.Tree instance\r\n     * @event Components.Events#ServerSelected\r\n     * @param {Object} args\r\n     * @param {string} args.serverUrl\r\n     */\r\n    ServerSelected: \"serverSelected\",\r\n\r\n    /**\r\n     * Fires when a server node has been expanded by a PMA.UI.Components.Tree instance\r\n     * @event Components.Events#ServerExpanded\r\n     * @param {Object} args\r\n     * @param {string} args.serverUrl\r\n     */\r\n    ServerExpanded: \"serverExpanded\",\r\n\r\n    /**\r\n     * Fires when a folder node has been expanded by a PMA.UI.Components.Tree instance\r\n     * @event Components.Events#DirectoryExpanded\r\n     * @param {Object} args\r\n     * @param {string} args.serverUrl\r\n     * @param {string} args.path\r\n     */\r\n    DirectoryExpanded: \"directoryExpanded\",\r\n\r\n    /**\r\n     * Fires when slide images have been checked by a PMA.UI.Components.Tree\r\n     * @event Components.Events#MultiSelectionChanged\r\n     * @param {Object[]} args\r\n     * @param {string} args.serverUrl\r\n     * @param {string} args.path\r\n     */\r\n    MultiSelectionChanged: \"multiSelectionChanged\",\r\n\r\n    /**\r\n     * Fires when a slide image has been deselected by a PMA.UI.Components.Tree or PMA.UI.Components.Gallery instance\r\n     * @event Components.Events#SlideDeSelected\r\n     */\r\n    SlideDeSelected: \"slideDeSelected\",\r\n\r\n    /**\r\n     * Fires when a form has been saved to PMA.core\r\n     * @event Components.Events#TreeNodeDoubleClicked\r\n     * @param {Object} args\r\n     * @param {string} args.serverUrl\r\n     * @param {string} args.path\r\n     * @param {boolean} isSlide\r\n     */\r\n    TreeNodeDoubleClicked: \"treeNodeDoubleClicked\",\r\n\r\n    /**\r\n     * Fires when image info could not be loaded\r\n     * @event Components.Events#SlideInfoError\r\n     */\r\n    SlideInfoError: \"SlideInfoError\",\r\n\r\n    /**\r\n     * Fires before a viewport attempts to load an image\r\n     * @event Components.Events#BeforeSlideLoad\r\n     */\r\n    BeforeSlideLoad: \"BeforeSlideLoad\",\r\n\r\n    /**\r\n     * Fires after a viewport has finished loading an image\r\n     * @event Components.Events#SlideLoaded\r\n     * @param {Object} args - The slide loaded arguments\r\n     * @param {string} args.serverUrl - The server the slide belongs to\r\n     * @param {string} args.path - The slide path\r\n     * @param {boolean} args.dropped - Whether the slide was loaded via a drag and drop operation\r\n     */\r\n    SlideLoaded: \"SlideLoaded\",\r\n\r\n    /**\r\n     * Fires after when a new annotation has been added\r\n     * @event Components.Events#AnnotationAdded\r\n     * @param {Object} args\r\n     * @param {Object} args.feature - The annotation object\r\n     */\r\n    AnnotationAdded: \"annotationAdded\",\r\n\r\n    /**\r\n     * Fires when annotation drawing begins\r\n     * @event Components.Events#AnnotationDrawing\r\n     */\r\n    AnnotationDrawing: \"annotationDrawing\",\r\n\r\n    /**\r\n     * Fires when an annotation has been deleted\r\n     * @event Components.Events#AnnotationDeleted\r\n     * @param {Object}  args\r\n     * @param {Number}  args.annotationId\r\n     * @param {Object}  args.feature\r\n     */\r\n    AnnotationDeleted: \"annotationDeleted\",\r\n\r\n    /**\r\n     * Fires when an annotation has been modified\r\n     * @event Components.Events#AnnotationModified\r\n     */\r\n    AnnotationModified: \"annotationModified\",\r\n\r\n    /**\r\n     * Fires when the annotations have been saved to PMA.core\r\n     * @event Components.Events#AnnotationsSaved\r\n     * @param {Object} args\r\n     * @param {boolean} args.success\r\n     */\r\n    AnnotationsSaved: \"annotationsSaved\",\r\n\r\n    /**\r\n     * Fires when the currently selected annotation(s) have changed\r\n     * @event Components.Events#AnnotationsSelectionChanged\r\n     * @param {Object[]} args - The selected annotation objects\r\n     */\r\n    AnnotationsSelectionChanged: \"annotationsSelectionChanged\",\r\n\r\n    /**\r\n     * Fires when annotation editing begins\r\n     * @event Components.Events#annotationEditingStarted\r\n     */\r\n    AnnotationEditingStarted: \"annotationEditingStarted\",\r\n\r\n    /**\r\n     * Fires when annotation editing ends\r\n     * @event Components.Events#annotationEditingEnded\r\n     */\r\n    AnnotationEditingEnded: \"annotationEditingEnded\",\r\n\r\n    /**\r\n     * Fires when a form has been saved to PMA.core\r\n     * @event Components.Events#FormSaved\r\n     * @param {Object} args - The result of the save operation\r\n     * @param {string} args.message - The error message if any\r\n     * @param {boolean} args.success - True if save was successful\r\n     */\r\n    FormSaved: \"formSaved\",\r\n\r\n    /**\r\n     * Fires when a the edit button of a read only form is clicked\r\n     * @event Components.Events#FormEditClick\r\n     */\r\n    FormEditClick: \"formEditClick\",\r\n\r\n    /**\r\n     * Fires when the state of the synchronization of viewports has changed (enabled/disabled)\r\n     * @event Components.Events#SyncChanged\r\n     * @param {boolean} enabled - Whether syncronization was enabled\r\n     */\r\n    SyncChanged: \"syncChanged\",\r\n\r\n    /**\r\n     * Fires when a search has started\r\n     * @event Components.Events#SearchStarted\r\n     */\r\n    SearchStarted: \"searchStarted\",\r\n\r\n    /**\r\n     * Fires when a search has finished\r\n     * @event Components.Events#SearchFinished\r\n     * @param {Object.<string, string[]>} results - The object containing the result for each server available\r\n     */\r\n    SearchFinished: \"searchFinished\",\r\n\r\n    /**\r\n     * Fires when a search has failed\r\n     * @event Components.Events#SearchFailed\r\n     * @param {Tree~server} server - The object containing the server failed to fetch search results for\r\n     */\r\n    SearchFailed: \"searchFailed\",\r\n\r\n    /** \r\n     * Fires when a form value is expanded by a PMA.UI.Components.MetadataTree\r\n     * @event Components.Events#ValueExpanded\r\n     * @param {Object} args - The arguments passed to this event\r\n     * @param {string} args.serverUrl - The server url that the form value belongs to\r\n     * @param {string[]} args.slides - An array of the paths for the slides belonging to the formvalue expanded\r\n     */\r\n    ValueExpanded: \"valueExpanded\",\r\n\r\n    /** \r\n     * Fires when data are dropped on a PMA.UI.Components.Gallery\r\n     * @event Components.Events#Dropped\r\n     * @param {Object} args - The arguments passed to this event\r\n     * @param {string} args.serverUrl - The server url\r\n     * @param {string} args.path - The path to a slide or directory dropped \r\n     * @param {boolean} args.isFolder - Whether a directory was dropped  \r\n     * @param {boolean} args.append - Whether the slide/directory was appended or replaced(alt key was pressed)\r\n     */\r\n    Dropped: \"dropped\",\r\n\r\n    /**\r\n     * Fires when a session id authentication fails\r\n     * @event Components.Events#SessionIdLoginFailed\r\n     * @param {Object} args - The arguments passed to this event\r\n     * @param {string} args.serverUrl - The server url\r\n     */\r\n    SessionIdLoginFailed: \"sessionIdLoginFailed\",\r\n\r\n    /** \r\n     * Fires when a slide is dropped in the {@link PMA.UI.Components.SlideLoader}\r\n     * @event Components.Events#BeforeDrop\r\n     * @param {Object} args - The arguments passed to this event\r\n     * @param {string} args.serverUrl - The serverUrl\r\n     * @param {string} args.path - The path to the slide  dropped\r\n     * @param {Object} args.node - The node metadata object\r\n     * @returns {boolean} - Whether to cancel the slide loading or not\r\n     */\r\n    BeforeDrop: \"beforeDrop\"\r\n};\r\n\r\n/**\r\n * PMA.core API methods\r\n * @readonly\r\n * @enum {string}\r\n */\r\nexport const ApiMethods = {\r\n    Authenticate: \"Authenticate\",\r\n    GetFiles: \"GetFiles\",\r\n    GetDirectories: \"GetDirectories\",\r\n    GetImageInfo: \"GetImageInfo\",\r\n    GetImagesInfo: \"GetImagesInfo\",\r\n    DeAuthenticate: \"DeAuthenticate\",\r\n    GetForms: \"GetForms\",\r\n    GetFormDefinitions: \"GetFormDefinitions\",\r\n    GetFormSubmissions: \"GetFormSubmissions\",\r\n    GetForm: \"GetForm\",\r\n    SaveFormDefinition: \"SaveFormDefinition\",\r\n    DeleteFormDefinition: \"DeleteFormDefinition\",\r\n    SaveFormData: \"SaveFormData\",\r\n    GetFormData: \"GetFormData\",\r\n    GetAnnotations: \"GetAnnotations\",\r\n    AddAnnotation: \"AddAnnotation\",\r\n    UpdateAnnotation: \"UpdateAnnotation\",\r\n    DeleteAnnotation: \"DeleteAnnotation\",\r\n    GetVersionInfo: \"GetVersionInfo\",\r\n    QueryFilename: \"Filename\",\r\n    SaveAnnotations: \"SaveAnnotations\",\r\n    DistinctValues: \"DistinctValues\",\r\n    Metadata: \"Metadata\",\r\n    GetEvents: \"GetEvents\",\r\n    RunScripts: \"Run\",\r\n};\r\n\r\n/**\r\n * PMA.core scopes for the GetSlides API method\r\n * @readonly\r\n * @enum {string}\r\n */\r\nexport const GetSlidesScope = {\r\n    Normal: 0,\r\n    OneLevel: 1,\r\n    Recursive: 2\r\n};\r\n\r\n/**\r\n * Available components to render\r\n * @readonly\r\n * @enum {string}\r\n * @memberof PMA.UI.Components\r\n */\r\nexport const GalleryRenderOptions = {\r\n    /** Render both thumbnail and barcode*/\r\n    All: \"all\",\r\n    /** Render thumbnail only */\r\n    Thumbnail: \"thumbnail\",\r\n    /** Render barcode only */\r\n    Barcode: \"barcode\",\r\n};\r\n\r\n/** \r\n * The mime type used for drag n drop data transfer\r\n * @typedef {string} PMA.UI.Components~DragDropMimeType\r\n */\r\nexport const DragDropMimeType = \"application/x-pma-node\";\r\n\r\n/**\r\n * An object expected for drag and drop features \r\n * @typedef {Object} PMA.UI.Components~dragDropObject\r\n * @property {string} serverUrl - The serverUrl\r\n * @property {string} path - The path to a slide or directory\r\n * @property {boolean} isFolder - Whether this is a path or a directory\r\n */\r\n\r\n// static variables\r\n\r\n//export let _sessionList = {};\r\nexport const _sessionList = {\r\n    _list: {},\r\n    set(key, value) { this._list[key] = value; },\r\n    get() { return this._list; },\r\n    clear() { this._list = {}; },\r\n};\r\nvar alertedForIncompatibility = false;\r\n\r\nfunction combinePath(parts) {\r\n    var rx = /^\\/+|\\/+$/g; // trim left and right trailing slash\r\n    var rxLeftOnly = /^\\/+/g; // trim left trailing slash\r\n    for (var i = 0, max = parts.length; i < max; i++) {\r\n        if (i === max - 1) {\r\n            parts[i] = parts[i].replace(rxLeftOnly, \"\");\r\n        } else {\r\n            parts[i] = parts[i].replace(rx, \"\");\r\n        }\r\n    }\r\n\r\n    return parts.join(\"/\");\r\n}\r\n\r\nexport const parseJson = function(response) {\r\n    if (response === null || response === undefined || response === \"\") {\r\n        return null;\r\n    }\r\n\r\n    var obj = JSON.parse(response);\r\n\r\n    if (obj.hasOwnProperty(\"d\")) {\r\n        return obj.d;\r\n    } else {\r\n        return obj;\r\n    }\r\n};\r\n\r\n/**\r\n * Tries to parse the data passed from a drag and drop operation\r\n * @param {Object} dataTransfer - The browser dataTransfer object\r\n * @returns {PMA.UI.Components~dragDropObject} - The parsed drag and drop object or null\r\n */\r\nexport const parseDragData = function(dataTransfer) {\r\n    try {\r\n        var d1 = dataTransfer.getData(PMA.UI.Components.DragDropMimeType);\r\n        return JSON.parse(d1);\r\n    } catch (e) {}\r\n\r\n    //Try the text for IE compatibility\r\n    try {\r\n        var d2 = dataTransfer.getData(\"text\");\r\n        return JSON.parse(d2);\r\n    } catch (e) {}\r\n\r\n    return null;\r\n};\r\n\r\n// encodes an object so that it can be passed as an ajax data object\r\nexport const formify = function(data) {\r\n    if (data && typeof data === \"object\") {\r\n        var sData = \"\";\r\n\r\n        var i = 0;\r\n        for (var property in data) {\r\n            if (data.hasOwnProperty(property)) {\r\n                if (i > 0) {\r\n                    sData += \"&\";\r\n                }\r\n\r\n                sData += encodeURIComponent(property) + \"=\" + encodeURIComponent(data[property]);\r\n                i++;\r\n            }\r\n        }\r\n\r\n        return sData;\r\n    }\r\n\r\n    return data;\r\n};\r\n\r\nexport const ajax = function(url, method, contentType, data, success, failure) {\r\n    method = method.toUpperCase();\r\n    var sData = null;\r\n\r\n    if (contentType && contentType.toLowerCase && contentType.toLowerCase() === \"application/json\") {\r\n        sData = JSON.stringify(data);\r\n    } else {\r\n        sData = formify(data);\r\n    }\r\n\r\n    if (sData && method == \"GET\") {\r\n        url = url + \"?\" + sData;\r\n        sData = null;\r\n    }\r\n\r\n    var http = new XMLHttpRequest();\r\n    http.open(method, url, true);\r\n\r\n    if (method == \"POST\" && !contentType) {\r\n        http.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\r\n    } else if (contentType) {\r\n        http.setRequestHeader('Content-Type', contentType);\r\n    }\r\n\r\n    http.onreadystatechange = function() {\r\n        if (http.readyState === 4) {\r\n            if (http.status === 200) {\r\n                if (typeof success === \"function\") {\r\n                    success(http);\r\n                }\r\n            } else if (typeof failure === \"function\") {\r\n                failure(http);\r\n            }\r\n        }\r\n    };\r\n\r\n    if (sData) {\r\n        http.send(sData);\r\n    } else {\r\n        http.send();\r\n    }\r\n};\r\n\r\n/**\r\n * Invokes a PMA.core API method. This method will properly encode all provided parameters.\r\n * @param {Object} options\r\n * @param {string} options.serverUrl - The URL of the PMA.core instance\r\n * @param {string} options.method - The API method to call\r\n * @param {string} options.httpMethod - The HTTP verb\r\n * @param {object} options.data - The parameters to pass to the API method\r\n * @param {string} [options.apiPath=\"api\"] - The API path to append to the server URL\r\n * @param {string} [options.contentType=\"\"]\r\n * @param {boolean} [options.webapi=false] - Whether the api call is a webapi call\r\n * @param {function} [options.success] - Function to call upon successful method invocation\r\n * @param {function} [options.failure] - Function to call upon unsuccessful method invocation\r\n */\r\nexport const callApiMethod = function(options) {\r\n    var httpMethod = \"GET\";\r\n    if (options.httpMethod) {\r\n        httpMethod = options.httpMethod;\r\n    }\r\n\r\n    if (!options.apiPath) {\r\n        options.apiPath = \"api\";\r\n    }\r\n\r\n    let infix = options.webapi === true ? \"/\" : \"/json/\";\r\n\r\n    ajax(combinePath([options.serverUrl, options.apiPath + infix, options.method]), httpMethod, options.contentType, options.data, options.success, options.failure);\r\n};\r\n\r\nexport const callApiMethodPromise = function(options) {\r\n    return new Promise(function(resolve, reject) {\r\n        const localOptions = {\r\n            ...options,\r\n            success: resolve,\r\n            failure: reject\r\n        };\r\n\r\n        callApiMethod(localOptions)\r\n    });\r\n}\r\n\r\n/**\r\n * Authenticates against a PMA.core server\r\n * @param  {string} serverUrl\r\n * @param  {string} username\r\n * @param  {string} password\r\n * @param  {string} caller\r\n * @param  {function} success\r\n * @param  {function} failure\r\n */\r\nexport const login = function(serverUrl, username, password, caller, success, failure) {\r\n    if (typeof caller !== \"string\") {\r\n        throw \"Caller parameter not supplied\";\r\n    }\r\n\r\n    function authFailure(http) {\r\n        if (typeof failure === \"function\") {\r\n            if (!http.responseText || http.responseText.length === 0 || http.responseType === \"\") {\r\n                failure({ Message: Resources.translate(\"Authentication failed\") });\r\n            } else {\r\n                try {\r\n                    const response = parseJson(http.responseText);\r\n                    failure(response);\r\n                } catch {\r\n                    failure({ Message: Resources.translate(\"Authentication failed\") });\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    callApiMethodPromise({\r\n            serverUrl: serverUrl,\r\n            method: ApiMethods.GetVersionInfo\r\n        })\r\n        .then((versionHttp) => {\r\n            let usePost = loginSupportsPost(JSON.parse(versionHttp.responseText));\r\n\r\n            callApiMethod({\r\n                serverUrl: serverUrl,\r\n                method: ApiMethods.Authenticate,\r\n                httpMethod: usePost ? \"POST\" : \"GET\",\r\n                contentType: usePost ? \"application/json\" : null,\r\n                data: { username: username, password: password, caller: caller },\r\n                success: function(http) {\r\n                    var response = parseJson(http.responseText);\r\n                    if (response && response.Success === true) {\r\n                        // store session ID for this server in global cache\r\n                        _sessionList.set(serverUrl, response);\r\n\r\n                        if (typeof success === \"function\") {\r\n                            success(response.SessionId);\r\n                        }\r\n                    } else {\r\n                        authFailure(http);\r\n                    }\r\n                },\r\n                failure: authFailure\r\n            });\r\n        }, authFailure);\r\n};\r\n/**\r\n * Returns a URL that points to the thumbnail of a slide image\r\n * @param  {string} serverUrl\r\n * @param  {string} sessionId\r\n * @param  {string} pathOrUid\r\n * @param  {Number} [orientation=0]\r\n * @param  {Number} [width=0]\r\n * @param  {Number} [height=0]\r\n */\r\nexport const getThumbnailUrl = function(serverUrl, sessionId, pathOrUid, orientation, width, height) {\r\n    return combinePath([serverUrl, \"thumbnail\"]) +\r\n        \"?sessionID=\" + encodeURIComponent(sessionId) +\r\n        \"&pathOrUid=\" + encodeURIComponent(pathOrUid) +\r\n        \"&orientation=\" + (orientation ? orientation : 0) +\r\n        \"&w=\" + (width ? width : 0) +\r\n        \"&h=\" + (height ? height : 0);\r\n};\r\n\r\n/**\r\n * snapshot parameters\r\n * @typedef {Object} Components~snapshotParameters\r\n * @property {number} x - The x coordinate of the top left point\r\n * @property {number} y - The y coordinate of the top left point\r\n * @property {number} width - The width of the viewport\r\n * @property {number} height - The height of the viewport\r\n * @property {number} rotation - The rotation of the viewport (in degrees)\r\n * @property {boolean} flipHorizontally - Wheter the snapshot is flipped horizontally\r\n * @property {boolean} flipVertically - Wheter the snapshot is flipped vertically\r\n * @property {Array} [channels] - The selected channels\r\n * @property {number} [layer=0] - The selected layer\r\n * @property {number} [timeframe=0] - The selected timeframe\r\n */\r\n\r\n/**\r\n * Returns a URL that points to the snapshot of a slide image\r\n * @param  {string} serverUrl\r\n * @param  {string} sessionId\r\n * @param  {string} pathOrUid\r\n * @param {Components~snapshotParameters} snapshotParameters - The parameters required for the snapshot\r\n * @param {Number} thumbWidth - The final snapshot width (this may be smaller due to aspect ratio)\r\n * @param {Number} thumbHeight - The final snapshot height (this may be smaller due to aspect ratio)\r\n * @param {string} [format=jpg] - The snapshot image format\r\n */\r\nexport const getSnapshotUrl = function(serverUrl, sessionId, pathOrUid, snapshotParameters, thumbWidth, thumbHeight, format) {\r\n    if (!format) {\r\n        format = \"jpg\";\r\n    }\r\n\r\n    thumbWidth = thumbWidth ? thumbWidth : 150;\r\n    thumbHeight = thumbHeight ? thumbHeight : 150;\r\n\r\n    var channelsString = \"0\";\r\n    if (snapshotParameters.channels) {\r\n        channelsString = snapshotParameters.channels.join(\",\");\r\n    }\r\n    var selectedTimeFrame = snapshotParameters.timeframe ? snapshotParameters.timeframe : 0;\r\n    var selectedLayer = snapshotParameters.layer ? snapshotParameters.layer : 0;\r\n\r\n    var scale = Math.max(thumbWidth / snapshotParameters.width, thumbHeight / snapshotParameters.height);\r\n    if (snapshotParameters.width * scale < 1 || snapshotParameters.height < 1) {\r\n        scale = 1 / Math.max(snapshotParameters.width, snapshotParameters.height);\r\n    }\r\n\r\n    var rotation = snapshotParameters.rotation ? snapshotParameters.rotation : 0;\r\n\r\n    return combinePath([serverUrl, \"region\"]) +\r\n        \"?sessionID=\" + encodeURIComponent(sessionId) +\r\n        \"&pathOrUid=\" + encodeURIComponent(pathOrUid) +\r\n        \"&format=\" + encodeURIComponent(format) +\r\n        \"&timeframe=\" + selectedTimeFrame +\r\n        \"&layer=\" + selectedLayer +\r\n        \"&channels=\" + channelsString +\r\n        \"&x=\" + Math.floor(snapshotParameters.x) +\r\n        \"&y=\" + Math.floor(snapshotParameters.y) +\r\n        \"&width=\" + Math.floor(snapshotParameters.width) +\r\n        \"&height=\" + Math.floor(snapshotParameters.height) +\r\n        \"&scale=\" + scale +\r\n        \"&rotation=\" + rotation +\r\n        \"&flipHorizontal=\" + snapshotParameters.flipHorizontally +\r\n        \"&flipVertical=\" + snapshotParameters.flipVertically;\r\n};\r\n\r\n/**\r\n * Returns a URL that points to the barcode of a slide image. This method doesn't guarantee that a barcode image actually exists.\r\n * @param  {string} serverUrl\r\n * @param  {string} sessionId\r\n * @param  {string} pathOrUid\r\n * @param  {Number} [rotation=0]\r\n */\r\nexport const getBarcodeUrl = function(serverUrl, sessionId, pathOrUid, rotation) {\r\n    return combinePath([serverUrl, \"barcode\"]) +\r\n        \"?sessionID=\" + encodeURIComponent(sessionId) +\r\n        \"&pathOrUid=\" + encodeURIComponent(pathOrUid) +\r\n        \"&rotation=\" + (rotation ? rotation : 0);\r\n};","/**\n * @module ol/util\n */\n/**\n * @return {?} Any return.\n */\nexport function abstract() {\n    return /** @type {?} */ ((function () {\n        throw new Error('Unimplemented abstract method.');\n    })());\n}\n/**\n * Counter for getUid.\n * @type {number}\n * @private\n */\nvar uidCounter_ = 0;\n/**\n * Gets a unique ID for an object. This mutates the object so that further calls\n * with the same object as a parameter returns the same value. Unique IDs are generated\n * as a strictly increasing sequence. Adapted from goog.getUid.\n *\n * @param {Object} obj The object to get the unique ID for.\n * @return {string} The unique ID for the object.\n * @api\n */\nexport function getUid(obj) {\n    return obj.ol_uid || (obj.ol_uid = String(++uidCounter_));\n}\n/**\n * OpenLayers version.\n * @type {string}\n */\nexport var VERSION = '6.6.1';\n//# sourceMappingURL=util.js.map","/**\r\n   * Viewer themes\r\n   * @readonly\r\n   * @enum {string}\r\n   * @property {string} Themes.Default  OpenLayers default\r\n   * @property {string} Themes.Classic Classic layout found in many desktop viewers\r\n   * @property {string} Themes.Modern Modern layout compatible with web application UI\r\n   */\r\nexport const Themes = {\r\n    Default: \"default\",\r\n    Classic: \"classic\",\r\n    Modern: \"modern\"\r\n};\r\n\r\n/**\r\n * Custom button predefined locations\r\n * @readonly\r\n * @enum {string}\r\n * @property {string} ButtonLocations.N North of the viewport\r\n * @property {string} ButtonLocations.S South of the viewport\r\n * @property {string} ButtonLocations.E East of the viewport\r\n * @property {string} ButtonLocations.W West of the viewport\r\n * @property {string} ButtonLocations.NE North-East corner of the viewport\r\n * @property {string} ButtonLocations.NW North-West corner of the viewport\r\n * @property {string} ButtonLocations.SE South-East corner of the viewport\r\n * @property {string} ButtonLocations.SW South-West corner of the viewport\r\n **/\r\nexport const ButtonLocations = {\r\n    N: \"n\",\r\n    S: \"s\",\r\n    E: \"e\",\r\n    W: \"w\",\r\n    NE: \"ne\",\r\n    NW: \"nw\",\r\n    SE: \"se\",\r\n    SW: \"sw\",\r\n};\r\n\r\n/**\r\n * Available annotation types\r\n * @readonly\r\n * @enum {string}\r\n * @memberof PMA.UI.Types\r\n * @property {string} Annotation.Rectangle A rectangular area\r\n * @property {string} Annotation.Arrow A vector arrow\r\n * @property {string} Annotation.Line A line segment made of a start and end point\r\n * @property {string} Annotation.Icon A point with an icon image\r\n * @property {string} Annotation.Point A point\r\n * @property {string} Annotation.MultiPoint Multiple points\r\n * @property {string} Annotation.Freehand Free hand line\r\n * @property {string} Annotation.ClosedFreehand Free hand polygon\r\n * @property {string} Annotation.CompoundFreehand  Multiple free hand lines that are eventually connected together to form a closed freehand polygon\r\n * @property {string} Annotation.Ellipse Ellipse\r\n * @property {string} Annotation.Circle Circle\r\n * @property {string} Annotation.Polygon Polygon\r\n * @property {string} Annotation.LineString Multiple connected line segments\r\n */\r\nexport const Annotation = {\r\n    Rectangle: \"Rectangle\",\r\n    Arrow: \"Arrow\",\r\n    Line: \"Line\",\r\n    Icon: \"Icon\",\r\n    Point: \"Point\",\r\n    MultiPoint: \"MultiPoint\",\r\n    Freehand: \"Freehand\",\r\n    ClosedFreehand: \"ClosedFreehand\",\r\n    CompoundFreehand: \"CompoundFreehand\",\r\n    Ellipse: \"Ellipse\",\r\n    Circle: \"Circle\",\r\n    Polygon: \"Polygon\",\r\n    LineString: \"LineString\"\r\n};\r\n\r\n/**\r\n * Available edit types\r\n * @readonly\r\n * @enum {string}\r\n * @memberof PMA.UI.Types\r\n * @property {string} Edit.Transform Scales and rotates an annotation\r\n * @property {string} Edit.Modify Changes shape of annotation using handles\r\n * @property {string} Edit.Wand Creates new annotation on seleced area\r\n * @property {string} Edit.Brush Changes shape of annotation using brush\r\n * @property {string} Edit.Eraser Changes shape of annotation using eraser\r\n */\r\nexport const Edit = {\r\n    Transform: \"Transform\",\r\n    Modify: \"Modify\",\r\n    Wand: \"Wand\",\r\n    Brush: \"Brush\",\r\n    Eraser: \"Eraser\",\r\n};\r\n\r\n/**\r\n * Annotations states\r\n * @readonly\r\n * @enum {number}\r\n * @memberof PMA.UI.Types\r\n * @property {number} AnnotationState.Pristine Unchanged\r\n * @property {number} AnnotationState.Added Added but not saved yet\r\n * @property {number} AnnotationState.Modified Updated but not saved yet\r\n * @property {number} AnnotationState.Deleted Removed but not saved yet\r\n */\r\nexport const AnnotationState = {\r\n    Pristine: 1,\r\n    Added: 2,\r\n    Modified: 3,\r\n    Deleted: 4\r\n};\r\n\r\n/**\r\n * Available controls\r\n * @readonly\r\n * @enum {string}\r\n * @property {string} Controls.ZoomSlider The zoom slider control\r\n * @property {string} Controls.ScaleLine The scale line control\r\n * @property {string} Controls.Overview The overview control\r\n * @property {string} Controls.Barcode The barcode control\r\n * @property {string} Controls.Magnifier The magnifier control\r\n * @property {string} Controls.ColorAdjustments The brightness/contrast control\r\n * @property {string} Controls.LayerSwitch The control to turn layers on/off. Used for server side annotation layers\r\n * @property {string} Controls.DimensionSelector The control used to control z-stacks and timeframes\r\n * @property {string} Controls.Filename The filename control\r\n * @property {string} Controls.Snapshot The snapshot control\r\n * @property {string} Controls.Rotation The rotation control\r\n * @property {string} Controls.Attribution The attribution control\r\n * \r\n */\r\nexport const Controls = {\r\n    ZoomSlider: \"zoomslider\",\r\n    ScaleLine: \"scaleline\",\r\n    Overview: \"overview\",\r\n    Barcode: \"barcode\",\r\n    Magnifier: \"magnifier\",\r\n    ColorAdjustments: \"coloradjustments\",\r\n    LayerSwitch: \"layerswitch\",\r\n    DimensionSelector: \"dimensionselector\",\r\n    Filename: \"filename\",\r\n    Snapshot: \"shapshot\",\r\n    Rotation: \"rotation\",\r\n    Attribution: \"attribution\",\r\n    Fullscreen: \"fullscreen\"\r\n};\r\n\r\n/**\r\n * Default fill color used\r\n * @readonly\r\n * @memberof PMA.UI.View\r\n */\r\nexport const DefaultFillColor = 'rgba(255, 255, 255, 0.2)';\r\n\r\n/**\r\n * Events fired by the viewport\r\n * @readonly\r\n * @enum {string}\r\n * @namespace View.Events\r\n */\r\nexport const Events = {\r\n    /** \r\n     * Fires when the active layer, timeframe or channels change\r\n     * @event View.Events#DimensionsChanged\r\n    */\r\n    DimensionsChanged: \"change:dimension\",\r\n    /**\r\n     * Fires when the the center, resolution (zoom) or rotation changes\r\n     * @event View.Events#ViewChanged\r\n    */\r\n    ViewChanged: \"viewchanged\",\r\n    /**\r\n     * Fires when an error occurs while loading tiles\r\n     * @event View.Events#TilesError */\r\n    TilesError: \"tileserror\",\r\n    /**\r\n     * Fires when the slide cannot be loaded\r\n     * @event View.Events#SlideLoadError */\r\n    SlideLoadError: \"SlideLoadError\",\r\n    /**\r\n     * Fires when the file name control is clicked\r\n     * @event View.Events#FilenameClick */\r\n    FilenameClick: \"click:filename\",\r\n\r\n    /**\r\n     * Fires when an annotation layer has changed visibility/opacity\r\n     * @event View.Events#AnnotationLayerChanged\r\n     */\r\n    AnnotationLayerChanged: \"layer:change\",\r\n};\r\n\r\n/**\r\n * Supported types of objective resolutions\r\n * @readonly\r\n * @enum {string}\r\n * @namespace View.ObjectiveResolutions\r\n * @property {string} ObjectiveResolutions.Min Minimum resolution\r\n * @property {string} ObjectiveResolutions.1X 1x\r\n * @property {string} ObjectiveResolutions.2X 2x\r\n * @property {string} ObjectiveResolutions.5X 5x\r\n * @property {string} ObjectiveResolutions.10X 10x\r\n * @property {string} ObjectiveResolutions.20X 20x\r\n * @property {string} ObjectiveResolutions.40X 40x\r\n * @property {string} ObjectiveResolutions.\"1:1\" 1:1 Resolution\r\n * @property {string} ObjectiveResolutions.Max Maximum resolution\r\n */\r\nexport const ObjectiveResolutions = {\r\n    \"Min\": \"min\",\r\n    \"1X\": \"1\",\r\n    \"2X\": \"2\",\r\n    \"5X\": \"5\",\r\n    \"10X\": \"10\",\r\n    \"20X\": \"20\",\r\n    \"40X\": \"40\",\r\n    \"1:1\": \"1:1\",\r\n    \"Max\": \"max\"\r\n};","/**\n * @module ol/obj\n */\n/**\n * Polyfill for Object.assign().  Assigns enumerable and own properties from\n * one or more source objects to a target object.\n * See https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign.\n *\n * @param {!Object} target The target object.\n * @param {...Object} var_sources The source object(s).\n * @return {!Object} The modified target object.\n */\nexport var assign = typeof Object.assign === 'function'\n    ? Object.assign\n    : function (target, var_sources) {\n        if (target === undefined || target === null) {\n            throw new TypeError('Cannot convert undefined or null to object');\n        }\n        var output = Object(target);\n        for (var i = 1, ii = arguments.length; i < ii; ++i) {\n            var source = arguments[i];\n            if (source !== undefined && source !== null) {\n                for (var key in source) {\n                    if (source.hasOwnProperty(key)) {\n                        output[key] = source[key];\n                    }\n                }\n            }\n        }\n        return output;\n    };\n/**\n * Removes all properties from an object.\n * @param {Object} object The object to clear.\n */\nexport function clear(object) {\n    for (var property in object) {\n        delete object[property];\n    }\n}\n/**\n * Polyfill for Object.values().  Get an array of property values from an object.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values\n *\n * @param {!Object<K,V>} object The object from which to get the values.\n * @return {!Array<V>} The property values.\n * @template K,V\n */\nexport var getValues = typeof Object.values === 'function'\n    ? Object.values\n    : function (object) {\n        var values = [];\n        for (var property in object) {\n            values.push(object[property]);\n        }\n        return values;\n    };\n/**\n * Determine if an object has any properties.\n * @param {Object} object The object to check.\n * @return {boolean} The object is empty.\n */\nexport function isEmpty(object) {\n    var property;\n    for (property in object) {\n        return false;\n    }\n    return !property;\n}\n//# sourceMappingURL=obj.js.map","/**\n * @module ol/array\n */\n/**\n * Performs a binary search on the provided sorted list and returns the index of the item if found. If it can't be found it'll return -1.\n * https://github.com/darkskyapp/binary-search\n *\n * @param {Array<*>} haystack Items to search through.\n * @param {*} needle The item to look for.\n * @param {Function} [opt_comparator] Comparator function.\n * @return {number} The index of the item if found, -1 if not.\n */\nexport function binarySearch(haystack, needle, opt_comparator) {\n    var mid, cmp;\n    var comparator = opt_comparator || numberSafeCompareFunction;\n    var low = 0;\n    var high = haystack.length;\n    var found = false;\n    while (low < high) {\n        /* Note that \"(low + high) >>> 1\" may overflow, and results in a typecast\n         * to double (which gives the wrong results). */\n        mid = low + ((high - low) >> 1);\n        cmp = +comparator(haystack[mid], needle);\n        if (cmp < 0.0) {\n            /* Too low. */\n            low = mid + 1;\n        }\n        else {\n            /* Key found or too high */\n            high = mid;\n            found = !cmp;\n        }\n    }\n    /* Key not found. */\n    return found ? low : ~low;\n}\n/**\n * Compare function for array sort that is safe for numbers.\n * @param {*} a The first object to be compared.\n * @param {*} b The second object to be compared.\n * @return {number} A negative number, zero, or a positive number as the first\n *     argument is less than, equal to, or greater than the second.\n */\nexport function numberSafeCompareFunction(a, b) {\n    return a > b ? 1 : a < b ? -1 : 0;\n}\n/**\n * Whether the array contains the given object.\n * @param {Array<*>} arr The array to test for the presence of the element.\n * @param {*} obj The object for which to test.\n * @return {boolean} The object is in the array.\n */\nexport function includes(arr, obj) {\n    return arr.indexOf(obj) >= 0;\n}\n/**\n * {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution} can use a function\n * of this type to determine which nearest resolution to use.\n *\n * This function takes a `{number}` representing a value between two array entries,\n * a `{number}` representing the value of the nearest higher entry and\n * a `{number}` representing the value of the nearest lower entry\n * as arguments and returns a `{number}`. If a negative number or zero is returned\n * the lower value will be used, if a positive number is returned the higher value\n * will be used.\n * @typedef {function(number, number, number): number} NearestDirectionFunction\n * @api\n */\n/**\n * @param {Array<number>} arr Array in desccending order.\n * @param {number} target Target.\n * @param {number|NearestDirectionFunction} direction\n *    0 means return the nearest,\n *    > 0 means return the largest nearest,\n *    < 0 means return the smallest nearest.\n * @return {number} Index.\n */\nexport function linearFindNearest(arr, target, direction) {\n    var n = arr.length;\n    if (arr[0] <= target) {\n        return 0;\n    }\n    else if (target <= arr[n - 1]) {\n        return n - 1;\n    }\n    else {\n        var i = void 0;\n        if (direction > 0) {\n            for (i = 1; i < n; ++i) {\n                if (arr[i] < target) {\n                    return i - 1;\n                }\n            }\n        }\n        else if (direction < 0) {\n            for (i = 1; i < n; ++i) {\n                if (arr[i] <= target) {\n                    return i;\n                }\n            }\n        }\n        else {\n            for (i = 1; i < n; ++i) {\n                if (arr[i] == target) {\n                    return i;\n                }\n                else if (arr[i] < target) {\n                    if (typeof direction === 'function') {\n                        if (direction(target, arr[i - 1], arr[i]) > 0) {\n                            return i - 1;\n                        }\n                        else {\n                            return i;\n                        }\n                    }\n                    else if (arr[i - 1] - target < target - arr[i]) {\n                        return i - 1;\n                    }\n                    else {\n                        return i;\n                    }\n                }\n            }\n        }\n        return n - 1;\n    }\n}\n/**\n * @param {Array<*>} arr Array.\n * @param {number} begin Begin index.\n * @param {number} end End index.\n */\nexport function reverseSubArray(arr, begin, end) {\n    while (begin < end) {\n        var tmp = arr[begin];\n        arr[begin] = arr[end];\n        arr[end] = tmp;\n        ++begin;\n        --end;\n    }\n}\n/**\n * @param {Array<VALUE>} arr The array to modify.\n * @param {!Array<VALUE>|VALUE} data The elements or arrays of elements to add to arr.\n * @template VALUE\n */\nexport function extend(arr, data) {\n    var extension = Array.isArray(data) ? data : [data];\n    var length = extension.length;\n    for (var i = 0; i < length; i++) {\n        arr[arr.length] = extension[i];\n    }\n}\n/**\n * @param {Array<VALUE>} arr The array to modify.\n * @param {VALUE} obj The element to remove.\n * @template VALUE\n * @return {boolean} If the element was removed.\n */\nexport function remove(arr, obj) {\n    var i = arr.indexOf(obj);\n    var found = i > -1;\n    if (found) {\n        arr.splice(i, 1);\n    }\n    return found;\n}\n/**\n * @param {Array<VALUE>} arr The array to search in.\n * @param {function(VALUE, number, ?) : boolean} func The function to compare.\n * @template VALUE\n * @return {VALUE|null} The element found or null.\n */\nexport function find(arr, func) {\n    var length = arr.length >>> 0;\n    var value;\n    for (var i = 0; i < length; i++) {\n        value = arr[i];\n        if (func(value, i, arr)) {\n            return value;\n        }\n    }\n    return null;\n}\n/**\n * @param {Array|Uint8ClampedArray} arr1 The first array to compare.\n * @param {Array|Uint8ClampedArray} arr2 The second array to compare.\n * @return {boolean} Whether the two arrays are equal.\n */\nexport function equals(arr1, arr2) {\n    var len1 = arr1.length;\n    if (len1 !== arr2.length) {\n        return false;\n    }\n    for (var i = 0; i < len1; i++) {\n        if (arr1[i] !== arr2[i]) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * Sort the passed array such that the relative order of equal elements is preverved.\n * See https://en.wikipedia.org/wiki/Sorting_algorithm#Stability for details.\n * @param {Array<*>} arr The array to sort (modifies original).\n * @param {!function(*, *): number} compareFnc Comparison function.\n * @api\n */\nexport function stableSort(arr, compareFnc) {\n    var length = arr.length;\n    var tmp = Array(arr.length);\n    var i;\n    for (i = 0; i < length; i++) {\n        tmp[i] = { index: i, value: arr[i] };\n    }\n    tmp.sort(function (a, b) {\n        return compareFnc(a.value, b.value) || a.index - b.index;\n    });\n    for (i = 0; i < arr.length; i++) {\n        arr[i] = tmp[i].value;\n    }\n}\n/**\n * @param {Array<*>} arr The array to search in.\n * @param {Function} func Comparison function.\n * @return {number} Return index.\n */\nexport function findIndex(arr, func) {\n    var index;\n    var found = !arr.every(function (el, idx) {\n        index = idx;\n        return !func(el, idx, arr);\n    });\n    return found ? index : -1;\n}\n/**\n * @param {Array<*>} arr The array to test.\n * @param {Function} [opt_func] Comparison function.\n * @param {boolean} [opt_strict] Strictly sorted (default false).\n * @return {boolean} Return index.\n */\nexport function isSorted(arr, opt_func, opt_strict) {\n    var compare = opt_func || numberSafeCompareFunction;\n    return arr.every(function (currentVal, index) {\n        if (index === 0) {\n            return true;\n        }\n        var res = compare(arr[index - 1], currentVal);\n        return !(res > 0 || (opt_strict && res === 0));\n    });\n}\n//# sourceMappingURL=array.js.map","/**\n * @module ol/math\n */\n/**\n * Takes a number and clamps it to within the provided bounds.\n * @param {number} value The input number.\n * @param {number} min The minimum value to return.\n * @param {number} max The maximum value to return.\n * @return {number} The input number if it is within bounds, or the nearest\n *     number within the bounds.\n */\nexport function clamp(value, min, max) {\n    return Math.min(Math.max(value, min), max);\n}\n/**\n * Return the hyperbolic cosine of a given number. The method will use the\n * native `Math.cosh` function if it is available, otherwise the hyperbolic\n * cosine will be calculated via the reference implementation of the Mozilla\n * developer network.\n *\n * @param {number} x X.\n * @return {number} Hyperbolic cosine of x.\n */\nexport var cosh = (function () {\n    // Wrapped in a iife, to save the overhead of checking for the native\n    // implementation on every invocation.\n    var cosh;\n    if ('cosh' in Math) {\n        // The environment supports the native Math.cosh function, use it…\n        cosh = Math.cosh;\n    }\n    else {\n        // … else, use the reference implementation of MDN:\n        cosh = function (x) {\n            var y = /** @type {Math} */ (Math).exp(x);\n            return (y + 1 / y) / 2;\n        };\n    }\n    return cosh;\n})();\n/**\n * Return the base 2 logarithm of a given number. The method will use the\n * native `Math.log2` function if it is available, otherwise the base 2\n * logarithm will be calculated via the reference implementation of the\n * Mozilla developer network.\n *\n * @param {number} x X.\n * @return {number} Base 2 logarithm of x.\n */\nexport var log2 = (function () {\n    // Wrapped in a iife, to save the overhead of checking for the native\n    // implementation on every invocation.\n    var log2;\n    if ('log2' in Math) {\n        // The environment supports the native Math.log2 function, use it…\n        log2 = Math.log2;\n    }\n    else {\n        // … else, use the reference implementation of MDN:\n        log2 = function (x) {\n            return Math.log(x) * Math.LOG2E;\n        };\n    }\n    return log2;\n})();\n/**\n * Returns the square of the closest distance between the point (x, y) and the\n * line segment (x1, y1) to (x2, y2).\n * @param {number} x X.\n * @param {number} y Y.\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\nexport function squaredSegmentDistance(x, y, x1, y1, x2, y2) {\n    var dx = x2 - x1;\n    var dy = y2 - y1;\n    if (dx !== 0 || dy !== 0) {\n        var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n        if (t > 1) {\n            x1 = x2;\n            y1 = y2;\n        }\n        else if (t > 0) {\n            x1 += dx * t;\n            y1 += dy * t;\n        }\n    }\n    return squaredDistance(x, y, x1, y1);\n}\n/**\n * Returns the square of the distance between the points (x1, y1) and (x2, y2).\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\nexport function squaredDistance(x1, y1, x2, y2) {\n    var dx = x2 - x1;\n    var dy = y2 - y1;\n    return dx * dx + dy * dy;\n}\n/**\n * Solves system of linear equations using Gaussian elimination method.\n *\n * @param {Array<Array<number>>} mat Augmented matrix (n x n + 1 column)\n *                                     in row-major order.\n * @return {Array<number>} The resulting vector.\n */\nexport function solveLinearSystem(mat) {\n    var n = mat.length;\n    for (var i = 0; i < n; i++) {\n        // Find max in the i-th column (ignoring i - 1 first rows)\n        var maxRow = i;\n        var maxEl = Math.abs(mat[i][i]);\n        for (var r = i + 1; r < n; r++) {\n            var absValue = Math.abs(mat[r][i]);\n            if (absValue > maxEl) {\n                maxEl = absValue;\n                maxRow = r;\n            }\n        }\n        if (maxEl === 0) {\n            return null; // matrix is singular\n        }\n        // Swap max row with i-th (current) row\n        var tmp = mat[maxRow];\n        mat[maxRow] = mat[i];\n        mat[i] = tmp;\n        // Subtract the i-th row to make all the remaining rows 0 in the i-th column\n        for (var j = i + 1; j < n; j++) {\n            var coef = -mat[j][i] / mat[i][i];\n            for (var k = i; k < n + 1; k++) {\n                if (i == k) {\n                    mat[j][k] = 0;\n                }\n                else {\n                    mat[j][k] += coef * mat[i][k];\n                }\n            }\n        }\n    }\n    // Solve Ax=b for upper triangular matrix A (mat)\n    var x = new Array(n);\n    for (var l = n - 1; l >= 0; l--) {\n        x[l] = mat[l][n] / mat[l][l];\n        for (var m = l - 1; m >= 0; m--) {\n            mat[m][n] -= mat[m][l] * x[l];\n        }\n    }\n    return x;\n}\n/**\n * Converts radians to to degrees.\n *\n * @param {number} angleInRadians Angle in radians.\n * @return {number} Angle in degrees.\n */\nexport function toDegrees(angleInRadians) {\n    return (angleInRadians * 180) / Math.PI;\n}\n/**\n * Converts degrees to radians.\n *\n * @param {number} angleInDegrees Angle in degrees.\n * @return {number} Angle in radians.\n */\nexport function toRadians(angleInDegrees) {\n    return (angleInDegrees * Math.PI) / 180;\n}\n/**\n * Returns the modulo of a / b, depending on the sign of b.\n *\n * @param {number} a Dividend.\n * @param {number} b Divisor.\n * @return {number} Modulo.\n */\nexport function modulo(a, b) {\n    var r = a % b;\n    return r * b < 0 ? r + b : r;\n}\n/**\n * Calculates the linearly interpolated value of x between a and b.\n *\n * @param {number} a Number\n * @param {number} b Number\n * @param {number} x Value to be interpolated.\n * @return {number} Interpolated value.\n */\nexport function lerp(a, b, x) {\n    return a + x * (b - a);\n}\n//# sourceMappingURL=math.js.map","/**\n * @module ol/events/EventType\n */\n/**\n * @enum {string}\n * @const\n */\nexport default {\n    /**\n     * Generic change event. Triggered when the revision counter is increased.\n     * @event module:ol/events/Event~BaseEvent#change\n     * @api\n     */\n    CHANGE: 'change',\n    /**\n     * Generic error event. Triggered when an error occurs.\n     * @event module:ol/events/Event~BaseEvent#error\n     * @api\n     */\n    ERROR: 'error',\n    BLUR: 'blur',\n    CLEAR: 'clear',\n    CONTEXTMENU: 'contextmenu',\n    CLICK: 'click',\n    DBLCLICK: 'dblclick',\n    DRAGENTER: 'dragenter',\n    DRAGOVER: 'dragover',\n    DROP: 'drop',\n    FOCUS: 'focus',\n    KEYDOWN: 'keydown',\n    KEYPRESS: 'keypress',\n    LOAD: 'load',\n    RESIZE: 'resize',\n    TOUCHMOVE: 'touchmove',\n    WHEEL: 'wheel',\n};\n//# sourceMappingURL=EventType.js.map","/**\n * @module ol/events\n */\nimport { clear } from './obj.js';\n/**\n * Key to use with {@link module:ol/Observable~Observable#unByKey}.\n * @typedef {Object} EventsKey\n * @property {ListenerFunction} listener Listener.\n * @property {import(\"./events/Target.js\").EventTargetLike} target Target.\n * @property {string} type Type.\n * @api\n */\n/**\n * Listener function. This function is called with an event object as argument.\n * When the function returns `false`, event propagation will stop.\n *\n * @typedef {function((Event|import(\"./events/Event.js\").default)): (void|boolean)} ListenerFunction\n * @api\n */\n/**\n * @typedef {Object} ListenerObject\n * @property {ListenerFunction} handleEvent HandleEvent listener function.\n */\n/**\n * @typedef {ListenerFunction|ListenerObject} Listener\n */\n/**\n * Registers an event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` to a `this` object, and returns\n * a key for use with {@link module:ol/events.unlistenByKey}.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object} [opt_this] Object referenced by the `this` keyword in the\n *     listener. Default is the `target`.\n * @param {boolean} [opt_once] If true, add the listener as one-off listener.\n * @return {EventsKey} Unique key for the listener.\n */\nexport function listen(target, type, listener, opt_this, opt_once) {\n    if (opt_this && opt_this !== target) {\n        listener = listener.bind(opt_this);\n    }\n    if (opt_once) {\n        var originalListener_1 = listener;\n        listener = function () {\n            target.removeEventListener(type, listener);\n            originalListener_1.apply(this, arguments);\n        };\n    }\n    var eventsKey = {\n        target: target,\n        type: type,\n        listener: listener,\n    };\n    target.addEventListener(type, listener);\n    return eventsKey;\n}\n/**\n * Registers a one-off event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` as self-unregistering listener\n * to a `this` object, and returns a key for use with\n * {@link module:ol/events.unlistenByKey} in case the listener needs to be\n * unregistered before it is called.\n *\n * When {@link module:ol/events.listen} is called with the same arguments after this\n * function, the self-unregistering listener will be turned into a permanent\n * listener.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object} [opt_this] Object referenced by the `this` keyword in the\n *     listener. Default is the `target`.\n * @return {EventsKey} Key for unlistenByKey.\n */\nexport function listenOnce(target, type, listener, opt_this) {\n    return listen(target, type, listener, opt_this, true);\n}\n/**\n * Unregisters event listeners on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * The argument passed to this function is the key returned from\n * {@link module:ol/events.listen} or {@link module:ol/events.listenOnce}.\n *\n * @param {EventsKey} key The key.\n */\nexport function unlistenByKey(key) {\n    if (key && key.target) {\n        key.target.removeEventListener(key.type, key.listener);\n        clear(key);\n    }\n}\n//# sourceMappingURL=events.js.map","let _culture = \"\";\r\nlet _labels = {};\r\n\r\n/**\r\n * Contains static methods that are used to translate text displayed by the PMA.UI framework\r\n * @namespace PMA.UI.Resources\r\n */\r\n\r\nexport const Resources = {\r\n    /**\r\n     * Static hashmap that holds one array per available culture, e.g. PMA.UI.Resources.Labels['en-US'] or PMA.UI.Resources.Labels.en-US\r\n     * @type {Object}\r\n     */\r\n    Labels: _labels,\r\n\r\n    /**\r\n    * Sets the current culture\r\n    * @param {string} culture - E.g. \"en-US\"\r\n    */\r\n    setCulture: function (culture) {\r\n        _culture = culture;\r\n    },\r\n\r\n    interpolate: function (text, o) {\r\n        return text.replace(/{([^{}]*)}/g,\r\n            function (a, b) {\r\n                var r = o[b];\r\n                return typeof r === 'string' || typeof r === 'number' ? r : a;\r\n            });\r\n    },\r\n\r\n    /**\r\n     * Translates a string\r\n     * @param {string} text - The text to translate. It can be a simple string literal or it can also contain values that should be interpolated such as \"{pageCount} of {totalResultCount} items\"\r\n     * @param {object} [o] - If text needs interpolation, o then holds all the properties that should be replaced within it\r\n     * @returns {string} The translated string\r\n     */\r\n    translate: function (text, o) {\r\n        if (_culture !== \"\" && _labels[_culture].hasOwnProperty(text)) {\r\n            text = _labels[_culture][text];\r\n        }\r\n        //else {\r\n        //    console.log(\"Translation missing: '\" + text + \"'\");\r\n        //}\r\n\r\n        if (typeof o === \"object\") {\r\n            return this.interpolate(text, o);\r\n        }\r\n        else {\r\n            return text;\r\n        }\r\n    }\r\n}\r\n\r\n","module.exports = jQuery;","/**\n * @module ol/asserts\n */\nimport AssertionError from './AssertionError.js';\n/**\n * @param {*} assertion Assertion we expected to be truthy.\n * @param {number} errorCode Error code.\n */\nexport function assert(assertion, errorCode) {\n    if (!assertion) {\n        throw new AssertionError(errorCode);\n    }\n}\n//# sourceMappingURL=asserts.js.map","/**\n * @module ol/transform\n */\nimport { WORKER_OFFSCREEN_CANVAS } from './has.js';\nimport { assert } from './asserts.js';\n/**\n * An array representing an affine 2d transformation for use with\n * {@link module:ol/transform} functions. The array has 6 elements.\n * @typedef {!Array<number>} Transform\n * @api\n */\n/**\n * Collection of affine 2d transformation functions. The functions work on an\n * array of 6 elements. The element order is compatible with the [SVGMatrix\n * interface](https://developer.mozilla.org/en-US/docs/Web/API/SVGMatrix) and is\n * a subset (elements a to f) of a 3×3 matrix:\n * ```\n * [ a c e ]\n * [ b d f ]\n * [ 0 0 1 ]\n * ```\n */\n/**\n * @private\n * @type {Transform}\n */\nvar tmp_ = new Array(6);\n/**\n * Create an identity transform.\n * @return {!Transform} Identity transform.\n */\nexport function create() {\n    return [1, 0, 0, 1, 0, 0];\n}\n/**\n * Resets the given transform to an identity transform.\n * @param {!Transform} transform Transform.\n * @return {!Transform} Transform.\n */\nexport function reset(transform) {\n    return set(transform, 1, 0, 0, 1, 0, 0);\n}\n/**\n * Multiply the underlying matrices of two transforms and return the result in\n * the first transform.\n * @param {!Transform} transform1 Transform parameters of matrix 1.\n * @param {!Transform} transform2 Transform parameters of matrix 2.\n * @return {!Transform} transform1 multiplied with transform2.\n */\nexport function multiply(transform1, transform2) {\n    var a1 = transform1[0];\n    var b1 = transform1[1];\n    var c1 = transform1[2];\n    var d1 = transform1[3];\n    var e1 = transform1[4];\n    var f1 = transform1[5];\n    var a2 = transform2[0];\n    var b2 = transform2[1];\n    var c2 = transform2[2];\n    var d2 = transform2[3];\n    var e2 = transform2[4];\n    var f2 = transform2[5];\n    transform1[0] = a1 * a2 + c1 * b2;\n    transform1[1] = b1 * a2 + d1 * b2;\n    transform1[2] = a1 * c2 + c1 * d2;\n    transform1[3] = b1 * c2 + d1 * d2;\n    transform1[4] = a1 * e2 + c1 * f2 + e1;\n    transform1[5] = b1 * e2 + d1 * f2 + f1;\n    return transform1;\n}\n/**\n * Set the transform components a-f on a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} a The a component of the transform.\n * @param {number} b The b component of the transform.\n * @param {number} c The c component of the transform.\n * @param {number} d The d component of the transform.\n * @param {number} e The e component of the transform.\n * @param {number} f The f component of the transform.\n * @return {!Transform} Matrix with transform applied.\n */\nexport function set(transform, a, b, c, d, e, f) {\n    transform[0] = a;\n    transform[1] = b;\n    transform[2] = c;\n    transform[3] = d;\n    transform[4] = e;\n    transform[5] = f;\n    return transform;\n}\n/**\n * Set transform on one matrix from another matrix.\n * @param {!Transform} transform1 Matrix to set transform to.\n * @param {!Transform} transform2 Matrix to set transform from.\n * @return {!Transform} transform1 with transform from transform2 applied.\n */\nexport function setFromArray(transform1, transform2) {\n    transform1[0] = transform2[0];\n    transform1[1] = transform2[1];\n    transform1[2] = transform2[2];\n    transform1[3] = transform2[3];\n    transform1[4] = transform2[4];\n    transform1[5] = transform2[5];\n    return transform1;\n}\n/**\n * Transforms the given coordinate with the given transform returning the\n * resulting, transformed coordinate. The coordinate will be modified in-place.\n *\n * @param {Transform} transform The transformation.\n * @param {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} coordinate The coordinate to transform.\n * @return {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} return coordinate so that operations can be\n *     chained together.\n */\nexport function apply(transform, coordinate) {\n    var x = coordinate[0];\n    var y = coordinate[1];\n    coordinate[0] = transform[0] * x + transform[2] * y + transform[4];\n    coordinate[1] = transform[1] * x + transform[3] * y + transform[5];\n    return coordinate;\n}\n/**\n * Applies rotation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} angle Angle in radians.\n * @return {!Transform} The rotated transform.\n */\nexport function rotate(transform, angle) {\n    var cos = Math.cos(angle);\n    var sin = Math.sin(angle);\n    return multiply(transform, set(tmp_, cos, sin, -sin, cos, 0, 0));\n}\n/**\n * Applies scale to a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} x Scale factor x.\n * @param {number} y Scale factor y.\n * @return {!Transform} The scaled transform.\n */\nexport function scale(transform, x, y) {\n    return multiply(transform, set(tmp_, x, 0, 0, y, 0, 0));\n}\n/**\n * Creates a scale transform.\n * @param {!Transform} target Transform to overwrite.\n * @param {number} x Scale factor x.\n * @param {number} y Scale factor y.\n * @return {!Transform} The scale transform.\n */\nexport function makeScale(target, x, y) {\n    return set(target, x, 0, 0, y, 0, 0);\n}\n/**\n * Applies translation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} dx Translation x.\n * @param {number} dy Translation y.\n * @return {!Transform} The translated transform.\n */\nexport function translate(transform, dx, dy) {\n    return multiply(transform, set(tmp_, 1, 0, 0, 1, dx, dy));\n}\n/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative).\n * @param {!Transform} transform The transform (will be modified in place).\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Final translation x.\n * @param {number} dy2 Final translation y.\n * @return {!Transform} The composite transform.\n */\nexport function compose(transform, dx1, dy1, sx, sy, angle, dx2, dy2) {\n    var sin = Math.sin(angle);\n    var cos = Math.cos(angle);\n    transform[0] = sx * cos;\n    transform[1] = sy * sin;\n    transform[2] = -sx * sin;\n    transform[3] = sy * cos;\n    transform[4] = dx2 * sx * cos - dy2 * sx * sin + dx1;\n    transform[5] = dx2 * sy * sin + dy2 * sy * cos + dy1;\n    return transform;\n}\n/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative). The resulting transform\n * string can be applied as `transform` property of an HTMLElement's style.\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Final translation x.\n * @param {number} dy2 Final translation y.\n * @return {string} The composite css transform.\n * @api\n */\nexport function composeCssTransform(dx1, dy1, sx, sy, angle, dx2, dy2) {\n    return toString(compose(create(), dx1, dy1, sx, sy, angle, dx2, dy2));\n}\n/**\n * Invert the given transform.\n * @param {!Transform} source The source transform to invert.\n * @return {!Transform} The inverted (source) transform.\n */\nexport function invert(source) {\n    return makeInverse(source, source);\n}\n/**\n * Invert the given transform.\n * @param {!Transform} target Transform to be set as the inverse of\n *     the source transform.\n * @param {!Transform} source The source transform to invert.\n * @return {!Transform} The inverted (target) transform.\n */\nexport function makeInverse(target, source) {\n    var det = determinant(source);\n    assert(det !== 0, 32); // Transformation matrix cannot be inverted\n    var a = source[0];\n    var b = source[1];\n    var c = source[2];\n    var d = source[3];\n    var e = source[4];\n    var f = source[5];\n    target[0] = d / det;\n    target[1] = -b / det;\n    target[2] = -c / det;\n    target[3] = a / det;\n    target[4] = (c * f - d * e) / det;\n    target[5] = -(a * f - b * e) / det;\n    return target;\n}\n/**\n * Returns the determinant of the given matrix.\n * @param {!Transform} mat Matrix.\n * @return {number} Determinant.\n */\nexport function determinant(mat) {\n    return mat[0] * mat[3] - mat[1] * mat[2];\n}\n/**\n * @type {HTMLElement}\n * @private\n */\nvar transformStringDiv;\n/**\n * A rounded string version of the transform.  This can be used\n * for CSS transforms.\n * @param {!Transform} mat Matrix.\n * @return {string} The transform as a string.\n */\nexport function toString(mat) {\n    var transformString = 'matrix(' + mat.join(', ') + ')';\n    if (WORKER_OFFSCREEN_CANVAS) {\n        return transformString;\n    }\n    var node = transformStringDiv || (transformStringDiv = document.createElement('div'));\n    node.style.transform = transformString;\n    return node.style.transform;\n}\n//# sourceMappingURL=transform.js.map","/**\n * @module ol/TileState\n */\n/**\n * @enum {number}\n */\nexport default {\n    IDLE: 0,\n    LOADING: 1,\n    LOADED: 2,\n    /**\n     * Indicates that tile loading failed\n     * @type {number}\n     */\n    ERROR: 3,\n    EMPTY: 4,\n};\n//# sourceMappingURL=TileState.js.map","/**\n * @module ol/geom/GeometryLayout\n */\n/**\n * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')\n * or measure ('M') coordinate is available. Supported values are `'XY'`,\n * `'XYZ'`, `'XYM'`, `'XYZM'`.\n * @enum {string}\n */\nexport default {\n    XY: 'XY',\n    XYZ: 'XYZ',\n    XYM: 'XYM',\n    XYZM: 'XYZM',\n};\n//# sourceMappingURL=GeometryLayout.js.map","/**\n * @module ol/render/canvas\n */\nimport BaseObject from '../Object.js';\nimport EventTarget from '../events/Target.js';\nimport { WORKER_OFFSCREEN_CANVAS } from '../has.js';\nimport { clear } from '../obj.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { getFontParameters } from '../css.js';\n/**\n * @typedef {Object} FillState\n * @property {import(\"../colorlike.js\").ColorLike} fillStyle FillStyle.\n */\n/**\n * @typedef Label\n * @property {number} width Width.\n * @property {number} height Height.\n * @property {Array<string|number>} contextInstructions ContextInstructions.\n */\n/**\n * @typedef {Object} FillStrokeState\n * @property {import(\"../colorlike.js\").ColorLike} [currentFillStyle] Current FillStyle.\n * @property {import(\"../colorlike.js\").ColorLike} [currentStrokeStyle] Current StrokeStyle.\n * @property {CanvasLineCap} [currentLineCap] Current LineCap.\n * @property {Array<number>} currentLineDash Current LineDash.\n * @property {number} [currentLineDashOffset] Current LineDashOffset.\n * @property {CanvasLineJoin} [currentLineJoin] Current LineJoin.\n * @property {number} [currentLineWidth] Current LineWidth.\n * @property {number} [currentMiterLimit] Current MiterLimit.\n * @property {number} [lastStroke] Last stroke.\n * @property {import(\"../colorlike.js\").ColorLike} [fillStyle] FillStyle.\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle] StrokeStyle.\n * @property {CanvasLineCap} [lineCap] LineCap.\n * @property {Array<number>} lineDash LineDash.\n * @property {number} [lineDashOffset] LineDashOffset.\n * @property {CanvasLineJoin} [lineJoin] LineJoin.\n * @property {number} [lineWidth] LineWidth.\n * @property {number} [miterLimit] MiterLimit.\n */\n/**\n * @typedef {Object} StrokeState\n * @property {CanvasLineCap} lineCap LineCap.\n * @property {Array<number>} lineDash LineDash.\n * @property {number} lineDashOffset LineDashOffset.\n * @property {CanvasLineJoin} lineJoin LineJoin.\n * @property {number} lineWidth LineWidth.\n * @property {number} miterLimit MiterLimit.\n * @property {import(\"../colorlike.js\").ColorLike} strokeStyle StrokeStyle.\n */\n/**\n * @typedef {Object} TextState\n * @property {string} font Font.\n * @property {string} [textAlign] TextAlign.\n * @property {string} textBaseline TextBaseline.\n * @property {string} [placement] Placement.\n * @property {number} [maxAngle] MaxAngle.\n * @property {boolean} [overflow] Overflow.\n * @property {import(\"../style/Fill.js\").default} [backgroundFill] BackgroundFill.\n * @property {import(\"../style/Stroke.js\").default} [backgroundStroke] BackgroundStroke.\n * @property {import(\"../size.js\").Size} [scale] Scale.\n * @property {Array<number>} [padding] Padding.\n */\n/**\n * @typedef {Object} SerializableInstructions\n * @property {Array<*>} instructions The rendering instructions.\n * @property {Array<*>} hitDetectionInstructions The rendering hit detection instructions.\n * @property {Array<number>} coordinates The array of all coordinates.\n * @property {!Object<string, TextState>} [textStates] The text states (decluttering).\n * @property {!Object<string, FillState>} [fillStates] The fill states (decluttering).\n * @property {!Object<string, StrokeState>} [strokeStates] The stroke states (decluttering).\n */\n/**\n * @typedef {Object<number, import(\"./canvas/Executor.js\").ReplayImageOrLabelArgs>} DeclutterImageWithText\n */\n/**\n * @const\n * @type {string}\n */\nexport var defaultFont = '10px sans-serif';\n/**\n * @const\n * @type {import(\"../colorlike.js\").ColorLike}\n */\nexport var defaultFillStyle = '#000';\n/**\n * @const\n * @type {CanvasLineCap}\n */\nexport var defaultLineCap = 'round';\n/**\n * @const\n * @type {Array<number>}\n */\nexport var defaultLineDash = [];\n/**\n * @const\n * @type {number}\n */\nexport var defaultLineDashOffset = 0;\n/**\n * @const\n * @type {CanvasLineJoin}\n */\nexport var defaultLineJoin = 'round';\n/**\n * @const\n * @type {number}\n */\nexport var defaultMiterLimit = 10;\n/**\n * @const\n * @type {import(\"../colorlike.js\").ColorLike}\n */\nexport var defaultStrokeStyle = '#000';\n/**\n * @const\n * @type {string}\n */\nexport var defaultTextAlign = 'center';\n/**\n * @const\n * @type {string}\n */\nexport var defaultTextBaseline = 'middle';\n/**\n * @const\n * @type {Array<number>}\n */\nexport var defaultPadding = [0, 0, 0, 0];\n/**\n * @const\n * @type {number}\n */\nexport var defaultLineWidth = 1;\n/**\n * @type {BaseObject}\n */\nexport var checkedFonts = new BaseObject();\n/**\n * The label cache for text rendering. To change the default cache size of 2048\n * entries, use {@link module:ol/structs/LRUCache~LRUCache#setSize cache.setSize()}.\n * Deprecated - there is no label cache any more.\n * @type {?}\n * @api\n * @deprecated\n */\nexport var labelCache = new EventTarget();\nlabelCache.setSize = function () {\n    console.warn('labelCache is deprecated.'); //eslint-disable-line\n};\n/**\n * @type {CanvasRenderingContext2D}\n */\nvar measureContext = null;\n/**\n * @type {string}\n */\nvar measureFont;\n/**\n * @type {!Object<string, number>}\n */\nexport var textHeights = {};\n/**\n * Clears the label cache when a font becomes available.\n * @param {string} fontSpec CSS font spec.\n */\nexport var registerFont = (function () {\n    var retries = 100;\n    var size = '32px ';\n    var referenceFonts = ['monospace', 'serif'];\n    var len = referenceFonts.length;\n    var text = 'wmytzilWMYTZIL@#/&?$%10\\uF013';\n    var interval, referenceWidth;\n    /**\n     * @param {string} fontStyle Css font-style\n     * @param {string} fontWeight Css font-weight\n     * @param {*} fontFamily Css font-family\n     * @return {boolean} Font with style and weight is available\n     */\n    function isAvailable(fontStyle, fontWeight, fontFamily) {\n        var available = true;\n        for (var i = 0; i < len; ++i) {\n            var referenceFont = referenceFonts[i];\n            referenceWidth = measureTextWidth(fontStyle + ' ' + fontWeight + ' ' + size + referenceFont, text);\n            if (fontFamily != referenceFont) {\n                var width = measureTextWidth(fontStyle +\n                    ' ' +\n                    fontWeight +\n                    ' ' +\n                    size +\n                    fontFamily +\n                    ',' +\n                    referenceFont, text);\n                // If width and referenceWidth are the same, then the fallback was used\n                // instead of the font we wanted, so the font is not available.\n                available = available && width != referenceWidth;\n            }\n        }\n        if (available) {\n            return true;\n        }\n        return false;\n    }\n    function check() {\n        var done = true;\n        var fonts = checkedFonts.getKeys();\n        for (var i = 0, ii = fonts.length; i < ii; ++i) {\n            var font = fonts[i];\n            if (checkedFonts.get(font) < retries) {\n                if (isAvailable.apply(this, font.split('\\n'))) {\n                    clear(textHeights);\n                    // Make sure that loaded fonts are picked up by Safari\n                    measureContext = null;\n                    measureFont = undefined;\n                    checkedFonts.set(font, retries);\n                }\n                else {\n                    checkedFonts.set(font, checkedFonts.get(font) + 1, true);\n                    done = false;\n                }\n            }\n        }\n        if (done) {\n            clearInterval(interval);\n            interval = undefined;\n        }\n    }\n    return function (fontSpec) {\n        var font = getFontParameters(fontSpec);\n        if (!font) {\n            return;\n        }\n        var families = font.families;\n        for (var i = 0, ii = families.length; i < ii; ++i) {\n            var family = families[i];\n            var key = font.style + '\\n' + font.weight + '\\n' + family;\n            if (checkedFonts.get(key) === undefined) {\n                checkedFonts.set(key, retries, true);\n                if (!isAvailable(font.style, font.weight, family)) {\n                    checkedFonts.set(key, 0, true);\n                    if (interval === undefined) {\n                        interval = setInterval(check, 32);\n                    }\n                }\n            }\n        }\n    };\n})();\n/**\n * @param {string} font Font to use for measuring.\n * @return {import(\"../size.js\").Size} Measurement.\n */\nexport var measureTextHeight = (function () {\n    /**\n     * @type {HTMLDivElement}\n     */\n    var measureElement;\n    return function (fontSpec) {\n        var height = textHeights[fontSpec];\n        if (height == undefined) {\n            if (WORKER_OFFSCREEN_CANVAS) {\n                var font = getFontParameters(fontSpec);\n                var metrics = measureText(fontSpec, 'Žg');\n                var lineHeight = isNaN(Number(font.lineHeight))\n                    ? 1.2\n                    : Number(font.lineHeight);\n                height =\n                    lineHeight *\n                        (metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent);\n            }\n            else {\n                if (!measureElement) {\n                    measureElement = document.createElement('div');\n                    measureElement.innerHTML = 'M';\n                    measureElement.style.minHeight = '0';\n                    measureElement.style.maxHeight = 'none';\n                    measureElement.style.height = 'auto';\n                    measureElement.style.padding = '0';\n                    measureElement.style.border = 'none';\n                    measureElement.style.position = 'absolute';\n                    measureElement.style.display = 'block';\n                    measureElement.style.left = '-99999px';\n                }\n                measureElement.style.font = fontSpec;\n                document.body.appendChild(measureElement);\n                height = measureElement.offsetHeight;\n                document.body.removeChild(measureElement);\n            }\n            textHeights[fontSpec] = height;\n        }\n        return height;\n    };\n})();\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {TextMetrics} Text metrics.\n */\nfunction measureText(font, text) {\n    if (!measureContext) {\n        measureContext = createCanvasContext2D(1, 1);\n    }\n    if (font != measureFont) {\n        measureContext.font = font;\n        measureFont = measureContext.font;\n    }\n    return measureContext.measureText(text);\n}\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {number} Width.\n */\nexport function measureTextWidth(font, text) {\n    return measureText(font, text).width;\n}\n/**\n * Measure text width using a cache.\n * @param {string} font The font.\n * @param {string} text The text to measure.\n * @param {Object<string, number>} cache A lookup of cached widths by text.\n * @return {number} The text width.\n */\nexport function measureAndCacheTextWidth(font, text, cache) {\n    if (text in cache) {\n        return cache[text];\n    }\n    var width = measureTextWidth(font, text);\n    cache[text] = width;\n    return width;\n}\n/**\n * @param {string} font Font to use for measuring.\n * @param {Array<string>} lines Lines to measure.\n * @param {Array<number>} widths Array will be populated with the widths of\n * each line.\n * @return {number} Width of the whole text.\n */\nexport function measureTextWidths(font, lines, widths) {\n    var numLines = lines.length;\n    var width = 0;\n    for (var i = 0; i < numLines; ++i) {\n        var currentWidth = measureTextWidth(font, lines[i]);\n        width = Math.max(width, currentWidth);\n        widths.push(currentWidth);\n    }\n    return width;\n}\n/**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} rotation Rotation.\n * @param {number} offsetX X offset.\n * @param {number} offsetY Y offset.\n */\nexport function rotateAtOffset(context, rotation, offsetX, offsetY) {\n    if (rotation !== 0) {\n        context.translate(offsetX, offsetY);\n        context.rotate(rotation);\n        context.translate(-offsetX, -offsetY);\n    }\n}\n/**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../transform.js\").Transform|null} transform Transform.\n * @param {number} opacity Opacity.\n * @param {Label|HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} labelOrImage Label.\n * @param {number} originX Origin X.\n * @param {number} originY Origin Y.\n * @param {number} w Width.\n * @param {number} h Height.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../size.js\").Size} scale Scale.\n */\nexport function drawImageOrLabel(context, transform, opacity, labelOrImage, originX, originY, w, h, x, y, scale) {\n    context.save();\n    if (opacity !== 1) {\n        context.globalAlpha *= opacity;\n    }\n    if (transform) {\n        context.setTransform.apply(context, transform);\n    }\n    if ( /** @type {*} */(labelOrImage).contextInstructions) {\n        // label\n        context.translate(x, y);\n        context.scale(scale[0], scale[1]);\n        executeLabelInstructions(/** @type {Label} */ (labelOrImage), context);\n    }\n    else if (scale[0] < 0 || scale[1] < 0) {\n        // flipped image\n        context.translate(x, y);\n        context.scale(scale[0], scale[1]);\n        context.drawImage(\n        /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ (labelOrImage), originX, originY, w, h, 0, 0, w, h);\n    }\n    else {\n        // if image not flipped translate and scale can be avoided\n        context.drawImage(\n        /** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */ (labelOrImage), originX, originY, w, h, x, y, w * scale[0], h * scale[1]);\n    }\n    context.restore();\n}\n/**\n * @param {Label} label Label.\n * @param {CanvasRenderingContext2D} context Context.\n */\nfunction executeLabelInstructions(label, context) {\n    var contextInstructions = label.contextInstructions;\n    for (var i = 0, ii = contextInstructions.length; i < ii; i += 2) {\n        if (Array.isArray(contextInstructions[i + 1])) {\n            context[contextInstructions[i]].apply(context, contextInstructions[i + 1]);\n        }\n        else {\n            context[contextInstructions[i]] = contextInstructions[i + 1];\n        }\n    }\n}\n//# sourceMappingURL=canvas.js.map","import * as olStyles from 'ol/style';\r\nimport * as olControls from 'ol/control';\r\nimport * as olProj from 'ol/proj';\r\nimport * as olLayer from 'ol/layer';\r\nimport * as olSource from 'ol/source';\r\nimport * as olTilegrid from 'ol/tilegrid';\r\nimport * as olInteractions from 'ol/interaction';\r\nimport * as olEvents from 'ol/events';\r\nimport * as olFormat from 'ol/format';\r\nimport * as olExtent from 'ol/extent';\r\nimport * as olGeom from 'ol/geom';\r\nimport * as olOverlay from 'ol/Overlay';\r\n\r\nexport const ol = {\r\n    layer: olLayer,\r\n    source: olSource,\r\n    tilegrid: olTilegrid,\r\n    proj: olProj,\r\n    control: olControls,\r\n    style: olStyles,\r\n    interaction: olInteractions,\r\n    events: olEvents,\r\n    format: olFormat,\r\n    extent: olExtent,\r\n    geom: olGeom,\r\n}","/**\n * @module ol/render/canvas/Instruction\n */\n/**\n * @enum {number}\n */\nvar Instruction = {\n    BEGIN_GEOMETRY: 0,\n    BEGIN_PATH: 1,\n    CIRCLE: 2,\n    CLOSE_PATH: 3,\n    CUSTOM: 4,\n    DRAW_CHARS: 5,\n    DRAW_IMAGE: 6,\n    END_GEOMETRY: 7,\n    FILL: 8,\n    MOVE_TO_LINE_TO: 9,\n    SET_FILL_STYLE: 10,\n    SET_STROKE_STYLE: 11,\n    STROKE: 12,\n};\n/**\n * @type {Array<Instruction>}\n */\nexport var fillInstruction = [Instruction.FILL];\n/**\n * @type {Array<Instruction>}\n */\nexport var strokeInstruction = [Instruction.STROKE];\n/**\n * @type {Array<Instruction>}\n */\nexport var beginPathInstruction = [Instruction.BEGIN_PATH];\n/**\n * @type {Array<Instruction>}\n */\nexport var closePathInstruction = [Instruction.CLOSE_PATH];\nexport default Instruction;\n//# sourceMappingURL=Instruction.js.map","/**\n * @module ol/events/condition\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport { FALSE, TRUE } from '../functions.js';\nimport { MAC, WEBKIT } from '../has.js';\nimport { assert } from '../asserts.js';\n/**\n * A function that takes an {@link module:ol/MapBrowserEvent} and returns a\n * `{boolean}`. If the condition is met, true should be returned.\n *\n * @typedef {function(this: ?, import(\"../MapBrowserEvent.js\").default): boolean} Condition\n */\n/**\n * Creates a condition function that passes when all provided conditions pass.\n * @param {...Condition} var_args Conditions to check.\n * @return {Condition} Condition function.\n */\nexport function all(var_args) {\n    var conditions = arguments;\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @return {boolean} All conditions passed.\n     */\n    return function (event) {\n        var pass = true;\n        for (var i = 0, ii = conditions.length; i < ii; ++i) {\n            pass = pass && conditions[i](event);\n            if (!pass) {\n                break;\n            }\n        }\n        return pass;\n    };\n}\n/**\n * Return `true` if only the alt-key is pressed, `false` otherwise (e.g. when\n * additionally the shift-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the alt key is pressed.\n * @api\n */\nexport var altKeyOnly = function (mapBrowserEvent) {\n    var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n    return (originalEvent.altKey &&\n        !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n        !originalEvent.shiftKey);\n};\n/**\n * Return `true` if only the alt-key and shift-key is pressed, `false` otherwise\n * (e.g. when additionally the platform-modifier-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the alt and shift keys are pressed.\n * @api\n */\nexport var altShiftKeysOnly = function (mapBrowserEvent) {\n    var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n    return (originalEvent.altKey &&\n        !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n        originalEvent.shiftKey);\n};\n/**\n * Return `true` if the map has the focus. This condition requires a map target\n * element with a `tabindex` attribute, e.g. `<div id=\"map\" tabindex=\"1\">`.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} The map has the focus.\n * @api\n */\nexport var focus = function (event) {\n    return event.target.getTargetElement().contains(document.activeElement);\n};\n/**\n * Return `true` if the map has the focus or no 'tabindex' attribute set.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} The map container has the focus or no 'tabindex' attribute.\n */\nexport var focusWithTabindex = function (event) {\n    return event.map.getTargetElement().hasAttribute('tabindex')\n        ? focus(event)\n        : true;\n};\n/**\n * Return always true.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True.\n * @api\n */\nexport var always = TRUE;\n/**\n * Return `true` if the event is a `click` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `click` event.\n * @api\n */\nexport var click = function (mapBrowserEvent) {\n    return mapBrowserEvent.type == MapBrowserEventType.CLICK;\n};\n/**\n * Return `true` if the event has an \"action\"-producing mouse button.\n *\n * By definition, this includes left-click on windows/linux, and left-click\n * without the ctrl key on Macs.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} The result.\n */\nexport var mouseActionButton = function (mapBrowserEvent) {\n    var originalEvent = /** @type {MouseEvent} */ (mapBrowserEvent.originalEvent);\n    return originalEvent.button == 0 && !(WEBKIT && MAC && originalEvent.ctrlKey);\n};\n/**\n * Return always false.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} False.\n * @api\n */\nexport var never = FALSE;\n/**\n * Return `true` if the browser event is a `pointermove` event, `false`\n * otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the browser event is a `pointermove` event.\n * @api\n */\nexport var pointerMove = function (mapBrowserEvent) {\n    return mapBrowserEvent.type == 'pointermove';\n};\n/**\n * Return `true` if the event is a map `singleclick` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `singleclick` event.\n * @api\n */\nexport var singleClick = function (mapBrowserEvent) {\n    return mapBrowserEvent.type == MapBrowserEventType.SINGLECLICK;\n};\n/**\n * Return `true` if the event is a map `dblclick` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `dblclick` event.\n * @api\n */\nexport var doubleClick = function (mapBrowserEvent) {\n    return mapBrowserEvent.type == MapBrowserEventType.DBLCLICK;\n};\n/**\n * Return `true` if no modifier key (alt-, shift- or platform-modifier-key) is\n * pressed.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True only if there no modifier keys are pressed.\n * @api\n */\nexport var noModifierKeys = function (mapBrowserEvent) {\n    var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n    return (!originalEvent.altKey &&\n        !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n        !originalEvent.shiftKey);\n};\n/**\n * Return `true` if only the platform-modifier-key (the meta-key on Mac,\n * ctrl-key otherwise) is pressed, `false` otherwise (e.g. when additionally\n * the shift-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the platform modifier key is pressed.\n * @api\n */\nexport var platformModifierKeyOnly = function (mapBrowserEvent) {\n    var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n    return (!originalEvent.altKey &&\n        (MAC ? originalEvent.metaKey : originalEvent.ctrlKey) &&\n        !originalEvent.shiftKey);\n};\n/**\n * Return `true` if only the shift-key is pressed, `false` otherwise (e.g. when\n * additionally the alt-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the shift key is pressed.\n * @api\n */\nexport var shiftKeyOnly = function (mapBrowserEvent) {\n    var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n    return (!originalEvent.altKey &&\n        !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n        originalEvent.shiftKey);\n};\n/**\n * Return `true` if the target element is not editable, i.e. not a `<input>`-,\n * `<select>`- or `<textarea>`-element, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True only if the target element is not editable.\n * @api\n */\nexport var targetNotEditable = function (mapBrowserEvent) {\n    var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n    var tagName = /** @type {Element} */ (originalEvent.target).tagName;\n    return tagName !== 'INPUT' && tagName !== 'SELECT' && tagName !== 'TEXTAREA';\n};\n/**\n * Return `true` if the event originates from a mouse device.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a mouse device.\n * @api\n */\nexport var mouseOnly = function (mapBrowserEvent) {\n    var pointerEvent = /** @type {import(\"../MapBrowserEvent\").default} */ (mapBrowserEvent).originalEvent;\n    assert(pointerEvent !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n    // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n    return pointerEvent.pointerType == 'mouse';\n};\n/**\n * Return `true` if the event originates from a touchable device.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a touchable device.\n * @api\n */\nexport var touchOnly = function (mapBrowserEvent) {\n    var pointerEvt = /** @type {import(\"../MapBrowserEvent\").default} */ (mapBrowserEvent).originalEvent;\n    assert(pointerEvt !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n    // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n    return pointerEvt.pointerType === 'touch';\n};\n/**\n * Return `true` if the event originates from a digital pen.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a digital pen.\n * @api\n */\nexport var penOnly = function (mapBrowserEvent) {\n    var pointerEvt = /** @type {import(\"../MapBrowserEvent\").default} */ (mapBrowserEvent).originalEvent;\n    assert(pointerEvt !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n    // see https://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n    return pointerEvt.pointerType === 'pen';\n};\n/**\n * Return `true` if the event originates from a primary pointer in\n * contact with the surface or if the left mouse button is pressed.\n * See https://www.w3.org/TR/pointerevents/#button-states.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a primary pointer.\n * @api\n */\nexport var primaryAction = function (mapBrowserEvent) {\n    var pointerEvent = /** @type {import(\"../MapBrowserEvent\").default} */ (mapBrowserEvent).originalEvent;\n    assert(pointerEvent !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n    return pointerEvent.isPrimary && pointerEvent.button === 0;\n};\n//# sourceMappingURL=condition.js.map","/**\n * @module ol/coordinate\n */\nimport { getWidth } from './extent.js';\nimport { modulo } from './math.js';\nimport { padNumber } from './string.js';\n/**\n * An array of numbers representing an xy coordinate. Example: `[16, 48]`.\n * @typedef {Array<number>} Coordinate\n * @api\n */\n/**\n * A function that takes a {@link module:ol/coordinate~Coordinate} and\n * transforms it into a `{string}`.\n *\n * @typedef {function((Coordinate|undefined)): string} CoordinateFormat\n * @api\n */\n/**\n * Add `delta` to `coordinate`. `coordinate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n *     import {add} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     add(coord, [-2, 4]);\n *     // coord is now [5.85, 51.983333]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {Coordinate} delta Delta.\n * @return {Coordinate} The input coordinate adjusted by\n * the given delta.\n * @api\n */\nexport function add(coordinate, delta) {\n    coordinate[0] += +delta[0];\n    coordinate[1] += +delta[1];\n    return coordinate;\n}\n/**\n * Calculates the point closest to the passed coordinate on the passed circle.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {import(\"./geom/Circle.js\").default} circle The circle.\n * @return {Coordinate} Closest point on the circumference.\n */\nexport function closestOnCircle(coordinate, circle) {\n    var r = circle.getRadius();\n    var center = circle.getCenter();\n    var x0 = center[0];\n    var y0 = center[1];\n    var x1 = coordinate[0];\n    var y1 = coordinate[1];\n    var dx = x1 - x0;\n    var dy = y1 - y0;\n    if (dx === 0 && dy === 0) {\n        dx = 1;\n    }\n    var d = Math.sqrt(dx * dx + dy * dy);\n    var x = x0 + (r * dx) / d;\n    var y = y0 + (r * dy) / d;\n    return [x, y];\n}\n/**\n * Calculates the point closest to the passed coordinate on the passed segment.\n * This is the foot of the perpendicular of the coordinate to the segment when\n * the foot is on the segment, or the closest segment coordinate when the foot\n * is outside the segment.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {Array<Coordinate>} segment The two coordinates\n * of the segment.\n * @return {Coordinate} The foot of the perpendicular of\n * the coordinate to the segment.\n */\nexport function closestOnSegment(coordinate, segment) {\n    var x0 = coordinate[0];\n    var y0 = coordinate[1];\n    var start = segment[0];\n    var end = segment[1];\n    var x1 = start[0];\n    var y1 = start[1];\n    var x2 = end[0];\n    var y2 = end[1];\n    var dx = x2 - x1;\n    var dy = y2 - y1;\n    var along = dx === 0 && dy === 0\n        ? 0\n        : (dx * (x0 - x1) + dy * (y0 - y1)) / (dx * dx + dy * dy || 0);\n    var x, y;\n    if (along <= 0) {\n        x = x1;\n        y = y1;\n    }\n    else if (along >= 1) {\n        x = x2;\n        y = y2;\n    }\n    else {\n        x = x1 + along * dx;\n        y = y1 + along * dy;\n    }\n    return [x, y];\n}\n/**\n * Returns a {@link module:ol/coordinate~CoordinateFormat} function that can be\n * used to format\n * a {Coordinate} to a string.\n *\n * Example without specifying the fractional digits:\n *\n *     import {createStringXY} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var stringifyFunc = createStringXY();\n *     var out = stringifyFunc(coord);\n *     // out is now '8, 48'\n *\n * Example with explicitly specifying 2 fractional digits:\n *\n *     import {createStringXY} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var stringifyFunc = createStringXY(2);\n *     var out = stringifyFunc(coord);\n *     // out is now '7.85, 47.98'\n *\n * @param {number} [opt_fractionDigits] The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {CoordinateFormat} Coordinate format.\n * @api\n */\nexport function createStringXY(opt_fractionDigits) {\n    return (\n    /**\n     * @param {Coordinate} coordinate Coordinate.\n     * @return {string} String XY.\n     */\n    function (coordinate) {\n        return toStringXY(coordinate, opt_fractionDigits);\n    });\n}\n/**\n * @param {string} hemispheres Hemispheres.\n * @param {number} degrees Degrees.\n * @param {number} [opt_fractionDigits] The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} String.\n */\nexport function degreesToStringHDMS(hemispheres, degrees, opt_fractionDigits) {\n    var normalizedDegrees = modulo(degrees + 180, 360) - 180;\n    var x = Math.abs(3600 * normalizedDegrees);\n    var dflPrecision = opt_fractionDigits || 0;\n    var precision = Math.pow(10, dflPrecision);\n    var deg = Math.floor(x / 3600);\n    var min = Math.floor((x - deg * 3600) / 60);\n    var sec = x - deg * 3600 - min * 60;\n    sec = Math.ceil(sec * precision) / precision;\n    if (sec >= 60) {\n        sec = 0;\n        min += 1;\n    }\n    if (min >= 60) {\n        min = 0;\n        deg += 1;\n    }\n    return (deg +\n        '\\u00b0 ' +\n        padNumber(min, 2) +\n        '\\u2032 ' +\n        padNumber(sec, 2, dflPrecision) +\n        '\\u2033' +\n        (normalizedDegrees == 0\n            ? ''\n            : ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0)));\n}\n/**\n * Transforms the given {@link module:ol/coordinate~Coordinate} to a string\n * using the given string template. The strings `{x}` and `{y}` in the template\n * will be replaced with the first and second coordinate values respectively.\n *\n * Example without specifying the fractional digits:\n *\n *     import {format} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var template = 'Coordinate is ({x}|{y}).';\n *     var out = format(coord, template);\n *     // out is now 'Coordinate is (8|48).'\n *\n * Example explicitly specifying the fractional digits:\n *\n *     import {format} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var template = 'Coordinate is ({x}|{y}).';\n *     var out = format(coord, template, 2);\n *     // out is now 'Coordinate is (7.85|47.98).'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {string} template A template string with `{x}` and `{y}` placeholders\n *     that will be replaced by first and second coordinate values.\n * @param {number} [opt_fractionDigits] The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} Formatted coordinate.\n * @api\n */\nexport function format(coordinate, template, opt_fractionDigits) {\n    if (coordinate) {\n        return template\n            .replace('{x}', coordinate[0].toFixed(opt_fractionDigits))\n            .replace('{y}', coordinate[1].toFixed(opt_fractionDigits));\n    }\n    else {\n        return '';\n    }\n}\n/**\n * @param {Coordinate} coordinate1 First coordinate.\n * @param {Coordinate} coordinate2 Second coordinate.\n * @return {boolean} The two coordinates are equal.\n */\nexport function equals(coordinate1, coordinate2) {\n    var equals = true;\n    for (var i = coordinate1.length - 1; i >= 0; --i) {\n        if (coordinate1[i] != coordinate2[i]) {\n            equals = false;\n            break;\n        }\n    }\n    return equals;\n}\n/**\n * Rotate `coordinate` by `angle`. `coordinate` is modified in place and\n * returned by the function.\n *\n * Example:\n *\n *     import {rotate} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var rotateRadians = Math.PI / 2; // 90 degrees\n *     rotate(coord, rotateRadians);\n *     // coord is now [-47.983333, 7.85]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} angle Angle in radian.\n * @return {Coordinate} Coordinate.\n * @api\n */\nexport function rotate(coordinate, angle) {\n    var cosAngle = Math.cos(angle);\n    var sinAngle = Math.sin(angle);\n    var x = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n    var y = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n    coordinate[0] = x;\n    coordinate[1] = y;\n    return coordinate;\n}\n/**\n * Scale `coordinate` by `scale`. `coordinate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n *     import {scale as scaleCoordinate} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var scale = 1.2;\n *     scaleCoordinate(coord, scale);\n *     // coord is now [9.42, 57.5799996]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} scale Scale factor.\n * @return {Coordinate} Coordinate.\n */\nexport function scale(coordinate, scale) {\n    coordinate[0] *= scale;\n    coordinate[1] *= scale;\n    return coordinate;\n}\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Squared distance between coord1 and coord2.\n */\nexport function squaredDistance(coord1, coord2) {\n    var dx = coord1[0] - coord2[0];\n    var dy = coord1[1] - coord2[1];\n    return dx * dx + dy * dy;\n}\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Distance between coord1 and coord2.\n */\nexport function distance(coord1, coord2) {\n    return Math.sqrt(squaredDistance(coord1, coord2));\n}\n/**\n * Calculate the squared distance from a coordinate to a line segment.\n *\n * @param {Coordinate} coordinate Coordinate of the point.\n * @param {Array<Coordinate>} segment Line segment (2\n * coordinates).\n * @return {number} Squared distance from the point to the line segment.\n */\nexport function squaredDistanceToSegment(coordinate, segment) {\n    return squaredDistance(coordinate, closestOnSegment(coordinate, segment));\n}\n/**\n * Format a geographic coordinate with the hemisphere, degrees, minutes, and\n * seconds.\n *\n * Example without specifying fractional digits:\n *\n *     import {toStringHDMS} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStringHDMS(coord);\n *     // out is now '47° 58′ 60″ N 7° 50′ 60″ E'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n *     import {toStringHDMS} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStringHDMS(coord, 1);\n *     // out is now '47° 58′ 60.0″ N 7° 50′ 60.0″ E'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} [opt_fractionDigits] The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} Hemisphere, degrees, minutes and seconds.\n * @api\n */\nexport function toStringHDMS(coordinate, opt_fractionDigits) {\n    if (coordinate) {\n        return (degreesToStringHDMS('NS', coordinate[1], opt_fractionDigits) +\n            ' ' +\n            degreesToStringHDMS('EW', coordinate[0], opt_fractionDigits));\n    }\n    else {\n        return '';\n    }\n}\n/**\n * Format a coordinate as a comma delimited string.\n *\n * Example without specifying fractional digits:\n *\n *     import {toStringXY} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStringXY(coord);\n *     // out is now '8, 48'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n *     import {toStringXY} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStringXY(coord, 1);\n *     // out is now '7.8, 48.0'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} [opt_fractionDigits] The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} XY.\n * @api\n */\nexport function toStringXY(coordinate, opt_fractionDigits) {\n    return format(coordinate, '{x}, {y}', opt_fractionDigits);\n}\n/**\n * Modifies the provided coordinate in-place to be within the real world\n * extent. The lower projection extent boundary is inclusive, the upper one\n * exclusive.\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {Coordinate} The coordinate within the real world extent.\n */\nexport function wrapX(coordinate, projection) {\n    if (projection.canWrapX()) {\n        var worldWidth = getWidth(projection.getExtent());\n        var worldsAway = getWorldsAway(coordinate, projection, worldWidth);\n        if (worldsAway) {\n            coordinate[0] -= worldsAway * worldWidth;\n        }\n    }\n    return coordinate;\n}\n/**\n * @param {Coordinate} coordinate Coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {number} [opt_sourceExtentWidth] Width of the source extent.\n * @return {number} Offset in world widths.\n */\nexport function getWorldsAway(coordinate, projection, opt_sourceExtentWidth) {\n    var projectionExtent = projection.getExtent();\n    var worldsAway = 0;\n    if (projection.canWrapX() &&\n        (coordinate[0] < projectionExtent[0] || coordinate[0] > projectionExtent[2])) {\n        var sourceExtentWidth = opt_sourceExtentWidth || getWidth(projectionExtent);\n        worldsAway = Math.floor((coordinate[0] - projectionExtent[0]) / sourceExtentWidth);\n    }\n    return worldsAway;\n}\n//# sourceMappingURL=coordinate.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/Polygon\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport LinearRing from './LinearRing.js';\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { arrayMaxSquaredDelta, assignClosestArrayPoint } from './flat/closest.js';\nimport { closestSquaredDistanceXY, getCenter } from '../extent.js';\nimport { deflateCoordinatesArray } from './flat/deflate.js';\nimport { extend } from '../array.js';\nimport { getInteriorPointOfArray } from './flat/interiorpoint.js';\nimport { inflateCoordinatesArray } from './flat/inflate.js';\nimport { intersectsLinearRingArray } from './flat/intersectsextent.js';\nimport { linearRingsAreOriented, orientLinearRings } from './flat/orient.js';\nimport { linearRings as linearRingsArea } from './flat/area.js';\nimport { linearRingsContainsXY } from './flat/contains.js';\nimport { modulo } from '../math.js';\nimport { quantizeArray } from './flat/simplify.js';\nimport { offset as sphereOffset } from '../sphere.js';\n/**\n * @classdesc\n * Polygon geometry.\n *\n * @api\n */\nvar Polygon = /** @class */ (function (_super) {\n    __extends(Polygon, _super);\n    /**\n     * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>|!Array<number>} coordinates\n     *     Array of linear rings that define the polygon. The first linear ring of the\n     *     array defines the outer-boundary or surface of the polygon. Each subsequent\n     *     linear ring defines a hole in the surface of the polygon. A linear ring is\n     *     an array of vertices' coordinates where the first coordinate and the last are\n     *     equivalent. (For internal use, flat coordinates in combination with\n     *     `opt_layout` and `opt_ends` are also accepted.)\n     * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n     * @param {Array<number>} [opt_ends] Ends (for internal use with flat coordinates).\n     */\n    function Polygon(coordinates, opt_layout, opt_ends) {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {Array<number>}\n         * @private\n         */\n        _this.ends_ = [];\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.flatInteriorPointRevision_ = -1;\n        /**\n         * @private\n         * @type {import(\"../coordinate.js\").Coordinate}\n         */\n        _this.flatInteriorPoint_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDelta_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDeltaRevision_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.orientedRevision_ = -1;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.orientedFlatCoordinates_ = null;\n        if (opt_layout !== undefined && opt_ends) {\n            _this.setFlatCoordinates(opt_layout, \n            /** @type {Array<number>} */ (coordinates));\n            _this.ends_ = opt_ends;\n        }\n        else {\n            _this.setCoordinates(\n            /** @type {Array<Array<import(\"../coordinate.js\").Coordinate>>} */ (coordinates), opt_layout);\n        }\n        return _this;\n    }\n    /**\n     * Append the passed linear ring to this polygon.\n     * @param {LinearRing} linearRing Linear ring.\n     * @api\n     */\n    Polygon.prototype.appendLinearRing = function (linearRing) {\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = linearRing.getFlatCoordinates().slice();\n        }\n        else {\n            extend(this.flatCoordinates, linearRing.getFlatCoordinates());\n        }\n        this.ends_.push(this.flatCoordinates.length);\n        this.changed();\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!Polygon} Clone.\n     * @api\n     */\n    Polygon.prototype.clone = function () {\n        var polygon = new Polygon(this.flatCoordinates.slice(), this.layout, this.ends_.slice());\n        polygon.applyProperties(this);\n        return polygon;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    Polygon.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            return minSquaredDistance;\n        }\n        if (this.maxDeltaRevision_ != this.getRevision()) {\n            this.maxDelta_ = Math.sqrt(arrayMaxSquaredDelta(this.flatCoordinates, 0, this.ends_, this.stride, 0));\n            this.maxDeltaRevision_ = this.getRevision();\n        }\n        return assignClosestArrayPoint(this.flatCoordinates, 0, this.ends_, this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @return {boolean} Contains (x, y).\n     */\n    Polygon.prototype.containsXY = function (x, y) {\n        return linearRingsContainsXY(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, x, y);\n    };\n    /**\n     * Return the area of the polygon on projected plane.\n     * @return {number} Area (on projected plane).\n     * @api\n     */\n    Polygon.prototype.getArea = function () {\n        return linearRingsArea(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride);\n    };\n    /**\n     * Get the coordinate array for this geometry.  This array has the structure\n     * of a GeoJSON coordinate array for polygons.\n     *\n     * @param {boolean} [opt_right] Orient coordinates according to the right-hand\n     *     rule (counter-clockwise for exterior and clockwise for interior rings).\n     *     If `false`, coordinates will be oriented according to the left-hand rule\n     *     (clockwise for exterior and counter-clockwise for interior rings).\n     *     By default, coordinate orientation will depend on how the geometry was\n     *     constructed.\n     * @return {Array<Array<import(\"../coordinate.js\").Coordinate>>} Coordinates.\n     * @api\n     */\n    Polygon.prototype.getCoordinates = function (opt_right) {\n        var flatCoordinates;\n        if (opt_right !== undefined) {\n            flatCoordinates = this.getOrientedFlatCoordinates().slice();\n            orientLinearRings(flatCoordinates, 0, this.ends_, this.stride, opt_right);\n        }\n        else {\n            flatCoordinates = this.flatCoordinates;\n        }\n        return inflateCoordinatesArray(flatCoordinates, 0, this.ends_, this.stride);\n    };\n    /**\n     * @return {Array<number>} Ends.\n     */\n    Polygon.prototype.getEnds = function () {\n        return this.ends_;\n    };\n    /**\n     * @return {Array<number>} Interior point.\n     */\n    Polygon.prototype.getFlatInteriorPoint = function () {\n        if (this.flatInteriorPointRevision_ != this.getRevision()) {\n            var flatCenter = getCenter(this.getExtent());\n            this.flatInteriorPoint_ = getInteriorPointOfArray(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, flatCenter, 0);\n            this.flatInteriorPointRevision_ = this.getRevision();\n        }\n        return this.flatInteriorPoint_;\n    };\n    /**\n     * Return an interior point of the polygon.\n     * @return {Point} Interior point as XYM coordinate, where M is the\n     * length of the horizontal intersection that the point belongs to.\n     * @api\n     */\n    Polygon.prototype.getInteriorPoint = function () {\n        return new Point(this.getFlatInteriorPoint(), GeometryLayout.XYM);\n    };\n    /**\n     * Return the number of rings of the polygon,  this includes the exterior\n     * ring and any interior rings.\n     *\n     * @return {number} Number of rings.\n     * @api\n     */\n    Polygon.prototype.getLinearRingCount = function () {\n        return this.ends_.length;\n    };\n    /**\n     * Return the Nth linear ring of the polygon geometry. Return `null` if the\n     * given index is out of range.\n     * The exterior linear ring is available at index `0` and the interior rings\n     * at index `1` and beyond.\n     *\n     * @param {number} index Index.\n     * @return {LinearRing} Linear ring.\n     * @api\n     */\n    Polygon.prototype.getLinearRing = function (index) {\n        if (index < 0 || this.ends_.length <= index) {\n            return null;\n        }\n        return new LinearRing(this.flatCoordinates.slice(index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]), this.layout);\n    };\n    /**\n     * Return the linear rings of the polygon.\n     * @return {Array<LinearRing>} Linear rings.\n     * @api\n     */\n    Polygon.prototype.getLinearRings = function () {\n        var layout = this.layout;\n        var flatCoordinates = this.flatCoordinates;\n        var ends = this.ends_;\n        var linearRings = [];\n        var offset = 0;\n        for (var i = 0, ii = ends.length; i < ii; ++i) {\n            var end = ends[i];\n            var linearRing = new LinearRing(flatCoordinates.slice(offset, end), layout);\n            linearRings.push(linearRing);\n            offset = end;\n        }\n        return linearRings;\n    };\n    /**\n     * @return {Array<number>} Oriented flat coordinates.\n     */\n    Polygon.prototype.getOrientedFlatCoordinates = function () {\n        if (this.orientedRevision_ != this.getRevision()) {\n            var flatCoordinates = this.flatCoordinates;\n            if (linearRingsAreOriented(flatCoordinates, 0, this.ends_, this.stride)) {\n                this.orientedFlatCoordinates_ = flatCoordinates;\n            }\n            else {\n                this.orientedFlatCoordinates_ = flatCoordinates.slice();\n                this.orientedFlatCoordinates_.length = orientLinearRings(this.orientedFlatCoordinates_, 0, this.ends_, this.stride);\n            }\n            this.orientedRevision_ = this.getRevision();\n        }\n        return this.orientedFlatCoordinates_;\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {Polygon} Simplified Polygon.\n     * @protected\n     */\n    Polygon.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n        var simplifiedFlatCoordinates = [];\n        var simplifiedEnds = [];\n        simplifiedFlatCoordinates.length = quantizeArray(this.flatCoordinates, 0, this.ends_, this.stride, Math.sqrt(squaredTolerance), simplifiedFlatCoordinates, 0, simplifiedEnds);\n        return new Polygon(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEnds);\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    Polygon.prototype.getType = function () {\n        return GeometryType.POLYGON;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    Polygon.prototype.intersectsExtent = function (extent) {\n        return intersectsLinearRingArray(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, extent);\n    };\n    /**\n     * Set the coordinates of the polygon.\n     * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n     * @api\n     */\n    Polygon.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, coordinates, 2);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        var ends = deflateCoordinatesArray(this.flatCoordinates, 0, coordinates, this.stride, this.ends_);\n        this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n        this.changed();\n    };\n    return Polygon;\n}(SimpleGeometry));\nexport default Polygon;\n/**\n * Create an approximation of a circle on the surface of a sphere.\n * @param {import(\"../coordinate.js\").Coordinate} center Center (`[lon, lat]` in degrees).\n * @param {number} radius The great-circle distance from the center to\n *     the polygon vertices in meters.\n * @param {number} [opt_n] Optional number of vertices for the resulting\n *     polygon. Default is `32`.\n * @param {number} [opt_sphereRadius] Optional radius for the sphere (defaults to\n *     the Earth's mean radius using the WGS84 ellipsoid).\n * @return {Polygon} The \"circular\" polygon.\n * @api\n */\nexport function circular(center, radius, opt_n, opt_sphereRadius) {\n    var n = opt_n ? opt_n : 32;\n    /** @type {Array<number>} */\n    var flatCoordinates = [];\n    for (var i = 0; i < n; ++i) {\n        extend(flatCoordinates, sphereOffset(center, radius, (2 * Math.PI * i) / n, opt_sphereRadius));\n    }\n    flatCoordinates.push(flatCoordinates[0], flatCoordinates[1]);\n    return new Polygon(flatCoordinates, GeometryLayout.XY, [\n        flatCoordinates.length,\n    ]);\n}\n/**\n * Create a polygon from an extent. The layout used is `XY`.\n * @param {import(\"../extent.js\").Extent} extent The extent.\n * @return {Polygon} The polygon.\n * @api\n */\nexport function fromExtent(extent) {\n    var minX = extent[0];\n    var minY = extent[1];\n    var maxX = extent[2];\n    var maxY = extent[3];\n    var flatCoordinates = [\n        minX,\n        minY,\n        minX,\n        maxY,\n        maxX,\n        maxY,\n        maxX,\n        minY,\n        minX,\n        minY,\n    ];\n    return new Polygon(flatCoordinates, GeometryLayout.XY, [\n        flatCoordinates.length,\n    ]);\n}\n/**\n * Create a regular polygon from a circle.\n * @param {import(\"./Circle.js\").default} circle Circle geometry.\n * @param {number} [opt_sides] Number of sides of the polygon. Default is 32.\n * @param {number} [opt_angle] Start angle for the first vertex of the polygon in\n *     counter-clockwise radians. 0 means East. Default is 0.\n * @return {Polygon} Polygon geometry.\n * @api\n */\nexport function fromCircle(circle, opt_sides, opt_angle) {\n    var sides = opt_sides ? opt_sides : 32;\n    var stride = circle.getStride();\n    var layout = circle.getLayout();\n    var center = circle.getCenter();\n    var arrayLength = stride * (sides + 1);\n    var flatCoordinates = new Array(arrayLength);\n    for (var i = 0; i < arrayLength; i += stride) {\n        flatCoordinates[i] = 0;\n        flatCoordinates[i + 1] = 0;\n        for (var j = 2; j < stride; j++) {\n            flatCoordinates[i + j] = center[j];\n        }\n    }\n    var ends = [flatCoordinates.length];\n    var polygon = new Polygon(flatCoordinates, layout, ends);\n    makeRegular(polygon, center, circle.getRadius(), opt_angle);\n    return polygon;\n}\n/**\n * Modify the coordinates of a polygon to make it a regular polygon.\n * @param {Polygon} polygon Polygon geometry.\n * @param {import(\"../coordinate.js\").Coordinate} center Center of the regular polygon.\n * @param {number} radius Radius of the regular polygon.\n * @param {number} [opt_angle] Start angle for the first vertex of the polygon in\n *     counter-clockwise radians. 0 means East. Default is 0.\n */\nexport function makeRegular(polygon, center, radius, opt_angle) {\n    var flatCoordinates = polygon.getFlatCoordinates();\n    var stride = polygon.getStride();\n    var sides = flatCoordinates.length / stride - 1;\n    var startAngle = opt_angle ? opt_angle : 0;\n    for (var i = 0; i <= sides; ++i) {\n        var offset = i * stride;\n        var angle = startAngle + (modulo(i, sides) * 2 * Math.PI) / sides;\n        flatCoordinates[offset] = center[0] + radius * Math.cos(angle);\n        flatCoordinates[offset + 1] = center[1] + radius * Math.sin(angle);\n    }\n    polygon.changed();\n}\n//# sourceMappingURL=Polygon.js.map","/**\n * @module ol/ImageState\n */\n/**\n * @enum {number}\n */\nexport default {\n    IDLE: 0,\n    LOADING: 1,\n    LOADED: 2,\n    ERROR: 3,\n    EMPTY: 4,\n};\n//# sourceMappingURL=ImageState.js.map","function _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\n\nmodule.exports = _classCallCheck;","import { WORKER_OFFSCREEN_CANVAS } from './has.js';\n/**\n * @module ol/dom\n */\n//FIXME Move this function to the canvas module\n/**\n * Create an html canvas element and returns its 2d context.\n * @param {number} [opt_width] Canvas width.\n * @param {number} [opt_height] Canvas height.\n * @param {Array<HTMLCanvasElement>} [opt_canvasPool] Canvas pool to take existing canvas from.\n * @param {CanvasRenderingContext2DSettings} [opt_Context2DSettings] CanvasRenderingContext2DSettings\n * @return {CanvasRenderingContext2D} The context.\n */\nexport function createCanvasContext2D(opt_width, opt_height, opt_canvasPool, opt_Context2DSettings) {\n    var canvas = opt_canvasPool && opt_canvasPool.length\n        ? opt_canvasPool.shift()\n        : WORKER_OFFSCREEN_CANVAS\n            ? new OffscreenCanvas(opt_width || 300, opt_height || 300)\n            : document.createElement('canvas');\n    if (opt_width) {\n        canvas.width = opt_width;\n    }\n    if (opt_height) {\n        canvas.height = opt_height;\n    }\n    //FIXME Allow OffscreenCanvasRenderingContext2D as return type\n    return /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d', opt_Context2DSettings));\n}\n/**\n * Get the current computed width for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerWidth(true)`.\n * @param {!HTMLElement} element Element.\n * @return {number} The width.\n */\nexport function outerWidth(element) {\n    var width = element.offsetWidth;\n    var style = getComputedStyle(element);\n    width += parseInt(style.marginLeft, 10) + parseInt(style.marginRight, 10);\n    return width;\n}\n/**\n * Get the current computed height for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerHeight(true)`.\n * @param {!HTMLElement} element Element.\n * @return {number} The height.\n */\nexport function outerHeight(element) {\n    var height = element.offsetHeight;\n    var style = getComputedStyle(element);\n    height += parseInt(style.marginTop, 10) + parseInt(style.marginBottom, 10);\n    return height;\n}\n/**\n * @param {Node} newNode Node to replace old node\n * @param {Node} oldNode The node to be replaced\n */\nexport function replaceNode(newNode, oldNode) {\n    var parent = oldNode.parentNode;\n    if (parent) {\n        parent.replaceChild(newNode, oldNode);\n    }\n}\n/**\n * @param {Node} node The node to remove.\n * @return {Node} The node that was removed or null.\n */\nexport function removeNode(node) {\n    return node && node.parentNode ? node.parentNode.removeChild(node) : null;\n}\n/**\n * @param {Node} node The node to remove the children from.\n */\nexport function removeChildren(node) {\n    while (node.lastChild) {\n        node.removeChild(node.lastChild);\n    }\n}\n/**\n * Transform the children of a parent node so they match the\n * provided list of children.  This function aims to efficiently\n * remove, add, and reorder child nodes while maintaining a simple\n * implementation (it is not guaranteed to minimize DOM operations).\n * @param {Node} node The parent node whose children need reworking.\n * @param {Array<Node>} children The desired children.\n */\nexport function replaceChildren(node, children) {\n    var oldChildren = node.childNodes;\n    for (var i = 0; true; ++i) {\n        var oldChild = oldChildren[i];\n        var newChild = children[i];\n        // check if our work is done\n        if (!oldChild && !newChild) {\n            break;\n        }\n        // check if children match\n        if (oldChild === newChild) {\n            continue;\n        }\n        // check if a new child needs to be added\n        if (!oldChild) {\n            node.appendChild(newChild);\n            continue;\n        }\n        // check if an old child needs to be removed\n        if (!newChild) {\n            node.removeChild(oldChild);\n            --i;\n            continue;\n        }\n        // reorder\n        node.insertBefore(newChild, oldChild);\n    }\n}\n//# sourceMappingURL=dom.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Feature\n */\nimport BaseObject from './Object.js';\nimport EventType from './events/EventType.js';\nimport { assert } from './asserts.js';\nimport { listen, unlistenByKey } from './events.js';\n/**\n * @typedef {typeof Feature|typeof import(\"./render/Feature.js\").default} FeatureClass\n */\n/**\n * @typedef {Feature|import(\"./render/Feature.js\").default} FeatureLike\n */\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature<import(\"./Observable\").EventTypes, import(\"./events/Event.js\").default, Return> &\n *   import(\"./Observable\").OnSignature<import(\"./ObjectEventType\").Types|'change:geometry', import(\"./Object\").ObjectEvent, Return> &\n *   import(\"./Observable\").CombinedOnSignature<import(\"./Observable\").EventTypes|import(\"./ObjectEventType\").Types\n *     |'change:geometry', Return>} FeatureOnSignature\n */\n/**\n * @classdesc\n * A vector object for geographic features with a geometry and other\n * attribute properties, similar to the features in vector file formats like\n * GeoJSON.\n *\n * Features can be styled individually with `setStyle`; otherwise they use the\n * style of their vector layer.\n *\n * Note that attribute properties are set as {@link module:ol/Object} properties on\n * the feature object, so they are observable, and have get/set accessors.\n *\n * Typically, a feature has a single geometry property. You can set the\n * geometry using the `setGeometry` method and get it with `getGeometry`.\n * It is possible to store more than one geometry on a feature using attribute\n * properties. By default, the geometry used for rendering is identified by\n * the property name `geometry`. If you want to use another geometry property\n * for rendering, use the `setGeometryName` method to change the attribute\n * property associated with the geometry for the feature.  For example:\n *\n * ```js\n *\n * import Feature from 'ol/Feature';\n * import Polygon from 'ol/geom/Polygon';\n * import Point from 'ol/geom/Point';\n *\n * var feature = new Feature({\n *   geometry: new Polygon(polyCoords),\n *   labelPoint: new Point(labelCoords),\n *   name: 'My Polygon'\n * });\n *\n * // get the polygon geometry\n * var poly = feature.getGeometry();\n *\n * // Render the feature as a point using the coordinates from labelPoint\n * feature.setGeometryName('labelPoint');\n *\n * // get the point geometry\n * var point = feature.getGeometry();\n * ```\n *\n * @api\n * @template {import(\"./geom/Geometry.js\").default} Geometry\n */\nvar Feature = /** @class */ (function (_super) {\n    __extends(Feature, _super);\n    /**\n     * @param {Geometry|Object<string, *>} [opt_geometryOrProperties]\n     *     You may pass a Geometry object directly, or an object literal containing\n     *     properties. If you pass an object literal, you may include a Geometry\n     *     associated with a `geometry` key.\n     */\n    function Feature(opt_geometryOrProperties) {\n        var _this = _super.call(this) || this;\n        /***\n         * @type {FeatureOnSignature<import(\"./Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {FeatureOnSignature<import(\"./Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {FeatureOnSignature<void>}\n         */\n        _this.un;\n        /**\n         * @private\n         * @type {number|string|undefined}\n         */\n        _this.id_ = undefined;\n        /**\n         * @type {string}\n         * @private\n         */\n        _this.geometryName_ = 'geometry';\n        /**\n         * User provided style.\n         * @private\n         * @type {import(\"./style/Style.js\").StyleLike}\n         */\n        _this.style_ = null;\n        /**\n         * @private\n         * @type {import(\"./style/Style.js\").StyleFunction|undefined}\n         */\n        _this.styleFunction_ = undefined;\n        /**\n         * @private\n         * @type {?import(\"./events.js\").EventsKey}\n         */\n        _this.geometryChangeKey_ = null;\n        _this.addChangeListener(_this.geometryName_, _this.handleGeometryChanged_);\n        if (opt_geometryOrProperties) {\n            if (typeof (\n            /** @type {?} */ (opt_geometryOrProperties).getSimplifiedGeometry) === 'function') {\n                var geometry = /** @type {Geometry} */ (opt_geometryOrProperties);\n                _this.setGeometry(geometry);\n            }\n            else {\n                /** @type {Object<string, *>} */\n                var properties = opt_geometryOrProperties;\n                _this.setProperties(properties);\n            }\n        }\n        return _this;\n    }\n    /**\n     * Clone this feature. If the original feature has a geometry it\n     * is also cloned. The feature id is not set in the clone.\n     * @return {Feature} The clone.\n     * @api\n     */\n    Feature.prototype.clone = function () {\n        var clone = new Feature(this.hasProperties() ? this.getProperties() : null);\n        clone.setGeometryName(this.getGeometryName());\n        var geometry = this.getGeometry();\n        if (geometry) {\n            clone.setGeometry(geometry.clone());\n        }\n        var style = this.getStyle();\n        if (style) {\n            clone.setStyle(style);\n        }\n        return clone;\n    };\n    /**\n     * Get the feature's default geometry.  A feature may have any number of named\n     * geometries.  The \"default\" geometry (the one that is rendered by default) is\n     * set when calling {@link module:ol/Feature~Feature#setGeometry}.\n     * @return {Geometry|undefined} The default geometry for the feature.\n     * @api\n     * @observable\n     */\n    Feature.prototype.getGeometry = function () {\n        return /** @type {Geometry|undefined} */ (this.get(this.geometryName_));\n    };\n    /**\n     * Get the feature identifier.  This is a stable identifier for the feature and\n     * is either set when reading data from a remote source or set explicitly by\n     * calling {@link module:ol/Feature~Feature#setId}.\n     * @return {number|string|undefined} Id.\n     * @api\n     */\n    Feature.prototype.getId = function () {\n        return this.id_;\n    };\n    /**\n     * Get the name of the feature's default geometry.  By default, the default\n     * geometry is named `geometry`.\n     * @return {string} Get the property name associated with the default geometry\n     *     for this feature.\n     * @api\n     */\n    Feature.prototype.getGeometryName = function () {\n        return this.geometryName_;\n    };\n    /**\n     * Get the feature's style. Will return what was provided to the\n     * {@link module:ol/Feature~Feature#setStyle} method.\n     * @return {import(\"./style/Style.js\").StyleLike|undefined} The feature style.\n     * @api\n     */\n    Feature.prototype.getStyle = function () {\n        return this.style_;\n    };\n    /**\n     * Get the feature's style function.\n     * @return {import(\"./style/Style.js\").StyleFunction|undefined} Return a function\n     * representing the current style of this feature.\n     * @api\n     */\n    Feature.prototype.getStyleFunction = function () {\n        return this.styleFunction_;\n    };\n    /**\n     * @private\n     */\n    Feature.prototype.handleGeometryChange_ = function () {\n        this.changed();\n    };\n    /**\n     * @private\n     */\n    Feature.prototype.handleGeometryChanged_ = function () {\n        if (this.geometryChangeKey_) {\n            unlistenByKey(this.geometryChangeKey_);\n            this.geometryChangeKey_ = null;\n        }\n        var geometry = this.getGeometry();\n        if (geometry) {\n            this.geometryChangeKey_ = listen(geometry, EventType.CHANGE, this.handleGeometryChange_, this);\n        }\n        this.changed();\n    };\n    /**\n     * Set the default geometry for the feature.  This will update the property\n     * with the name returned by {@link module:ol/Feature~Feature#getGeometryName}.\n     * @param {Geometry|undefined} geometry The new geometry.\n     * @api\n     * @observable\n     */\n    Feature.prototype.setGeometry = function (geometry) {\n        this.set(this.geometryName_, geometry);\n    };\n    /**\n     * Set the style for the feature to override the layer style.  This can be a\n     * single style object, an array of styles, or a function that takes a\n     * resolution and returns an array of styles. To unset the feature style, call\n     * `setStyle()` without arguments or a falsey value.\n     * @param {import(\"./style/Style.js\").StyleLike} [opt_style] Style for this feature.\n     * @api\n     * @fires module:ol/events/Event~BaseEvent#event:change\n     */\n    Feature.prototype.setStyle = function (opt_style) {\n        this.style_ = opt_style;\n        this.styleFunction_ = !opt_style\n            ? undefined\n            : createStyleFunction(opt_style);\n        this.changed();\n    };\n    /**\n     * Set the feature id.  The feature id is considered stable and may be used when\n     * requesting features or comparing identifiers returned from a remote source.\n     * The feature id can be used with the\n     * {@link module:ol/source/Vector~VectorSource#getFeatureById} method.\n     * @param {number|string|undefined} id The feature id.\n     * @api\n     * @fires module:ol/events/Event~BaseEvent#event:change\n     */\n    Feature.prototype.setId = function (id) {\n        this.id_ = id;\n        this.changed();\n    };\n    /**\n     * Set the property name to be used when getting the feature's default geometry.\n     * When calling {@link module:ol/Feature~Feature#getGeometry}, the value of the property with\n     * this name will be returned.\n     * @param {string} name The property name of the default geometry.\n     * @api\n     */\n    Feature.prototype.setGeometryName = function (name) {\n        this.removeChangeListener(this.geometryName_, this.handleGeometryChanged_);\n        this.geometryName_ = name;\n        this.addChangeListener(this.geometryName_, this.handleGeometryChanged_);\n        this.handleGeometryChanged_();\n    };\n    return Feature;\n}(BaseObject));\n/**\n * Convert the provided object into a feature style function.  Functions passed\n * through unchanged.  Arrays of Style or single style objects wrapped\n * in a new feature style function.\n * @param {!import(\"./style/Style.js\").StyleFunction|!Array<import(\"./style/Style.js\").default>|!import(\"./style/Style.js\").default} obj\n *     A feature style function, a single style, or an array of styles.\n * @return {import(\"./style/Style.js\").StyleFunction} A style function.\n */\nexport function createStyleFunction(obj) {\n    if (typeof obj === 'function') {\n        return obj;\n    }\n    else {\n        /**\n         * @type {Array<import(\"./style/Style.js\").default>}\n         */\n        var styles_1;\n        if (Array.isArray(obj)) {\n            styles_1 = obj;\n        }\n        else {\n            assert(typeof ( /** @type {?} */(obj).getZIndex) === 'function', 41); // Expected an `import(\"./style/Style.js\").Style` or an array of `import(\"./style/Style.js\").Style`\n            var style = /** @type {import(\"./style/Style.js\").default} */ (obj);\n            styles_1 = [style];\n        }\n        return function () {\n            return styles_1;\n        };\n    }\n}\nexport default Feature;\n//# sourceMappingURL=Feature.js.map","function _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, descriptor.key, descriptor);\n  }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  return Constructor;\n}\n\nmodule.exports = _createClass;","function _getPrototypeOf(o) {\n  module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  };\n  return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","/**\n * @module ol/MapBrowserEventType\n */\nimport EventType from './events/EventType.js';\n/**\n * Constants for event names.\n * @enum {string}\n */\nexport default {\n    /**\n     * A true single click with no dragging and no double click. Note that this\n     * event is delayed by 250 ms to ensure that it is not a double click.\n     * @event module:ol/MapBrowserEvent~MapBrowserEvent#singleclick\n     * @api\n     */\n    SINGLECLICK: 'singleclick',\n    /**\n     * A click with no dragging. A double click will fire two of this.\n     * @event module:ol/MapBrowserEvent~MapBrowserEvent#click\n     * @api\n     */\n    CLICK: EventType.CLICK,\n    /**\n     * A true double click, with no dragging.\n     * @event module:ol/MapBrowserEvent~MapBrowserEvent#dblclick\n     * @api\n     */\n    DBLCLICK: EventType.DBLCLICK,\n    /**\n     * Triggered when a pointer is dragged.\n     * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointerdrag\n     * @api\n     */\n    POINTERDRAG: 'pointerdrag',\n    /**\n     * Triggered when a pointer is moved. Note that on touch devices this is\n     * triggered when the map is panned, so is not the same as mousemove.\n     * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointermove\n     * @api\n     */\n    POINTERMOVE: 'pointermove',\n    POINTERDOWN: 'pointerdown',\n    POINTERUP: 'pointerup',\n    POINTEROVER: 'pointerover',\n    POINTEROUT: 'pointerout',\n    POINTERENTER: 'pointerenter',\n    POINTERLEAVE: 'pointerleave',\n    POINTERCANCEL: 'pointercancel',\n};\n/***\n * @typedef {'singleclick'|'click'|'dblclick'|'pointerdrag'|'pointermove'} Types\n */\n//# sourceMappingURL=MapBrowserEventType.js.map","/**\n * @module ol/functions\n */\nimport { equals as arrayEquals } from './array.js';\n/**\n * Always returns true.\n * @return {boolean} true.\n */\nexport function TRUE() {\n    return true;\n}\n/**\n * Always returns false.\n * @return {boolean} false.\n */\nexport function FALSE() {\n    return false;\n}\n/**\n * A reusable function, used e.g. as a default for callbacks.\n *\n * @return {void} Nothing.\n */\nexport function VOID() { }\n/**\n * Wrap a function in another function that remembers the last return.  If the\n * returned function is called twice in a row with the same arguments and the same\n * this object, it will return the value from the first call in the second call.\n *\n * @param {function(...any): ReturnType} fn The function to memoize.\n * @return {function(...any): ReturnType} The memoized function.\n * @template ReturnType\n */\nexport function memoizeOne(fn) {\n    var called = false;\n    /** @type {ReturnType} */\n    var lastResult;\n    /** @type {Array<any>} */\n    var lastArgs;\n    var lastThis;\n    return function () {\n        var nextArgs = Array.prototype.slice.call(arguments);\n        if (!called || this !== lastThis || !arrayEquals(nextArgs, lastArgs)) {\n            called = true;\n            lastThis = this;\n            lastArgs = nextArgs;\n            lastResult = fn.apply(this, arguments);\n        }\n        return lastResult;\n    };\n}\n//# sourceMappingURL=functions.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/Point\n */\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { containsXY, createOrUpdateFromCoordinate } from '../extent.js';\nimport { deflateCoordinate } from './flat/deflate.js';\nimport { squaredDistance as squaredDx } from '../math.js';\n/**\n * @classdesc\n * Point geometry.\n *\n * @api\n */\nvar Point = /** @class */ (function (_super) {\n    __extends(Point, _super);\n    /**\n     * @param {import(\"../coordinate.js\").Coordinate} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n     */\n    function Point(coordinates, opt_layout) {\n        var _this = _super.call(this) || this;\n        _this.setCoordinates(coordinates, opt_layout);\n        return _this;\n    }\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!Point} Clone.\n     * @api\n     */\n    Point.prototype.clone = function () {\n        var point = new Point(this.flatCoordinates.slice(), this.layout);\n        point.applyProperties(this);\n        return point;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    Point.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        var flatCoordinates = this.flatCoordinates;\n        var squaredDistance = squaredDx(x, y, flatCoordinates[0], flatCoordinates[1]);\n        if (squaredDistance < minSquaredDistance) {\n            var stride = this.stride;\n            for (var i = 0; i < stride; ++i) {\n                closestPoint[i] = flatCoordinates[i];\n            }\n            closestPoint.length = stride;\n            return squaredDistance;\n        }\n        else {\n            return minSquaredDistance;\n        }\n    };\n    /**\n     * Return the coordinate of the point.\n     * @return {import(\"../coordinate.js\").Coordinate} Coordinates.\n     * @api\n     */\n    Point.prototype.getCoordinates = function () {\n        return !this.flatCoordinates ? [] : this.flatCoordinates.slice();\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @protected\n     * @return {import(\"../extent.js\").Extent} extent Extent.\n     */\n    Point.prototype.computeExtent = function (extent) {\n        return createOrUpdateFromCoordinate(this.flatCoordinates, extent);\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    Point.prototype.getType = function () {\n        return GeometryType.POINT;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    Point.prototype.intersectsExtent = function (extent) {\n        return containsXY(extent, this.flatCoordinates[0], this.flatCoordinates[1]);\n    };\n    /**\n     * @param {!Array<*>} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n     * @api\n     */\n    Point.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, coordinates, 0);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        this.flatCoordinates.length = deflateCoordinate(this.flatCoordinates, 0, coordinates, this.stride);\n        this.changed();\n    };\n    return Point;\n}(SimpleGeometry));\nexport default Point;\n//# sourceMappingURL=Point.js.map","function _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return self;\n}\n\nmodule.exports = _assertThisInitialized;","/**\n * @module ol/format/Feature\n */\nimport Units from '../proj/Units.js';\nimport { abstract } from '../util.js';\nimport { assign } from '../obj.js';\nimport { equivalent as equivalentProjection, get as getProjection, transformExtent, } from '../proj.js';\n/**\n * @typedef {Object} ReadOptions\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection] Projection of the data we are reading.\n * If not provided, the projection will be derived from the data (where possible) or\n * the `dataProjection` of the format is assigned (where set). If the projection\n * can not be derived from the data and if no `dataProjection` is set for a format,\n * the features will not be reprojected.\n * @property {import(\"../extent.js\").Extent} [extent] Tile extent in map units of the tile being read.\n * This is only required when reading data with tile pixels as geometry units. When configured,\n * a `dataProjection` with `TILE_PIXELS` as `units` and the tile's pixel extent as `extent` needs to be\n * provided.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection of the feature geometries\n * created by the format reader. If not provided, features will be returned in the\n * `dataProjection`.\n */\n/**\n * @typedef {Object} WriteOptions\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection] Projection of the data we are writing.\n * If not provided, the `dataProjection` of the format is assigned (where set).\n * If no `dataProjection` is set for a format, the features will be returned\n * in the `featureProjection`.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection of the feature geometries\n * that will be serialized by the format writer. If not provided, geometries are assumed\n * to be in the `dataProjection` if that is set; in other words, they are not transformed.\n * @property {boolean} [rightHanded] When writing geometries, follow the right-hand\n * rule for linear ring orientation.  This means that polygons will have counter-clockwise\n * exterior rings and clockwise interior rings.  By default, coordinates are serialized\n * as they are provided at construction.  If `true`, the right-hand rule will\n * be applied.  If `false`, the left-hand rule will be applied (clockwise for\n * exterior and counter-clockwise for interior rings).  Note that not all\n * formats support this.  The GeoJSON format does use this property when writing\n * geometries.\n * @property {number} [decimals] Maximum number of decimal places for coordinates.\n * Coordinates are stored internally as floats, but floating-point arithmetic can create\n * coordinates with a large number of decimal places, not generally wanted on output.\n * Set a number here to round coordinates. Can also be used to ensure that\n * coordinates read in can be written back out with the same number of decimals.\n * Default is no rounding.\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for feature formats.\n * {@link module:ol/format/Feature~FeatureFormat} subclasses provide the ability to decode and encode\n * {@link module:ol/Feature~Feature} objects from a variety of commonly used geospatial\n * file formats.  See the documentation for each format for more details.\n *\n * @abstract\n * @api\n */\nvar FeatureFormat = /** @class */ (function () {\n    function FeatureFormat() {\n        /**\n         * @protected\n         * @type {import(\"../proj/Projection.js\").default|undefined}\n         */\n        this.dataProjection = undefined;\n        /**\n         * @protected\n         * @type {import(\"../proj/Projection.js\").default|undefined}\n         */\n        this.defaultFeatureProjection = undefined;\n    }\n    /**\n     * Adds the data projection to the read options.\n     * @param {Document|Element|Object|string} source Source.\n     * @param {ReadOptions} [opt_options] Options.\n     * @return {ReadOptions|undefined} Options.\n     * @protected\n     */\n    FeatureFormat.prototype.getReadOptions = function (source, opt_options) {\n        var options;\n        if (opt_options) {\n            var dataProjection = opt_options.dataProjection\n                ? getProjection(opt_options.dataProjection)\n                : this.readProjection(source);\n            if (opt_options.extent &&\n                dataProjection &&\n                dataProjection.getUnits() === Units.TILE_PIXELS) {\n                dataProjection = getProjection(dataProjection);\n                dataProjection.setWorldExtent(opt_options.extent);\n            }\n            options = {\n                dataProjection: dataProjection,\n                featureProjection: opt_options.featureProjection,\n            };\n        }\n        return this.adaptOptions(options);\n    };\n    /**\n     * Sets the `dataProjection` on the options, if no `dataProjection`\n     * is set.\n     * @param {WriteOptions|ReadOptions|undefined} options\n     *     Options.\n     * @protected\n     * @return {WriteOptions|ReadOptions|undefined}\n     *     Updated options.\n     */\n    FeatureFormat.prototype.adaptOptions = function (options) {\n        return assign({\n            dataProjection: this.dataProjection,\n            featureProjection: this.defaultFeatureProjection,\n        }, options);\n    };\n    /**\n     * @abstract\n     * @return {import(\"./FormatType.js\").default} Format.\n     */\n    FeatureFormat.prototype.getType = function () {\n        return abstract();\n    };\n    /**\n     * Read a single feature from a source.\n     *\n     * @abstract\n     * @param {Document|Element|Object|string} source Source.\n     * @param {ReadOptions} [opt_options] Read options.\n     * @return {import(\"../Feature.js\").FeatureLike} Feature.\n     */\n    FeatureFormat.prototype.readFeature = function (source, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read all features from a source.\n     *\n     * @abstract\n     * @param {Document|Element|ArrayBuffer|Object|string} source Source.\n     * @param {ReadOptions} [opt_options] Read options.\n     * @return {Array<import(\"../Feature.js\").FeatureLike>} Features.\n     */\n    FeatureFormat.prototype.readFeatures = function (source, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read a single geometry from a source.\n     *\n     * @abstract\n     * @param {Document|Element|Object|string} source Source.\n     * @param {ReadOptions} [opt_options] Read options.\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    FeatureFormat.prototype.readGeometry = function (source, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read the projection from a source.\n     *\n     * @abstract\n     * @param {Document|Element|Object|string} source Source.\n     * @return {import(\"../proj/Projection.js\").default|undefined} Projection.\n     */\n    FeatureFormat.prototype.readProjection = function (source) {\n        return abstract();\n    };\n    /**\n     * Encode a feature in this format.\n     *\n     * @abstract\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {WriteOptions} [opt_options] Write options.\n     * @return {string|ArrayBuffer} Result.\n     */\n    FeatureFormat.prototype.writeFeature = function (feature, opt_options) {\n        return abstract();\n    };\n    /**\n     * Encode an array of features in this format.\n     *\n     * @abstract\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {WriteOptions} [opt_options] Write options.\n     * @return {string|ArrayBuffer} Result.\n     */\n    FeatureFormat.prototype.writeFeatures = function (features, opt_options) {\n        return abstract();\n    };\n    /**\n     * Write a single geometry in this format.\n     *\n     * @abstract\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {WriteOptions} [opt_options] Write options.\n     * @return {string|ArrayBuffer} Result.\n     */\n    FeatureFormat.prototype.writeGeometry = function (geometry, opt_options) {\n        return abstract();\n    };\n    return FeatureFormat;\n}());\nexport default FeatureFormat;\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {boolean} write Set to true for writing, false for reading.\n * @param {WriteOptions|ReadOptions} [opt_options] Options.\n * @return {import(\"../geom/Geometry.js\").default} Transformed geometry.\n */\nexport function transformGeometryWithOptions(geometry, write, opt_options) {\n    var featureProjection = opt_options\n        ? getProjection(opt_options.featureProjection)\n        : null;\n    var dataProjection = opt_options\n        ? getProjection(opt_options.dataProjection)\n        : null;\n    var transformed;\n    if (featureProjection &&\n        dataProjection &&\n        !equivalentProjection(featureProjection, dataProjection)) {\n        transformed = (write ? geometry.clone() : geometry).transform(write ? featureProjection : dataProjection, write ? dataProjection : featureProjection);\n    }\n    else {\n        transformed = geometry;\n    }\n    if (write &&\n        opt_options &&\n        /** @type {WriteOptions} */ (opt_options).decimals !== undefined) {\n        var power_1 = Math.pow(10, \n        /** @type {WriteOptions} */ (opt_options).decimals);\n        // if decimals option on write, round each coordinate appropriately\n        /**\n         * @param {Array<number>} coordinates Coordinates.\n         * @return {Array<number>} Transformed coordinates.\n         */\n        var transform = function (coordinates) {\n            for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n                coordinates[i] = Math.round(coordinates[i] * power_1) / power_1;\n            }\n            return coordinates;\n        };\n        if (transformed === geometry) {\n            transformed = geometry.clone();\n        }\n        transformed.applyTransform(transform);\n    }\n    return transformed;\n}\n/**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {ReadOptions} [opt_options] Read options.\n * @return {import(\"../extent.js\").Extent} Transformed extent.\n */\nexport function transformExtentWithOptions(extent, opt_options) {\n    var featureProjection = opt_options\n        ? getProjection(opt_options.featureProjection)\n        : null;\n    var dataProjection = opt_options\n        ? getProjection(opt_options.dataProjection)\n        : null;\n    if (featureProjection &&\n        dataProjection &&\n        !equivalentProjection(featureProjection, dataProjection)) {\n        return transformExtent(extent, dataProjection, featureProjection);\n    }\n    else {\n        return extent;\n    }\n}\n//# sourceMappingURL=Feature.js.map","/**\n * @module ol/render/canvas/BuilderType\n */\n/**\n * @enum {string}\n */\nexport default {\n    CIRCLE: 'Circle',\n    DEFAULT: 'Default',\n    IMAGE: 'Image',\n    LINE_STRING: 'LineString',\n    POLYGON: 'Polygon',\n    TEXT: 'Text',\n};\n//# sourceMappingURL=BuilderType.js.map","/**\n * @module ol/size\n */\n/**\n * An array of numbers representing a size: `[width, height]`.\n * @typedef {Array<number>} Size\n * @api\n */\n/**\n * Returns a buffered size.\n * @param {Size} size Size.\n * @param {number} num The amount by which to buffer.\n * @param {Size} [opt_size] Optional reusable size array.\n * @return {Size} The buffered size.\n */\nexport function buffer(size, num, opt_size) {\n    if (opt_size === undefined) {\n        opt_size = [0, 0];\n    }\n    opt_size[0] = size[0] + 2 * num;\n    opt_size[1] = size[1] + 2 * num;\n    return opt_size;\n}\n/**\n * Determines if a size has a positive area.\n * @param {Size} size The size to test.\n * @return {boolean} The size has a positive area.\n */\nexport function hasArea(size) {\n    return size[0] > 0 && size[1] > 0;\n}\n/**\n * Returns a size scaled by a ratio. The result will be an array of integers.\n * @param {Size} size Size.\n * @param {number} ratio Ratio.\n * @param {Size} [opt_size] Optional reusable size array.\n * @return {Size} The scaled size.\n */\nexport function scale(size, ratio, opt_size) {\n    if (opt_size === undefined) {\n        opt_size = [0, 0];\n    }\n    opt_size[0] = (size[0] * ratio + 0.5) | 0;\n    opt_size[1] = (size[1] * ratio + 0.5) | 0;\n    return opt_size;\n}\n/**\n * Returns an `Size` array for the passed in number (meaning: square) or\n * `Size` array.\n * (meaning: non-square),\n * @param {number|Size} size Width and height.\n * @param {Size} [opt_size] Optional reusable size array.\n * @return {Size} Size.\n * @api\n */\nexport function toSize(size, opt_size) {\n    if (Array.isArray(size)) {\n        return size;\n    }\n    else {\n        if (opt_size === undefined) {\n            opt_size = [size, size];\n        }\n        else {\n            opt_size[0] = size;\n            opt_size[1] = size;\n        }\n        return opt_size;\n    }\n}\n//# sourceMappingURL=size.js.map","/**\n * @module ol/css\n */\n/**\n * @typedef {Object} FontParameters\n * @property {string} style Style.\n * @property {string} variant Variant.\n * @property {string} weight Weight.\n * @property {string} size Size.\n * @property {string} lineHeight LineHeight.\n * @property {string} family Family.\n * @property {Array<string>} families Families.\n */\n/**\n * The CSS class for hidden feature.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_HIDDEN = 'ol-hidden';\n/**\n * The CSS class that we'll give the DOM elements to have them selectable.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_SELECTABLE = 'ol-selectable';\n/**\n * The CSS class that we'll give the DOM elements to have them unselectable.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_UNSELECTABLE = 'ol-unselectable';\n/**\n * The CSS class for unsupported feature.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_UNSUPPORTED = 'ol-unsupported';\n/**\n * The CSS class for controls.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_CONTROL = 'ol-control';\n/**\n * The CSS class that we'll give the DOM elements that are collapsed, i.e.\n * to those elements which usually can be expanded.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_COLLAPSED = 'ol-collapsed';\n/**\n * From https://stackoverflow.com/questions/10135697/regex-to-parse-any-css-font\n * @type {RegExp}\n */\nvar fontRegEx = new RegExp([\n    '^\\\\s*(?=(?:(?:[-a-z]+\\\\s*){0,2}(italic|oblique))?)',\n    '(?=(?:(?:[-a-z]+\\\\s*){0,2}(small-caps))?)',\n    '(?=(?:(?:[-a-z]+\\\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)',\n    '(?:(?:normal|\\\\1|\\\\2|\\\\3)\\\\s*){0,3}((?:xx?-)?',\n    '(?:small|large)|medium|smaller|larger|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx]))',\n    '(?:\\\\s*\\\\/\\\\s*(normal|[\\\\.\\\\d]+(?:\\\\%|in|[cem]m|ex|p[ctx])?))',\n    '?\\\\s*([-,\\\\\"\\\\\\'\\\\sa-z]+?)\\\\s*$',\n].join(''), 'i');\nvar fontRegExMatchIndex = [\n    'style',\n    'variant',\n    'weight',\n    'size',\n    'lineHeight',\n    'family',\n];\n/**\n * Get the list of font families from a font spec.  Note that this doesn't work\n * for font families that have commas in them.\n * @param {string} fontSpec The CSS font property.\n * @return {FontParameters} The font parameters (or null if the input spec is invalid).\n */\nexport var getFontParameters = function (fontSpec) {\n    var match = fontSpec.match(fontRegEx);\n    if (!match) {\n        return null;\n    }\n    var style = /** @type {FontParameters} */ ({\n        lineHeight: 'normal',\n        size: '1.2em',\n        style: 'normal',\n        weight: 'normal',\n        variant: 'normal',\n    });\n    for (var i = 0, ii = fontRegExMatchIndex.length; i < ii; ++i) {\n        var value = match[i + 1];\n        if (value !== undefined) {\n            style[fontRegExMatchIndex[i]] = value;\n        }\n    }\n    style.families = style.family.split(/,\\s?/);\n    return style;\n};\n//# sourceMappingURL=css.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Collection\n */\nimport AssertionError from './AssertionError.js';\nimport BaseObject from './Object.js';\nimport CollectionEventType from './CollectionEventType.js';\nimport Event from './events/Event.js';\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n    LENGTH: 'length',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Collection~Collection} instances are instances of this\n * type.\n */\nvar CollectionEvent = /** @class */ (function (_super) {\n    __extends(CollectionEvent, _super);\n    /**\n     * @param {import(\"./CollectionEventType.js\").default} type Type.\n     * @param {*} [opt_element] Element.\n     * @param {number} [opt_index] The index of the added or removed element.\n     */\n    function CollectionEvent(type, opt_element, opt_index) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The element that is added to or removed from the collection.\n         * @type {*}\n         * @api\n         */\n        _this.element = opt_element;\n        /**\n         * The index of the added or removed element.\n         * @type {number}\n         * @api\n         */\n        _this.index = opt_index;\n        return _this;\n    }\n    return CollectionEvent;\n}(Event));\nexport { CollectionEvent };\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature<import(\"./Observable\").EventTypes, import(\"./events/Event.js\").default, Return> &\n *   import(\"./Observable\").OnSignature<import(\"./ObjectEventType\").Types|'change:length', import(\"./Object\").ObjectEvent, Return> &\n *   import(\"./Observable\").OnSignature<'add'|'remove', CollectionEvent, Return> &\n *   import(\"./Observable\").CombinedOnSignature<import(\"./Observable\").EventTypes|import(\"./ObjectEventType\").Types|\n *     'change:length'|'add'|'remove',Return>} CollectionOnSignature\n */\n/**\n * @typedef {Object} Options\n * @property {boolean} [unique=false] Disallow the same item from being added to\n * the collection twice.\n */\n/**\n * @classdesc\n * An expanded version of standard JS Array, adding convenience methods for\n * manipulation. Add and remove changes to the Collection trigger a Collection\n * event. Note that this does not cover changes to the objects _within_ the\n * Collection; they trigger events on the appropriate object, not on the\n * Collection as a whole.\n *\n * @fires CollectionEvent\n *\n * @template T\n * @api\n */\nvar Collection = /** @class */ (function (_super) {\n    __extends(Collection, _super);\n    /**\n     * @param {Array<T>} [opt_array] Array.\n     * @param {Options} [opt_options] Collection options.\n     */\n    function Collection(opt_array, opt_options) {\n        var _this = _super.call(this) || this;\n        /***\n         * @type {CollectionOnSignature<import(\"./Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {CollectionOnSignature<import(\"./Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {CollectionOnSignature<void>}\n         */\n        _this.un;\n        var options = opt_options || {};\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.unique_ = !!options.unique;\n        /**\n         * @private\n         * @type {!Array<T>}\n         */\n        _this.array_ = opt_array ? opt_array : [];\n        if (_this.unique_) {\n            for (var i = 0, ii = _this.array_.length; i < ii; ++i) {\n                _this.assertUnique_(_this.array_[i], i);\n            }\n        }\n        _this.updateLength_();\n        return _this;\n    }\n    /**\n     * Remove all elements from the collection.\n     * @api\n     */\n    Collection.prototype.clear = function () {\n        while (this.getLength() > 0) {\n            this.pop();\n        }\n    };\n    /**\n     * Add elements to the collection.  This pushes each item in the provided array\n     * to the end of the collection.\n     * @param {!Array<T>} arr Array.\n     * @return {Collection<T>} This collection.\n     * @api\n     */\n    Collection.prototype.extend = function (arr) {\n        for (var i = 0, ii = arr.length; i < ii; ++i) {\n            this.push(arr[i]);\n        }\n        return this;\n    };\n    /**\n     * Iterate over each element, calling the provided callback.\n     * @param {function(T, number, Array<T>): *} f The function to call\n     *     for every element. This function takes 3 arguments (the element, the\n     *     index and the array). The return value is ignored.\n     * @api\n     */\n    Collection.prototype.forEach = function (f) {\n        var array = this.array_;\n        for (var i = 0, ii = array.length; i < ii; ++i) {\n            f(array[i], i, array);\n        }\n    };\n    /**\n     * Get a reference to the underlying Array object. Warning: if the array\n     * is mutated, no events will be dispatched by the collection, and the\n     * collection's \"length\" property won't be in sync with the actual length\n     * of the array.\n     * @return {!Array<T>} Array.\n     * @api\n     */\n    Collection.prototype.getArray = function () {\n        return this.array_;\n    };\n    /**\n     * Get the element at the provided index.\n     * @param {number} index Index.\n     * @return {T} Element.\n     * @api\n     */\n    Collection.prototype.item = function (index) {\n        return this.array_[index];\n    };\n    /**\n     * Get the length of this collection.\n     * @return {number} The length of the array.\n     * @observable\n     * @api\n     */\n    Collection.prototype.getLength = function () {\n        return this.get(Property.LENGTH);\n    };\n    /**\n     * Insert an element at the provided index.\n     * @param {number} index Index.\n     * @param {T} elem Element.\n     * @api\n     */\n    Collection.prototype.insertAt = function (index, elem) {\n        if (this.unique_) {\n            this.assertUnique_(elem);\n        }\n        this.array_.splice(index, 0, elem);\n        this.updateLength_();\n        this.dispatchEvent(new CollectionEvent(CollectionEventType.ADD, elem, index));\n    };\n    /**\n     * Remove the last element of the collection and return it.\n     * Return `undefined` if the collection is empty.\n     * @return {T|undefined} Element.\n     * @api\n     */\n    Collection.prototype.pop = function () {\n        return this.removeAt(this.getLength() - 1);\n    };\n    /**\n     * Insert the provided element at the end of the collection.\n     * @param {T} elem Element.\n     * @return {number} New length of the collection.\n     * @api\n     */\n    Collection.prototype.push = function (elem) {\n        if (this.unique_) {\n            this.assertUnique_(elem);\n        }\n        var n = this.getLength();\n        this.insertAt(n, elem);\n        return this.getLength();\n    };\n    /**\n     * Remove the first occurrence of an element from the collection.\n     * @param {T} elem Element.\n     * @return {T|undefined} The removed element or undefined if none found.\n     * @api\n     */\n    Collection.prototype.remove = function (elem) {\n        var arr = this.array_;\n        for (var i = 0, ii = arr.length; i < ii; ++i) {\n            if (arr[i] === elem) {\n                return this.removeAt(i);\n            }\n        }\n        return undefined;\n    };\n    /**\n     * Remove the element at the provided index and return it.\n     * Return `undefined` if the collection does not contain this index.\n     * @param {number} index Index.\n     * @return {T|undefined} Value.\n     * @api\n     */\n    Collection.prototype.removeAt = function (index) {\n        var prev = this.array_[index];\n        this.array_.splice(index, 1);\n        this.updateLength_();\n        this.dispatchEvent(new CollectionEvent(CollectionEventType.REMOVE, prev, index));\n        return prev;\n    };\n    /**\n     * Set the element at the provided index.\n     * @param {number} index Index.\n     * @param {T} elem Element.\n     * @api\n     */\n    Collection.prototype.setAt = function (index, elem) {\n        var n = this.getLength();\n        if (index < n) {\n            if (this.unique_) {\n                this.assertUnique_(elem, index);\n            }\n            var prev = this.array_[index];\n            this.array_[index] = elem;\n            this.dispatchEvent(new CollectionEvent(CollectionEventType.REMOVE, prev, index));\n            this.dispatchEvent(new CollectionEvent(CollectionEventType.ADD, elem, index));\n        }\n        else {\n            for (var j = n; j < index; ++j) {\n                this.insertAt(j, undefined);\n            }\n            this.insertAt(index, elem);\n        }\n    };\n    /**\n     * @private\n     */\n    Collection.prototype.updateLength_ = function () {\n        this.set(Property.LENGTH, this.array_.length);\n    };\n    /**\n     * @private\n     * @param {T} elem Element.\n     * @param {number} [opt_except] Optional index to ignore.\n     */\n    Collection.prototype.assertUnique_ = function (elem, opt_except) {\n        for (var i = 0, ii = this.array_.length; i < ii; ++i) {\n            if (this.array_[i] === elem && i !== opt_except) {\n                throw new AssertionError(58);\n            }\n        }\n    };\n    return Collection;\n}(BaseObject));\nexport default Collection;\n//# sourceMappingURL=Collection.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Pointer\n */\nimport Interaction from './Interaction.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport { getValues } from '../obj.js';\n/**\n * @typedef {Object} Options\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleDownEvent]\n * Function handling \"down\" events. If the function returns `true` then a drag\n * sequence is started.\n * @property {function(import(\"../MapBrowserEvent.js\").default):void} [handleDragEvent]\n * Function handling \"drag\" events. This function is called on \"move\" events\n * during a drag sequence.\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleEvent]\n * Method called by the map to notify the interaction that a browser event was\n * dispatched to the map. The function may return `false` to prevent the\n * propagation of the event to other interactions in the map's interactions\n * chain.\n * @property {function(import(\"../MapBrowserEvent.js\").default):void} [handleMoveEvent]\n * Function handling \"move\" events. This function is called on \"move\" events.\n * This functions is also called during a drag sequence, so during a drag\n * sequence both the `handleDragEvent` function and this function are called.\n * If `handleDownEvent` is defined and it returns true this function will not\n * be called during a drag sequence.\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleUpEvent]\n *  Function handling \"up\" events. If the function returns `false` then the\n * current drag sequence is stopped.\n * @property {function(boolean):boolean} [stopDown]\n * Should the down event be propagated to other interactions, or should be\n * stopped?\n */\n/**\n * @classdesc\n * Base class that calls user-defined functions on `down`, `move` and `up`\n * events. This class also manages \"drag sequences\".\n *\n * When the `handleDownEvent` user function returns `true` a drag sequence is\n * started. During a drag sequence the `handleDragEvent` user function is\n * called on `move` events. The drag sequence ends when the `handleUpEvent`\n * user function is called and returns `false`.\n * @api\n */\nvar PointerInteraction = /** @class */ (function (_super) {\n    __extends(PointerInteraction, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function PointerInteraction(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, \n        /** @type {import(\"./Interaction.js\").InteractionOptions} */ (options)) || this;\n        if (options.handleDownEvent) {\n            _this.handleDownEvent = options.handleDownEvent;\n        }\n        if (options.handleDragEvent) {\n            _this.handleDragEvent = options.handleDragEvent;\n        }\n        if (options.handleMoveEvent) {\n            _this.handleMoveEvent = options.handleMoveEvent;\n        }\n        if (options.handleUpEvent) {\n            _this.handleUpEvent = options.handleUpEvent;\n        }\n        if (options.stopDown) {\n            _this.stopDown = options.stopDown;\n        }\n        /**\n         * @type {boolean}\n         * @protected\n         */\n        _this.handlingDownUpSequence = false;\n        /**\n         * @type {!Object<string, PointerEvent>}\n         * @private\n         */\n        _this.trackedPointers_ = {};\n        /**\n         * @type {Array<PointerEvent>}\n         * @protected\n         */\n        _this.targetPointers = [];\n        return _this;\n    }\n    /**\n     * Returns the current number of pointers involved in the interaction,\n     * e.g. `2` when two fingers are used.\n     * @return {number} The number of pointers.\n     * @api\n     */\n    PointerInteraction.prototype.getPointerCount = function () {\n        return this.targetPointers.length;\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     * @protected\n     */\n    PointerInteraction.prototype.handleDownEvent = function (mapBrowserEvent) {\n        return false;\n    };\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @protected\n     */\n    PointerInteraction.prototype.handleDragEvent = function (mapBrowserEvent) { };\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} and may call into\n     * other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are\n     * detected.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     * @api\n     */\n    PointerInteraction.prototype.handleEvent = function (mapBrowserEvent) {\n        if (!mapBrowserEvent.originalEvent) {\n            return true;\n        }\n        var stopEvent = false;\n        this.updateTrackedPointers_(mapBrowserEvent);\n        if (this.handlingDownUpSequence) {\n            if (mapBrowserEvent.type == MapBrowserEventType.POINTERDRAG) {\n                this.handleDragEvent(mapBrowserEvent);\n                // prevent page scrolling during dragging\n                mapBrowserEvent.originalEvent.preventDefault();\n            }\n            else if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {\n                var handledUp = this.handleUpEvent(mapBrowserEvent);\n                this.handlingDownUpSequence =\n                    handledUp && this.targetPointers.length > 0;\n            }\n        }\n        else {\n            if (mapBrowserEvent.type == MapBrowserEventType.POINTERDOWN) {\n                var handled = this.handleDownEvent(mapBrowserEvent);\n                this.handlingDownUpSequence = handled;\n                stopEvent = this.stopDown(handled);\n            }\n            else if (mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE) {\n                this.handleMoveEvent(mapBrowserEvent);\n            }\n        }\n        return !stopEvent;\n    };\n    /**\n     * Handle pointer move events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @protected\n     */\n    PointerInteraction.prototype.handleMoveEvent = function (mapBrowserEvent) { };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     * @protected\n     */\n    PointerInteraction.prototype.handleUpEvent = function (mapBrowserEvent) {\n        return false;\n    };\n    /**\n     * This function is used to determine if \"down\" events should be propagated\n     * to other interactions or should be stopped.\n     * @param {boolean} handled Was the event handled by the interaction?\n     * @return {boolean} Should the `down` event be stopped?\n     */\n    PointerInteraction.prototype.stopDown = function (handled) {\n        return handled;\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @private\n     */\n    PointerInteraction.prototype.updateTrackedPointers_ = function (mapBrowserEvent) {\n        if (isPointerDraggingEvent(mapBrowserEvent)) {\n            var event_1 = mapBrowserEvent.originalEvent;\n            var id = event_1.pointerId.toString();\n            if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {\n                delete this.trackedPointers_[id];\n            }\n            else if (mapBrowserEvent.type == MapBrowserEventType.POINTERDOWN) {\n                this.trackedPointers_[id] = event_1;\n            }\n            else if (id in this.trackedPointers_) {\n                // update only when there was a pointerdown event for this pointer\n                this.trackedPointers_[id] = event_1;\n            }\n            this.targetPointers = getValues(this.trackedPointers_);\n        }\n    };\n    return PointerInteraction;\n}(Interaction));\n/**\n * @param {Array<PointerEvent>} pointerEvents List of events.\n * @return {import(\"../pixel.js\").Pixel} Centroid pixel.\n */\nexport function centroid(pointerEvents) {\n    var length = pointerEvents.length;\n    var clientX = 0;\n    var clientY = 0;\n    for (var i = 0; i < length; i++) {\n        clientX += pointerEvents[i].clientX;\n        clientY += pointerEvents[i].clientY;\n    }\n    return [clientX / length, clientY / length];\n}\n/**\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} Whether the event is a pointerdown, pointerdrag\n *     or pointerup event.\n */\nfunction isPointerDraggingEvent(mapBrowserEvent) {\n    var type = mapBrowserEvent.type;\n    return (type === MapBrowserEventType.POINTERDOWN ||\n        type === MapBrowserEventType.POINTERDRAG ||\n        type === MapBrowserEventType.POINTERUP);\n}\nexport default PointerInteraction;\n//# sourceMappingURL=Pointer.js.map","/**\n * @module ol/source/State\n */\n/**\n * @enum {string}\n * State of the source, one of 'undefined', 'loading', 'ready' or 'error'.\n */\nexport default {\n    UNDEFINED: 'undefined',\n    LOADING: 'loading',\n    READY: 'ready',\n    ERROR: 'error',\n};\n//# sourceMappingURL=State.js.map","/**\n * @module ol/events/Event\n */\n/**\n * @classdesc\n * Stripped down implementation of the W3C DOM Level 2 Event interface.\n * See https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-interface.\n *\n * This implementation only provides `type` and `target` properties, and\n * `stopPropagation` and `preventDefault` methods. It is meant as base class\n * for higher level events defined in the library, and works with\n * {@link module:ol/events/Target~Target}.\n */\nvar BaseEvent = /** @class */ (function () {\n    /**\n     * @param {string} type Type.\n     */\n    function BaseEvent(type) {\n        /**\n         * @type {boolean}\n         */\n        this.propagationStopped;\n        /**\n         * @type {boolean}\n         */\n        this.defaultPrevented;\n        /**\n         * The event type.\n         * @type {string}\n         * @api\n         */\n        this.type = type;\n        /**\n         * The event target.\n         * @type {Object}\n         * @api\n         */\n        this.target = null;\n    }\n    /**\n     * Prevent default. This means that no emulated `click`, `singleclick` or `doubleclick` events\n     * will be fired.\n     * @api\n     */\n    BaseEvent.prototype.preventDefault = function () {\n        this.defaultPrevented = true;\n    };\n    /**\n     * Stop event propagation.\n     * @api\n     */\n    BaseEvent.prototype.stopPropagation = function () {\n        this.propagationStopped = true;\n    };\n    return BaseEvent;\n}());\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function stopPropagation(evt) {\n    evt.stopPropagation();\n}\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function preventDefault(evt) {\n    evt.preventDefault();\n}\nexport default BaseEvent;\n//# sourceMappingURL=Event.js.map","/**\n * @module ol/style/Style\n */\nimport CircleStyle from './Circle.js';\nimport Fill from './Fill.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport Stroke from './Stroke.js';\nimport { assert } from '../asserts.js';\n/**\n * A function that takes an {@link module:ol/Feature} and a `{number}`\n * representing the view's resolution. The function should return a\n * {@link module:ol/style/Style} or an array of them. This way e.g. a\n * vector layer can be styled. If the function returns `undefined`, the\n * feature will not be rendered.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike, number):(Style|Array<Style>|void)} StyleFunction\n */\n/**\n * A {@link Style}, an array of {@link Style}, or a {@link StyleFunction}.\n * @typedef {Style|Array<Style>|StyleFunction} StyleLike\n */\n/**\n * A function that takes an {@link module:ol/Feature} as argument and returns an\n * {@link module:ol/geom/Geometry} that will be rendered and styled for the feature.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike):\n *     (import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default|undefined)} GeometryFunction\n */\n/**\n * Custom renderer function. Takes two arguments:\n *\n * 1. The pixel coordinates of the geometry in GeoJSON notation.\n * 2. The {@link module:ol/render~State} of the layer renderer.\n *\n * @typedef {function((import(\"../coordinate.js\").Coordinate|Array<import(\"../coordinate.js\").Coordinate>|Array<Array<import(\"../coordinate.js\").Coordinate>>),import(\"../render.js\").State): void}\n * RenderFunction\n */\n/**\n * @typedef {Object} Options\n * @property {string|import(\"../geom/Geometry.js\").default|GeometryFunction} [geometry] Feature property or geometry\n * or function returning a geometry to render for this style.\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {import(\"./Image.js\").default} [image] Image style.\n * @property {RenderFunction} [renderer] Custom renderer. When configured, `fill`, `stroke` and `image` will be\n * ignored, and the provided function will be called with each render frame for each geometry.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {import(\"./Text.js\").default} [text] Text style.\n * @property {number} [zIndex] Z index.\n */\n/**\n * @classdesc\n * Container for vector feature rendering styles. Any changes made to the style\n * or its children through `set*()` methods will not take effect until the\n * feature or layer that uses the style is re-rendered.\n *\n * ## Feature styles\n *\n * If no style is defined, the following default style is used:\n * ```js\n *  import {Fill, Stroke, Circle, Style} from 'ol/style';\n *\n *  var fill = new Fill({\n *    color: 'rgba(255,255,255,0.4)'\n *  });\n *  var stroke = new Stroke({\n *    color: '#3399CC',\n *    width: 1.25\n *  });\n *  var styles = [\n *    new Style({\n *      image: new Circle({\n *        fill: fill,\n *        stroke: stroke,\n *        radius: 5\n *      }),\n *      fill: fill,\n *      stroke: stroke\n *    })\n *  ];\n * ```\n *\n * A separate editing style has the following defaults:\n * ```js\n *  import {Fill, Stroke, Circle, Style} from 'ol/style';\n *  import GeometryType from 'ol/geom/GeometryType';\n *\n *  var white = [255, 255, 255, 1];\n *  var blue = [0, 153, 255, 1];\n *  var width = 3;\n *  styles[GeometryType.POLYGON] = [\n *    new Style({\n *      fill: new Fill({\n *        color: [255, 255, 255, 0.5]\n *      })\n *    })\n *  ];\n *  styles[GeometryType.MULTI_POLYGON] =\n *      styles[GeometryType.POLYGON];\n *  styles[GeometryType.LINE_STRING] = [\n *    new Style({\n *      stroke: new Stroke({\n *        color: white,\n *        width: width + 2\n *      })\n *    }),\n *    new Style({\n *      stroke: new Stroke({\n *        color: blue,\n *        width: width\n *      })\n *    })\n *  ];\n *  styles[GeometryType.MULTI_LINE_STRING] =\n *      styles[GeometryType.LINE_STRING];\n *  styles[GeometryType.POINT] = [\n *    new Style({\n *      image: new Circle({\n *        radius: width * 2,\n *        fill: new Fill({\n *          color: blue\n *        }),\n *        stroke: new Stroke({\n *          color: white,\n *          width: width / 2\n *        })\n *      }),\n *      zIndex: Infinity\n *    })\n *  ];\n *  styles[GeometryType.MULTI_POINT] =\n *      styles[GeometryType.POINT];\n *  styles[GeometryType.GEOMETRY_COLLECTION] =\n *      styles[GeometryType.POLYGON].concat(\n *          styles[GeometryType.LINE_STRING],\n *          styles[GeometryType.POINT]\n *      );\n * ```\n *\n * @api\n */\nvar Style = /** @class */ (function () {\n    /**\n     * @param {Options} [opt_options] Style options.\n     */\n    function Style(opt_options) {\n        var options = opt_options || {};\n        /**\n         * @private\n         * @type {string|import(\"../geom/Geometry.js\").default|GeometryFunction}\n         */\n        this.geometry_ = null;\n        /**\n         * @private\n         * @type {!GeometryFunction}\n         */\n        this.geometryFunction_ = defaultGeometryFunction;\n        if (options.geometry !== undefined) {\n            this.setGeometry(options.geometry);\n        }\n        /**\n         * @private\n         * @type {import(\"./Fill.js\").default}\n         */\n        this.fill_ = options.fill !== undefined ? options.fill : null;\n        /**\n         * @private\n         * @type {import(\"./Image.js\").default}\n         */\n        this.image_ = options.image !== undefined ? options.image : null;\n        /**\n         * @private\n         * @type {RenderFunction|null}\n         */\n        this.renderer_ = options.renderer !== undefined ? options.renderer : null;\n        /**\n         * @private\n         * @type {import(\"./Stroke.js\").default}\n         */\n        this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n        /**\n         * @private\n         * @type {import(\"./Text.js\").default}\n         */\n        this.text_ = options.text !== undefined ? options.text : null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.zIndex_ = options.zIndex;\n    }\n    /**\n     * Clones the style.\n     * @return {Style} The cloned style.\n     * @api\n     */\n    Style.prototype.clone = function () {\n        var geometry = this.getGeometry();\n        if (geometry && typeof geometry === 'object') {\n            geometry = /** @type {import(\"../geom/Geometry.js\").default} */ (geometry).clone();\n        }\n        return new Style({\n            geometry: geometry,\n            fill: this.getFill() ? this.getFill().clone() : undefined,\n            image: this.getImage() ? this.getImage().clone() : undefined,\n            renderer: this.getRenderer(),\n            stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n            text: this.getText() ? this.getText().clone() : undefined,\n            zIndex: this.getZIndex(),\n        });\n    };\n    /**\n     * Get the custom renderer function that was configured with\n     * {@link #setRenderer} or the `renderer` constructor option.\n     * @return {RenderFunction|null} Custom renderer function.\n     * @api\n     */\n    Style.prototype.getRenderer = function () {\n        return this.renderer_;\n    };\n    /**\n     * Sets a custom renderer function for this style. When set, `fill`, `stroke`\n     * and `image` options of the style will be ignored.\n     * @param {RenderFunction|null} renderer Custom renderer function.\n     * @api\n     */\n    Style.prototype.setRenderer = function (renderer) {\n        this.renderer_ = renderer;\n    };\n    /**\n     * Get the geometry to be rendered.\n     * @return {string|import(\"../geom/Geometry.js\").default|GeometryFunction}\n     * Feature property or geometry or function that returns the geometry that will\n     * be rendered with this style.\n     * @api\n     */\n    Style.prototype.getGeometry = function () {\n        return this.geometry_;\n    };\n    /**\n     * Get the function used to generate a geometry for rendering.\n     * @return {!GeometryFunction} Function that is called with a feature\n     * and returns the geometry to render instead of the feature's geometry.\n     * @api\n     */\n    Style.prototype.getGeometryFunction = function () {\n        return this.geometryFunction_;\n    };\n    /**\n     * Get the fill style.\n     * @return {import(\"./Fill.js\").default} Fill style.\n     * @api\n     */\n    Style.prototype.getFill = function () {\n        return this.fill_;\n    };\n    /**\n     * Set the fill style.\n     * @param {import(\"./Fill.js\").default} fill Fill style.\n     * @api\n     */\n    Style.prototype.setFill = function (fill) {\n        this.fill_ = fill;\n    };\n    /**\n     * Get the image style.\n     * @return {import(\"./Image.js\").default} Image style.\n     * @api\n     */\n    Style.prototype.getImage = function () {\n        return this.image_;\n    };\n    /**\n     * Set the image style.\n     * @param {import(\"./Image.js\").default} image Image style.\n     * @api\n     */\n    Style.prototype.setImage = function (image) {\n        this.image_ = image;\n    };\n    /**\n     * Get the stroke style.\n     * @return {import(\"./Stroke.js\").default} Stroke style.\n     * @api\n     */\n    Style.prototype.getStroke = function () {\n        return this.stroke_;\n    };\n    /**\n     * Set the stroke style.\n     * @param {import(\"./Stroke.js\").default} stroke Stroke style.\n     * @api\n     */\n    Style.prototype.setStroke = function (stroke) {\n        this.stroke_ = stroke;\n    };\n    /**\n     * Get the text style.\n     * @return {import(\"./Text.js\").default} Text style.\n     * @api\n     */\n    Style.prototype.getText = function () {\n        return this.text_;\n    };\n    /**\n     * Set the text style.\n     * @param {import(\"./Text.js\").default} text Text style.\n     * @api\n     */\n    Style.prototype.setText = function (text) {\n        this.text_ = text;\n    };\n    /**\n     * Get the z-index for the style.\n     * @return {number|undefined} ZIndex.\n     * @api\n     */\n    Style.prototype.getZIndex = function () {\n        return this.zIndex_;\n    };\n    /**\n     * Set a geometry that is rendered instead of the feature's geometry.\n     *\n     * @param {string|import(\"../geom/Geometry.js\").default|GeometryFunction} geometry\n     *     Feature property or geometry or function returning a geometry to render\n     *     for this style.\n     * @api\n     */\n    Style.prototype.setGeometry = function (geometry) {\n        if (typeof geometry === 'function') {\n            this.geometryFunction_ = geometry;\n        }\n        else if (typeof geometry === 'string') {\n            this.geometryFunction_ = function (feature) {\n                return /** @type {import(\"../geom/Geometry.js\").default} */ (feature.get(geometry));\n            };\n        }\n        else if (!geometry) {\n            this.geometryFunction_ = defaultGeometryFunction;\n        }\n        else if (geometry !== undefined) {\n            this.geometryFunction_ = function () {\n                return /** @type {import(\"../geom/Geometry.js\").default} */ (geometry);\n            };\n        }\n        this.geometry_ = geometry;\n    };\n    /**\n     * Set the z-index.\n     *\n     * @param {number|undefined} zIndex ZIndex.\n     * @api\n     */\n    Style.prototype.setZIndex = function (zIndex) {\n        this.zIndex_ = zIndex;\n    };\n    return Style;\n}());\n/**\n * Convert the provided object into a style function.  Functions passed through\n * unchanged.  Arrays of Style or single style objects wrapped in a\n * new style function.\n * @param {StyleFunction|Array<Style>|Style} obj\n *     A style function, a single style, or an array of styles.\n * @return {StyleFunction} A style function.\n */\nexport function toFunction(obj) {\n    var styleFunction;\n    if (typeof obj === 'function') {\n        styleFunction = obj;\n    }\n    else {\n        /**\n         * @type {Array<Style>}\n         */\n        var styles_1;\n        if (Array.isArray(obj)) {\n            styles_1 = obj;\n        }\n        else {\n            assert(typeof ( /** @type {?} */(obj).getZIndex) === 'function', 41); // Expected an `Style` or an array of `Style`\n            var style = /** @type {Style} */ (obj);\n            styles_1 = [style];\n        }\n        styleFunction = function () {\n            return styles_1;\n        };\n    }\n    return styleFunction;\n}\n/**\n * @type {Array<Style>}\n */\nvar defaultStyles = null;\n/**\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} resolution Resolution.\n * @return {Array<Style>} Style.\n */\nexport function createDefaultStyle(feature, resolution) {\n    // We don't use an immediately-invoked function\n    // and a closure so we don't get an error at script evaluation time in\n    // browsers that do not support Canvas. (import(\"./Circle.js\").CircleStyle does\n    // canvas.getContext('2d') at construction time, which will cause an.error\n    // in such browsers.)\n    if (!defaultStyles) {\n        var fill = new Fill({\n            color: 'rgba(255,255,255,0.4)',\n        });\n        var stroke = new Stroke({\n            color: '#3399CC',\n            width: 1.25,\n        });\n        defaultStyles = [\n            new Style({\n                image: new CircleStyle({\n                    fill: fill,\n                    stroke: stroke,\n                    radius: 5,\n                }),\n                fill: fill,\n                stroke: stroke,\n            }),\n        ];\n    }\n    return defaultStyles;\n}\n/**\n * Default styles for editing features.\n * @return {Object<import(\"../geom/GeometryType.js\").default, Array<Style>>} Styles\n */\nexport function createEditingStyle() {\n    /** @type {Object<import(\"../geom/GeometryType.js\").default, Array<Style>>} */\n    var styles = {};\n    var white = [255, 255, 255, 1];\n    var blue = [0, 153, 255, 1];\n    var width = 3;\n    styles[GeometryType.POLYGON] = [\n        new Style({\n            fill: new Fill({\n                color: [255, 255, 255, 0.5],\n            }),\n        }),\n    ];\n    styles[GeometryType.MULTI_POLYGON] = styles[GeometryType.POLYGON];\n    styles[GeometryType.LINE_STRING] = [\n        new Style({\n            stroke: new Stroke({\n                color: white,\n                width: width + 2,\n            }),\n        }),\n        new Style({\n            stroke: new Stroke({\n                color: blue,\n                width: width,\n            }),\n        }),\n    ];\n    styles[GeometryType.MULTI_LINE_STRING] = styles[GeometryType.LINE_STRING];\n    styles[GeometryType.CIRCLE] = styles[GeometryType.POLYGON].concat(styles[GeometryType.LINE_STRING]);\n    styles[GeometryType.POINT] = [\n        new Style({\n            image: new CircleStyle({\n                radius: width * 2,\n                fill: new Fill({\n                    color: blue,\n                }),\n                stroke: new Stroke({\n                    color: white,\n                    width: width / 2,\n                }),\n            }),\n            zIndex: Infinity,\n        }),\n    ];\n    styles[GeometryType.MULTI_POINT] = styles[GeometryType.POINT];\n    styles[GeometryType.GEOMETRY_COLLECTION] = styles[GeometryType.POLYGON].concat(styles[GeometryType.LINE_STRING], styles[GeometryType.POINT]);\n    return styles;\n}\n/**\n * Function that is called with a feature and returns its default geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature to get the geometry for.\n * @return {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default|undefined} Geometry to render.\n */\nfunction defaultGeometryFunction(feature) {\n    return feature.getGeometry();\n}\nexport default Style;\n//# sourceMappingURL=Style.js.map","import { ajax } from './helpers';\r\nimport { Events, ButtonLocations, Themes, Controls as ControlTypes } from './definitions';\r\nimport { ol } from './definitionsOl';\r\nimport Style from 'ol/style/Style';\r\nimport Kinetic from 'ol/Kinetic';\r\nimport * as olEventsCondition from 'ol/events/condition';\r\nimport { View, Map } from 'ol';\r\nimport { Resources } from '../resources/resources';\r\nimport { PrevZoom } from './controls/prevZoom';\r\nimport { RotationControl } from './controls/rotationControl';\r\nimport { Overview } from './controls/overview';\r\nimport { AssociatedImage } from './controls/associatedImage';\r\nimport { Snapshot } from './controls/snapshot';\r\nimport { Filename } from './controls/filename';\r\nimport { DimensionSelector } from './controls/dimensionSelector';\r\nimport { PathomationAttribution } from './controls/pathomationAttribution';\r\nimport { LayerSwitch } from './controls/layerSwitch';\r\nimport { ColorAdjustment } from './controls/colorAdjustment';\r\nimport { Magnifier } from './controls/magnifier';\r\nimport { PmaMouseWheelZoom } from './interactions/customMouseWheelZoom';\r\nimport { loginSupportsPost } from \"./version\";\r\n\r\nlet stateManager = {};\r\n\r\nexport function initialize() {\r\n    if (!this.imageInfo) {\r\n        findServerUrl.call(this, 0);\r\n    } else {\r\n        this.serviceUrl = this.imageInfo.BaseUrl + \"api/json/\";\r\n        this.imagesUrl = this.imageInfo.BaseUrl;\r\n        if (!this.sessionID) {\r\n            login.call(this, loadImageInfo);\r\n        } else {\r\n            loadImageInfo.call(this);\r\n        }\r\n    }\r\n}\r\n\r\nexport function addEvent(element, eventName, fn) {\r\n    if (element.addEventListener) {\r\n        element.addEventListener(eventName, fn, false);\r\n    } else if (element.attachEvent) {\r\n        element.attachEvent('on' + eventName, fn);\r\n    }\r\n}\r\n\r\nexport function hasClass(element, className) {\r\n    return (\" \" + element.className + \" \").indexOf(\" \" + className + \" \") !== -1;\r\n}\r\n\r\nexport function addClass(element, className) {\r\n    if (!element) {\r\n        return;\r\n    }\r\n\r\n    if (hasClass(element, className)) {\r\n        return;\r\n    }\r\n\r\n    element.className += \" \" + className;\r\n}\r\n\r\nexport function removeClass(element, className) {\r\n    if (!element || !hasClass(element, className)) {\r\n        return;\r\n    }\r\n\r\n    element.className = element.className.replace(new RegExp(className, \"g\"), \"\");\r\n}\r\n\r\nexport function parseJson(response) {\r\n    if (response === null || response === undefined || response === \"\") {\r\n        return null;\r\n    }\r\n\r\n    var obj = JSON.parse(response);\r\n\r\n    if (obj.hasOwnProperty(\"d\")) {\r\n        return obj.d;\r\n    } else {\r\n        return obj;\r\n    }\r\n}\r\n\r\nexport function tileLoad(imageTile, src) {\r\n    if (this.options.flip.horizontally !== true &&\r\n        this.options.flip.vertically !== true &&\r\n        this.imageAdjustments.brightness === 0 &&\r\n        this.imageAdjustments.contrast === 1 &&\r\n        this.imageAdjustments.gamma === 1 &&\r\n        (this.imageAdjustments.rgb === null ||\r\n            (this.imageAdjustments.rgb[0] == 1 && this.imageAdjustments.rgb[1] == 1 && this.imageAdjustments.rgb[2] == 1)) &&\r\n        (!this.imageAdjustments.tileTransformers || this.imageAdjustments.tileTransformers.length === 0)) {\r\n\r\n        imageTile.getImage().src = src;\r\n        return;\r\n    }\r\n\r\n    var tmpimg = new Image();\r\n    tmpimg.crossOrigin = '';\r\n    var self = this;\r\n    tmpimg.onload = function() {\r\n        var c = document.createElement(\"canvas\");\r\n        c.width = tmpimg.width;\r\n        c.height = tmpimg.height;\r\n        var ctx = c.getContext('2d');\r\n\r\n        var tx = self.options.flip.horizontally ? tmpimg.width : 0;\r\n        var ty = self.options.flip.vertically ? tmpimg.height : 0;\r\n        var sx = self.options.flip.horizontally ? -1 : 1;\r\n        var sy = self.options.flip.vertically ? -1 : 1;\r\n\r\n        ctx.translate(tx, ty);\r\n        ctx.scale(sx, sy);\r\n\r\n        ctx.drawImage(tmpimg, 0, 0);\r\n\r\n        if (self.imageAdjustments.brightness !== 0 ||\r\n            self.imageAdjustments.contrast !== 1 ||\r\n            self.imageAdjustments.gamma !== 1 ||\r\n            (self.imageAdjustments.rgb !== null &&\r\n                (self.imageAdjustments.rgb[0] != 1 || self.imageAdjustments.rgb[1] != 1 || self.imageAdjustments.rgb[2] != 1)) ||\r\n            (self.imageAdjustments.tileTransformers && self.imageAdjustments.tileTransformers.length > 0)) {\r\n\r\n            var pixels = ctx.getImageData(0, 0, c.width, c.height);\r\n            if (self.imageAdjustments.tileTransformers) {\r\n                for (var i = 0; i < self.imageAdjustments.tileTransformers.length; i++) {\r\n                    self.imageAdjustments.tileTransformers[i](pixels);\r\n                }\r\n            }\r\n\r\n            var brightness = self.imageAdjustments.brightness,\r\n                contrast = self.imageAdjustments.contrast;\r\n            brightnessContrastFilter(pixels.data, brightness, contrast, self.imageAdjustments.gamma);\r\n            if (self.imageAdjustments.rgb !== null &&\r\n                (self.imageAdjustments.rgb[0] != 1 || self.imageAdjustments.rgb[1] != 1 || self.imageAdjustments.rgb[2] != 1)) {\r\n                colorBalanceFilter(pixels.data, self.imageAdjustments.rgb[0], self.imageAdjustments.rgb[1], self.imageAdjustments.rgb[2]);\r\n            }\r\n\r\n            ctx.putImageData(pixels, 0, 0);\r\n        }\r\n\r\n        imageTile.getImage().src = c.toDataURL(\"image/jpeg\");\r\n    };\r\n\r\n    tmpimg.src = src;\r\n}\r\n\r\nexport function getTileUrl(coord, pixelRatio, projection) {\r\n    let maxZoom = this.imageInfo.MaxZoomLevel;\r\n    let pow = Math.pow(2, coord[0]);\r\n\r\n    let x = coord[1];\r\n    if (this.options.flip.horizontally === true) {\r\n        x = (pow - coord[1] - 1);\r\n    }\r\n\r\n    let y = coord[2];\r\n    if (this.options.flip.vertically === true) {\r\n        y = pow - coord[2] - 1;\r\n    }\r\n\r\n    return this.imagesUrl + \"tile?sessionID=\" +\r\n        encodeURIComponent(this.sessionID) +\r\n        \"&channels=\" + this.channelsString +\r\n        \"&channelClipping=\" + this.channelClippingString +\r\n        \"&gamma=\" + this.channelGammaString +\r\n        \"&timeframe=\" + this.selectedTimeFrame + \"&layer=\" + this.selectedLayer + \"&pathOrUid=\" + encodeURIComponent(this.image) + \"&x=\" + x + \"&y=\" + y + \"&z=\" + coord[0];\r\n}\r\n\r\n// // export function getTileUrlPattern() {\r\n// //     return this.imagesUrl + \"tile?sessionID=\" + encodeURIComponent(this.sessionID) + \"&channels=\" + this.channelsString + \"&timeframe=\" + this.selectedTimeFrame + \"&layer=\" + this.selectedLayer + \"&pathOrUid=\" + encodeURIComponent(this.image) + \"&x={x}&y={y}&z={z}\";\r\n// // }\r\n\r\nexport function getAnnotatedTileUrlPattern(layerName) {\r\n    return this.imagesUrl + \"annotatedTile?sessionID=\" + encodeURIComponent(this.sessionID) + \"&pathOrUid=\" + encodeURIComponent(this.image) + \"&type=\" + encodeURIComponent(layerName) + \"&x={x}&y={y}&z={z}\";\r\n}\r\n\r\nexport function getAnnotatedTileUrl(layerName, coord, pixelRatio, projection) {\r\n    var maxZoom = this.imageInfo.MaxZoomLevel;\r\n    var pow = Math.pow(2, coord[0]);\r\n\r\n    let x = coord[1];\r\n    if (this.options.flip.horizontally === true) {\r\n        x = (pow - coord[1] - 1);\r\n    }\r\n\r\n    let y = coord[2];\r\n    if (this.options.flip.vertically === true) {\r\n        y = pow - coord[2] - 1;\r\n    }\r\n\r\n    return this.imagesUrl + \"annotatedTile?sessionID=\" + encodeURIComponent(this.sessionID) + \"&pathOrUid=\" + encodeURIComponent(this.image) + \"&type=\" + encodeURIComponent(layerName) + \"&x=\" + x + \"&y=\" + y + \"&z=\" + coord[0];\r\n}\r\n\r\nexport function annotatedTileLoad(imageTile, src) {\r\n    if (this.options.flip.horizontally !== true &&\r\n        this.options.flip.vertically !== true) {\r\n\r\n        imageTile.getImage().src = src;\r\n        return;\r\n    }\r\n\r\n    var tmpimg = new Image();\r\n    tmpimg.crossOrigin = '';\r\n    var self = this;\r\n    tmpimg.onload = function() {\r\n        var c = document.createElement(\"canvas\");\r\n        c.width = tmpimg.width;\r\n        c.height = tmpimg.height;\r\n        var ctx = c.getContext('2d');\r\n\r\n        var tx = self.options.flip.horizontally ? tmpimg.width : 0;\r\n        var ty = self.options.flip.vertically ? tmpimg.height : 0;\r\n        var sx = self.options.flip.horizontally ? -1 : 1;\r\n        var sy = self.options.flip.vertically ? -1 : 1;\r\n\r\n        ctx.translate(tx, ty);\r\n        ctx.scale(sx, sy);\r\n\r\n        ctx.drawImage(tmpimg, 0, 0);\r\n\r\n        imageTile.getImage().src = c.toDataURL(\"image/png\");\r\n    };\r\n\r\n    tmpimg.src = src;\r\n}\r\n\r\nexport function findServerUrl(index) {\r\n    var _this = this;\r\n    ajax.call(this, this.serverUrls[index] + \"api/json/GetVersionInfo\", \"GET\", null, function(http) {\r\n        if (http.status == 200) {\r\n            var s = this.serverUrls[index];\r\n            if (s[s.length - 1] != \"/\") {\r\n                s = s + \"/\";\r\n            }\r\n\r\n            const pmaCoreVersion = JSON.parse(http.responseText);\r\n\r\n            this.serviceUrl = s + \"api/json/\";\r\n            this.imagesUrl = s;\r\n\r\n            if (!this.sessionID) {\r\n                login.call(this, loadImageInfo, pmaCoreVersion);\r\n            } else {\r\n                loadImageInfo.call(this);\r\n            }\r\n        } else if (index < this.serverUrls.length - 1) {\r\n            findServerUrl.call(this, index + 1);\r\n        } else {\r\n            if (typeof _this.failCallback === \"function\") {\r\n                _this.failCallback();\r\n            }\r\n\r\n            throw \"No accessible server URL found.\";\r\n        }\r\n    });\r\n}\r\n\r\nexport function login(callback, pmaCoreVersion) {\r\n    var _this = this;\r\n    _this.userInfo = null;\r\n\r\n    let usePost = loginSupportsPost(pmaCoreVersion);\r\n\r\n    ajax.call(this, this.serviceUrl + \"Authenticate\", usePost ? \"POST\" : \"GET\", { username: this.username, password: this.password, caller: this.options.caller },\r\n        function(http) {\r\n            if (http.status == 200) {\r\n                var response = parseJson(http.responseText);\r\n                if (response && response.Success === true) {\r\n                    _this.sessionID = response.SessionId;\r\n                    _this.userInfo = response;\r\n                    if (callback) {\r\n                        callback.call(_this);\r\n                    }\r\n                } else {\r\n                    if (typeof _this.failCallback === \"function\") {\r\n                        _this.failCallback();\r\n                    }\r\n\r\n                    throw \"Login failed. \" + response.Reason;\r\n                }\r\n            } else {\r\n                if (typeof _this.failCallback === \"function\") {\r\n                    _this.failCallback();\r\n                }\r\n\r\n                console.log(http);\r\n                throw \"Login failed with status \" + http.status + \" \" + http.statusText;\r\n            }\r\n        }, { contentType: \"application/json\", dataEncodeCallback: usePost ? JSON.stringify : null });\r\n}\r\n\r\nexport function loadImageInfo() {\r\n    if (this.imageInfo) {\r\n        // skip getting image info, since it was already provided\r\n        createOlViewer.call(this);\r\n    } else {\r\n        var _this = this;\r\n        ajax.call(this, this.serviceUrl + \"GetImageInfo\", \"GET\", { sessionID: this.sessionID, pathOrUid: this.image }, function(http) {\r\n            if (http.status == 200) {\r\n                var response = parseJson(http.responseText);\r\n                if (response) {\r\n                    _this.imageInfo = response;\r\n                    createOlViewer.call(_this);\r\n                } else {\r\n                    if (typeof _this.failCallback === \"function\") {\r\n                        _this.failCallback();\r\n                    }\r\n\r\n                    _this.fireEvent(Events.SlideLoadError, _this);\r\n                    console.error(\"Server found but could not get image info\");\r\n                }\r\n            } else {\r\n                if (typeof _this.failCallback === \"function\") {\r\n                    _this.failCallback();\r\n                }\r\n\r\n                var errorCode = 0; // Unknown error\r\n                var errorMessage = Resources.translate(\"Unknown Error\");\r\n                try {\r\n                    if (http.responseText && http.responseText.length !== 0) {\r\n                        var errorResponse = parseJson(http.responseText);\r\n                        if (errorResponse && errorResponse.hasOwnProperty(\"Code\")) {\r\n                            errorCode = errorResponse.Code;\r\n                            errorMessage = Resources.translate(errorResponse.Message);\r\n                        }\r\n                    }\r\n                } catch (e) {}\r\n\r\n                if (this.element) {\r\n                    this.element.innerHTML = \"Cannot load slide. \" + errorMessage;\r\n                }\r\n\r\n                _this.Error = { Code: errorCode, Message: errorMessage };\r\n                _this.fireEvent(Events.SlideLoadError, _this);\r\n                console.error(\"Server responded with status \" + http.status + \" and code \" + errorCode);\r\n                console.log(http);\r\n            }\r\n        });\r\n    }\r\n}\r\n\r\nexport function annotationTransform(input, output, dimension) {\r\n    for (var i = 0; i < input.length; i += dimension) {\r\n        var x = input[i];\r\n        var y = input[i + 1];\r\n\r\n        if (this.flip.vertically !== true) {\r\n            y = this.extent[3] - y;\r\n        }\r\n\r\n        if (this.flip.horizontally === true) {\r\n            x = this.extent[2] - x;\r\n        }\r\n\r\n        output[i] = x;\r\n        output[i + 1] = y;\r\n    }\r\n}\r\n\r\nexport function loadAnnotations(vectorSource, projection) {\r\n    if (typeof this.options.annotations === \"object\" && \"loadAnnotationsByFingerprint\" in this.options.annotations) {\r\n        if (this.options.annotations.loadAnnotationsByFingerprint) {\r\n            getFingerprint.call(this, (fingerprint) => {\r\n                getAnnotations.call(this, vectorSource, projection, fingerprint, this.options.annotations.filter);\r\n            });\r\n\r\n            return;\r\n        }\r\n    }\r\n\r\n    getAnnotations.call(this, vectorSource, projection, null, this.options.annotations.filter);\r\n}\r\n\r\nfunction getAnnotations(vectorSource, projection, fingerprint, filterCb) {\r\n    var _this = this;\r\n\r\n    ajax.call(this, this.serviceUrl + \"GetAnnotations\", \"GET\", { sessionID: this.sessionID, pathOrUid: this.image, currentUserOnly: false, refresh: Math.random(), ...(fingerprint ? { fingerprint: fingerprint } : {}) }, function(http) {\r\n        if (http.status == 200) {\r\n            var response = parseJson(http.responseText);\r\n            if (response) {\r\n                var annotations = response;\r\n                if (typeof filterCb === \"function\") {\r\n                    var annotations = [];\r\n                    response.forEach(annot => {\r\n                        if (filterCb(annot)) {\r\n                            annotations.push(annot);\r\n                        }\r\n                    });\r\n                }\r\n                var features = _this.initializeFeatures(annotations, projection);\r\n                vectorSource.addFeatures(features);\r\n            }\r\n        }\r\n\r\n        if (typeof _this.readyCallback === \"function\") {\r\n            _this.readyCallback();\r\n        }\r\n    });\r\n}\r\n\r\nexport function getFingerprint(callback) {\r\n    ajax.call(this, this.serviceUrl + \"GetFingerprint\", \"GET\", { sessionID: this.sessionID, pathOrUid: this.image }, function(http) {\r\n        if (http.status == 200) {\r\n            var response = parseJson(http.responseText);\r\n            if (response) {\r\n                callback(response);\r\n            } else {\r\n                callback(null);\r\n            }\r\n        } else {\r\n            callback(null);\r\n        }\r\n    });\r\n}\r\n\r\nexport function getKeyboardPanDelta(factor, viewportWidth) {\r\n    var pxDelta = factor * viewportWidth;\r\n    if (isNaN(pxDelta) || pxDelta < 0 || !isFinite(pxDelta)) {\r\n        pxDelta = 50;\r\n    }\r\n\r\n    return pxDelta;\r\n}\r\n\r\nexport function addOrUpdateArrowPanInteraction() {\r\n    if (this.arrowPanInteraction !== null) {\r\n        this.map.removeInteraction(this.arrowPanInteraction);\r\n    }\r\n\r\n    this.arrowPanInteraction = new ol.interaction.KeyboardPan({ pixelDelta: getKeyboardPanDelta(this.options.keyboardPanFactor, this.element.offsetWidth), duration: 0 });\r\n    this.map.addInteraction(this.arrowPanInteraction);\r\n}\r\n\r\nexport function createProjection() {\r\n    var maxZoom = this.imageInfo.MaxZoomLevel;\r\n    var pow = Math.pow(2, maxZoom);\r\n\r\n    var xPadding = 0,\r\n        yPadding = 0;\r\n    var boxSize = pow * this.imageInfo.TileSize;\r\n\r\n    if (this.options.flip.horizontally === true) {\r\n        xPadding = boxSize - this.imageInfo.Width;\r\n    }\r\n\r\n    if (this.options.flip.vertically !== true) {\r\n        yPadding = boxSize - this.imageInfo.Height;\r\n    }\r\n\r\n    var pixelPerUMeter = 1;\r\n    if (this.imageInfo.MicrometresPerPixelX && this.imageInfo.MicrometresPerPixelX > 0) {\r\n        pixelPerUMeter = this.imageInfo.MicrometresPerPixelX;\r\n    }\r\n\r\n    var pixelProjection = new ol.proj.Projection({\r\n        code: 'pixel',\r\n        units: 'pixels',\r\n        extent: [xPadding, yPadding, xPadding + this.imageInfo.Width, yPadding + this.imageInfo.Height],\r\n        metersPerUnit: pixelPerUMeter * 0.000001,\r\n        getPointResolution: function(resolution, coord) {\r\n            return resolution;\r\n        }\r\n    });\r\n\r\n    return pixelProjection;\r\n}\r\n\r\nexport function createMainView(projection, center, zoom, rotation) {\r\n    var tilesPerBoxSide = Math.pow(2, this.imageInfo.MaxZoomLevel);\r\n\r\n    var digitalZoomLevels = parseInt(this.options.digitalZoomLevels);\r\n    if (isNaN(digitalZoomLevels) || digitalZoomLevels <= 0) {\r\n        digitalZoomLevels = 0;\r\n    }\r\n\r\n    this.options.digitalZoomLevels = digitalZoomLevels;\r\n\r\n    var startZoom = this.imageInfo.MaxZoomLevel;\r\n    var iw = this.imageInfo.Width;\r\n    var ih = this.imageInfo.Height;\r\n\r\n    // find a zoom level that fits the whole image inside the viewport - or stop at zoom level 0\r\n    while (startZoom > 0 && (iw > this.element.offsetWidth || ih > this.element.offsetHeight)) {\r\n        iw /= 2;\r\n        ih /= 2;\r\n        startZoom--;\r\n    }\r\n\r\n    let allowedResolution = [];\r\n    if (this.imageInfo.MicrometresPerPixelX) {\r\n        let maxResolution = tilesPerBoxSide;\r\n        let minResolution = 1 / Math.pow(2, digitalZoomLevels);\r\n        let mmpx = this.imageInfo.MicrometresPerPixelX;\r\n        allowedResolution = [1, 2, 5, 10, 20, 40, 80, 160].map(function(v) {\r\n            return { objective: v, resolution: 10 / mmpx / v };\r\n        });\r\n\r\n        while (allowedResolution[0].resolution < maxResolution) {\r\n            allowedResolution = [{ objective: 0, resolution: 2 * allowedResolution[0].resolution }].concat(allowedResolution);\r\n        }\r\n\r\n        if (allowedResolution[allowedResolution.length - 1] > minResolution) {\r\n            allowedResolution.push({ objective: \"MAX\", resolution: minResolution });\r\n        }\r\n    }\r\n\r\n    var view = new View({\r\n        projection: projection,\r\n        center: center ? center : ol.extent.getCenter(projection.getExtent()),\r\n        // extent: projection.getExtent(),\r\n        showFullExtent: true,\r\n        maxResolution: tilesPerBoxSide,\r\n        minResolution: 1 / Math.pow(2, digitalZoomLevels),\r\n        zoom: zoom ? zoom : startZoom,\r\n        rotation: rotation ? rotation : 0,\r\n        resolutions: allowedResolution.length == 0 ? undefined : allowedResolution.map(function(a) { return a.resolution }),\r\n        constrainResolution: false,\r\n        zoomFactor: 2\r\n    });\r\n\r\n    var self = this;\r\n\r\n    function fireEvent() {\r\n        self.fireEvent(Events.ViewChanged, self);\r\n    }\r\n\r\n    view.on(\"change:center\", fireEvent.bind(this));\r\n    view.on(\"change:resolution\", fireEvent.bind(this));\r\n    view.on(\"change:rotation\", fireEvent.bind(this));\r\n\r\n    return view;\r\n}\r\n\r\nexport function createMagnifierControl(element, collapsed) {\r\n    return new Magnifier({ target: element /* or null */ , collapsed: collapsed });\r\n}\r\n\r\nexport function createOverviewControl() {\r\n    var tilesPerBoxSide = Math.pow(2, this.imageInfo.MaxZoomLevel);\r\n    this.element.querySelector(\".ol-overview\") && this.element.querySelector(\".ol-overview\").remove();\r\n    return new Overview({\r\n        maxResolution: tilesPerBoxSide,\r\n        tipLabel: Resources.translate(\"Overview\"),\r\n        collapsed: this.options.overview && this.options.overview.collapsed === true,\r\n        tracking: this.options.overview && this.options.overview.tracking === true,\r\n        stateManager: stateManager\r\n    });\r\n}\r\n\r\nexport function createOlViewer() {\r\n    // PHP image info case, if there is just one time frame, PHP encodes it as an object and not as an array\r\n    if (this.imageInfo.TimeFrames && this.imageInfo.TimeFrames.TimeFrame) {\r\n        this.imageInfo.TimeFrames = [this.imageInfo.TimeFrames.TimeFrame];\r\n    }\r\n\r\n    if (!this.imageInfo.TimeFrames || this.imageInfo.TimeFrames.length === 0) {\r\n        this.imageInfo.TimeFrames = [];\r\n        this.imageInfo.TimeFrames.push({ Layers: [{ LayerID: 0, Channels: [{ ChannelID: 0, Color: \"ffffffff\", Name: \"Default\" }] }], TimeID: 0 });\r\n    }\r\n\r\n    // PHP image info case, if there is just one layer, PHP encodes it as an object and not as an array\r\n    for (var i = 0; i < this.imageInfo.TimeFrames.length; i++) {\r\n        var tf = this.imageInfo.TimeFrames[i];\r\n        if (tf.Layers.ImageLayer) {\r\n            tf.Layers = [tf.Layers.ImageLayer];\r\n        }\r\n\r\n        // PHP image info case, if there is just one channel, PHP encodes it as an object and not as an array\r\n        for (var j = 0; j < this.imageInfo.TimeFrames[i].Layers.length; j++) {\r\n            var l = this.imageInfo.TimeFrames[i].Layers[j];\r\n            if (l.Channels.Channel) {\r\n                l.Channels = [l.Channels.Channel];\r\n            }\r\n        }\r\n    }\r\n\r\n    this.selectedTimeFrame = this.options.fov && this.options.fov.timeframe ? this.options.fov.timeframe : 0;\r\n    this.selectedLayer = this.options.fov && this.options.fov.layer ? this.options.fov.layer : 0;\r\n\r\n    for (i = 0; i < this.imageInfo.TimeFrames[0].Layers[0].Channels.length; i++) {\r\n        var c = this.imageInfo.TimeFrames[0].Layers[0].Channels[i];\r\n        if (this.options.fov && this.options.fov.channels) {\r\n            c.Active = this.options.fov.channels.includes(i);\r\n        } else if (!c.hasOwnProperty(\"Active\")) {\r\n            c.Active = true;\r\n        }\r\n        if (!c.DefaultGamma) {\r\n            c.Gamma = 1.0;\r\n        } else {\r\n            c.Gamma = c.DefaultGamma;\r\n        }\r\n    }\r\n\r\n    this.channelsString = this.getActiveChannels().join(\",\");\r\n    this.channelGammaString = this.getChannelGammaString();\r\n\r\n    addClass(this.element, \"pma-ui-viewport-container\");\r\n\r\n    if (this.element.tabIndex < 0) {\r\n        this.element.tabIndex = 0;\r\n    }\r\n\r\n    // if (this.element.tabIndex) {\r\n    //     this.element.removeAttribute(\"tabindex\");\r\n    // }\r\n\r\n    // remove any previously added theme classes\r\n    for (var key in Themes) {\r\n        if (!Themes.hasOwnProperty(key)) {\r\n            continue;\r\n        }\r\n\r\n        removeClass(this.element, Themes[key]);\r\n    }\r\n\r\n    addClass(this.element, this.options.theme);\r\n\r\n    this.element.innerHTML = \"\";\r\n    if (!this.imageInfo.BackgroundColor) {\r\n        this.imageInfo.BackgroundColor = \"ffffff\";\r\n    }\r\n\r\n    if (this.imageInfo.TimeFrames[0].Layers[0].Channels.length < 2 && this.imageInfo.TimeFrames.length < 2 && this.imageInfo.TimeFrames[0].Layers.length < 2) {\r\n        this.options.dimensions = false;\r\n    }\r\n\r\n    this.element.style.backgroundColor = \"#\" + this.imageInfo.BackgroundColor;\r\n\r\n    if (this.imageInfo.NumberOfZoomLevels) {\r\n        this.imageInfo.MaxZoomLevel = this.imageInfo.NumberOfZoomLevels;\r\n    }\r\n\r\n    var maxZoom = this.imageInfo.MaxZoomLevel;\r\n\r\n    if (!this.imageInfo.MicrometresPerPixelX || this.imageInfo.MicrometresPerPixelX <= 0) {\r\n        this.options.scaleLine = false;\r\n    }\r\n\r\n    var pixelProjection = createProjection.call(this);\r\n\r\n    var tilesPerBoxSide = Math.pow(2, maxZoom);\r\n\r\n    var layer = new ol.layer.Tile({\r\n        source: new ol.source.XYZ({\r\n            tileUrlFunction: getTileUrl.bind(this),\r\n            tileLoadFunction: tileLoad.bind(this),\r\n            projection: pixelProjection,\r\n            wrapX: false,\r\n            attributions: \"\",\r\n            crossOrigin: \"PMA.UI\",\r\n            cacheSize: 100,\r\n            tileGrid: ol.tilegrid.createXYZ({\r\n                tileSize: [this.imageInfo.TileSize, this.imageInfo.TileSize],\r\n                extent: [0, 0, tilesPerBoxSide * this.imageInfo.TileSize, tilesPerBoxSide * this.imageInfo.TileSize],\r\n                maxZoom: maxZoom\r\n            }),\r\n        }),\r\n        preload: 2,\r\n        className: \"ol-layer main-layer\",\r\n        extent: [0, 0, tilesPerBoxSide * this.imageInfo.TileSize, tilesPerBoxSide * this.imageInfo.TileSize]\r\n    });\r\n\r\n    this.mainLayer = layer;\r\n\r\n    this.loading = 0;\r\n    this.loaded = 0;\r\n    this.progressEl = null;\r\n\r\n    var olViewer = this;\r\n\r\n    // Add progress bar if user requested\r\n    if (this.options.loadingBar) {\r\n        this.loading = 0;\r\n        this.loaded = 0;\r\n        this.progressEl = document.createElement('div');\r\n        this.progressEl.className = \"ol-progress\";\r\n        if (this.imageInfo.TimeFrames[0].Layers[0].Channels.length > 1) {\r\n            this.progressEl.className = \"ol-progress dark\";\r\n        }\r\n\r\n        this.element.appendChild(this.progressEl);\r\n\r\n        layer.getSource().on('tileloadstart', function(event) {\r\n            if (olViewer.loading === 0) {\r\n                olViewer.progressEl.style.visibility = 'visible';\r\n            }\r\n\r\n            ++olViewer.loading;\r\n            updateProgress.call(olViewer);\r\n        });\r\n\r\n        layer.getSource().on('tileloadend', function() {\r\n            setTimeout(function() {\r\n                ++olViewer.loaded;\r\n                updateProgress.call(olViewer);\r\n            }, 100);\r\n        });\r\n\r\n        layer.getSource().on('tileloaderror', function() {\r\n            setTimeout(function() {\r\n                ++olViewer.loaded;\r\n                updateProgress.call(olViewer);\r\n            }, 100);\r\n        });\r\n    }\r\n\r\n    layer.getSource().on('tileloaderror', function(event) {\r\n        olViewer.fireEvent(Events.TilesError, olViewer);\r\n    });\r\n\r\n    var dragZoom = new ol.interaction.DragZoom({ condition: olEventsCondition.shiftKeyOnly, duration: 0 });\r\n    var dragRotate = new ol.interaction.DragRotate({ condition: olEventsCondition.altKeyOnly });\r\n\r\n    var controls = [\r\n        new ol.control.Zoom({ zoomInTipLabel: Resources.translate(\"Zoom in\"), zoomOutTipLabel: Resources.translate(\"Zoom out\") }),\r\n        new PrevZoom({ tipLabel: Resources.translate(\"Previous view\"), dragZoom: dragZoom }),\r\n    ];\r\n\r\n    controls.push(new ol.control.FullScreen({ tipLabel: Resources.translate(\"Toggle fullscreen\"), source: this.options.fullScreenElement, label: '\\u2195', labelActive: '\\u2195' }));\r\n\r\n\r\n    var layerList = [layer];\r\n\r\n    // Initialize server side annotation layers if any\r\n    if (this.options.annotationsLayers && this.imageInfo.AnnotationsLayers && this.imageInfo.AnnotationsLayers.length > 0) {\r\n        var groupList = [];\r\n\r\n        for (var a = 0; a < this.imageInfo.AnnotationsLayers.length; a++) {\r\n            var aLayerName = this.imageInfo.AnnotationsLayers[a];\r\n            var alayer = new ol.layer.Tile({\r\n                displayInLayerSwitcher: true,\r\n                visible: this.options.annotationsLayers.loadLayers === true,\r\n                title: aLayerName,\r\n                source: new ol.source.XYZ({\r\n                    tileUrlFunction: getAnnotatedTileUrl.bind(this, aLayerName),\r\n                    tileLoadFunction: annotatedTileLoad.bind(this),\r\n                    projection: pixelProjection,\r\n                    wrapX: false,\r\n                    attributions: '',\r\n                    crossOrigin: \"PMA.UI\"\r\n                }),\r\n                extent: [0, 0, tilesPerBoxSide * this.imageInfo.TileSize, tilesPerBoxSide * this.imageInfo.TileSize],\r\n                className: \"ol-layer annotations-layer\"\r\n            });\r\n\r\n            alayer.getSource().tileGrid = ol.tilegrid.createXYZ({\r\n                tileSize: [this.imageInfo.TileSize, this.imageInfo.TileSize],\r\n                extent: [0, 0, tilesPerBoxSide * this.imageInfo.TileSize, tilesPerBoxSide * this.imageInfo.TileSize],\r\n                maxZoom: maxZoom\r\n            });\r\n\r\n            groupList.push(alayer);\r\n        }\r\n\r\n        if (groupList.length > 0) {\r\n            var group = new ol.layer.Group({\r\n                title: Resources.translate(\"Annotation layers\"),\r\n                layers: groupList\r\n            });\r\n\r\n            layerList.push(group);\r\n        }\r\n    }\r\n\r\n    // try get the annotations\r\n    if (this.options.annotations) {\r\n        var vectorSource = new ol.source.Vector({\r\n            projection: pixelProjection\r\n        });\r\n\r\n        this.annotationsLayer = new ol.layer.Vector({ source: vectorSource, updateWhileAnimating: true, updateWhileInteracting: true, className: \"ol-layer annotations-layer\" });\r\n\r\n        loadAnnotations.call(this, vectorSource, pixelProjection);\r\n        layerList.push(this.annotationsLayer);\r\n        this.showAnnotations(this.options.annotations.visible !== false);\r\n    }\r\n\r\n    var measureVectorSource = new ol.source.Vector({\r\n        projection: pixelProjection\r\n    });\r\n\r\n    this.measureLayer = new ol.layer.Vector({\r\n        source: measureVectorSource,\r\n        updateWhileAnimating: true,\r\n        updateWhileInteracting: true,\r\n        style: new Style({\r\n            fill: new ol.style.Fill({\r\n                color: 'rgba(255, 255, 255, 0.2)'\r\n            }),\r\n            stroke: new ol.style.Stroke({\r\n                color: '#ffcc33',\r\n                width: 2\r\n            }),\r\n            image: new ol.style.Circle({\r\n                radius: 7,\r\n                fill: new ol.style.Fill({ color: 'rgba(255, 255, 255, 0.2)' }),\r\n                stroke: new ol.style.Stroke({ color: '#ff0000', width: 2 }),\r\n            }),\r\n            text: new ol.style.Text({\r\n                font: '12px Calibri,sans-serif',\r\n                fill: new ol.style.Fill({ color: '#000' }),\r\n                stroke: new ol.style.Stroke({\r\n                    color: '#fff',\r\n                    width: 2\r\n                }),\r\n            })\r\n        })\r\n    });\r\n\r\n    this.gridLayer = new ol.layer.Vector({\r\n        updateWhileAnimating: true,\r\n        updateWhileInteracting: true,\r\n        source: new ol.source.Vector({\r\n            projection: pixelProjection\r\n        }),\r\n        style: new ol.style.Style({\r\n            fill: new ol.style.Fill({\r\n                color: 'rgba(255, 255, 255, 0.2)'\r\n            }),\r\n            stroke: new ol.style.Stroke({\r\n                color: '#bbcc33',\r\n                width: 1\r\n            }),\r\n        })\r\n    });\r\n\r\n    this.measureTooltips = [];\r\n    layerList.push(this.measureLayer);\r\n    layerList.push(this.gridLayer);\r\n\r\n    if (!this.options.keyboardPanFactor) {\r\n        this.options.keyboardPanFactor = 0.5;\r\n    }\r\n\r\n    var dragPanInteraction = new ol.interaction.DragPan({ kinetic: new Kinetic(-0.005, 0.05, 100), onFocusOnly: false });\r\n    this.mouseWheelInteraction = new PmaMouseWheelZoom({\r\n        duration: 0,\r\n        maxDelta: 1,\r\n        deltaPerZoom: 100,\r\n        timeout: 0,\r\n        onFocusOnly: false,\r\n        condition: olEventsCondition.always,\r\n        constrainResolution: false\r\n    });\r\n\r\n    this.map = new Map({\r\n        interactions: [\r\n            dragPanInteraction,\r\n            dragRotate,\r\n            dragZoom,\r\n            this.mouseWheelInteraction,\r\n            new ol.interaction.PinchZoom({ constrainResolution: false }),\r\n            new ol.interaction.PinchRotate(),\r\n            new ol.interaction.DoubleClickZoom(),\r\n            new ol.interaction.KeyboardZoom()\r\n        ],\r\n        loadTilesWhileAnimating: this.options.highQuality === true,\r\n        loadTilesWhileInteracting: this.options.highQuality === true,\r\n        layers: layerList,\r\n        target: this.element,\r\n        controls: controls,\r\n        view: createMainView.call(this, pixelProjection)\r\n    });\r\n\r\n    setControlVisibility.call(this, this.element.querySelector(\".ol-full-screen\"), this.options.fullscreenControl);\r\n    addOrUpdateArrowPanInteraction.call(this);\r\n\r\n    if (this.options.customButtons) {\r\n        createCustomButtons.call(this, this.options.customButtons);\r\n    }\r\n\r\n    if (this.options.position) {\r\n        this.setPosition(this.options.position);\r\n    }\r\n\r\n    if (this.options.fov && this.options.fov.extent) {\r\n        this.fitToExtent(this.options.fov.extent, this.options.fov.constrainResolution == true ? true : false);\r\n    }\r\n\r\n    if (this.options.fov && this.options.fov.rotation) {\r\n        this.setPosition({ rotation: this.options.fov.rotation });\r\n    }\r\n\r\n    initializeControls.call(this);\r\n\r\n    if (this.options.digitalZoomLevels > 1) {\r\n        var totalLevels = this.options.digitalZoomLevels + maxZoom;\r\n        var percent = 100 - Math.round(this.options.digitalZoomLevels * 100 / totalLevels);\r\n        if (percent > 0 && percent <= 100) {\r\n            var zsElement = this.element.querySelector(\".ol-zoomslider\");\r\n            if (zsElement) {\r\n                var digitalLevelsBgColor = \"rgba(127, 127, 127, 0.4)\";\r\n                var zsStyle = window.getComputedStyle(zsElement, null);\r\n\r\n                var testContainer = document.createElement(\"div\");\r\n                testContainer.className = \"pma-ui-viewport-container \" + this.options.theme;\r\n\r\n                var testEl = document.createElement(\"div\");\r\n                testEl.className = this.options.theme + \" ol-zoomslider digital-zoom-levels\";\r\n\r\n                testContainer.appendChild(testEl);\r\n                zsElement.appendChild(testContainer);\r\n\r\n                digitalLevelsBgColor = window.getComputedStyle(testEl, null).getPropertyValue('background-color');\r\n\r\n                zsElement.removeChild(testContainer);\r\n\r\n                zsElement.style.background = \"linear-gradient(to top, \" + zsStyle.getPropertyValue('background-color') + \" \" + percent + \"%, \" + digitalLevelsBgColor + \" \" + percent + \"%, \" + digitalLevelsBgColor + \" 100%)\";\r\n            }\r\n        }\r\n    }\r\n\r\n    if (this.options.grid) {\r\n        this.showGrid(this.options.grid.size);\r\n    }\r\n\r\n    if (this.map) {\r\n        this.map.on(\"change:size\", mapResize.bind(this));\r\n\r\n        setMapSizeClass.call(this);\r\n    }\r\n\r\n    if (!isNaN(this.imageInfo.DefaultGamma)) {\r\n        this.setGamma(this.imageInfo.DefaultGamma);\r\n    }\r\n\r\n    // fire ready callback only if we are not going to load annotations\r\n    // otherwise let the annotations load export function to do it\r\n    if (!this.options.annotations && typeof this.readyCallback === \"function\") {\r\n        this.readyCallback();\r\n    }\r\n}\r\n\r\nexport function mapResize() {\r\n    setMapSizeClass.call(this);\r\n    addOrUpdateArrowPanInteraction.call(this);\r\n}\r\n\r\nexport function setMapSizeClass() {\r\n    var size = this.map.getSize();\r\n    this.element.className = this.element.className.replace(/ xlg\\b| lg\\b| md\\b| sm\\b| xs\\b/g, '');\r\n    if (size[0] > 1200) {\r\n        this.element.className += ' xlg';\r\n        removeClass(this.element.querySelector(\".ol-scale-line\"), \"collapsed\");\r\n        removeClass(this.element.querySelector(\".ol-filename\"), \"ol-collapsed\");\r\n    } else if (size[0] > 992) {\r\n        this.element.className += ' lg';\r\n        removeClass(this.element.querySelector(\".ol-scale-line\"), \"collapsed\");\r\n        removeClass(this.element.querySelector(\".ol-filename\"), \"ol-collapsed\");\r\n    } else if (size[0] > 768) {\r\n        this.element.className += ' md';\r\n        removeClass(this.element.querySelector(\".ol-scale-line\"), \"collapsed\");\r\n        removeClass(this.element.querySelector(\".ol-filename\"), \"ol-collapsed\");\r\n    } else if (size[0] > 576) {\r\n        this.element.className += ' sm';\r\n        // addClass(this.element.querySelector(\".ol-scale-line\"), \"collapsed\");\r\n        // addClass(this.element.querySelector(\".ol-filename\"), \"ol-collapsed\");\r\n    } else {\r\n        this.element.className += ' xs';\r\n        // addClass(this.element.querySelector(\".ol-scale-line\"), \"collapsed\");\r\n        // addClass(this.element.querySelector(\".ol-filename\"), \"ol-collapsed\");\r\n    }\r\n\r\n    this.element.className = this.element.className.replace(/ xlgh| lgh| mdh| smh| xsh/g, '');\r\n    if (size[1] > 1200) {\r\n        this.element.className += ' xlgh';\r\n    } else if (size[1] > 992) {\r\n        this.element.className += ' lgh';\r\n    } else if (size[1] > 768) {\r\n        this.element.className += ' mdh';\r\n    } else if (size[1] > 576) {\r\n        this.element.className += ' smh';\r\n    } else {\r\n        this.element.className += ' xsh';\r\n    }\r\n\r\n    if (this.overviewControl) {\r\n        // 300-500px: resize overview image 1/6 of the number of horizontal pixels in the viewport\r\n        // 500-750px: resize  overview image 1/7 of the number of horizontal pixels in the viewport\r\n        // 750-1000px: resize overview image 1/8 of the number of horizontal pixels in the viewport\r\n        // 1000-1250px:resize  overview image 1/9 of the number of horizontal pixels in the viewport\r\n        // 1250-1500px: resize overview image 1/10 of the number of horizontal pixels in the viewport\r\n        // 1500-1750px:resize overview image 1/11 of the number of horizontal pixels in the viewport\r\n        // 1750-2000px:resize overview image 1/12 of the number of horizontal pixels in the viewport\r\n        // 2000-3000px:resize overview image 1/13 of the number of horizontal pixels in the viewport\r\n        // 3000-4000px: resize overview image 1/14 of the number of horizontal pixels in the viewport \r\n        if (size[0] < 300 || size[1] < 300) {\r\n            // this.overviewControl.setCollapsed(true);\r\n        } else {\r\n            var factor = 1 / 14;\r\n            if (size[0] < 500) {\r\n                factor = 1 / 6;\r\n            } else if (size[0] < 750) {\r\n                factor = 1 / 7;\r\n            } else if (size[0] < 1000) {\r\n                factor = 1 / 8;\r\n            } else if (size[0] < 1250) {\r\n                factor = 1 / 9;\r\n            } else if (size[0] < 1500) {\r\n\r\n                factor = 1 / 10;\r\n            } else if (size[0] < 1750) {\r\n                factor = 1 / 11;\r\n            } else if (size[0] < 2000) {\r\n                factor = 1 / 12;\r\n            } else if (size[0] < 3000) {\r\n                factor = 1 / 13;\r\n            }\r\n\r\n            this.overviewControl.changeOverviewSizePx(Math.sqrt(size[0] * size[0]) * factor);\r\n        }\r\n    }\r\n}\r\n\r\nexport function printObjectivesInZoomBar() {\r\n    var zsElement = this.element.querySelector(\".ol-zoomslider\");\r\n    if (zsElement) {\r\n\r\n        var oldEl = zsElement.querySelector(\".objectives-scale\");\r\n        if (oldEl) {\r\n            zsElement.removeChild(oldEl);\r\n        }\r\n\r\n        var digitalLevelsBgColor = \"rgba(127, 127, 127, 0.4)\";\r\n        var zsStyle = window.getComputedStyle(zsElement, null);\r\n\r\n        if (this.imageInfo.MicrometresPerPixelX !== 0) {\r\n            var verticalOffset = parseFloat(zsStyle.getPropertyValue(\"padding-top\")) +\r\n                parseFloat(zsStyle.getPropertyValue(\"margin-top\")) +\r\n                parseFloat(zsStyle.getPropertyValue(\"border-top-width\")) +\r\n                parseFloat(zsStyle.getPropertyValue(\"padding-bottom\")) +\r\n                parseFloat(zsStyle.getPropertyValue(\"margin-bottom\")) +\r\n                parseFloat(zsStyle.getPropertyValue(\"border-bottom-width\"));\r\n\r\n            var thumbButton = this.element.querySelector(\".ol-zoomslider-thumb\");\r\n            var thumbButtonStyle = window.getComputedStyle(thumbButton, null);\r\n            var thumbButtonHeight = thumbButton.offsetHeight +\r\n                parseFloat(thumbButtonStyle.getPropertyValue(\"padding-top\")) +\r\n                parseFloat(thumbButtonStyle.getPropertyValue(\"margin-top\")) +\r\n                parseFloat(thumbButtonStyle.getPropertyValue(\"border-top-width\")) +\r\n                parseFloat(thumbButtonStyle.getPropertyValue(\"padding-bottom\")) +\r\n                parseFloat(thumbButtonStyle.getPropertyValue(\"margin-bottom\")) +\r\n                parseFloat(thumbButtonStyle.getPropertyValue(\"border-bottom-width\"));\r\n\r\n            var zoomBarHeight = zsElement.offsetHeight - thumbButtonHeight;\r\n            zoomBarHeight += (thumbButtonHeight - thumbButton.offsetHeight);\r\n\r\n            ////var factor = (this.imageInfo.MicrometresPerPixelX - 0.75) / -0.0125;\r\n            var factor = 10 / this.imageInfo.MicrometresPerPixelX;\r\n            var totalLevels = this.options.digitalZoomLevels + this.imageInfo.MaxZoomLevel;\r\n            var zoomLevelHeight = zoomBarHeight / totalLevels;\r\n\r\n            var objectiveHeights = [];\r\n            for (var obji = 0; obji <= totalLevels; obji++) {\r\n                var curObj = factor / Math.pow(2, (totalLevels - obji - this.options.digitalZoomLevels));\r\n                curObj = displayObjective(curObj);\r\n                if (curObj !== false) {\r\n                    objectiveHeights.push({ name: curObj + \"X\", height: zoomLevelHeight * obji });\r\n                }\r\n            }\r\n\r\n            if (objectiveHeights.length > 0) {\r\n                var objectivesEl = document.createElement(\"div\");\r\n                objectivesEl.className = \"objectives-scale\";\r\n                zsElement.appendChild(objectivesEl);\r\n\r\n                var html = \"\";\r\n                for (var t = 0; t < objectiveHeights.length; t++) {\r\n                    html += '<div style=\"bottom: ' + objectiveHeights[t].height + 'px\"><div>' + objectiveHeights[t].name + '</div></div>';\r\n                }\r\n\r\n                objectivesEl.innerHTML = html;\r\n                objectivesEl.style.height = zoomBarHeight + \"px\";\r\n                objectivesEl.style.top = (thumbButtonHeight / 2.0) + \"px\";\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\nexport function displayObjective(objective) {\r\n    if (objective > 1) {\r\n        objective |= 0; // convert to int\r\n        if (objective > 10) {\r\n            objective = (Math.round(objective / 10.0) * 10.0) | 0; // round to closest 10 multiple\r\n        }\r\n\r\n        var valid = [1, 2, 5, 10, 20, 40, 80, 160];\r\n        for (var i = 0; i < valid.length; i++) {\r\n            if (valid[i] === objective) {\r\n                return valid[i];\r\n            }\r\n        }\r\n    }\r\n\r\n    return false;\r\n}\r\n\r\nexport function findClosestObjectiveValue(v) {\r\n    var allowedValues = [1, 2, 5, 10, 20, 40, 80, 160];\r\n    return allowedValues[allowedValues.map(function(av) {\r\n        return Math.abs(1 - av / v);\r\n    }).reduce(function(iMin, x, i, arr) {\r\n        return x < arr[iMin] ? i : iMin;\r\n    }, 0)];\r\n}\r\n\r\nexport function calculateObjective(element) {\r\n    var objective = 10 / this.imageInfo.MicrometresPerPixelX / this.map.getView().getResolution();\r\n    if (objective > 1) {\r\n        objective |= 0; // convert to int\r\n        // if (objective > 10) {\r\n        //     objective = (Math.round(objective / 10.0) * 10.0) | 0; // round to closest 10 multiple\r\n        // }\r\n\r\n        element.innerHTML = objective + \"X\"; //findClosestObjectiveValue(objective) + \"X\";\r\n        element.style.display = \"block\";\r\n    } else {\r\n        element.style.display = \"none\";\r\n    }\r\n}\r\n\r\nexport function updateProgress() {\r\n    var w = this.loaded / this.loading * 100;\r\n    if (w > 100) {\r\n        w = 100;\r\n    }\r\n    var width = w.toFixed(1) + '%';\r\n    this.progressEl.style.width = width;\r\n    if (this.loading <= this.loaded) {\r\n        this.loading = 0;\r\n        this.loaded = 0;\r\n        var this_ = this;\r\n        setTimeout(function() {\r\n            if (this_.loading === this_.loaded) {\r\n                this_.progressEl.style.visibility = 'hidden';\r\n                this_.progressEl.style.width = 0;\r\n            }\r\n        }, 500);\r\n    }\r\n}\r\n\r\nexport function applyImageAdjustments() {\r\n    if (this.colorAdjustmentsControl != null) {\r\n        this.colorAdjustmentsControl.update(this.imageAdjustments.brightness, this.imageAdjustments.contrast, this.imageAdjustments.gamma);\r\n    }\r\n\r\n    this.mainLayer.getSource().refresh();\r\n}\r\n\r\nexport function drawScalebar(canvasCtx, imageInfo, scale, location, font) {\r\n    /** @type {CanvasRenderingContext2D} */\r\n    var ctx = canvasCtx;\r\n    if (imageInfo.MicrometresPerPixelX == 0) {\r\n        return;\r\n    }\r\n\r\n    if (!font) {\r\n        font = '24px serif';\r\n    }\r\n\r\n    if (!location) {\r\n        location = \"TopLeft\";\r\n    }\r\n\r\n    var pixelsPerUnit = scale / imageInfo.MicrometresPerPixelX;\r\n    var maxWidth = 80;\r\n    var totalUnits = 0,\r\n        pow = 1;\r\n    var width = 0;\r\n\r\n    let iw = ctx.canvas.width;\r\n    let ih = ctx.canvas.height;\r\n\r\n    while (width < maxWidth) {\r\n        var firstChar = totalUnits / pow;\r\n\r\n        if (firstChar == 0) {\r\n            totalUnits = 1;\r\n        } else if (firstChar == 1) {\r\n            totalUnits = 2;\r\n        } else if (firstChar == 2) {\r\n            totalUnits = 5;\r\n        } else {\r\n            totalUnits = 1;\r\n            pow *= 10;\r\n        }\r\n\r\n        totalUnits *= pow;\r\n        width = totalUnits * pixelsPerUnit;\r\n    }\r\n\r\n    var units = \"\";\r\n    if (totalUnits % 1000 == 0) {\r\n        units = \" mm\";\r\n        totalUnits /= 1000;\r\n    } else {\r\n        units = \" μm\";\r\n    }\r\n\r\n    var height = 25;\r\n    var startpixely = location.toLowerCase().startsWith(\"bottom\") ? (ih - height - 20) : 20;\r\n    var startpixelx = location.toLowerCase().endsWith(\"right\") ? (iw - (2 * maxWidth) - 20) : 20;\r\n    var rectdiff = 0.2 * 20;\r\n    ctx.fillStyle = 'white';\r\n    ctx.fillRect(startpixelx - rectdiff, startpixely - rectdiff, width + (2 * rectdiff), height + (2 * rectdiff));\r\n\r\n    ctx.beginPath();\r\n    ctx.moveTo(startpixelx, startpixely);\r\n    ctx.lineTo(startpixelx, startpixely + height);\r\n    ctx.lineTo(startpixelx + width, startpixely + height);\r\n    ctx.lineTo(startpixelx + width, startpixely);\r\n    ctx.stroke();\r\n    ctx.font = font;\r\n    ctx.fillStyle = 'red';\r\n    var text = ctx.measureText(`${totalUnits} ${units}`);\r\n    let x = startpixelx + (width / 2.0) - (text.width / 2.0);\r\n    x = x < startpixelx ? startpixelx : x;\r\n    ctx.textBaseline = \"top\";\r\n    ctx.fillText(`${totalUnits} ${units}`, x, startpixely);\r\n}\r\n\r\n/**\r\n * \r\n * @param {CanvasRenderingContext2D} canvasCtx \r\n * @param {string} title \r\n */\r\nexport function drawTitle(canvasCtx, title) {\r\n    if (!title || !canvasCtx) {\r\n        return;\r\n    }\r\n\r\n    canvasCtx.font = '32px serif'\r\n    canvasCtx.fillStyle = 'black';\r\n    canvasCtx.strokeStyle = 'white';\r\n    canvasCtx.lineWidth = 4;\r\n\r\n    var text = canvasCtx.measureText(title);\r\n    let x = (canvasCtx.canvas.width / 2.0) - (text.width / 2.0);\r\n    canvasCtx.textBaseline = \"top\";\r\n    canvasCtx.strokeText(title, x, 20);\r\n    canvasCtx.fillText(title, x, 20);\r\n}\r\n\r\n/**\r\n * \r\n * @param {CanvasRenderingContext2D} canvasCtx \r\n * @param {PMA.UI.Viewport} viewport\r\n * @param {0 | 90 | 180 | 270} [rotation] - The rotation of the barcode\r\n */\r\nexport function drawBarcode(canvasCtx, viewport, rotation) {\r\n    return new Promise((resolve, reject) => {\r\n        let imageInfo = viewport && viewport.imageInfo;\r\n        if (!viewport || !canvasCtx || !imageInfo) {\r\n            resolve();\r\n            return;\r\n        }\r\n\r\n        if (imageInfo.AssociatedImageTypes.indexOf(\"Barcode\") < 0) {\r\n            resolve();\r\n            return;\r\n        }\r\n\r\n        var img = new Image;\r\n        img.crossOrigin = \"anonymous\";\r\n        img.onload = function() {\r\n            let fw = canvasCtx.canvas.width * 0.12;\r\n            let fh = fw * (img.height / img.width);\r\n            let x = canvasCtx.canvas.width - fw - 20;\r\n            let y = 20;\r\n\r\n            canvasCtx.lineWidth = 2;\r\n            canvasCtx.drawImage(img, x, y, fw, fh);\r\n            canvasCtx.strokeStyle = 'black';\r\n            canvasCtx.strokeRect(x, y, fw + 2, fh + 2);\r\n            canvasCtx.strokeStyle = 'white';\r\n            canvasCtx.strokeRect(x + 2, y + 2, fw - 2, fh - 2);\r\n            resolve();\r\n        };\r\n\r\n        img.onerror = reject\r\n        img.src = getBarcodeUrl(viewport, rotation);\r\n    });\r\n}\r\n\r\n/**\r\n * \r\n * @param {CanvasRenderingContext2D} canvasCtx \r\n * @param {PMA.UI.Viewport} viewport\r\n */\r\nexport function drawOverview(canvasCtx, viewport) {\r\n    return new Promise((resolve, reject) => {\r\n        let scale = (canvasCtx.canvas.width * 0.2) / viewport.imageInfo.Width;\r\n\r\n        var url =\r\n            viewport.imagesUrl +\r\n            \"region?pathOrUid=\" +\r\n            encodeURIComponent(viewport.image) +\r\n            \"&format=jpg\" +\r\n            \"&timeframe=\" +\r\n            viewport.selectedTimeFrame +\r\n            \"&layer=\" +\r\n            viewport.selectedLayer +\r\n            \"&channels=\" +\r\n            viewport.channelsString +\r\n            \"&channelClipping=\" +\r\n            viewport.channelClippingString +\r\n            \"&sessionID=\" +\r\n            encodeURIComponent(viewport.sessionID) +\r\n            \"&drawScaleBar=false\" +\r\n            \"&x=0\" + \"&y=0\" +\r\n            \"&width=\" + viewport.imageInfo.Width + \"&height=\" + viewport.imageInfo.Height +\r\n            \"&scale=\" + scale;\r\n        var img = new Image;\r\n        img.crossOrigin = \"anonymous\";\r\n        img.onload = function() {\r\n            let fw = canvasCtx.canvas.width * 0.2;\r\n            let fh = fw * (img.height / img.width);\r\n            let x = canvasCtx.canvas.width - fw - 20;\r\n            let y = canvasCtx.canvas.height - fh - 20;\r\n            canvasCtx.drawImage(img, x, y, fw, fh);\r\n\r\n            canvasCtx.lineWidth = 2;\r\n            canvasCtx.strokeStyle = 'black';\r\n            canvasCtx.strokeRect(x, y, fw + 2, fh + 2);\r\n            canvasCtx.strokeStyle = 'white';\r\n            canvasCtx.strokeRect(x + 2, y + 2, fw - 2, fh - 2);\r\n            resolve();\r\n        };\r\n\r\n        img.onerror = reject\r\n        img.src = url;\r\n    });\r\n}\r\n\r\n/**\r\n * @param {PMA.UI.Viewport} viewport - The main viewport\r\n * @param {0 | 90 | 180 | 270} [rotation] - The rotation of the barcode\r\n * @returns {string} - The barcode url\r\n */\r\nexport function getBarcodeUrl(viewport, rotation) {\r\n    return viewport.getActiveServerUrl() + \"barcode\" +\r\n        \"?sessionID=\" + encodeURIComponent(viewport.getSessionID()) +\r\n        \"&pathOrUid=\" + encodeURIComponent(viewport.imageInfo.Filename) +\r\n        (rotation ? (\"&rotation=\" + rotation) : \"\");\r\n}\r\n\r\nexport function brightnessContrastFilter(pixels, brightness, contrast, gamma) {\r\n    var lookupTable = [];\r\n    if (!gamma || gamma < 0) {\r\n        gamma = 0;\r\n    }\r\n\r\n    for (var i = 0; i < 256; i++) {\r\n        var value = contrast * (i - 128) + 128 + brightness;\r\n        if (gamma != 1) {\r\n            value = 255 * Math.pow(value / 255, 1 / gamma);\r\n        }\r\n\r\n        if (value[i] < 0) {\r\n            value[i] = 0;\r\n        }\r\n        if (value[i] > 255) {\r\n            value[i] = 255;\r\n        }\r\n        lookupTable.push(value);\r\n    }\r\n\r\n    for (i = 0; i < pixels.length; i += 4) {\r\n        pixels[i] = lookupTable[pixels[i]];\r\n        pixels[i + 1] = lookupTable[pixels[i + 1]];\r\n        pixels[i + 2] = lookupTable[pixels[i + 2]];\r\n        //pixels[i + 3] = 0;\r\n    }\r\n}\r\n\r\nexport function colorBalanceFilter(pixels, red, green, blue) {\r\n    for (let i = 0; i < pixels.length; i += 4) {\r\n        pixels[i] = Math.max(0, Math.min(255, pixels[i] * red));\r\n        pixels[i + 1] = Math.max(0, Math.min(255, pixels[i + 1] * green));\r\n        pixels[i + 2] = Math.max(0, Math.min(255, pixels[i + 2] * blue));\r\n        //pixels[i + 3] = 0;\r\n    }\r\n}\r\n\r\nexport function createCustomButtons(buttons) {\r\n    if (buttons != null && buttons.length > 0 && this.element) {\r\n        var defaultLocation = ButtonLocations.S;\r\n        var groupByLocations = {};\r\n        groupByLocations[defaultLocation] = [];\r\n\r\n        for (var i = 0; i < buttons.length; i++) {\r\n            if (!buttons[i].location) {\r\n                groupByLocations[defaultLocation].push(buttons[i]);\r\n            } else {\r\n                var l = buttons[i].location;\r\n                (groupByLocations[l] = groupByLocations[l] || []).push(buttons[i]);\r\n            }\r\n        }\r\n\r\n        for (var location in groupByLocations) {\r\n            if (groupByLocations.hasOwnProperty(location)) {\r\n\r\n                var div = document.createElement(\"div\");\r\n                div.className = \"ol-unselectable ol-control ol-pma-custom-btn ol-custom-control\" + \" \" + location.toString();\r\n\r\n                for (i = 0; i < groupByLocations[location].length; i++) {\r\n                    var b = groupByLocations[location][i];\r\n                    var btn = document.createElement(\"button\");\r\n                    btn.title = b.title ? b.title : \"\";\r\n                    btn.innerHTML = b.content ? b.content : \"\";\r\n                    btn.className = b.class ? b.class : \"\";\r\n                    if (typeof b.callback === \"function\") {\r\n                        btn.addEventListener(\"click\", b.callback.bind(this));\r\n                    }\r\n\r\n                    div.appendChild(btn);\r\n                }\r\n\r\n                this.element.querySelector(\".ol-overlaycontainer-stopevent\").appendChild(div);\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\nexport function setControlVisibility(controlDiv, visible) {\r\n    if (controlDiv) {\r\n        if (visible === false) {\r\n            addClass(controlDiv, \"ol-hidden\");\r\n        } else {\r\n            if (hasClass(controlDiv, \"ol-dimension-selector\") &&\r\n                this.imageInfo.TimeFrames[0].Layers[0].Channels.length < 2 && this.imageInfo.TimeFrames.length < 2 && this.imageInfo.TimeFrames[0].Layers.length < 2) {\r\n                return;\r\n            }\r\n\r\n            removeClass(controlDiv, \"ol-hidden\");\r\n        }\r\n    }\r\n}\r\n\r\nexport function getControlVisibility(controlDiv) {\r\n    if (controlDiv) {\r\n        return !(hasClass(controlDiv, \"ol-hidden\"));\r\n    }\r\n\r\n    return false;\r\n}\r\n\r\nexport function setScaleLineConfiguration(conf) {\r\n    var scaleLineDiv = this.element.querySelector(\".ol-scale-line\");\r\n    if (scaleLineDiv) {\r\n        setControlVisibility.call(this, scaleLineDiv, conf.visible);\r\n\r\n        if (conf.collapsed === true) {\r\n            addClass(scaleLineDiv, \"collapsed\");\r\n            stateManager.scaleLine.collapsed = true;\r\n        } else {\r\n            removeClass(scaleLineDiv, \"collapsed\");\r\n            stateManager.scaleLine.collapsed = false;\r\n        }\r\n    }\r\n}\r\n\r\nexport function setControlsConfiguration(configuration) {\r\n    for (var i = 0; i < configuration.length; i++) {\r\n        var conf = configuration[i];\r\n\r\n        if (conf.control == ControlTypes.ZoomSlider) {\r\n            setControlVisibility.call(this, this.element.querySelector(\".ol-zoomslider\"), conf.visible);\r\n        } else if (conf.control == ControlTypes.ScaleLine) {\r\n            setScaleLineConfiguration.call(this, conf);\r\n        } else if (conf.control == ControlTypes.Overview) {\r\n            setControlVisibility.call(this, this.element.querySelector(\".ol-overview\"), conf.visible);\r\n            this.overviewControl.setCollapsed(conf.collapsed);\r\n        } else if (conf.control == ControlTypes.Barcode) {\r\n            setControlVisibility.call(this, this.element.querySelector(\".ol-associated-image\"), conf.visible);\r\n            if (this.barcodeControl) {\r\n                this.barcodeControl.setCollapsed(conf.collapsed);\r\n                // do rotation\r\n            }\r\n        } else if (conf.control == ControlTypes.Magnifier) {\r\n            if (this.magnifierControl) {\r\n                this.magnifierControl.setCollapsed(conf.visible);\r\n            }\r\n        } else if (conf.control == ControlTypes.ColorAdjustments) {\r\n            setControlVisibility.call(this, this.element.querySelector(\".ol-brightness-contrast\"), conf.visible);\r\n        } else if (conf.control == ControlTypes.LayerSwitch) {\r\n            setControlVisibility.call(this, this.element.querySelector(\".ol-layerswitch\"), conf.visible);\r\n            if (this.layerSwitcher) {\r\n                this.layerSwitcher.setCollapsed(conf.collapsed);\r\n            }\r\n        } else if (conf.control == ControlTypes.DimensionSelector) {\r\n            setControlVisibility.call(this, this.element.querySelector(\".ol-dimension-selector\"), conf.visible);\r\n            if (this.dimensionsControl) {\r\n                this.dimensionsControl.setCollapsed(conf.collapsed);\r\n            }\r\n        } else if (conf.control == ControlTypes.Filename) {\r\n            setControlVisibility.call(this, this.element.querySelector(\".ol-filename\"), conf.visible);\r\n            if (this.filenameControl) {\r\n                this.filenameControl.setCollapsed(conf.collapsed);\r\n            }\r\n        } else if (conf.control == ControlTypes.Snapshot) {\r\n            setControlVisibility.call(this, this.element.querySelector(\".ol-snapshot\"), conf.visible);\r\n        } else if (conf.control == ControlTypes.RotationControl) {\r\n            setControlVisibility.call(this, this.element.querySelector(\".ol-rotation\"), conf.visible);\r\n\r\n            if (this.rotationControl) {\r\n                this.rotationControl.setCollapsed(conf.collapsed);\r\n            }\r\n        } else if (conf.control == ControlTypes.Attribution) {\r\n            setControlVisibility.call(this, this.element.querySelector(\".ol-attr\"), conf.visible);\r\n        } else if (conf.control == ControlTypes.Fullscreen) {\r\n            setControlVisibility.call(this, this.element.querySelector(\".ol-full-screen\"), conf.visible);\r\n        }\r\n    }\r\n}\r\n\r\nexport function getControlsConfiguration() {\r\n    var scaleLineDiv = this.element.querySelector(\".ol-scale-line\");\r\n\r\n    return [{\r\n            control: ControlTypes.ZoomSlider,\r\n            visible: getControlVisibility.call(this, this.element.querySelector(\".ol-zoomslider\"))\r\n        },\r\n        {\r\n            control: ControlTypes.ScaleLine,\r\n            visible: this.scaleLineControl && getControlVisibility.call(this, this.element.querySelector(\".ol-scale-line\")),\r\n            collapsed: scaleLineDiv ? hasClass(scaleLineDiv, \"collapsed\") : false\r\n        },\r\n        {\r\n            control: ControlTypes.Overview,\r\n            visible: getControlVisibility.call(this, this.element.querySelector(\".ol-overview\")),\r\n            collapsed: this.overviewControl && this.overviewControl.getCollapsed()\r\n        },\r\n        {\r\n            control: ControlTypes.Barcode,\r\n            visible: getControlVisibility.call(this, this.element.querySelector(\".ol-associated-image\")),\r\n            collapsed: this.barcodeControl && this.barcodeControl.getCollapsed(),\r\n            rotation: this.barcodeControl ? this.barcodeControl.rotation : 0\r\n        },\r\n        {\r\n            control: ControlTypes.Magnifier,\r\n            visible: this.magnifierControl && this.magnifierControl.getCollapsed()\r\n        },\r\n        {\r\n            control: ControlTypes.ColorAdjustments,\r\n            visible: getControlVisibility.call(this, this.element.querySelector(\".ol-brightness-contrast\"))\r\n        },\r\n        {\r\n            control: ControlTypes.LayerSwitch,\r\n            visible: this.layerSwitcher && getControlVisibility.call(this, this.element.querySelector(\".ol-layerswitch\")),\r\n            collapsed: this.layerSwitcher ? this.layerSwitcher.getCollapsed() : false\r\n        },\r\n        {\r\n            control: ControlTypes.DimensionSelector,\r\n            visible: this.dimensionsControl && getControlVisibility.call(this, this.element.querySelector(\".ol-dimension-selector\")),\r\n            collapsed: this.dimensionsControl ? this.dimensionsControl.getCollapsed() : false\r\n        },\r\n        {\r\n            control: ControlTypes.Filename,\r\n            visible: this.filenameControl && getControlVisibility.call(this, this.element.querySelector(\".ol-filename\")),\r\n            collapsed: this.filenameControl ? this.filenameControl.getCollapsed() : false,\r\n            filename: null // {string|PMA.UI.View.Viewport~filenameCallback}\r\n        },\r\n        {\r\n            control: ControlTypes.Snapshot,\r\n            visible: this.snapShotControl && getControlVisibility.call(this, this.element.querySelector(\".ol-snapshot\"))\r\n        },\r\n        {\r\n            control: ControlTypes.RotationControl,\r\n            visible: this.rotationControl && getControlVisibility.call(this, this.element.querySelector(\".ol-rotation\"))\r\n        },\r\n        {\r\n            control: ControlTypes.Attribution,\r\n            visible: this.attributionControl && getControlVisibility.call(this, this.element.querySelector(\".ol-attr\")),\r\n            options: null // {boolean|PMA.UI.View.Viewport~attributionOptions}\r\n        }\r\n    ];\r\n}\r\n\r\nexport function initializeControls() {\r\n    this.zoomSliderControl = new ol.control.ZoomSlider();\r\n    this.map.addControl(this.zoomSliderControl);\r\n    if (this.options.zoomSlider === false) {\r\n        setControlVisibility.call(this, this.element.querySelector(\".ol-zoomslider\"), false);\r\n    }\r\n\r\n    var meta = this.imageInfo.MetaData;\r\n    var isJp2k = false;\r\n\r\n    for (var m = 0; m < meta.length; m++) {\r\n        if (meta[m].Name === \"compression\") {\r\n            if (meta[m].Value === \"Jpeg2000YCbCr\" ||\r\n                meta[m].Value === \"Jpeg2000RGB\" ||\r\n                meta[m].Value === \"Jpeg2000\" ||\r\n                meta[m].Value.indexOf(\"JPEG 2000\") !== -1 ||\r\n                meta[m].Value === \"JP2\") {\r\n                isJp2k = true;\r\n            }\r\n\r\n            break;\r\n        }\r\n    }\r\n\r\n    isJp2k = false; // Disables powered by Kakadu message\r\n\r\n    if (isJp2k) {\r\n        this.attributionControl = new PathomationAttribution({ className: \"ol-attr-kakadu\", html: '<a href=\"http://kakadusoftware.com/\" target=\"_blank\">&nbsp;</a>' });\r\n        this.map.addControl(this.attributionControl);\r\n    } else if (this.options.attributions) {\r\n        this.attributionControl = new PathomationAttribution(this.options.attributions);\r\n        this.map.addControl(this.attributionControl);\r\n    }\r\n\r\n    this.colorAdjustmentsControl = new ColorAdjustment({ layer: this.mainLayer, viewer: this });\r\n    this.map.addControl(this.colorAdjustmentsControl);\r\n    setControlVisibility.call(this, this.element.querySelector(\".ol-brightness-contrast\"), this.options.colorAdjustments);\r\n\r\n    if (this.options.annotationsLayers && this.imageInfo.AnnotationsLayers && this.imageInfo.AnnotationsLayers.length > 0) {\r\n        this.layerSwitcher = new LayerSwitch({\r\n            pmaViewport: this,\r\n            tipLabel: Resources.translate(\"Layers\"),\r\n            collapsed: this.options.annotationsLayers && this.options.annotationsLayers.collapsed ? true : false,\r\n            stateManager: stateManager\r\n        });\r\n\r\n        this.map.addControl(this.layerSwitcher);\r\n    }\r\n\r\n    this.overviewControl = createOverviewControl.call(this);\r\n    this.map.addControl(this.overviewControl);\r\n    setControlVisibility.call(this, this.element.querySelector(\".ol-overview\"), this.options.overview);\r\n\r\n    if (this.imageInfo.AssociatedImageTypes) {\r\n        for (var k = 0; k < this.imageInfo.AssociatedImageTypes.length; k++) {\r\n            if (this.imageInfo.AssociatedImageTypes[k].toLowerCase() == \"barcode\") {\r\n                let rotation = 0;\r\n                let collapsed = false;\r\n                if (this.options.barcode) {\r\n                    if (this.options.barcode.rotation) {\r\n                        rotation = this.options.barcode.rotation;\r\n                    }\r\n\r\n                    if (this.options.barcode.collapsed) {\r\n                        collapsed = this.options.barcode.collapsed;\r\n                    }\r\n                }\r\n\r\n                this.barcodeControl = new AssociatedImage({ pmaViewport: this, rotation: rotation, collapsed: collapsed, imageType: \"barcode\", tipLabel: Resources.translate(\"Barcode\"), stateManager: stateManager });\r\n\r\n                this.map.addControl(this.barcodeControl);\r\n                setControlVisibility.call(this, this.element.querySelector(\".ol-associated-image\"), this.options.barcode);\r\n                break;\r\n            }\r\n        }\r\n    }\r\n\r\n    this.dimensionsControl = new DimensionSelector({ pmaViewport: this, tipLabel: Resources.translate(\"Channels\"), collapsed: this.options.dimensions && this.options.dimensions.collapsed, stateManager: stateManager });\r\n    this.map.addControl(this.dimensionsControl);\r\n    this.dimensionsControl.renderSliders();\r\n    setControlVisibility.call(this, this.element.querySelector(\".ol-dimension-selector\"), this.options.dimensions);\r\n\r\n    var self = this;\r\n    var filenameOptions = {\r\n        //filename: (typeof this.options.filename === \"string\" ? this.options.filename : this.imageInfo.Filename),\r\n        onClick: function() {\r\n            self.fireEvent(Events.FilenameClick, self);\r\n        },\r\n        stateManager: stateManager\r\n    };\r\n\r\n    if (typeof this.options.filename === \"string\") {\r\n        filenameOptions.filename = self.options.filename;\r\n    } else if (typeof this.options.filename === \"function\") {\r\n        filenameOptions.filename = self.options.filename.call(self, { serverUrl: self.getActiveServerUrl(), path: self.imageInfo.Filename });\r\n    } else {\r\n        filenameOptions.filename = self.imageInfo.Filename;\r\n    }\r\n\r\n    this.filenameControl = new Filename(filenameOptions);\r\n    this.map.addControl(this.filenameControl);\r\n    setControlVisibility.call(this, this.element.querySelector(\".ol-filename\"), this.options.filename);\r\n\r\n    if (!stateManager.scaleLine) {\r\n        stateManager.scaleLine = {};\r\n    }\r\n\r\n    this.scaleLineControl = new ol.control.ScaleLine();\r\n    this.map.addControl(this.scaleLineControl);\r\n    var scaleLineDiv = this.element.querySelector(\".ol-scale-line\");\r\n    if (scaleLineDiv) {\r\n        if (this.options.scaleLine == false) {\r\n            setScaleLineConfiguration.call(this, { visible: false, collapsed: stateManager.scaleLine.collapsed });\r\n        }\r\n\r\n        if (stateManager.scaleLine.collapsed === true) {\r\n            addClass(scaleLineDiv, \"collapsed\");\r\n        }\r\n\r\n        var objectiveIndicator = document.createElement(\"div\");\r\n        objectiveIndicator.className = 'scanResolution';\r\n        calculateObjective.call(this, objectiveIndicator);\r\n        scaleLineDiv.appendChild(objectiveIndicator);\r\n\r\n        var _this = this;\r\n        this.map.getView().on(\"change:resolution\", function() {\r\n            calculateObjective.call(_this, objectiveIndicator);\r\n        });\r\n\r\n        addEvent(scaleLineDiv, \"click\", function() {\r\n            if (hasClass(scaleLineDiv, \"collapsed\")) {\r\n                removeClass(scaleLineDiv, \"collapsed\");\r\n                stateManager.scaleLine.collapsed = false;\r\n            } else {\r\n                addClass(scaleLineDiv, \"collapsed\");\r\n                stateManager.scaleLine.collapsed = true;\r\n            }\r\n        });\r\n    }\r\n\r\n    this.snapShotControl = new Snapshot({ pmaViewport: this, tipLabel: Resources.translate(\"Snapshot\") });\r\n    this.map.addControl(this.snapShotControl);\r\n    setControlVisibility.call(this, this.element.querySelector(\".ol-snapshot\"), this.options.snapshot == true);\r\n\r\n    let rotCollapsed;\r\n    try {\r\n        if (this.options.rotationControl.collapsed !== true) {\r\n            rotCollapsed = false;\r\n        } else {\r\n            rotCollapsed = true;\r\n        }\r\n    } catch {\r\n        rotCollapsed = false;\r\n    }\r\n    this.rotationControl = new RotationControl({ pmaViewport: this, resetTipLabel: Resources.translate(\"Reset rotation\"), flipHorizontallyTipLabel: Resources.translate(\"Flip horizontally\"), flipVerticallyTipLabel: Resources.translate(\"Flip vertically\"), collapsed: rotCollapsed });\r\n    this.map.addControl(this.rotationControl);\r\n    setControlVisibility.call(this, this.element.querySelector(\".ol-rotation\"), !(this.options.rotationControl === false));\r\n\r\n    this.magnifierControl = createMagnifierControl.call(this, null, !this.options.magnifier || (this.options.magnifier && this.options.magnifier.collapsed === true));\r\n    this.map.addControl(this.magnifierControl);\r\n\r\n    printObjectivesInZoomBar.call(this);\r\n}\r\n//#endregion\r\n\r\n//#region documentation objects\r\n/**\r\n * Receives pixel data and applies an image transformation to it\r\n * @callback PMA.UI.View.tileTransformer\r\n * @param {ImageData} pixels - Represents the underlying pixel data of an area of a canvas element\r\n */\r\n\r\n/**\r\n * Viewport position\r\n * @typedef {Object} PMA.UI.View.Viewport~position\r\n * @property {Array} center - The x and y coordinates of the center point\r\n * @property {number} zoom - The zoom level. Can be omitted if resolution is specified\r\n * @property {number} [resolution] - Can be omitted if zoom is specified\r\n * @property {number} [rotation=0]\r\n */\r\n\r\n/**\r\n * Viewport Field of view\r\n * @typedef {Object} PMA.UI.View.Viewport~fov\r\n * @property {Array} extent - The extent of the viewport [minx, miny, maxx, maxy]\r\n * @property {number} rotation - The rotation of the viewport\r\n * @property {bool} [constrainResolution] - Whether to contain the resolution to allowed values when fitting to extent\r\n * @property {Array} [channels] - The selected channels\r\n * @property {number} [layer=0] - The selected layer\r\n * @property {number} [timeframe=0] - The selected timeframe\r\n */\r\n\r\n/**\r\n * Annotation display options\r\n * @typedef {Object} PMA.UI.View.Viewport~annotationOptions\r\n * @property {boolean} [visible=true] - Whether or not to display the loaded annotations\r\n * @property {boolean} [labels=false] - Whether or not to render the text label of each annotation in the viewer\r\n * @property {boolean} [imageBaseUrl=\"\"] - The base URL from which to load images\r\n * @property {number} [imageScale=NaN] - Scale factor for images\r\n * @property {boolean} [alwaysDisplayInMicrons=false] - Whether or not to automatically select the appropriate units for annotations (μm(^2) or mm(^2)) depending on the value\r\n * @property {boolean} [showMeasurements=true] - Whether to show the length and area of an annotation\r\n * @property {boolean} [loadAnnotationsByFingerprint=false] - Whether to load annotations based on image's fingerprint\r\n * @property {function} [filter] - A function that takes a PMA.core annotation and returns true if annotation should load or false if shouldn't\r\n */\r\n\r\n/**\r\n * Attribution display options\r\n * @typedef {Object} PMA.UI.View.Viewport~attributionOptions\r\n * @property {string} html - The HTML contents to add inside the attribution container element\r\n * @property {string} [className=\"ol-attr\"] - The CSS class to assign to the attribution container element\r\n */\r\n\r\n/**\r\n * Image flip options\r\n * @typedef {Object} PMA.UI.View.Viewport~flipOptions\r\n * @property {boolean} [horizontally=false] - Whether or not to flip the image horizontally\r\n * @property {boolean} [vertically=false] - Whether or not to flip the image vertically\r\n */\r\n\r\n/**\r\n * export function that returns a file name to display in the viewer\r\n * @callback PMA.UI.View.Viewport~filenameCallback\r\n * @param {Object} options\r\n * @param {string} options.serverUrl - The URL of the current PMA.core server\r\n * @param {string} options.fileName - The full path of the currently loaded image\r\n * @returns {string}\r\n */\r\n\r\n/**\r\n * A custom button to be added to the viewer\r\n * @typedef {Object} PMA.UI.View.Viewport~customButton\r\n * @property {string} title - The title of the button\r\n * @property {string} content - The inner html of the button\r\n * @property {string} class - The class of the button\r\n * @property {PMA.UI.View.ButtonLocations} [location=PMA.UI.View.ButtonLocations.S] - The location in the viewport of the custom button\r\n * @property {function} callback - The callback to call when the button is clicked with this referring to the viewer\r\n */\r\n\r\n/**\r\n * An annotation as returned by pma.core\r\n * @typedef PMA.UI.View.Viewport~annotation\r\n * @property {Number} AnnotationID - The annotation id\r\n * @property {Number} LayerID - The layer id\r\n * @property {string} Geometry - The annotation geometry in wkt format\r\n * @property {string} [Notes] - Optional notes for the annotation\r\n * @property {string} [Classification] - Optional classification string (Necrosis, tumor etc)\r\n * @property {string} [Color] - Optional color\r\n * @property {string} [CreatedBy] - Optional created by string\r\n * @property {string} [UpdateInfo] - Optional update info\r\n * @property {string} [Updatedby] - Optional updated by info\r\n * @property {string} [FillColor] - Optional fill color\r\n * @property {Number} [Dimensions] - Optional dimensionality of the annotation\r\n */\r\n\r\n/**\r\n * An object for configuring the visible and collapse state of a control\r\n * @typedef PMA.UI.View.Viewport~ControlConfiguration\r\n * @property {PMA.UI.Types.Controls} control - The control to configure\r\n * @property {boolean} - visible - The visibility of the control\r\n * @property {boolean} - collapsed - Whether the control is collapsed or not\r\n */\r\n\r\n/**\r\n * An object for configuring the visible and collapse state of a control\r\n * @typedef PMA.UI.View.Viewport~SnapshotCoordinates\r\n * @property {Integer} x - The x coordinate\r\n * @property {Integer} y - The y coordinate\r\n * @property {Integer} w - The width\r\n * @property {Integer} h - The height\r\n * @property {Number} scale - The scale of the current view in radians\r\n * @property {Number} rotation - The rotation of the current view in radians\r\n * @property {PMA.UI.View.Viewport~flipOptions} flip - Whether the image is flipped\r\n */","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/LineString\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { assignClosestPoint, maxSquaredDelta } from './flat/closest.js';\nimport { closestSquaredDistanceXY } from '../extent.js';\nimport { deflateCoordinates } from './flat/deflate.js';\nimport { douglasPeucker } from './flat/simplify.js';\nimport { extend } from '../array.js';\nimport { forEach as forEachSegment } from './flat/segments.js';\nimport { inflateCoordinates } from './flat/inflate.js';\nimport { interpolatePoint, lineStringCoordinateAtM } from './flat/interpolate.js';\nimport { intersectsLineString } from './flat/intersectsextent.js';\nimport { lineStringLength } from './flat/length.js';\n/**\n * @classdesc\n * Linestring geometry.\n *\n * @api\n */\nvar LineString = /** @class */ (function (_super) {\n    __extends(LineString, _super);\n    /**\n     * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n     *     For internal use, flat coordinates in combination with `opt_layout` are also accepted.\n     * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n     */\n    function LineString(coordinates, opt_layout) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {import(\"../coordinate.js\").Coordinate}\n         */\n        _this.flatMidpoint_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.flatMidpointRevision_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDelta_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDeltaRevision_ = -1;\n        if (opt_layout !== undefined && !Array.isArray(coordinates[0])) {\n            _this.setFlatCoordinates(opt_layout, \n            /** @type {Array<number>} */ (coordinates));\n        }\n        else {\n            _this.setCoordinates(\n            /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates), opt_layout);\n        }\n        return _this;\n    }\n    /**\n     * Append the passed coordinate to the coordinates of the linestring.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @api\n     */\n    LineString.prototype.appendCoordinate = function (coordinate) {\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = coordinate.slice();\n        }\n        else {\n            extend(this.flatCoordinates, coordinate);\n        }\n        this.changed();\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!LineString} Clone.\n     * @api\n     */\n    LineString.prototype.clone = function () {\n        var lineString = new LineString(this.flatCoordinates.slice(), this.layout);\n        lineString.applyProperties(this);\n        return lineString;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    LineString.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            return minSquaredDistance;\n        }\n        if (this.maxDeltaRevision_ != this.getRevision()) {\n            this.maxDelta_ = Math.sqrt(maxSquaredDelta(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));\n            this.maxDeltaRevision_ = this.getRevision();\n        }\n        return assignClosestPoint(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, this.maxDelta_, false, x, y, closestPoint, minSquaredDistance);\n    };\n    /**\n     * Iterate over each segment, calling the provided callback.\n     * If the callback returns a truthy value the function returns that\n     * value immediately. Otherwise the function returns `false`.\n     *\n     * @param {function(this: S, import(\"../coordinate.js\").Coordinate, import(\"../coordinate.js\").Coordinate): T} callback Function\n     *     called for each segment. The function will receive two arguments, the start and end coordinates of the segment.\n     * @return {T|boolean} Value.\n     * @template T,S\n     * @api\n     */\n    LineString.prototype.forEachSegment = function (callback) {\n        return forEachSegment(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, callback);\n    };\n    /**\n     * Returns the coordinate at `m` using linear interpolation, or `null` if no\n     * such coordinate exists.\n     *\n     * `opt_extrapolate` controls extrapolation beyond the range of Ms in the\n     * MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first\n     * M will return the first coordinate and Ms greater than the last M will\n     * return the last coordinate.\n     *\n     * @param {number} m M.\n     * @param {boolean} [opt_extrapolate] Extrapolate. Default is `false`.\n     * @return {import(\"../coordinate.js\").Coordinate} Coordinate.\n     * @api\n     */\n    LineString.prototype.getCoordinateAtM = function (m, opt_extrapolate) {\n        if (this.layout != GeometryLayout.XYM &&\n            this.layout != GeometryLayout.XYZM) {\n            return null;\n        }\n        var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;\n        return lineStringCoordinateAtM(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, m, extrapolate);\n    };\n    /**\n     * Return the coordinates of the linestring.\n     * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n     * @api\n     */\n    LineString.prototype.getCoordinates = function () {\n        return inflateCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n    };\n    /**\n     * Return the coordinate at the provided fraction along the linestring.\n     * The `fraction` is a number between 0 and 1, where 0 is the start of the\n     * linestring and 1 is the end.\n     * @param {number} fraction Fraction.\n     * @param {import(\"../coordinate.js\").Coordinate} [opt_dest] Optional coordinate whose values will\n     *     be modified. If not provided, a new coordinate will be returned.\n     * @return {import(\"../coordinate.js\").Coordinate} Coordinate of the interpolated point.\n     * @api\n     */\n    LineString.prototype.getCoordinateAt = function (fraction, opt_dest) {\n        return interpolatePoint(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, fraction, opt_dest, this.stride);\n    };\n    /**\n     * Return the length of the linestring on projected plane.\n     * @return {number} Length (on projected plane).\n     * @api\n     */\n    LineString.prototype.getLength = function () {\n        return lineStringLength(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n    };\n    /**\n     * @return {Array<number>} Flat midpoint.\n     */\n    LineString.prototype.getFlatMidpoint = function () {\n        if (this.flatMidpointRevision_ != this.getRevision()) {\n            this.flatMidpoint_ = this.getCoordinateAt(0.5, this.flatMidpoint_);\n            this.flatMidpointRevision_ = this.getRevision();\n        }\n        return this.flatMidpoint_;\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {LineString} Simplified LineString.\n     * @protected\n     */\n    LineString.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n        var simplifiedFlatCoordinates = [];\n        simplifiedFlatCoordinates.length = douglasPeucker(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, squaredTolerance, simplifiedFlatCoordinates, 0);\n        return new LineString(simplifiedFlatCoordinates, GeometryLayout.XY);\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    LineString.prototype.getType = function () {\n        return GeometryType.LINE_STRING;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    LineString.prototype.intersectsExtent = function (extent) {\n        return intersectsLineString(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, extent);\n    };\n    /**\n     * Set the coordinates of the linestring.\n     * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n     * @api\n     */\n    LineString.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, coordinates, 1);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        this.flatCoordinates.length = deflateCoordinates(this.flatCoordinates, 0, coordinates, this.stride);\n        this.changed();\n    };\n    return LineString;\n}(SimpleGeometry));\nexport default LineString;\n//# sourceMappingURL=LineString.js.map","import { Resources } from \"../resources/resources\";\r\n\r\nlet alertedForIncompatibilty = false;\r\n\r\nexport const checkBrowserCompatibility = function (targetElement) {\r\n    var supported = true;\r\n\r\n    if (typeof window.HTMLElement === \"undefined\") {\r\n        supported = false;\r\n    }\r\n\r\n    if (document.all && !document.querySelector) {\r\n        supported = false;\r\n    }\r\n\r\n    var elem = document.createElement('canvas');\r\n    if (!elem.getContext || !elem.getContext('2d')) {\r\n        supported = false;\r\n    }\r\n\r\n    if (!window.XMLHttpRequest) {\r\n        supported = false;\r\n    }\r\n    else {\r\n        // try to initiate a CORS GET request to see if it's supported\r\n        try {\r\n            var http = new XMLHttpRequest();\r\n\r\n            // the domain doesn't have to exist, we never actually send the request\r\n            if (window.location.protocol != \"https:\") {\r\n                http.open(\"GET\", \"http://fake.pathomation.com/\", true);\r\n            }\r\n            else {\r\n                http.open(\"GET\", \"https://fake.pathomation.com/\", true);\r\n            }\r\n        } catch (e) {\r\n            supported = false;\r\n        }\r\n    }\r\n\r\n    if (!supported) {\r\n        var element = null;\r\n        if (targetElement) {\r\n            if (targetElement.innerHTML !== undefined) {\r\n                element = targetElement;\r\n            }\r\n            else if (typeof targetElement == \"string\") {\r\n                // try to get by id if possible\r\n                var elID = targetElement;\r\n                elID = elID.replace('#', '');\r\n                element = document.getElementById(elID);\r\n            }\r\n        }\r\n\r\n        if (element !== null) {\r\n            element.innerHTML = Resources.translate(\"Browser not supported.\");\r\n        }\r\n        else if (!alertedForIncompatibilty) {\r\n            alertedForIncompatibilty = true;\r\n            if (typeof PMA.UI.IncompatibilityRedirect === \"string\") {\r\n                document.location = PMA.UI.IncompatibilityRedirect;\r\n            }\r\n            else {\r\n                alert(Resources.translate(\"Browser not supported.\"));\r\n            }\r\n        }\r\n    }\r\n\r\n    return supported;\r\n};\r\n\r\n/**\r\n  * Converts an object to a URL encoded string of the form param1=value1&amp;param2=value2\r\n  * @param {Object} data - The object to encode\r\n  * @static\r\n  * @return {string}\r\n  */\r\nexport const formify = function (data) {\r\n    if (data) {\r\n        var sData = \"\";\r\n\r\n        var i = 0;\r\n        for (var property in data) {\r\n            if (data.hasOwnProperty(property)) {\r\n                if (i > 0) {\r\n                    sData += \"&\";\r\n                }\r\n\r\n                sData += encodeURIComponent(property) + \"=\" + encodeURIComponent(data[property]);\r\n                i++;\r\n            }\r\n        }\r\n\r\n        return sData;\r\n    }\r\n\r\n    return null;\r\n};\r\n\r\n/**\r\n * Ajax response callback. \"this\" will be the same with the one passed to PMA.UI.View.ajax\r\n * @callback AjaxCallback\r\n * @param {XMLHttpRequest} request - The object that was used to perform the ajax request\r\n */\r\n\r\n/**\r\n * A function that will stringify the data.\r\n * @callback AjaxDataEncodeCallback\r\n * @param {Object} data - The payload\r\n * @return {string}\r\n */\r\n\r\n/**\r\n * An object expected for drag and drop features\r\n * @typedef {Object} AjaxRequestOptions\r\n * @property {string} contentType - The request content type\r\n * @property {AjaxDataEncodeCallback} dataEncodeCallback - A function that will appropriately stringify the data. If null, the data will be formified.\r\n */\r\n\r\n/**\r\n * Fires an HTTP ajax request. \"this\" is preserved and passed along to the callback\r\n * @param {string} url - The URL that the ajax request will be sent to\r\n * @param {string} method - The HTTP verb (POST, GET, PUT etc.)\r\n * @param {Object} data - The data to send. The method will properly encode the data automatically.\r\n * @param {AjaxCallback} callback - The function to call upon completion of the request\r\n * @param {AjaxRequestOptions} requestOptions - Optional HTTP request options\r\n * @static\r\n */\r\nconst ajax = function (url, method, data, callback, requestOptions) {\r\n    var _this = this;\r\n\r\n    method = method.toUpperCase();\r\n    if (!requestOptions) {\r\n        requestOptions = {};\r\n    }\r\n\r\n    if (!requestOptions.dataEncodeCallback) {\r\n        requestOptions.dataEncodeCallback = formify;\r\n    }\r\n\r\n    var sData = requestOptions.dataEncodeCallback(data);\r\n    if (sData && method == \"GET\") {\r\n        url = url + \"?\" + sData;\r\n        sData = null;\r\n    }\r\n\r\n    var http = new XMLHttpRequest();\r\n\r\n    http.open(method, url, true);\r\n\r\n    if (requestOptions.contentType) {\r\n        http.setRequestHeader(\"Content-type\", requestOptions.contentType);\r\n    }\r\n    else if (method == \"POST\") {\r\n        http.setRequestHeader(\"Content-type\", \"application/x-www-form-urlencoded\");\r\n    }\r\n\r\n    http.onreadystatechange = function () {\r\n        if (http.readyState == 4 && typeof callback == \"function\") {\r\n            callback.call(_this, http);\r\n        }\r\n    };\r\n\r\n    if (sData) {\r\n        http.send(sData);\r\n    }\r\n    else {\r\n        http.send();\r\n    }\r\n};\r\n\r\nexport const guidGenerator = function () {\r\n    var S4 = function () {\r\n        return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);\r\n    };\r\n    return (S4() + S4() + \"-\" + S4() + \"-\" + S4() + \"-\" + S4() + \"-\" + S4() + S4() + S4());\r\n}\r\n\r\nexport { ajax };\r\n","/**\n * @module ol/ViewHint\n */\n/**\n * @enum {number}\n */\nexport default {\n    ANIMATING: 0,\n    INTERACTING: 1,\n};\n//# sourceMappingURL=ViewHint.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Observable\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport { listen, listenOnce, unlistenByKey } from './events.js';\n/***\n * @template {string} Type\n * @template {Event|import(\"./events/Event.js\").default} EventClass\n * @template Return\n * @typedef {(type: Type|Type[], listener: (event: EventClass) => ?) => Return} OnSignature\n */\n/***\n * @template {string} Type\n * @template Return\n * @typedef {(type: Type[], listener: (event: Event|import(\"./events/Event\").default) => ?) => Return} CombinedOnSignature\n */\n/***\n * @typedef {import(\"./events\").EventsKey|Array<import(\"./events\").EventsKey>} OnReturn\n */\n/**\n * @typedef {'change'|'error'} EventTypes\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * An event target providing convenient methods for listener registration\n * and unregistration. A generic `change` event is always available through\n * {@link module:ol/Observable~Observable#changed}.\n *\n * @fires import(\"./events/Event.js\").default\n * @api\n */\nvar Observable = /** @class */ (function (_super) {\n    __extends(Observable, _super);\n    function Observable() {\n        var _this = _super.call(this) || this;\n        /***\n         * @type {OnSignature<EventTypes, import(\"./events/Event.js\").default, OnReturn>}\n         */\n        _this.on = _this.onInternal;\n        /***\n         * @type {OnSignature<EventTypes, import(\"./events/Event.js\").default, OnReturn>}\n         */\n        _this.once = _this.onceInternal;\n        /***\n         * @type {OnSignature<EventTypes, import(\"./events/Event.js\").default, void>}\n         */\n        _this.un = _this.unInternal;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.revision_ = 0;\n        return _this;\n    }\n    /**\n     * Increases the revision counter and dispatches a 'change' event.\n     * @api\n     */\n    Observable.prototype.changed = function () {\n        ++this.revision_;\n        this.dispatchEvent(EventType.CHANGE);\n    };\n    /**\n     * Get the version number for this object.  Each time the object is modified,\n     * its version number will be incremented.\n     * @return {number} Revision.\n     * @api\n     */\n    Observable.prototype.getRevision = function () {\n        return this.revision_;\n    };\n    /**\n     * @param {string|Array<string>} type Type.\n     * @param {function(?): ?} listener Listener.\n     * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Event key.\n     * @protected\n     */\n    Observable.prototype.onInternal = function (type, listener) {\n        if (Array.isArray(type)) {\n            var len = type.length;\n            var keys = new Array(len);\n            for (var i = 0; i < len; ++i) {\n                keys[i] = listen(this, type[i], listener);\n            }\n            return keys;\n        }\n        else {\n            return listen(this, /** @type {string} */ (type), listener);\n        }\n    };\n    /**\n     * @param {string|Array<string>} type Type.\n     * @param {function(?): ?} listener Listener.\n     * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Event key.\n     * @protected\n     */\n    Observable.prototype.onceInternal = function (type, listener) {\n        var key;\n        if (Array.isArray(type)) {\n            var len = type.length;\n            key = new Array(len);\n            for (var i = 0; i < len; ++i) {\n                key[i] = listenOnce(this, type[i], listener);\n            }\n        }\n        else {\n            key = listenOnce(this, /** @type {string} */ (type), listener);\n        }\n        /** @type {Object} */ (listener).ol_key = key;\n        return key;\n    };\n    /**\n     * Unlisten for a certain type of event.\n     * @param {string|Array<string>} type Type.\n     * @param {function(?): ?} listener Listener.\n     * @protected\n     */\n    Observable.prototype.unInternal = function (type, listener) {\n        var key = /** @type {Object} */ (listener).ol_key;\n        if (key) {\n            unByKey(key);\n        }\n        else if (Array.isArray(type)) {\n            for (var i = 0, ii = type.length; i < ii; ++i) {\n                this.removeEventListener(type[i], listener);\n            }\n        }\n        else {\n            this.removeEventListener(type, listener);\n        }\n    };\n    return Observable;\n}(EventTarget));\n/**\n * Listen for a certain type of event.\n * @function\n * @param {string|Array<string>} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Unique key for the listener. If\n *     called with an array of event types as the first argument, the return\n *     will be an array of keys.\n * @api\n */\nObservable.prototype.on;\n/**\n * Listen once for a certain type of event.\n * @function\n * @param {string|Array<string>} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener The listener function.\n * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Unique key for the listener. If\n *     called with an array of event types as the first argument, the return\n *     will be an array of keys.\n * @api\n */\nObservable.prototype.once;\n/**\n * Unlisten for a certain type of event.\n * @function\n * @param {string|Array<string>} type The event type or array of event types.\n * @param {function((Event|import(\"./events/Event\").default)): ?} listener The listener function.\n * @api\n */\nObservable.prototype.un;\n/**\n * Removes an event listener using the key returned by `on()` or `once()`.\n * @param {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} key The key returned by `on()`\n *     or `once()` (or an array of keys).\n * @api\n */\nexport function unByKey(key) {\n    if (Array.isArray(key)) {\n        for (var i = 0, ii = key.length; i < ii; ++i) {\n            unlistenByKey(key[i]);\n        }\n    }\n    else {\n        unlistenByKey(/** @type {import(\"./events.js\").EventsKey} */ (key));\n    }\n}\nexport default Observable;\n//# sourceMappingURL=Observable.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/Control\n */\nimport BaseObject from '../Object.js';\nimport MapEventType from '../MapEventType.js';\nimport { VOID } from '../functions.js';\nimport { listen, unlistenByKey } from '../events.js';\nimport { removeNode } from '../dom.js';\n/**\n * @typedef {Object} Options\n * @property {HTMLElement} [element] The element is the control's\n * container element. This only needs to be specified if you're developing\n * a custom control.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when\n * the control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want\n * the control to be rendered outside of the map's viewport.\n */\n/**\n * @classdesc\n * A control is a visible widget with a DOM element in a fixed position on the\n * screen. They can involve user input (buttons), or be informational only;\n * the position is determined using CSS. By default these are placed in the\n * container with CSS class name `ol-overlaycontainer-stopevent`, but can use\n * any outside DOM element.\n *\n * This is the base class for controls. You can use it for simple custom\n * controls by creating the element with listeners, creating an instance:\n * ```js\n * var myControl = new Control({element: myElement});\n * ```\n * and then adding this to the map.\n *\n * The main advantage of having this as a control rather than a simple separate\n * DOM element is that preventing propagation is handled for you. Controls\n * will also be objects in a {@link module:ol/Collection~Collection}, so you can use their methods.\n *\n * You can also extend this base for your own control class. See\n * examples/custom-controls for an example of how to do this.\n *\n * @api\n */\nvar Control = /** @class */ (function (_super) {\n    __extends(Control, _super);\n    /**\n     * @param {Options} options Control options.\n     */\n    function Control(options) {\n        var _this = _super.call(this) || this;\n        var element = options.element;\n        if (element && !options.target && !element.style.pointerEvents) {\n            element.style.pointerEvents = 'auto';\n        }\n        /**\n         * @protected\n         * @type {HTMLElement}\n         */\n        _this.element = element ? element : null;\n        /**\n         * @private\n         * @type {HTMLElement}\n         */\n        _this.target_ = null;\n        /**\n         * @private\n         * @type {import(\"../PluggableMap.js\").default}\n         */\n        _this.map_ = null;\n        /**\n         * @protected\n         * @type {!Array<import(\"../events.js\").EventsKey>}\n         */\n        _this.listenerKeys = [];\n        if (options.render) {\n            _this.render = options.render;\n        }\n        if (options.target) {\n            _this.setTarget(options.target);\n        }\n        return _this;\n    }\n    /**\n     * Clean up.\n     */\n    Control.prototype.disposeInternal = function () {\n        removeNode(this.element);\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * Get the map associated with this control.\n     * @return {import(\"../PluggableMap.js\").default} Map.\n     * @api\n     */\n    Control.prototype.getMap = function () {\n        return this.map_;\n    };\n    /**\n     * Remove the control from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @api\n     */\n    Control.prototype.setMap = function (map) {\n        if (this.map_) {\n            removeNode(this.element);\n        }\n        for (var i = 0, ii = this.listenerKeys.length; i < ii; ++i) {\n            unlistenByKey(this.listenerKeys[i]);\n        }\n        this.listenerKeys.length = 0;\n        this.map_ = map;\n        if (this.map_) {\n            var target = this.target_\n                ? this.target_\n                : map.getOverlayContainerStopEvent();\n            target.appendChild(this.element);\n            if (this.render !== VOID) {\n                this.listenerKeys.push(listen(map, MapEventType.POSTRENDER, this.render, this));\n            }\n            map.render();\n        }\n    };\n    /**\n     * Renders the control.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @api\n     */\n    Control.prototype.render = function (mapEvent) { };\n    /**\n     * This function is used to set a target element for the control. It has no\n     * effect if it is called after the control has been added to the map (i.e.\n     * after `setMap` is called on the control). If no `target` is set in the\n     * options passed to the control constructor and if `setTarget` is not called\n     * then the control is added to the map's overlay container.\n     * @param {HTMLElement|string} target Target.\n     * @api\n     */\n    Control.prototype.setTarget = function (target) {\n        this.target_ =\n            typeof target === 'string' ? document.getElementById(target) : target;\n    };\n    return Control;\n}(BaseObject));\nexport default Control;\n//# sourceMappingURL=Control.js.map","/**\n * @module ol/tilecoord\n */\n/**\n * An array of three numbers representing the location of a tile in a tile\n * grid. The order is `z` (zoom level), `x` (column), and `y` (row).\n * @typedef {Array<number>} TileCoord\n * @api\n */\n/**\n * @param {number} z Z.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {TileCoord} [opt_tileCoord] Tile coordinate.\n * @return {TileCoord} Tile coordinate.\n */\nexport function createOrUpdate(z, x, y, opt_tileCoord) {\n    if (opt_tileCoord !== undefined) {\n        opt_tileCoord[0] = z;\n        opt_tileCoord[1] = x;\n        opt_tileCoord[2] = y;\n        return opt_tileCoord;\n    }\n    else {\n        return [z, x, y];\n    }\n}\n/**\n * @param {number} z Z.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {string} Key.\n */\nexport function getKeyZXY(z, x, y) {\n    return z + '/' + x + '/' + y;\n}\n/**\n * Get the key for a tile coord.\n * @param {TileCoord} tileCoord The tile coord.\n * @return {string} Key.\n */\nexport function getKey(tileCoord) {\n    return getKeyZXY(tileCoord[0], tileCoord[1], tileCoord[2]);\n}\n/**\n * Get the tile cache key for a tile key obtained through `tile.getKey()`.\n * @param {string} tileKey The tile key.\n * @return {string} The cache key.\n */\nexport function getCacheKeyForTileKey(tileKey) {\n    var _a = tileKey\n        .substring(tileKey.lastIndexOf('/') + 1, tileKey.length)\n        .split(',')\n        .map(Number), z = _a[0], x = _a[1], y = _a[2];\n    return getKeyZXY(z, x, y);\n}\n/**\n * Get a tile coord given a key.\n * @param {string} key The tile coord key.\n * @return {TileCoord} The tile coord.\n */\nexport function fromKey(key) {\n    return key.split('/').map(Number);\n}\n/**\n * @param {TileCoord} tileCoord Tile coord.\n * @return {number} Hash.\n */\nexport function hash(tileCoord) {\n    return (tileCoord[1] << tileCoord[0]) + tileCoord[2];\n}\n/**\n * @param {TileCoord} tileCoord Tile coordinate.\n * @param {!import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {boolean} Tile coordinate is within extent and zoom level range.\n */\nexport function withinExtentAndZ(tileCoord, tileGrid) {\n    var z = tileCoord[0];\n    var x = tileCoord[1];\n    var y = tileCoord[2];\n    if (tileGrid.getMinZoom() > z || z > tileGrid.getMaxZoom()) {\n        return false;\n    }\n    var tileRange = tileGrid.getFullTileRange(z);\n    if (!tileRange) {\n        return true;\n    }\n    else {\n        return tileRange.containsXY(x, y);\n    }\n}\n//# sourceMappingURL=tilecoord.js.map","/**\n * @module ol/CollectionEventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    /**\n     * Triggered when an item is added to the collection.\n     * @event module:ol/Collection.CollectionEvent#add\n     * @api\n     */\n    ADD: 'add',\n    /**\n     * Triggered when an item is removed from the collection.\n     * @event module:ol/Collection.CollectionEvent#remove\n     * @api\n     */\n    REMOVE: 'remove',\n};\n//# sourceMappingURL=CollectionEventType.js.map","/**\n * @module ol/layer/Property\n */\n/**\n * @enum {string}\n */\nexport default {\n    OPACITY: 'opacity',\n    VISIBLE: 'visible',\n    EXTENT: 'extent',\n    Z_INDEX: 'zIndex',\n    MAX_RESOLUTION: 'maxResolution',\n    MIN_RESOLUTION: 'minResolution',\n    MAX_ZOOM: 'maxZoom',\n    MIN_ZOOM: 'minZoom',\n    SOURCE: 'source',\n};\n//# sourceMappingURL=Property.js.map","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function\");\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","/**\n * @module ol/proj/Units\n */\n/**\n * Projection units: `'degrees'`, `'ft'`, `'m'`, `'pixels'`, `'tile-pixels'` or\n * `'us-ft'`.\n * @enum {string}\n */\nvar Units = {\n    /**\n     * Degrees\n     * @api\n     */\n    DEGREES: 'degrees',\n    /**\n     * Feet\n     * @api\n     */\n    FEET: 'ft',\n    /**\n     * Meters\n     * @api\n     */\n    METERS: 'm',\n    /**\n     * Pixels\n     * @api\n     */\n    PIXELS: 'pixels',\n    /**\n     * Tile Pixels\n     * @api\n     */\n    TILE_PIXELS: 'tile-pixels',\n    /**\n     * US Feet\n     * @api\n     */\n    USFEET: 'us-ft',\n};\n/**\n * Meters per unit lookup table.\n * @const\n * @type {Object<Units, number>}\n * @api\n */\nexport var METERS_PER_UNIT = {};\n// use the radius of the Normal sphere\nMETERS_PER_UNIT[Units.DEGREES] = (2 * Math.PI * 6370997) / 360;\nMETERS_PER_UNIT[Units.FEET] = 0.3048;\nMETERS_PER_UNIT[Units.METERS] = 1;\nMETERS_PER_UNIT[Units.USFEET] = 1200 / 3937;\nexport default Units;\n//# sourceMappingURL=Units.js.map","var _typeof = require(\"@babel/runtime/helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n  if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n    return call;\n  }\n\n  return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Object\n */\nimport Event from './events/Event.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport Observable from './Observable.js';\nimport { assign, isEmpty } from './obj.js';\nimport { getUid } from './util.js';\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Object~BaseObject} instances are instances of this type.\n */\nvar ObjectEvent = /** @class */ (function (_super) {\n    __extends(ObjectEvent, _super);\n    /**\n     * @param {string} type The event type.\n     * @param {string} key The property name.\n     * @param {*} oldValue The old value for `key`.\n     */\n    function ObjectEvent(type, key, oldValue) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The name of the property whose value is changing.\n         * @type {string}\n         * @api\n         */\n        _this.key = key;\n        /**\n         * The old value. To get the new value use `e.target.get(e.key)` where\n         * `e` is the event object.\n         * @type {*}\n         * @api\n         */\n        _this.oldValue = oldValue;\n        return _this;\n    }\n    return ObjectEvent;\n}(Event));\nexport { ObjectEvent };\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature<import(\"./Observable\").EventTypes, import(\"./events/Event.js\").default, Return> &\n *    import(\"./Observable\").OnSignature<import(\"./ObjectEventType\").Types, ObjectEvent, Return> &\n *    import(\"./Observable\").CombinedOnSignature<import(\"./Observable\").EventTypes|import(\"./ObjectEventType\").Types, Return>} ObjectOnSignature\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Most non-trivial classes inherit from this.\n *\n * This extends {@link module:ol/Observable} with observable\n * properties, where each property is observable as well as the object as a\n * whole.\n *\n * Classes that inherit from this have pre-defined properties, to which you can\n * add your owns. The pre-defined properties are listed in this documentation as\n * 'Observable Properties', and have their own accessors; for example,\n * {@link module:ol/Map~Map} has a `target` property, accessed with\n * `getTarget()` and changed with `setTarget()`. Not all properties are however\n * settable. There are also general-purpose accessors `get()` and `set()`. For\n * example, `get('target')` is equivalent to `getTarget()`.\n *\n * The `set` accessors trigger a change event, and you can monitor this by\n * registering a listener. For example, {@link module:ol/View~View} has a\n * `center` property, so `view.on('change:center', function(evt) {...});` would\n * call the function whenever the value of the center property changes. Within\n * the function, `evt.target` would be the view, so `evt.target.getCenter()`\n * would return the new center.\n *\n * You can add your own observable properties with\n * `object.set('prop', 'value')`, and retrieve that with `object.get('prop')`.\n * You can listen for changes on that property value with\n * `object.on('change:prop', listener)`. You can get a list of all\n * properties with {@link module:ol/Object~BaseObject#getProperties}.\n *\n * Note that the observable properties are separate from standard JS properties.\n * You can, for example, give your map object a title with\n * `map.title='New title'` and with `map.set('title', 'Another title')`. The\n * first will be a `hasOwnProperty`; the second will appear in\n * `getProperties()`. Only the second is observable.\n *\n * Properties can be deleted by using the unset method. E.g.\n * object.unset('foo').\n *\n * @fires ObjectEvent\n * @api\n */\nvar BaseObject = /** @class */ (function (_super) {\n    __extends(BaseObject, _super);\n    /**\n     * @param {Object<string, *>} [opt_values] An object with key-value pairs.\n     */\n    function BaseObject(opt_values) {\n        var _this = _super.call(this) || this;\n        /***\n         * @type {ObjectOnSignature<import(\"./Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {ObjectOnSignature<import(\"./Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {ObjectOnSignature<void>}\n         */\n        _this.un;\n        // Call {@link module:ol/util.getUid} to ensure that the order of objects' ids is\n        // the same as the order in which they were created.  This also helps to\n        // ensure that object properties are always added in the same order, which\n        // helps many JavaScript engines generate faster code.\n        getUid(_this);\n        /**\n         * @private\n         * @type {Object<string, *>}\n         */\n        _this.values_ = null;\n        if (opt_values !== undefined) {\n            _this.setProperties(opt_values);\n        }\n        return _this;\n    }\n    /**\n     * Gets a value.\n     * @param {string} key Key name.\n     * @return {*} Value.\n     * @api\n     */\n    BaseObject.prototype.get = function (key) {\n        var value;\n        if (this.values_ && this.values_.hasOwnProperty(key)) {\n            value = this.values_[key];\n        }\n        return value;\n    };\n    /**\n     * Get a list of object property names.\n     * @return {Array<string>} List of property names.\n     * @api\n     */\n    BaseObject.prototype.getKeys = function () {\n        return (this.values_ && Object.keys(this.values_)) || [];\n    };\n    /**\n     * Get an object of all property names and values.\n     * @return {Object<string, *>} Object.\n     * @api\n     */\n    BaseObject.prototype.getProperties = function () {\n        return (this.values_ && assign({}, this.values_)) || {};\n    };\n    /**\n     * @return {boolean} The object has properties.\n     */\n    BaseObject.prototype.hasProperties = function () {\n        return !!this.values_;\n    };\n    /**\n     * @param {string} key Key name.\n     * @param {*} oldValue Old value.\n     */\n    BaseObject.prototype.notify = function (key, oldValue) {\n        var eventType;\n        eventType = \"change:\" + key;\n        this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n        eventType = ObjectEventType.PROPERTYCHANGE;\n        this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n    };\n    /**\n     * @param {string} key Key name.\n     * @param {import(\"./events.js\").Listener} listener Listener.\n     */\n    BaseObject.prototype.addChangeListener = function (key, listener) {\n        this.addEventListener(\"change:\" + key, listener);\n    };\n    /**\n     * @param {string} key Key name.\n     * @param {import(\"./events.js\").Listener} listener Listener.\n     */\n    BaseObject.prototype.removeChangeListener = function (key, listener) {\n        this.removeEventListener(\"change:\" + key, listener);\n    };\n    /**\n     * Sets a value.\n     * @param {string} key Key name.\n     * @param {*} value Value.\n     * @param {boolean} [opt_silent] Update without triggering an event.\n     * @api\n     */\n    BaseObject.prototype.set = function (key, value, opt_silent) {\n        var values = this.values_ || (this.values_ = {});\n        if (opt_silent) {\n            values[key] = value;\n        }\n        else {\n            var oldValue = values[key];\n            values[key] = value;\n            if (oldValue !== value) {\n                this.notify(key, oldValue);\n            }\n        }\n    };\n    /**\n     * Sets a collection of key-value pairs.  Note that this changes any existing\n     * properties and adds new ones (it does not remove any existing properties).\n     * @param {Object<string, *>} values Values.\n     * @param {boolean} [opt_silent] Update without triggering an event.\n     * @api\n     */\n    BaseObject.prototype.setProperties = function (values, opt_silent) {\n        for (var key in values) {\n            this.set(key, values[key], opt_silent);\n        }\n    };\n    /**\n     * Apply any properties from another object without triggering events.\n     * @param {BaseObject} source The source object.\n     * @protected\n     */\n    BaseObject.prototype.applyProperties = function (source) {\n        if (!source.values_) {\n            return;\n        }\n        assign(this.values_ || (this.values_ = {}), source.values_);\n    };\n    /**\n     * Unsets a property.\n     * @param {string} key Key name.\n     * @param {boolean} [opt_silent] Unset without triggering an event.\n     * @api\n     */\n    BaseObject.prototype.unset = function (key, opt_silent) {\n        if (this.values_ && key in this.values_) {\n            var oldValue = this.values_[key];\n            delete this.values_[key];\n            if (isEmpty(this.values_)) {\n                this.values_ = null;\n            }\n            if (!opt_silent) {\n                this.notify(key, oldValue);\n            }\n        }\n    };\n    return BaseObject;\n}(Observable));\nexport default BaseObject;\n//# sourceMappingURL=Object.js.map","/**\n * @module ol/tilegrid\n */\nimport Corner from './extent/Corner.js';\nimport TileGrid from './tilegrid/TileGrid.js';\nimport Units from './proj/Units.js';\nimport { DEFAULT_MAX_ZOOM, DEFAULT_TILE_SIZE } from './tilegrid/common.js';\nimport { METERS_PER_UNIT, get as getProjection } from './proj.js';\nimport { containsCoordinate, createOrUpdate, getCorner, getHeight, getWidth, } from './extent.js';\nimport { toSize } from './size.js';\n/**\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {!TileGrid} Default tile grid for the\n * passed projection.\n */\nexport function getForProjection(projection) {\n    var tileGrid = projection.getDefaultTileGrid();\n    if (!tileGrid) {\n        tileGrid = createForProjection(projection);\n        projection.setDefaultTileGrid(tileGrid);\n    }\n    return tileGrid;\n}\n/**\n * @param {TileGrid} tileGrid Tile grid.\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {import(\"./tilecoord.js\").TileCoord} Tile coordinate.\n */\nexport function wrapX(tileGrid, tileCoord, projection) {\n    var z = tileCoord[0];\n    var center = tileGrid.getTileCoordCenter(tileCoord);\n    var projectionExtent = extentFromProjection(projection);\n    if (!containsCoordinate(projectionExtent, center)) {\n        var worldWidth = getWidth(projectionExtent);\n        var worldsAway = Math.ceil((projectionExtent[0] - center[0]) / worldWidth);\n        center[0] += worldWidth * worldsAway;\n        return tileGrid.getTileCoordForCoordAndZ(center, z);\n    }\n    else {\n        return tileCoord;\n    }\n}\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} [opt_maxZoom] Maximum zoom level (default is\n *     DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size} [opt_tileSize] Tile size (default uses\n *     DEFAULT_TILE_SIZE).\n * @param {import(\"./extent/Corner.js\").default} [opt_corner] Extent corner (default is `'top-left'`).\n * @return {!TileGrid} TileGrid instance.\n */\nexport function createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner) {\n    var corner = opt_corner !== undefined ? opt_corner : Corner.TOP_LEFT;\n    var resolutions = resolutionsFromExtent(extent, opt_maxZoom, opt_tileSize);\n    return new TileGrid({\n        extent: extent,\n        origin: getCorner(extent, corner),\n        resolutions: resolutions,\n        tileSize: opt_tileSize,\n    });\n}\n/**\n * @typedef {Object} XYZOptions\n * @property {import(\"./extent.js\").Extent} [extent] Extent for the tile grid. The origin for an XYZ tile grid is the\n * top-left corner of the extent. If `maxResolution` is not provided the zero level of the grid is defined by the resolution\n * at which one tile fits in the provided extent. If not provided, the extent of the EPSG:3857 projection is used.\n * @property {number} [maxResolution] Resolution at level zero.\n * @property {number} [maxZoom] Maximum zoom. The default is `42`. This determines the number of levels\n * in the grid set. For example, a `maxZoom` of 21 means there are 22 levels in the grid set.\n * @property {number} [minZoom=0] Minimum zoom.\n * @property {number|import(\"./size.js\").Size} [tileSize=[256, 256]] Tile size in pixels.\n */\n/**\n * Creates a tile grid with a standard XYZ tiling scheme.\n * @param {XYZOptions} [opt_options] Tile grid options.\n * @return {!TileGrid} Tile grid instance.\n * @api\n */\nexport function createXYZ(opt_options) {\n    var xyzOptions = opt_options || {};\n    var extent = xyzOptions.extent || getProjection('EPSG:3857').getExtent();\n    var gridOptions = {\n        extent: extent,\n        minZoom: xyzOptions.minZoom,\n        tileSize: xyzOptions.tileSize,\n        resolutions: resolutionsFromExtent(extent, xyzOptions.maxZoom, xyzOptions.tileSize, xyzOptions.maxResolution),\n    };\n    return new TileGrid(gridOptions);\n}\n/**\n * Create a resolutions array from an extent.  A zoom factor of 2 is assumed.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} [opt_maxZoom] Maximum zoom level (default is\n *     DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size} [opt_tileSize] Tile size (default uses\n *     DEFAULT_TILE_SIZE).\n * @param {number} [opt_maxResolution] Resolution at level zero.\n * @return {!Array<number>} Resolutions array.\n */\nfunction resolutionsFromExtent(extent, opt_maxZoom, opt_tileSize, opt_maxResolution) {\n    var maxZoom = opt_maxZoom !== undefined ? opt_maxZoom : DEFAULT_MAX_ZOOM;\n    var height = getHeight(extent);\n    var width = getWidth(extent);\n    var tileSize = toSize(opt_tileSize !== undefined ? opt_tileSize : DEFAULT_TILE_SIZE);\n    var maxResolution = opt_maxResolution > 0\n        ? opt_maxResolution\n        : Math.max(width / tileSize[0], height / tileSize[1]);\n    var length = maxZoom + 1;\n    var resolutions = new Array(length);\n    for (var z = 0; z < length; ++z) {\n        resolutions[z] = maxResolution / Math.pow(2, z);\n    }\n    return resolutions;\n}\n/**\n * @param {import(\"./proj.js\").ProjectionLike} projection Projection.\n * @param {number} [opt_maxZoom] Maximum zoom level (default is\n *     DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size} [opt_tileSize] Tile size (default uses\n *     DEFAULT_TILE_SIZE).\n * @param {import(\"./extent/Corner.js\").default} [opt_corner] Extent corner (default is `'top-left'`).\n * @return {!TileGrid} TileGrid instance.\n */\nexport function createForProjection(projection, opt_maxZoom, opt_tileSize, opt_corner) {\n    var extent = extentFromProjection(projection);\n    return createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner);\n}\n/**\n * Generate a tile grid extent from a projection.  If the projection has an\n * extent, it is used.  If not, a global extent is assumed.\n * @param {import(\"./proj.js\").ProjectionLike} projection Projection.\n * @return {import(\"./extent.js\").Extent} Extent.\n */\nexport function extentFromProjection(projection) {\n    projection = getProjection(projection);\n    var extent = projection.getExtent();\n    if (!extent) {\n        var half = (180 * METERS_PER_UNIT[Units.DEGREES]) / projection.getMetersPerUnit();\n        extent = createOrUpdate(-half, -half, half, half);\n    }\n    return extent;\n}\n//# sourceMappingURL=tilegrid.js.map","import { isNumber } from '@turf/helpers';\n\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} obj Object\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nfunction getCoord(obj) {\n    if (!obj) throw new Error('obj is required');\n\n    var coordinates = getCoords(obj);\n\n    // getCoord() must contain at least two numbers (Point)\n    if (coordinates.length > 1 && isNumber(coordinates[0]) && isNumber(coordinates[1])) {\n        return coordinates;\n    } else {\n        throw new Error('Coordinate is not a valid Point');\n    }\n}\n\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array of numbers\n *\n * @name getCoords\n * @param {Array<number>|Geometry|Feature} obj Object\n * @returns {Array<number>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coord = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nfunction getCoords(obj) {\n    if (!obj) throw new Error('obj is required');\n    var coordinates;\n\n    // Array of numbers\n    if (obj.length) {\n        coordinates = obj;\n\n    // Geometry Object\n    } else if (obj.coordinates) {\n        coordinates = obj.coordinates;\n\n    // Feature\n    } else if (obj.geometry && obj.geometry.coordinates) {\n        coordinates = obj.geometry.coordinates;\n    }\n    // Checks if coordinates contains a number\n    if (coordinates) {\n        containsNumber(coordinates);\n        return coordinates;\n    }\n    throw new Error('No valid coordinates');\n}\n\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nfunction containsNumber(coordinates) {\n    if (coordinates.length > 1 && isNumber(coordinates[0]) && isNumber(coordinates[1])) {\n        return true;\n    }\n\n    if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n        return containsNumber(coordinates[0]);\n    }\n    throw new Error('coordinates must only contain numbers');\n}\n\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nfunction geojsonType(value, type, name) {\n    if (!type || !name) throw new Error('type and name required');\n\n    if (!value || value.type !== type) {\n        throw new Error('Invalid input to ' + name + ': must be a ' + type + ', given ' + value.type);\n    }\n}\n\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nfunction featureOf(feature, type, name) {\n    if (!feature) throw new Error('No feature passed');\n    if (!name) throw new Error('.featureOf() requires a name');\n    if (!feature || feature.type !== 'Feature' || !feature.geometry) {\n        throw new Error('Invalid input to ' + name + ', Feature with geometry required');\n    }\n    if (!feature.geometry || feature.geometry.type !== type) {\n        throw new Error('Invalid input to ' + name + ': must be a ' + type + ', given ' + feature.geometry.type);\n    }\n}\n\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nfunction collectionOf(featureCollection, type, name) {\n    if (!featureCollection) throw new Error('No featureCollection passed');\n    if (!name) throw new Error('.collectionOf() requires a name');\n    if (!featureCollection || featureCollection.type !== 'FeatureCollection') {\n        throw new Error('Invalid input to ' + name + ', FeatureCollection required');\n    }\n    for (var i = 0; i < featureCollection.features.length; i++) {\n        var feature = featureCollection.features[i];\n        if (!feature || feature.type !== 'Feature' || !feature.geometry) {\n            throw new Error('Invalid input to ' + name + ', Feature with geometry required');\n        }\n        if (!feature.geometry || feature.geometry.type !== type) {\n            throw new Error('Invalid input to ' + name + ': must be a ' + type + ', given ' + feature.geometry.type);\n        }\n    }\n}\n\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n *   \"type\": \"Feature\",\n *   \"properties\": {},\n *   \"geometry\": {\n *     \"type\": \"Point\",\n *     \"coordinates\": [110, 40]\n *   }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nfunction getGeom(geojson) {\n    if (!geojson) throw new Error('geojson is required');\n    if (geojson.geometry !== undefined) return geojson.geometry;\n    if (geojson.coordinates || geojson.geometries) return geojson;\n    throw new Error('geojson must be a valid Feature or Geometry Object');\n}\n\n/**\n * Get Geometry Type from Feature or Geometry Object\n *\n * @throws {Error} **DEPRECATED** in v5.0.0 in favor of getType\n */\nfunction getGeomType() {\n    throw new Error('invariant.getGeomType has been deprecated in v5.0 in favor of invariant.getType');\n}\n\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name] name of the variable to display in error message\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n *   \"type\": \"Feature\",\n *   \"properties\": {},\n *   \"geometry\": {\n *     \"type\": \"Point\",\n *     \"coordinates\": [110, 40]\n *   }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nfunction getType(geojson, name) {\n    if (!geojson) throw new Error((name || 'geojson') + ' is required');\n    // GeoJSON Feature & GeometryCollection\n    if (geojson.geometry && geojson.geometry.type) return geojson.geometry.type;\n    // GeoJSON Geometry & FeatureCollection\n    if (geojson.type) return geojson.type;\n    throw new Error((name || 'geojson') + ' is invalid');\n}\n\nexport { getCoord, getCoords, containsNumber, geojsonType, featureOf, collectionOf, getGeom, getGeomType, getType };\n","/**\n * @module ol/has\n */\nvar ua = typeof navigator !== 'undefined' && typeof navigator.userAgent !== 'undefined'\n    ? navigator.userAgent.toLowerCase()\n    : '';\n/**\n * User agent string says we are dealing with Firefox as browser.\n * @type {boolean}\n */\nexport var FIREFOX = ua.indexOf('firefox') !== -1;\n/**\n * User agent string says we are dealing with Safari as browser.\n * @type {boolean}\n */\nexport var SAFARI = ua.indexOf('safari') !== -1 && ua.indexOf('chrom') == -1;\n/**\n * User agent string says we are dealing with a WebKit engine.\n * @type {boolean}\n */\nexport var WEBKIT = ua.indexOf('webkit') !== -1 && ua.indexOf('edge') == -1;\n/**\n * User agent string says we are dealing with a Mac as platform.\n * @type {boolean}\n */\nexport var MAC = ua.indexOf('macintosh') !== -1;\n/**\n * The ratio between physical pixels and device-independent pixels\n * (dips) on the device (`window.devicePixelRatio`).\n * @const\n * @type {number}\n * @api\n */\nexport var DEVICE_PIXEL_RATIO = typeof devicePixelRatio !== 'undefined' ? devicePixelRatio : 1;\n/**\n * The execution context is a worker with OffscreenCanvas available.\n * @const\n * @type {boolean}\n */\nexport var WORKER_OFFSCREEN_CANVAS = typeof WorkerGlobalScope !== 'undefined' &&\n    typeof OffscreenCanvas !== 'undefined' &&\n    self instanceof WorkerGlobalScope; //eslint-disable-line\n/**\n * Image.prototype.decode() is supported.\n * @type {boolean}\n */\nexport var IMAGE_DECODE = typeof Image !== 'undefined' && Image.prototype.decode;\n/**\n * @type {boolean}\n */\nexport var PASSIVE_EVENT_LISTENERS = (function () {\n    var passive = false;\n    try {\n        var options = Object.defineProperty({}, 'passive', {\n            get: function () {\n                passive = true;\n            },\n        });\n        window.addEventListener('_', null, options);\n        window.removeEventListener('_', null, options);\n    }\n    catch (error) {\n        // passive not supported\n    }\n    return passive;\n})();\n//# sourceMappingURL=has.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/MultiLineString\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport LineString from './LineString.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { arrayMaxSquaredDelta, assignClosestArrayPoint } from './flat/closest.js';\nimport { closestSquaredDistanceXY } from '../extent.js';\nimport { deflateCoordinatesArray } from './flat/deflate.js';\nimport { douglasPeuckerArray } from './flat/simplify.js';\nimport { extend } from '../array.js';\nimport { inflateCoordinatesArray } from './flat/inflate.js';\nimport { interpolatePoint, lineStringsCoordinateAtM, } from './flat/interpolate.js';\nimport { intersectsLineStringArray } from './flat/intersectsextent.js';\n/**\n * @classdesc\n * Multi-linestring geometry.\n *\n * @api\n */\nvar MultiLineString = /** @class */ (function (_super) {\n    __extends(MultiLineString, _super);\n    /**\n     * @param {Array<Array<import(\"../coordinate.js\").Coordinate>|LineString>|Array<number>} coordinates\n     *     Coordinates or LineString geometries. (For internal use, flat coordinates in\n     *     combination with `opt_layout` and `opt_ends` are also accepted.)\n     * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n     * @param {Array<number>} [opt_ends] Flat coordinate ends for internal use.\n     */\n    function MultiLineString(coordinates, opt_layout, opt_ends) {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {Array<number>}\n         * @private\n         */\n        _this.ends_ = [];\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDelta_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDeltaRevision_ = -1;\n        if (Array.isArray(coordinates[0])) {\n            _this.setCoordinates(\n            /** @type {Array<Array<import(\"../coordinate.js\").Coordinate>>} */ (coordinates), opt_layout);\n        }\n        else if (opt_layout !== undefined && opt_ends) {\n            _this.setFlatCoordinates(opt_layout, \n            /** @type {Array<number>} */ (coordinates));\n            _this.ends_ = opt_ends;\n        }\n        else {\n            var layout = _this.getLayout();\n            var lineStrings = /** @type {Array<LineString>} */ (coordinates);\n            var flatCoordinates = [];\n            var ends = [];\n            for (var i = 0, ii = lineStrings.length; i < ii; ++i) {\n                var lineString = lineStrings[i];\n                if (i === 0) {\n                    layout = lineString.getLayout();\n                }\n                extend(flatCoordinates, lineString.getFlatCoordinates());\n                ends.push(flatCoordinates.length);\n            }\n            _this.setFlatCoordinates(layout, flatCoordinates);\n            _this.ends_ = ends;\n        }\n        return _this;\n    }\n    /**\n     * Append the passed linestring to the multilinestring.\n     * @param {LineString} lineString LineString.\n     * @api\n     */\n    MultiLineString.prototype.appendLineString = function (lineString) {\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = lineString.getFlatCoordinates().slice();\n        }\n        else {\n            extend(this.flatCoordinates, lineString.getFlatCoordinates().slice());\n        }\n        this.ends_.push(this.flatCoordinates.length);\n        this.changed();\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!MultiLineString} Clone.\n     * @api\n     */\n    MultiLineString.prototype.clone = function () {\n        var multiLineString = new MultiLineString(this.flatCoordinates.slice(), this.layout, this.ends_.slice());\n        multiLineString.applyProperties(this);\n        return multiLineString;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    MultiLineString.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            return minSquaredDistance;\n        }\n        if (this.maxDeltaRevision_ != this.getRevision()) {\n            this.maxDelta_ = Math.sqrt(arrayMaxSquaredDelta(this.flatCoordinates, 0, this.ends_, this.stride, 0));\n            this.maxDeltaRevision_ = this.getRevision();\n        }\n        return assignClosestArrayPoint(this.flatCoordinates, 0, this.ends_, this.stride, this.maxDelta_, false, x, y, closestPoint, minSquaredDistance);\n    };\n    /**\n     * Returns the coordinate at `m` using linear interpolation, or `null` if no\n     * such coordinate exists.\n     *\n     * `opt_extrapolate` controls extrapolation beyond the range of Ms in the\n     * MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first\n     * M will return the first coordinate and Ms greater than the last M will\n     * return the last coordinate.\n     *\n     * `opt_interpolate` controls interpolation between consecutive LineStrings\n     * within the MultiLineString. If `opt_interpolate` is `true` the coordinates\n     * will be linearly interpolated between the last coordinate of one LineString\n     * and the first coordinate of the next LineString.  If `opt_interpolate` is\n     * `false` then the function will return `null` for Ms falling between\n     * LineStrings.\n     *\n     * @param {number} m M.\n     * @param {boolean} [opt_extrapolate] Extrapolate. Default is `false`.\n     * @param {boolean} [opt_interpolate] Interpolate. Default is `false`.\n     * @return {import(\"../coordinate.js\").Coordinate} Coordinate.\n     * @api\n     */\n    MultiLineString.prototype.getCoordinateAtM = function (m, opt_extrapolate, opt_interpolate) {\n        if ((this.layout != GeometryLayout.XYM &&\n            this.layout != GeometryLayout.XYZM) ||\n            this.flatCoordinates.length === 0) {\n            return null;\n        }\n        var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;\n        var interpolate = opt_interpolate !== undefined ? opt_interpolate : false;\n        return lineStringsCoordinateAtM(this.flatCoordinates, 0, this.ends_, this.stride, m, extrapolate, interpolate);\n    };\n    /**\n     * Return the coordinates of the multilinestring.\n     * @return {Array<Array<import(\"../coordinate.js\").Coordinate>>} Coordinates.\n     * @api\n     */\n    MultiLineString.prototype.getCoordinates = function () {\n        return inflateCoordinatesArray(this.flatCoordinates, 0, this.ends_, this.stride);\n    };\n    /**\n     * @return {Array<number>} Ends.\n     */\n    MultiLineString.prototype.getEnds = function () {\n        return this.ends_;\n    };\n    /**\n     * Return the linestring at the specified index.\n     * @param {number} index Index.\n     * @return {LineString} LineString.\n     * @api\n     */\n    MultiLineString.prototype.getLineString = function (index) {\n        if (index < 0 || this.ends_.length <= index) {\n            return null;\n        }\n        return new LineString(this.flatCoordinates.slice(index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]), this.layout);\n    };\n    /**\n     * Return the linestrings of this multilinestring.\n     * @return {Array<LineString>} LineStrings.\n     * @api\n     */\n    MultiLineString.prototype.getLineStrings = function () {\n        var flatCoordinates = this.flatCoordinates;\n        var ends = this.ends_;\n        var layout = this.layout;\n        /** @type {Array<LineString>} */\n        var lineStrings = [];\n        var offset = 0;\n        for (var i = 0, ii = ends.length; i < ii; ++i) {\n            var end = ends[i];\n            var lineString = new LineString(flatCoordinates.slice(offset, end), layout);\n            lineStrings.push(lineString);\n            offset = end;\n        }\n        return lineStrings;\n    };\n    /**\n     * @return {Array<number>} Flat midpoints.\n     */\n    MultiLineString.prototype.getFlatMidpoints = function () {\n        var midpoints = [];\n        var flatCoordinates = this.flatCoordinates;\n        var offset = 0;\n        var ends = this.ends_;\n        var stride = this.stride;\n        for (var i = 0, ii = ends.length; i < ii; ++i) {\n            var end = ends[i];\n            var midpoint = interpolatePoint(flatCoordinates, offset, end, stride, 0.5);\n            extend(midpoints, midpoint);\n            offset = end;\n        }\n        return midpoints;\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {MultiLineString} Simplified MultiLineString.\n     * @protected\n     */\n    MultiLineString.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n        var simplifiedFlatCoordinates = [];\n        var simplifiedEnds = [];\n        simplifiedFlatCoordinates.length = douglasPeuckerArray(this.flatCoordinates, 0, this.ends_, this.stride, squaredTolerance, simplifiedFlatCoordinates, 0, simplifiedEnds);\n        return new MultiLineString(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEnds);\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    MultiLineString.prototype.getType = function () {\n        return GeometryType.MULTI_LINE_STRING;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    MultiLineString.prototype.intersectsExtent = function (extent) {\n        return intersectsLineStringArray(this.flatCoordinates, 0, this.ends_, this.stride, extent);\n    };\n    /**\n     * Set the coordinates of the multilinestring.\n     * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>} coordinates Coordinates.\n     * @param {GeometryLayout} [opt_layout] Layout.\n     * @api\n     */\n    MultiLineString.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, coordinates, 2);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        var ends = deflateCoordinatesArray(this.flatCoordinates, 0, coordinates, this.stride, this.ends_);\n        this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n        this.changed();\n    };\n    return MultiLineString;\n}(SimpleGeometry));\nexport default MultiLineString;\n//# sourceMappingURL=MultiLineString.js.map","/**\n * @module ol/style/Fill\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [color=null] A color, gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.\n * Default null; if null, the Canvas/renderer default black will be used.\n */\n/**\n * @classdesc\n * Set fill style for vector features.\n * @api\n */\nvar Fill = /** @class */ (function () {\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function Fill(opt_options) {\n        var options = opt_options || {};\n        /**\n         * @private\n         * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike}\n         */\n        this.color_ = options.color !== undefined ? options.color : null;\n    }\n    /**\n     * Clones the style. The color is not cloned if it is an {@link module:ol/colorlike~ColorLike}.\n     * @return {Fill} The cloned style.\n     * @api\n     */\n    Fill.prototype.clone = function () {\n        var color = this.getColor();\n        return new Fill({\n            color: Array.isArray(color) ? color.slice() : color || undefined,\n        });\n    };\n    /**\n     * Get the fill color.\n     * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} Color.\n     * @api\n     */\n    Fill.prototype.getColor = function () {\n        return this.color_;\n    };\n    /**\n     * Set the color.\n     *\n     * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} color Color.\n     * @api\n     */\n    Fill.prototype.setColor = function (color) {\n        this.color_ = color;\n    };\n    return Fill;\n}());\nexport default Fill;\n//# sourceMappingURL=Fill.js.map","/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n */\nvar earthRadius = 6371008.8;\n\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n */\nvar factors = {\n    meters: earthRadius,\n    metres: earthRadius,\n    millimeters: earthRadius * 1000,\n    millimetres: earthRadius * 1000,\n    centimeters: earthRadius * 100,\n    centimetres: earthRadius * 100,\n    kilometers: earthRadius / 1000,\n    kilometres: earthRadius / 1000,\n    miles: earthRadius / 1609.344,\n    nauticalmiles: earthRadius / 1852,\n    inches: earthRadius * 39.370,\n    yards: earthRadius / 1.0936,\n    feet: earthRadius * 3.28084,\n    radians: 1,\n    degrees: earthRadius / 111325,\n};\n\n/**\n * Units of measurement factors based on 1 meter.\n */\nvar unitsFactors = {\n    meters: 1,\n    metres: 1,\n    millimeters: 1000,\n    millimetres: 1000,\n    centimeters: 100,\n    centimetres: 100,\n    kilometers: 1 / 1000,\n    kilometres: 1 / 1000,\n    miles: 1 / 1609.344,\n    nauticalmiles: 1 / 1852,\n    inches: 39.370,\n    yards: 1 / 1.0936,\n    feet: 3.28084,\n    radians: 1 / earthRadius,\n    degrees: 1 / 111325,\n};\n\n/**\n * Area of measurement factors based on 1 square meter.\n */\nvar areaFactors = {\n    meters: 1,\n    metres: 1,\n    millimeters: 1000000,\n    millimetres: 1000000,\n    centimeters: 10000,\n    centimetres: 10000,\n    kilometers: 0.000001,\n    kilometres: 0.000001,\n    acres: 0.000247105,\n    miles: 3.86e-7,\n    yards: 1.195990046,\n    feet: 10.763910417,\n    inches: 1550.003100006\n};\n\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n *   \"type\": \"Point\",\n *   \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nfunction feature(geometry, properties, options) {\n    // Optional Parameters\n    options = options || {};\n    if (!isObject(options)) throw new Error('options is invalid');\n    var bbox = options.bbox;\n    var id = options.id;\n\n    // Validation\n    if (geometry === undefined) throw new Error('geometry is required');\n    if (properties && properties.constructor !== Object) throw new Error('properties must be an Object');\n    if (bbox) validateBBox(bbox);\n    if (id) validateId(id);\n\n    // Main\n    var feat = {type: 'Feature'};\n    if (id) feat.id = id;\n    if (bbox) feat.bbox = bbox;\n    feat.properties = properties || {};\n    feat.geometry = geometry;\n    return feat;\n}\n\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<number>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Geometry\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = 'Point';\n * var coordinates = [110, 50];\n *\n * var geometry = turf.geometry(type, coordinates);\n *\n * //=geometry\n */\nfunction geometry(type, coordinates, options) {\n    // Optional Parameters\n    options = options || {};\n    if (!isObject(options)) throw new Error('options is invalid');\n    var bbox = options.bbox;\n\n    // Validation\n    if (!type) throw new Error('type is required');\n    if (!coordinates) throw new Error('coordinates is required');\n    if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');\n    if (bbox) validateBBox(bbox);\n\n    // Main\n    var geom;\n    switch (type) {\n    case 'Point': geom = point(coordinates).geometry; break;\n    case 'LineString': geom = lineString(coordinates).geometry; break;\n    case 'Polygon': geom = polygon(coordinates).geometry; break;\n    case 'MultiPoint': geom = multiPoint(coordinates).geometry; break;\n    case 'MultiLineString': geom = multiLineString(coordinates).geometry; break;\n    case 'MultiPolygon': geom = multiPolygon(coordinates).geometry; break;\n    default: throw new Error(type + ' is invalid');\n    }\n    if (bbox) geom.bbox = bbox;\n    return geom;\n}\n\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nfunction point(coordinates, properties, options) {\n    if (!coordinates) throw new Error('coordinates is required');\n    if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');\n    if (coordinates.length < 2) throw new Error('coordinates must be at least 2 numbers long');\n    if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) throw new Error('coordinates must contain numbers');\n\n    return feature({\n        type: 'Point',\n        coordinates: coordinates\n    }, properties, options);\n}\n\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n *   [-75, 39],\n *   [-80, 45],\n *   [-78, 50]\n * ]);\n *\n * //=points\n */\nfunction points(coordinates, properties, options) {\n    if (!coordinates) throw new Error('coordinates is required');\n    if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');\n\n    return featureCollection(coordinates.map(function (coords) {\n        return point(coords, properties);\n    }), options);\n}\n\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nfunction polygon(coordinates, properties, options) {\n    if (!coordinates) throw new Error('coordinates is required');\n\n    for (var i = 0; i < coordinates.length; i++) {\n        var ring = coordinates[i];\n        if (ring.length < 4) {\n            throw new Error('Each LinearRing of a Polygon must have 4 or more Positions.');\n        }\n        for (var j = 0; j < ring[ring.length - 1].length; j++) {\n            // Check if first point of Polygon contains two numbers\n            if (i === 0 && j === 0 && !isNumber(ring[0][0]) || !isNumber(ring[0][1])) throw new Error('coordinates must contain numbers');\n            if (ring[ring.length - 1][j] !== ring[0][j]) {\n                throw new Error('First and last Position are not equivalent.');\n            }\n        }\n    }\n\n    return feature({\n        type: 'Polygon',\n        coordinates: coordinates\n    }, properties, options);\n}\n\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n *   [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n *   [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nfunction polygons(coordinates, properties, options) {\n    if (!coordinates) throw new Error('coordinates is required');\n    if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');\n\n    return featureCollection(coordinates.map(function (coords) {\n        return polygon(coords, properties);\n    }), options);\n}\n\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nfunction lineString(coordinates, properties, options) {\n    if (!coordinates) throw new Error('coordinates is required');\n    if (coordinates.length < 2) throw new Error('coordinates must be an array of two or more positions');\n    // Check if first point of LineString contains two numbers\n    if (!isNumber(coordinates[0][1]) || !isNumber(coordinates[0][1])) throw new Error('coordinates must contain numbers');\n\n    return feature({\n        type: 'LineString',\n        coordinates: coordinates\n    }, properties, options);\n}\n\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<number>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n *   [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n *   [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nfunction lineStrings(coordinates, properties, options) {\n    if (!coordinates) throw new Error('coordinates is required');\n    if (!Array.isArray(coordinates)) throw new Error('coordinates must be an Array');\n\n    return featureCollection(coordinates.map(function (coords) {\n        return lineString(coords, properties);\n    }), options);\n}\n\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n *   locationA,\n *   locationB,\n *   locationC\n * ]);\n *\n * //=collection\n */\nfunction featureCollection(features, options) {\n    // Optional Parameters\n    options = options || {};\n    if (!isObject(options)) throw new Error('options is invalid');\n    var bbox = options.bbox;\n    var id = options.id;\n\n    // Validation\n    if (!features) throw new Error('No features passed');\n    if (!Array.isArray(features)) throw new Error('features must be an Array');\n    if (bbox) validateBBox(bbox);\n    if (id) validateId(id);\n\n    // Main\n    var fc = {type: 'FeatureCollection'};\n    if (id) fc.id = id;\n    if (bbox) fc.bbox = bbox;\n    fc.features = features;\n    return fc;\n}\n\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nfunction multiLineString(coordinates, properties, options) {\n    if (!coordinates) throw new Error('coordinates is required');\n\n    return feature({\n        type: 'MultiLineString',\n        coordinates: coordinates\n    }, properties, options);\n}\n\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nfunction multiPoint(coordinates, properties, options) {\n    if (!coordinates) throw new Error('coordinates is required');\n\n    return feature({\n        type: 'MultiPoint',\n        coordinates: coordinates\n    }, properties, options);\n}\n\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nfunction multiPolygon(coordinates, properties, options) {\n    if (!coordinates) throw new Error('coordinates is required');\n\n    return feature({\n        type: 'MultiPolygon',\n        coordinates: coordinates\n    }, properties, options);\n}\n\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = {\n *     \"type\": \"Point\",\n *       \"coordinates\": [100, 0]\n *     };\n * var line = {\n *     \"type\": \"LineString\",\n *     \"coordinates\": [ [101, 0], [102, 1] ]\n *   };\n * var collection = turf.geometryCollection([pt, line]);\n *\n * //=collection\n */\nfunction geometryCollection(geometries, properties, options) {\n    if (!geometries) throw new Error('geometries is required');\n    if (!Array.isArray(geometries)) throw new Error('geometries must be an Array');\n\n    return feature({\n        type: 'GeometryCollection',\n        geometries: geometries\n    }, properties, options);\n}\n\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nfunction round(num, precision) {\n    if (num === undefined || num === null || isNaN(num)) throw new Error('num is required');\n    if (precision && !(precision >= 0)) throw new Error('precision must be a positive number');\n    var multiplier = Math.pow(10, precision || 0);\n    return Math.round(num * multiplier) / multiplier;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.\n * @returns {number} distance\n */\nfunction radiansToLength(radians, units) {\n    if (radians === undefined || radians === null) throw new Error('radians is required');\n\n    if (units && typeof units !== 'string') throw new Error('units must be a string');\n    var factor = factors[units || 'kilometers'];\n    if (!factor) throw new Error(units + ' units is invalid');\n    return radians * factor;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.\n * @returns {number} radians\n */\nfunction lengthToRadians(distance, units) {\n    if (distance === undefined || distance === null) throw new Error('distance is required');\n\n    if (units && typeof units !== 'string') throw new Error('units must be a string');\n    var factor = factors[units || 'kilometers'];\n    if (!factor) throw new Error(units + ' units is invalid');\n    return distance / factor;\n}\n\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units='kilometers'] can be degrees, radians, miles, or kilometers inches, yards, metres, meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nfunction lengthToDegrees(distance, units) {\n    return radiansToDegrees(lengthToRadians(distance, units));\n}\n\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nfunction bearingToAzimuth(bearing) {\n    if (bearing === null || bearing === undefined) throw new Error('bearing is required');\n\n    var angle = bearing % 360;\n    if (angle < 0) angle += 360;\n    return angle;\n}\n\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nfunction radiansToDegrees(radians) {\n    if (radians === null || radians === undefined) throw new Error('radians is required');\n\n    var degrees = radians % (2 * Math.PI);\n    return degrees * 180 / Math.PI;\n}\n\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nfunction degreesToRadians(degrees) {\n    if (degrees === null || degrees === undefined) throw new Error('degrees is required');\n\n    var radians = degrees % 360;\n    return radians * Math.PI / 180;\n}\n\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {string} originalUnit of the length\n * @param {string} [finalUnit='kilometers'] returned unit\n * @returns {number} the converted length\n */\nfunction convertLength(length, originalUnit, finalUnit) {\n    if (length === null || length === undefined) throw new Error('length is required');\n    if (!(length >= 0)) throw new Error('length must be a positive number');\n\n    return radiansToLength(lengthToRadians(length, originalUnit), finalUnit || 'kilometers');\n}\n\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches\n * @param {number} area to be converted\n * @param {string} [originalUnit='meters'] of the distance\n * @param {string} [finalUnit='kilometers'] returned unit\n * @returns {number} the converted distance\n */\nfunction convertArea(area, originalUnit, finalUnit) {\n    if (area === null || area === undefined) throw new Error('area is required');\n    if (!(area >= 0)) throw new Error('area must be a positive number');\n\n    var startFactor = areaFactors[originalUnit || 'meters'];\n    if (!startFactor) throw new Error('invalid original units');\n\n    var finalFactor = areaFactors[finalUnit || 'kilometers'];\n    if (!finalFactor) throw new Error('invalid final units');\n\n    return (area / startFactor) * finalFactor;\n}\n\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nfunction isNumber(num) {\n    return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nfunction isObject(input) {\n    return (!!input) && (input.constructor === Object);\n}\n\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nfunction validateBBox(bbox) {\n    if (!bbox) throw new Error('bbox is required');\n    if (!Array.isArray(bbox)) throw new Error('bbox must be an Array');\n    if (bbox.length !== 4 && bbox.length !== 6) throw new Error('bbox must be an Array of 4 or 6 numbers');\n    bbox.forEach(function (num) {\n        if (!isNumber(num)) throw new Error('bbox must only contain numbers');\n    });\n}\n\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nfunction validateId(id) {\n    if (!id) throw new Error('id is required');\n    if (['string', 'number'].indexOf(typeof id) === -1) throw new Error('id must be a number or a string');\n}\n\n// Deprecated methods\nfunction radians2degrees() {\n    throw new Error('method has been renamed to `radiansToDegrees`');\n}\n\nfunction degrees2radians() {\n    throw new Error('method has been renamed to `degreesToRadians`');\n}\n\nfunction distanceToDegrees() {\n    throw new Error('method has been renamed to `lengthToDegrees`');\n}\n\nfunction distanceToRadians() {\n    throw new Error('method has been renamed to `lengthToRadians`');\n}\n\nfunction radiansToDistance() {\n    throw new Error('method has been renamed to `radiansToLength`');\n}\n\nfunction bearingToAngle() {\n    throw new Error('method has been renamed to `bearingToAzimuth`');\n}\n\nfunction convertDistance() {\n    throw new Error('method has been renamed to `convertLength`');\n}\n\nexport { earthRadius, factors, unitsFactors, areaFactors, feature, geometry, point, points, polygon, polygons, lineString, lineStrings, featureCollection, multiLineString, multiPoint, multiPolygon, geometryCollection, round, radiansToLength, lengthToRadians, lengthToDegrees, bearingToAzimuth, radiansToDegrees, degreesToRadians, convertLength, convertArea, isNumber, isObject, validateBBox, validateId, radians2degrees, degrees2radians, distanceToDegrees, distanceToRadians, radiansToDistance, bearingToAngle, convertDistance };\n","/**\n * @module ol/style/Stroke\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [color] A color, gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.\n * Default null; if null, the Canvas/renderer default black will be used.\n * @property {CanvasLineCap} [lineCap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {CanvasLineJoin} [lineJoin='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {Array<number>} [lineDash] Line dash pattern. Default is `null` (no dash).\n * Please note that Internet Explorer 10 and lower do not support the `setLineDash` method on\n * the `CanvasRenderingContext2D` and therefore this option will have no visual effect in these browsers.\n * @property {number} [lineDashOffset=0] Line dash offset.\n * @property {number} [miterLimit=10] Miter limit.\n * @property {number} [width] Width.\n */\n/**\n * @classdesc\n * Set stroke style for vector features.\n * Note that the defaults given are the Canvas defaults, which will be used if\n * option is not defined. The `get` functions return whatever was entered in\n * the options; they will not return the default.\n * @api\n */\nvar Stroke = /** @class */ (function () {\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function Stroke(opt_options) {\n        var options = opt_options || {};\n        /**\n         * @private\n         * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike}\n         */\n        this.color_ = options.color !== undefined ? options.color : null;\n        /**\n         * @private\n         * @type {CanvasLineCap|undefined}\n         */\n        this.lineCap_ = options.lineCap;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.lineDash_ = options.lineDash !== undefined ? options.lineDash : null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.lineDashOffset_ = options.lineDashOffset;\n        /**\n         * @private\n         * @type {CanvasLineJoin|undefined}\n         */\n        this.lineJoin_ = options.lineJoin;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.miterLimit_ = options.miterLimit;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.width_ = options.width;\n    }\n    /**\n     * Clones the style.\n     * @return {Stroke} The cloned style.\n     * @api\n     */\n    Stroke.prototype.clone = function () {\n        var color = this.getColor();\n        return new Stroke({\n            color: Array.isArray(color) ? color.slice() : color || undefined,\n            lineCap: this.getLineCap(),\n            lineDash: this.getLineDash() ? this.getLineDash().slice() : undefined,\n            lineDashOffset: this.getLineDashOffset(),\n            lineJoin: this.getLineJoin(),\n            miterLimit: this.getMiterLimit(),\n            width: this.getWidth(),\n        });\n    };\n    /**\n     * Get the stroke color.\n     * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} Color.\n     * @api\n     */\n    Stroke.prototype.getColor = function () {\n        return this.color_;\n    };\n    /**\n     * Get the line cap type for the stroke.\n     * @return {CanvasLineCap|undefined} Line cap.\n     * @api\n     */\n    Stroke.prototype.getLineCap = function () {\n        return this.lineCap_;\n    };\n    /**\n     * Get the line dash style for the stroke.\n     * @return {Array<number>} Line dash.\n     * @api\n     */\n    Stroke.prototype.getLineDash = function () {\n        return this.lineDash_;\n    };\n    /**\n     * Get the line dash offset for the stroke.\n     * @return {number|undefined} Line dash offset.\n     * @api\n     */\n    Stroke.prototype.getLineDashOffset = function () {\n        return this.lineDashOffset_;\n    };\n    /**\n     * Get the line join type for the stroke.\n     * @return {CanvasLineJoin|undefined} Line join.\n     * @api\n     */\n    Stroke.prototype.getLineJoin = function () {\n        return this.lineJoin_;\n    };\n    /**\n     * Get the miter limit for the stroke.\n     * @return {number|undefined} Miter limit.\n     * @api\n     */\n    Stroke.prototype.getMiterLimit = function () {\n        return this.miterLimit_;\n    };\n    /**\n     * Get the stroke width.\n     * @return {number|undefined} Width.\n     * @api\n     */\n    Stroke.prototype.getWidth = function () {\n        return this.width_;\n    };\n    /**\n     * Set the color.\n     *\n     * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} color Color.\n     * @api\n     */\n    Stroke.prototype.setColor = function (color) {\n        this.color_ = color;\n    };\n    /**\n     * Set the line cap.\n     *\n     * @param {CanvasLineCap|undefined} lineCap Line cap.\n     * @api\n     */\n    Stroke.prototype.setLineCap = function (lineCap) {\n        this.lineCap_ = lineCap;\n    };\n    /**\n     * Set the line dash.\n     *\n     * Please note that Internet Explorer 10 and lower [do not support][mdn] the\n     * `setLineDash` method on the `CanvasRenderingContext2D` and therefore this\n     * property will have no visual effect in these browsers.\n     *\n     * [mdn]: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility\n     *\n     * @param {Array<number>} lineDash Line dash.\n     * @api\n     */\n    Stroke.prototype.setLineDash = function (lineDash) {\n        this.lineDash_ = lineDash;\n    };\n    /**\n     * Set the line dash offset.\n     *\n     * @param {number|undefined} lineDashOffset Line dash offset.\n     * @api\n     */\n    Stroke.prototype.setLineDashOffset = function (lineDashOffset) {\n        this.lineDashOffset_ = lineDashOffset;\n    };\n    /**\n     * Set the line join.\n     *\n     * @param {CanvasLineJoin|undefined} lineJoin Line join.\n     * @api\n     */\n    Stroke.prototype.setLineJoin = function (lineJoin) {\n        this.lineJoin_ = lineJoin;\n    };\n    /**\n     * Set the miter limit.\n     *\n     * @param {number|undefined} miterLimit Miter limit.\n     * @api\n     */\n    Stroke.prototype.setMiterLimit = function (miterLimit) {\n        this.miterLimit_ = miterLimit;\n    };\n    /**\n     * Set the width.\n     *\n     * @param {number|undefined} width Width.\n     * @api\n     */\n    Stroke.prototype.setWidth = function (width) {\n        this.width_ = width;\n    };\n    return Stroke;\n}());\nexport default Stroke;\n//# sourceMappingURL=Stroke.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/SimpleGeometry\n */\nimport Geometry from './Geometry.js';\nimport GeometryLayout from './GeometryLayout.js';\nimport { abstract } from '../util.js';\nimport { createOrUpdateFromFlatCoordinates, getCenter } from '../extent.js';\nimport { rotate, scale, transform2D, translate } from './flat/transform.js';\n/**\n * @classdesc\n * Abstract base class; only used for creating subclasses; do not instantiate\n * in apps, as cannot be rendered.\n *\n * @abstract\n * @api\n */\nvar SimpleGeometry = /** @class */ (function (_super) {\n    __extends(SimpleGeometry, _super);\n    function SimpleGeometry() {\n        var _this = _super.call(this) || this;\n        /**\n         * @protected\n         * @type {import(\"./GeometryLayout.js\").default}\n         */\n        _this.layout = GeometryLayout.XY;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.stride = 2;\n        /**\n         * @protected\n         * @type {Array<number>}\n         */\n        _this.flatCoordinates = null;\n        return _this;\n    }\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @protected\n     * @return {import(\"../extent.js\").Extent} extent Extent.\n     */\n    SimpleGeometry.prototype.computeExtent = function (extent) {\n        return createOrUpdateFromFlatCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, extent);\n    };\n    /**\n     * @abstract\n     * @return {Array<*>} Coordinates.\n     */\n    SimpleGeometry.prototype.getCoordinates = function () {\n        return abstract();\n    };\n    /**\n     * Return the first coordinate of the geometry.\n     * @return {import(\"../coordinate.js\").Coordinate} First coordinate.\n     * @api\n     */\n    SimpleGeometry.prototype.getFirstCoordinate = function () {\n        return this.flatCoordinates.slice(0, this.stride);\n    };\n    /**\n     * @return {Array<number>} Flat coordinates.\n     */\n    SimpleGeometry.prototype.getFlatCoordinates = function () {\n        return this.flatCoordinates;\n    };\n    /**\n     * Return the last coordinate of the geometry.\n     * @return {import(\"../coordinate.js\").Coordinate} Last point.\n     * @api\n     */\n    SimpleGeometry.prototype.getLastCoordinate = function () {\n        return this.flatCoordinates.slice(this.flatCoordinates.length - this.stride);\n    };\n    /**\n     * Return the {@link module:ol/geom/GeometryLayout layout} of the geometry.\n     * @return {import(\"./GeometryLayout.js\").default} Layout.\n     * @api\n     */\n    SimpleGeometry.prototype.getLayout = function () {\n        return this.layout;\n    };\n    /**\n     * Create a simplified version of this geometry using the Douglas Peucker algorithm.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {SimpleGeometry} Simplified geometry.\n     */\n    SimpleGeometry.prototype.getSimplifiedGeometry = function (squaredTolerance) {\n        if (this.simplifiedGeometryRevision !== this.getRevision()) {\n            this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n            this.simplifiedGeometryRevision = this.getRevision();\n        }\n        // If squaredTolerance is negative or if we know that simplification will not\n        // have any effect then just return this.\n        if (squaredTolerance < 0 ||\n            (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n                squaredTolerance <= this.simplifiedGeometryMaxMinSquaredTolerance)) {\n            return this;\n        }\n        var simplifiedGeometry = this.getSimplifiedGeometryInternal(squaredTolerance);\n        var simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates();\n        if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) {\n            return simplifiedGeometry;\n        }\n        else {\n            // Simplification did not actually remove any coordinates.  We now know\n            // that any calls to getSimplifiedGeometry with a squaredTolerance less\n            // than or equal to the current squaredTolerance will also not have any\n            // effect.  This allows us to short circuit simplification (saving CPU\n            // cycles) and prevents the cache of simplified geometries from filling\n            // up with useless identical copies of this geometry (saving memory).\n            this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n            return this;\n        }\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {SimpleGeometry} Simplified geometry.\n     * @protected\n     */\n    SimpleGeometry.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n        return this;\n    };\n    /**\n     * @return {number} Stride.\n     */\n    SimpleGeometry.prototype.getStride = function () {\n        return this.stride;\n    };\n    /**\n     * @param {import(\"./GeometryLayout.js\").default} layout Layout.\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     */\n    SimpleGeometry.prototype.setFlatCoordinates = function (layout, flatCoordinates) {\n        this.stride = getStrideForLayout(layout);\n        this.layout = layout;\n        this.flatCoordinates = flatCoordinates;\n    };\n    /**\n     * @abstract\n     * @param {!Array<*>} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n     */\n    SimpleGeometry.prototype.setCoordinates = function (coordinates, opt_layout) {\n        abstract();\n    };\n    /**\n     * @param {import(\"./GeometryLayout.js\").default|undefined} layout Layout.\n     * @param {Array<*>} coordinates Coordinates.\n     * @param {number} nesting Nesting.\n     * @protected\n     */\n    SimpleGeometry.prototype.setLayout = function (layout, coordinates, nesting) {\n        /** @type {number} */\n        var stride;\n        if (layout) {\n            stride = getStrideForLayout(layout);\n        }\n        else {\n            for (var i = 0; i < nesting; ++i) {\n                if (coordinates.length === 0) {\n                    this.layout = GeometryLayout.XY;\n                    this.stride = 2;\n                    return;\n                }\n                else {\n                    coordinates = /** @type {Array} */ (coordinates[0]);\n                }\n            }\n            stride = coordinates.length;\n            layout = getLayoutForStride(stride);\n        }\n        this.layout = layout;\n        this.stride = stride;\n    };\n    /**\n     * Apply a transform function to the coordinates of the geometry.\n     * The geometry is modified in place.\n     * If you do not want the geometry modified in place, first `clone()` it and\n     * then use this function on the clone.\n     * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n     * Called with a flat array of geometry coordinates.\n     * @api\n     */\n    SimpleGeometry.prototype.applyTransform = function (transformFn) {\n        if (this.flatCoordinates) {\n            transformFn(this.flatCoordinates, this.flatCoordinates, this.stride);\n            this.changed();\n        }\n    };\n    /**\n     * Rotate the geometry around a given coordinate. This modifies the geometry\n     * coordinates in place.\n     * @param {number} angle Rotation angle in counter-clockwise radians.\n     * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n     * @api\n     */\n    SimpleGeometry.prototype.rotate = function (angle, anchor) {\n        var flatCoordinates = this.getFlatCoordinates();\n        if (flatCoordinates) {\n            var stride = this.getStride();\n            rotate(flatCoordinates, 0, flatCoordinates.length, stride, angle, anchor, flatCoordinates);\n            this.changed();\n        }\n    };\n    /**\n     * Scale the geometry (with an optional origin).  This modifies the geometry\n     * coordinates in place.\n     * @param {number} sx The scaling factor in the x-direction.\n     * @param {number} [opt_sy] The scaling factor in the y-direction (defaults to sx).\n     * @param {import(\"../coordinate.js\").Coordinate} [opt_anchor] The scale origin (defaults to the center\n     *     of the geometry extent).\n     * @api\n     */\n    SimpleGeometry.prototype.scale = function (sx, opt_sy, opt_anchor) {\n        var sy = opt_sy;\n        if (sy === undefined) {\n            sy = sx;\n        }\n        var anchor = opt_anchor;\n        if (!anchor) {\n            anchor = getCenter(this.getExtent());\n        }\n        var flatCoordinates = this.getFlatCoordinates();\n        if (flatCoordinates) {\n            var stride = this.getStride();\n            scale(flatCoordinates, 0, flatCoordinates.length, stride, sx, sy, anchor, flatCoordinates);\n            this.changed();\n        }\n    };\n    /**\n     * Translate the geometry.  This modifies the geometry coordinates in place.  If\n     * instead you want a new geometry, first `clone()` this geometry.\n     * @param {number} deltaX Delta X.\n     * @param {number} deltaY Delta Y.\n     * @api\n     */\n    SimpleGeometry.prototype.translate = function (deltaX, deltaY) {\n        var flatCoordinates = this.getFlatCoordinates();\n        if (flatCoordinates) {\n            var stride = this.getStride();\n            translate(flatCoordinates, 0, flatCoordinates.length, stride, deltaX, deltaY, flatCoordinates);\n            this.changed();\n        }\n    };\n    return SimpleGeometry;\n}(Geometry));\n/**\n * @param {number} stride Stride.\n * @return {import(\"./GeometryLayout.js\").default} layout Layout.\n */\nfunction getLayoutForStride(stride) {\n    var layout;\n    if (stride == 2) {\n        layout = GeometryLayout.XY;\n    }\n    else if (stride == 3) {\n        layout = GeometryLayout.XYZ;\n    }\n    else if (stride == 4) {\n        layout = GeometryLayout.XYZM;\n    }\n    return /** @type {import(\"./GeometryLayout.js\").default} */ (layout);\n}\n/**\n * @param {import(\"./GeometryLayout.js\").default} layout Layout.\n * @return {number} Stride.\n */\nexport function getStrideForLayout(layout) {\n    var stride;\n    if (layout == GeometryLayout.XY) {\n        stride = 2;\n    }\n    else if (layout == GeometryLayout.XYZ || layout == GeometryLayout.XYM) {\n        stride = 3;\n    }\n    else if (layout == GeometryLayout.XYZM) {\n        stride = 4;\n    }\n    return /** @type {number} */ (stride);\n}\n/**\n * @param {SimpleGeometry} simpleGeometry Simple geometry.\n * @param {import(\"../transform.js\").Transform} transform Transform.\n * @param {Array<number>} [opt_dest] Destination.\n * @return {Array<number>} Transformed flat coordinates.\n */\nexport function transformGeom2D(simpleGeometry, transform, opt_dest) {\n    var flatCoordinates = simpleGeometry.getFlatCoordinates();\n    if (!flatCoordinates) {\n        return null;\n    }\n    else {\n        var stride = simpleGeometry.getStride();\n        return transform2D(flatCoordinates, 0, flatCoordinates.length, stride, transform, opt_dest);\n    }\n}\nexport default SimpleGeometry;\n//# sourceMappingURL=SimpleGeometry.js.map","/**\n * @module ol/geom/flat/transform\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Array<number>} [opt_dest] Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function transform2D(flatCoordinates, offset, end, stride, transform, opt_dest) {\n    var dest = opt_dest ? opt_dest : [];\n    var i = 0;\n    for (var j = offset; j < end; j += stride) {\n        var x = flatCoordinates[j];\n        var y = flatCoordinates[j + 1];\n        dest[i++] = transform[0] * x + transform[2] * y + transform[4];\n        dest[i++] = transform[1] * x + transform[3] * y + transform[5];\n    }\n    if (opt_dest && dest.length != i) {\n        dest.length = i;\n    }\n    return dest;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} angle Angle.\n * @param {Array<number>} anchor Rotation anchor point.\n * @param {Array<number>} [opt_dest] Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function rotate(flatCoordinates, offset, end, stride, angle, anchor, opt_dest) {\n    var dest = opt_dest ? opt_dest : [];\n    var cos = Math.cos(angle);\n    var sin = Math.sin(angle);\n    var anchorX = anchor[0];\n    var anchorY = anchor[1];\n    var i = 0;\n    for (var j = offset; j < end; j += stride) {\n        var deltaX = flatCoordinates[j] - anchorX;\n        var deltaY = flatCoordinates[j + 1] - anchorY;\n        dest[i++] = anchorX + deltaX * cos - deltaY * sin;\n        dest[i++] = anchorY + deltaX * sin + deltaY * cos;\n        for (var k = j + 2; k < j + stride; ++k) {\n            dest[i++] = flatCoordinates[k];\n        }\n    }\n    if (opt_dest && dest.length != i) {\n        dest.length = i;\n    }\n    return dest;\n}\n/**\n * Scale the coordinates.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} sx Scale factor in the x-direction.\n * @param {number} sy Scale factor in the y-direction.\n * @param {Array<number>} anchor Scale anchor point.\n * @param {Array<number>} [opt_dest] Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function scale(flatCoordinates, offset, end, stride, sx, sy, anchor, opt_dest) {\n    var dest = opt_dest ? opt_dest : [];\n    var anchorX = anchor[0];\n    var anchorY = anchor[1];\n    var i = 0;\n    for (var j = offset; j < end; j += stride) {\n        var deltaX = flatCoordinates[j] - anchorX;\n        var deltaY = flatCoordinates[j + 1] - anchorY;\n        dest[i++] = anchorX + sx * deltaX;\n        dest[i++] = anchorY + sy * deltaY;\n        for (var k = j + 2; k < j + stride; ++k) {\n            dest[i++] = flatCoordinates[k];\n        }\n    }\n    if (opt_dest && dest.length != i) {\n        dest.length = i;\n    }\n    return dest;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @param {Array<number>} [opt_dest] Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function translate(flatCoordinates, offset, end, stride, deltaX, deltaY, opt_dest) {\n    var dest = opt_dest ? opt_dest : [];\n    var i = 0;\n    for (var j = offset; j < end; j += stride) {\n        dest[i++] = flatCoordinates[j] + deltaX;\n        dest[i++] = flatCoordinates[j + 1] + deltaY;\n        for (var k = j + 2; k < j + stride; ++k) {\n            dest[i++] = flatCoordinates[k];\n        }\n    }\n    if (opt_dest && dest.length != i) {\n        dest.length = i;\n    }\n    return dest;\n}\n//# sourceMappingURL=transform.js.map","/**\n * @module ol/source/VectorEventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    /**\n     * Triggered when a feature is added to the source.\n     * @event module:ol/source/Vector.VectorSourceEvent#addfeature\n     * @api\n     */\n    ADDFEATURE: 'addfeature',\n    /**\n     * Triggered when a feature is updated.\n     * @event module:ol/source/Vector.VectorSourceEvent#changefeature\n     * @api\n     */\n    CHANGEFEATURE: 'changefeature',\n    /**\n     * Triggered when the clear method is called on the source.\n     * @event module:ol/source/Vector.VectorSourceEvent#clear\n     * @api\n     */\n    CLEAR: 'clear',\n    /**\n     * Triggered when a feature is removed from the source.\n     * See {@link module:ol/source/Vector~VectorSource#clear source.clear()} for exceptions.\n     * @event module:ol/source/Vector.VectorSourceEvent#removefeature\n     * @api\n     */\n    REMOVEFEATURE: 'removefeature',\n    /**\n     * Triggered when features starts loading.\n     * @event module:ol/source/Vector.VectorSourceEvent#featuresloadstart\n     * @api\n     */\n    FEATURESLOADSTART: 'featuresloadstart',\n    /**\n     * Triggered when features finishes loading.\n     * @event module:ol/source/Vector.VectorSourceEvent#featuresloadend\n     * @api\n     */\n    FEATURESLOADEND: 'featuresloadend',\n    /**\n     * Triggered if feature loading results in an error.\n     * @event module:ol/source/Vector.VectorSourceEvent#featuresloaderror\n     * @api\n     */\n    FEATURESLOADERROR: 'featuresloaderror',\n};\n/**\n * @typedef {'addfeature'|'changefeature'|'clear'|'removefeature'|'featuresloadstart'|'featuresloadend'|'featuresloaderror'} VectorSourceEventTypes\n */\n//# sourceMappingURL=VectorEventType.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Vector\n */\nimport BaseVectorLayer from './BaseVector.js';\nimport CanvasVectorLayerRenderer from '../renderer/canvas/VectorLayer.js';\n/**\n * @classdesc\n * Vector data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Vector.js\").default} VectorSourceType\n * @extends {BaseVectorLayer<VectorSourceType>}\n * @api\n */\nvar VectorLayer = /** @class */ (function (_super) {\n    __extends(VectorLayer, _super);\n    /**\n     * @param {import(\"./BaseVector.js\").Options<VectorSourceType>} [opt_options] Options.\n     */\n    function VectorLayer(opt_options) {\n        return _super.call(this, opt_options) || this;\n    }\n    /**\n     * Create a renderer for this layer.\n     * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n     */\n    VectorLayer.prototype.createRenderer = function () {\n        return new CanvasVectorLayerRenderer(this);\n    };\n    return VectorLayer;\n}(BaseVectorLayer));\nexport default VectorLayer;\n//# sourceMappingURL=Vector.js.map","/**\n * @module ol/loadingstrategy\n */\n/**\n * Strategy function for loading all features with a single request.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array<import(\"./extent.js\").Extent>} Extents.\n * @api\n */\nexport function all(extent, resolution) {\n    return [[-Infinity, -Infinity, Infinity, Infinity]];\n}\n/**\n * Strategy function for loading features based on the view's extent and\n * resolution.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array<import(\"./extent.js\").Extent>} Extents.\n * @api\n */\nexport function bbox(extent, resolution) {\n    return [extent];\n}\n/**\n * Creates a strategy function for loading features based on a tile grid.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {function(import(\"./extent.js\").Extent, number): Array<import(\"./extent.js\").Extent>} Loading strategy.\n * @api\n */\nexport function tile(tileGrid) {\n    return (\n    /**\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @return {Array<import(\"./extent.js\").Extent>} Extents.\n     */\n    function (extent, resolution) {\n        var z = tileGrid.getZForResolution(resolution);\n        var tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n        /** @type {Array<import(\"./extent.js\").Extent>} */\n        var extents = [];\n        /** @type {import(\"./tilecoord.js\").TileCoord} */\n        var tileCoord = [z, 0, 0];\n        for (tileCoord[1] = tileRange.minX; tileCoord[1] <= tileRange.maxX; ++tileCoord[1]) {\n            for (tileCoord[2] = tileRange.minY; tileCoord[2] <= tileRange.maxY; ++tileCoord[2]) {\n                extents.push(tileGrid.getTileCoordExtent(tileCoord));\n            }\n        }\n        return extents;\n    });\n}\n//# sourceMappingURL=loadingstrategy.js.map","/**\n * @module ol/source/Vector\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport RBush from '../structs/RBush.js';\nimport Source from './Source.js';\nimport SourceState from './State.js';\nimport VectorEventType from './VectorEventType.js';\nimport { TRUE, VOID } from '../functions.js';\nimport { all as allStrategy } from '../loadingstrategy.js';\nimport { assert } from '../asserts.js';\nimport { containsExtent, equals } from '../extent.js';\nimport { extend } from '../array.js';\nimport { getUid } from '../util.js';\nimport { getValues, isEmpty } from '../obj.js';\nimport { listen, unlistenByKey } from '../events.js';\nimport { xhr } from '../featureloader.js';\n/**\n * A function that takes an {@link module:ol/extent~Extent} and a resolution as arguments, and\n * returns an array of {@link module:ol/extent~Extent} with the extents to load. Usually this\n * is one of the standard {@link module:ol/loadingstrategy} strategies.\n *\n * @typedef {function(import(\"../extent.js\").Extent, number): Array<import(\"../extent.js\").Extent>} LoadingStrategy\n * @api\n */\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Vector} instances are instances of this\n * type.\n * @template {import(\"../geom/Geometry.js\").default} Geometry\n */\nvar VectorSourceEvent = /** @class */ (function (_super) {\n    __extends(VectorSourceEvent, _super);\n    /**\n     * @param {string} type Type.\n     * @param {import(\"../Feature.js\").default<Geometry>} [opt_feature] Feature.\n     * @param {Array<import(\"../Feature.js\").default<Geometry>>} [opt_features] Features.\n     */\n    function VectorSourceEvent(type, opt_feature, opt_features) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The added or removed feature for the `ADDFEATURE` and `REMOVEFEATURE` events, `undefined` otherwise.\n         * @type {import(\"../Feature.js\").default<Geometry>|undefined}\n         * @api\n         */\n        _this.feature = opt_feature;\n        /**\n         * The loaded features for the `FEATURESLOADED` event, `undefined` otherwise.\n         * @type {Array<import(\"../Feature.js\").default<Geometry>>|undefined}\n         * @api\n         */\n        _this.features = opt_features;\n        return _this;\n    }\n    return VectorSourceEvent;\n}(Event));\nexport { VectorSourceEvent };\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types, import(\"../Object\").ObjectEvent, Return> &\n *   import(\"../Observable\").OnSignature<import(\"./VectorEventType\").VectorSourceEventTypes, VectorSourceEvent, Return> &\n *   import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"../ObjectEventType\").Types|\n *     import(\"./VectorEventType\").VectorSourceEventTypes, Return>} VectorSourceOnSignature\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {Array<import(\"../Feature.js\").default>|Collection<import(\"../Feature.js\").default>} [features]\n * Features. If provided as {@link module:ol/Collection}, the features in the source\n * and the collection will stay in sync.\n * @property {import(\"../format/Feature.js\").default} [format] The feature format used by the XHR\n * feature loader when `url` is set. Required if `url` is set, otherwise ignored.\n * @property {import(\"../featureloader.js\").FeatureLoader} [loader]\n * The loader function used to load features, from a remote source for example.\n * If this is not set and `url` is set, the source will create and use an XHR\n * feature loader. The `'featuresloadend'` and `'featuresloaderror'` events\n * will only fire if the `success` and `failure` callbacks are used.\n *\n * Example:\n *\n * ```js\n * import {Vector} from 'ol/source';\n * import {GeoJSON} from 'ol/format';\n * import {bbox} from 'ol/loadingstrategy';\n *\n * var vectorSource = new Vector({\n *   format: new GeoJSON(),\n *   loader: function(extent, resolution, projection, success, failure) {\n *      var proj = projection.getCode();\n *      var url = 'https://ahocevar.com/geoserver/wfs?service=WFS&' +\n *          'version=1.1.0&request=GetFeature&typename=osm:water_areas&' +\n *          'outputFormat=application/json&srsname=' + proj + '&' +\n *          'bbox=' + extent.join(',') + ',' + proj;\n *      var xhr = new XMLHttpRequest();\n *      xhr.open('GET', url);\n *      var onError = function() {\n *        vectorSource.removeLoadedExtent(extent);\n *        failure();\n *      }\n *      xhr.onerror = onError;\n *      xhr.onload = function() {\n *        if (xhr.status == 200) {\n *          var features = vectorSource.getFormat().readFeatures(xhr.responseText);\n *          vectorSource.addFeatures(features);\n *          success(features);\n *        } else {\n *          onError();\n *        }\n *      }\n *      xhr.send();\n *    },\n *    strategy: bbox\n *  });\n * ```\n * @property {boolean} [overlaps=true] This source may have overlapping geometries.\n * Setting this to `false` (e.g. for sources with polygons that represent administrative\n * boundaries or TopoJSON sources) allows the renderer to optimise fill and\n * stroke operations.\n * @property {LoadingStrategy} [strategy] The loading strategy to use.\n * By default an {@link module:ol/loadingstrategy.all}\n * strategy is used, a one-off strategy which loads all features at once.\n * @property {string|import(\"../featureloader.js\").FeatureUrlFunction} [url]\n * Setting this option instructs the source to load features using an XHR loader\n * (see {@link module:ol/featureloader.xhr}). Use a `string` and an\n * {@link module:ol/loadingstrategy.all} for a one-off download of all features from\n * the given URL. Use a {@link module:ol/featureloader~FeatureUrlFunction} to generate the url with\n * other loading strategies.\n * Requires `format` to be set as well.\n * When default XHR feature loader is provided, the features will\n * be transformed from the data projection to the view projection\n * during parsing. If your remote data source does not advertise its projection\n * properly, this transformation will be incorrect. For some formats, the\n * default projection (usually EPSG:4326) can be overridden by setting the\n * dataProjection constructor option on the format.\n * Note that if a source contains non-feature data, such as a GeoJSON geometry\n * or a KML NetworkLink, these will be ignored. Use a custom loader to load these.\n * @property {boolean} [useSpatialIndex=true]\n * By default, an RTree is used as spatial index. When features are removed and\n * added frequently, and the total number of features is low, setting this to\n * `false` may improve performance.\n *\n * Note that\n * {@link module:ol/source/Vector~VectorSource#getFeaturesInExtent},\n * {@link module:ol/source/Vector~VectorSource#getClosestFeatureToCoordinate} and\n * {@link module:ol/source/Vector~VectorSource#getExtent} cannot be used when `useSpatialIndex` is\n * set to `false`, and {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent} will loop\n * through all features.\n *\n * When set to `false`, the features will be maintained in an\n * {@link module:ol/Collection}, which can be retrieved through\n * {@link module:ol/source/Vector~VectorSource#getFeaturesCollection}.\n * @property {boolean} [wrapX=true] Wrap the world horizontally. For vector editing across the\n * -180° and 180° meridians to work properly, this should be set to `false`. The\n * resulting geometry coordinates will then exceed the world bounds.\n */\n/**\n * @classdesc\n * Provides a source of features for vector layers. Vector features provided\n * by this source are suitable for editing. See {@link module:ol/source/VectorTile~VectorTile} for\n * vector data that is optimized for rendering.\n *\n * @fires VectorSourceEvent\n * @api\n * @template {import(\"../geom/Geometry.js\").default} Geometry\n */\nvar VectorSource = /** @class */ (function (_super) {\n    __extends(VectorSource, _super);\n    /**\n     * @param {Options} [opt_options] Vector source options.\n     */\n    function VectorSource(opt_options) {\n        var _this = this;\n        var options = opt_options || {};\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            projection: undefined,\n            state: SourceState.READY,\n            wrapX: options.wrapX !== undefined ? options.wrapX : true,\n        }) || this;\n        /***\n         * @type {VectorSourceOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {VectorSourceOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {VectorSourceOnSignature<void>}\n         */\n        _this.un;\n        /**\n         * @private\n         * @type {import(\"../featureloader.js\").FeatureLoader}\n         */\n        _this.loader_ = VOID;\n        /**\n         * @private\n         * @type {import(\"../format/Feature.js\").default|undefined}\n         */\n        _this.format_ = options.format;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.overlaps_ = options.overlaps === undefined ? true : options.overlaps;\n        /**\n         * @private\n         * @type {string|import(\"../featureloader.js\").FeatureUrlFunction|undefined}\n         */\n        _this.url_ = options.url;\n        if (options.loader !== undefined) {\n            _this.loader_ = options.loader;\n        }\n        else if (_this.url_ !== undefined) {\n            assert(_this.format_, 7); // `format` must be set when `url` is set\n            // create a XHR feature loader for \"url\" and \"format\"\n            _this.loader_ = xhr(_this.url_, \n            /** @type {import(\"../format/Feature.js\").default} */ (_this.format_));\n        }\n        /**\n         * @private\n         * @type {LoadingStrategy}\n         */\n        _this.strategy_ =\n            options.strategy !== undefined ? options.strategy : allStrategy;\n        var useSpatialIndex = options.useSpatialIndex !== undefined ? options.useSpatialIndex : true;\n        /**\n         * @private\n         * @type {RBush<import(\"../Feature.js\").default<Geometry>>}\n         */\n        _this.featuresRtree_ = useSpatialIndex ? new RBush() : null;\n        /**\n         * @private\n         * @type {RBush<{extent: import(\"../extent.js\").Extent}>}\n         */\n        _this.loadedExtentsRtree_ = new RBush();\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.loadingExtentsCount_ = 0;\n        /**\n         * @private\n         * @type {!Object<string, import(\"../Feature.js\").default<Geometry>>}\n         */\n        _this.nullGeometryFeatures_ = {};\n        /**\n         * A lookup of features by id (the return from feature.getId()).\n         * @private\n         * @type {!Object<string, import(\"../Feature.js\").default<Geometry>>}\n         */\n        _this.idIndex_ = {};\n        /**\n         * A lookup of features by uid (using getUid(feature)).\n         * @private\n         * @type {!Object<string, import(\"../Feature.js\").default<Geometry>>}\n         */\n        _this.uidIndex_ = {};\n        /**\n         * @private\n         * @type {Object<string, Array<import(\"../events.js\").EventsKey>>}\n         */\n        _this.featureChangeKeys_ = {};\n        /**\n         * @private\n         * @type {Collection<import(\"../Feature.js\").default<Geometry>>}\n         */\n        _this.featuresCollection_ = null;\n        var collection, features;\n        if (Array.isArray(options.features)) {\n            features = options.features;\n        }\n        else if (options.features) {\n            collection = options.features;\n            features = collection.getArray();\n        }\n        if (!useSpatialIndex && collection === undefined) {\n            collection = new Collection(features);\n        }\n        if (features !== undefined) {\n            _this.addFeaturesInternal(features);\n        }\n        if (collection !== undefined) {\n            _this.bindFeaturesCollection_(collection);\n        }\n        return _this;\n    }\n    /**\n     * Add a single feature to the source.  If you want to add a batch of features\n     * at once, call {@link module:ol/source/Vector~VectorSource#addFeatures #addFeatures()}\n     * instead. A feature will not be added to the source if feature with\n     * the same id is already there. The reason for this behavior is to avoid\n     * feature duplication when using bbox or tile loading strategies.\n     * Note: this also applies if an {@link module:ol/Collection} is used for features,\n     * meaning that if a feature with a duplicate id is added in the collection, it will\n     * be removed from it right away.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature Feature to add.\n     * @api\n     */\n    VectorSource.prototype.addFeature = function (feature) {\n        this.addFeatureInternal(feature);\n        this.changed();\n    };\n    /**\n     * Add a feature without firing a `change` event.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature Feature.\n     * @protected\n     */\n    VectorSource.prototype.addFeatureInternal = function (feature) {\n        var featureKey = getUid(feature);\n        if (!this.addToIndex_(featureKey, feature)) {\n            if (this.featuresCollection_) {\n                this.featuresCollection_.remove(feature);\n            }\n            return;\n        }\n        this.setupChangeEvents_(featureKey, feature);\n        var geometry = feature.getGeometry();\n        if (geometry) {\n            var extent = geometry.getExtent();\n            if (this.featuresRtree_) {\n                this.featuresRtree_.insert(extent, feature);\n            }\n        }\n        else {\n            this.nullGeometryFeatures_[featureKey] = feature;\n        }\n        this.dispatchEvent(new VectorSourceEvent(VectorEventType.ADDFEATURE, feature));\n    };\n    /**\n     * @param {string} featureKey Unique identifier for the feature.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature The feature.\n     * @private\n     */\n    VectorSource.prototype.setupChangeEvents_ = function (featureKey, feature) {\n        this.featureChangeKeys_[featureKey] = [\n            listen(feature, EventType.CHANGE, this.handleFeatureChange_, this),\n            listen(feature, ObjectEventType.PROPERTYCHANGE, this.handleFeatureChange_, this),\n        ];\n    };\n    /**\n     * @param {string} featureKey Unique identifier for the feature.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature The feature.\n     * @return {boolean} The feature is \"valid\", in the sense that it is also a\n     *     candidate for insertion into the Rtree.\n     * @private\n     */\n    VectorSource.prototype.addToIndex_ = function (featureKey, feature) {\n        var valid = true;\n        var id = feature.getId();\n        if (id !== undefined) {\n            if (!(id.toString() in this.idIndex_)) {\n                this.idIndex_[id.toString()] = feature;\n            }\n            else {\n                valid = false;\n            }\n        }\n        if (valid) {\n            assert(!(featureKey in this.uidIndex_), 30); // The passed `feature` was already added to the source\n            this.uidIndex_[featureKey] = feature;\n        }\n        return valid;\n    };\n    /**\n     * Add a batch of features to the source.\n     * @param {Array<import(\"../Feature.js\").default<Geometry>>} features Features to add.\n     * @api\n     */\n    VectorSource.prototype.addFeatures = function (features) {\n        this.addFeaturesInternal(features);\n        this.changed();\n    };\n    /**\n     * Add features without firing a `change` event.\n     * @param {Array<import(\"../Feature.js\").default<Geometry>>} features Features.\n     * @protected\n     */\n    VectorSource.prototype.addFeaturesInternal = function (features) {\n        var extents = [];\n        var newFeatures = [];\n        var geometryFeatures = [];\n        for (var i = 0, length_1 = features.length; i < length_1; i++) {\n            var feature = features[i];\n            var featureKey = getUid(feature);\n            if (this.addToIndex_(featureKey, feature)) {\n                newFeatures.push(feature);\n            }\n        }\n        for (var i = 0, length_2 = newFeatures.length; i < length_2; i++) {\n            var feature = newFeatures[i];\n            var featureKey = getUid(feature);\n            this.setupChangeEvents_(featureKey, feature);\n            var geometry = feature.getGeometry();\n            if (geometry) {\n                var extent = geometry.getExtent();\n                extents.push(extent);\n                geometryFeatures.push(feature);\n            }\n            else {\n                this.nullGeometryFeatures_[featureKey] = feature;\n            }\n        }\n        if (this.featuresRtree_) {\n            this.featuresRtree_.load(extents, geometryFeatures);\n        }\n        for (var i = 0, length_3 = newFeatures.length; i < length_3; i++) {\n            this.dispatchEvent(new VectorSourceEvent(VectorEventType.ADDFEATURE, newFeatures[i]));\n        }\n    };\n    /**\n     * @param {!Collection<import(\"../Feature.js\").default<Geometry>>} collection Collection.\n     * @private\n     */\n    VectorSource.prototype.bindFeaturesCollection_ = function (collection) {\n        var modifyingCollection = false;\n        this.addEventListener(VectorEventType.ADDFEATURE, \n        /**\n         * @param {VectorSourceEvent<Geometry>} evt The vector source event\n         */\n        function (evt) {\n            if (!modifyingCollection) {\n                modifyingCollection = true;\n                collection.push(evt.feature);\n                modifyingCollection = false;\n            }\n        });\n        this.addEventListener(VectorEventType.REMOVEFEATURE, \n        /**\n         * @param {VectorSourceEvent<Geometry>} evt The vector source event\n         */\n        function (evt) {\n            if (!modifyingCollection) {\n                modifyingCollection = true;\n                collection.remove(evt.feature);\n                modifyingCollection = false;\n            }\n        });\n        collection.addEventListener(CollectionEventType.ADD, \n        /**\n         * @param {import(\"../Collection.js\").CollectionEvent} evt The collection event\n         */\n        function (evt) {\n            if (!modifyingCollection) {\n                modifyingCollection = true;\n                this.addFeature(\n                /** @type {import(\"../Feature.js\").default<Geometry>} */ (evt.element));\n                modifyingCollection = false;\n            }\n        }.bind(this));\n        collection.addEventListener(CollectionEventType.REMOVE, \n        /**\n         * @param {import(\"../Collection.js\").CollectionEvent} evt The collection event\n         */\n        function (evt) {\n            if (!modifyingCollection) {\n                modifyingCollection = true;\n                this.removeFeature(\n                /** @type {import(\"../Feature.js\").default<Geometry>} */ (evt.element));\n                modifyingCollection = false;\n            }\n        }.bind(this));\n        this.featuresCollection_ = collection;\n    };\n    /**\n     * Remove all features from the source.\n     * @param {boolean} [opt_fast] Skip dispatching of {@link module:ol/source/Vector.VectorSourceEvent#event:removefeature removefeature} events.\n     * @api\n     */\n    VectorSource.prototype.clear = function (opt_fast) {\n        if (opt_fast) {\n            for (var featureId in this.featureChangeKeys_) {\n                var keys = this.featureChangeKeys_[featureId];\n                keys.forEach(unlistenByKey);\n            }\n            if (!this.featuresCollection_) {\n                this.featureChangeKeys_ = {};\n                this.idIndex_ = {};\n                this.uidIndex_ = {};\n            }\n        }\n        else {\n            if (this.featuresRtree_) {\n                this.featuresRtree_.forEach(this.removeFeatureInternal.bind(this));\n                for (var id in this.nullGeometryFeatures_) {\n                    this.removeFeatureInternal(this.nullGeometryFeatures_[id]);\n                }\n            }\n        }\n        if (this.featuresCollection_) {\n            this.featuresCollection_.clear();\n        }\n        if (this.featuresRtree_) {\n            this.featuresRtree_.clear();\n        }\n        this.nullGeometryFeatures_ = {};\n        var clearEvent = new VectorSourceEvent(VectorEventType.CLEAR);\n        this.dispatchEvent(clearEvent);\n        this.changed();\n    };\n    /**\n     * Iterate through all features on the source, calling the provided callback\n     * with each one.  If the callback returns any \"truthy\" value, iteration will\n     * stop and the function will return the same value.\n     * Note: this function only iterate through the feature that have a defined geometry.\n     *\n     * @param {function(import(\"../Feature.js\").default<Geometry>): T} callback Called with each feature\n     *     on the source.  Return a truthy value to stop iteration.\n     * @return {T|undefined} The return value from the last call to the callback.\n     * @template T\n     * @api\n     */\n    VectorSource.prototype.forEachFeature = function (callback) {\n        if (this.featuresRtree_) {\n            return this.featuresRtree_.forEach(callback);\n        }\n        else if (this.featuresCollection_) {\n            this.featuresCollection_.forEach(callback);\n        }\n    };\n    /**\n     * Iterate through all features whose geometries contain the provided\n     * coordinate, calling the callback with each feature.  If the callback returns\n     * a \"truthy\" value, iteration will stop and the function will return the same\n     * value.\n     *\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {function(import(\"../Feature.js\").default<Geometry>): T} callback Called with each feature\n     *     whose goemetry contains the provided coordinate.\n     * @return {T|undefined} The return value from the last call to the callback.\n     * @template T\n     */\n    VectorSource.prototype.forEachFeatureAtCoordinateDirect = function (coordinate, callback) {\n        var extent = [coordinate[0], coordinate[1], coordinate[0], coordinate[1]];\n        return this.forEachFeatureInExtent(extent, function (feature) {\n            var geometry = feature.getGeometry();\n            if (geometry.intersectsCoordinate(coordinate)) {\n                return callback(feature);\n            }\n            else {\n                return undefined;\n            }\n        });\n    };\n    /**\n     * Iterate through all features whose bounding box intersects the provided\n     * extent (note that the feature's geometry may not intersect the extent),\n     * calling the callback with each feature.  If the callback returns a \"truthy\"\n     * value, iteration will stop and the function will return the same value.\n     *\n     * If you are interested in features whose geometry intersects an extent, call\n     * the {@link module:ol/source/Vector~VectorSource#forEachFeatureIntersectingExtent #forEachFeatureIntersectingExtent()} method instead.\n     *\n     * When `useSpatialIndex` is set to false, this method will loop through all\n     * features, equivalent to {@link module:ol/source/Vector~VectorSource#forEachFeature #forEachFeature()}.\n     *\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {function(import(\"../Feature.js\").default<Geometry>): T} callback Called with each feature\n     *     whose bounding box intersects the provided extent.\n     * @return {T|undefined} The return value from the last call to the callback.\n     * @template T\n     * @api\n     */\n    VectorSource.prototype.forEachFeatureInExtent = function (extent, callback) {\n        if (this.featuresRtree_) {\n            return this.featuresRtree_.forEachInExtent(extent, callback);\n        }\n        else if (this.featuresCollection_) {\n            this.featuresCollection_.forEach(callback);\n        }\n    };\n    /**\n     * Iterate through all features whose geometry intersects the provided extent,\n     * calling the callback with each feature.  If the callback returns a \"truthy\"\n     * value, iteration will stop and the function will return the same value.\n     *\n     * If you only want to test for bounding box intersection, call the\n     * {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent #forEachFeatureInExtent()} method instead.\n     *\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {function(import(\"../Feature.js\").default<Geometry>): T} callback Called with each feature\n     *     whose geometry intersects the provided extent.\n     * @return {T|undefined} The return value from the last call to the callback.\n     * @template T\n     * @api\n     */\n    VectorSource.prototype.forEachFeatureIntersectingExtent = function (extent, callback) {\n        return this.forEachFeatureInExtent(extent, \n        /**\n         * @param {import(\"../Feature.js\").default<Geometry>} feature Feature.\n         * @return {T|undefined} The return value from the last call to the callback.\n         */\n        function (feature) {\n            var geometry = feature.getGeometry();\n            if (geometry.intersectsExtent(extent)) {\n                var result = callback(feature);\n                if (result) {\n                    return result;\n                }\n            }\n        });\n    };\n    /**\n     * Get the features collection associated with this source. Will be `null`\n     * unless the source was configured with `useSpatialIndex` set to `false`, or\n     * with an {@link module:ol/Collection} as `features`.\n     * @return {Collection<import(\"../Feature.js\").default<Geometry>>} The collection of features.\n     * @api\n     */\n    VectorSource.prototype.getFeaturesCollection = function () {\n        return this.featuresCollection_;\n    };\n    /**\n     * Get a snapshot of the features currently on the source in random order. The returned array\n     * is a copy, the features are references to the features in the source.\n     * @return {Array<import(\"../Feature.js\").default<Geometry>>} Features.\n     * @api\n     */\n    VectorSource.prototype.getFeatures = function () {\n        var features;\n        if (this.featuresCollection_) {\n            features = this.featuresCollection_.getArray().slice(0);\n        }\n        else if (this.featuresRtree_) {\n            features = this.featuresRtree_.getAll();\n            if (!isEmpty(this.nullGeometryFeatures_)) {\n                extend(features, getValues(this.nullGeometryFeatures_));\n            }\n        }\n        return /** @type {Array<import(\"../Feature.js\").default<Geometry>>} */ (features);\n    };\n    /**\n     * Get all features whose geometry intersects the provided coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @return {Array<import(\"../Feature.js\").default<Geometry>>} Features.\n     * @api\n     */\n    VectorSource.prototype.getFeaturesAtCoordinate = function (coordinate) {\n        var features = [];\n        this.forEachFeatureAtCoordinateDirect(coordinate, function (feature) {\n            features.push(feature);\n        });\n        return features;\n    };\n    /**\n     * Get all features whose bounding box intersects the provided extent.  Note that this returns an array of\n     * all features intersecting the given extent in random order (so it may include\n     * features whose geometries do not intersect the extent).\n     *\n     * When `useSpatialIndex` is set to false, this method will return all\n     * features.\n     *\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {Array<import(\"../Feature.js\").default<Geometry>>} Features.\n     * @api\n     */\n    VectorSource.prototype.getFeaturesInExtent = function (extent) {\n        if (this.featuresRtree_) {\n            return this.featuresRtree_.getInExtent(extent);\n        }\n        else if (this.featuresCollection_) {\n            return this.featuresCollection_.getArray().slice(0);\n        }\n        else {\n            return [];\n        }\n    };\n    /**\n     * Get the closest feature to the provided coordinate.\n     *\n     * This method is not available when the source is configured with\n     * `useSpatialIndex` set to `false`.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {function(import(\"../Feature.js\").default<Geometry>):boolean} [opt_filter] Feature filter function.\n     *     The filter function will receive one argument, the {@link module:ol/Feature feature}\n     *     and it should return a boolean value. By default, no filtering is made.\n     * @return {import(\"../Feature.js\").default<Geometry>} Closest feature.\n     * @api\n     */\n    VectorSource.prototype.getClosestFeatureToCoordinate = function (coordinate, opt_filter) {\n        // Find the closest feature using branch and bound.  We start searching an\n        // infinite extent, and find the distance from the first feature found.  This\n        // becomes the closest feature.  We then compute a smaller extent which any\n        // closer feature must intersect.  We continue searching with this smaller\n        // extent, trying to find a closer feature.  Every time we find a closer\n        // feature, we update the extent being searched so that any even closer\n        // feature must intersect it.  We continue until we run out of features.\n        var x = coordinate[0];\n        var y = coordinate[1];\n        var closestFeature = null;\n        var closestPoint = [NaN, NaN];\n        var minSquaredDistance = Infinity;\n        var extent = [-Infinity, -Infinity, Infinity, Infinity];\n        var filter = opt_filter ? opt_filter : TRUE;\n        this.featuresRtree_.forEachInExtent(extent, \n        /**\n         * @param {import(\"../Feature.js\").default<Geometry>} feature Feature.\n         */\n        function (feature) {\n            if (filter(feature)) {\n                var geometry = feature.getGeometry();\n                var previousMinSquaredDistance = minSquaredDistance;\n                minSquaredDistance = geometry.closestPointXY(x, y, closestPoint, minSquaredDistance);\n                if (minSquaredDistance < previousMinSquaredDistance) {\n                    closestFeature = feature;\n                    // This is sneaky.  Reduce the extent that it is currently being\n                    // searched while the R-Tree traversal using this same extent object\n                    // is still in progress.  This is safe because the new extent is\n                    // strictly contained by the old extent.\n                    var minDistance = Math.sqrt(minSquaredDistance);\n                    extent[0] = x - minDistance;\n                    extent[1] = y - minDistance;\n                    extent[2] = x + minDistance;\n                    extent[3] = y + minDistance;\n                }\n            }\n        });\n        return closestFeature;\n    };\n    /**\n     * Get the extent of the features currently in the source.\n     *\n     * This method is not available when the source is configured with\n     * `useSpatialIndex` set to `false`.\n     * @param {import(\"../extent.js\").Extent} [opt_extent] Destination extent. If provided, no new extent\n     *     will be created. Instead, that extent's coordinates will be overwritten.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     * @api\n     */\n    VectorSource.prototype.getExtent = function (opt_extent) {\n        return this.featuresRtree_.getExtent(opt_extent);\n    };\n    /**\n     * Get a feature by its identifier (the value returned by feature.getId()).\n     * Note that the index treats string and numeric identifiers as the same.  So\n     * `source.getFeatureById(2)` will return a feature with id `'2'` or `2`.\n     *\n     * @param {string|number} id Feature identifier.\n     * @return {import(\"../Feature.js\").default<Geometry>} The feature (or `null` if not found).\n     * @api\n     */\n    VectorSource.prototype.getFeatureById = function (id) {\n        var feature = this.idIndex_[id.toString()];\n        return feature !== undefined ? feature : null;\n    };\n    /**\n     * Get a feature by its internal unique identifier (using `getUid`).\n     *\n     * @param {string} uid Feature identifier.\n     * @return {import(\"../Feature.js\").default<Geometry>} The feature (or `null` if not found).\n     */\n    VectorSource.prototype.getFeatureByUid = function (uid) {\n        var feature = this.uidIndex_[uid];\n        return feature !== undefined ? feature : null;\n    };\n    /**\n     * Get the format associated with this source.\n     *\n     * @return {import(\"../format/Feature.js\").default|undefined} The feature format.\n     * @api\n     */\n    VectorSource.prototype.getFormat = function () {\n        return this.format_;\n    };\n    /**\n     * @return {boolean} The source can have overlapping geometries.\n     */\n    VectorSource.prototype.getOverlaps = function () {\n        return this.overlaps_;\n    };\n    /**\n     * Get the url associated with this source.\n     *\n     * @return {string|import(\"../featureloader.js\").FeatureUrlFunction|undefined} The url.\n     * @api\n     */\n    VectorSource.prototype.getUrl = function () {\n        return this.url_;\n    };\n    /**\n     * @param {Event} event Event.\n     * @private\n     */\n    VectorSource.prototype.handleFeatureChange_ = function (event) {\n        var feature = /** @type {import(\"../Feature.js\").default<Geometry>} */ (event.target);\n        var featureKey = getUid(feature);\n        var geometry = feature.getGeometry();\n        if (!geometry) {\n            if (!(featureKey in this.nullGeometryFeatures_)) {\n                if (this.featuresRtree_) {\n                    this.featuresRtree_.remove(feature);\n                }\n                this.nullGeometryFeatures_[featureKey] = feature;\n            }\n        }\n        else {\n            var extent = geometry.getExtent();\n            if (featureKey in this.nullGeometryFeatures_) {\n                delete this.nullGeometryFeatures_[featureKey];\n                if (this.featuresRtree_) {\n                    this.featuresRtree_.insert(extent, feature);\n                }\n            }\n            else {\n                if (this.featuresRtree_) {\n                    this.featuresRtree_.update(extent, feature);\n                }\n            }\n        }\n        var id = feature.getId();\n        if (id !== undefined) {\n            var sid = id.toString();\n            if (this.idIndex_[sid] !== feature) {\n                this.removeFromIdIndex_(feature);\n                this.idIndex_[sid] = feature;\n            }\n        }\n        else {\n            this.removeFromIdIndex_(feature);\n            this.uidIndex_[featureKey] = feature;\n        }\n        this.changed();\n        this.dispatchEvent(new VectorSourceEvent(VectorEventType.CHANGEFEATURE, feature));\n    };\n    /**\n     * Returns true if the feature is contained within the source.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature Feature.\n     * @return {boolean} Has feature.\n     * @api\n     */\n    VectorSource.prototype.hasFeature = function (feature) {\n        var id = feature.getId();\n        if (id !== undefined) {\n            return id in this.idIndex_;\n        }\n        else {\n            return getUid(feature) in this.uidIndex_;\n        }\n    };\n    /**\n     * @return {boolean} Is empty.\n     */\n    VectorSource.prototype.isEmpty = function () {\n        return this.featuresRtree_.isEmpty() && isEmpty(this.nullGeometryFeatures_);\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     */\n    VectorSource.prototype.loadFeatures = function (extent, resolution, projection) {\n        var loadedExtentsRtree = this.loadedExtentsRtree_;\n        var extentsToLoad = this.strategy_(extent, resolution);\n        var _loop_1 = function (i, ii) {\n            var extentToLoad = extentsToLoad[i];\n            var alreadyLoaded = loadedExtentsRtree.forEachInExtent(extentToLoad, \n            /**\n             * @param {{extent: import(\"../extent.js\").Extent}} object Object.\n             * @return {boolean} Contains.\n             */\n            function (object) {\n                return containsExtent(object.extent, extentToLoad);\n            });\n            if (!alreadyLoaded) {\n                ++this_1.loadingExtentsCount_;\n                this_1.dispatchEvent(new VectorSourceEvent(VectorEventType.FEATURESLOADSTART));\n                this_1.loader_.call(this_1, extentToLoad, resolution, projection, function (features) {\n                    --this.loadingExtentsCount_;\n                    this.dispatchEvent(new VectorSourceEvent(VectorEventType.FEATURESLOADEND, undefined, features));\n                }.bind(this_1), function () {\n                    --this.loadingExtentsCount_;\n                    this.dispatchEvent(new VectorSourceEvent(VectorEventType.FEATURESLOADERROR));\n                }.bind(this_1));\n                loadedExtentsRtree.insert(extentToLoad, { extent: extentToLoad.slice() });\n            }\n        };\n        var this_1 = this;\n        for (var i = 0, ii = extentsToLoad.length; i < ii; ++i) {\n            _loop_1(i, ii);\n        }\n        this.loading =\n            this.loader_ === VOID ? false : this.loadingExtentsCount_ > 0;\n    };\n    VectorSource.prototype.refresh = function () {\n        this.clear(true);\n        this.loadedExtentsRtree_.clear();\n        _super.prototype.refresh.call(this);\n    };\n    /**\n     * Remove an extent from the list of loaded extents.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @api\n     */\n    VectorSource.prototype.removeLoadedExtent = function (extent) {\n        var loadedExtentsRtree = this.loadedExtentsRtree_;\n        var obj;\n        loadedExtentsRtree.forEachInExtent(extent, function (object) {\n            if (equals(object.extent, extent)) {\n                obj = object;\n                return true;\n            }\n        });\n        if (obj) {\n            loadedExtentsRtree.remove(obj);\n        }\n    };\n    /**\n     * Remove a single feature from the source.  If you want to remove all features\n     * at once, use the {@link module:ol/source/Vector~VectorSource#clear #clear()} method\n     * instead.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature Feature to remove.\n     * @api\n     */\n    VectorSource.prototype.removeFeature = function (feature) {\n        var featureKey = getUid(feature);\n        if (featureKey in this.nullGeometryFeatures_) {\n            delete this.nullGeometryFeatures_[featureKey];\n        }\n        else {\n            if (this.featuresRtree_) {\n                this.featuresRtree_.remove(feature);\n            }\n        }\n        this.removeFeatureInternal(feature);\n        this.changed();\n    };\n    /**\n     * Remove feature without firing a `change` event.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature Feature.\n     * @protected\n     */\n    VectorSource.prototype.removeFeatureInternal = function (feature) {\n        var featureKey = getUid(feature);\n        this.featureChangeKeys_[featureKey].forEach(unlistenByKey);\n        delete this.featureChangeKeys_[featureKey];\n        var id = feature.getId();\n        if (id !== undefined) {\n            delete this.idIndex_[id.toString()];\n        }\n        delete this.uidIndex_[featureKey];\n        this.dispatchEvent(new VectorSourceEvent(VectorEventType.REMOVEFEATURE, feature));\n    };\n    /**\n     * Remove a feature from the id index.  Called internally when the feature id\n     * may have changed.\n     * @param {import(\"../Feature.js\").default<Geometry>} feature The feature.\n     * @return {boolean} Removed the feature from the index.\n     * @private\n     */\n    VectorSource.prototype.removeFromIdIndex_ = function (feature) {\n        var removed = false;\n        for (var id in this.idIndex_) {\n            if (this.idIndex_[id] === feature) {\n                delete this.idIndex_[id];\n                removed = true;\n                break;\n            }\n        }\n        return removed;\n    };\n    /**\n     * Set the new loader of the source. The next render cycle will use the\n     * new loader.\n     * @param {import(\"../featureloader.js\").FeatureLoader} loader The loader to set.\n     * @api\n     */\n    VectorSource.prototype.setLoader = function (loader) {\n        this.loader_ = loader;\n    };\n    /**\n     * Points the source to a new url. The next render cycle will use the new url.\n     * @param {string|import(\"../featureloader.js\").FeatureUrlFunction} url Url.\n     * @api\n     */\n    VectorSource.prototype.setUrl = function (url) {\n        assert(this.format_, 7); // `format` must be set when `url` is set\n        this.url_ = url;\n        this.setLoader(xhr(url, this.format_));\n    };\n    return VectorSource;\n}(Source));\nexport default VectorSource;\n//# sourceMappingURL=Vector.js.map","/**\n * @module ol/style/IconOrigin\n */\n/**\n * Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'.\n * @enum {string}\n */\nexport default {\n    /**\n     * Origin is at bottom left\n     * @api\n     */\n    BOTTOM_LEFT: 'bottom-left',\n    /**\n     * Origin is at bottom right\n     * @api\n     */\n    BOTTOM_RIGHT: 'bottom-right',\n    /**\n     * Origin is at top left\n     * @api\n     */\n    TOP_LEFT: 'top-left',\n    /**\n     * Origin is at top right\n     * @api\n     */\n    TOP_RIGHT: 'top-right',\n};\n//# sourceMappingURL=IconOrigin.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/MultiPolygon\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport MultiPoint from './MultiPoint.js';\nimport Polygon from './Polygon.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { assignClosestMultiArrayPoint, multiArrayMaxSquaredDelta, } from './flat/closest.js';\nimport { closestSquaredDistanceXY } from '../extent.js';\nimport { deflateMultiCoordinatesArray } from './flat/deflate.js';\nimport { extend } from '../array.js';\nimport { getInteriorPointsOfMultiArray } from './flat/interiorpoint.js';\nimport { inflateMultiCoordinatesArray } from './flat/inflate.js';\nimport { intersectsLinearRingMultiArray } from './flat/intersectsextent.js';\nimport { linearRingssAreOriented, orientLinearRingsArray, } from './flat/orient.js';\nimport { linearRingss as linearRingssArea } from './flat/area.js';\nimport { linearRingss as linearRingssCenter } from './flat/center.js';\nimport { linearRingssContainsXY } from './flat/contains.js';\nimport { quantizeMultiArray } from './flat/simplify.js';\n/**\n * @classdesc\n * Multi-polygon geometry.\n *\n * @api\n */\nvar MultiPolygon = /** @class */ (function (_super) {\n    __extends(MultiPolygon, _super);\n    /**\n     * @param {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>|Polygon>|Array<number>} coordinates Coordinates.\n     *     For internal use, flat coordinates in combination with `opt_layout` and `opt_endss` are also accepted.\n     * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n     * @param {Array<Array<number>>} [opt_endss] Array of ends for internal use with flat coordinates.\n     */\n    function MultiPolygon(coordinates, opt_layout, opt_endss) {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {Array<Array<number>>}\n         * @private\n         */\n        _this.endss_ = [];\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.flatInteriorPointsRevision_ = -1;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.flatInteriorPoints_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDelta_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDeltaRevision_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.orientedRevision_ = -1;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.orientedFlatCoordinates_ = null;\n        if (!opt_endss && !Array.isArray(coordinates[0])) {\n            var layout = _this.getLayout();\n            var polygons = /** @type {Array<Polygon>} */ (coordinates);\n            var flatCoordinates = [];\n            var endss = [];\n            for (var i = 0, ii = polygons.length; i < ii; ++i) {\n                var polygon = polygons[i];\n                if (i === 0) {\n                    layout = polygon.getLayout();\n                }\n                var offset = flatCoordinates.length;\n                var ends = polygon.getEnds();\n                for (var j = 0, jj = ends.length; j < jj; ++j) {\n                    ends[j] += offset;\n                }\n                extend(flatCoordinates, polygon.getFlatCoordinates());\n                endss.push(ends);\n            }\n            opt_layout = layout;\n            coordinates = flatCoordinates;\n            opt_endss = endss;\n        }\n        if (opt_layout !== undefined && opt_endss) {\n            _this.setFlatCoordinates(opt_layout, \n            /** @type {Array<number>} */ (coordinates));\n            _this.endss_ = opt_endss;\n        }\n        else {\n            _this.setCoordinates(\n            /** @type {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} */ (coordinates), opt_layout);\n        }\n        return _this;\n    }\n    /**\n     * Append the passed polygon to this multipolygon.\n     * @param {Polygon} polygon Polygon.\n     * @api\n     */\n    MultiPolygon.prototype.appendPolygon = function (polygon) {\n        /** @type {Array<number>} */\n        var ends;\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = polygon.getFlatCoordinates().slice();\n            ends = polygon.getEnds().slice();\n            this.endss_.push();\n        }\n        else {\n            var offset = this.flatCoordinates.length;\n            extend(this.flatCoordinates, polygon.getFlatCoordinates());\n            ends = polygon.getEnds().slice();\n            for (var i = 0, ii = ends.length; i < ii; ++i) {\n                ends[i] += offset;\n            }\n        }\n        this.endss_.push(ends);\n        this.changed();\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!MultiPolygon} Clone.\n     * @api\n     */\n    MultiPolygon.prototype.clone = function () {\n        var len = this.endss_.length;\n        var newEndss = new Array(len);\n        for (var i = 0; i < len; ++i) {\n            newEndss[i] = this.endss_[i].slice();\n        }\n        var multiPolygon = new MultiPolygon(this.flatCoordinates.slice(), this.layout, newEndss);\n        multiPolygon.applyProperties(this);\n        return multiPolygon;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    MultiPolygon.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            return minSquaredDistance;\n        }\n        if (this.maxDeltaRevision_ != this.getRevision()) {\n            this.maxDelta_ = Math.sqrt(multiArrayMaxSquaredDelta(this.flatCoordinates, 0, this.endss_, this.stride, 0));\n            this.maxDeltaRevision_ = this.getRevision();\n        }\n        return assignClosestMultiArrayPoint(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @return {boolean} Contains (x, y).\n     */\n    MultiPolygon.prototype.containsXY = function (x, y) {\n        return linearRingssContainsXY(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, x, y);\n    };\n    /**\n     * Return the area of the multipolygon on projected plane.\n     * @return {number} Area (on projected plane).\n     * @api\n     */\n    MultiPolygon.prototype.getArea = function () {\n        return linearRingssArea(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride);\n    };\n    /**\n     * Get the coordinate array for this geometry.  This array has the structure\n     * of a GeoJSON coordinate array for multi-polygons.\n     *\n     * @param {boolean} [opt_right] Orient coordinates according to the right-hand\n     *     rule (counter-clockwise for exterior and clockwise for interior rings).\n     *     If `false`, coordinates will be oriented according to the left-hand rule\n     *     (clockwise for exterior and counter-clockwise for interior rings).\n     *     By default, coordinate orientation will depend on how the geometry was\n     *     constructed.\n     * @return {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} Coordinates.\n     * @api\n     */\n    MultiPolygon.prototype.getCoordinates = function (opt_right) {\n        var flatCoordinates;\n        if (opt_right !== undefined) {\n            flatCoordinates = this.getOrientedFlatCoordinates().slice();\n            orientLinearRingsArray(flatCoordinates, 0, this.endss_, this.stride, opt_right);\n        }\n        else {\n            flatCoordinates = this.flatCoordinates;\n        }\n        return inflateMultiCoordinatesArray(flatCoordinates, 0, this.endss_, this.stride);\n    };\n    /**\n     * @return {Array<Array<number>>} Endss.\n     */\n    MultiPolygon.prototype.getEndss = function () {\n        return this.endss_;\n    };\n    /**\n     * @return {Array<number>} Flat interior points.\n     */\n    MultiPolygon.prototype.getFlatInteriorPoints = function () {\n        if (this.flatInteriorPointsRevision_ != this.getRevision()) {\n            var flatCenters = linearRingssCenter(this.flatCoordinates, 0, this.endss_, this.stride);\n            this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, flatCenters);\n            this.flatInteriorPointsRevision_ = this.getRevision();\n        }\n        return this.flatInteriorPoints_;\n    };\n    /**\n     * Return the interior points as {@link module:ol/geom/MultiPoint multipoint}.\n     * @return {MultiPoint} Interior points as XYM coordinates, where M is\n     * the length of the horizontal intersection that the point belongs to.\n     * @api\n     */\n    MultiPolygon.prototype.getInteriorPoints = function () {\n        return new MultiPoint(this.getFlatInteriorPoints().slice(), GeometryLayout.XYM);\n    };\n    /**\n     * @return {Array<number>} Oriented flat coordinates.\n     */\n    MultiPolygon.prototype.getOrientedFlatCoordinates = function () {\n        if (this.orientedRevision_ != this.getRevision()) {\n            var flatCoordinates = this.flatCoordinates;\n            if (linearRingssAreOriented(flatCoordinates, 0, this.endss_, this.stride)) {\n                this.orientedFlatCoordinates_ = flatCoordinates;\n            }\n            else {\n                this.orientedFlatCoordinates_ = flatCoordinates.slice();\n                this.orientedFlatCoordinates_.length = orientLinearRingsArray(this.orientedFlatCoordinates_, 0, this.endss_, this.stride);\n            }\n            this.orientedRevision_ = this.getRevision();\n        }\n        return this.orientedFlatCoordinates_;\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {MultiPolygon} Simplified MultiPolygon.\n     * @protected\n     */\n    MultiPolygon.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n        var simplifiedFlatCoordinates = [];\n        var simplifiedEndss = [];\n        simplifiedFlatCoordinates.length = quantizeMultiArray(this.flatCoordinates, 0, this.endss_, this.stride, Math.sqrt(squaredTolerance), simplifiedFlatCoordinates, 0, simplifiedEndss);\n        return new MultiPolygon(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEndss);\n    };\n    /**\n     * Return the polygon at the specified index.\n     * @param {number} index Index.\n     * @return {Polygon} Polygon.\n     * @api\n     */\n    MultiPolygon.prototype.getPolygon = function (index) {\n        if (index < 0 || this.endss_.length <= index) {\n            return null;\n        }\n        var offset;\n        if (index === 0) {\n            offset = 0;\n        }\n        else {\n            var prevEnds = this.endss_[index - 1];\n            offset = prevEnds[prevEnds.length - 1];\n        }\n        var ends = this.endss_[index].slice();\n        var end = ends[ends.length - 1];\n        if (offset !== 0) {\n            for (var i = 0, ii = ends.length; i < ii; ++i) {\n                ends[i] -= offset;\n            }\n        }\n        return new Polygon(this.flatCoordinates.slice(offset, end), this.layout, ends);\n    };\n    /**\n     * Return the polygons of this multipolygon.\n     * @return {Array<Polygon>} Polygons.\n     * @api\n     */\n    MultiPolygon.prototype.getPolygons = function () {\n        var layout = this.layout;\n        var flatCoordinates = this.flatCoordinates;\n        var endss = this.endss_;\n        var polygons = [];\n        var offset = 0;\n        for (var i = 0, ii = endss.length; i < ii; ++i) {\n            var ends = endss[i].slice();\n            var end = ends[ends.length - 1];\n            if (offset !== 0) {\n                for (var j = 0, jj = ends.length; j < jj; ++j) {\n                    ends[j] -= offset;\n                }\n            }\n            var polygon = new Polygon(flatCoordinates.slice(offset, end), layout, ends);\n            polygons.push(polygon);\n            offset = end;\n        }\n        return polygons;\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    MultiPolygon.prototype.getType = function () {\n        return GeometryType.MULTI_POLYGON;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    MultiPolygon.prototype.intersectsExtent = function (extent) {\n        return intersectsLinearRingMultiArray(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, extent);\n    };\n    /**\n     * Set the coordinates of the multipolygon.\n     * @param {!Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n     * @api\n     */\n    MultiPolygon.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, coordinates, 3);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        var endss = deflateMultiCoordinatesArray(this.flatCoordinates, 0, coordinates, this.stride, this.endss_);\n        if (endss.length === 0) {\n            this.flatCoordinates.length = 0;\n        }\n        else {\n            var lastEnds = endss[endss.length - 1];\n            this.flatCoordinates.length =\n                lastEnds.length === 0 ? 0 : lastEnds[lastEnds.length - 1];\n        }\n        this.changed();\n    };\n    return MultiPolygon;\n}(SimpleGeometry));\nexport default MultiPolygon;\n//# sourceMappingURL=MultiPolygon.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/MultiPoint\n */\nimport GeometryType from './GeometryType.js';\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { closestSquaredDistanceXY, containsXY } from '../extent.js';\nimport { deflateCoordinates } from './flat/deflate.js';\nimport { extend } from '../array.js';\nimport { inflateCoordinates } from './flat/inflate.js';\nimport { squaredDistance as squaredDx } from '../math.js';\n/**\n * @classdesc\n * Multi-point geometry.\n *\n * @api\n */\nvar MultiPoint = /** @class */ (function (_super) {\n    __extends(MultiPoint, _super);\n    /**\n     * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n     *     For internal use, flat coordinates in combination with `opt_layout` are also accepted.\n     * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n     */\n    function MultiPoint(coordinates, opt_layout) {\n        var _this = _super.call(this) || this;\n        if (opt_layout && !Array.isArray(coordinates[0])) {\n            _this.setFlatCoordinates(opt_layout, \n            /** @type {Array<number>} */ (coordinates));\n        }\n        else {\n            _this.setCoordinates(\n            /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates), opt_layout);\n        }\n        return _this;\n    }\n    /**\n     * Append the passed point to this multipoint.\n     * @param {Point} point Point.\n     * @api\n     */\n    MultiPoint.prototype.appendPoint = function (point) {\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = point.getFlatCoordinates().slice();\n        }\n        else {\n            extend(this.flatCoordinates, point.getFlatCoordinates());\n        }\n        this.changed();\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!MultiPoint} Clone.\n     * @api\n     */\n    MultiPoint.prototype.clone = function () {\n        var multiPoint = new MultiPoint(this.flatCoordinates.slice(), this.layout);\n        multiPoint.applyProperties(this);\n        return multiPoint;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    MultiPoint.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            return minSquaredDistance;\n        }\n        var flatCoordinates = this.flatCoordinates;\n        var stride = this.stride;\n        for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n            var squaredDistance = squaredDx(x, y, flatCoordinates[i], flatCoordinates[i + 1]);\n            if (squaredDistance < minSquaredDistance) {\n                minSquaredDistance = squaredDistance;\n                for (var j = 0; j < stride; ++j) {\n                    closestPoint[j] = flatCoordinates[i + j];\n                }\n                closestPoint.length = stride;\n            }\n        }\n        return minSquaredDistance;\n    };\n    /**\n     * Return the coordinates of the multipoint.\n     * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n     * @api\n     */\n    MultiPoint.prototype.getCoordinates = function () {\n        return inflateCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n    };\n    /**\n     * Return the point at the specified index.\n     * @param {number} index Index.\n     * @return {Point} Point.\n     * @api\n     */\n    MultiPoint.prototype.getPoint = function (index) {\n        var n = !this.flatCoordinates\n            ? 0\n            : this.flatCoordinates.length / this.stride;\n        if (index < 0 || n <= index) {\n            return null;\n        }\n        return new Point(this.flatCoordinates.slice(index * this.stride, (index + 1) * this.stride), this.layout);\n    };\n    /**\n     * Return the points of this multipoint.\n     * @return {Array<Point>} Points.\n     * @api\n     */\n    MultiPoint.prototype.getPoints = function () {\n        var flatCoordinates = this.flatCoordinates;\n        var layout = this.layout;\n        var stride = this.stride;\n        /** @type {Array<Point>} */\n        var points = [];\n        for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n            var point = new Point(flatCoordinates.slice(i, i + stride), layout);\n            points.push(point);\n        }\n        return points;\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    MultiPoint.prototype.getType = function () {\n        return GeometryType.MULTI_POINT;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    MultiPoint.prototype.intersectsExtent = function (extent) {\n        var flatCoordinates = this.flatCoordinates;\n        var stride = this.stride;\n        for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n            var x = flatCoordinates[i];\n            var y = flatCoordinates[i + 1];\n            if (containsXY(extent, x, y)) {\n                return true;\n            }\n        }\n        return false;\n    };\n    /**\n     * Set the coordinates of the multipoint.\n     * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n     * @api\n     */\n    MultiPoint.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, coordinates, 1);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        this.flatCoordinates.length = deflateCoordinates(this.flatCoordinates, 0, coordinates, this.stride);\n        this.changed();\n    };\n    return MultiPoint;\n}(SimpleGeometry));\nexport default MultiPoint;\n//# sourceMappingURL=MultiPoint.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Interaction\n */\nimport BaseObject from '../Object.js';\nimport InteractionProperty from './Property.js';\nimport { easeOut, linear } from '../easing.js';\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types|\n *     'change:active', import(\"../Object\").ObjectEvent, Return> &\n *   import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"../ObjectEventType\").Types|\n *     'change:active', Return>} InteractionOnSignature\n */\n/**\n * Object literal with config options for interactions.\n * @typedef {Object} InteractionOptions\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} handleEvent\n * Method called by the map to notify the interaction that a browser event was\n * dispatched to the map. If the function returns a falsy value, propagation of\n * the event to other interactions in the map's interactions chain will be\n * prevented (this includes functions with no explicit return). The interactions\n * are traversed in reverse order of the interactions collection of the map.\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * User actions that change the state of the map. Some are similar to controls,\n * but are not associated with a DOM element.\n * For example, {@link module:ol/interaction/KeyboardZoom~KeyboardZoom} is\n * functionally the same as {@link module:ol/control/Zoom~Zoom}, but triggered\n * by a keyboard event not a button element event.\n * Although interactions do not have a DOM element, some of them do render\n * vectors and so are visible on the screen.\n * @api\n */\nvar Interaction = /** @class */ (function (_super) {\n    __extends(Interaction, _super);\n    /**\n     * @param {InteractionOptions} [opt_options] Options.\n     */\n    function Interaction(opt_options) {\n        var _this = _super.call(this) || this;\n        /***\n         * @type {InteractionOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {InteractionOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {InteractionOnSignature<void>}\n         */\n        _this.un;\n        if (opt_options && opt_options.handleEvent) {\n            _this.handleEvent = opt_options.handleEvent;\n        }\n        /**\n         * @private\n         * @type {import(\"../PluggableMap.js\").default}\n         */\n        _this.map_ = null;\n        _this.setActive(true);\n        return _this;\n    }\n    /**\n     * Return whether the interaction is currently active.\n     * @return {boolean} `true` if the interaction is active, `false` otherwise.\n     * @observable\n     * @api\n     */\n    Interaction.prototype.getActive = function () {\n        return /** @type {boolean} */ (this.get(InteractionProperty.ACTIVE));\n    };\n    /**\n     * Get the map associated with this interaction.\n     * @return {import(\"../PluggableMap.js\").default} Map.\n     * @api\n     */\n    Interaction.prototype.getMap = function () {\n        return this.map_;\n    };\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event}.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     * @api\n     */\n    Interaction.prototype.handleEvent = function (mapBrowserEvent) {\n        return true;\n    };\n    /**\n     * Activate or deactivate the interaction.\n     * @param {boolean} active Active.\n     * @observable\n     * @api\n     */\n    Interaction.prototype.setActive = function (active) {\n        this.set(InteractionProperty.ACTIVE, active);\n    };\n    /**\n     * Remove the interaction from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    Interaction.prototype.setMap = function (map) {\n        this.map_ = map;\n    };\n    return Interaction;\n}(BaseObject));\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {import(\"../coordinate.js\").Coordinate} delta Delta.\n * @param {number} [opt_duration] Duration.\n */\nexport function pan(view, delta, opt_duration) {\n    var currentCenter = view.getCenterInternal();\n    if (currentCenter) {\n        var center = [currentCenter[0] + delta[0], currentCenter[1] + delta[1]];\n        view.animateInternal({\n            duration: opt_duration !== undefined ? opt_duration : 250,\n            easing: linear,\n            center: view.getConstrainedCenter(center),\n        });\n    }\n}\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number} delta Delta from previous zoom level.\n * @param {import(\"../coordinate.js\").Coordinate} [opt_anchor] Anchor coordinate in the user projection.\n * @param {number} [opt_duration] Duration.\n */\nexport function zoomByDelta(view, delta, opt_anchor, opt_duration) {\n    var currentZoom = view.getZoom();\n    if (currentZoom === undefined) {\n        return;\n    }\n    var newZoom = view.getConstrainedZoom(currentZoom + delta);\n    var newResolution = view.getResolutionForZoom(newZoom);\n    if (view.getAnimating()) {\n        view.cancelAnimations();\n    }\n    view.animate({\n        resolution: newResolution,\n        anchor: opt_anchor,\n        duration: opt_duration !== undefined ? opt_duration : 250,\n        easing: easeOut,\n    });\n}\nexport default Interaction;\n//# sourceMappingURL=Interaction.js.map","/**\n * @module ol/style/IconAnchorUnits\n */\n/**\n * Icon anchor units. One of 'fraction', 'pixels'.\n * @enum {string}\n */\nexport default {\n    /**\n     * Anchor is a fraction\n     * @api\n     */\n    FRACTION: 'fraction',\n    /**\n     * Anchor is in pixels\n     * @api\n     */\n    PIXELS: 'pixels',\n};\n//# sourceMappingURL=IconAnchorUnits.js.map","/**\n * @module ol/extent/Relationship\n */\n/**\n * Relationship to an extent.\n * @enum {number}\n */\nexport default {\n    UNKNOWN: 0,\n    INTERSECTING: 1,\n    ABOVE: 2,\n    RIGHT: 4,\n    BELOW: 8,\n    LEFT: 16,\n};\n//# sourceMappingURL=Relationship.js.map","/**\n * @module ol/MapProperty\n */\n/**\n * @enum {string}\n */\nexport default {\n    LAYERGROUP: 'layergroup',\n    SIZE: 'size',\n    TARGET: 'target',\n    VIEW: 'view',\n};\n//# sourceMappingURL=MapProperty.js.map","/**\n * @module ol/easing\n */\n/**\n * Start slow and speed up.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function easeIn(t) {\n    return Math.pow(t, 3);\n}\n/**\n * Start fast and slow down.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function easeOut(t) {\n    return 1 - easeIn(1 - t);\n}\n/**\n * Start slow, speed up, and then slow down again.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function inAndOut(t) {\n    return 3 * t * t - 2 * t * t * t;\n}\n/**\n * Maintain a constant speed over time.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function linear(t) {\n    return t;\n}\n/**\n * Start slow, speed up, and at the very end slow down again.  This has the\n * same general behavior as {@link module:ol/easing.inAndOut}, but the final\n * slowdown is delayed.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function upAndDown(t) {\n    if (t < 0.5) {\n        return inAndOut(2 * t);\n    }\n    else {\n        return 1 - inAndOut(2 * (t - 0.5));\n    }\n}\n//# sourceMappingURL=easing.js.map","/**\n * @module ol/geom/flat/inflate\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Array<import(\"../../coordinate.js\").Coordinate>} [opt_coordinates] Coordinates.\n * @return {Array<import(\"../../coordinate.js\").Coordinate>} Coordinates.\n */\nexport function inflateCoordinates(flatCoordinates, offset, end, stride, opt_coordinates) {\n    var coordinates = opt_coordinates !== undefined ? opt_coordinates : [];\n    var i = 0;\n    for (var j = offset; j < end; j += stride) {\n        coordinates[i++] = flatCoordinates.slice(j, j + stride);\n    }\n    coordinates.length = i;\n    return coordinates;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<Array<import(\"../../coordinate.js\").Coordinate>>} [opt_coordinatess] Coordinatess.\n * @return {Array<Array<import(\"../../coordinate.js\").Coordinate>>} Coordinatess.\n */\nexport function inflateCoordinatesArray(flatCoordinates, offset, ends, stride, opt_coordinatess) {\n    var coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : [];\n    var i = 0;\n    for (var j = 0, jj = ends.length; j < jj; ++j) {\n        var end = ends[j];\n        coordinatess[i++] = inflateCoordinates(flatCoordinates, offset, end, stride, coordinatess[i]);\n        offset = end;\n    }\n    coordinatess.length = i;\n    return coordinatess;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} [opt_coordinatesss]\n *     Coordinatesss.\n * @return {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} Coordinatesss.\n */\nexport function inflateMultiCoordinatesArray(flatCoordinates, offset, endss, stride, opt_coordinatesss) {\n    var coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : [];\n    var i = 0;\n    for (var j = 0, jj = endss.length; j < jj; ++j) {\n        var ends = endss[j];\n        coordinatesss[i++] = inflateCoordinatesArray(flatCoordinates, offset, ends, stride, coordinatesss[i]);\n        offset = ends[ends.length - 1];\n    }\n    coordinatesss.length = i;\n    return coordinatesss;\n}\n//# sourceMappingURL=inflate.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/reproj/Tile\n */\nimport { ERROR_THRESHOLD } from './common.js';\nimport EventType from '../events/EventType.js';\nimport Tile from '../Tile.js';\nimport TileState from '../TileState.js';\nimport Triangulation from './Triangulation.js';\nimport { calculateSourceExtentResolution, render as renderReprojected, } from '../reproj.js';\nimport { clamp } from '../math.js';\nimport { getArea, getIntersection } from '../extent.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @typedef {function(number, number, number, number) : import(\"../Tile.js\").default} FunctionType\n */\n/**\n * @classdesc\n * Class encapsulating single reprojected tile.\n * See {@link module:ol/source/TileImage~TileImage}.\n *\n */\nvar ReprojTile = /** @class */ (function (_super) {\n    __extends(ReprojTile, _super);\n    /**\n     * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection.\n     * @param {import(\"../tilegrid/TileGrid.js\").default} sourceTileGrid Source tile grid.\n     * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n     * @param {import(\"../tilegrid/TileGrid.js\").default} targetTileGrid Target tile grid.\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Coordinate of the tile.\n     * @param {import(\"../tilecoord.js\").TileCoord} wrappedTileCoord Coordinate of the tile wrapped in X.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {number} gutter Gutter of the source tiles.\n     * @param {FunctionType} getTileFunction\n     *     Function returning source tiles (z, x, y, pixelRatio).\n     * @param {number} [opt_errorThreshold] Acceptable reprojection error (in px).\n     * @param {boolean} [opt_renderEdges] Render reprojection edges.\n     * @param {object} [opt_contextOptions] Properties to set on the canvas context.\n     */\n    function ReprojTile(sourceProj, sourceTileGrid, targetProj, targetTileGrid, tileCoord, wrappedTileCoord, pixelRatio, gutter, getTileFunction, opt_errorThreshold, opt_renderEdges, opt_contextOptions) {\n        var _this = _super.call(this, tileCoord, TileState.IDLE) || this;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.renderEdges_ = opt_renderEdges !== undefined ? opt_renderEdges : false;\n        /**\n         * @private\n         * @type {object}\n         */\n        _this.contextOptions_ = opt_contextOptions;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.pixelRatio_ = pixelRatio;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.gutter_ = gutter;\n        /**\n         * @private\n         * @type {HTMLCanvasElement}\n         */\n        _this.canvas_ = null;\n        /**\n         * @private\n         * @type {import(\"../tilegrid/TileGrid.js\").default}\n         */\n        _this.sourceTileGrid_ = sourceTileGrid;\n        /**\n         * @private\n         * @type {import(\"../tilegrid/TileGrid.js\").default}\n         */\n        _this.targetTileGrid_ = targetTileGrid;\n        /**\n         * @private\n         * @type {import(\"../tilecoord.js\").TileCoord}\n         */\n        _this.wrappedTileCoord_ = wrappedTileCoord ? wrappedTileCoord : tileCoord;\n        /**\n         * @private\n         * @type {!Array<import(\"../Tile.js\").default>}\n         */\n        _this.sourceTiles_ = [];\n        /**\n         * @private\n         * @type {?Array<import(\"../events.js\").EventsKey>}\n         */\n        _this.sourcesListenerKeys_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.sourceZ_ = 0;\n        var targetExtent = targetTileGrid.getTileCoordExtent(_this.wrappedTileCoord_);\n        var maxTargetExtent = _this.targetTileGrid_.getExtent();\n        var maxSourceExtent = _this.sourceTileGrid_.getExtent();\n        var limitedTargetExtent = maxTargetExtent\n            ? getIntersection(targetExtent, maxTargetExtent)\n            : targetExtent;\n        if (getArea(limitedTargetExtent) === 0) {\n            // Tile is completely outside range -> EMPTY\n            // TODO: is it actually correct that the source even creates the tile ?\n            _this.state = TileState.EMPTY;\n            return _this;\n        }\n        var sourceProjExtent = sourceProj.getExtent();\n        if (sourceProjExtent) {\n            if (!maxSourceExtent) {\n                maxSourceExtent = sourceProjExtent;\n            }\n            else {\n                maxSourceExtent = getIntersection(maxSourceExtent, sourceProjExtent);\n            }\n        }\n        var targetResolution = targetTileGrid.getResolution(_this.wrappedTileCoord_[0]);\n        var sourceResolution = calculateSourceExtentResolution(sourceProj, targetProj, limitedTargetExtent, targetResolution);\n        if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n            // invalid sourceResolution -> EMPTY\n            // probably edges of the projections when no extent is defined\n            _this.state = TileState.EMPTY;\n            return _this;\n        }\n        var errorThresholdInPixels = opt_errorThreshold !== undefined ? opt_errorThreshold : ERROR_THRESHOLD;\n        /**\n         * @private\n         * @type {!import(\"./Triangulation.js\").default}\n         */\n        _this.triangulation_ = new Triangulation(sourceProj, targetProj, limitedTargetExtent, maxSourceExtent, sourceResolution * errorThresholdInPixels, targetResolution);\n        if (_this.triangulation_.getTriangles().length === 0) {\n            // no valid triangles -> EMPTY\n            _this.state = TileState.EMPTY;\n            return _this;\n        }\n        _this.sourceZ_ = sourceTileGrid.getZForResolution(sourceResolution);\n        var sourceExtent = _this.triangulation_.calculateSourceExtent();\n        if (maxSourceExtent) {\n            if (sourceProj.canWrapX()) {\n                sourceExtent[1] = clamp(sourceExtent[1], maxSourceExtent[1], maxSourceExtent[3]);\n                sourceExtent[3] = clamp(sourceExtent[3], maxSourceExtent[1], maxSourceExtent[3]);\n            }\n            else {\n                sourceExtent = getIntersection(sourceExtent, maxSourceExtent);\n            }\n        }\n        if (!getArea(sourceExtent)) {\n            _this.state = TileState.EMPTY;\n        }\n        else {\n            var sourceRange = sourceTileGrid.getTileRangeForExtentAndZ(sourceExtent, _this.sourceZ_);\n            for (var srcX = sourceRange.minX; srcX <= sourceRange.maxX; srcX++) {\n                for (var srcY = sourceRange.minY; srcY <= sourceRange.maxY; srcY++) {\n                    var tile = getTileFunction(_this.sourceZ_, srcX, srcY, pixelRatio);\n                    if (tile) {\n                        _this.sourceTiles_.push(tile);\n                    }\n                }\n            }\n            if (_this.sourceTiles_.length === 0) {\n                _this.state = TileState.EMPTY;\n            }\n        }\n        return _this;\n    }\n    /**\n     * Get the HTML Canvas element for this tile.\n     * @return {HTMLCanvasElement} Canvas.\n     */\n    ReprojTile.prototype.getImage = function () {\n        return this.canvas_;\n    };\n    /**\n     * @private\n     */\n    ReprojTile.prototype.reproject_ = function () {\n        var sources = [];\n        this.sourceTiles_.forEach(function (tile, i, arr) {\n            if (tile && tile.getState() == TileState.LOADED) {\n                sources.push({\n                    extent: this.sourceTileGrid_.getTileCoordExtent(tile.tileCoord),\n                    image: tile.getImage(),\n                });\n            }\n        }.bind(this));\n        this.sourceTiles_.length = 0;\n        if (sources.length === 0) {\n            this.state = TileState.ERROR;\n        }\n        else {\n            var z = this.wrappedTileCoord_[0];\n            var size = this.targetTileGrid_.getTileSize(z);\n            var width = typeof size === 'number' ? size : size[0];\n            var height = typeof size === 'number' ? size : size[1];\n            var targetResolution = this.targetTileGrid_.getResolution(z);\n            var sourceResolution = this.sourceTileGrid_.getResolution(this.sourceZ_);\n            var targetExtent = this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);\n            this.canvas_ = renderReprojected(width, height, this.pixelRatio_, sourceResolution, this.sourceTileGrid_.getExtent(), targetResolution, targetExtent, this.triangulation_, sources, this.gutter_, this.renderEdges_, this.contextOptions_);\n            this.state = TileState.LOADED;\n        }\n        this.changed();\n    };\n    /**\n     * Load not yet loaded URI.\n     */\n    ReprojTile.prototype.load = function () {\n        if (this.state == TileState.IDLE) {\n            this.state = TileState.LOADING;\n            this.changed();\n            var leftToLoad_1 = 0;\n            this.sourcesListenerKeys_ = [];\n            this.sourceTiles_.forEach(function (tile, i, arr) {\n                var state = tile.getState();\n                if (state == TileState.IDLE || state == TileState.LOADING) {\n                    leftToLoad_1++;\n                    var sourceListenKey_1 = listen(tile, EventType.CHANGE, function (e) {\n                        var state = tile.getState();\n                        if (state == TileState.LOADED ||\n                            state == TileState.ERROR ||\n                            state == TileState.EMPTY) {\n                            unlistenByKey(sourceListenKey_1);\n                            leftToLoad_1--;\n                            if (leftToLoad_1 === 0) {\n                                this.unlistenSources_();\n                                this.reproject_();\n                            }\n                        }\n                    }, this);\n                    this.sourcesListenerKeys_.push(sourceListenKey_1);\n                }\n            }.bind(this));\n            if (leftToLoad_1 === 0) {\n                setTimeout(this.reproject_.bind(this), 0);\n            }\n            else {\n                this.sourceTiles_.forEach(function (tile, i, arr) {\n                    var state = tile.getState();\n                    if (state == TileState.IDLE) {\n                        tile.load();\n                    }\n                });\n            }\n        }\n    };\n    /**\n     * @private\n     */\n    ReprojTile.prototype.unlistenSources_ = function () {\n        this.sourcesListenerKeys_.forEach(unlistenByKey);\n        this.sourcesListenerKeys_ = null;\n    };\n    return ReprojTile;\n}(Tile));\nexport default ReprojTile;\n//# sourceMappingURL=Tile.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/source/TileImage\n */\nimport EventType from '../events/EventType.js';\nimport ImageTile from '../ImageTile.js';\nimport ReprojTile from '../reproj/Tile.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport UrlTile from './UrlTile.js';\nimport { ENABLE_RASTER_REPROJECTION } from '../reproj/common.js';\nimport { IMAGE_SMOOTHING_DISABLED } from './common.js';\nimport { equivalent, get as getProjection } from '../proj.js';\nimport { getKey, getKeyZXY } from '../tilecoord.js';\nimport { getForProjection as getTileGridForProjection } from '../tilegrid.js';\nimport { getUid } from '../util.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"./State.js\").default} [state] Source state.\n * @property {typeof import(\"../ImageTile.js\").default} [tileClass] Class used to instantiate image tiles.\n * Default is {@link module:ol/ImageTile~ImageTile}.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service. For example, if the tile\n * service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be\n * used instead of defining each one separately in the `urls` option.\n * @property {Array<string>} [urls] An array of URL templates.\n * @property {boolean} [wrapX] Whether to wrap the world horizontally. The default, is to\n * request out-of-bounds tiles from the server. When set to `false`, only one\n * world will be rendered. When set to `true`, tiles will be requested for one\n * world only, but they will be wrapped horizontally to render multiple worlds.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {string} [key] Optional tile key for proper cache fetching\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n/**\n * @classdesc\n * Base class for sources providing images divided into a tile grid.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n * @api\n */\nvar TileImage = /** @class */ (function (_super) {\n    __extends(TileImage, _super);\n    /**\n     * @param {!Options} options Image tile options.\n     */\n    function TileImage(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            opaque: options.opaque,\n            projection: options.projection,\n            state: options.state,\n            tileGrid: options.tileGrid,\n            tileLoadFunction: options.tileLoadFunction\n                ? options.tileLoadFunction\n                : defaultTileLoadFunction,\n            tilePixelRatio: options.tilePixelRatio,\n            tileUrlFunction: options.tileUrlFunction,\n            url: options.url,\n            urls: options.urls,\n            wrapX: options.wrapX,\n            transition: options.transition,\n            key: options.key,\n            attributionsCollapsible: options.attributionsCollapsible,\n            zDirection: options.zDirection,\n        }) || this;\n        /**\n         * @protected\n         * @type {?string}\n         */\n        _this.crossOrigin =\n            options.crossOrigin !== undefined ? options.crossOrigin : null;\n        /**\n         * @protected\n         * @type {typeof ImageTile}\n         */\n        _this.tileClass =\n            options.tileClass !== undefined ? options.tileClass : ImageTile;\n        /**\n         * @protected\n         * @type {!Object<string, TileCache>}\n         */\n        _this.tileCacheForProjection = {};\n        /**\n         * @protected\n         * @type {!Object<string, import(\"../tilegrid/TileGrid.js\").default>}\n         */\n        _this.tileGridForProjection = {};\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.reprojectionErrorThreshold_ = options.reprojectionErrorThreshold;\n        /**\n         * @private\n         * @type {object|undefined}\n         */\n        _this.contextOptions_ =\n            options.imageSmoothing === false ? IMAGE_SMOOTHING_DISABLED : undefined;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.renderReprojectionEdges_ = false;\n        return _this;\n    }\n    /**\n     * @return {boolean} Can expire cache.\n     */\n    TileImage.prototype.canExpireCache = function () {\n        if (!ENABLE_RASTER_REPROJECTION) {\n            return _super.prototype.canExpireCache.call(this);\n        }\n        if (this.tileCache.canExpireCache()) {\n            return true;\n        }\n        else {\n            for (var key in this.tileCacheForProjection) {\n                if (this.tileCacheForProjection[key].canExpireCache()) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {!Object<string, boolean>} usedTiles Used tiles.\n     */\n    TileImage.prototype.expireCache = function (projection, usedTiles) {\n        if (!ENABLE_RASTER_REPROJECTION) {\n            _super.prototype.expireCache.call(this, projection, usedTiles);\n            return;\n        }\n        var usedTileCache = this.getTileCacheForProjection(projection);\n        this.tileCache.expireCache(this.tileCache == usedTileCache ? usedTiles : {});\n        for (var id in this.tileCacheForProjection) {\n            var tileCache = this.tileCacheForProjection[id];\n            tileCache.expireCache(tileCache == usedTileCache ? usedTiles : {});\n        }\n    };\n    /**\n     * @return {Object|undefined} Context options.\n     */\n    TileImage.prototype.getContextOptions = function () {\n        return this.contextOptions_;\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {number} Gutter.\n     */\n    TileImage.prototype.getGutterForProjection = function (projection) {\n        if (ENABLE_RASTER_REPROJECTION &&\n            this.getProjection() &&\n            projection &&\n            !equivalent(this.getProjection(), projection)) {\n            return 0;\n        }\n        else {\n            return this.getGutter();\n        }\n    };\n    /**\n     * @return {number} Gutter.\n     */\n    TileImage.prototype.getGutter = function () {\n        return 0;\n    };\n    /**\n     * Return the key to be used for all tiles in the source.\n     * @return {string} The key for all tiles.\n     * @protected\n     */\n    TileImage.prototype.getKey = function () {\n        return (_super.prototype.getKey.call(this) +\n            (this.contextOptions_ ? '\\n' + JSON.stringify(this.contextOptions_) : ''));\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {boolean} Opaque.\n     */\n    TileImage.prototype.getOpaque = function (projection) {\n        if (ENABLE_RASTER_REPROJECTION &&\n            this.getProjection() &&\n            projection &&\n            !equivalent(this.getProjection(), projection)) {\n            return false;\n        }\n        else {\n            return _super.prototype.getOpaque.call(this, projection);\n        }\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n     */\n    TileImage.prototype.getTileGridForProjection = function (projection) {\n        if (!ENABLE_RASTER_REPROJECTION) {\n            return _super.prototype.getTileGridForProjection.call(this, projection);\n        }\n        var thisProj = this.getProjection();\n        if (this.tileGrid && (!thisProj || equivalent(thisProj, projection))) {\n            return this.tileGrid;\n        }\n        else {\n            var projKey = getUid(projection);\n            if (!(projKey in this.tileGridForProjection)) {\n                this.tileGridForProjection[projKey] =\n                    getTileGridForProjection(projection);\n            }\n            return this.tileGridForProjection[projKey];\n        }\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../TileCache.js\").default} Tile cache.\n     */\n    TileImage.prototype.getTileCacheForProjection = function (projection) {\n        if (!ENABLE_RASTER_REPROJECTION) {\n            return _super.prototype.getTileCacheForProjection.call(this, projection);\n        }\n        var thisProj = this.getProjection();\n        if (!thisProj || equivalent(thisProj, projection)) {\n            return this.tileCache;\n        }\n        else {\n            var projKey = getUid(projection);\n            if (!(projKey in this.tileCacheForProjection)) {\n                this.tileCacheForProjection[projKey] = new TileCache(this.tileCache.highWaterMark);\n            }\n            return this.tileCacheForProjection[projKey];\n        }\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {string} key The key set on the tile.\n     * @return {!import(\"../Tile.js\").default} Tile.\n     * @private\n     */\n    TileImage.prototype.createTile_ = function (z, x, y, pixelRatio, projection, key) {\n        var tileCoord = [z, x, y];\n        var urlTileCoord = this.getTileCoordForTileUrlFunction(tileCoord, projection);\n        var tileUrl = urlTileCoord\n            ? this.tileUrlFunction(urlTileCoord, pixelRatio, projection)\n            : undefined;\n        var tile = new this.tileClass(tileCoord, tileUrl !== undefined ? TileState.IDLE : TileState.EMPTY, tileUrl !== undefined ? tileUrl : '', this.crossOrigin, this.tileLoadFunction, this.tileOptions);\n        tile.key = key;\n        tile.addEventListener(EventType.CHANGE, this.handleTileChange.bind(this));\n        return tile;\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!import(\"../Tile.js\").default} Tile.\n     */\n    TileImage.prototype.getTile = function (z, x, y, pixelRatio, projection) {\n        var sourceProjection = this.getProjection();\n        if (!ENABLE_RASTER_REPROJECTION ||\n            !sourceProjection ||\n            !projection ||\n            equivalent(sourceProjection, projection)) {\n            return this.getTileInternal(z, x, y, pixelRatio, sourceProjection || projection);\n        }\n        else {\n            var cache = this.getTileCacheForProjection(projection);\n            var tileCoord = [z, x, y];\n            var tile = void 0;\n            var tileCoordKey = getKey(tileCoord);\n            if (cache.containsKey(tileCoordKey)) {\n                tile = cache.get(tileCoordKey);\n            }\n            var key = this.getKey();\n            if (tile && tile.key == key) {\n                return tile;\n            }\n            else {\n                var sourceTileGrid = this.getTileGridForProjection(sourceProjection);\n                var targetTileGrid = this.getTileGridForProjection(projection);\n                var wrappedTileCoord = this.getTileCoordForTileUrlFunction(tileCoord, projection);\n                var newTile = new ReprojTile(sourceProjection, sourceTileGrid, projection, targetTileGrid, tileCoord, wrappedTileCoord, this.getTilePixelRatio(pixelRatio), this.getGutter(), function (z, x, y, pixelRatio) {\n                    return this.getTileInternal(z, x, y, pixelRatio, sourceProjection);\n                }.bind(this), this.reprojectionErrorThreshold_, this.renderReprojectionEdges_, this.contextOptions_);\n                newTile.key = key;\n                if (tile) {\n                    newTile.interimTile = tile;\n                    newTile.refreshInterimChain();\n                    cache.replace(tileCoordKey, newTile);\n                }\n                else {\n                    cache.set(tileCoordKey, newTile);\n                }\n                return newTile;\n            }\n        }\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {!import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!import(\"../Tile.js\").default} Tile.\n     * @protected\n     */\n    TileImage.prototype.getTileInternal = function (z, x, y, pixelRatio, projection) {\n        var tile = null;\n        var tileCoordKey = getKeyZXY(z, x, y);\n        var key = this.getKey();\n        if (!this.tileCache.containsKey(tileCoordKey)) {\n            tile = this.createTile_(z, x, y, pixelRatio, projection, key);\n            this.tileCache.set(tileCoordKey, tile);\n        }\n        else {\n            tile = this.tileCache.get(tileCoordKey);\n            if (tile.key != key) {\n                // The source's params changed. If the tile has an interim tile and if we\n                // can use it then we use it. Otherwise we create a new tile.  In both\n                // cases we attempt to assign an interim tile to the new tile.\n                var interimTile = tile;\n                tile = this.createTile_(z, x, y, pixelRatio, projection, key);\n                //make the new tile the head of the list,\n                if (interimTile.getState() == TileState.IDLE) {\n                    //the old tile hasn't begun loading yet, and is now outdated, so we can simply discard it\n                    tile.interimTile = interimTile.interimTile;\n                }\n                else {\n                    tile.interimTile = interimTile;\n                }\n                tile.refreshInterimChain();\n                this.tileCache.replace(tileCoordKey, tile);\n            }\n        }\n        return tile;\n    };\n    /**\n     * Sets whether to render reprojection edges or not (usually for debugging).\n     * @param {boolean} render Render the edges.\n     * @api\n     */\n    TileImage.prototype.setRenderReprojectionEdges = function (render) {\n        if (!ENABLE_RASTER_REPROJECTION ||\n            this.renderReprojectionEdges_ == render) {\n            return;\n        }\n        this.renderReprojectionEdges_ = render;\n        for (var id in this.tileCacheForProjection) {\n            this.tileCacheForProjection[id].clear();\n        }\n        this.changed();\n    };\n    /**\n     * Sets the tile grid to use when reprojecting the tiles to the given\n     * projection instead of the default tile grid for the projection.\n     *\n     * This can be useful when the default tile grid cannot be created\n     * (e.g. projection has no extent defined) or\n     * for optimization reasons (custom tile size, resolutions, ...).\n     *\n     * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n     * @param {import(\"../tilegrid/TileGrid.js\").default} tilegrid Tile grid to use for the projection.\n     * @api\n     */\n    TileImage.prototype.setTileGridForProjection = function (projection, tilegrid) {\n        if (ENABLE_RASTER_REPROJECTION) {\n            var proj = getProjection(projection);\n            if (proj) {\n                var projKey = getUid(proj);\n                if (!(projKey in this.tileGridForProjection)) {\n                    this.tileGridForProjection[projKey] = tilegrid;\n                }\n            }\n        }\n    };\n    return TileImage;\n}(UrlTile));\n/**\n * @param {ImageTile} imageTile Image tile.\n * @param {string} src Source.\n */\nfunction defaultTileLoadFunction(imageTile, src) {\n    /** @type {HTMLImageElement|HTMLVideoElement} */ (imageTile.getImage()).src =\n        src;\n}\nexport default TileImage;\n//# sourceMappingURL=TileImage.js.map","/**\n * @module ol/geom/flat/deflate\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinate(flatCoordinates, offset, coordinate, stride) {\n    for (var i = 0, ii = coordinate.length; i < ii; ++i) {\n        flatCoordinates[offset++] = coordinate[i];\n    }\n    return offset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<import(\"../../coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinates(flatCoordinates, offset, coordinates, stride) {\n    for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n        var coordinate = coordinates[i];\n        for (var j = 0; j < stride; ++j) {\n            flatCoordinates[offset++] = coordinate[j];\n        }\n    }\n    return offset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<import(\"../../coordinate.js\").Coordinate>>} coordinatess Coordinatess.\n * @param {number} stride Stride.\n * @param {Array<number>} [opt_ends] Ends.\n * @return {Array<number>} Ends.\n */\nexport function deflateCoordinatesArray(flatCoordinates, offset, coordinatess, stride, opt_ends) {\n    var ends = opt_ends ? opt_ends : [];\n    var i = 0;\n    for (var j = 0, jj = coordinatess.length; j < jj; ++j) {\n        var end = deflateCoordinates(flatCoordinates, offset, coordinatess[j], stride);\n        ends[i++] = end;\n        offset = end;\n    }\n    ends.length = i;\n    return ends;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} coordinatesss Coordinatesss.\n * @param {number} stride Stride.\n * @param {Array<Array<number>>} [opt_endss] Endss.\n * @return {Array<Array<number>>} Endss.\n */\nexport function deflateMultiCoordinatesArray(flatCoordinates, offset, coordinatesss, stride, opt_endss) {\n    var endss = opt_endss ? opt_endss : [];\n    var i = 0;\n    for (var j = 0, jj = coordinatesss.length; j < jj; ++j) {\n        var ends = deflateCoordinatesArray(flatCoordinates, offset, coordinatesss[j], stride, endss[i]);\n        endss[i++] = ends;\n        offset = ends[ends.length - 1];\n    }\n    endss.length = i;\n    return endss;\n}\n//# sourceMappingURL=deflate.js.map","/**\n * @module ol/reproj/common\n */\n/**\n * Default maximum allowed threshold  (in pixels) for reprojection\n * triangulation.\n * @type {number}\n */\nexport var ERROR_THRESHOLD = 0.5;\n/**\n * Enable automatic reprojection of raster sources. Default is `true`.\n * TODO: decide if we want to expose this as a build flag or remove it\n * @type {boolean}\n */\nexport var ENABLE_RASTER_REPROJECTION = true;\n//# sourceMappingURL=common.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Layer\n */\nimport BaseLayer from './Base.js';\nimport EventType from '../events/EventType.js';\nimport LayerProperty from './Property.js';\nimport RenderEventType from '../render/EventType.js';\nimport SourceState from '../source/State.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @typedef {function(import(\"../PluggableMap.js\").FrameState):HTMLElement} RenderFunction\n */\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable\").OnSignature<import(\"./Base\").BaseLayerObjectEventTypes|\n *     'change:source', import(\"../Object\").ObjectEvent, Return> &\n *   import(\"../Observable\").OnSignature<import(\"../render/EventType\").LayerRenderEventTypes, import(\"../render/Event\").default, Return> &\n *   import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"./Base\").BaseLayerObjectEventTypes|'change:source'|\n *     import(\"../render/EventType\").LayerRenderEventTypes, Return>} LayerOnSignature\n */\n/**\n * @template {import(\"../source/Source.js\").default} SourceType\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {SourceType} [source] Source for this layer.  If not provided to the constructor,\n * the source can be set by calling {@link module:ol/layer/Layer~Layer#setSource layer.setSource(source)} after\n * construction.\n * @property {import(\"../PluggableMap.js\").default} [map] Map.\n * @property {RenderFunction} [render] Render function. Takes the frame state as input and is expected to return an\n * HTML element. Will overwrite the default rendering for the layer.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n/**\n * @typedef {Object} State\n * @property {import(\"./Layer.js\").default} layer Layer.\n * @property {number} opacity Opacity, the value is rounded to two digits to appear after the decimal point.\n * @property {import(\"../source/State.js\").default} sourceState SourceState.\n * @property {boolean} visible Visible.\n * @property {boolean} managed Managed.\n * @property {import(\"../extent.js\").Extent} [extent] Extent.\n * @property {number} zIndex ZIndex.\n * @property {number} maxResolution Maximum resolution.\n * @property {number} minResolution Minimum resolution.\n * @property {number} minZoom Minimum zoom.\n * @property {number} maxZoom Maximum zoom.\n */\n/**\n * @classdesc\n * Base class from which all layer types are derived. This should only be instantiated\n * in the case where a custom layer is be added to the map with a custom `render` function.\n * Such a function can be specified in the `options` object, and is expected to return an HTML element.\n *\n * A visual representation of raster or vector map data.\n * Layers group together those properties that pertain to how the data is to be\n * displayed, irrespective of the source of that data.\n *\n * Layers are usually added to a map with {@link import(\"../PluggableMap.js\").default#addLayer map.addLayer()}. Components\n * like {@link module:ol/interaction/Select~Select} use unmanaged layers\n * internally. These unmanaged layers are associated with the map using\n * {@link module:ol/layer/Layer~Layer#setMap} instead.\n *\n * A generic `change` event is fired when the state of the source changes.\n *\n * Please note that for performance reasons several layers might get rendered to\n * the same HTML element, which will cause {@link import(\"../PluggableMap.js\").default#forEachLayerAtPixel map.forEachLayerAtPixel()} to\n * give false positives. To avoid this, apply different `className` properties to the\n * layers at creation time.\n *\n * @fires import(\"../render/Event.js\").RenderEvent#prerender\n * @fires import(\"../render/Event.js\").RenderEvent#postrender\n *\n * @template {import(\"../source/Source.js\").default} SourceType\n * @api\n */\nvar Layer = /** @class */ (function (_super) {\n    __extends(Layer, _super);\n    /**\n     * @param {Options<SourceType>} options Layer options.\n     */\n    function Layer(options) {\n        var _this = this;\n        var baseOptions = assign({}, options);\n        delete baseOptions.source;\n        _this = _super.call(this, baseOptions) || this;\n        /***\n         * @type {LayerOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {LayerOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {LayerOnSignature<void>}\n         */\n        _this.un;\n        /**\n         * @private\n         * @type {?import(\"../events.js\").EventsKey}\n         */\n        _this.mapPrecomposeKey_ = null;\n        /**\n         * @private\n         * @type {?import(\"../events.js\").EventsKey}\n         */\n        _this.mapRenderKey_ = null;\n        /**\n         * @private\n         * @type {?import(\"../events.js\").EventsKey}\n         */\n        _this.sourceChangeKey_ = null;\n        /**\n         * @private\n         * @type {import(\"../renderer/Layer.js\").default}\n         */\n        _this.renderer_ = null;\n        // Overwrite default render method with a custom one\n        if (options.render) {\n            _this.render = options.render;\n        }\n        if (options.map) {\n            _this.setMap(options.map);\n        }\n        _this.addChangeListener(LayerProperty.SOURCE, _this.handleSourcePropertyChange_);\n        var source = options.source\n            ? /** @type {SourceType} */ (options.source)\n            : null;\n        _this.setSource(source);\n        return _this;\n    }\n    /**\n     * @param {Array<import(\"./Layer.js\").default>} [opt_array] Array of layers (to be modified in place).\n     * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n     */\n    Layer.prototype.getLayersArray = function (opt_array) {\n        var array = opt_array ? opt_array : [];\n        array.push(this);\n        return array;\n    };\n    /**\n     * @param {Array<import(\"./Layer.js\").State>} [opt_states] Optional list of layer states (to be modified in place).\n     * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n     */\n    Layer.prototype.getLayerStatesArray = function (opt_states) {\n        var states = opt_states ? opt_states : [];\n        states.push(this.getLayerState());\n        return states;\n    };\n    /**\n     * Get the layer source.\n     * @return {SourceType} The layer source (or `null` if not yet set).\n     * @observable\n     * @api\n     */\n    Layer.prototype.getSource = function () {\n        return /** @type {SourceType} */ (this.get(LayerProperty.SOURCE)) || null;\n    };\n    /**\n     * @return {import(\"../source/State.js\").default} Source state.\n     */\n    Layer.prototype.getSourceState = function () {\n        var source = this.getSource();\n        return !source ? SourceState.UNDEFINED : source.getState();\n    };\n    /**\n     * @private\n     */\n    Layer.prototype.handleSourceChange_ = function () {\n        this.changed();\n    };\n    /**\n     * @private\n     */\n    Layer.prototype.handleSourcePropertyChange_ = function () {\n        if (this.sourceChangeKey_) {\n            unlistenByKey(this.sourceChangeKey_);\n            this.sourceChangeKey_ = null;\n        }\n        var source = this.getSource();\n        if (source) {\n            this.sourceChangeKey_ = listen(source, EventType.CHANGE, this.handleSourceChange_, this);\n        }\n        this.changed();\n    };\n    /**\n     * @param {import(\"../pixel\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with\n     * an array of features.\n     */\n    Layer.prototype.getFeatures = function (pixel) {\n        if (!this.renderer_) {\n            return new Promise(function (resolve) { return resolve([]); });\n        }\n        return this.renderer_.getFeatures(pixel);\n    };\n    /**\n     * In charge to manage the rendering of the layer. One layer type is\n     * bounded with one layer renderer.\n     * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target which the renderer may (but need not) use\n     * for rendering its content.\n     * @return {HTMLElement} The rendered element.\n     */\n    Layer.prototype.render = function (frameState, target) {\n        var layerRenderer = this.getRenderer();\n        if (layerRenderer.prepareFrame(frameState)) {\n            return layerRenderer.renderFrame(frameState, target);\n        }\n    };\n    /**\n     * Sets the layer to be rendered on top of other layers on a map. The map will\n     * not manage this layer in its layers collection, and the callback in\n     * {@link module:ol/Map~Map#forEachLayerAtPixel} will receive `null` as layer. This\n     * is useful for temporary layers. To remove an unmanaged layer from the map,\n     * use `#setMap(null)`.\n     *\n     * To add the layer to a map and have it managed by the map, use\n     * {@link module:ol/Map~Map#addLayer} instead.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @api\n     */\n    Layer.prototype.setMap = function (map) {\n        if (this.mapPrecomposeKey_) {\n            unlistenByKey(this.mapPrecomposeKey_);\n            this.mapPrecomposeKey_ = null;\n        }\n        if (!map) {\n            this.changed();\n        }\n        if (this.mapRenderKey_) {\n            unlistenByKey(this.mapRenderKey_);\n            this.mapRenderKey_ = null;\n        }\n        if (map) {\n            this.mapPrecomposeKey_ = listen(map, RenderEventType.PRECOMPOSE, function (evt) {\n                var renderEvent = \n                /** @type {import(\"../render/Event.js\").default} */ (evt);\n                var layerStatesArray = renderEvent.frameState.layerStatesArray;\n                var layerState = this.getLayerState(false);\n                // A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both.\n                assert(!layerStatesArray.some(function (arrayLayerState) {\n                    return arrayLayerState.layer === layerState.layer;\n                }), 67);\n                layerStatesArray.push(layerState);\n            }, this);\n            this.mapRenderKey_ = listen(this, EventType.CHANGE, map.render, map);\n            this.changed();\n        }\n    };\n    /**\n     * Set the layer source.\n     * @param {SourceType} source The layer source.\n     * @observable\n     * @api\n     */\n    Layer.prototype.setSource = function (source) {\n        this.set(LayerProperty.SOURCE, source);\n    };\n    /**\n     * Get the renderer for this layer.\n     * @return {import(\"../renderer/Layer.js\").default} The layer renderer.\n     */\n    Layer.prototype.getRenderer = function () {\n        if (!this.renderer_) {\n            this.renderer_ = this.createRenderer();\n        }\n        return this.renderer_;\n    };\n    /**\n     * @return {boolean} The layer has a renderer.\n     */\n    Layer.prototype.hasRenderer = function () {\n        return !!this.renderer_;\n    };\n    /**\n     * Create a renderer for this layer.\n     * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n     * @protected\n     */\n    Layer.prototype.createRenderer = function () {\n        return null;\n    };\n    /**\n     * Clean up.\n     */\n    Layer.prototype.disposeInternal = function () {\n        this.setSource(null);\n        _super.prototype.disposeInternal.call(this);\n    };\n    return Layer;\n}(BaseLayer));\n/**\n * Return `true` if the layer is visible and if the provided view state\n * has resolution and zoom levels that are in range of the layer's min/max.\n * @param {State} layerState Layer state.\n * @param {import(\"../View.js\").State} viewState View state.\n * @return {boolean} The layer is visible at the given view state.\n */\nexport function inView(layerState, viewState) {\n    if (!layerState.visible) {\n        return false;\n    }\n    var resolution = viewState.resolution;\n    if (resolution < layerState.minResolution ||\n        resolution >= layerState.maxResolution) {\n        return false;\n    }\n    var zoom = viewState.zoom;\n    return zoom > layerState.minZoom && zoom <= layerState.maxZoom;\n}\nexport default Layer;\n//# sourceMappingURL=Layer.js.map","/**\n * @module ol/format/FormatType\n */\n/**\n * @enum {string}\n */\nexport default {\n    ARRAY_BUFFER: 'arraybuffer',\n    JSON: 'json',\n    TEXT: 'text',\n    XML: 'xml',\n};\n//# sourceMappingURL=FormatType.js.map","/**\n * @module ol/tileurlfunction\n */\nimport { assert } from './asserts.js';\nimport { modulo } from './math.js';\nimport { hash as tileCoordHash } from './tilecoord.js';\n/**\n * @param {string} template Template.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTemplate(template, tileGrid) {\n    var zRegEx = /\\{z\\}/g;\n    var xRegEx = /\\{x\\}/g;\n    var yRegEx = /\\{y\\}/g;\n    var dashYRegEx = /\\{-y\\}/g;\n    return (\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"./proj/Projection.js\").default} projection Projection.\n     * @return {string|undefined} Tile URL.\n     */\n    function (tileCoord, pixelRatio, projection) {\n        if (!tileCoord) {\n            return undefined;\n        }\n        else {\n            return template\n                .replace(zRegEx, tileCoord[0].toString())\n                .replace(xRegEx, tileCoord[1].toString())\n                .replace(yRegEx, tileCoord[2].toString())\n                .replace(dashYRegEx, function () {\n                var z = tileCoord[0];\n                var range = tileGrid.getFullTileRange(z);\n                assert(range, 55); // The {-y} placeholder requires a tile grid with extent\n                var y = range.getHeight() - tileCoord[2] - 1;\n                return y.toString();\n            });\n        }\n    });\n}\n/**\n * @param {Array<string>} templates Templates.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTemplates(templates, tileGrid) {\n    var len = templates.length;\n    var tileUrlFunctions = new Array(len);\n    for (var i = 0; i < len; ++i) {\n        tileUrlFunctions[i] = createFromTemplate(templates[i], tileGrid);\n    }\n    return createFromTileUrlFunctions(tileUrlFunctions);\n}\n/**\n * @param {Array<import(\"./Tile.js\").UrlFunction>} tileUrlFunctions Tile URL Functions.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTileUrlFunctions(tileUrlFunctions) {\n    if (tileUrlFunctions.length === 1) {\n        return tileUrlFunctions[0];\n    }\n    return (\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"./proj/Projection.js\").default} projection Projection.\n     * @return {string|undefined} Tile URL.\n     */\n    function (tileCoord, pixelRatio, projection) {\n        if (!tileCoord) {\n            return undefined;\n        }\n        else {\n            var h = tileCoordHash(tileCoord);\n            var index = modulo(h, tileUrlFunctions.length);\n            return tileUrlFunctions[index](tileCoord, pixelRatio, projection);\n        }\n    });\n}\n/**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\nexport function nullTileUrlFunction(tileCoord, pixelRatio, projection) {\n    return undefined;\n}\n/**\n * @param {string} url URL.\n * @return {Array<string>} Array of urls.\n */\nexport function expandUrl(url) {\n    var urls = [];\n    var match = /\\{([a-z])-([a-z])\\}/.exec(url);\n    if (match) {\n        // char range\n        var startCharCode = match[1].charCodeAt(0);\n        var stopCharCode = match[2].charCodeAt(0);\n        var charCode = void 0;\n        for (charCode = startCharCode; charCode <= stopCharCode; ++charCode) {\n            urls.push(url.replace(match[0], String.fromCharCode(charCode)));\n        }\n        return urls;\n    }\n    match = /\\{(\\d+)-(\\d+)\\}/.exec(url);\n    if (match) {\n        // number range\n        var stop_1 = parseInt(match[2], 10);\n        for (var i = parseInt(match[1], 10); i <= stop_1; i++) {\n            urls.push(url.replace(match[0], i.toString()));\n        }\n        return urls;\n    }\n    urls.push(url);\n    return urls;\n}\n//# sourceMappingURL=tileurlfunction.js.map","/**\n * @module ol/render/EventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    /**\n     * Triggered before a layer is rendered.\n     * @event module:ol/render/Event~RenderEvent#prerender\n     * @api\n     */\n    PRERENDER: 'prerender',\n    /**\n     * Triggered after a layer is rendered.\n     * @event module:ol/render/Event~RenderEvent#postrender\n     * @api\n     */\n    POSTRENDER: 'postrender',\n    /**\n     * Triggered before layers are rendered.\n     * The event object will not have a `context` set.\n     * @event module:ol/render/Event~RenderEvent#precompose\n     * @api\n     */\n    PRECOMPOSE: 'precompose',\n    /**\n     * Triggered after all layers are rendered.\n     * The event object will not have a `context` set.\n     * @event module:ol/render/Event~RenderEvent#postcompose\n     * @api\n     */\n    POSTCOMPOSE: 'postcompose',\n    /**\n     * Triggered when rendering is complete, i.e. all sources and tiles have\n     * finished loading for the current viewport, and all tiles are faded in.\n     * The event object will not have a `context` set.\n     * @event module:ol/render/Event~RenderEvent#rendercomplete\n     * @api\n     */\n    RENDERCOMPLETE: 'rendercomplete',\n};\n/**\n * @typedef {'postrender'|'precompose'|'postcompose'|'rendercomplete'} MapRenderEventTypes\n */\n/**\n * @typedef {'postrender'|'prerender'} LayerRenderEventTypes\n */\n//# sourceMappingURL=EventType.js.map","var superPropBase = require(\"./superPropBase\");\n\nfunction _get(target, property, receiver) {\n  if (typeof Reflect !== \"undefined\" && Reflect.get) {\n    module.exports = _get = Reflect.get;\n  } else {\n    module.exports = _get = function _get(target, property, receiver) {\n      var base = superPropBase(target, property);\n      if (!base) return;\n      var desc = Object.getOwnPropertyDescriptor(base, property);\n\n      if (desc.get) {\n        return desc.get.call(receiver);\n      }\n\n      return desc.value;\n    };\n  }\n\n  return _get(target, property, receiver || target);\n}\n\nmodule.exports = _get;","/**\n * @module ol/source/common\n */\n/**\n * Default WMS version.\n * @type {string}\n */\nexport var DEFAULT_WMS_VERSION = '1.3.0';\n/**\n * Context options to disable image smoothing.\n * @type {Object}\n */\nexport var IMAGE_SMOOTHING_DISABLED = {\n    imageSmoothingEnabled: false,\n    msImageSmoothingEnabled: false,\n};\n//# sourceMappingURL=common.js.map","/**\n * @module ol/OverlayPositioning\n */\n/**\n * Overlay position: `'bottom-left'`, `'bottom-center'`,  `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, `'top-right'`\n * @enum {string}\n */\nexport default {\n    BOTTOM_LEFT: 'bottom-left',\n    BOTTOM_CENTER: 'bottom-center',\n    BOTTOM_RIGHT: 'bottom-right',\n    CENTER_LEFT: 'center-left',\n    CENTER_CENTER: 'center-center',\n    CENTER_RIGHT: 'center-right',\n    TOP_LEFT: 'top-left',\n    TOP_CENTER: 'top-center',\n    TOP_RIGHT: 'top-right',\n};\n//# sourceMappingURL=OverlayPositioning.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/Attribution\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport { CLASS_COLLAPSED, CLASS_CONTROL, CLASS_UNSELECTABLE } from '../css.js';\nimport { equals } from '../array.js';\nimport { inView } from '../layer/Layer.js';\nimport { removeChildren, replaceNode } from '../dom.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-attribution'] CSS class name.\n * @property {HTMLElement|string} [target] Specify a target if you\n * want the control to be rendered outside of the map's\n * viewport.\n * @property {boolean} [collapsible] Specify if attributions can\n * be collapsed. If not specified, sources control this behavior with their\n * `attributionsCollapsible` setting.\n * @property {boolean} [collapsed=true] Specify if attributions should\n * be collapsed at startup.\n * @property {string} [tipLabel='Attributions'] Text label to use for the button tip.\n * @property {string} [label='i'] Text label to use for the\n * collapsed attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [expandClassName=className + '-expand'] CSS class name for the\n * collapsed attributions button.\n * @property {string|HTMLElement} [collapseLabel='»'] Text label to use\n * for the expanded attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [collapseClassName=className + '-collapse'] CSS class name for the\n * expanded attributions button.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when\n * the control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n */\n/**\n * @classdesc\n * Control to show all the attributions associated with the layer sources\n * in the map. This control is one of the default controls included in maps.\n * By default it will show in the bottom right portion of the map, but this can\n * be changed by using a css selector for `.ol-attribution`.\n *\n * @api\n */\nvar Attribution = /** @class */ (function (_super) {\n    __extends(Attribution, _super);\n    /**\n     * @param {Options} [opt_options] Attribution options.\n     */\n    function Attribution(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            render: options.render,\n            target: options.target,\n        }) || this;\n        /**\n         * @private\n         * @type {HTMLElement}\n         */\n        _this.ulElement_ = document.createElement('ul');\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.collapsed_ =\n            options.collapsed !== undefined ? options.collapsed : true;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.userCollapsed_ = _this.collapsed_;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.overrideCollapsible_ = options.collapsible !== undefined;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.collapsible_ =\n            options.collapsible !== undefined ? options.collapsible : true;\n        if (!_this.collapsible_) {\n            _this.collapsed_ = false;\n        }\n        var className = options.className !== undefined ? options.className : 'ol-attribution';\n        var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Attributions';\n        var expandClassName = options.expandClassName !== undefined\n            ? options.expandClassName\n            : className + '-expand';\n        var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\\u00BB';\n        var collapseClassName = options.collapseClassName !== undefined\n            ? options.collapseClassName\n            : className + '-collpase';\n        if (typeof collapseLabel === 'string') {\n            /**\n             * @private\n             * @type {HTMLElement}\n             */\n            _this.collapseLabel_ = document.createElement('span');\n            _this.collapseLabel_.textContent = collapseLabel;\n            _this.collapseLabel_.className = collapseClassName;\n        }\n        else {\n            _this.collapseLabel_ = collapseLabel;\n        }\n        var label = options.label !== undefined ? options.label : 'i';\n        if (typeof label === 'string') {\n            /**\n             * @private\n             * @type {HTMLElement}\n             */\n            _this.label_ = document.createElement('span');\n            _this.label_.textContent = label;\n            _this.label_.className = expandClassName;\n        }\n        else {\n            _this.label_ = label;\n        }\n        var activeLabel = _this.collapsible_ && !_this.collapsed_ ? _this.collapseLabel_ : _this.label_;\n        /**\n         * @private\n         * @type {HTMLElement}\n         */\n        _this.toggleButton_ = document.createElement('button');\n        _this.toggleButton_.setAttribute('type', 'button');\n        _this.toggleButton_.setAttribute('aria-expanded', String(!_this.collapsed_));\n        _this.toggleButton_.title = tipLabel;\n        _this.toggleButton_.appendChild(activeLabel);\n        _this.toggleButton_.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this), false);\n        var cssClasses = className +\n            ' ' +\n            CLASS_UNSELECTABLE +\n            ' ' +\n            CLASS_CONTROL +\n            (_this.collapsed_ && _this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') +\n            (_this.collapsible_ ? '' : ' ol-uncollapsible');\n        var element = _this.element;\n        element.className = cssClasses;\n        element.appendChild(_this.toggleButton_);\n        element.appendChild(_this.ulElement_);\n        /**\n         * A list of currently rendered resolutions.\n         * @type {Array<string>}\n         * @private\n         */\n        _this.renderedAttributions_ = [];\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.renderedVisible_ = true;\n        return _this;\n    }\n    /**\n     * Collect a list of visible attributions and set the collapsible state.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {Array<string>} Attributions.\n     * @private\n     */\n    Attribution.prototype.collectSourceAttributions_ = function (frameState) {\n        /**\n         * Used to determine if an attribution already exists.\n         * @type {!Object<string, boolean>}\n         */\n        var lookup = {};\n        /**\n         * A list of visible attributions.\n         * @type {Array<string>}\n         */\n        var visibleAttributions = [];\n        var collapsible = true;\n        var layerStatesArray = frameState.layerStatesArray;\n        for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n            var layerState = layerStatesArray[i];\n            if (!inView(layerState, frameState.viewState)) {\n                continue;\n            }\n            var source = /** @type {import(\"../layer/Layer.js\").default} */ (layerState.layer).getSource();\n            if (!source) {\n                continue;\n            }\n            var attributionGetter = source.getAttributions();\n            if (!attributionGetter) {\n                continue;\n            }\n            var attributions = attributionGetter(frameState);\n            if (!attributions) {\n                continue;\n            }\n            collapsible =\n                collapsible && source.getAttributionsCollapsible() !== false;\n            if (Array.isArray(attributions)) {\n                for (var j = 0, jj = attributions.length; j < jj; ++j) {\n                    if (!(attributions[j] in lookup)) {\n                        visibleAttributions.push(attributions[j]);\n                        lookup[attributions[j]] = true;\n                    }\n                }\n            }\n            else {\n                if (!(attributions in lookup)) {\n                    visibleAttributions.push(attributions);\n                    lookup[attributions] = true;\n                }\n            }\n        }\n        if (!this.overrideCollapsible_) {\n            this.setCollapsible(collapsible);\n        }\n        return visibleAttributions;\n    };\n    /**\n     * @private\n     * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    Attribution.prototype.updateElement_ = function (frameState) {\n        if (!frameState) {\n            if (this.renderedVisible_) {\n                this.element.style.display = 'none';\n                this.renderedVisible_ = false;\n            }\n            return;\n        }\n        var attributions = this.collectSourceAttributions_(frameState);\n        var visible = attributions.length > 0;\n        if (this.renderedVisible_ != visible) {\n            this.element.style.display = visible ? '' : 'none';\n            this.renderedVisible_ = visible;\n        }\n        if (equals(attributions, this.renderedAttributions_)) {\n            return;\n        }\n        removeChildren(this.ulElement_);\n        // append the attributions\n        for (var i = 0, ii = attributions.length; i < ii; ++i) {\n            var element = document.createElement('li');\n            element.innerHTML = attributions[i];\n            this.ulElement_.appendChild(element);\n        }\n        this.renderedAttributions_ = attributions;\n    };\n    /**\n     * @param {MouseEvent} event The event to handle\n     * @private\n     */\n    Attribution.prototype.handleClick_ = function (event) {\n        event.preventDefault();\n        this.handleToggle_();\n        this.userCollapsed_ = this.collapsed_;\n    };\n    /**\n     * @private\n     */\n    Attribution.prototype.handleToggle_ = function () {\n        this.element.classList.toggle(CLASS_COLLAPSED);\n        if (this.collapsed_) {\n            replaceNode(this.collapseLabel_, this.label_);\n        }\n        else {\n            replaceNode(this.label_, this.collapseLabel_);\n        }\n        this.collapsed_ = !this.collapsed_;\n        this.toggleButton_.setAttribute('aria-expanded', String(!this.collapsed_));\n    };\n    /**\n     * Return `true` if the attribution is collapsible, `false` otherwise.\n     * @return {boolean} True if the widget is collapsible.\n     * @api\n     */\n    Attribution.prototype.getCollapsible = function () {\n        return this.collapsible_;\n    };\n    /**\n     * Set whether the attribution should be collapsible.\n     * @param {boolean} collapsible True if the widget is collapsible.\n     * @api\n     */\n    Attribution.prototype.setCollapsible = function (collapsible) {\n        if (this.collapsible_ === collapsible) {\n            return;\n        }\n        this.collapsible_ = collapsible;\n        this.element.classList.toggle('ol-uncollapsible');\n        if (this.userCollapsed_) {\n            this.handleToggle_();\n        }\n    };\n    /**\n     * Collapse or expand the attribution according to the passed parameter. Will\n     * not do anything if the attribution isn't collapsible or if the current\n     * collapsed state is already the one requested.\n     * @param {boolean} collapsed True if the widget is collapsed.\n     * @api\n     */\n    Attribution.prototype.setCollapsed = function (collapsed) {\n        this.userCollapsed_ = collapsed;\n        if (!this.collapsible_ || this.collapsed_ === collapsed) {\n            return;\n        }\n        this.handleToggle_();\n    };\n    /**\n     * Return `true` when the attribution is currently collapsed or `false`\n     * otherwise.\n     * @return {boolean} True if the widget is collapsed.\n     * @api\n     */\n    Attribution.prototype.getCollapsed = function () {\n        return this.collapsed_;\n    };\n    /**\n     * Update the attribution element.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @override\n     */\n    Attribution.prototype.render = function (mapEvent) {\n        this.updateElement_(mapEvent.frameState);\n    };\n    return Attribution;\n}(Control));\nexport default Attribution;\n//# sourceMappingURL=Attribution.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/Rotate\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport { CLASS_CONTROL, CLASS_HIDDEN, CLASS_UNSELECTABLE } from '../css.js';\nimport { easeOut } from '../easing.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-rotate'] CSS class name.\n * @property {string|HTMLElement} [label='⇧'] Text label to use for the rotate button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Reset rotation'] Text label to use for the rotate tip.\n * @property {string} [compassClassName='ol-compass'] CSS class name for the compass.\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {boolean} [autoHide=true] Hide the control when rotation is 0.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control should\n * be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {function():void} [resetNorth] Function called when the control is clicked.\n * This will override the default `resetNorth`.\n * @property {HTMLElement|string} [target] Specify a target if you want the control to be\n * rendered outside of the map's viewport.\n */\n/**\n * @classdesc\n * A button control to reset rotation to 0.\n * To style this control use css selector `.ol-rotate`. A `.ol-hidden` css\n * selector is added to the button when the rotation is 0.\n *\n * @api\n */\nvar Rotate = /** @class */ (function (_super) {\n    __extends(Rotate, _super);\n    /**\n     * @param {Options} [opt_options] Rotate options.\n     */\n    function Rotate(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            render: options.render,\n            target: options.target,\n        }) || this;\n        var className = options.className !== undefined ? options.className : 'ol-rotate';\n        var label = options.label !== undefined ? options.label : '\\u21E7';\n        var compassClassName = options.compassClassName !== undefined\n            ? options.compassClassName\n            : 'ol-compass';\n        /**\n         * @type {HTMLElement}\n         * @private\n         */\n        _this.label_ = null;\n        if (typeof label === 'string') {\n            _this.label_ = document.createElement('span');\n            _this.label_.className = compassClassName;\n            _this.label_.textContent = label;\n        }\n        else {\n            _this.label_ = label;\n            _this.label_.classList.add(compassClassName);\n        }\n        var tipLabel = options.tipLabel ? options.tipLabel : 'Reset rotation';\n        var button = document.createElement('button');\n        button.className = className + '-reset';\n        button.setAttribute('type', 'button');\n        button.title = tipLabel;\n        button.appendChild(_this.label_);\n        button.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this), false);\n        var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n        var element = _this.element;\n        element.className = cssClasses;\n        element.appendChild(button);\n        _this.callResetNorth_ = options.resetNorth ? options.resetNorth : undefined;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 250;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.autoHide_ = options.autoHide !== undefined ? options.autoHide : true;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.rotation_ = undefined;\n        if (_this.autoHide_) {\n            _this.element.classList.add(CLASS_HIDDEN);\n        }\n        return _this;\n    }\n    /**\n     * @param {MouseEvent} event The event to handle\n     * @private\n     */\n    Rotate.prototype.handleClick_ = function (event) {\n        event.preventDefault();\n        if (this.callResetNorth_ !== undefined) {\n            this.callResetNorth_();\n        }\n        else {\n            this.resetNorth_();\n        }\n    };\n    /**\n     * @private\n     */\n    Rotate.prototype.resetNorth_ = function () {\n        var map = this.getMap();\n        var view = map.getView();\n        if (!view) {\n            // the map does not have a view, so we can't act\n            // upon it\n            return;\n        }\n        var rotation = view.getRotation();\n        if (rotation !== undefined) {\n            if (this.duration_ > 0 && rotation % (2 * Math.PI) !== 0) {\n                view.animate({\n                    rotation: 0,\n                    duration: this.duration_,\n                    easing: easeOut,\n                });\n            }\n            else {\n                view.setRotation(0);\n            }\n        }\n    };\n    /**\n     * Update the rotate control element.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @override\n     */\n    Rotate.prototype.render = function (mapEvent) {\n        var frameState = mapEvent.frameState;\n        if (!frameState) {\n            return;\n        }\n        var rotation = frameState.viewState.rotation;\n        if (rotation != this.rotation_) {\n            var transform = 'rotate(' + rotation + 'rad)';\n            if (this.autoHide_) {\n                var contains = this.element.classList.contains(CLASS_HIDDEN);\n                if (!contains && rotation === 0) {\n                    this.element.classList.add(CLASS_HIDDEN);\n                }\n                else if (contains && rotation !== 0) {\n                    this.element.classList.remove(CLASS_HIDDEN);\n                }\n            }\n            this.label_.style.transform = transform;\n        }\n        this.rotation_ = rotation;\n    };\n    return Rotate;\n}(Control));\nexport default Rotate;\n//# sourceMappingURL=Rotate.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/Zoom\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport { CLASS_CONTROL, CLASS_UNSELECTABLE } from '../css.js';\nimport { easeOut } from '../easing.js';\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {string} [className='ol-zoom'] CSS class name.\n * @property {string} [zoomInClassName=className + '-in'] CSS class name for the zoom-in button.\n * @property {string} [zoomOutClassName=className + '-out'] CSS class name for the zoom-out button.\n * @property {string|HTMLElement} [zoomInLabel='+'] Text label to use for the zoom-in\n * button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|HTMLElement} [zoomOutLabel='-'] Text label to use for the zoom-out button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [zoomInTipLabel='Zoom in'] Text label to use for the button tip.\n * @property {string} [zoomOutTipLabel='Zoom out'] Text label to use for the button tip.\n * @property {number} [delta=1] The zoom delta applied on each click.\n * @property {HTMLElement|string} [target] Specify a target if you want the control to be\n * rendered outside of the map's viewport.\n */\n/**\n * @classdesc\n * A control with 2 buttons, one for zoom in and one for zoom out.\n * This control is one of the default controls of a map. To style this control\n * use css selectors `.ol-zoom-in` and `.ol-zoom-out`.\n *\n * @api\n */\nvar Zoom = /** @class */ (function (_super) {\n    __extends(Zoom, _super);\n    /**\n     * @param {Options} [opt_options] Zoom options.\n     */\n    function Zoom(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            target: options.target,\n        }) || this;\n        var className = options.className !== undefined ? options.className : 'ol-zoom';\n        var delta = options.delta !== undefined ? options.delta : 1;\n        var zoomInClassName = options.zoomInClassName !== undefined\n            ? options.zoomInClassName\n            : className + '-in';\n        var zoomOutClassName = options.zoomOutClassName !== undefined\n            ? options.zoomOutClassName\n            : className + '-out';\n        var zoomInLabel = options.zoomInLabel !== undefined ? options.zoomInLabel : '+';\n        var zoomOutLabel = options.zoomOutLabel !== undefined ? options.zoomOutLabel : '\\u2212';\n        var zoomInTipLabel = options.zoomInTipLabel !== undefined ? options.zoomInTipLabel : 'Zoom in';\n        var zoomOutTipLabel = options.zoomOutTipLabel !== undefined\n            ? options.zoomOutTipLabel\n            : 'Zoom out';\n        var inElement = document.createElement('button');\n        inElement.className = zoomInClassName;\n        inElement.setAttribute('type', 'button');\n        inElement.title = zoomInTipLabel;\n        inElement.appendChild(typeof zoomInLabel === 'string'\n            ? document.createTextNode(zoomInLabel)\n            : zoomInLabel);\n        inElement.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this, delta), false);\n        var outElement = document.createElement('button');\n        outElement.className = zoomOutClassName;\n        outElement.setAttribute('type', 'button');\n        outElement.title = zoomOutTipLabel;\n        outElement.appendChild(typeof zoomOutLabel === 'string'\n            ? document.createTextNode(zoomOutLabel)\n            : zoomOutLabel);\n        outElement.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this, -delta), false);\n        var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n        var element = _this.element;\n        element.className = cssClasses;\n        element.appendChild(inElement);\n        element.appendChild(outElement);\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 250;\n        return _this;\n    }\n    /**\n     * @param {number} delta Zoom delta.\n     * @param {MouseEvent} event The event to handle\n     * @private\n     */\n    Zoom.prototype.handleClick_ = function (delta, event) {\n        event.preventDefault();\n        this.zoomByDelta_(delta);\n    };\n    /**\n     * @param {number} delta Zoom delta.\n     * @private\n     */\n    Zoom.prototype.zoomByDelta_ = function (delta) {\n        var map = this.getMap();\n        var view = map.getView();\n        if (!view) {\n            // the map does not have a view, so we can't act\n            // upon it\n            return;\n        }\n        var currentZoom = view.getZoom();\n        if (currentZoom !== undefined) {\n            var newZoom = view.getConstrainedZoom(currentZoom + delta);\n            if (this.duration_ > 0) {\n                if (view.getAnimating()) {\n                    view.cancelAnimations();\n                }\n                view.animate({\n                    zoom: newZoom,\n                    duration: this.duration_,\n                    easing: easeOut,\n                });\n            }\n            else {\n                view.setZoom(newZoom);\n            }\n        }\n    };\n    return Zoom;\n}(Control));\nexport default Zoom;\n//# sourceMappingURL=Zoom.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/FullScreen\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport { CLASS_CONTROL, CLASS_UNSELECTABLE, CLASS_UNSUPPORTED } from '../css.js';\nimport { listen } from '../events.js';\nimport { replaceNode } from '../dom.js';\nvar events = [\n    'fullscreenchange',\n    'webkitfullscreenchange',\n    'MSFullscreenChange',\n];\n/**\n * @enum {string}\n */\nvar FullScreenEventType = {\n    /**\n     * Triggered after the map entered fullscreen.\n     * @event FullScreenEventType#enterfullscreen\n     * @api\n     */\n    ENTERFULLSCREEN: 'enterfullscreen',\n    /**\n     * Triggered after the map leave fullscreen.\n     * @event FullScreenEventType#leavefullscreen\n     * @api\n     */\n    LEAVEFULLSCREEN: 'leavefullscreen',\n};\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes|\n *     'enterfullscreen'|'leavefullscreen', import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types, import(\"../Object\").ObjectEvent, Return> &\n *   import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|\n *     'enterfullscreen'|'leavefullscreen'|import(\"../ObjectEventType\").Types, Return>} FullScreenOnSignature\n */\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-full-screen'] CSS class name.\n * @property {string|Text} [label='\\u2922'] Text label to use for the button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|Text} [labelActive='\\u00d7'] Text label to use for the\n * button when full-screen is active.\n * @property {string} [activeClassName=className + '-true'] CSS class name for the button\n * when full-screen is active.\n * @property {string} [inactiveClassName=className + '-false'] CSS class name for the button\n * when full-screen is inactive.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Toggle full-screen'] Text label to use for the button tip.\n * @property {boolean} [keys=false] Full keyboard access.\n * @property {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {HTMLElement|string} [source] The element to be displayed\n * fullscreen. When not provided, the element containing the map viewport will\n * be displayed fullscreen.\n */\n/**\n * @classdesc\n * Provides a button that when clicked fills up the full screen with the map.\n * The full screen source element is by default the element containing the map viewport unless\n * overridden by providing the `source` option. In which case, the dom\n * element introduced using this parameter will be displayed in full screen.\n *\n * When in full screen mode, a close button is shown to exit full screen mode.\n * The [Fullscreen API](https://www.w3.org/TR/fullscreen/) is used to\n * toggle the map in full screen mode.\n *\n * @fires FullScreenEventType#enterfullscreen\n * @fires FullScreenEventType#leavefullscreen\n * @api\n */\nvar FullScreen = /** @class */ (function (_super) {\n    __extends(FullScreen, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function FullScreen(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            target: options.target,\n        }) || this;\n        /***\n         * @type {FullScreenOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {FullScreenOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {FullScreenOnSignature<void>}\n         */\n        _this.un;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.cssClassName_ =\n            options.className !== undefined ? options.className : 'ol-full-screen';\n        /**\n         * @private\n         * @type {Array<string>}\n         */\n        _this.activeClassName_ =\n            options.activeClassName !== undefined\n                ? options.activeClassName.split(' ')\n                : [_this.cssClassName_ + '-true'];\n        /**\n         * @private\n         * @type {Array<string>}\n         */\n        _this.inactiveClassName_ =\n            options.inactiveClassName !== undefined\n                ? options.inactiveClassName.split(' ')\n                : [_this.cssClassName_ + '-false'];\n        var label = options.label !== undefined ? options.label : '\\u2922';\n        /**\n         * @private\n         * @type {Text}\n         */\n        _this.labelNode_ =\n            typeof label === 'string' ? document.createTextNode(label) : label;\n        var labelActive = options.labelActive !== undefined ? options.labelActive : '\\u00d7';\n        /**\n         * @private\n         * @type {Text}\n         */\n        _this.labelActiveNode_ =\n            typeof labelActive === 'string'\n                ? document.createTextNode(labelActive)\n                : labelActive;\n        /**\n         * @private\n         * @type {HTMLElement}\n         */\n        _this.button_ = document.createElement('button');\n        var tipLabel = options.tipLabel ? options.tipLabel : 'Toggle full-screen';\n        _this.setClassName_(_this.button_, isFullScreen());\n        _this.button_.setAttribute('type', 'button');\n        _this.button_.title = tipLabel;\n        _this.button_.appendChild(_this.labelNode_);\n        _this.button_.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this), false);\n        var cssClasses = _this.cssClassName_ +\n            ' ' +\n            CLASS_UNSELECTABLE +\n            ' ' +\n            CLASS_CONTROL +\n            ' ' +\n            (!isFullScreenSupported() ? CLASS_UNSUPPORTED : '');\n        var element = _this.element;\n        element.className = cssClasses;\n        element.appendChild(_this.button_);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.keys_ = options.keys !== undefined ? options.keys : false;\n        /**\n         * @private\n         * @type {HTMLElement|string|undefined}\n         */\n        _this.source_ = options.source;\n        return _this;\n    }\n    /**\n     * @param {MouseEvent} event The event to handle\n     * @private\n     */\n    FullScreen.prototype.handleClick_ = function (event) {\n        event.preventDefault();\n        this.handleFullScreen_();\n    };\n    /**\n     * @private\n     */\n    FullScreen.prototype.handleFullScreen_ = function () {\n        if (!isFullScreenSupported()) {\n            return;\n        }\n        var map = this.getMap();\n        if (!map) {\n            return;\n        }\n        if (isFullScreen()) {\n            exitFullScreen();\n        }\n        else {\n            var element = void 0;\n            if (this.source_) {\n                element =\n                    typeof this.source_ === 'string'\n                        ? document.getElementById(this.source_)\n                        : this.source_;\n            }\n            else {\n                element = map.getTargetElement();\n            }\n            if (this.keys_) {\n                requestFullScreenWithKeys(element);\n            }\n            else {\n                requestFullScreen(element);\n            }\n        }\n    };\n    /**\n     * @private\n     */\n    FullScreen.prototype.handleFullScreenChange_ = function () {\n        var map = this.getMap();\n        if (isFullScreen()) {\n            this.setClassName_(this.button_, true);\n            replaceNode(this.labelActiveNode_, this.labelNode_);\n            this.dispatchEvent(FullScreenEventType.ENTERFULLSCREEN);\n        }\n        else {\n            this.setClassName_(this.button_, false);\n            replaceNode(this.labelNode_, this.labelActiveNode_);\n            this.dispatchEvent(FullScreenEventType.LEAVEFULLSCREEN);\n        }\n        if (map) {\n            map.updateSize();\n        }\n    };\n    /**\n     * @param {HTMLElement} element Target element\n     * @param {boolean} fullscreen True if fullscreen class name should be active\n     * @private\n     */\n    FullScreen.prototype.setClassName_ = function (element, fullscreen) {\n        var _a, _b, _c;\n        var activeClassName = this.activeClassName_;\n        var inactiveClassName = this.inactiveClassName_;\n        var nextClassName = fullscreen ? activeClassName : inactiveClassName;\n        (_a = element.classList).remove.apply(_a, activeClassName);\n        (_b = element.classList).remove.apply(_b, inactiveClassName);\n        (_c = element.classList).add.apply(_c, nextClassName);\n    };\n    /**\n     * Remove the control from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @api\n     */\n    FullScreen.prototype.setMap = function (map) {\n        _super.prototype.setMap.call(this, map);\n        if (map) {\n            for (var i = 0, ii = events.length; i < ii; ++i) {\n                this.listenerKeys.push(listen(document, events[i], this.handleFullScreenChange_, this));\n            }\n        }\n    };\n    return FullScreen;\n}(Control));\n/**\n * @return {boolean} Fullscreen is supported by the current platform.\n */\nfunction isFullScreenSupported() {\n    var body = document.body;\n    return !!(body['webkitRequestFullscreen'] ||\n        (body['msRequestFullscreen'] && document['msFullscreenEnabled']) ||\n        (body.requestFullscreen && document.fullscreenEnabled));\n}\n/**\n * @return {boolean} Element is currently in fullscreen.\n */\nfunction isFullScreen() {\n    return !!(document['webkitIsFullScreen'] ||\n        document['msFullscreenElement'] ||\n        document.fullscreenElement);\n}\n/**\n * Request to fullscreen an element.\n * @param {HTMLElement} element Element to request fullscreen\n */\nfunction requestFullScreen(element) {\n    if (element.requestFullscreen) {\n        element.requestFullscreen();\n    }\n    else if (element['msRequestFullscreen']) {\n        element['msRequestFullscreen']();\n    }\n    else if (element['webkitRequestFullscreen']) {\n        element['webkitRequestFullscreen']();\n    }\n}\n/**\n * Request to fullscreen an element with keyboard input.\n * @param {HTMLElement} element Element to request fullscreen\n */\nfunction requestFullScreenWithKeys(element) {\n    if (element['webkitRequestFullscreen']) {\n        element['webkitRequestFullscreen']();\n    }\n    else {\n        requestFullScreen(element);\n    }\n}\n/**\n * Exit fullscreen.\n */\nfunction exitFullScreen() {\n    if (document.exitFullscreen) {\n        document.exitFullscreen();\n    }\n    else if (document['msExitFullscreen']) {\n        document['msExitFullscreen']();\n    }\n    else if (document['webkitExitFullscreen']) {\n        document['webkitExitFullscreen']();\n    }\n}\nexport default FullScreen;\n//# sourceMappingURL=FullScreen.js.map","/**\n * @module ol/control/MousePosition\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Control from './Control.js';\nimport EventType from '../pointer/EventType.js';\nimport { get as getProjection, getTransformFromProjections, getUserProjection, identityTransform, } from '../proj.js';\nimport { listen } from '../events.js';\n/**\n * @type {string}\n */\nvar PROJECTION = 'projection';\n/**\n * @type {string}\n */\nvar COORDINATE_FORMAT = 'coordinateFormat';\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types|\n *     'change:coordinateFormat'|'change:projection', import(\"../Object\").ObjectEvent, Return> &\n *   import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"../ObjectEventType\").Types|\n *     'change:coordinateFormat'|'change:projection', Return>} MousePositionOnSignature\n */\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-mouse-position'] CSS class name.\n * @property {import(\"../coordinate.js\").CoordinateFormat} [coordinateFormat] Coordinate format.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the\n * control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {string|boolean} [placeholder] Markup to show when the mouse position is not\n * available (e.g. when the pointer leaves the map viewport).  By default, a non-breaking space\n * is rendered when the mouse leaves the viewport.  To render something else, provide a string\n * to be used as the text content (e.g. 'no position' or '' for an empty string).  Set the placeholder\n * to `false` to retain the last position when the mouse leaves the viewport.  In a future release, this\n * will be the default behavior.\n * @property {string} [undefinedHTML='&#160;'] This option is deprecated.  Use the `placeholder` option instead.\n */\n/**\n * @classdesc\n * A control to show the 2D coordinates of the mouse cursor. By default, these\n * are in the view projection, but can be in any supported projection.\n * By default the control is shown in the top right corner of the map, but this\n * can be changed by using the css selector `.ol-mouse-position`.\n *\n * On touch devices, which usually do not have a mouse cursor, the coordinates\n * of the currently touched position are shown.\n *\n * @api\n */\nvar MousePosition = /** @class */ (function (_super) {\n    __extends(MousePosition, _super);\n    /**\n     * @param {Options} [opt_options] Mouse position options.\n     */\n    function MousePosition(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var element = document.createElement('div');\n        element.className =\n            options.className !== undefined ? options.className : 'ol-mouse-position';\n        _this = _super.call(this, {\n            element: element,\n            render: options.render,\n            target: options.target,\n        }) || this;\n        /***\n         * @type {MousePositionOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {MousePositionOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {MousePositionOnSignature<void>}\n         */\n        _this.un;\n        _this.addChangeListener(PROJECTION, _this.handleProjectionChanged_);\n        if (options.coordinateFormat) {\n            _this.setCoordinateFormat(options.coordinateFormat);\n        }\n        if (options.projection) {\n            _this.setProjection(options.projection);\n        }\n        /**\n         * @type {boolean}\n         * Change this to `false` when removing the deprecated `undefinedHTML` option.\n         */\n        var renderOnMouseOut = true;\n        /**\n         * @type {string}\n         */\n        var placeholder = '&#160;';\n        if ('undefinedHTML' in options) {\n            // deprecated behavior\n            if (options.undefinedHTML !== undefined) {\n                placeholder = options.undefinedHTML;\n            }\n            renderOnMouseOut = !!placeholder;\n        }\n        else if ('placeholder' in options) {\n            if (options.placeholder === false) {\n                renderOnMouseOut = false;\n            }\n            else {\n                placeholder = String(options.placeholder);\n            }\n        }\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.placeholder_ = placeholder;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.renderOnMouseOut_ = renderOnMouseOut;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.renderedHTML_ = element.innerHTML;\n        /**\n         * @private\n         * @type {?import(\"../proj/Projection.js\").default}\n         */\n        _this.mapProjection_ = null;\n        /**\n         * @private\n         * @type {?import(\"../proj.js\").TransformFunction}\n         */\n        _this.transform_ = null;\n        return _this;\n    }\n    /**\n     * @private\n     */\n    MousePosition.prototype.handleProjectionChanged_ = function () {\n        this.transform_ = null;\n    };\n    /**\n     * Return the coordinate format type used to render the current position or\n     * undefined.\n     * @return {import(\"../coordinate.js\").CoordinateFormat|undefined} The format to render the current\n     *     position in.\n     * @observable\n     * @api\n     */\n    MousePosition.prototype.getCoordinateFormat = function () {\n        return /** @type {import(\"../coordinate.js\").CoordinateFormat|undefined} */ (this.get(COORDINATE_FORMAT));\n    };\n    /**\n     * Return the projection that is used to report the mouse position.\n     * @return {import(\"../proj/Projection.js\").default|undefined} The projection to report mouse\n     *     position in.\n     * @observable\n     * @api\n     */\n    MousePosition.prototype.getProjection = function () {\n        return /** @type {import(\"../proj/Projection.js\").default|undefined} */ (this.get(PROJECTION));\n    };\n    /**\n     * @param {MouseEvent} event Browser event.\n     * @protected\n     */\n    MousePosition.prototype.handleMouseMove = function (event) {\n        var map = this.getMap();\n        this.updateHTML_(map.getEventPixel(event));\n    };\n    /**\n     * @param {Event} event Browser event.\n     * @protected\n     */\n    MousePosition.prototype.handleMouseOut = function (event) {\n        this.updateHTML_(null);\n    };\n    /**\n     * Remove the control from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @api\n     */\n    MousePosition.prototype.setMap = function (map) {\n        _super.prototype.setMap.call(this, map);\n        if (map) {\n            var viewport = map.getViewport();\n            this.listenerKeys.push(listen(viewport, EventType.POINTERMOVE, this.handleMouseMove, this));\n            if (this.renderOnMouseOut_) {\n                this.listenerKeys.push(listen(viewport, EventType.POINTEROUT, this.handleMouseOut, this));\n            }\n            this.updateHTML_(null);\n        }\n    };\n    /**\n     * Set the coordinate format type used to render the current position.\n     * @param {import(\"../coordinate.js\").CoordinateFormat} format The format to render the current\n     *     position in.\n     * @observable\n     * @api\n     */\n    MousePosition.prototype.setCoordinateFormat = function (format) {\n        this.set(COORDINATE_FORMAT, format);\n    };\n    /**\n     * Set the projection that is used to report the mouse position.\n     * @param {import(\"../proj.js\").ProjectionLike} projection The projection to report mouse\n     *     position in.\n     * @observable\n     * @api\n     */\n    MousePosition.prototype.setProjection = function (projection) {\n        this.set(PROJECTION, getProjection(projection));\n    };\n    /**\n     * @param {?import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @private\n     */\n    MousePosition.prototype.updateHTML_ = function (pixel) {\n        var html = this.placeholder_;\n        if (pixel && this.mapProjection_) {\n            if (!this.transform_) {\n                var projection = this.getProjection();\n                if (projection) {\n                    this.transform_ = getTransformFromProjections(this.mapProjection_, projection);\n                }\n                else {\n                    this.transform_ = identityTransform;\n                }\n            }\n            var map = this.getMap();\n            var coordinate = map.getCoordinateFromPixelInternal(pixel);\n            if (coordinate) {\n                var userProjection = getUserProjection();\n                if (userProjection) {\n                    this.transform_ = getTransformFromProjections(this.mapProjection_, userProjection);\n                }\n                this.transform_(coordinate, coordinate);\n                var coordinateFormat = this.getCoordinateFormat();\n                if (coordinateFormat) {\n                    html = coordinateFormat(coordinate);\n                }\n                else {\n                    html = coordinate.toString();\n                }\n            }\n        }\n        if (!this.renderedHTML_ || html !== this.renderedHTML_) {\n            this.element.innerHTML = html;\n            this.renderedHTML_ = html;\n        }\n    };\n    /**\n     * Update the projection. Rendering of the coordinates is done in\n     * `handleMouseMove` and `handleMouseUp`.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @override\n     */\n    MousePosition.prototype.render = function (mapEvent) {\n        var frameState = mapEvent.frameState;\n        if (!frameState) {\n            this.mapProjection_ = null;\n        }\n        else {\n            if (this.mapProjection_ != frameState.viewState.projection) {\n                this.mapProjection_ = frameState.viewState.projection;\n                this.transform_ = null;\n            }\n        }\n    };\n    return MousePosition;\n}(Control));\nexport default MousePosition;\n//# sourceMappingURL=MousePosition.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/OverviewMap\n */\nimport CompositeMapRenderer from '../renderer/Composite.js';\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport MapEventType from '../MapEventType.js';\nimport MapProperty from '../MapProperty.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport Overlay from '../Overlay.js';\nimport OverlayPositioning from '../OverlayPositioning.js';\nimport PluggableMap from '../PluggableMap.js';\nimport View from '../View.js';\nimport ViewProperty from '../ViewProperty.js';\nimport { CLASS_COLLAPSED, CLASS_CONTROL, CLASS_UNSELECTABLE } from '../css.js';\nimport { containsExtent, equals as equalsExtent, getBottomRight, getTopLeft, scaleFromCenter, } from '../extent.js';\nimport { listen, listenOnce } from '../events.js';\nimport { fromExtent as polygonFromExtent } from '../geom/Polygon.js';\nimport { replaceNode } from '../dom.js';\n/**\n * Maximum width and/or height extent ratio that determines when the overview\n * map should be zoomed out.\n * @type {number}\n */\nvar MAX_RATIO = 0.75;\n/**\n * Minimum width and/or height extent ratio that determines when the overview\n * map should be zoomed in.\n * @type {number}\n */\nvar MIN_RATIO = 0.1;\nvar ControlledMap = /** @class */ (function (_super) {\n    __extends(ControlledMap, _super);\n    function ControlledMap() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    ControlledMap.prototype.createRenderer = function () {\n        return new CompositeMapRenderer(this);\n    };\n    return ControlledMap;\n}(PluggableMap));\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-overviewmap'] CSS class name.\n * @property {boolean} [collapsed=true] Whether the control should start collapsed or not (expanded).\n * @property {string|HTMLElement} [collapseLabel='«'] Text label to use for the\n * expanded overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {boolean} [collapsible=true] Whether the control can be collapsed or not.\n * @property {string|HTMLElement} [label='»'] Text label to use for the collapsed\n * overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {Array<import(\"../layer/Layer.js\").default>|import(\"../Collection.js\").default<import(\"../layer/Layer.js\").default>} [layers]\n * Layers for the overview map.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {boolean} [rotateWithView=false] Whether the control view should rotate with the main map view.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {string} [tipLabel='Overview map'] Text label to use for the button tip.\n * @property {View} [view] Custom view for the overview map (should use same projection as main map). If not provided,\n * a default view with the same projection as the main map will be used.\n */\n/**\n * Create a new control with a map acting as an overview map for another\n * defined map.\n *\n * @api\n */\nvar OverviewMap = /** @class */ (function (_super) {\n    __extends(OverviewMap, _super);\n    /**\n     * @param {Options} [opt_options] OverviewMap options.\n     */\n    function OverviewMap(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            render: options.render,\n            target: options.target,\n        }) || this;\n        /**\n         * @private\n         */\n        _this.boundHandleRotationChanged_ = _this.handleRotationChanged_.bind(_this);\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.collapsed_ =\n            options.collapsed !== undefined ? options.collapsed : true;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.collapsible_ =\n            options.collapsible !== undefined ? options.collapsible : true;\n        if (!_this.collapsible_) {\n            _this.collapsed_ = false;\n        }\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.rotateWithView_ =\n            options.rotateWithView !== undefined ? options.rotateWithView : false;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent|undefined}\n         */\n        _this.viewExtent_ = undefined;\n        var className = options.className !== undefined ? options.className : 'ol-overviewmap';\n        var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Overview map';\n        var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\\u00AB';\n        if (typeof collapseLabel === 'string') {\n            /**\n             * @private\n             * @type {HTMLElement}\n             */\n            _this.collapseLabel_ = document.createElement('span');\n            _this.collapseLabel_.textContent = collapseLabel;\n        }\n        else {\n            _this.collapseLabel_ = collapseLabel;\n        }\n        var label = options.label !== undefined ? options.label : '\\u00BB';\n        if (typeof label === 'string') {\n            /**\n             * @private\n             * @type {HTMLElement}\n             */\n            _this.label_ = document.createElement('span');\n            _this.label_.textContent = label;\n        }\n        else {\n            _this.label_ = label;\n        }\n        var activeLabel = _this.collapsible_ && !_this.collapsed_ ? _this.collapseLabel_ : _this.label_;\n        var button = document.createElement('button');\n        button.setAttribute('type', 'button');\n        button.title = tipLabel;\n        button.appendChild(activeLabel);\n        button.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this), false);\n        /**\n         * @type {HTMLElement}\n         * @private\n         */\n        _this.ovmapDiv_ = document.createElement('div');\n        _this.ovmapDiv_.className = 'ol-overviewmap-map';\n        /**\n         * Explicitly given view to be used instead of a view derived from the main map.\n         * @type {View}\n         * @private\n         */\n        _this.view_ = options.view;\n        /**\n         * @type {ControlledMap}\n         * @private\n         */\n        _this.ovmap_ = new ControlledMap({\n            view: options.view,\n        });\n        var ovmap = _this.ovmap_;\n        if (options.layers) {\n            options.layers.forEach(function (layer) {\n                ovmap.addLayer(layer);\n            });\n        }\n        var box = document.createElement('div');\n        box.className = 'ol-overviewmap-box';\n        box.style.boxSizing = 'border-box';\n        /**\n         * @type {import(\"../Overlay.js\").default}\n         * @private\n         */\n        _this.boxOverlay_ = new Overlay({\n            position: [0, 0],\n            positioning: OverlayPositioning.CENTER_CENTER,\n            element: box,\n        });\n        _this.ovmap_.addOverlay(_this.boxOverlay_);\n        var cssClasses = className +\n            ' ' +\n            CLASS_UNSELECTABLE +\n            ' ' +\n            CLASS_CONTROL +\n            (_this.collapsed_ && _this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') +\n            (_this.collapsible_ ? '' : ' ol-uncollapsible');\n        var element = _this.element;\n        element.className = cssClasses;\n        element.appendChild(_this.ovmapDiv_);\n        element.appendChild(button);\n        /* Interactive map */\n        var scope = _this;\n        var overlay = _this.boxOverlay_;\n        var overlayBox = _this.boxOverlay_.getElement();\n        /* Functions definition */\n        var computeDesiredMousePosition = function (mousePosition) {\n            return {\n                clientX: mousePosition.clientX,\n                clientY: mousePosition.clientY,\n            };\n        };\n        var move = function (event) {\n            var position = /** @type {?} */ (computeDesiredMousePosition(event));\n            var coordinates = ovmap.getEventCoordinateInternal(\n            /** @type {MouseEvent} */ (position));\n            overlay.setPosition(coordinates);\n        };\n        var endMoving = function (event) {\n            var coordinates = ovmap.getEventCoordinateInternal(event);\n            scope.getMap().getView().setCenterInternal(coordinates);\n            window.removeEventListener('mousemove', move);\n            window.removeEventListener('mouseup', endMoving);\n        };\n        /* Binding */\n        overlayBox.addEventListener('mousedown', function () {\n            window.addEventListener('mousemove', move);\n            window.addEventListener('mouseup', endMoving);\n        });\n        return _this;\n    }\n    /**\n     * Remove the control from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @api\n     */\n    OverviewMap.prototype.setMap = function (map) {\n        var oldMap = this.getMap();\n        if (map === oldMap) {\n            return;\n        }\n        if (oldMap) {\n            var oldView = oldMap.getView();\n            if (oldView) {\n                this.unbindView_(oldView);\n            }\n            this.ovmap_.setTarget(null);\n        }\n        _super.prototype.setMap.call(this, map);\n        if (map) {\n            this.ovmap_.setTarget(this.ovmapDiv_);\n            this.listenerKeys.push(listen(map, ObjectEventType.PROPERTYCHANGE, this.handleMapPropertyChange_, this));\n            var view = map.getView();\n            if (view) {\n                this.bindView_(view);\n                if (view.isDef()) {\n                    this.ovmap_.updateSize();\n                    this.resetExtent_();\n                }\n            }\n            if (!this.ovmap_.isRendered()) {\n                this.updateBoxAfterOvmapIsRendered_();\n            }\n        }\n    };\n    /**\n     * Handle map property changes.  This only deals with changes to the map's view.\n     * @param {import(\"../Object.js\").ObjectEvent} event The propertychange event.\n     * @private\n     */\n    OverviewMap.prototype.handleMapPropertyChange_ = function (event) {\n        if (event.key === MapProperty.VIEW) {\n            var oldView = /** @type {import(\"../View.js\").default} */ (event.oldValue);\n            if (oldView) {\n                this.unbindView_(oldView);\n            }\n            var newView = this.getMap().getView();\n            this.bindView_(newView);\n        }\n        else if (!this.ovmap_.isRendered() &&\n            (event.key === MapProperty.TARGET || event.key === MapProperty.SIZE)) {\n            this.ovmap_.updateSize();\n        }\n    };\n    /**\n     * Register listeners for view property changes.\n     * @param {import(\"../View.js\").default} view The view.\n     * @private\n     */\n    OverviewMap.prototype.bindView_ = function (view) {\n        if (!this.view_) {\n            // Unless an explicit view definition was given, derive default from whatever main map uses.\n            var newView = new View({\n                projection: view.getProjection(),\n            });\n            this.ovmap_.setView(newView);\n        }\n        view.addChangeListener(ViewProperty.ROTATION, this.boundHandleRotationChanged_);\n        // Sync once with the new view\n        this.handleRotationChanged_();\n    };\n    /**\n     * Unregister listeners for view property changes.\n     * @param {import(\"../View.js\").default} view The view.\n     * @private\n     */\n    OverviewMap.prototype.unbindView_ = function (view) {\n        view.removeChangeListener(ViewProperty.ROTATION, this.boundHandleRotationChanged_);\n    };\n    /**\n     * Handle rotation changes to the main map.\n     * @private\n     */\n    OverviewMap.prototype.handleRotationChanged_ = function () {\n        if (this.rotateWithView_) {\n            this.ovmap_.getView().setRotation(this.getMap().getView().getRotation());\n        }\n    };\n    /**\n     * Reset the overview map extent if the box size (width or\n     * height) is less than the size of the overview map size times minRatio\n     * or is greater than the size of the overview size times maxRatio.\n     *\n     * If the map extent was not reset, the box size can fits in the defined\n     * ratio sizes. This method then checks if is contained inside the overview\n     * map current extent. If not, recenter the overview map to the current\n     * main map center location.\n     * @private\n     */\n    OverviewMap.prototype.validateExtent_ = function () {\n        var map = this.getMap();\n        var ovmap = this.ovmap_;\n        if (!map.isRendered() || !ovmap.isRendered()) {\n            return;\n        }\n        var mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n        var view = map.getView();\n        var extent = view.calculateExtentInternal(mapSize);\n        if (this.viewExtent_ && equalsExtent(extent, this.viewExtent_)) {\n            // repeats of the same extent may indicate constraint conflicts leading to an endless cycle\n            return;\n        }\n        this.viewExtent_ = extent;\n        var ovmapSize = /** @type {import(\"../size.js\").Size} */ (ovmap.getSize());\n        var ovview = ovmap.getView();\n        var ovextent = ovview.calculateExtentInternal(ovmapSize);\n        var topLeftPixel = ovmap.getPixelFromCoordinateInternal(getTopLeft(extent));\n        var bottomRightPixel = ovmap.getPixelFromCoordinateInternal(getBottomRight(extent));\n        var boxWidth = Math.abs(topLeftPixel[0] - bottomRightPixel[0]);\n        var boxHeight = Math.abs(topLeftPixel[1] - bottomRightPixel[1]);\n        var ovmapWidth = ovmapSize[0];\n        var ovmapHeight = ovmapSize[1];\n        if (boxWidth < ovmapWidth * MIN_RATIO ||\n            boxHeight < ovmapHeight * MIN_RATIO ||\n            boxWidth > ovmapWidth * MAX_RATIO ||\n            boxHeight > ovmapHeight * MAX_RATIO) {\n            this.resetExtent_();\n        }\n        else if (!containsExtent(ovextent, extent)) {\n            this.recenter_();\n        }\n    };\n    /**\n     * Reset the overview map extent to half calculated min and max ratio times\n     * the extent of the main map.\n     * @private\n     */\n    OverviewMap.prototype.resetExtent_ = function () {\n        if (MAX_RATIO === 0 || MIN_RATIO === 0) {\n            return;\n        }\n        var map = this.getMap();\n        var ovmap = this.ovmap_;\n        var mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n        var view = map.getView();\n        var extent = view.calculateExtentInternal(mapSize);\n        var ovview = ovmap.getView();\n        // get how many times the current map overview could hold different\n        // box sizes using the min and max ratio, pick the step in the middle used\n        // to calculate the extent from the main map to set it to the overview map,\n        var steps = Math.log(MAX_RATIO / MIN_RATIO) / Math.LN2;\n        var ratio = 1 / (Math.pow(2, steps / 2) * MIN_RATIO);\n        scaleFromCenter(extent, ratio);\n        ovview.fitInternal(polygonFromExtent(extent));\n    };\n    /**\n     * Set the center of the overview map to the map center without changing its\n     * resolution.\n     * @private\n     */\n    OverviewMap.prototype.recenter_ = function () {\n        var map = this.getMap();\n        var ovmap = this.ovmap_;\n        var view = map.getView();\n        var ovview = ovmap.getView();\n        ovview.setCenterInternal(view.getCenterInternal());\n    };\n    /**\n     * Update the box using the main map extent\n     * @private\n     */\n    OverviewMap.prototype.updateBox_ = function () {\n        var map = this.getMap();\n        var ovmap = this.ovmap_;\n        if (!map.isRendered() || !ovmap.isRendered()) {\n            return;\n        }\n        var mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n        var view = map.getView();\n        var ovview = ovmap.getView();\n        var rotation = this.rotateWithView_ ? 0 : -view.getRotation();\n        var overlay = this.boxOverlay_;\n        var box = this.boxOverlay_.getElement();\n        var center = view.getCenterInternal();\n        var resolution = view.getResolution();\n        var ovresolution = ovview.getResolution();\n        var width = (mapSize[0] * resolution) / ovresolution;\n        var height = (mapSize[1] * resolution) / ovresolution;\n        // set position using center coordinates\n        overlay.setPosition(center);\n        // set box size calculated from map extent size and overview map resolution\n        if (box) {\n            box.style.width = width + 'px';\n            box.style.height = height + 'px';\n            var transform = 'rotate(' + rotation + 'rad)';\n            box.style.transform = transform;\n        }\n    };\n    /**\n     * @private\n     */\n    OverviewMap.prototype.updateBoxAfterOvmapIsRendered_ = function () {\n        if (this.ovmapPostrenderKey_) {\n            return;\n        }\n        this.ovmapPostrenderKey_ = listenOnce(this.ovmap_, MapEventType.POSTRENDER, function (event) {\n            delete this.ovmapPostrenderKey_;\n            this.updateBox_();\n        }, this);\n    };\n    /**\n     * @param {MouseEvent} event The event to handle\n     * @private\n     */\n    OverviewMap.prototype.handleClick_ = function (event) {\n        event.preventDefault();\n        this.handleToggle_();\n    };\n    /**\n     * @private\n     */\n    OverviewMap.prototype.handleToggle_ = function () {\n        this.element.classList.toggle(CLASS_COLLAPSED);\n        if (this.collapsed_) {\n            replaceNode(this.collapseLabel_, this.label_);\n        }\n        else {\n            replaceNode(this.label_, this.collapseLabel_);\n        }\n        this.collapsed_ = !this.collapsed_;\n        // manage overview map if it had not been rendered before and control\n        // is expanded\n        var ovmap = this.ovmap_;\n        if (!this.collapsed_) {\n            if (ovmap.isRendered()) {\n                this.viewExtent_ = undefined;\n                ovmap.render();\n                return;\n            }\n            ovmap.updateSize();\n            this.resetExtent_();\n            this.updateBoxAfterOvmapIsRendered_();\n        }\n    };\n    /**\n     * Return `true` if the overview map is collapsible, `false` otherwise.\n     * @return {boolean} True if the widget is collapsible.\n     * @api\n     */\n    OverviewMap.prototype.getCollapsible = function () {\n        return this.collapsible_;\n    };\n    /**\n     * Set whether the overview map should be collapsible.\n     * @param {boolean} collapsible True if the widget is collapsible.\n     * @api\n     */\n    OverviewMap.prototype.setCollapsible = function (collapsible) {\n        if (this.collapsible_ === collapsible) {\n            return;\n        }\n        this.collapsible_ = collapsible;\n        this.element.classList.toggle('ol-uncollapsible');\n        if (!collapsible && this.collapsed_) {\n            this.handleToggle_();\n        }\n    };\n    /**\n     * Collapse or expand the overview map according to the passed parameter. Will\n     * not do anything if the overview map isn't collapsible or if the current\n     * collapsed state is already the one requested.\n     * @param {boolean} collapsed True if the widget is collapsed.\n     * @api\n     */\n    OverviewMap.prototype.setCollapsed = function (collapsed) {\n        if (!this.collapsible_ || this.collapsed_ === collapsed) {\n            return;\n        }\n        this.handleToggle_();\n    };\n    /**\n     * Determine if the overview map is collapsed.\n     * @return {boolean} The overview map is collapsed.\n     * @api\n     */\n    OverviewMap.prototype.getCollapsed = function () {\n        return this.collapsed_;\n    };\n    /**\n     * Return `true` if the overview map view can rotate, `false` otherwise.\n     * @return {boolean} True if the control view can rotate.\n     * @api\n     */\n    OverviewMap.prototype.getRotateWithView = function () {\n        return this.rotateWithView_;\n    };\n    /**\n     * Set whether the overview map view should rotate with the main map view.\n     * @param {boolean} rotateWithView True if the control view should rotate.\n     * @api\n     */\n    OverviewMap.prototype.setRotateWithView = function (rotateWithView) {\n        if (this.rotateWithView_ === rotateWithView) {\n            return;\n        }\n        this.rotateWithView_ = rotateWithView;\n        if (this.getMap().getView().getRotation() !== 0) {\n            if (this.rotateWithView_) {\n                this.handleRotationChanged_();\n            }\n            else {\n                this.ovmap_.getView().setRotation(0);\n            }\n            this.viewExtent_ = undefined;\n            this.validateExtent_();\n            this.updateBox_();\n        }\n    };\n    /**\n     * Return the overview map.\n     * @return {import(\"../PluggableMap.js\").default} Overview map.\n     * @api\n     */\n    OverviewMap.prototype.getOverviewMap = function () {\n        return this.ovmap_;\n    };\n    /**\n     * Update the overview map element.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @override\n     */\n    OverviewMap.prototype.render = function (mapEvent) {\n        this.validateExtent_();\n        this.updateBox_();\n    };\n    return OverviewMap;\n}(Control));\nexport default OverviewMap;\n//# sourceMappingURL=OverviewMap.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/ScaleLine\n */\nimport Control from './Control.js';\nimport ProjUnits from '../proj/Units.js';\nimport { CLASS_UNSELECTABLE } from '../css.js';\nimport { METERS_PER_UNIT, getPointResolution } from '../proj.js';\nimport { assert } from '../asserts.js';\n/**\n * @type {string}\n */\nvar UNITS_PROP = 'units';\n/**\n * Units for the scale line. Supported values are `'degrees'`, `'imperial'`,\n * `'nautical'`, `'metric'`, `'us'`.\n * @enum {string}\n */\nexport var Units = {\n    DEGREES: 'degrees',\n    IMPERIAL: 'imperial',\n    NAUTICAL: 'nautical',\n    METRIC: 'metric',\n    US: 'us',\n};\n/**\n * @const\n * @type {Array<number>}\n */\nvar LEADING_DIGITS = [1, 2, 5];\n/**\n * @const\n * @type {number}\n */\nvar DEFAULT_DPI = 25.4 / 0.28;\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types|\n *     'change:units', import(\"../Object\").ObjectEvent, Return> &\n *   import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"../ObjectEventType\").Types\n *     |'change:units', Return>} ScaleLineOnSignature\n */\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-scale-line'] CSS Class name.\n * @property {number} [minWidth=64] Minimum width in pixels at the OGC default dpi. The width will be\n * adjusted to match the dpi used.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {import(\"./ScaleLine.js\").Units|string} [units='metric'] Units.\n * @property {boolean} [bar=false] Render scalebars instead of a line.\n * @property {number} [steps=4] Number of steps the scalebar should use. Use even numbers\n * for best results. Only applies when `bar` is `true`.\n * @property {boolean} [text=false] Render the text scale above of the scalebar. Only applies\n * when `bar` is `true`.\n * @property {number|undefined} [dpi=undefined] dpi of output device such as printer. Only applies\n * when `bar` is `true`. If undefined the OGC default screen pixel size of 0.28mm will be assumed.\n */\n/**\n * @classdesc\n * A control displaying rough y-axis distances, calculated for the center of the\n * viewport. For conformal projections (e.g. EPSG:3857, the default view\n * projection in OpenLayers), the scale is valid for all directions.\n * No scale line will be shown when the y-axis distance of a pixel at the\n * viewport center cannot be calculated in the view projection.\n * By default the scale line will show in the bottom left portion of the map,\n * but this can be changed by using the css selector `.ol-scale-line`.\n * When specifying `bar` as `true`, a scalebar will be rendered instead\n * of a scaleline.\n *\n * @api\n */\nvar ScaleLine = /** @class */ (function (_super) {\n    __extends(ScaleLine, _super);\n    /**\n     * @param {Options} [opt_options] Scale line options.\n     */\n    function ScaleLine(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var className = options.className !== undefined\n            ? options.className\n            : options.bar\n                ? 'ol-scale-bar'\n                : 'ol-scale-line';\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            render: options.render,\n            target: options.target,\n        }) || this;\n        /***\n         * @type {ScaleLineOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {ScaleLineOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {ScaleLineOnSignature<void>}\n         */\n        _this.un;\n        /**\n         * @private\n         * @type {HTMLElement}\n         */\n        _this.innerElement_ = document.createElement('div');\n        _this.innerElement_.className = className + '-inner';\n        _this.element.className = className + ' ' + CLASS_UNSELECTABLE;\n        _this.element.appendChild(_this.innerElement_);\n        /**\n         * @private\n         * @type {?import(\"../View.js\").State}\n         */\n        _this.viewState_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.minWidth_ = options.minWidth !== undefined ? options.minWidth : 64;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.renderedVisible_ = false;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.renderedWidth_ = undefined;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.renderedHTML_ = '';\n        _this.addChangeListener(UNITS_PROP, _this.handleUnitsChanged_);\n        _this.setUnits(options.units || Units.METRIC);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.scaleBar_ = options.bar || false;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.scaleBarSteps_ = options.steps || 4;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.scaleBarText_ = options.text || false;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.dpi_ = options.dpi || undefined;\n        return _this;\n    }\n    /**\n     * Return the units to use in the scale line.\n     * @return {import(\"./ScaleLine.js\").Units} The units\n     * to use in the scale line.\n     * @observable\n     * @api\n     */\n    ScaleLine.prototype.getUnits = function () {\n        return this.get(UNITS_PROP);\n    };\n    /**\n     * @private\n     */\n    ScaleLine.prototype.handleUnitsChanged_ = function () {\n        this.updateElement_();\n    };\n    /**\n     * Set the units to use in the scale line.\n     * @param {import(\"./ScaleLine.js\").Units} units The units to use in the scale line.\n     * @observable\n     * @api\n     */\n    ScaleLine.prototype.setUnits = function (units) {\n        this.set(UNITS_PROP, units);\n    };\n    /**\n     * Specify the dpi of output device such as printer.\n     * @param {number|undefined} dpi The dpi of output device.\n     * @api\n     */\n    ScaleLine.prototype.setDpi = function (dpi) {\n        this.dpi_ = dpi;\n    };\n    /**\n     * @private\n     */\n    ScaleLine.prototype.updateElement_ = function () {\n        var viewState = this.viewState_;\n        if (!viewState) {\n            if (this.renderedVisible_) {\n                this.element.style.display = 'none';\n                this.renderedVisible_ = false;\n            }\n            return;\n        }\n        var center = viewState.center;\n        var projection = viewState.projection;\n        var units = this.getUnits();\n        var pointResolutionUnits = units == Units.DEGREES ? ProjUnits.DEGREES : ProjUnits.METERS;\n        var pointResolution = getPointResolution(projection, viewState.resolution, center, pointResolutionUnits);\n        var minWidth = (this.minWidth_ * (this.dpi_ || DEFAULT_DPI)) / DEFAULT_DPI;\n        var nominalCount = minWidth * pointResolution;\n        var suffix = '';\n        if (units == Units.DEGREES) {\n            var metersPerDegree = METERS_PER_UNIT[ProjUnits.DEGREES];\n            nominalCount *= metersPerDegree;\n            if (nominalCount < metersPerDegree / 60) {\n                suffix = '\\u2033'; // seconds\n                pointResolution *= 3600;\n            }\n            else if (nominalCount < metersPerDegree) {\n                suffix = '\\u2032'; // minutes\n                pointResolution *= 60;\n            }\n            else {\n                suffix = '\\u00b0'; // degrees\n            }\n        }\n        else if (units == Units.IMPERIAL) {\n            if (nominalCount < 0.9144) {\n                suffix = 'in';\n                pointResolution /= 0.0254;\n            }\n            else if (nominalCount < 1609.344) {\n                suffix = 'ft';\n                pointResolution /= 0.3048;\n            }\n            else {\n                suffix = 'mi';\n                pointResolution /= 1609.344;\n            }\n        }\n        else if (units == Units.NAUTICAL) {\n            pointResolution /= 1852;\n            suffix = 'nm';\n        }\n        else if (units == Units.METRIC) {\n            if (nominalCount < 0.001) {\n                suffix = 'μm';\n                pointResolution *= 1000000;\n            }\n            else if (nominalCount < 1) {\n                suffix = 'mm';\n                pointResolution *= 1000;\n            }\n            else if (nominalCount < 1000) {\n                suffix = 'm';\n            }\n            else {\n                suffix = 'km';\n                pointResolution /= 1000;\n            }\n        }\n        else if (units == Units.US) {\n            if (nominalCount < 0.9144) {\n                suffix = 'in';\n                pointResolution *= 39.37;\n            }\n            else if (nominalCount < 1609.344) {\n                suffix = 'ft';\n                pointResolution /= 0.30480061;\n            }\n            else {\n                suffix = 'mi';\n                pointResolution /= 1609.3472;\n            }\n        }\n        else {\n            assert(false, 33); // Invalid units\n        }\n        var i = 3 * Math.floor(Math.log(minWidth * pointResolution) / Math.log(10));\n        var count, width, decimalCount;\n        while (true) {\n            decimalCount = Math.floor(i / 3);\n            var decimal = Math.pow(10, decimalCount);\n            count = LEADING_DIGITS[((i % 3) + 3) % 3] * decimal;\n            width = Math.round(count / pointResolution);\n            if (isNaN(width)) {\n                this.element.style.display = 'none';\n                this.renderedVisible_ = false;\n                return;\n            }\n            else if (width >= minWidth) {\n                break;\n            }\n            ++i;\n        }\n        var html;\n        if (this.scaleBar_) {\n            html = this.createScaleBar(width, count, suffix);\n        }\n        else {\n            html = count.toFixed(decimalCount < 0 ? -decimalCount : 0) + ' ' + suffix;\n        }\n        if (this.renderedHTML_ != html) {\n            this.innerElement_.innerHTML = html;\n            this.renderedHTML_ = html;\n        }\n        if (this.renderedWidth_ != width) {\n            this.innerElement_.style.width = width + 'px';\n            this.renderedWidth_ = width;\n        }\n        if (!this.renderedVisible_) {\n            this.element.style.display = '';\n            this.renderedVisible_ = true;\n        }\n    };\n    /**\n     * @private\n     * @param {number} width The current width of the scalebar.\n     * @param {number} scale The current scale.\n     * @param {string} suffix The suffix to append to the scale text.\n     * @return {string} The stringified HTML of the scalebar.\n     */\n    ScaleLine.prototype.createScaleBar = function (width, scale, suffix) {\n        var mapScale = '1 : ' + Math.round(this.getScaleForResolution()).toLocaleString();\n        var scaleSteps = [];\n        var stepWidth = width / this.scaleBarSteps_;\n        var backgroundColor = '#ffffff';\n        for (var i = 0; i < this.scaleBarSteps_; i++) {\n            if (i === 0) {\n                // create the first marker at position 0\n                scaleSteps.push(this.createMarker('absolute', i));\n            }\n            scaleSteps.push('<div>' +\n                '<div ' +\n                'class=\"ol-scale-singlebar\" ' +\n                'style=' +\n                '\"width: ' +\n                stepWidth +\n                'px;' +\n                'background-color: ' +\n                backgroundColor +\n                ';\"' +\n                '>' +\n                '</div>' +\n                this.createMarker('relative', i) +\n                /*render text every second step, except when only 2 steps */\n                (i % 2 === 0 || this.scaleBarSteps_ === 2\n                    ? this.createStepText(i, width, false, scale, suffix)\n                    : '') +\n                '</div>');\n            if (i === this.scaleBarSteps_ - 1) {\n                {\n                    /*render text at the end */\n                }\n                scaleSteps.push(this.createStepText(i + 1, width, true, scale, suffix));\n            }\n            // switch colors of steps between black and white\n            if (backgroundColor === '#ffffff') {\n                backgroundColor = '#000000';\n            }\n            else {\n                backgroundColor = '#ffffff';\n            }\n        }\n        var scaleBarText;\n        if (this.scaleBarText_) {\n            scaleBarText =\n                '<div ' +\n                    'class=\"ol-scale-text\" ' +\n                    'style=\"width: ' +\n                    width +\n                    'px;\">' +\n                    mapScale +\n                    '</div>';\n        }\n        else {\n            scaleBarText = '';\n        }\n        var container = '<div ' +\n            'style=\"display: flex;\">' +\n            scaleBarText +\n            scaleSteps.join('') +\n            '</div>';\n        return container;\n    };\n    /**\n     * Creates a marker at given position\n     * @param {string} position The position, absolute or relative\n     * @param {number} i The iterator\n     * @return {string} The stringified div containing the marker\n     */\n    ScaleLine.prototype.createMarker = function (position, i) {\n        var top = position === 'absolute' ? 3 : -10;\n        return ('<div ' +\n            'class=\"ol-scale-step-marker\" ' +\n            'style=\"position: ' +\n            position +\n            ';' +\n            'top: ' +\n            top +\n            'px;\"' +\n            '></div>');\n    };\n    /**\n     * Creates the label for a marker marker at given position\n     * @param {number} i The iterator\n     * @param {number} width The width the scalebar will currently use\n     * @param {boolean} isLast Flag indicating if we add the last step text\n     * @param {number} scale The current scale for the whole scalebar\n     * @param {string} suffix The suffix for the scale\n     * @return {string} The stringified div containing the step text\n     */\n    ScaleLine.prototype.createStepText = function (i, width, isLast, scale, suffix) {\n        var length = i === 0 ? 0 : Math.round((scale / this.scaleBarSteps_) * i * 100) / 100;\n        var lengthString = length + (i === 0 ? '' : ' ' + suffix);\n        var margin = i === 0 ? -3 : (width / this.scaleBarSteps_) * -1;\n        var minWidth = i === 0 ? 0 : (width / this.scaleBarSteps_) * 2;\n        return ('<div ' +\n            'class=\"ol-scale-step-text\" ' +\n            'style=\"' +\n            'margin-left: ' +\n            margin +\n            'px;' +\n            'text-align: ' +\n            (i === 0 ? 'left' : 'center') +\n            '; ' +\n            'min-width: ' +\n            minWidth +\n            'px;' +\n            'left: ' +\n            (isLast ? width + 'px' : 'unset') +\n            ';\"' +\n            '>' +\n            lengthString +\n            '</div>');\n    };\n    /**\n     * Returns the appropriate scale for the given resolution and units.\n     * @return {number} The appropriate scale.\n     */\n    ScaleLine.prototype.getScaleForResolution = function () {\n        var resolution = getPointResolution(this.viewState_.projection, this.viewState_.resolution, this.viewState_.center);\n        var dpi = this.dpi_ || DEFAULT_DPI;\n        var mpu = this.viewState_.projection.getMetersPerUnit();\n        var inchesPerMeter = 1000 / 25.4;\n        return parseFloat(resolution.toString()) * mpu * inchesPerMeter * dpi;\n    };\n    /**\n     * Update the scale line element.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @override\n     */\n    ScaleLine.prototype.render = function (mapEvent) {\n        var frameState = mapEvent.frameState;\n        if (!frameState) {\n            this.viewState_ = null;\n        }\n        else {\n            this.viewState_ = frameState.viewState;\n        }\n        this.updateElement_();\n    };\n    return ScaleLine;\n}(Control));\nexport default ScaleLine;\n//# sourceMappingURL=ScaleLine.js.map","/**\n * @module ol/control/ZoomSlider\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport PointerEventType from '../pointer/EventType.js';\nimport { CLASS_CONTROL, CLASS_UNSELECTABLE } from '../css.js';\nimport { clamp } from '../math.js';\nimport { easeOut } from '../easing.js';\nimport { listen, unlistenByKey } from '../events.js';\nimport { stopPropagation } from '../events/Event.js';\n/**\n * The enum for available directions.\n *\n * @enum {number}\n */\nvar Direction = {\n    VERTICAL: 0,\n    HORIZONTAL: 1,\n};\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-zoomslider'] CSS class name.\n * @property {number} [duration=200] Animation duration in milliseconds.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n */\n/**\n * @classdesc\n * A slider type of control for zooming.\n *\n * Example:\n *\n *     map.addControl(new ZoomSlider());\n *\n * @api\n */\nvar ZoomSlider = /** @class */ (function (_super) {\n    __extends(ZoomSlider, _super);\n    /**\n     * @param {Options} [opt_options] Zoom slider options.\n     */\n    function ZoomSlider(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            render: options.render,\n        }) || this;\n        /**\n         * @type {!Array<import(\"../events.js\").EventsKey>}\n         * @private\n         */\n        _this.dragListenerKeys_ = [];\n        /**\n         * Will hold the current resolution of the view.\n         *\n         * @type {number|undefined}\n         * @private\n         */\n        _this.currentResolution_ = undefined;\n        /**\n         * The direction of the slider. Will be determined from actual display of the\n         * container and defaults to Direction.VERTICAL.\n         *\n         * @type {Direction}\n         * @private\n         */\n        _this.direction_ = Direction.VERTICAL;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.dragging_;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.heightLimit_ = 0;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.widthLimit_ = 0;\n        /**\n         * @type {number|undefined}\n         * @private\n         */\n        _this.startX_;\n        /**\n         * @type {number|undefined}\n         * @private\n         */\n        _this.startY_;\n        /**\n         * The calculated thumb size (border box plus margins).  Set when initSlider_\n         * is called.\n         * @type {import(\"../size.js\").Size}\n         * @private\n         */\n        _this.thumbSize_ = null;\n        /**\n         * Whether the slider is initialized.\n         * @type {boolean}\n         * @private\n         */\n        _this.sliderInitialized_ = false;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 200;\n        var className = options.className !== undefined ? options.className : 'ol-zoomslider';\n        var thumbElement = document.createElement('button');\n        thumbElement.setAttribute('type', 'button');\n        thumbElement.className = className + '-thumb ' + CLASS_UNSELECTABLE;\n        var containerElement = _this.element;\n        containerElement.className =\n            className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n        containerElement.appendChild(thumbElement);\n        containerElement.addEventListener(PointerEventType.POINTERDOWN, _this.handleDraggerStart_.bind(_this), false);\n        containerElement.addEventListener(PointerEventType.POINTERMOVE, _this.handleDraggerDrag_.bind(_this), false);\n        containerElement.addEventListener(PointerEventType.POINTERUP, _this.handleDraggerEnd_.bind(_this), false);\n        containerElement.addEventListener(EventType.CLICK, _this.handleContainerClick_.bind(_this), false);\n        thumbElement.addEventListener(EventType.CLICK, stopPropagation, false);\n        return _this;\n    }\n    /**\n     * Remove the control from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @api\n     */\n    ZoomSlider.prototype.setMap = function (map) {\n        _super.prototype.setMap.call(this, map);\n        if (map) {\n            map.render();\n        }\n    };\n    /**\n     * Initializes the slider element. This will determine and set this controls\n     * direction_ and also constrain the dragging of the thumb to always be within\n     * the bounds of the container.\n     *\n     * @return {boolean} Initialization successful\n     * @private\n     */\n    ZoomSlider.prototype.initSlider_ = function () {\n        var container = this.element;\n        var containerWidth = container.offsetWidth;\n        var containerHeight = container.offsetHeight;\n        if (containerWidth === 0 && containerHeight === 0) {\n            return (this.sliderInitialized_ = false);\n        }\n        var containerStyle = getComputedStyle(container);\n        containerWidth -=\n            parseFloat(containerStyle['paddingRight']) +\n                parseFloat(containerStyle['paddingLeft']);\n        containerHeight -=\n            parseFloat(containerStyle['paddingTop']) +\n                parseFloat(containerStyle['paddingBottom']);\n        var thumb = /** @type {HTMLElement} */ (container.firstElementChild);\n        var thumbStyle = getComputedStyle(thumb);\n        var thumbWidth = thumb.offsetWidth +\n            parseFloat(thumbStyle['marginRight']) +\n            parseFloat(thumbStyle['marginLeft']);\n        var thumbHeight = thumb.offsetHeight +\n            parseFloat(thumbStyle['marginTop']) +\n            parseFloat(thumbStyle['marginBottom']);\n        this.thumbSize_ = [thumbWidth, thumbHeight];\n        if (containerWidth > containerHeight) {\n            this.direction_ = Direction.HORIZONTAL;\n            this.widthLimit_ = containerWidth - thumbWidth;\n        }\n        else {\n            this.direction_ = Direction.VERTICAL;\n            this.heightLimit_ = containerHeight - thumbHeight;\n        }\n        return (this.sliderInitialized_ = true);\n    };\n    /**\n     * @param {PointerEvent} event The browser event to handle.\n     * @private\n     */\n    ZoomSlider.prototype.handleContainerClick_ = function (event) {\n        var view = this.getMap().getView();\n        var relativePosition = this.getRelativePosition_(event.offsetX - this.thumbSize_[0] / 2, event.offsetY - this.thumbSize_[1] / 2);\n        var resolution = this.getResolutionForPosition_(relativePosition);\n        var zoom = view.getConstrainedZoom(view.getZoomForResolution(resolution));\n        view.animateInternal({\n            zoom: zoom,\n            duration: this.duration_,\n            easing: easeOut,\n        });\n    };\n    /**\n     * Handle dragger start events.\n     * @param {PointerEvent} event The drag event.\n     * @private\n     */\n    ZoomSlider.prototype.handleDraggerStart_ = function (event) {\n        if (!this.dragging_ && event.target === this.element.firstElementChild) {\n            var element = /** @type {HTMLElement} */ (this.element.firstElementChild);\n            this.getMap().getView().beginInteraction();\n            this.startX_ = event.clientX - parseFloat(element.style.left);\n            this.startY_ = event.clientY - parseFloat(element.style.top);\n            this.dragging_ = true;\n            if (this.dragListenerKeys_.length === 0) {\n                var drag = this.handleDraggerDrag_;\n                var end = this.handleDraggerEnd_;\n                var doc = this.getMap().getOwnerDocument();\n                this.dragListenerKeys_.push(listen(doc, PointerEventType.POINTERMOVE, drag, this), listen(doc, PointerEventType.POINTERUP, end, this));\n            }\n        }\n    };\n    /**\n     * Handle dragger drag events.\n     *\n     * @param {PointerEvent} event The drag event.\n     * @private\n     */\n    ZoomSlider.prototype.handleDraggerDrag_ = function (event) {\n        if (this.dragging_) {\n            var deltaX = event.clientX - this.startX_;\n            var deltaY = event.clientY - this.startY_;\n            var relativePosition = this.getRelativePosition_(deltaX, deltaY);\n            this.currentResolution_ =\n                this.getResolutionForPosition_(relativePosition);\n            this.getMap().getView().setResolution(this.currentResolution_);\n        }\n    };\n    /**\n     * Handle dragger end events.\n     * @param {PointerEvent} event The drag event.\n     * @private\n     */\n    ZoomSlider.prototype.handleDraggerEnd_ = function (event) {\n        if (this.dragging_) {\n            var view = this.getMap().getView();\n            view.endInteraction();\n            this.dragging_ = false;\n            this.startX_ = undefined;\n            this.startY_ = undefined;\n            this.dragListenerKeys_.forEach(unlistenByKey);\n            this.dragListenerKeys_.length = 0;\n        }\n    };\n    /**\n     * Positions the thumb inside its container according to the given resolution.\n     *\n     * @param {number} res The res.\n     * @private\n     */\n    ZoomSlider.prototype.setThumbPosition_ = function (res) {\n        var position = this.getPositionForResolution_(res);\n        var thumb = /** @type {HTMLElement} */ (this.element.firstElementChild);\n        if (this.direction_ == Direction.HORIZONTAL) {\n            thumb.style.left = this.widthLimit_ * position + 'px';\n        }\n        else {\n            thumb.style.top = this.heightLimit_ * position + 'px';\n        }\n    };\n    /**\n     * Calculates the relative position of the thumb given x and y offsets.  The\n     * relative position scales from 0 to 1.  The x and y offsets are assumed to be\n     * in pixel units within the dragger limits.\n     *\n     * @param {number} x Pixel position relative to the left of the slider.\n     * @param {number} y Pixel position relative to the top of the slider.\n     * @return {number} The relative position of the thumb.\n     * @private\n     */\n    ZoomSlider.prototype.getRelativePosition_ = function (x, y) {\n        var amount;\n        if (this.direction_ === Direction.HORIZONTAL) {\n            amount = x / this.widthLimit_;\n        }\n        else {\n            amount = y / this.heightLimit_;\n        }\n        return clamp(amount, 0, 1);\n    };\n    /**\n     * Calculates the corresponding resolution of the thumb given its relative\n     * position (where 0 is the minimum and 1 is the maximum).\n     *\n     * @param {number} position The relative position of the thumb.\n     * @return {number} The corresponding resolution.\n     * @private\n     */\n    ZoomSlider.prototype.getResolutionForPosition_ = function (position) {\n        var fn = this.getMap().getView().getResolutionForValueFunction();\n        return fn(1 - position);\n    };\n    /**\n     * Determines the relative position of the slider for the given resolution.  A\n     * relative position of 0 corresponds to the minimum view resolution.  A\n     * relative position of 1 corresponds to the maximum view resolution.\n     *\n     * @param {number} res The resolution.\n     * @return {number} The relative position value (between 0 and 1).\n     * @private\n     */\n    ZoomSlider.prototype.getPositionForResolution_ = function (res) {\n        var fn = this.getMap().getView().getValueForResolutionFunction();\n        return clamp(1 - fn(res), 0, 1);\n    };\n    /**\n     * Update the zoomslider element.\n     * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n     * @override\n     */\n    ZoomSlider.prototype.render = function (mapEvent) {\n        if (!mapEvent.frameState) {\n            return;\n        }\n        if (!this.sliderInitialized_ && !this.initSlider_()) {\n            return;\n        }\n        var res = mapEvent.frameState.viewState.resolution;\n        this.currentResolution_ = res;\n        this.setThumbPosition_(res);\n    };\n    return ZoomSlider;\n}(Control));\nexport default ZoomSlider;\n//# sourceMappingURL=ZoomSlider.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/control/ZoomToExtent\n */\nimport Control from './Control.js';\nimport EventType from '../events/EventType.js';\nimport { CLASS_CONTROL, CLASS_UNSELECTABLE } from '../css.js';\nimport { fromExtent as polygonFromExtent } from '../geom/Polygon.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-zoom-extent'] Class name.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {string|HTMLElement} [label='E'] Text label to use for the button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Fit to extent'] Text label to use for the button tip.\n * @property {import(\"../extent.js\").Extent} [extent] The extent to zoom to. If undefined the validity\n * extent of the view projection is used.\n */\n/**\n * @classdesc\n * A button control which, when pressed, changes the map view to a specific\n * extent. To style this control use the css selector `.ol-zoom-extent`.\n *\n * @api\n */\nvar ZoomToExtent = /** @class */ (function (_super) {\n    __extends(ZoomToExtent, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function ZoomToExtent(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            element: document.createElement('div'),\n            target: options.target,\n        }) || this;\n        /**\n         * @type {?import(\"../extent.js\").Extent}\n         * @protected\n         */\n        _this.extent = options.extent ? options.extent : null;\n        var className = options.className !== undefined ? options.className : 'ol-zoom-extent';\n        var label = options.label !== undefined ? options.label : 'E';\n        var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Fit to extent';\n        var button = document.createElement('button');\n        button.setAttribute('type', 'button');\n        button.title = tipLabel;\n        button.appendChild(typeof label === 'string' ? document.createTextNode(label) : label);\n        button.addEventListener(EventType.CLICK, _this.handleClick_.bind(_this), false);\n        var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n        var element = _this.element;\n        element.className = cssClasses;\n        element.appendChild(button);\n        return _this;\n    }\n    /**\n     * @param {MouseEvent} event The event to handle\n     * @private\n     */\n    ZoomToExtent.prototype.handleClick_ = function (event) {\n        event.preventDefault();\n        this.handleZoomToExtent();\n    };\n    /**\n     * @protected\n     */\n    ZoomToExtent.prototype.handleZoomToExtent = function () {\n        var map = this.getMap();\n        var view = map.getView();\n        var extent = !this.extent\n            ? view.getProjection().getExtent()\n            : this.extent;\n        view.fitInternal(polygonFromExtent(extent));\n    };\n    return ZoomToExtent;\n}(Control));\nexport default ZoomToExtent;\n//# sourceMappingURL=ZoomToExtent.js.map","/**\n * @module ol/control\n */\nimport Attribution from './control/Attribution.js';\nimport Collection from './Collection.js';\nimport Rotate from './control/Rotate.js';\nimport Zoom from './control/Zoom.js';\nexport { default as Attribution } from './control/Attribution.js';\nexport { default as Control } from './control/Control.js';\nexport { default as FullScreen } from './control/FullScreen.js';\nexport { default as MousePosition } from './control/MousePosition.js';\nexport { default as OverviewMap } from './control/OverviewMap.js';\nexport { default as Rotate } from './control/Rotate.js';\nexport { default as ScaleLine } from './control/ScaleLine.js';\nexport { default as Zoom } from './control/Zoom.js';\nexport { default as ZoomSlider } from './control/ZoomSlider.js';\nexport { default as ZoomToExtent } from './control/ZoomToExtent.js';\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [attribution=true] Include\n * {@link module:ol/control/Attribution~Attribution}.\n * @property {import(\"./control/Attribution.js\").Options} [attributionOptions]\n * Options for {@link module:ol/control/Attribution~Attribution}.\n * @property {boolean} [rotate=true] Include\n * {@link module:ol/control/Rotate~Rotate}.\n * @property {import(\"./control/Rotate.js\").Options} [rotateOptions] Options\n * for {@link module:ol/control/Rotate~Rotate}.\n * @property {boolean} [zoom] Include {@link module:ol/control/Zoom~Zoom}.\n * @property {import(\"./control/Zoom.js\").Options} [zoomOptions] Options for\n * {@link module:ol/control/Zoom~Zoom}.\n * @api\n */\n/**\n * Set of controls included in maps by default. Unless configured otherwise,\n * this returns a collection containing an instance of each of the following\n * controls:\n * * {@link module:ol/control/Zoom~Zoom}\n * * {@link module:ol/control/Rotate~Rotate}\n * * {@link module:ol/control/Attribution~Attribution}\n *\n * @param {DefaultsOptions} [opt_options]\n * Defaults options.\n * @return {Collection<import(\"./control/Control.js\").default>}\n * Controls.\n * @api\n */\nexport function defaults(opt_options) {\n    var options = opt_options ? opt_options : {};\n    var controls = new Collection();\n    var zoomControl = options.zoom !== undefined ? options.zoom : true;\n    if (zoomControl) {\n        controls.push(new Zoom(options.zoomOptions));\n    }\n    var rotateControl = options.rotate !== undefined ? options.rotate : true;\n    if (rotateControl) {\n        controls.push(new Rotate(options.rotateOptions));\n    }\n    var attributionControl = options.attribution !== undefined ? options.attribution : true;\n    if (attributionControl) {\n        controls.push(new Attribution(options.attributionOptions));\n    }\n    return controls;\n}\n//# sourceMappingURL=control.js.map","function _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    module.exports = _typeof = function _typeof(obj) {\n      return typeof obj;\n    };\n  } else {\n    module.exports = _typeof = function _typeof(obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n\n  return _typeof(obj);\n}\n\nmodule.exports = _typeof;","/**\n * @module ol/color\n */\nimport { assert } from './asserts.js';\nimport { clamp } from './math.js';\n/**\n * A color represented as a short array [red, green, blue, alpha].\n * red, green, and blue should be integers in the range 0..255 inclusive.\n * alpha should be a float in the range 0..1 inclusive. If no alpha value is\n * given then `1` will be used.\n * @typedef {Array<number>} Color\n * @api\n */\n/**\n * This RegExp matches # followed by 3, 4, 6, or 8 hex digits.\n * @const\n * @type {RegExp}\n * @private\n */\nvar HEX_COLOR_RE_ = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i;\n/**\n * Regular expression for matching potential named color style strings.\n * @const\n * @type {RegExp}\n * @private\n */\nvar NAMED_COLOR_RE_ = /^([a-z]*)$|^hsla?\\(.*\\)$/i;\n/**\n * Return the color as an rgba string.\n * @param {Color|string} color Color.\n * @return {string} Rgba string.\n * @api\n */\nexport function asString(color) {\n    if (typeof color === 'string') {\n        return color;\n    }\n    else {\n        return toString(color);\n    }\n}\n/**\n * Return named color as an rgba string.\n * @param {string} color Named color.\n * @return {string} Rgb string.\n */\nfunction fromNamed(color) {\n    var el = document.createElement('div');\n    el.style.color = color;\n    if (el.style.color !== '') {\n        document.body.appendChild(el);\n        var rgb = getComputedStyle(el).color;\n        document.body.removeChild(el);\n        return rgb;\n    }\n    else {\n        return '';\n    }\n}\n/**\n * @param {string} s String.\n * @return {Color} Color.\n */\nexport var fromString = (function () {\n    // We maintain a small cache of parsed strings.  To provide cheap LRU-like\n    // semantics, whenever the cache grows too large we simply delete an\n    // arbitrary 25% of the entries.\n    /**\n     * @const\n     * @type {number}\n     */\n    var MAX_CACHE_SIZE = 1024;\n    /**\n     * @type {Object<string, Color>}\n     */\n    var cache = {};\n    /**\n     * @type {number}\n     */\n    var cacheSize = 0;\n    return (\n    /**\n     * @param {string} s String.\n     * @return {Color} Color.\n     */\n    function (s) {\n        var color;\n        if (cache.hasOwnProperty(s)) {\n            color = cache[s];\n        }\n        else {\n            if (cacheSize >= MAX_CACHE_SIZE) {\n                var i = 0;\n                for (var key in cache) {\n                    if ((i++ & 3) === 0) {\n                        delete cache[key];\n                        --cacheSize;\n                    }\n                }\n            }\n            color = fromStringInternal_(s);\n            cache[s] = color;\n            ++cacheSize;\n        }\n        return color;\n    });\n})();\n/**\n * Return the color as an array. This function maintains a cache of calculated\n * arrays which means the result should not be modified.\n * @param {Color|string} color Color.\n * @return {Color} Color.\n * @api\n */\nexport function asArray(color) {\n    if (Array.isArray(color)) {\n        return color;\n    }\n    else {\n        return fromString(color);\n    }\n}\n/**\n * @param {string} s String.\n * @private\n * @return {Color} Color.\n */\nfunction fromStringInternal_(s) {\n    var r, g, b, a, color;\n    if (NAMED_COLOR_RE_.exec(s)) {\n        s = fromNamed(s);\n    }\n    if (HEX_COLOR_RE_.exec(s)) {\n        // hex\n        var n = s.length - 1; // number of hex digits\n        var d = // number of digits per channel\n         void 0; // number of digits per channel\n        if (n <= 4) {\n            d = 1;\n        }\n        else {\n            d = 2;\n        }\n        var hasAlpha = n === 4 || n === 8;\n        r = parseInt(s.substr(1 + 0 * d, d), 16);\n        g = parseInt(s.substr(1 + 1 * d, d), 16);\n        b = parseInt(s.substr(1 + 2 * d, d), 16);\n        if (hasAlpha) {\n            a = parseInt(s.substr(1 + 3 * d, d), 16);\n        }\n        else {\n            a = 255;\n        }\n        if (d == 1) {\n            r = (r << 4) + r;\n            g = (g << 4) + g;\n            b = (b << 4) + b;\n            if (hasAlpha) {\n                a = (a << 4) + a;\n            }\n        }\n        color = [r, g, b, a / 255];\n    }\n    else if (s.indexOf('rgba(') == 0) {\n        // rgba()\n        color = s.slice(5, -1).split(',').map(Number);\n        normalize(color);\n    }\n    else if (s.indexOf('rgb(') == 0) {\n        // rgb()\n        color = s.slice(4, -1).split(',').map(Number);\n        color.push(1);\n        normalize(color);\n    }\n    else {\n        assert(false, 14); // Invalid color\n    }\n    return color;\n}\n/**\n * TODO this function is only used in the test, we probably shouldn't export it\n * @param {Color} color Color.\n * @return {Color} Clamped color.\n */\nexport function normalize(color) {\n    color[0] = clamp((color[0] + 0.5) | 0, 0, 255);\n    color[1] = clamp((color[1] + 0.5) | 0, 0, 255);\n    color[2] = clamp((color[2] + 0.5) | 0, 0, 255);\n    color[3] = clamp(color[3], 0, 1);\n    return color;\n}\n/**\n * @param {Color} color Color.\n * @return {string} String.\n */\nexport function toString(color) {\n    var r = color[0];\n    if (r != (r | 0)) {\n        r = (r + 0.5) | 0;\n    }\n    var g = color[1];\n    if (g != (g | 0)) {\n        g = (g + 0.5) | 0;\n    }\n    var b = color[2];\n    if (b != (b | 0)) {\n        b = (b + 0.5) | 0;\n    }\n    var a = color[3] === undefined ? 1 : color[3];\n    return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n}\n/**\n * @param {string} s String.\n * @return {boolean} Whether the string is actually a valid color\n */\nexport function isStringColor(s) {\n    if (NAMED_COLOR_RE_.test(s)) {\n        s = fromNamed(s);\n    }\n    return (HEX_COLOR_RE_.test(s) || s.indexOf('rgba(') === 0 || s.indexOf('rgb(') === 0);\n}\n//# sourceMappingURL=color.js.map","/**\n * @module ol/geom/flat/closest\n */\nimport { lerp, squaredDistance as squaredDx } from '../../math.js';\n/**\n * Returns the point on the 2D line segment flatCoordinates[offset1] to\n * flatCoordinates[offset2] that is closest to the point (x, y).  Extra\n * dimensions are linearly interpolated.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset1 Offset 1.\n * @param {number} offset2 Offset 2.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n */\nfunction assignClosest(flatCoordinates, offset1, offset2, stride, x, y, closestPoint) {\n    var x1 = flatCoordinates[offset1];\n    var y1 = flatCoordinates[offset1 + 1];\n    var dx = flatCoordinates[offset2] - x1;\n    var dy = flatCoordinates[offset2 + 1] - y1;\n    var offset;\n    if (dx === 0 && dy === 0) {\n        offset = offset1;\n    }\n    else {\n        var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n        if (t > 1) {\n            offset = offset2;\n        }\n        else if (t > 0) {\n            for (var i = 0; i < stride; ++i) {\n                closestPoint[i] = lerp(flatCoordinates[offset1 + i], flatCoordinates[offset2 + i], t);\n            }\n            closestPoint.length = stride;\n            return;\n        }\n        else {\n            offset = offset1;\n        }\n    }\n    for (var i = 0; i < stride; ++i) {\n        closestPoint[i] = flatCoordinates[offset + i];\n    }\n    closestPoint.length = stride;\n}\n/**\n * Return the squared of the largest distance between any pair of consecutive\n * coordinates.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function maxSquaredDelta(flatCoordinates, offset, end, stride, max) {\n    var x1 = flatCoordinates[offset];\n    var y1 = flatCoordinates[offset + 1];\n    for (offset += stride; offset < end; offset += stride) {\n        var x2 = flatCoordinates[offset];\n        var y2 = flatCoordinates[offset + 1];\n        var squaredDelta = squaredDx(x1, y1, x2, y2);\n        if (squaredDelta > max) {\n            max = squaredDelta;\n        }\n        x1 = x2;\n        y1 = y2;\n    }\n    return max;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max) {\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        max = maxSquaredDelta(flatCoordinates, offset, end, stride, max);\n        offset = end;\n    }\n    return max;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function multiArrayMaxSquaredDelta(flatCoordinates, offset, endss, stride, max) {\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        max = arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max);\n        offset = ends[ends.length - 1];\n    }\n    return max;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>} [opt_tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestPoint(flatCoordinates, offset, end, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, opt_tmpPoint) {\n    if (offset == end) {\n        return minSquaredDistance;\n    }\n    var i, squaredDistance;\n    if (maxDelta === 0) {\n        // All points are identical, so just test the first point.\n        squaredDistance = squaredDx(x, y, flatCoordinates[offset], flatCoordinates[offset + 1]);\n        if (squaredDistance < minSquaredDistance) {\n            for (i = 0; i < stride; ++i) {\n                closestPoint[i] = flatCoordinates[offset + i];\n            }\n            closestPoint.length = stride;\n            return squaredDistance;\n        }\n        else {\n            return minSquaredDistance;\n        }\n    }\n    var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n    var index = offset + stride;\n    while (index < end) {\n        assignClosest(flatCoordinates, index - stride, index, stride, x, y, tmpPoint);\n        squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n        if (squaredDistance < minSquaredDistance) {\n            minSquaredDistance = squaredDistance;\n            for (i = 0; i < stride; ++i) {\n                closestPoint[i] = tmpPoint[i];\n            }\n            closestPoint.length = stride;\n            index += stride;\n        }\n        else {\n            // Skip ahead multiple points, because we know that all the skipped\n            // points cannot be any closer than the closest point we have found so\n            // far.  We know this because we know how close the current point is, how\n            // close the closest point we have found so far is, and the maximum\n            // distance between consecutive points.  For example, if we're currently\n            // at distance 10, the best we've found so far is 3, and that the maximum\n            // distance between consecutive points is 2, then we'll need to skip at\n            // least (10 - 3) / 2 == 3 (rounded down) points to have any chance of\n            // finding a closer point.  We use Math.max(..., 1) to ensure that we\n            // always advance at least one point, to avoid an infinite loop.\n            index +=\n                stride *\n                    Math.max(((Math.sqrt(squaredDistance) - Math.sqrt(minSquaredDistance)) /\n                        maxDelta) |\n                        0, 1);\n        }\n    }\n    if (isRing) {\n        // Check the closing segment.\n        assignClosest(flatCoordinates, end - stride, offset, stride, x, y, tmpPoint);\n        squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n        if (squaredDistance < minSquaredDistance) {\n            minSquaredDistance = squaredDistance;\n            for (i = 0; i < stride; ++i) {\n                closestPoint[i] = tmpPoint[i];\n            }\n            closestPoint.length = stride;\n        }\n    }\n    return minSquaredDistance;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>} [opt_tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestArrayPoint(flatCoordinates, offset, ends, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, opt_tmpPoint) {\n    var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        minSquaredDistance = assignClosestPoint(flatCoordinates, offset, end, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);\n        offset = end;\n    }\n    return minSquaredDistance;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>} [opt_tmpPoint] Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestMultiArrayPoint(flatCoordinates, offset, endss, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, opt_tmpPoint) {\n    var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        minSquaredDistance = assignClosestArrayPoint(flatCoordinates, offset, ends, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);\n        offset = ends[ends.length - 1];\n    }\n    return minSquaredDistance;\n}\n//# sourceMappingURL=closest.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/GeometryCollection\n */\nimport EventType from '../events/EventType.js';\nimport Geometry from './Geometry.js';\nimport GeometryType from './GeometryType.js';\nimport { closestSquaredDistanceXY, createOrUpdateEmpty, extend, getCenter, } from '../extent.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @classdesc\n * An array of {@link module:ol/geom/Geometry} objects.\n *\n * @api\n */\nvar GeometryCollection = /** @class */ (function (_super) {\n    __extends(GeometryCollection, _super);\n    /**\n     * @param {Array<Geometry>} [opt_geometries] Geometries.\n     */\n    function GeometryCollection(opt_geometries) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {Array<Geometry>}\n         */\n        _this.geometries_ = opt_geometries ? opt_geometries : null;\n        /**\n         * @type {Array<import(\"../events.js\").EventsKey>}\n         */\n        _this.changeEventsKeys_ = [];\n        _this.listenGeometriesChange_();\n        return _this;\n    }\n    /**\n     * @private\n     */\n    GeometryCollection.prototype.unlistenGeometriesChange_ = function () {\n        this.changeEventsKeys_.forEach(unlistenByKey);\n        this.changeEventsKeys_.length = 0;\n    };\n    /**\n     * @private\n     */\n    GeometryCollection.prototype.listenGeometriesChange_ = function () {\n        if (!this.geometries_) {\n            return;\n        }\n        for (var i = 0, ii = this.geometries_.length; i < ii; ++i) {\n            this.changeEventsKeys_.push(listen(this.geometries_[i], EventType.CHANGE, this.changed, this));\n        }\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!GeometryCollection} Clone.\n     * @api\n     */\n    GeometryCollection.prototype.clone = function () {\n        var geometryCollection = new GeometryCollection(null);\n        geometryCollection.setGeometries(this.geometries_);\n        geometryCollection.applyProperties(this);\n        return geometryCollection;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    GeometryCollection.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            return minSquaredDistance;\n        }\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            minSquaredDistance = geometries[i].closestPointXY(x, y, closestPoint, minSquaredDistance);\n        }\n        return minSquaredDistance;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @return {boolean} Contains (x, y).\n     */\n    GeometryCollection.prototype.containsXY = function (x, y) {\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            if (geometries[i].containsXY(x, y)) {\n                return true;\n            }\n        }\n        return false;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @protected\n     * @return {import(\"../extent.js\").Extent} extent Extent.\n     */\n    GeometryCollection.prototype.computeExtent = function (extent) {\n        createOrUpdateEmpty(extent);\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            extend(extent, geometries[i].getExtent());\n        }\n        return extent;\n    };\n    /**\n     * Return the geometries that make up this geometry collection.\n     * @return {Array<Geometry>} Geometries.\n     * @api\n     */\n    GeometryCollection.prototype.getGeometries = function () {\n        return cloneGeometries(this.geometries_);\n    };\n    /**\n     * @return {Array<Geometry>} Geometries.\n     */\n    GeometryCollection.prototype.getGeometriesArray = function () {\n        return this.geometries_;\n    };\n    /**\n     * @return {Array<Geometry>} Geometries.\n     */\n    GeometryCollection.prototype.getGeometriesArrayRecursive = function () {\n        /** @type {Array<Geometry>} */\n        var geometriesArray = [];\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            if (geometries[i].getType() === this.getType()) {\n                geometriesArray = geometriesArray.concat(\n                /** @type {GeometryCollection} */ (geometries[i]).getGeometriesArrayRecursive());\n            }\n            else {\n                geometriesArray.push(geometries[i]);\n            }\n        }\n        return geometriesArray;\n    };\n    /**\n     * Create a simplified version of this geometry using the Douglas Peucker algorithm.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {GeometryCollection} Simplified GeometryCollection.\n     */\n    GeometryCollection.prototype.getSimplifiedGeometry = function (squaredTolerance) {\n        if (this.simplifiedGeometryRevision !== this.getRevision()) {\n            this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n            this.simplifiedGeometryRevision = this.getRevision();\n        }\n        if (squaredTolerance < 0 ||\n            (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n                squaredTolerance < this.simplifiedGeometryMaxMinSquaredTolerance)) {\n            return this;\n        }\n        var simplifiedGeometries = [];\n        var geometries = this.geometries_;\n        var simplified = false;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            var geometry = geometries[i];\n            var simplifiedGeometry = geometry.getSimplifiedGeometry(squaredTolerance);\n            simplifiedGeometries.push(simplifiedGeometry);\n            if (simplifiedGeometry !== geometry) {\n                simplified = true;\n            }\n        }\n        if (simplified) {\n            var simplifiedGeometryCollection = new GeometryCollection(null);\n            simplifiedGeometryCollection.setGeometriesArray(simplifiedGeometries);\n            return simplifiedGeometryCollection;\n        }\n        else {\n            this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n            return this;\n        }\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    GeometryCollection.prototype.getType = function () {\n        return GeometryType.GEOMETRY_COLLECTION;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    GeometryCollection.prototype.intersectsExtent = function (extent) {\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            if (geometries[i].intersectsExtent(extent)) {\n                return true;\n            }\n        }\n        return false;\n    };\n    /**\n     * @return {boolean} Is empty.\n     */\n    GeometryCollection.prototype.isEmpty = function () {\n        return this.geometries_.length === 0;\n    };\n    /**\n     * Rotate the geometry around a given coordinate. This modifies the geometry\n     * coordinates in place.\n     * @param {number} angle Rotation angle in radians.\n     * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n     * @api\n     */\n    GeometryCollection.prototype.rotate = function (angle, anchor) {\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            geometries[i].rotate(angle, anchor);\n        }\n        this.changed();\n    };\n    /**\n     * Scale the geometry (with an optional origin).  This modifies the geometry\n     * coordinates in place.\n     * @abstract\n     * @param {number} sx The scaling factor in the x-direction.\n     * @param {number} [opt_sy] The scaling factor in the y-direction (defaults to sx).\n     * @param {import(\"../coordinate.js\").Coordinate} [opt_anchor] The scale origin (defaults to the center\n     *     of the geometry extent).\n     * @api\n     */\n    GeometryCollection.prototype.scale = function (sx, opt_sy, opt_anchor) {\n        var anchor = opt_anchor;\n        if (!anchor) {\n            anchor = getCenter(this.getExtent());\n        }\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            geometries[i].scale(sx, opt_sy, anchor);\n        }\n        this.changed();\n    };\n    /**\n     * Set the geometries that make up this geometry collection.\n     * @param {Array<Geometry>} geometries Geometries.\n     * @api\n     */\n    GeometryCollection.prototype.setGeometries = function (geometries) {\n        this.setGeometriesArray(cloneGeometries(geometries));\n    };\n    /**\n     * @param {Array<Geometry>} geometries Geometries.\n     */\n    GeometryCollection.prototype.setGeometriesArray = function (geometries) {\n        this.unlistenGeometriesChange_();\n        this.geometries_ = geometries;\n        this.listenGeometriesChange_();\n        this.changed();\n    };\n    /**\n     * Apply a transform function to the coordinates of the geometry.\n     * The geometry is modified in place.\n     * If you do not want the geometry modified in place, first `clone()` it and\n     * then use this function on the clone.\n     * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n     * Called with a flat array of geometry coordinates.\n     * @api\n     */\n    GeometryCollection.prototype.applyTransform = function (transformFn) {\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            geometries[i].applyTransform(transformFn);\n        }\n        this.changed();\n    };\n    /**\n     * Translate the geometry.  This modifies the geometry coordinates in place.  If\n     * instead you want a new geometry, first `clone()` this geometry.\n     * @param {number} deltaX Delta X.\n     * @param {number} deltaY Delta Y.\n     * @api\n     */\n    GeometryCollection.prototype.translate = function (deltaX, deltaY) {\n        var geometries = this.geometries_;\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            geometries[i].translate(deltaX, deltaY);\n        }\n        this.changed();\n    };\n    /**\n     * Clean up.\n     */\n    GeometryCollection.prototype.disposeInternal = function () {\n        this.unlistenGeometriesChange_();\n        _super.prototype.disposeInternal.call(this);\n    };\n    return GeometryCollection;\n}(Geometry));\n/**\n * @param {Array<Geometry>} geometries Geometries.\n * @return {Array<Geometry>} Cloned geometries.\n */\nfunction cloneGeometries(geometries) {\n    var clonedGeometries = [];\n    for (var i = 0, ii = geometries.length; i < ii; ++i) {\n        clonedGeometries.push(geometries[i].clone());\n    }\n    return clonedGeometries;\n}\nexport default GeometryCollection;\n//# sourceMappingURL=GeometryCollection.js.map","/**\n * @module ol/ObjectEventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    /**\n     * Triggered when a property is changed.\n     * @event module:ol/Object.ObjectEvent#propertychange\n     * @api\n     */\n    PROPERTYCHANGE: 'propertychange',\n};\n/**\n * @typedef {'propertychange'} Types\n */\n//# sourceMappingURL=ObjectEventType.js.map","/**\n * @module ol/colorlike\n */\nimport { toString } from './color.js';\n/**\n * A type accepted by CanvasRenderingContext2D.fillStyle\n * or CanvasRenderingContext2D.strokeStyle.\n * Represents a color, pattern, or gradient. The origin for patterns and\n * gradients as fill style is an increment of 512 css pixels from map coordinate\n * `[0, 0]`. For seamless repeat patterns, width and height of the pattern image\n * must be a factor of two (2, 4, 8, ..., 512).\n *\n * @typedef {string|CanvasPattern|CanvasGradient} ColorLike\n * @api\n */\n/**\n * @param {import(\"./color.js\").Color|ColorLike} color Color.\n * @return {ColorLike} The color as an {@link ol/colorlike~ColorLike}.\n * @api\n */\nexport function asColorLike(color) {\n    if (Array.isArray(color)) {\n        return toString(color);\n    }\n    else {\n        return color;\n    }\n}\n//# sourceMappingURL=colorlike.js.map","/**\n * @module ol/pointer/EventType\n */\n/**\n * Constants for event names.\n * @enum {string}\n */\nexport default {\n    POINTERMOVE: 'pointermove',\n    POINTERDOWN: 'pointerdown',\n    POINTERUP: 'pointerup',\n    POINTEROVER: 'pointerover',\n    POINTEROUT: 'pointerout',\n    POINTERENTER: 'pointerenter',\n    POINTERLEAVE: 'pointerleave',\n    POINTERCANCEL: 'pointercancel',\n};\n//# sourceMappingURL=EventType.js.map","/**\n * @module ol/render/canvas/hitdetect\n */\nimport CanvasImmediateRenderer from './Immediate.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport IconAnchorUnits from '../../style/IconAnchorUnits.js';\nimport { Icon } from '../../style.js';\nimport { clamp } from '../../math.js';\nimport { createCanvasContext2D } from '../../dom.js';\nimport { intersects } from '../../extent.js';\nimport { numberSafeCompareFunction } from '../../array.js';\nexport var HIT_DETECT_RESOLUTION = 0.5;\n/**\n * @param {import(\"../../size.js\").Size} size Canvas size in css pixels.\n * @param {Array<import(\"../../transform.js\").Transform>} transforms Transforms\n * for rendering features to all worlds of the viewport, from coordinates to css\n * pixels.\n * @param {Array<import(\"../../Feature.js\").FeatureLike>} features\n * Features to consider for hit detection.\n * @param {import(\"../../style/Style.js\").StyleFunction|undefined} styleFunction\n * Layer style function.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @return {ImageData} Hit detection image data.\n */\nexport function createHitDetectionImageData(size, transforms, features, styleFunction, extent, resolution, rotation) {\n    var width = size[0] * HIT_DETECT_RESOLUTION;\n    var height = size[1] * HIT_DETECT_RESOLUTION;\n    var context = createCanvasContext2D(width, height);\n    context.imageSmoothingEnabled = false;\n    var canvas = context.canvas;\n    var renderer = new CanvasImmediateRenderer(context, HIT_DETECT_RESOLUTION, extent, null, rotation);\n    var featureCount = features.length;\n    // Stretch hit detection index to use the whole available color range\n    var indexFactor = Math.floor((256 * 256 * 256 - 1) / featureCount);\n    var featuresByZIndex = {};\n    for (var i = 1; i <= featureCount; ++i) {\n        var feature = features[i - 1];\n        var featureStyleFunction = feature.getStyleFunction() || styleFunction;\n        if (!styleFunction) {\n            continue;\n        }\n        var styles = featureStyleFunction(feature, resolution);\n        if (!styles) {\n            continue;\n        }\n        if (!Array.isArray(styles)) {\n            styles = [styles];\n        }\n        var index = i * indexFactor;\n        var color = '#' + ('000000' + index.toString(16)).slice(-6);\n        for (var j = 0, jj = styles.length; j < jj; ++j) {\n            var originalStyle = styles[j];\n            var geometry = originalStyle.getGeometryFunction()(feature);\n            if (!geometry || !intersects(extent, geometry.getExtent())) {\n                continue;\n            }\n            var style = originalStyle.clone();\n            var fill = style.getFill();\n            if (fill) {\n                fill.setColor(color);\n            }\n            var stroke = style.getStroke();\n            if (stroke) {\n                stroke.setColor(color);\n                stroke.setLineDash(null);\n            }\n            style.setText(undefined);\n            var image = originalStyle.getImage();\n            if (image && image.getOpacity() !== 0) {\n                var imgSize = image.getImageSize();\n                if (!imgSize) {\n                    continue;\n                }\n                var imgContext = createCanvasContext2D(imgSize[0], imgSize[1], undefined, { alpha: false });\n                var img = imgContext.canvas;\n                imgContext.fillStyle = color;\n                imgContext.fillRect(0, 0, img.width, img.height);\n                style.setImage(new Icon({\n                    img: img,\n                    imgSize: imgSize,\n                    anchor: image.getAnchor(),\n                    anchorXUnits: IconAnchorUnits.PIXELS,\n                    anchorYUnits: IconAnchorUnits.PIXELS,\n                    offset: image.getOrigin(),\n                    opacity: 1,\n                    size: image.getSize(),\n                    scale: image.getScale(),\n                    rotation: image.getRotation(),\n                    rotateWithView: image.getRotateWithView(),\n                }));\n            }\n            var zIndex = style.getZIndex() || 0;\n            var byGeometryType = featuresByZIndex[zIndex];\n            if (!byGeometryType) {\n                byGeometryType = {};\n                featuresByZIndex[zIndex] = byGeometryType;\n                byGeometryType[GeometryType.POLYGON] = [];\n                byGeometryType[GeometryType.CIRCLE] = [];\n                byGeometryType[GeometryType.LINE_STRING] = [];\n                byGeometryType[GeometryType.POINT] = [];\n            }\n            byGeometryType[geometry.getType().replace('Multi', '')].push(geometry, style);\n        }\n    }\n    var zIndexKeys = Object.keys(featuresByZIndex)\n        .map(Number)\n        .sort(numberSafeCompareFunction);\n    for (var i = 0, ii = zIndexKeys.length; i < ii; ++i) {\n        var byGeometryType = featuresByZIndex[zIndexKeys[i]];\n        for (var type in byGeometryType) {\n            var geomAndStyle = byGeometryType[type];\n            for (var j = 0, jj = geomAndStyle.length; j < jj; j += 2) {\n                renderer.setStyle(geomAndStyle[j + 1]);\n                for (var k = 0, kk = transforms.length; k < kk; ++k) {\n                    renderer.setTransform(transforms[k]);\n                    renderer.drawGeometry(geomAndStyle[j]);\n                }\n            }\n        }\n    }\n    return context.getImageData(0, 0, canvas.width, canvas.height);\n}\n/**\n * @param {import(\"../../pixel\").Pixel} pixel Pixel coordinate on the hit\n * detection canvas in css pixels.\n * @param {Array<import(\"../../Feature\").FeatureLike>} features Features. Has to\n * match the `features` array that was passed to `createHitDetectionImageData()`.\n * @param {ImageData} imageData Hit detection image data generated by\n * `createHitDetectionImageData()`.\n * @return {Array<import(\"../../Feature\").FeatureLike>} features Features.\n */\nexport function hitDetect(pixel, features, imageData) {\n    var resultFeatures = [];\n    if (imageData) {\n        var x = Math.floor(Math.round(pixel[0]) * HIT_DETECT_RESOLUTION);\n        var y = Math.floor(Math.round(pixel[1]) * HIT_DETECT_RESOLUTION);\n        // The pixel coordinate is clamped down to the hit-detect canvas' size to account\n        // for browsers returning coordinates slightly larger than the actual canvas size\n        // due to a non-integer pixel ratio.\n        var index = (clamp(x, 0, imageData.width - 1) +\n            clamp(y, 0, imageData.height - 1) * imageData.width) *\n            4;\n        var r = imageData.data[index];\n        var g = imageData.data[index + 1];\n        var b = imageData.data[index + 2];\n        var i = b + 256 * (g + 256 * r);\n        var indexFactor = Math.floor((256 * 256 * 256 - 1) / features.length);\n        if (i && i % indexFactor === 0) {\n            resultFeatures.push(features[i / indexFactor - 1]);\n        }\n    }\n    return resultFeatures;\n}\n//# sourceMappingURL=hitdetect.js.map","/**\n * @module ol/ViewProperty\n */\n/**\n * @enum {string}\n */\nexport default {\n    CENTER: 'center',\n    RESOLUTION: 'resolution',\n    ROTATION: 'rotation',\n};\n//# sourceMappingURL=ViewProperty.js.map","/**\n * @module ol/string\n */\n/**\n * @param {number} number Number to be formatted\n * @param {number} width The desired width\n * @param {number} [opt_precision] Precision of the output string (i.e. number of decimal places)\n * @return {string} Formatted string\n */\nexport function padNumber(number, width, opt_precision) {\n    var numberString = opt_precision !== undefined ? number.toFixed(opt_precision) : '' + number;\n    var decimal = numberString.indexOf('.');\n    decimal = decimal === -1 ? numberString.length : decimal;\n    return decimal > width\n        ? numberString\n        : new Array(1 + width - decimal).join('0') + numberString;\n}\n/**\n * Adapted from https://github.com/omichelsen/compare-versions/blob/master/index.js\n * @param {string|number} v1 First version\n * @param {string|number} v2 Second version\n * @return {number} Value\n */\nexport function compareVersions(v1, v2) {\n    var s1 = ('' + v1).split('.');\n    var s2 = ('' + v2).split('.');\n    for (var i = 0; i < Math.max(s1.length, s2.length); i++) {\n        var n1 = parseInt(s1[i] || '0', 10);\n        var n2 = parseInt(s2[i] || '0', 10);\n        if (n1 > n2) {\n            return 1;\n        }\n        if (n2 > n1) {\n            return -1;\n        }\n    }\n    return 0;\n}\n//# sourceMappingURL=string.js.map","/**\n * @module ol/renderer/vector\n */\nimport BuilderType from '../render/canvas/BuilderType.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport ImageState from '../ImageState.js';\nimport { getUid } from '../util.js';\n/**\n * Feature callback. The callback will be called with three arguments. The first\n * argument is one {@link module:ol/Feature feature} or {@link module:ol/render/Feature render feature}\n * at the pixel, the second is the {@link module:ol/layer/Layer layer} of the feature and will be null for\n * unmanaged layers. The third is the {@link module:ol/geom/SimpleGeometry} of the feature. For features\n * with a GeometryCollection geometry, it will be the first detected geometry from the collection.\n * @template T\n * @typedef {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default, import(\"../geom/SimpleGeometry.js\").default): T} FeatureCallback\n */\n/**\n * Tolerance for geometry simplification in device pixels.\n * @type {number}\n */\nvar SIMPLIFY_TOLERANCE = 0.5;\n/**\n * @const\n * @type {Object<import(\"../geom/GeometryType.js\").default,\n *                function(import(\"../render/canvas/BuilderGroup.js\").default, import(\"../geom/Geometry.js\").default,\n *                         import(\"../style/Style.js\").default, Object): void>}\n */\nvar GEOMETRY_RENDERERS = {\n    'Point': renderPointGeometry,\n    'LineString': renderLineStringGeometry,\n    'Polygon': renderPolygonGeometry,\n    'MultiPoint': renderMultiPointGeometry,\n    'MultiLineString': renderMultiLineStringGeometry,\n    'MultiPolygon': renderMultiPolygonGeometry,\n    'GeometryCollection': renderGeometryCollectionGeometry,\n    'Circle': renderCircleGeometry,\n};\n/**\n * @param {import(\"../Feature.js\").FeatureLike} feature1 Feature 1.\n * @param {import(\"../Feature.js\").FeatureLike} feature2 Feature 2.\n * @return {number} Order.\n */\nexport function defaultOrder(feature1, feature2) {\n    return parseInt(getUid(feature1), 10) - parseInt(getUid(feature2), 10);\n}\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Squared pixel tolerance.\n */\nexport function getSquaredTolerance(resolution, pixelRatio) {\n    var tolerance = getTolerance(resolution, pixelRatio);\n    return tolerance * tolerance;\n}\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Pixel tolerance.\n */\nexport function getTolerance(resolution, pixelRatio) {\n    return (SIMPLIFY_TOLERANCE * resolution) / pixelRatio;\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Builder group.\n * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderCircleGeometry(builderGroup, geometry, style, feature, opt_declutterBuilderGroup) {\n    var fillStyle = style.getFill();\n    var strokeStyle = style.getStroke();\n    if (fillStyle || strokeStyle) {\n        var circleReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.CIRCLE);\n        circleReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n        circleReplay.drawCircle(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle && textStyle.getText()) {\n        var textReplay = (opt_declutterBuilderGroup || builderGroup).getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle);\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Transform from user to view projection.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n * @return {boolean} `true` if style is loading.\n */\nexport function renderFeature(replayGroup, feature, style, squaredTolerance, listener, opt_transform, opt_declutterBuilderGroup) {\n    var loading = false;\n    var imageStyle = style.getImage();\n    if (imageStyle) {\n        var imageState = imageStyle.getImageState();\n        if (imageState == ImageState.LOADED || imageState == ImageState.ERROR) {\n            imageStyle.unlistenImageChange(listener);\n        }\n        else {\n            if (imageState == ImageState.IDLE) {\n                imageStyle.load();\n            }\n            imageState = imageStyle.getImageState();\n            imageStyle.listenImageChange(listener);\n            loading = true;\n        }\n    }\n    renderFeatureInternal(replayGroup, feature, style, squaredTolerance, opt_transform, opt_declutterBuilderGroup);\n    return loading;\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Optional transform function.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderFeatureInternal(replayGroup, feature, style, squaredTolerance, opt_transform, opt_declutterBuilderGroup) {\n    var geometry = style.getGeometryFunction()(feature);\n    if (!geometry) {\n        return;\n    }\n    var simplifiedGeometry = geometry.simplifyTransformed(squaredTolerance, opt_transform);\n    var renderer = style.getRenderer();\n    if (renderer) {\n        renderGeometry(replayGroup, simplifiedGeometry, style, feature);\n    }\n    else {\n        var geometryRenderer = GEOMETRY_RENDERERS[simplifiedGeometry.getType()];\n        geometryRenderer(replayGroup, simplifiedGeometry, style, feature, opt_declutterBuilderGroup);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderGeometry(replayGroup, geometry, style, feature) {\n    if (geometry.getType() == GeometryType.GEOMETRY_COLLECTION) {\n        var geometries = \n        /** @type {import(\"../geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            renderGeometry(replayGroup, geometries[i], style, feature);\n        }\n        return;\n    }\n    var replay = replayGroup.getBuilder(style.getZIndex(), BuilderType.DEFAULT);\n    replay.drawCustom(\n    /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (geometry), feature, style.getRenderer());\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderGeometryCollectionGeometry(replayGroup, geometry, style, feature, opt_declutterBuilderGroup) {\n    var geometries = geometry.getGeometriesArray();\n    var i, ii;\n    for (i = 0, ii = geometries.length; i < ii; ++i) {\n        var geometryRenderer = GEOMETRY_RENDERERS[geometries[i].getType()];\n        geometryRenderer(replayGroup, geometries[i], style, feature, opt_declutterBuilderGroup);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/LineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderLineStringGeometry(builderGroup, geometry, style, feature, opt_declutterBuilderGroup) {\n    var strokeStyle = style.getStroke();\n    if (strokeStyle) {\n        var lineStringReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.LINE_STRING);\n        lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n        lineStringReplay.drawLineString(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle && textStyle.getText()) {\n        var textReplay = (opt_declutterBuilderGroup || builderGroup).getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle);\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiLineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderMultiLineStringGeometry(builderGroup, geometry, style, feature, opt_declutterBuilderGroup) {\n    var strokeStyle = style.getStroke();\n    if (strokeStyle) {\n        var lineStringReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.LINE_STRING);\n        lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n        lineStringReplay.drawMultiLineString(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle && textStyle.getText()) {\n        var textReplay = (opt_declutterBuilderGroup || builderGroup).getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle);\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderMultiPolygonGeometry(builderGroup, geometry, style, feature, opt_declutterBuilderGroup) {\n    var fillStyle = style.getFill();\n    var strokeStyle = style.getStroke();\n    if (strokeStyle || fillStyle) {\n        var polygonReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.POLYGON);\n        polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n        polygonReplay.drawMultiPolygon(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle && textStyle.getText()) {\n        var textReplay = (opt_declutterBuilderGroup || builderGroup).getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle);\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Point.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderPointGeometry(builderGroup, geometry, style, feature, opt_declutterBuilderGroup) {\n    var imageStyle = style.getImage();\n    var textStyle = style.getText();\n    /** @type {import(\"../render/canvas.js\").DeclutterImageWithText} */\n    var declutterImageWithText;\n    if (opt_declutterBuilderGroup) {\n        builderGroup = opt_declutterBuilderGroup;\n        declutterImageWithText =\n            imageStyle && textStyle && textStyle.getText() ? {} : undefined;\n    }\n    if (imageStyle) {\n        if (imageStyle.getImageState() != ImageState.LOADED) {\n            return;\n        }\n        var imageReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.IMAGE);\n        imageReplay.setImageStyle(imageStyle, declutterImageWithText);\n        imageReplay.drawPoint(geometry, feature);\n    }\n    if (textStyle && textStyle.getText()) {\n        var textReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle, declutterImageWithText);\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiPoint.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderMultiPointGeometry(builderGroup, geometry, style, feature, opt_declutterBuilderGroup) {\n    var imageStyle = style.getImage();\n    var textStyle = style.getText();\n    /** @type {import(\"../render/canvas.js\").DeclutterImageWithText} */\n    var declutterImageWithText;\n    if (opt_declutterBuilderGroup) {\n        builderGroup = opt_declutterBuilderGroup;\n        declutterImageWithText =\n            imageStyle && textStyle && textStyle.getText() ? {} : undefined;\n    }\n    if (imageStyle) {\n        if (imageStyle.getImageState() != ImageState.LOADED) {\n            return;\n        }\n        var imageReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.IMAGE);\n        imageReplay.setImageStyle(imageStyle, declutterImageWithText);\n        imageReplay.drawMultiPoint(geometry, feature);\n    }\n    if (textStyle && textStyle.getText()) {\n        var textReplay = (opt_declutterBuilderGroup || builderGroup).getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle, declutterImageWithText);\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Polygon.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderPolygonGeometry(builderGroup, geometry, style, feature, opt_declutterBuilderGroup) {\n    var fillStyle = style.getFill();\n    var strokeStyle = style.getStroke();\n    if (fillStyle || strokeStyle) {\n        var polygonReplay = builderGroup.getBuilder(style.getZIndex(), BuilderType.POLYGON);\n        polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n        polygonReplay.drawPolygon(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle && textStyle.getText()) {\n        var textReplay = (opt_declutterBuilderGroup || builderGroup).getBuilder(style.getZIndex(), BuilderType.TEXT);\n        textReplay.setTextStyle(textStyle);\n        textReplay.drawText(geometry, feature);\n    }\n}\n//# sourceMappingURL=vector.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/events/Target\n */\nimport Disposable from '../Disposable.js';\nimport Event from './Event.js';\nimport { VOID } from '../functions.js';\nimport { clear } from '../obj.js';\n/**\n * @typedef {EventTarget|Target} EventTargetLike\n */\n/**\n * @classdesc\n * A simplified implementation of the W3C DOM Level 2 EventTarget interface.\n * See https://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-EventTarget.\n *\n * There are two important simplifications compared to the specification:\n *\n * 1. The handling of `useCapture` in `addEventListener` and\n *    `removeEventListener`. There is no real capture model.\n * 2. The handling of `stopPropagation` and `preventDefault` on `dispatchEvent`.\n *    There is no event target hierarchy. When a listener calls\n *    `stopPropagation` or `preventDefault` on an event object, it means that no\n *    more listeners after this one will be called. Same as when the listener\n *    returns false.\n */\nvar Target = /** @class */ (function (_super) {\n    __extends(Target, _super);\n    /**\n     * @param {*} [opt_target] Default event target for dispatched events.\n     */\n    function Target(opt_target) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {*}\n         */\n        _this.eventTarget_ = opt_target;\n        /**\n         * @private\n         * @type {Object<string, number>}\n         */\n        _this.pendingRemovals_ = null;\n        /**\n         * @private\n         * @type {Object<string, number>}\n         */\n        _this.dispatching_ = null;\n        /**\n         * @private\n         * @type {Object<string, Array<import(\"../events.js\").Listener>>}\n         */\n        _this.listeners_ = null;\n        return _this;\n    }\n    /**\n     * @param {string} type Type.\n     * @param {import(\"../events.js\").Listener} listener Listener.\n     */\n    Target.prototype.addEventListener = function (type, listener) {\n        if (!type || !listener) {\n            return;\n        }\n        var listeners = this.listeners_ || (this.listeners_ = {});\n        var listenersForType = listeners[type] || (listeners[type] = []);\n        if (listenersForType.indexOf(listener) === -1) {\n            listenersForType.push(listener);\n        }\n    };\n    /**\n     * Dispatches an event and calls all listeners listening for events\n     * of this type. The event parameter can either be a string or an\n     * Object with a `type` property.\n     *\n     * @param {import(\"./Event.js\").default|string} event Event object.\n     * @return {boolean|undefined} `false` if anyone called preventDefault on the\n     *     event object or if any of the listeners returned false.\n     * @api\n     */\n    Target.prototype.dispatchEvent = function (event) {\n        /** @type {import(\"./Event.js\").default|Event} */\n        var evt = typeof event === 'string' ? new Event(event) : event;\n        var type = evt.type;\n        if (!evt.target) {\n            evt.target = this.eventTarget_ || this;\n        }\n        var listeners = this.listeners_ && this.listeners_[type];\n        var propagate;\n        if (listeners) {\n            var dispatching = this.dispatching_ || (this.dispatching_ = {});\n            var pendingRemovals = this.pendingRemovals_ || (this.pendingRemovals_ = {});\n            if (!(type in dispatching)) {\n                dispatching[type] = 0;\n                pendingRemovals[type] = 0;\n            }\n            ++dispatching[type];\n            for (var i = 0, ii = listeners.length; i < ii; ++i) {\n                if ('handleEvent' in listeners[i]) {\n                    propagate = /** @type {import(\"../events.js\").ListenerObject} */ (listeners[i]).handleEvent(evt);\n                }\n                else {\n                    propagate = /** @type {import(\"../events.js\").ListenerFunction} */ (listeners[i]).call(this, evt);\n                }\n                if (propagate === false || evt.propagationStopped) {\n                    propagate = false;\n                    break;\n                }\n            }\n            --dispatching[type];\n            if (dispatching[type] === 0) {\n                var pr = pendingRemovals[type];\n                delete pendingRemovals[type];\n                while (pr--) {\n                    this.removeEventListener(type, VOID);\n                }\n                delete dispatching[type];\n            }\n            return propagate;\n        }\n    };\n    /**\n     * Clean up.\n     */\n    Target.prototype.disposeInternal = function () {\n        this.listeners_ && clear(this.listeners_);\n    };\n    /**\n     * Get the listeners for a specified event type. Listeners are returned in the\n     * order that they will be called in.\n     *\n     * @param {string} type Type.\n     * @return {Array<import(\"../events.js\").Listener>|undefined} Listeners.\n     */\n    Target.prototype.getListeners = function (type) {\n        return (this.listeners_ && this.listeners_[type]) || undefined;\n    };\n    /**\n     * @param {string} [opt_type] Type. If not provided,\n     *     `true` will be returned if this event target has any listeners.\n     * @return {boolean} Has listeners.\n     */\n    Target.prototype.hasListener = function (opt_type) {\n        if (!this.listeners_) {\n            return false;\n        }\n        return opt_type\n            ? opt_type in this.listeners_\n            : Object.keys(this.listeners_).length > 0;\n    };\n    /**\n     * @param {string} type Type.\n     * @param {import(\"../events.js\").Listener} listener Listener.\n     */\n    Target.prototype.removeEventListener = function (type, listener) {\n        var listeners = this.listeners_ && this.listeners_[type];\n        if (listeners) {\n            var index = listeners.indexOf(listener);\n            if (index !== -1) {\n                if (this.pendingRemovals_ && type in this.pendingRemovals_) {\n                    // make listener a no-op, and remove later in #dispatchEvent()\n                    listeners[index] = VOID;\n                    ++this.pendingRemovals_[type];\n                }\n                else {\n                    listeners.splice(index, 1);\n                    if (listeners.length === 0) {\n                        delete this.listeners_[type];\n                    }\n                }\n            }\n        }\n    };\n    return Target;\n}(Disposable));\nexport default Target;\n//# sourceMappingURL=Target.js.map","/**\n * @module ol/style/Text\n */\nimport Fill from './Fill.js';\nimport TextPlacement from './TextPlacement.js';\nimport { toSize } from '../size.js';\n/**\n * The default fill color to use if no fill was set at construction time; a\n * blackish `#333`.\n *\n * @const {string}\n */\nvar DEFAULT_FILL_COLOR = '#333';\n/**\n * @typedef {Object} Options\n * @property {string} [font] Font style as CSS 'font' value, see:\n * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font. Default is '10px sans-serif'\n * @property {number} [maxAngle=Math.PI/4] When `placement` is set to `'line'`, allow a maximum angle between adjacent characters.\n * The expected value is in radians, and the default is 45° (`Math.PI / 4`).\n * @property {number} [offsetX=0] Horizontal text offset in pixels. A positive will shift the text right.\n * @property {number} [offsetY=0] Vertical text offset in pixels. A positive will shift the text down.\n * @property {boolean} [overflow=false] For polygon labels or when `placement` is set to `'line'`, allow text to exceed\n * the width of the polygon at the label position or the length of the path that it follows.\n * @property {import(\"./TextPlacement.js\").default|string} [placement='point'] Text placement.\n * @property {number|import(\"../size.js\").Size} [scale] Scale.\n * @property {boolean} [rotateWithView=false] Whether to rotate the text with the view.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {string} [text] Text content.\n * @property {string} [textAlign] Text alignment. Possible values: 'left', 'right', 'center', 'end' or 'start'.\n * Default is 'center' for `placement: 'point'`. For `placement: 'line'`, the default is to let the renderer choose a\n * placement where `maxAngle` is not exceeded.\n * @property {string} [textBaseline='middle'] Text base line. Possible values: 'bottom', 'top', 'middle', 'alphabetic',\n * 'hanging', 'ideographic'.\n * @property {import(\"./Fill.js\").default} [fill] Fill style. If none is provided, we'll use a dark fill-style (#333).\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {import(\"./Fill.js\").default} [backgroundFill] Fill style for the text background when `placement` is\n * `'point'`. Default is no fill.\n * @property {import(\"./Stroke.js\").default} [backgroundStroke] Stroke style for the text background  when `placement`\n * is `'point'`. Default is no stroke.\n * @property {Array<number>} [padding=[0, 0, 0, 0]] Padding in pixels around the text for decluttering and background. The order of\n * values in the array is `[top, right, bottom, left]`.\n */\n/**\n * @classdesc\n * Set text style for vector features.\n * @api\n */\nvar Text = /** @class */ (function () {\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function Text(opt_options) {\n        var options = opt_options || {};\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        this.font_ = options.font;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.rotation_ = options.rotation;\n        /**\n         * @private\n         * @type {boolean|undefined}\n         */\n        this.rotateWithView_ = options.rotateWithView;\n        /**\n         * @private\n         * @type {number|import(\"../size.js\").Size|undefined}\n         */\n        this.scale_ = options.scale;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        this.scaleArray_ = toSize(options.scale !== undefined ? options.scale : 1);\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        this.text_ = options.text;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        this.textAlign_ = options.textAlign;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        this.textBaseline_ = options.textBaseline;\n        /**\n         * @private\n         * @type {import(\"./Fill.js\").default}\n         */\n        this.fill_ =\n            options.fill !== undefined\n                ? options.fill\n                : new Fill({ color: DEFAULT_FILL_COLOR });\n        /**\n         * @private\n         * @type {number}\n         */\n        this.maxAngle_ =\n            options.maxAngle !== undefined ? options.maxAngle : Math.PI / 4;\n        /**\n         * @private\n         * @type {import(\"./TextPlacement.js\").default|string}\n         */\n        this.placement_ =\n            options.placement !== undefined ? options.placement : TextPlacement.POINT;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        this.overflow_ = !!options.overflow;\n        /**\n         * @private\n         * @type {import(\"./Stroke.js\").default}\n         */\n        this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.offsetX_ = options.offsetX !== undefined ? options.offsetX : 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.offsetY_ = options.offsetY !== undefined ? options.offsetY : 0;\n        /**\n         * @private\n         * @type {import(\"./Fill.js\").default}\n         */\n        this.backgroundFill_ = options.backgroundFill\n            ? options.backgroundFill\n            : null;\n        /**\n         * @private\n         * @type {import(\"./Stroke.js\").default}\n         */\n        this.backgroundStroke_ = options.backgroundStroke\n            ? options.backgroundStroke\n            : null;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.padding_ = options.padding === undefined ? null : options.padding;\n    }\n    /**\n     * Clones the style.\n     * @return {Text} The cloned style.\n     * @api\n     */\n    Text.prototype.clone = function () {\n        var scale = this.getScale();\n        return new Text({\n            font: this.getFont(),\n            placement: this.getPlacement(),\n            maxAngle: this.getMaxAngle(),\n            overflow: this.getOverflow(),\n            rotation: this.getRotation(),\n            rotateWithView: this.getRotateWithView(),\n            scale: Array.isArray(scale) ? scale.slice() : scale,\n            text: this.getText(),\n            textAlign: this.getTextAlign(),\n            textBaseline: this.getTextBaseline(),\n            fill: this.getFill() ? this.getFill().clone() : undefined,\n            stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n            offsetX: this.getOffsetX(),\n            offsetY: this.getOffsetY(),\n            backgroundFill: this.getBackgroundFill()\n                ? this.getBackgroundFill().clone()\n                : undefined,\n            backgroundStroke: this.getBackgroundStroke()\n                ? this.getBackgroundStroke().clone()\n                : undefined,\n            padding: this.getPadding(),\n        });\n    };\n    /**\n     * Get the `overflow` configuration.\n     * @return {boolean} Let text overflow the length of the path they follow.\n     * @api\n     */\n    Text.prototype.getOverflow = function () {\n        return this.overflow_;\n    };\n    /**\n     * Get the font name.\n     * @return {string|undefined} Font.\n     * @api\n     */\n    Text.prototype.getFont = function () {\n        return this.font_;\n    };\n    /**\n     * Get the maximum angle between adjacent characters.\n     * @return {number} Angle in radians.\n     * @api\n     */\n    Text.prototype.getMaxAngle = function () {\n        return this.maxAngle_;\n    };\n    /**\n     * Get the label placement.\n     * @return {import(\"./TextPlacement.js\").default|string} Text placement.\n     * @api\n     */\n    Text.prototype.getPlacement = function () {\n        return this.placement_;\n    };\n    /**\n     * Get the x-offset for the text.\n     * @return {number} Horizontal text offset.\n     * @api\n     */\n    Text.prototype.getOffsetX = function () {\n        return this.offsetX_;\n    };\n    /**\n     * Get the y-offset for the text.\n     * @return {number} Vertical text offset.\n     * @api\n     */\n    Text.prototype.getOffsetY = function () {\n        return this.offsetY_;\n    };\n    /**\n     * Get the fill style for the text.\n     * @return {import(\"./Fill.js\").default} Fill style.\n     * @api\n     */\n    Text.prototype.getFill = function () {\n        return this.fill_;\n    };\n    /**\n     * Determine whether the text rotates with the map.\n     * @return {boolean|undefined} Rotate with map.\n     * @api\n     */\n    Text.prototype.getRotateWithView = function () {\n        return this.rotateWithView_;\n    };\n    /**\n     * Get the text rotation.\n     * @return {number|undefined} Rotation.\n     * @api\n     */\n    Text.prototype.getRotation = function () {\n        return this.rotation_;\n    };\n    /**\n     * Get the text scale.\n     * @return {number|import(\"../size.js\").Size|undefined} Scale.\n     * @api\n     */\n    Text.prototype.getScale = function () {\n        return this.scale_;\n    };\n    /**\n     * Get the symbolizer scale array.\n     * @return {import(\"../size.js\").Size} Scale array.\n     */\n    Text.prototype.getScaleArray = function () {\n        return this.scaleArray_;\n    };\n    /**\n     * Get the stroke style for the text.\n     * @return {import(\"./Stroke.js\").default} Stroke style.\n     * @api\n     */\n    Text.prototype.getStroke = function () {\n        return this.stroke_;\n    };\n    /**\n     * Get the text to be rendered.\n     * @return {string|undefined} Text.\n     * @api\n     */\n    Text.prototype.getText = function () {\n        return this.text_;\n    };\n    /**\n     * Get the text alignment.\n     * @return {string|undefined} Text align.\n     * @api\n     */\n    Text.prototype.getTextAlign = function () {\n        return this.textAlign_;\n    };\n    /**\n     * Get the text baseline.\n     * @return {string|undefined} Text baseline.\n     * @api\n     */\n    Text.prototype.getTextBaseline = function () {\n        return this.textBaseline_;\n    };\n    /**\n     * Get the background fill style for the text.\n     * @return {import(\"./Fill.js\").default} Fill style.\n     * @api\n     */\n    Text.prototype.getBackgroundFill = function () {\n        return this.backgroundFill_;\n    };\n    /**\n     * Get the background stroke style for the text.\n     * @return {import(\"./Stroke.js\").default} Stroke style.\n     * @api\n     */\n    Text.prototype.getBackgroundStroke = function () {\n        return this.backgroundStroke_;\n    };\n    /**\n     * Get the padding for the text.\n     * @return {Array<number>} Padding.\n     * @api\n     */\n    Text.prototype.getPadding = function () {\n        return this.padding_;\n    };\n    /**\n     * Set the `overflow` property.\n     *\n     * @param {boolean} overflow Let text overflow the path that it follows.\n     * @api\n     */\n    Text.prototype.setOverflow = function (overflow) {\n        this.overflow_ = overflow;\n    };\n    /**\n     * Set the font.\n     *\n     * @param {string|undefined} font Font.\n     * @api\n     */\n    Text.prototype.setFont = function (font) {\n        this.font_ = font;\n    };\n    /**\n     * Set the maximum angle between adjacent characters.\n     *\n     * @param {number} maxAngle Angle in radians.\n     * @api\n     */\n    Text.prototype.setMaxAngle = function (maxAngle) {\n        this.maxAngle_ = maxAngle;\n    };\n    /**\n     * Set the x offset.\n     *\n     * @param {number} offsetX Horizontal text offset.\n     * @api\n     */\n    Text.prototype.setOffsetX = function (offsetX) {\n        this.offsetX_ = offsetX;\n    };\n    /**\n     * Set the y offset.\n     *\n     * @param {number} offsetY Vertical text offset.\n     * @api\n     */\n    Text.prototype.setOffsetY = function (offsetY) {\n        this.offsetY_ = offsetY;\n    };\n    /**\n     * Set the text placement.\n     *\n     * @param {import(\"./TextPlacement.js\").default|string} placement Placement.\n     * @api\n     */\n    Text.prototype.setPlacement = function (placement) {\n        this.placement_ = placement;\n    };\n    /**\n     * Set whether to rotate the text with the view.\n     *\n     * @param {boolean} rotateWithView Rotate with map.\n     * @api\n     */\n    Text.prototype.setRotateWithView = function (rotateWithView) {\n        this.rotateWithView_ = rotateWithView;\n    };\n    /**\n     * Set the fill.\n     *\n     * @param {import(\"./Fill.js\").default} fill Fill style.\n     * @api\n     */\n    Text.prototype.setFill = function (fill) {\n        this.fill_ = fill;\n    };\n    /**\n     * Set the rotation.\n     *\n     * @param {number|undefined} rotation Rotation.\n     * @api\n     */\n    Text.prototype.setRotation = function (rotation) {\n        this.rotation_ = rotation;\n    };\n    /**\n     * Set the scale.\n     *\n     * @param {number|import(\"../size.js\").Size|undefined} scale Scale.\n     * @api\n     */\n    Text.prototype.setScale = function (scale) {\n        this.scale_ = scale;\n        this.scaleArray_ = toSize(scale !== undefined ? scale : 1);\n    };\n    /**\n     * Set the stroke.\n     *\n     * @param {import(\"./Stroke.js\").default} stroke Stroke style.\n     * @api\n     */\n    Text.prototype.setStroke = function (stroke) {\n        this.stroke_ = stroke;\n    };\n    /**\n     * Set the text.\n     *\n     * @param {string|undefined} text Text.\n     * @api\n     */\n    Text.prototype.setText = function (text) {\n        this.text_ = text;\n    };\n    /**\n     * Set the text alignment.\n     *\n     * @param {string|undefined} textAlign Text align.\n     * @api\n     */\n    Text.prototype.setTextAlign = function (textAlign) {\n        this.textAlign_ = textAlign;\n    };\n    /**\n     * Set the text baseline.\n     *\n     * @param {string|undefined} textBaseline Text baseline.\n     * @api\n     */\n    Text.prototype.setTextBaseline = function (textBaseline) {\n        this.textBaseline_ = textBaseline;\n    };\n    /**\n     * Set the background fill.\n     *\n     * @param {import(\"./Fill.js\").default} fill Fill style.\n     * @api\n     */\n    Text.prototype.setBackgroundFill = function (fill) {\n        this.backgroundFill_ = fill;\n    };\n    /**\n     * Set the background stroke.\n     *\n     * @param {import(\"./Stroke.js\").default} stroke Stroke style.\n     * @api\n     */\n    Text.prototype.setBackgroundStroke = function (stroke) {\n        this.backgroundStroke_ = stroke;\n    };\n    /**\n     * Set the padding (`[top, right, bottom, left]`).\n     *\n     * @param {!Array<number>} padding Padding.\n     * @api\n     */\n    Text.prototype.setPadding = function (padding) {\n        this.padding_ = padding;\n    };\n    return Text;\n}());\nexport default Text;\n//# sourceMappingURL=Text.js.map","/**\n * @module ol/geom/flat/simplify\n */\n// Based on simplify-js https://github.com/mourner/simplify-js\n// Copyright (c) 2012, Vladimir Agafonkin\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n//    1. Redistributions of source code must retain the above copyright notice,\n//       this list of conditions and the following disclaimer.\n//\n//    2. Redistributions in binary form must reproduce the above copyright\n//       notice, this list of conditions and the following disclaimer in the\n//       documentation and/or other materials provided with the distribution.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\nimport { squaredDistance, squaredSegmentDistance } from '../../math.js';\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {boolean} highQuality Highest quality.\n * @param {Array<number>} [opt_simplifiedFlatCoordinates] Simplified flat\n *     coordinates.\n * @return {Array<number>} Simplified line string.\n */\nexport function simplifyLineString(flatCoordinates, offset, end, stride, squaredTolerance, highQuality, opt_simplifiedFlatCoordinates) {\n    var simplifiedFlatCoordinates = opt_simplifiedFlatCoordinates !== undefined\n        ? opt_simplifiedFlatCoordinates\n        : [];\n    if (!highQuality) {\n        end = radialDistance(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, 0);\n        flatCoordinates = simplifiedFlatCoordinates;\n        offset = 0;\n        stride = 2;\n    }\n    simplifiedFlatCoordinates.length = douglasPeucker(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, 0);\n    return simplifiedFlatCoordinates;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function douglasPeucker(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n    var n = (end - offset) / stride;\n    if (n < 3) {\n        for (; offset < end; offset += stride) {\n            simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n            simplifiedFlatCoordinates[simplifiedOffset++] =\n                flatCoordinates[offset + 1];\n        }\n        return simplifiedOffset;\n    }\n    /** @type {Array<number>} */\n    var markers = new Array(n);\n    markers[0] = 1;\n    markers[n - 1] = 1;\n    /** @type {Array<number>} */\n    var stack = [offset, end - stride];\n    var index = 0;\n    while (stack.length > 0) {\n        var last = stack.pop();\n        var first = stack.pop();\n        var maxSquaredDistance = 0;\n        var x1 = flatCoordinates[first];\n        var y1 = flatCoordinates[first + 1];\n        var x2 = flatCoordinates[last];\n        var y2 = flatCoordinates[last + 1];\n        for (var i = first + stride; i < last; i += stride) {\n            var x = flatCoordinates[i];\n            var y = flatCoordinates[i + 1];\n            var squaredDistance_1 = squaredSegmentDistance(x, y, x1, y1, x2, y2);\n            if (squaredDistance_1 > maxSquaredDistance) {\n                index = i;\n                maxSquaredDistance = squaredDistance_1;\n            }\n        }\n        if (maxSquaredDistance > squaredTolerance) {\n            markers[(index - offset) / stride] = 1;\n            if (first + stride < index) {\n                stack.push(first, index);\n            }\n            if (index + stride < last) {\n                stack.push(index, last);\n            }\n        }\n    }\n    for (var i = 0; i < n; ++i) {\n        if (markers[i]) {\n            simplifiedFlatCoordinates[simplifiedOffset++] =\n                flatCoordinates[offset + i * stride];\n            simplifiedFlatCoordinates[simplifiedOffset++] =\n                flatCoordinates[offset + i * stride + 1];\n        }\n    }\n    return simplifiedOffset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<number>} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerArray(flatCoordinates, offset, ends, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds) {\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        simplifiedOffset = douglasPeucker(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset);\n        simplifiedEnds.push(simplifiedOffset);\n        offset = end;\n    }\n    return simplifiedOffset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<Array<number>>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerMultiArray(flatCoordinates, offset, endss, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) {\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        var simplifiedEnds = [];\n        simplifiedOffset = douglasPeuckerArray(flatCoordinates, offset, ends, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);\n        simplifiedEndss.push(simplifiedEnds);\n        offset = ends[ends.length - 1];\n    }\n    return simplifiedOffset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function radialDistance(flatCoordinates, offset, end, stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n    if (end <= offset + stride) {\n        // zero or one point, no simplification possible, so copy and return\n        for (; offset < end; offset += stride) {\n            simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n            simplifiedFlatCoordinates[simplifiedOffset++] =\n                flatCoordinates[offset + 1];\n        }\n        return simplifiedOffset;\n    }\n    var x1 = flatCoordinates[offset];\n    var y1 = flatCoordinates[offset + 1];\n    // copy first point\n    simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n    simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n    var x2 = x1;\n    var y2 = y1;\n    for (offset += stride; offset < end; offset += stride) {\n        x2 = flatCoordinates[offset];\n        y2 = flatCoordinates[offset + 1];\n        if (squaredDistance(x1, y1, x2, y2) > squaredTolerance) {\n            // copy point at offset\n            simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n            simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n            x1 = x2;\n            y1 = y2;\n        }\n    }\n    if (x2 != x1 || y2 != y1) {\n        // copy last point\n        simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n        simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n    }\n    return simplifiedOffset;\n}\n/**\n * @param {number} value Value.\n * @param {number} tolerance Tolerance.\n * @return {number} Rounded value.\n */\nexport function snap(value, tolerance) {\n    return tolerance * Math.round(value / tolerance);\n}\n/**\n * Simplifies a line string using an algorithm designed by Tim Schaub.\n * Coordinates are snapped to the nearest value in a virtual grid and\n * consecutive duplicate coordinates are discarded.  This effectively preserves\n * topology as the simplification of any subsection of a line string is\n * independent of the rest of the line string.  This means that, for examples,\n * the common edge between two polygons will be simplified to the same line\n * string independently in both polygons.  This implementation uses a single\n * pass over the coordinates and eliminates intermediate collinear points.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function quantize(flatCoordinates, offset, end, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n    // do nothing if the line is empty\n    if (offset == end) {\n        return simplifiedOffset;\n    }\n    // snap the first coordinate (P1)\n    var x1 = snap(flatCoordinates[offset], tolerance);\n    var y1 = snap(flatCoordinates[offset + 1], tolerance);\n    offset += stride;\n    // add the first coordinate to the output\n    simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n    simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n    // find the next coordinate that does not snap to the same value as the first\n    // coordinate (P2)\n    var x2, y2;\n    do {\n        x2 = snap(flatCoordinates[offset], tolerance);\n        y2 = snap(flatCoordinates[offset + 1], tolerance);\n        offset += stride;\n        if (offset == end) {\n            // all coordinates snap to the same value, the line collapses to a point\n            // push the last snapped value anyway to ensure that the output contains\n            // at least two points\n            // FIXME should we really return at least two points anyway?\n            simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n            simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n            return simplifiedOffset;\n        }\n    } while (x2 == x1 && y2 == y1);\n    while (offset < end) {\n        // snap the next coordinate (P3)\n        var x3 = snap(flatCoordinates[offset], tolerance);\n        var y3 = snap(flatCoordinates[offset + 1], tolerance);\n        offset += stride;\n        // skip P3 if it is equal to P2\n        if (x3 == x2 && y3 == y2) {\n            continue;\n        }\n        // calculate the delta between P1 and P2\n        var dx1 = x2 - x1;\n        var dy1 = y2 - y1;\n        // calculate the delta between P3 and P1\n        var dx2 = x3 - x1;\n        var dy2 = y3 - y1;\n        // if P1, P2, and P3 are colinear and P3 is further from P1 than P2 is from\n        // P1 in the same direction then P2 is on the straight line between P1 and\n        // P3\n        if (dx1 * dy2 == dy1 * dx2 &&\n            ((dx1 < 0 && dx2 < dx1) || dx1 == dx2 || (dx1 > 0 && dx2 > dx1)) &&\n            ((dy1 < 0 && dy2 < dy1) || dy1 == dy2 || (dy1 > 0 && dy2 > dy1))) {\n            // discard P2 and set P2 = P3\n            x2 = x3;\n            y2 = y3;\n            continue;\n        }\n        // either P1, P2, and P3 are not colinear, or they are colinear but P3 is\n        // between P3 and P1 or on the opposite half of the line to P2.  add P2,\n        // and continue with P1 = P2 and P2 = P3\n        simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n        simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n        x1 = x2;\n        y1 = y2;\n        x2 = x3;\n        y2 = y3;\n    }\n    // add the last point (P2)\n    simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n    simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n    return simplifiedOffset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<number>} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function quantizeArray(flatCoordinates, offset, ends, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds) {\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        simplifiedOffset = quantize(flatCoordinates, offset, end, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset);\n        simplifiedEnds.push(simplifiedOffset);\n        offset = end;\n    }\n    return simplifiedOffset;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<Array<number>>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function quantizeMultiArray(flatCoordinates, offset, endss, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) {\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        var simplifiedEnds = [];\n        simplifiedOffset = quantizeArray(flatCoordinates, offset, ends, stride, tolerance, simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);\n        simplifiedEndss.push(simplifiedEnds);\n        offset = ends[ends.length - 1];\n    }\n    return simplifiedOffset;\n}\n//# sourceMappingURL=simplify.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Image\n */\nimport EventType from './events/EventType.js';\nimport ImageBase from './ImageBase.js';\nimport ImageState from './ImageState.js';\nimport { IMAGE_DECODE } from './has.js';\nimport { getHeight } from './extent.js';\nimport { listenOnce, unlistenByKey } from './events.js';\n/**\n * A function that takes an {@link module:ol/Image~Image} for the image and a\n * `{string}` for the src as arguments. It is supposed to make it so the\n * underlying image {@link module:ol/Image~Image#getImage} is assigned the\n * content specified by the src. If not specified, the default is\n *\n *     function(image, src) {\n *       image.getImage().src = src;\n *     }\n *\n * Providing a custom `imageLoadFunction` can be useful to load images with\n * post requests or - in general - through XHR requests, where the src of the\n * image element would be set to a data URI when the content is loaded.\n *\n * @typedef {function(ImageWrapper, string): void} LoadFunction\n * @api\n */\nvar ImageWrapper = /** @class */ (function (_super) {\n    __extends(ImageWrapper, _super);\n    /**\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {number|undefined} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {string} src Image source URI.\n     * @param {?string} crossOrigin Cross origin.\n     * @param {LoadFunction} imageLoadFunction Image load function.\n     */\n    function ImageWrapper(extent, resolution, pixelRatio, src, crossOrigin, imageLoadFunction) {\n        var _this = _super.call(this, extent, resolution, pixelRatio, ImageState.IDLE) || this;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.src_ = src;\n        /**\n         * @private\n         * @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement}\n         */\n        _this.image_ = new Image();\n        if (crossOrigin !== null) {\n            _this.image_.crossOrigin = crossOrigin;\n        }\n        /**\n         * @private\n         * @type {?function():void}\n         */\n        _this.unlisten_ = null;\n        /**\n         * @protected\n         * @type {import(\"./ImageState.js\").default}\n         */\n        _this.state = ImageState.IDLE;\n        /**\n         * @private\n         * @type {LoadFunction}\n         */\n        _this.imageLoadFunction_ = imageLoadFunction;\n        return _this;\n    }\n    /**\n     * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n     * @api\n     */\n    ImageWrapper.prototype.getImage = function () {\n        return this.image_;\n    };\n    /**\n     * Tracks loading or read errors.\n     *\n     * @private\n     */\n    ImageWrapper.prototype.handleImageError_ = function () {\n        this.state = ImageState.ERROR;\n        this.unlistenImage_();\n        this.changed();\n    };\n    /**\n     * Tracks successful image load.\n     *\n     * @private\n     */\n    ImageWrapper.prototype.handleImageLoad_ = function () {\n        if (this.resolution === undefined) {\n            this.resolution = getHeight(this.extent) / this.image_.height;\n        }\n        this.state = ImageState.LOADED;\n        this.unlistenImage_();\n        this.changed();\n    };\n    /**\n     * Load the image or retry if loading previously failed.\n     * Loading is taken care of by the tile queue, and calling this method is\n     * only needed for preloading or for reloading in case of an error.\n     * @api\n     */\n    ImageWrapper.prototype.load = function () {\n        if (this.state == ImageState.IDLE || this.state == ImageState.ERROR) {\n            this.state = ImageState.LOADING;\n            this.changed();\n            this.imageLoadFunction_(this, this.src_);\n            this.unlisten_ = listenImage(this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this));\n        }\n    };\n    /**\n     * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image.\n     */\n    ImageWrapper.prototype.setImage = function (image) {\n        this.image_ = image;\n        this.resolution = getHeight(this.extent) / this.image_.height;\n    };\n    /**\n     * Discards event handlers which listen for load completion or errors.\n     *\n     * @private\n     */\n    ImageWrapper.prototype.unlistenImage_ = function () {\n        if (this.unlisten_) {\n            this.unlisten_();\n            this.unlisten_ = null;\n        }\n    };\n    return ImageWrapper;\n}(ImageBase));\n/**\n * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image element.\n * @param {function():any} loadHandler Load callback function.\n * @param {function():any} errorHandler Error callback function.\n * @return {function():void} Callback to stop listening.\n */\nexport function listenImage(image, loadHandler, errorHandler) {\n    var img = /** @type {HTMLImageElement} */ (image);\n    if (img.src && IMAGE_DECODE) {\n        var promise = img.decode();\n        var listening_1 = true;\n        var unlisten = function () {\n            listening_1 = false;\n        };\n        promise\n            .then(function () {\n            if (listening_1) {\n                loadHandler();\n            }\n        })\n            .catch(function (error) {\n            if (listening_1) {\n                // FIXME: Unconditionally call errorHandler() when this bug is fixed upstream:\n                //        https://bugs.webkit.org/show_bug.cgi?id=198527\n                if (error.name === 'EncodingError' &&\n                    error.message === 'Invalid image type.') {\n                    loadHandler();\n                }\n                else {\n                    errorHandler();\n                }\n            }\n        });\n        return unlisten;\n    }\n    var listenerKeys = [\n        listenOnce(img, EventType.LOAD, loadHandler),\n        listenOnce(img, EventType.ERROR, errorHandler),\n    ];\n    return function unlisten() {\n        listenerKeys.forEach(unlistenByKey);\n    };\n}\nexport default ImageWrapper;\n//# sourceMappingURL=Image.js.map","/**\n * @module ol/tilegrid/TileGrid\n */\nimport TileRange, { createOrUpdate as createOrUpdateTileRange, } from '../TileRange.js';\nimport { DEFAULT_TILE_SIZE } from './common.js';\nimport { assert } from '../asserts.js';\nimport { clamp } from '../math.js';\nimport { createOrUpdate, getTopLeft } from '../extent.js';\nimport { createOrUpdate as createOrUpdateTileCoord } from '../tilecoord.js';\nimport { isSorted, linearFindNearest } from '../array.js';\nimport { toSize } from '../size.js';\n/**\n * @private\n * @type {import(\"../tilecoord.js\").TileCoord}\n */\nvar tmpTileCoord = [0, 0, 0];\n/**\n * @typedef {Object} Options\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the tile grid. No tiles outside this\n * extent will be requested by {@link module:ol/source/Tile} sources. When no `origin` or\n * `origins` are configured, the `origin` will be set to the top-left corner of the extent.\n * @property {number} [minZoom=0] Minimum zoom.\n * @property {import(\"../coordinate.js\").Coordinate} [origin] The tile grid origin, i.e. where the `x`\n * and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left to right and downwards. If not\n * specified, `extent` or `origins` must be provided.\n * @property {Array<import(\"../coordinate.js\").Coordinate>} [origins] Tile grid origins, i.e. where\n * the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If given, the array length\n * should match the length of the `resolutions` array, i.e. each resolution can have a different\n * origin. Tile coordinates increase left to right and downwards. If not specified, `extent` or\n * `origin` must be provided.\n * @property {!Array<number>} resolutions Resolutions. The array index of each resolution needs\n * to match the zoom level. This means that even if a `minZoom` is configured, the resolutions\n * array will have a length of `maxZoom + 1`.\n * @property {Array<import(\"../size.js\").Size>} [sizes] Number of tile rows and columns\n * of the grid for each zoom level. If specified the values\n * define each zoom level's extent together with the `origin` or `origins`.\n * A grid `extent` can be configured in addition, and will further limit the extent\n * for which tile requests are made by sources. If the bottom-left corner of\n * an extent is used as `origin` or `origins`, then the `y` value must be\n * negative because OpenLayers tile coordinates use the top left as the origin.\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * Default is `[256, 256]`.\n * @property {Array<import(\"../size.js\").Size>} [tileSizes] Tile sizes. If given, the array length\n * should match the length of the `resolutions` array, i.e. each resolution can have a different\n * tile size.\n */\n/**\n * @classdesc\n * Base class for setting the grid pattern for sources accessing tiled-image\n * servers.\n * @api\n */\nvar TileGrid = /** @class */ (function () {\n    /**\n     * @param {Options} options Tile grid options.\n     */\n    function TileGrid(options) {\n        /**\n         * @protected\n         * @type {number}\n         */\n        this.minZoom = options.minZoom !== undefined ? options.minZoom : 0;\n        /**\n         * @private\n         * @type {!Array<number>}\n         */\n        this.resolutions_ = options.resolutions;\n        assert(isSorted(this.resolutions_, function (a, b) {\n            return b - a;\n        }, true), 17); // `resolutions` must be sorted in descending order\n        // check if we've got a consistent zoom factor and origin\n        var zoomFactor;\n        if (!options.origins) {\n            for (var i = 0, ii = this.resolutions_.length - 1; i < ii; ++i) {\n                if (!zoomFactor) {\n                    zoomFactor = this.resolutions_[i] / this.resolutions_[i + 1];\n                }\n                else {\n                    if (this.resolutions_[i] / this.resolutions_[i + 1] !== zoomFactor) {\n                        zoomFactor = undefined;\n                        break;\n                    }\n                }\n            }\n        }\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.zoomFactor_ = zoomFactor;\n        /**\n         * @protected\n         * @type {number}\n         */\n        this.maxZoom = this.resolutions_.length - 1;\n        /**\n         * @private\n         * @type {import(\"../coordinate.js\").Coordinate}\n         */\n        this.origin_ = options.origin !== undefined ? options.origin : null;\n        /**\n         * @private\n         * @type {Array<import(\"../coordinate.js\").Coordinate>}\n         */\n        this.origins_ = null;\n        if (options.origins !== undefined) {\n            this.origins_ = options.origins;\n            assert(this.origins_.length == this.resolutions_.length, 20); // Number of `origins` and `resolutions` must be equal\n        }\n        var extent = options.extent;\n        if (extent !== undefined && !this.origin_ && !this.origins_) {\n            this.origin_ = getTopLeft(extent);\n        }\n        assert((!this.origin_ && this.origins_) || (this.origin_ && !this.origins_), 18); // Either `origin` or `origins` must be configured, never both\n        /**\n         * @private\n         * @type {Array<number|import(\"../size.js\").Size>}\n         */\n        this.tileSizes_ = null;\n        if (options.tileSizes !== undefined) {\n            this.tileSizes_ = options.tileSizes;\n            assert(this.tileSizes_.length == this.resolutions_.length, 19); // Number of `tileSizes` and `resolutions` must be equal\n        }\n        /**\n         * @private\n         * @type {number|import(\"../size.js\").Size}\n         */\n        this.tileSize_ =\n            options.tileSize !== undefined\n                ? options.tileSize\n                : !this.tileSizes_\n                    ? DEFAULT_TILE_SIZE\n                    : null;\n        assert((!this.tileSize_ && this.tileSizes_) ||\n            (this.tileSize_ && !this.tileSizes_), 22); // Either `tileSize` or `tileSizes` must be configured, never both\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        this.extent_ = extent !== undefined ? extent : null;\n        /**\n         * @private\n         * @type {Array<import(\"../TileRange.js\").default>}\n         */\n        this.fullTileRanges_ = null;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        this.tmpSize_ = [0, 0];\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        this.tmpExtent_ = [0, 0, 0, 0];\n        if (options.sizes !== undefined) {\n            this.fullTileRanges_ = options.sizes.map(function (size, z) {\n                var tileRange = new TileRange(Math.min(0, size[0]), Math.max(size[0] - 1, -1), Math.min(0, size[1]), Math.max(size[1] - 1, -1));\n                if (extent) {\n                    var restrictedTileRange = this.getTileRangeForExtentAndZ(extent, z);\n                    tileRange.minX = Math.max(restrictedTileRange.minX, tileRange.minX);\n                    tileRange.maxX = Math.min(restrictedTileRange.maxX, tileRange.maxX);\n                    tileRange.minY = Math.max(restrictedTileRange.minY, tileRange.minY);\n                    tileRange.maxY = Math.min(restrictedTileRange.maxY, tileRange.maxY);\n                }\n                return tileRange;\n            }, this);\n        }\n        else if (extent) {\n            this.calculateTileRanges_(extent);\n        }\n    }\n    /**\n     * Call a function with each tile coordinate for a given extent and zoom level.\n     *\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} zoom Integer zoom level.\n     * @param {function(import(\"../tilecoord.js\").TileCoord): void} callback Function called with each tile coordinate.\n     * @api\n     */\n    TileGrid.prototype.forEachTileCoord = function (extent, zoom, callback) {\n        var tileRange = this.getTileRangeForExtentAndZ(extent, zoom);\n        for (var i = tileRange.minX, ii = tileRange.maxX; i <= ii; ++i) {\n            for (var j = tileRange.minY, jj = tileRange.maxY; j <= jj; ++j) {\n                callback([zoom, i, j]);\n            }\n        }\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {function(number, import(\"../TileRange.js\").default): boolean} callback Callback.\n     * @param {import(\"../TileRange.js\").default} [opt_tileRange] Temporary import(\"../TileRange.js\").default object.\n     * @param {import(\"../extent.js\").Extent} [opt_extent] Temporary import(\"../extent.js\").Extent object.\n     * @return {boolean} Callback succeeded.\n     */\n    TileGrid.prototype.forEachTileCoordParentTileRange = function (tileCoord, callback, opt_tileRange, opt_extent) {\n        var tileRange, x, y;\n        var tileCoordExtent = null;\n        var z = tileCoord[0] - 1;\n        if (this.zoomFactor_ === 2) {\n            x = tileCoord[1];\n            y = tileCoord[2];\n        }\n        else {\n            tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent);\n        }\n        while (z >= this.minZoom) {\n            if (this.zoomFactor_ === 2) {\n                x = Math.floor(x / 2);\n                y = Math.floor(y / 2);\n                tileRange = createOrUpdateTileRange(x, x, y, y, opt_tileRange);\n            }\n            else {\n                tileRange = this.getTileRangeForExtentAndZ(tileCoordExtent, z, opt_tileRange);\n            }\n            if (callback(z, tileRange)) {\n                return true;\n            }\n            --z;\n        }\n        return false;\n    };\n    /**\n     * Get the extent for this tile grid, if it was configured.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     * @api\n     */\n    TileGrid.prototype.getExtent = function () {\n        return this.extent_;\n    };\n    /**\n     * Get the maximum zoom level for the grid.\n     * @return {number} Max zoom.\n     * @api\n     */\n    TileGrid.prototype.getMaxZoom = function () {\n        return this.maxZoom;\n    };\n    /**\n     * Get the minimum zoom level for the grid.\n     * @return {number} Min zoom.\n     * @api\n     */\n    TileGrid.prototype.getMinZoom = function () {\n        return this.minZoom;\n    };\n    /**\n     * Get the origin for the grid at the given zoom level.\n     * @param {number} z Integer zoom level.\n     * @return {import(\"../coordinate.js\").Coordinate} Origin.\n     * @api\n     */\n    TileGrid.prototype.getOrigin = function (z) {\n        if (this.origin_) {\n            return this.origin_;\n        }\n        else {\n            return this.origins_[z];\n        }\n    };\n    /**\n     * Get the resolution for the given zoom level.\n     * @param {number} z Integer zoom level.\n     * @return {number} Resolution.\n     * @api\n     */\n    TileGrid.prototype.getResolution = function (z) {\n        return this.resolutions_[z];\n    };\n    /**\n     * Get the list of resolutions for the tile grid.\n     * @return {Array<number>} Resolutions.\n     * @api\n     */\n    TileGrid.prototype.getResolutions = function () {\n        return this.resolutions_;\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../TileRange.js\").default} [opt_tileRange] Temporary import(\"../TileRange.js\").default object.\n     * @param {import(\"../extent.js\").Extent} [opt_extent] Temporary import(\"../extent.js\").Extent object.\n     * @return {import(\"../TileRange.js\").default} Tile range.\n     */\n    TileGrid.prototype.getTileCoordChildTileRange = function (tileCoord, opt_tileRange, opt_extent) {\n        if (tileCoord[0] < this.maxZoom) {\n            if (this.zoomFactor_ === 2) {\n                var minX = tileCoord[1] * 2;\n                var minY = tileCoord[2] * 2;\n                return createOrUpdateTileRange(minX, minX + 1, minY, minY + 1, opt_tileRange);\n            }\n            var tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent || this.tmpExtent_);\n            return this.getTileRangeForExtentAndZ(tileCoordExtent, tileCoord[0] + 1, opt_tileRange);\n        }\n        return null;\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {number} z Integer zoom level.\n     * @param {import(\"../TileRange.js\").default} [opt_tileRange] Temporary import(\"../TileRange.js\").default object.\n     * @return {import(\"../TileRange.js\").default} Tile range.\n     */\n    TileGrid.prototype.getTileRangeForTileCoordAndZ = function (tileCoord, z, opt_tileRange) {\n        if (z > this.maxZoom || z < this.minZoom) {\n            return null;\n        }\n        var tileCoordZ = tileCoord[0];\n        var tileCoordX = tileCoord[1];\n        var tileCoordY = tileCoord[2];\n        if (z === tileCoordZ) {\n            return createOrUpdateTileRange(tileCoordX, tileCoordY, tileCoordX, tileCoordY, opt_tileRange);\n        }\n        if (this.zoomFactor_) {\n            var factor = Math.pow(this.zoomFactor_, z - tileCoordZ);\n            var minX = Math.floor(tileCoordX * factor);\n            var minY = Math.floor(tileCoordY * factor);\n            if (z < tileCoordZ) {\n                return createOrUpdateTileRange(minX, minX, minY, minY, opt_tileRange);\n            }\n            var maxX = Math.floor(factor * (tileCoordX + 1)) - 1;\n            var maxY = Math.floor(factor * (tileCoordY + 1)) - 1;\n            return createOrUpdateTileRange(minX, maxX, minY, maxY, opt_tileRange);\n        }\n        var tileCoordExtent = this.getTileCoordExtent(tileCoord, this.tmpExtent_);\n        return this.getTileRangeForExtentAndZ(tileCoordExtent, z, opt_tileRange);\n    };\n    /**\n     * Get the extent for a tile range.\n     * @param {number} z Integer zoom level.\n     * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n     * @param {import(\"../extent.js\").Extent} [opt_extent] Temporary import(\"../extent.js\").Extent object.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     */\n    TileGrid.prototype.getTileRangeExtent = function (z, tileRange, opt_extent) {\n        var origin = this.getOrigin(z);\n        var resolution = this.getResolution(z);\n        var tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n        var minX = origin[0] + tileRange.minX * tileSize[0] * resolution;\n        var maxX = origin[0] + (tileRange.maxX + 1) * tileSize[0] * resolution;\n        var minY = origin[1] + tileRange.minY * tileSize[1] * resolution;\n        var maxY = origin[1] + (tileRange.maxY + 1) * tileSize[1] * resolution;\n        return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n    };\n    /**\n     * Get a tile range for the given extent and integer zoom level.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} z Integer zoom level.\n     * @param {import(\"../TileRange.js\").default} [opt_tileRange] Temporary tile range object.\n     * @return {import(\"../TileRange.js\").default} Tile range.\n     */\n    TileGrid.prototype.getTileRangeForExtentAndZ = function (extent, z, opt_tileRange) {\n        var tileCoord = tmpTileCoord;\n        this.getTileCoordForXYAndZ_(extent[0], extent[3], z, false, tileCoord);\n        var minX = tileCoord[1];\n        var minY = tileCoord[2];\n        this.getTileCoordForXYAndZ_(extent[2], extent[1], z, true, tileCoord);\n        return createOrUpdateTileRange(minX, tileCoord[1], minY, tileCoord[2], opt_tileRange);\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @return {import(\"../coordinate.js\").Coordinate} Tile center.\n     */\n    TileGrid.prototype.getTileCoordCenter = function (tileCoord) {\n        var origin = this.getOrigin(tileCoord[0]);\n        var resolution = this.getResolution(tileCoord[0]);\n        var tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);\n        return [\n            origin[0] + (tileCoord[1] + 0.5) * tileSize[0] * resolution,\n            origin[1] - (tileCoord[2] + 0.5) * tileSize[1] * resolution,\n        ];\n    };\n    /**\n     * Get the extent of a tile coordinate.\n     *\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../extent.js\").Extent} [opt_extent] Temporary extent object.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     * @api\n     */\n    TileGrid.prototype.getTileCoordExtent = function (tileCoord, opt_extent) {\n        var origin = this.getOrigin(tileCoord[0]);\n        var resolution = this.getResolution(tileCoord[0]);\n        var tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);\n        var minX = origin[0] + tileCoord[1] * tileSize[0] * resolution;\n        var minY = origin[1] - (tileCoord[2] + 1) * tileSize[1] * resolution;\n        var maxX = minX + tileSize[0] * resolution;\n        var maxY = minY + tileSize[1] * resolution;\n        return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n    };\n    /**\n     * Get the tile coordinate for the given map coordinate and resolution.  This\n     * method considers that coordinates that intersect tile boundaries should be\n     * assigned the higher tile coordinate.\n     *\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {number} resolution Resolution.\n     * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Destination import(\"../tilecoord.js\").TileCoord object.\n     * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n     * @api\n     */\n    TileGrid.prototype.getTileCoordForCoordAndResolution = function (coordinate, resolution, opt_tileCoord) {\n        return this.getTileCoordForXYAndResolution_(coordinate[0], coordinate[1], resolution, false, opt_tileCoord);\n    };\n    /**\n     * Note that this method should not be called for resolutions that correspond\n     * to an integer zoom level.  Instead call the `getTileCoordForXYAndZ_` method.\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {number} resolution Resolution (for a non-integer zoom level).\n     * @param {boolean} reverseIntersectionPolicy Instead of letting edge\n     *     intersections go to the higher tile coordinate, let edge intersections\n     *     go to the lower tile coordinate.\n     * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Temporary import(\"../tilecoord.js\").TileCoord object.\n     * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n     * @private\n     */\n    TileGrid.prototype.getTileCoordForXYAndResolution_ = function (x, y, resolution, reverseIntersectionPolicy, opt_tileCoord) {\n        var z = this.getZForResolution(resolution);\n        var scale = resolution / this.getResolution(z);\n        var origin = this.getOrigin(z);\n        var tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n        var adjustX = reverseIntersectionPolicy ? 0.5 : 0;\n        var adjustY = reverseIntersectionPolicy ? 0.5 : 0;\n        var xFromOrigin = Math.floor((x - origin[0]) / resolution + adjustX);\n        var yFromOrigin = Math.floor((origin[1] - y) / resolution + adjustY);\n        var tileCoordX = (scale * xFromOrigin) / tileSize[0];\n        var tileCoordY = (scale * yFromOrigin) / tileSize[1];\n        if (reverseIntersectionPolicy) {\n            tileCoordX = Math.ceil(tileCoordX) - 1;\n            tileCoordY = Math.ceil(tileCoordY) - 1;\n        }\n        else {\n            tileCoordX = Math.floor(tileCoordX);\n            tileCoordY = Math.floor(tileCoordY);\n        }\n        return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);\n    };\n    /**\n     * Although there is repetition between this method and `getTileCoordForXYAndResolution_`,\n     * they should have separate implementations.  This method is for integer zoom\n     * levels.  The other method should only be called for resolutions corresponding\n     * to non-integer zoom levels.\n     * @param {number} x Map x coordinate.\n     * @param {number} y Map y coordinate.\n     * @param {number} z Integer zoom level.\n     * @param {boolean} reverseIntersectionPolicy Instead of letting edge\n     *     intersections go to the higher tile coordinate, let edge intersections\n     *     go to the lower tile coordinate.\n     * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Temporary import(\"../tilecoord.js\").TileCoord object.\n     * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n     * @private\n     */\n    TileGrid.prototype.getTileCoordForXYAndZ_ = function (x, y, z, reverseIntersectionPolicy, opt_tileCoord) {\n        var origin = this.getOrigin(z);\n        var resolution = this.getResolution(z);\n        var tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n        var adjustX = reverseIntersectionPolicy ? 0.5 : 0;\n        var adjustY = reverseIntersectionPolicy ? 0.5 : 0;\n        var xFromOrigin = Math.floor((x - origin[0]) / resolution + adjustX);\n        var yFromOrigin = Math.floor((origin[1] - y) / resolution + adjustY);\n        var tileCoordX = xFromOrigin / tileSize[0];\n        var tileCoordY = yFromOrigin / tileSize[1];\n        if (reverseIntersectionPolicy) {\n            tileCoordX = Math.ceil(tileCoordX) - 1;\n            tileCoordY = Math.ceil(tileCoordY) - 1;\n        }\n        else {\n            tileCoordX = Math.floor(tileCoordX);\n            tileCoordY = Math.floor(tileCoordY);\n        }\n        return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);\n    };\n    /**\n     * Get a tile coordinate given a map coordinate and zoom level.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {number} z Zoom level.\n     * @param {import(\"../tilecoord.js\").TileCoord} [opt_tileCoord] Destination import(\"../tilecoord.js\").TileCoord object.\n     * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n     * @api\n     */\n    TileGrid.prototype.getTileCoordForCoordAndZ = function (coordinate, z, opt_tileCoord) {\n        return this.getTileCoordForXYAndZ_(coordinate[0], coordinate[1], z, false, opt_tileCoord);\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @return {number} Tile resolution.\n     */\n    TileGrid.prototype.getTileCoordResolution = function (tileCoord) {\n        return this.resolutions_[tileCoord[0]];\n    };\n    /**\n     * Get the tile size for a zoom level. The type of the return value matches the\n     * `tileSize` or `tileSizes` that the tile grid was configured with. To always\n     * get an `import(\"../size.js\").Size`, run the result through `import(\"../size.js\").Size.toSize()`.\n     * @param {number} z Z.\n     * @return {number|import(\"../size.js\").Size} Tile size.\n     * @api\n     */\n    TileGrid.prototype.getTileSize = function (z) {\n        if (this.tileSize_) {\n            return this.tileSize_;\n        }\n        else {\n            return this.tileSizes_[z];\n        }\n    };\n    /**\n     * @param {number} z Zoom level.\n     * @return {import(\"../TileRange.js\").default} Extent tile range for the specified zoom level.\n     */\n    TileGrid.prototype.getFullTileRange = function (z) {\n        if (!this.fullTileRanges_) {\n            return this.extent_\n                ? this.getTileRangeForExtentAndZ(this.extent_, z)\n                : null;\n        }\n        else {\n            return this.fullTileRanges_[z];\n        }\n    };\n    /**\n     * @param {number} resolution Resolution.\n     * @param {number|import(\"../array.js\").NearestDirectionFunction} [opt_direction]\n     *     If 0, the nearest resolution will be used.\n     *     If 1, the nearest higher resolution (lower Z) will be used. If -1, the\n     *     nearest lower resolution (higher Z) will be used. Default is 0.\n     *     Use a {@link module:ol/array~NearestDirectionFunction} for more precise control.\n     *\n     * For example to change tile Z at the midpoint of zoom levels\n     * ```js\n     * function(value, high, low) {\n     *   return value - low * Math.sqrt(high / low);\n     * }\n     * ```\n     * @return {number} Z.\n     * @api\n     */\n    TileGrid.prototype.getZForResolution = function (resolution, opt_direction) {\n        var z = linearFindNearest(this.resolutions_, resolution, opt_direction || 0);\n        return clamp(z, this.minZoom, this.maxZoom);\n    };\n    /**\n     * @param {!import(\"../extent.js\").Extent} extent Extent for this tile grid.\n     * @private\n     */\n    TileGrid.prototype.calculateTileRanges_ = function (extent) {\n        var length = this.resolutions_.length;\n        var fullTileRanges = new Array(length);\n        for (var z = this.minZoom; z < length; ++z) {\n            fullTileRanges[z] = this.getTileRangeForExtentAndZ(extent, z);\n        }\n        this.fullTileRanges_ = fullTileRanges;\n    };\n    return TileGrid;\n}());\nexport default TileGrid;\n//# sourceMappingURL=TileGrid.js.map","/**\n * @module ol/tilegrid/common\n */\n/**\n * Default maximum zoom for default tile grids.\n * @type {number}\n */\nexport var DEFAULT_MAX_ZOOM = 42;\n/**\n * Default tile size.\n * @type {number}\n */\nexport var DEFAULT_TILE_SIZE = 256;\n//# sourceMappingURL=common.js.map","/**\n * @module ol/geom/flat/contains\n */\nimport { forEachCorner } from '../../extent.js';\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} Contains extent.\n */\nexport function linearRingContainsExtent(flatCoordinates, offset, end, stride, extent) {\n    var outside = forEachCorner(extent, \n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @return {boolean} Contains (x, y).\n     */\n    function (coordinate) {\n        return !linearRingContainsXY(flatCoordinates, offset, end, stride, coordinate[0], coordinate[1]);\n    });\n    return !outside;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingContainsXY(flatCoordinates, offset, end, stride, x, y) {\n    // https://geomalgorithms.com/a03-_inclusion.html\n    // Copyright 2000 softSurfer, 2012 Dan Sunday\n    // This code may be freely used and modified for any purpose\n    // providing that this copyright notice is included with it.\n    // SoftSurfer makes no warranty for this code, and cannot be held\n    // liable for any real or imagined damage resulting from its use.\n    // Users of this code must verify correctness for their application.\n    var wn = 0;\n    var x1 = flatCoordinates[end - stride];\n    var y1 = flatCoordinates[end - stride + 1];\n    for (; offset < end; offset += stride) {\n        var x2 = flatCoordinates[offset];\n        var y2 = flatCoordinates[offset + 1];\n        if (y1 <= y) {\n            if (y2 > y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) > 0) {\n                wn++;\n            }\n        }\n        else if (y2 <= y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) < 0) {\n            wn--;\n        }\n        x1 = x2;\n        y1 = y2;\n    }\n    return wn !== 0;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y) {\n    if (ends.length === 0) {\n        return false;\n    }\n    if (!linearRingContainsXY(flatCoordinates, offset, ends[0], stride, x, y)) {\n        return false;\n    }\n    for (var i = 1, ii = ends.length; i < ii; ++i) {\n        if (linearRingContainsXY(flatCoordinates, ends[i - 1], ends[i], stride, x, y)) {\n            return false;\n        }\n    }\n    return true;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingssContainsXY(flatCoordinates, offset, endss, stride, x, y) {\n    if (endss.length === 0) {\n        return false;\n    }\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n            return true;\n        }\n        offset = ends[ends.length - 1];\n    }\n    return false;\n}\n//# sourceMappingURL=contains.js.map","/**\n * @module ol/geom/flat/reverse\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n */\nexport function coordinates(flatCoordinates, offset, end, stride) {\n    while (offset < end - stride) {\n        for (var i = 0; i < stride; ++i) {\n            var tmp = flatCoordinates[offset + i];\n            flatCoordinates[offset + i] = flatCoordinates[end - stride + i];\n            flatCoordinates[end - stride + i] = tmp;\n        }\n        offset += stride;\n        end -= stride;\n    }\n}\n//# sourceMappingURL=reverse.js.map","/**\n * @module ol/geom/flat/orient\n */\nimport { coordinates as reverseCoordinates } from './reverse.js';\n/**\n * Is the linear ring oriented clockwise in a coordinate system with a bottom-left\n * coordinate origin? For a coordinate system with a top-left coordinate origin,\n * the ring's orientation is clockwise when this function returns false.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {boolean} Is clockwise.\n */\nexport function linearRingIsClockwise(flatCoordinates, offset, end, stride) {\n    // https://stackoverflow.com/q/1165647/clockwise-method#1165943\n    // https://github.com/OSGeo/gdal/blob/master/gdal/ogr/ogrlinearring.cpp\n    var edge = 0;\n    var x1 = flatCoordinates[end - stride];\n    var y1 = flatCoordinates[end - stride + 1];\n    for (; offset < end; offset += stride) {\n        var x2 = flatCoordinates[offset];\n        var y2 = flatCoordinates[offset + 1];\n        edge += (x2 - x1) * (y2 + y1);\n        x1 = x2;\n        y1 = y2;\n    }\n    return edge === 0 ? undefined : edge > 0;\n}\n/**\n * Determines if linear rings are oriented.  By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [opt_right] Test for right-hand orientation\n *     (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingsAreOriented(flatCoordinates, offset, ends, stride, opt_right) {\n    var right = opt_right !== undefined ? opt_right : false;\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        var isClockwise = linearRingIsClockwise(flatCoordinates, offset, end, stride);\n        if (i === 0) {\n            if ((right && isClockwise) || (!right && !isClockwise)) {\n                return false;\n            }\n        }\n        else {\n            if ((right && !isClockwise) || (!right && isClockwise)) {\n                return false;\n            }\n        }\n        offset = end;\n    }\n    return true;\n}\n/**\n * Determines if linear rings are oriented.  By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [opt_right] Test for right-hand orientation\n *     (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingssAreOriented(flatCoordinates, offset, endss, stride, opt_right) {\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        if (!linearRingsAreOriented(flatCoordinates, offset, ends, stride, opt_right)) {\n            return false;\n        }\n        if (ends.length) {\n            offset = ends[ends.length - 1];\n        }\n    }\n    return true;\n}\n/**\n * Orient coordinates in a flat array of linear rings.  By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings).  To orient according to the\n * right-hand rule, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {boolean} [opt_right] Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRings(flatCoordinates, offset, ends, stride, opt_right) {\n    var right = opt_right !== undefined ? opt_right : false;\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        var isClockwise = linearRingIsClockwise(flatCoordinates, offset, end, stride);\n        var reverse = i === 0\n            ? (right && isClockwise) || (!right && !isClockwise)\n            : (right && !isClockwise) || (!right && isClockwise);\n        if (reverse) {\n            reverseCoordinates(flatCoordinates, offset, end, stride);\n        }\n        offset = end;\n    }\n    return offset;\n}\n/**\n * Orient coordinates in a flat array of linear rings.  By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings).  To orient according to the\n * right-hand rule, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean} [opt_right] Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRingsArray(flatCoordinates, offset, endss, stride, opt_right) {\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        offset = orientLinearRings(flatCoordinates, offset, endss[i], stride, opt_right);\n    }\n    return offset;\n}\n//# sourceMappingURL=orient.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/MapBrowserEvent\n */\nimport MapEvent from './MapEvent.js';\n/**\n * @classdesc\n * Events emitted as map browser events are instances of this type.\n * See {@link module:ol/PluggableMap~PluggableMap} for which events trigger a map browser event.\n * @template {UIEvent} EVENT\n */\nvar MapBrowserEvent = /** @class */ (function (_super) {\n    __extends(MapBrowserEvent, _super);\n    /**\n     * @param {string} type Event type.\n     * @param {import(\"./PluggableMap.js\").default} map Map.\n     * @param {EVENT} originalEvent Original event.\n     * @param {boolean} [opt_dragging] Is the map currently being dragged?\n     * @param {?import(\"./PluggableMap.js\").FrameState} [opt_frameState] Frame state.\n     */\n    function MapBrowserEvent(type, map, originalEvent, opt_dragging, opt_frameState) {\n        var _this = _super.call(this, type, map, opt_frameState) || this;\n        /**\n         * The original browser event.\n         * @const\n         * @type {EVENT}\n         * @api\n         */\n        _this.originalEvent = originalEvent;\n        /**\n         * The map pixel relative to the viewport corresponding to the original browser event.\n         * @type {?import(\"./pixel.js\").Pixel}\n         */\n        _this.pixel_ = null;\n        /**\n         * The coordinate in the user projection corresponding to the original browser event.\n         * @type {?import(\"./coordinate.js\").Coordinate}\n         */\n        _this.coordinate_ = null;\n        /**\n         * Indicates if the map is currently being dragged. Only set for\n         * `POINTERDRAG` and `POINTERMOVE` events. Default is `false`.\n         *\n         * @type {boolean}\n         * @api\n         */\n        _this.dragging = opt_dragging !== undefined ? opt_dragging : false;\n        return _this;\n    }\n    Object.defineProperty(MapBrowserEvent.prototype, \"pixel\", {\n        /**\n         * The map pixel relative to the viewport corresponding to the original event.\n         * @type {import(\"./pixel.js\").Pixel}\n         * @api\n         */\n        get: function () {\n            if (!this.pixel_) {\n                this.pixel_ = this.map.getEventPixel(this.originalEvent);\n            }\n            return this.pixel_;\n        },\n        set: function (pixel) {\n            this.pixel_ = pixel;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(MapBrowserEvent.prototype, \"coordinate\", {\n        /**\n         * The coordinate corresponding to the original browser event.  This will be in the user\n         * projection if one is set.  Otherwise it will be in the view projection.\n         * @type {import(\"./coordinate.js\").Coordinate}\n         * @api\n         */\n        get: function () {\n            if (!this.coordinate_) {\n                this.coordinate_ = this.map.getCoordinateFromPixel(this.pixel);\n            }\n            return this.coordinate_;\n        },\n        set: function (coordinate) {\n            this.coordinate_ = coordinate;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    /**\n     * Prevents the default browser action.\n     * See https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault.\n     * @api\n     */\n    MapBrowserEvent.prototype.preventDefault = function () {\n        _super.prototype.preventDefault.call(this);\n        if ('preventDefault' in this.originalEvent) {\n            /** @type {UIEvent} */ (this.originalEvent).preventDefault();\n        }\n    };\n    /**\n     * Prevents further propagation of the current event.\n     * See https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation.\n     * @api\n     */\n    MapBrowserEvent.prototype.stopPropagation = function () {\n        _super.prototype.stopPropagation.call(this);\n        if ('stopPropagation' in this.originalEvent) {\n            /** @type {UIEvent} */ (this.originalEvent).stopPropagation();\n        }\n    };\n    return MapBrowserEvent;\n}(MapEvent));\nexport default MapBrowserEvent;\n//# sourceMappingURL=MapBrowserEvent.js.map","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?e(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],e):e(t.jsts={})}(this,function(t){\"use strict\";function e(){}function n(t){this.message=t||\"\"}function i(t){this.message=t||\"\"}function r(t){this.message=t||\"\"}function o(){}function s(t){return null===t?Mt:t.color}function a(t){return null===t?null:t.parent}function u(t,e){null!==t&&(t.color=e)}function l(t){return null===t?null:t.left}function c(t){return null===t?null:t.right}function p(){this.root_=null,this.size_=0}function h(){}function f(){this.array_=[],arguments[0]instanceof It&&this.addAll(arguments[0])}function g(){}function d(t){this.message=t||\"\"}function y(){this.array_=[]}\"fill\"in Array.prototype||Object.defineProperty(Array.prototype,\"fill\",{configurable:!0,value:function(t){if(void 0===this||null===this)throw new TypeError(this+\" is not an object\");var e=Object(this),n=Math.max(Math.min(e.length,9007199254740991),0)||0,i=1 in arguments?parseInt(Number(arguments[1]),10)||0:0;i=i<0?Math.max(n+i,0):Math.min(i,n);var r=2 in arguments&&void 0!==arguments[2]?parseInt(Number(arguments[2]),10)||0:n;for(r=r<0?Math.max(n+arguments[2],0):Math.min(r,n);i<r;)e[i]=t,++i;return e},writable:!0}),Number.isFinite=Number.isFinite||function(t){return\"number\"==typeof t&&isFinite(t)},Number.isInteger=Number.isInteger||function(t){return\"number\"==typeof t&&isFinite(t)&&Math.floor(t)===t},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(t){return t!=t},Math.trunc=Math.trunc||function(t){return t<0?Math.ceil(t):Math.floor(t)};var _=function(){};_.prototype.interfaces_=function(){return[]},_.prototype.getClass=function(){return _},_.prototype.equalsWithTolerance=function(t,e,n){return Math.abs(t-e)<=n};var m=function(t){function e(e){t.call(this,e),this.name=\"IllegalArgumentException\",this.message=e,this.stack=(new t).stack}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),v=function(){},I={MAX_VALUE:{configurable:!0}};v.isNaN=function(t){return Number.isNaN(t)},v.doubleToLongBits=function(t){return t},v.longBitsToDouble=function(t){return t},v.isInfinite=function(t){return!Number.isFinite(t)},I.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(v,I);var E=function(){},x=function(){},N=function(){},C=function t(){if(this.x=null,this.y=null,this.z=null,0===arguments.length)this.x=0,this.y=0,this.z=t.NULL_ORDINATE;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.z=e.z}else 2===arguments.length?(this.x=arguments[0],this.y=arguments[1],this.z=t.NULL_ORDINATE):3===arguments.length&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},S={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};C.prototype.setOrdinate=function(t,e){switch(t){case C.X:this.x=e;break;case C.Y:this.y=e;break;case C.Z:this.z=e;break;default:throw new m(\"Invalid ordinate index: \"+t)}},C.prototype.equals2D=function(){if(1===arguments.length){var t=arguments[0];return this.x===t.x&&this.y===t.y}if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!_.equalsWithTolerance(this.x,e.x,n)&&!!_.equalsWithTolerance(this.y,e.y,n)}},C.prototype.getOrdinate=function(t){switch(t){case C.X:return this.x;case C.Y:return this.y;case C.Z:return this.z}throw new m(\"Invalid ordinate index: \"+t)},C.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||v.isNaN(this.z))&&v.isNaN(t.z)},C.prototype.equals=function(t){return t instanceof C&&this.equals2D(t)},C.prototype.equalInZ=function(t,e){return _.equalsWithTolerance(this.z,t.z,e)},C.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},C.prototype.clone=function(){},C.prototype.copy=function(){return new C(this)},C.prototype.toString=function(){return\"(\"+this.x+\", \"+this.y+\", \"+this.z+\")\"},C.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return Math.sqrt(e*e+n*n+i*i)},C.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},C.prototype.hashCode=function(){var t=17;return t=37*t+C.hashCode(this.x),t=37*t+C.hashCode(this.y)},C.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},C.prototype.interfaces_=function(){return[E,x,e]},C.prototype.getClass=function(){return C},C.hashCode=function(){if(1===arguments.length){var t=arguments[0],e=v.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},S.DimensionalComparator.get=function(){return L},S.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},S.NULL_ORDINATE.get=function(){return v.NaN},S.X.get=function(){return 0},S.Y.get=function(){return 1},S.Z.get=function(){return 2},Object.defineProperties(C,S);var L=function(t){if(this._dimensionsToTest=2,0===arguments.length);else if(1===arguments.length){var e=arguments[0];if(2!==e&&3!==e)throw new m(\"only 2 or 3 dimensions may be specified\");this._dimensionsToTest=e}};L.prototype.compare=function(t,e){var n=t,i=e,r=L.compare(n.x,i.x);if(0!==r)return r;var o=L.compare(n.y,i.y);if(0!==o)return o;if(this._dimensionsToTest<=2)return 0;return L.compare(n.z,i.z)},L.prototype.interfaces_=function(){return[N]},L.prototype.getClass=function(){return L},L.compare=function(t,e){return t<e?-1:t>e?1:v.isNaN(t)?v.isNaN(e)?0:-1:v.isNaN(e)?1:0};var b=function(){};b.prototype.create=function(){},b.prototype.interfaces_=function(){return[]},b.prototype.getClass=function(){return b};var w=function(){},O={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};w.prototype.interfaces_=function(){return[]},w.prototype.getClass=function(){return w},w.toLocationSymbol=function(t){switch(t){case w.EXTERIOR:return\"e\";case w.BOUNDARY:return\"b\";case w.INTERIOR:return\"i\";case w.NONE:return\"-\"}throw new m(\"Unknown location value: \"+t)},O.INTERIOR.get=function(){return 0},O.BOUNDARY.get=function(){return 1},O.EXTERIOR.get=function(){return 2},O.NONE.get=function(){return-1},Object.defineProperties(w,O);var T=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},R=function(){},P={LOG_10:{configurable:!0}};R.prototype.interfaces_=function(){return[]},R.prototype.getClass=function(){return R},R.log10=function(t){var e=Math.log(t);return v.isInfinite(e)?e:v.isNaN(e)?e:e/R.LOG_10},R.min=function(t,e,n,i){var r=t;return e<r&&(r=e),n<r&&(r=n),i<r&&(r=i),r},R.clamp=function(){if(\"number\"==typeof arguments[2]&&\"number\"==typeof arguments[0]&&\"number\"==typeof arguments[1]){var t=arguments[0],e=arguments[1],n=arguments[2];return t<e?e:t>n?n:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],r=arguments[1],o=arguments[2];return i<r?r:i>o?o:i}},R.wrap=function(t,e){return t<0?e- -t%e:t%e},R.max=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],i=t;return e>i&&(i=e),n>i&&(i=n),i}if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3],u=r;return o>u&&(u=o),s>u&&(u=s),a>u&&(u=a),u}},R.average=function(t,e){return(t+e)/2},P.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(R,P);var D=function(t){this.str=t};D.prototype.append=function(t){this.str+=t},D.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},D.prototype.toString=function(t){return this.str};var M=function(t){this.value=t};M.prototype.intValue=function(){return this.value},M.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},M.isNaN=function(t){return Number.isNaN(t)};var A=function(){};A.isWhitespace=function(t){return t<=32&&t>=0||127===t},A.toUpperCase=function(t){return t.toUpperCase()};var F=function t(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length){if(\"number\"==typeof arguments[0]){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}else if(\"string\"==typeof arguments[0]){var i=arguments[0];t.call(this,t.parse(i))}}else if(2===arguments.length){var r=arguments[0],o=arguments[1];this.init(r,o)}},G={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};F.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},F.prototype.extractSignificantDigits=function(t,e){var n=this.abs(),i=F.magnitude(n._hi),r=F.TEN.pow(i);(n=n.divide(r)).gt(F.TEN)?(n=n.divide(F.TEN),i+=1):n.lt(F.ONE)&&(n=n.multiply(F.TEN),i-=1);for(var o=i+1,s=new D,a=F.MAX_PRINT_DIGITS-1,u=0;u<=a;u++){t&&u===o&&s.append(\".\");var l=Math.trunc(n._hi);if(l<0)break;var c=!1,p=0;l>9?(c=!0,p=\"9\"):p=\"0\"+l,s.append(p),n=n.subtract(F.valueOf(l)).multiply(F.TEN),c&&n.selfAdd(F.TEN);var h=!0,f=F.magnitude(n._hi);if(f<0&&Math.abs(f)>=a-u&&(h=!1),!h)break}return e[0]=i,s.toString()},F.prototype.sqr=function(){return this.multiply(this)},F.prototype.doubleValue=function(){return this._hi+this._lo},F.prototype.subtract=function(){if(arguments[0]instanceof F){var t=arguments[0];return this.add(t.negate())}if(\"number\"==typeof arguments[0]){var e=arguments[0];return this.add(-e)}},F.prototype.equals=function(){if(1===arguments.length){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},F.prototype.isZero=function(){return 0===this._hi&&0===this._lo},F.prototype.selfSubtract=function(){if(arguments[0]instanceof F){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}if(\"number\"==typeof arguments[0]){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},F.prototype.getSpecialNumberString=function(){return this.isZero()?\"0.0\":this.isNaN()?\"NaN \":null},F.prototype.min=function(t){return this.le(t)?this:t},F.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof F){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}if(\"number\"==typeof arguments[0]){var e=arguments[0];return this.selfDivide(e,0)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1],r=null,o=null,s=null,a=null,u=null,l=null,c=null,p=null;return u=this._hi/n,l=F.SPLIT*u,r=l-u,p=F.SPLIT*n,r=l-r,o=u-r,s=p-n,c=u*n,s=p-s,a=n-s,p=r*s-c+r*a+o*s+o*a,l=(this._hi-c-p+this._lo-u*i)/n,p=u+l,this._hi=p,this._lo=u-p+l,this}},F.prototype.dump=function(){return\"DD<\"+this._hi+\", \"+this._lo+\">\"},F.prototype.divide=function(){if(arguments[0]instanceof F){var t=arguments[0],e=null,n=null,i=null,r=null,o=null,s=null,a=null,u=null;n=(o=this._hi/t._hi)-(e=(s=F.SPLIT*o)-(e=s-o)),u=e*(i=(u=F.SPLIT*t._hi)-(i=u-t._hi))-(a=o*t._hi)+e*(r=t._hi-i)+n*i+n*r,s=(this._hi-a-u+this._lo-o*t._lo)/t._hi;return new F(u=o+s,o-u+s)}if(\"number\"==typeof arguments[0]){var l=arguments[0];return v.isNaN(l)?F.createNaN():F.copy(this).selfDivide(l,0)}},F.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},F.prototype.pow=function(t){if(0===t)return F.valueOf(1);var e=new F(this),n=F.valueOf(1),i=Math.abs(t);if(i>1)for(;i>0;)i%2==1&&n.selfMultiply(e),(i/=2)>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},F.prototype.ceil=function(){if(this.isNaN())return F.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new F(t,e)},F.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},F.prototype.rint=function(){if(this.isNaN())return this;return this.add(.5).floor()},F.prototype.setValue=function(){if(arguments[0]instanceof F){var t=arguments[0];return this.init(t),this}if(\"number\"==typeof arguments[0]){var e=arguments[0];return this.init(e),this}},F.prototype.max=function(t){return this.ge(t)?this:t},F.prototype.sqrt=function(){if(this.isZero())return F.valueOf(0);if(this.isNegative())return F.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=F.valueOf(e),i=this.subtract(n.sqr())._hi*(.5*t);return n.add(i)},F.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof F){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}if(\"number\"==typeof arguments[0]){var e=arguments[0],n=null,i=null,r=null,o=null,s=null,a=null;return r=this._hi+e,s=r-this._hi,o=r-s,o=e-s+(this._hi-o),a=o+this._lo,n=r+a,i=a+(r-n),this._hi=n+i,this._lo=i+(n-this._hi),this}}else if(2===arguments.length){var u=arguments[0],l=arguments[1],c=null,p=null,h=null,f=null,g=null,d=null,y=null;f=this._hi+u,p=this._lo+l,g=f-(d=f-this._hi),h=p-(y=p-this._lo);var _=(c=f+(d=(g=u-d+(this._hi-g))+p))+(d=(h=l-y+(this._lo-h))+(d+(f-c))),m=d+(c-_);return this._hi=_,this._lo=m,this}},F.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof F){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}if(\"number\"==typeof arguments[0]){var e=arguments[0];return this.selfMultiply(e,0)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1],r=null,o=null,s=null,a=null,u=null,l=null;r=(u=F.SPLIT*this._hi)-this._hi,l=F.SPLIT*n,r=u-r,o=this._hi-r,s=l-n;var c=(u=this._hi*n)+(l=r*(s=l-s)-u+r*(a=n-s)+o*s+o*a+(this._hi*i+this._lo*n)),p=l+(r=u-c);return this._hi=c,this._lo=p,this}},F.prototype.selfSqr=function(){return this.selfMultiply(this)},F.prototype.floor=function(){if(this.isNaN())return F.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new F(t,e)},F.prototype.negate=function(){return this.isNaN()?this:new F(-this._hi,-this._lo)},F.prototype.clone=function(){},F.prototype.multiply=function(){if(arguments[0]instanceof F){var t=arguments[0];return t.isNaN()?F.createNaN():F.copy(this).selfMultiply(t)}if(\"number\"==typeof arguments[0]){var e=arguments[0];return v.isNaN(e)?F.createNaN():F.copy(this).selfMultiply(e,0)}},F.prototype.isNaN=function(){return v.isNaN(this._hi)},F.prototype.intValue=function(){return Math.trunc(this._hi)},F.prototype.toString=function(){var t=F.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},F.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),i=e[0]+1,r=n;if(\".\"===n.charAt(0))r=\"0\"+n;else if(i<0)r=\"0.\"+F.stringOfChar(\"0\",-i)+n;else if(-1===n.indexOf(\".\")){var o=i-n.length;r=n+F.stringOfChar(\"0\",o)+\".0\"}return this.isNegative()?\"-\"+r:r},F.prototype.reciprocal=function(){var t=null,e=null,n=null,i=null,r=null,o=null,s=null,a=null;e=(r=1/this._hi)-(t=(o=F.SPLIT*r)-(t=o-r)),n=(a=F.SPLIT*this._hi)-this._hi;var u=r+(o=(1-(s=r*this._hi)-(a=t*(n=a-n)-s+t*(i=this._hi-n)+e*n+e*i)-r*this._lo)/this._hi);return new F(u,r-u+o)},F.prototype.toSciNotation=function(){if(this.isZero())return F.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),i=F.SCI_NOT_EXPONENT_CHAR+e[0];if(\"0\"===n.charAt(0))throw new Error(\"Found leading zero: \"+n);var r=\"\";n.length>1&&(r=n.substring(1));var o=n.charAt(0)+\".\"+r;return this.isNegative()?\"-\"+o+i:o+i},F.prototype.abs=function(){return this.isNaN()?F.NaN:this.isNegative()?this.negate():new F(this)},F.prototype.isPositive=function(){return(this._hi>0||0===this._hi)&&this._lo>0},F.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},F.prototype.add=function(){if(arguments[0]instanceof F){var t=arguments[0];return F.copy(this).selfAdd(t)}if(\"number\"==typeof arguments[0]){var e=arguments[0];return F.copy(this).selfAdd(e)}},F.prototype.init=function(){if(1===arguments.length){if(\"number\"==typeof arguments[0]){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof F){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this._hi=n,this._lo=i}},F.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},F.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},F.prototype.trunc=function(){return this.isNaN()?F.NaN:this.isPositive()?this.floor():this.ceil()},F.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},F.prototype.interfaces_=function(){return[e,E,x]},F.prototype.getClass=function(){return F},F.sqr=function(t){return F.valueOf(t).selfMultiply(t)},F.valueOf=function(){if(\"string\"==typeof arguments[0]){var t=arguments[0];return F.parse(t)}if(\"number\"==typeof arguments[0]){var e=arguments[0];return new F(e)}},F.sqrt=function(t){return F.valueOf(t).sqrt()},F.parse=function(t){for(var e=0,n=t.length;A.isWhitespace(t.charAt(e));)e++;var i=!1;if(e<n){var r=t.charAt(e);\"-\"!==r&&\"+\"!==r||(e++,\"-\"===r&&(i=!0))}for(var o=new F,s=0,a=0,u=0;!(e>=n);){var l=t.charAt(e);if(e++,A.isDigit(l)){var c=l-\"0\";o.selfMultiply(F.TEN),o.selfAdd(c),s++}else{if(\".\"!==l){if(\"e\"===l||\"E\"===l){var p=t.substring(e);try{u=M.parseInt(p)}catch(e){throw e instanceof Error?new Error(\"Invalid exponent \"+p+\" in string \"+t):e}break}throw new Error(\"Unexpected character '\"+l+\"' at position \"+e+\" in string \"+t)}a=s}}var h=o,f=s-a-u;if(0===f)h=o;else if(f>0){var g=F.TEN.pow(f);h=o.divide(g)}else if(f<0){var d=F.TEN.pow(-f);h=o.multiply(d)}return i?h.negate():h},F.createNaN=function(){return new F(v.NaN,v.NaN)},F.copy=function(t){return new F(t)},F.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),i=Math.trunc(Math.floor(n));return 10*Math.pow(10,i)<=e&&(i+=1),i},F.stringOfChar=function(t,e){for(var n=new D,i=0;i<e;i++)n.append(t);return n.toString()},G.PI.get=function(){return new F(3.141592653589793,1.2246467991473532e-16)},G.TWO_PI.get=function(){return new F(6.283185307179586,2.4492935982947064e-16)},G.PI_2.get=function(){return new F(1.5707963267948966,6.123233995736766e-17)},G.E.get=function(){return new F(2.718281828459045,1.4456468917292502e-16)},G.NaN.get=function(){return new F(v.NaN,v.NaN)},G.EPS.get=function(){return 1.23259516440783e-32},G.SPLIT.get=function(){return 134217729},G.MAX_PRINT_DIGITS.get=function(){return 32},G.TEN.get=function(){return F.valueOf(10)},G.ONE.get=function(){return F.valueOf(1)},G.SCI_NOT_EXPONENT_CHAR.get=function(){return\"E\"},G.SCI_NOT_ZERO.get=function(){return\"0.0E0\"},Object.defineProperties(F,G);var q=function(){},B={DP_SAFE_EPSILON:{configurable:!0}};q.prototype.interfaces_=function(){return[]},q.prototype.getClass=function(){return q},q.orientationIndex=function(t,e,n){var i=q.orientationIndexFilter(t,e,n);if(i<=1)return i;var r=F.valueOf(e.x).selfAdd(-t.x),o=F.valueOf(e.y).selfAdd(-t.y),s=F.valueOf(n.x).selfAdd(-e.x),a=F.valueOf(n.y).selfAdd(-e.y);return r.selfMultiply(a).selfSubtract(o.selfMultiply(s)).signum()},q.signOfDet2x2=function(t,e,n,i){return t.multiply(i).selfSubtract(e.multiply(n)).signum()},q.intersection=function(t,e,n,i){var r=F.valueOf(i.y).selfSubtract(n.y).selfMultiply(F.valueOf(e.x).selfSubtract(t.x)),o=F.valueOf(i.x).selfSubtract(n.x).selfMultiply(F.valueOf(e.y).selfSubtract(t.y)),s=r.subtract(o),a=F.valueOf(i.x).selfSubtract(n.x).selfMultiply(F.valueOf(t.y).selfSubtract(n.y)),u=F.valueOf(i.y).selfSubtract(n.y).selfMultiply(F.valueOf(t.x).selfSubtract(n.x)),l=a.subtract(u).selfDivide(s).doubleValue(),c=F.valueOf(t.x).selfAdd(F.valueOf(e.x).selfSubtract(t.x).selfMultiply(l)).doubleValue(),p=F.valueOf(e.x).selfSubtract(t.x).selfMultiply(F.valueOf(t.y).selfSubtract(n.y)),h=F.valueOf(e.y).selfSubtract(t.y).selfMultiply(F.valueOf(t.x).selfSubtract(n.x)),f=p.subtract(h).selfDivide(s).doubleValue(),g=F.valueOf(n.y).selfAdd(F.valueOf(i.y).selfSubtract(n.y).selfMultiply(f)).doubleValue();return new C(c,g)},q.orientationIndexFilter=function(t,e,n){var i=null,r=(t.x-n.x)*(e.y-n.y),o=(t.y-n.y)*(e.x-n.x),s=r-o;if(r>0){if(o<=0)return q.signum(s);i=r+o}else{if(!(r<0))return q.signum(s);if(o>=0)return q.signum(s);i=-r-o}var a=q.DP_SAFE_EPSILON*i;return s>=a||-s>=a?q.signum(s):2},q.signum=function(t){return t>0?1:t<0?-1:0},B.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(q,B);var V=function(){},U={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};U.X.get=function(){return 0},U.Y.get=function(){return 1},U.Z.get=function(){return 2},U.M.get=function(){return 3},V.prototype.setOrdinate=function(t,e,n){},V.prototype.size=function(){},V.prototype.getOrdinate=function(t,e){},V.prototype.getCoordinate=function(){},V.prototype.getCoordinateCopy=function(t){},V.prototype.getDimension=function(){},V.prototype.getX=function(t){},V.prototype.clone=function(){},V.prototype.expandEnvelope=function(t){},V.prototype.copy=function(){},V.prototype.getY=function(t){},V.prototype.toCoordinateArray=function(){},V.prototype.interfaces_=function(){return[x]},V.prototype.getClass=function(){return V},Object.defineProperties(V,U);var z=function(){},X=function(t){function e(){t.call(this,\"Projective point not representable on the Cartesian plane.\")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(z),Y=function(){};Y.arraycopy=function(t,e,n,i,r){for(var o=0,s=e;s<e+r;s++)n[i+o]=t[s],o++},Y.getProperty=function(t){return{\"line.separator\":\"\\n\"}[t]};var k=function t(){if(this.x=null,this.y=null,this.w=null,0===arguments.length)this.x=0,this.y=0,this.w=1;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.w=1}else if(2===arguments.length){if(\"number\"==typeof arguments[0]&&\"number\"==typeof arguments[1]){var n=arguments[0],i=arguments[1];this.x=n,this.y=i,this.w=1}else if(arguments[0]instanceof t&&arguments[1]instanceof t){var r=arguments[0],o=arguments[1];this.x=r.y*o.w-o.y*r.w,this.y=o.x*r.w-r.x*o.w,this.w=r.x*o.y-o.x*r.y}else if(arguments[0]instanceof C&&arguments[1]instanceof C){var s=arguments[0],a=arguments[1];this.x=s.y-a.y,this.y=a.x-s.x,this.w=s.x*a.y-a.x*s.y}}else if(3===arguments.length){var u=arguments[0],l=arguments[1],c=arguments[2];this.x=u,this.y=l,this.w=c}else if(4===arguments.length){var p=arguments[0],h=arguments[1],f=arguments[2],g=arguments[3],d=p.y-h.y,y=h.x-p.x,_=p.x*h.y-h.x*p.y,m=f.y-g.y,v=g.x-f.x,I=f.x*g.y-g.x*f.y;this.x=y*I-v*_,this.y=m*_-d*I,this.w=d*v-m*y}};k.prototype.getY=function(){var t=this.y/this.w;if(v.isNaN(t)||v.isInfinite(t))throw new X;return t},k.prototype.getX=function(){var t=this.x/this.w;if(v.isNaN(t)||v.isInfinite(t))throw new X;return t},k.prototype.getCoordinate=function(){var t=new C;return t.x=this.getX(),t.y=this.getY(),t},k.prototype.interfaces_=function(){return[]},k.prototype.getClass=function(){return k},k.intersection=function(t,e,n,i){var r=t.y-e.y,o=e.x-t.x,s=t.x*e.y-e.x*t.y,a=n.y-i.y,u=i.x-n.x,l=n.x*i.y-i.x*n.y,c=r*u-a*o,p=(o*l-u*s)/c,h=(a*s-r*l)/c;if(v.isNaN(p)||v.isInfinite(p)||v.isNaN(h)||v.isInfinite(h))throw new X;return new C(p,h)};var j=function t(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,0===arguments.length)this.init();else if(1===arguments.length){if(arguments[0]instanceof C){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}}else if(2===arguments.length){var i=arguments[0],r=arguments[1];this.init(i.x,r.x,i.y,r.y)}else if(4===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2],u=arguments[3];this.init(o,s,a,u)}},H={serialVersionUID:{configurable:!0}};j.prototype.getArea=function(){return this.getWidth()*this.getHeight()},j.prototype.equals=function(t){if(!(t instanceof j))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},j.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new j;var e=this._minx>t._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,i=this._maxx<t._maxx?this._maxx:t._maxx,r=this._maxy<t._maxy?this._maxy:t._maxy;return new j(e,i,n,r)},j.prototype.isNull=function(){return this._maxx<this._minx},j.prototype.getMaxX=function(){return this._maxx},j.prototype.covers=function(){if(1===arguments.length){if(arguments[0]instanceof C){var t=arguments[0];return this.covers(t.x,t.y)}if(arguments[0]instanceof j){var e=arguments[0];return!this.isNull()&&!e.isNull()&&(e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return!this.isNull()&&(n>=this._minx&&n<=this._maxx&&i>=this._miny&&i<=this._maxy)}},j.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof j){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}if(arguments[0]instanceof C){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return!this.isNull()&&!(n>this._maxx||n<this._minx||i>this._maxy||i<this._miny)}},j.prototype.getMinY=function(){return this._miny},j.prototype.getMinX=function(){return this._minx},j.prototype.expandToInclude=function(){if(1===arguments.length){if(arguments[0]instanceof C){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof j){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=i,this._maxy=i):(n<this._minx&&(this._minx=n),n>this._maxx&&(this._maxx=n),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}},j.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},j.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},j.prototype.compareTo=function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},j.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},j.prototype.toString=function(){return\"Env[\"+this._minx+\" : \"+this._maxx+\", \"+this._miny+\" : \"+this._maxy+\"]\"},j.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},j.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},j.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},j.prototype.expandBy=function(){if(1===arguments.length){var t=arguments[0];this.expandBy(t,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},j.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof j){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof C){var e=arguments[0];return this.covers(e)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return this.covers(n,i)}},j.prototype.centre=function(){return this.isNull()?null:new C((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},j.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof C){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof j){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];r<o?(this._minx=r,this._maxx=o):(this._minx=o,this._maxx=r),s<a?(this._miny=s,this._maxy=a):(this._miny=a,this._maxy=s)}},j.prototype.getMaxY=function(){return this._maxy},j.prototype.distance=function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxy<t._miny?n=t._miny-this._maxy:this._miny>t._maxy&&(n=this._miny-t._maxy),0===e?n:0===n?e:Math.sqrt(e*e+n*n)},j.prototype.hashCode=function(){var t=17;return t=37*t+C.hashCode(this._minx),t=37*t+C.hashCode(this._maxx),t=37*t+C.hashCode(this._miny),t=37*t+C.hashCode(this._maxy)},j.prototype.interfaces_=function(){return[E,e]},j.prototype.getClass=function(){return j},j.intersects=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.x<e.x?t.x:e.x)&&n.x<=(t.x>e.x?t.x:e.x)&&n.y>=(t.y<e.y?t.y:e.y)&&n.y<=(t.y>e.y?t.y:e.y)}if(4===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2],s=arguments[3],a=Math.min(o.x,s.x),u=Math.max(o.x,s.x),l=Math.min(i.x,r.x),c=Math.max(i.x,r.x);return!(l>u)&&(!(c<a)&&(a=Math.min(o.y,s.y),u=Math.max(o.y,s.y),l=Math.min(i.y,r.y),c=Math.max(i.y,r.y),!(l>u)&&!(c<a)))}},H.serialVersionUID.get=function(){return 0x51845cd552189800},Object.defineProperties(j,H);var W={typeStr:/^\\s*(\\w+)\\s*\\(\\s*(.*)\\s*\\)\\s*$/,emptyTypeStr:/^\\s*(\\w+)\\s*EMPTY\\s*$/,spaces:/\\s+/,parenComma:/\\)\\s*,\\s*\\(/,doubleParenComma:/\\)\\s*\\)\\s*,\\s*\\(\\s*\\(/,trimParens:/^\\s*\\(?(.*?)\\)?\\s*$/},K=function(t){this.geometryFactory=t||new _e};K.prototype.read=function(t){var e,n,i;t=t.replace(/[\\n\\r]/g,\" \");var r=W.typeStr.exec(t);if(-1!==t.search(\"EMPTY\")&&((r=W.emptyTypeStr.exec(t))[2]=void 0),r&&(n=r[1].toLowerCase(),i=r[2],Q[n]&&(e=Q[n].apply(this,[i]))),void 0===e)throw new Error(\"Could not parse WKT \"+t);return e},K.prototype.write=function(t){return this.extractGeometry(t)},K.prototype.extractGeometry=function(t){var e=t.getGeometryType().toLowerCase();if(!J[e])return null;var n=e.toUpperCase();return t.isEmpty()?n+\" EMPTY\":n+\"(\"+J[e].apply(this,[t])+\")\"};var J={coordinate:function(t){return t.x+\" \"+t.y},point:function(t){return J.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push(\"(\"+J.point.apply(this,[t._geometries[n]])+\")\");return e.join(\",\")},linestring:function(t){for(var e=[],n=0,i=t._points._coordinates.length;n<i;++n)e.push(J.coordinate.apply(this,[t._points._coordinates[n]]));return e.join(\",\")},linearring:function(t){for(var e=[],n=0,i=t._points._coordinates.length;n<i;++n)e.push(J.coordinate.apply(this,[t._points._coordinates[n]]));return e.join(\",\")},multilinestring:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push(\"(\"+J.linestring.apply(this,[t._geometries[n]])+\")\");return e.join(\",\")},polygon:function(t){var e=[];e.push(\"(\"+J.linestring.apply(this,[t._shell])+\")\");for(var n=0,i=t._holes.length;n<i;++n)e.push(\"(\"+J.linestring.apply(this,[t._holes[n]])+\")\");return e.join(\",\")},multipolygon:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push(\"(\"+J.polygon.apply(this,[t._geometries[n]])+\")\");return e.join(\",\")},geometrycollection:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push(this.extractGeometry(t._geometries[n]));return e.join(\",\")}},Q={point:function(t){if(void 0===t)return this.geometryFactory.createPoint();var e=t.trim().split(W.spaces);return this.geometryFactory.createPoint(new C(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){if(void 0===t)return this.geometryFactory.createMultiPoint();for(var e,n=t.trim().split(\",\"),i=[],r=0,o=n.length;r<o;++r)e=n[r].replace(W.trimParens,\"$1\"),i.push(Q.point.apply(this,[e]));return this.geometryFactory.createMultiPoint(i)},linestring:function(t){if(void 0===t)return this.geometryFactory.createLineString();for(var e,n=t.trim().split(\",\"),i=[],r=0,o=n.length;r<o;++r)e=n[r].trim().split(W.spaces),i.push(new C(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLineString(i)},linearring:function(t){if(void 0===t)return this.geometryFactory.createLinearRing();for(var e,n=t.trim().split(\",\"),i=[],r=0,o=n.length;r<o;++r)e=n[r].trim().split(W.spaces),i.push(new C(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLinearRing(i)},multilinestring:function(t){if(void 0===t)return this.geometryFactory.createMultiLineString();for(var e,n=t.trim().split(W.parenComma),i=[],r=0,o=n.length;r<o;++r)e=n[r].replace(W.trimParens,\"$1\"),i.push(Q.linestring.apply(this,[e]));return this.geometryFactory.createMultiLineString(i)},polygon:function(t){if(void 0===t)return this.geometryFactory.createPolygon();for(var e,n,i,r,o=t.trim().split(W.parenComma),s=[],a=0,u=o.length;a<u;++a)e=o[a].replace(W.trimParens,\"$1\"),n=Q.linestring.apply(this,[e]),i=this.geometryFactory.createLinearRing(n._points),0===a?r=i:s.push(i);return this.geometryFactory.createPolygon(r,s)},multipolygon:function(t){if(void 0===t)return this.geometryFactory.createMultiPolygon();for(var e,n=t.trim().split(W.doubleParenComma),i=[],r=0,o=n.length;r<o;++r)e=n[r].replace(W.trimParens,\"$1\"),i.push(Q.polygon.apply(this,[e]));return this.geometryFactory.createMultiPolygon(i)},geometrycollection:function(t){if(void 0===t)return this.geometryFactory.createGeometryCollection();for(var e=(t=t.replace(/,\\s*([A-Za-z])/g,\"|$1\")).trim().split(\"|\"),n=[],i=0,r=e.length;i<r;++i)n.push(this.read(e[i]));return this.geometryFactory.createGeometryCollection(n)}},Z=function(t){this.parser=new K(t)};Z.prototype.write=function(t){return this.parser.write(t)},Z.toLineString=function(t,e){if(2!==arguments.length)throw new Error(\"Not implemented\");return\"LINESTRING ( \"+t.x+\" \"+t.y+\", \"+e.x+\" \"+e.y+\" )\"};var $=function(t){function e(e){t.call(this,e),this.name=\"RuntimeException\",this.message=e,this.stack=(new t).stack}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),tt=function(t){function e(){if(t.call(this),0===arguments.length)t.call(this);else if(1===arguments.length){var e=arguments[0];t.call(this,e)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}($),et=function(){};et.prototype.interfaces_=function(){return[]},et.prototype.getClass=function(){return et},et.shouldNeverReachHere=function(){if(0===arguments.length)et.shouldNeverReachHere(null);else if(1===arguments.length){var t=arguments[0];throw new tt(\"Should never reach here\"+(null!==t?\": \"+t:\"\"))}},et.isTrue=function(){var t,e;if(1===arguments.length)t=arguments[0],et.isTrue(t,null);else if(2===arguments.length&&(t=arguments[0],e=arguments[1],!t))throw null===e?new tt:new tt(e)},et.equals=function(){var t,e,n;if(2===arguments.length)t=arguments[0],e=arguments[1],et.equals(t,e,null);else if(3===arguments.length&&(t=arguments[0],e=arguments[1],n=arguments[2],!e.equals(t)))throw new tt(\"Expected \"+t+\" but encountered \"+e+(null!==n?\": \"+n:\"\"))};var nt=function(){this._result=null,this._inputLines=Array(2).fill().map(function(){return Array(2)}),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new C,this._intPt[1]=new C,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},it={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};nt.prototype.getIndexAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},nt.prototype.getTopologySummary=function(){var t=new D;return this.isEndPoint()&&t.append(\" endpoint\"),this._isProper&&t.append(\" proper\"),this.isCollinear()&&t.append(\" collinear\"),t.toString()},nt.prototype.computeIntersection=function(t,e,n,i){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=n,this._inputLines[1][1]=i,this._result=this.computeIntersect(t,e,n,i)},nt.prototype.getIntersectionNum=function(){return this._result},nt.prototype.computeIntLineIndex=function(){if(0===arguments.length)null===this._intLineIndex&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(1===arguments.length){var t=arguments[0];this.getEdgeDistance(t,0)>this.getEdgeDistance(t,1)?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},nt.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},nt.prototype.setPrecisionModel=function(t){this._precisionModel=t},nt.prototype.isInteriorIntersection=function(){if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var t=arguments[0],e=0;e<this._result;e++)if(!this._intPt[e].equals2D(this._inputLines[t][0])&&!this._intPt[e].equals2D(this._inputLines[t][1]))return!0;return!1}},nt.prototype.getIntersection=function(t){return this._intPt[t]},nt.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},nt.prototype.hasIntersection=function(){return this._result!==nt.NO_INTERSECTION},nt.prototype.getEdgeDistance=function(t,e){return nt.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1])},nt.prototype.isCollinear=function(){return this._result===nt.COLLINEAR_INTERSECTION},nt.prototype.toString=function(){return Z.toLineString(this._inputLines[0][0],this._inputLines[0][1])+\" - \"+Z.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},nt.prototype.getEndpoint=function(t,e){return this._inputLines[t][e]},nt.prototype.isIntersection=function(t){for(var e=0;e<this._result;e++)if(this._intPt[e].equals2D(t))return!0;return!1},nt.prototype.getIntersectionAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},nt.prototype.interfaces_=function(){return[]},nt.prototype.getClass=function(){return nt},nt.computeEdgeDistance=function(t,e,n){var i=Math.abs(n.x-e.x),r=Math.abs(n.y-e.y),o=-1;if(t.equals(e))o=0;else if(t.equals(n))o=i>r?i:r;else{var s=Math.abs(t.x-e.x),a=Math.abs(t.y-e.y);0!==(o=i>r?s:a)||t.equals(e)||(o=Math.max(s,a))}return et.isTrue(!(0===o&&!t.equals(e)),\"Bad distance calculation\"),o},nt.nonRobustComputeEdgeDistance=function(t,e,n){var i=t.x-e.x,r=t.y-e.y,o=Math.sqrt(i*i+r*r);return et.isTrue(!(0===o&&!t.equals(e)),\"Invalid distance calculation\"),o},it.DONT_INTERSECT.get=function(){return 0},it.DO_INTERSECT.get=function(){return 1},it.COLLINEAR.get=function(){return 2},it.NO_INTERSECTION.get=function(){return 0},it.POINT_INTERSECTION.get=function(){return 1},it.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(nt,it);var rt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(t){var e=new j(this._inputLines[0][0],this._inputLines[0][1]),n=new j(this._inputLines[1][0],this._inputLines[1][1]);return e.contains(t)&&n.contains(t)},e.prototype.computeIntersection=function(){if(3!==arguments.length)return t.prototype.computeIntersection.apply(this,arguments);var e=arguments[0],n=arguments[1],i=arguments[2];if(this._isProper=!1,j.intersects(n,i,e)&&0===at.orientationIndex(n,i,e)&&0===at.orientationIndex(i,n,e))return this._isProper=!0,(e.equals(n)||e.equals(i))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION},e.prototype.normalizeToMinimum=function(t,e,n,i,r){r.x=this.smallestInAbsValue(t.x,e.x,n.x,i.x),r.y=this.smallestInAbsValue(t.y,e.y,n.y,i.y),t.x-=r.x,t.y-=r.y,e.x-=r.x,e.y-=r.y,n.x-=r.x,n.y-=r.y,i.x-=r.x,i.y-=r.y},e.prototype.safeHCoordinateIntersection=function(t,n,i,r){var o=null;try{o=k.intersection(t,n,i,r)}catch(s){if(!(s instanceof X))throw s;o=e.nearestEndpoint(t,n,i,r)}return o},e.prototype.intersection=function(t,n,i,r){var o=this.intersectionWithNormalization(t,n,i,r);return this.isInSegmentEnvelopes(o)||(o=new C(e.nearestEndpoint(t,n,i,r))),null!==this._precisionModel&&this._precisionModel.makePrecise(o),o},e.prototype.smallestInAbsValue=function(t,e,n,i){var r=t,o=Math.abs(r);return Math.abs(e)<o&&(r=e,o=Math.abs(e)),Math.abs(n)<o&&(r=n,o=Math.abs(n)),Math.abs(i)<o&&(r=i),r},e.prototype.checkDD=function(t,e,n,i,r){var o=q.intersection(t,e,n,i),s=this.isInSegmentEnvelopes(o);Y.out.println(\"DD in env = \"+s+\"  --------------------- \"+o),r.distance(o)>1e-4&&Y.out.println(\"Distance = \"+r.distance(o))},e.prototype.intersectionWithNormalization=function(t,e,n,i){var r=new C(t),o=new C(e),s=new C(n),a=new C(i),u=new C;this.normalizeToEnvCentre(r,o,s,a,u);var l=this.safeHCoordinateIntersection(r,o,s,a);return l.x+=u.x,l.y+=u.y,l},e.prototype.computeCollinearIntersection=function(e,n,i,r){var o=j.intersects(e,n,i),s=j.intersects(e,n,r),a=j.intersects(i,r,e),u=j.intersects(i,r,n);return o&&s?(this._intPt[0]=i,this._intPt[1]=r,t.COLLINEAR_INTERSECTION):a&&u?(this._intPt[0]=e,this._intPt[1]=n,t.COLLINEAR_INTERSECTION):o&&a?(this._intPt[0]=i,this._intPt[1]=e,!i.equals(e)||s||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):o&&u?(this._intPt[0]=i,this._intPt[1]=n,!i.equals(n)||s||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):s&&a?(this._intPt[0]=r,this._intPt[1]=e,!r.equals(e)||o||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):s&&u?(this._intPt[0]=r,this._intPt[1]=n,!r.equals(n)||o||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(t,e,n,i,r){var o=t.x<e.x?t.x:e.x,s=t.y<e.y?t.y:e.y,a=t.x>e.x?t.x:e.x,u=t.y>e.y?t.y:e.y,l=n.x<i.x?n.x:i.x,c=n.y<i.y?n.y:i.y,p=n.x>i.x?n.x:i.x,h=n.y>i.y?n.y:i.y,f=((o>l?o:l)+(a<p?a:p))/2,g=((s>c?s:c)+(u<h?u:h))/2;r.x=f,r.y=g,t.x-=r.x,t.y-=r.y,e.x-=r.x,e.y-=r.y,n.x-=r.x,n.y-=r.y,i.x-=r.x,i.y-=r.y},e.prototype.computeIntersect=function(e,n,i,r){if(this._isProper=!1,!j.intersects(e,n,i,r))return t.NO_INTERSECTION;var o=at.orientationIndex(e,n,i),s=at.orientationIndex(e,n,r);if(o>0&&s>0||o<0&&s<0)return t.NO_INTERSECTION;var a=at.orientationIndex(i,r,e),u=at.orientationIndex(i,r,n);if(a>0&&u>0||a<0&&u<0)return t.NO_INTERSECTION;return 0===o&&0===s&&0===a&&0===u?this.computeCollinearIntersection(e,n,i,r):(0===o||0===s||0===a||0===u?(this._isProper=!1,e.equals2D(i)||e.equals2D(r)?this._intPt[0]=e:n.equals2D(i)||n.equals2D(r)?this._intPt[0]=n:0===o?this._intPt[0]=new C(i):0===s?this._intPt[0]=new C(r):0===a?this._intPt[0]=new C(e):0===u&&(this._intPt[0]=new C(n))):(this._isProper=!0,this._intPt[0]=this.intersection(e,n,i,r)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(t,e,n,i){var r=t,o=at.distancePointLine(t,n,i),s=at.distancePointLine(e,n,i);return s<o&&(o=s,r=e),(s=at.distancePointLine(n,t,e))<o&&(o=s,r=n),(s=at.distancePointLine(i,t,e))<o&&(o=s,r=i),r},e}(nt),ot=function(){};ot.prototype.interfaces_=function(){return[]},ot.prototype.getClass=function(){return ot},ot.orientationIndex=function(t,e,n){var i=e.x-t.x,r=e.y-t.y,o=n.x-e.x,s=n.y-e.y;return ot.signOfDet2x2(i,r,o,s)},ot.signOfDet2x2=function(t,e,n,i){var r=null,o=null,s=null;if(r=1,0===t||0===i)return 0===e||0===n?0:e>0?n>0?-r:r:n>0?r:-r;if(0===e||0===n)return i>0?t>0?r:-r:t>0?-r:r;if(e>0?i>0?e<=i||(r=-r,o=t,t=n,n=o,o=e,e=i,i=o):e<=-i?(r=-r,n=-n,i=-i):(o=t,t=-n,n=o,o=e,e=-i,i=o):i>0?-e<=i?(r=-r,t=-t,e=-e):(o=-t,t=n,n=o,o=-e,e=i,i=o):e>=i?(t=-t,e=-e,n=-n,i=-i):(r=-r,o=-t,t=-n,n=o,o=-e,e=-i,i=o),t>0){if(!(n>0))return r;if(!(t<=n))return r}else{if(n>0)return-r;if(!(t>=n))return-r;r=-r,t=-t,n=-n}for(;;){if(s=Math.floor(n/t),n-=s*t,(i-=s*e)<0)return-r;if(i>e)return r;if(t>n+n){if(e<i+i)return r}else{if(e>i+i)return-r;n=t-n,i=e-i,r=-r}if(0===i)return 0===n?0:-r;if(0===n)return r;if(s=Math.floor(t/n),t-=s*n,(e-=s*i)<0)return r;if(e>i)return-r;if(n>t+t){if(i<e+e)return-r}else{if(i>e+e)return r;t=n-t,e=i-e,r=-r}if(0===e)return 0===t?0:r;if(0===t)return-r}};var st=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};st.prototype.countSegment=function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var n=t.x,i=e.x;return n>i&&(n=e.x,i=t.x),this._p.x>=n&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var r=t.x-this._p.x,o=t.y-this._p.y,s=e.x-this._p.x,a=e.y-this._p.y,u=ot.signOfDet2x2(r,o,s,a);if(0===u)return this._isPointOnSegment=!0,null;a<o&&(u=-u),u>0&&this._crossingCount++}},st.prototype.isPointInPolygon=function(){return this.getLocation()!==w.EXTERIOR},st.prototype.getLocation=function(){return this._isPointOnSegment?w.BOUNDARY:this._crossingCount%2==1?w.INTERIOR:w.EXTERIOR},st.prototype.isOnSegment=function(){return this._isPointOnSegment},st.prototype.interfaces_=function(){return[]},st.prototype.getClass=function(){return st},st.locatePointInRing=function(){if(arguments[0]instanceof C&&T(arguments[1],V)){for(var t=arguments[0],e=arguments[1],n=new st(t),i=new C,r=new C,o=1;o<e.size();o++)if(e.getCoordinate(o,i),e.getCoordinate(o-1,r),n.countSegment(i,r),n.isOnSegment())return n.getLocation();return n.getLocation()}if(arguments[0]instanceof C&&arguments[1]instanceof Array){for(var s=arguments[0],a=arguments[1],u=new st(s),l=1;l<a.length;l++){var c=a[l],p=a[l-1];if(u.countSegment(c,p),u.isOnSegment())return u.getLocation()}return u.getLocation()}};var at=function(){},ut={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at.orientationIndex=function(t,e,n){return q.orientationIndex(t,e,n)},at.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,n=t[0].x,i=1;i<t.length-1;i++){var r=t[i].x-n,o=t[i+1].y;e+=r*(t[i-1].y-o)}return e/2}if(T(arguments[0],V)){var s=arguments[0],a=s.size();if(a<3)return 0;var u=new C,l=new C,c=new C;s.getCoordinate(0,l),s.getCoordinate(1,c);var p=l.x;c.x-=p;for(var h=0,f=1;f<a-1;f++)u.y=l.y,l.x=c.x,l.y=c.y,s.getCoordinate(f+1,c),c.x-=p,h+=l.x*(u.y-c.y);return h/2}},at.distanceLineLine=function(t,e,n,i){if(t.equals(e))return at.distancePointLine(t,n,i);if(n.equals(i))return at.distancePointLine(i,t,e);var r=!1;if(j.intersects(t,e,n,i)){var o=(e.x-t.x)*(i.y-n.y)-(e.y-t.y)*(i.x-n.x);if(0===o)r=!0;else{var s=(t.y-n.y)*(i.x-n.x)-(t.x-n.x)*(i.y-n.y),a=((t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y))/o,u=s/o;(u<0||u>1||a<0||a>1)&&(r=!0)}}else r=!0;return r?R.min(at.distancePointLine(t,n,i),at.distancePointLine(e,n,i),at.distancePointLine(n,t,e),at.distancePointLine(i,t,e)):0},at.isPointInRing=function(t,e){return at.locatePointInRing(t,e)!==w.EXTERIOR},at.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,i=new C;t.getCoordinate(0,i);for(var r=i.x,o=i.y,s=1;s<e;s++){t.getCoordinate(s,i);var a=i.x,u=i.y,l=a-r,c=u-o;n+=Math.sqrt(l*l+c*c),r=a,o=u}return n},at.isCCW=function(t){var e=t.length-1;if(e<3)throw new m(\"Ring has fewer than 4 points, so orientation cannot be determined\");for(var n=t[0],i=0,r=1;r<=e;r++){var o=t[r];o.y>n.y&&(n=o,i=r)}var s=i;do{(s-=1)<0&&(s=e)}while(t[s].equals2D(n)&&s!==i);var a=i;do{a=(a+1)%e}while(t[a].equals2D(n)&&a!==i);var u=t[s],l=t[a];if(u.equals2D(n)||l.equals2D(n)||u.equals2D(l))return!1;var c=at.computeOrientation(u,n,l),p=!1;return p=0===c?u.x>l.x:c>0,p},at.locatePointInRing=function(t,e){return st.locatePointInRing(t,e)},at.distancePointLinePerpendicular=function(t,e,n){var i=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),r=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/i;return Math.abs(r)*Math.sqrt(i)},at.computeOrientation=function(t,e,n){return at.orientationIndex(t,e,n)},at.distancePointLine=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(0===e.length)throw new m(\"Line array must contain at least one vertex\");for(var n=t.distance(e[0]),i=0;i<e.length-1;i++){var r=at.distancePointLine(t,e[i],e[i+1]);r<n&&(n=r)}return n}if(3===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2];if(s.x===a.x&&s.y===a.y)return o.distance(s);var u=(a.x-s.x)*(a.x-s.x)+(a.y-s.y)*(a.y-s.y),l=((o.x-s.x)*(a.x-s.x)+(o.y-s.y)*(a.y-s.y))/u;if(l<=0)return o.distance(s);if(l>=1)return o.distance(a);var c=((s.y-o.y)*(a.x-s.x)-(s.x-o.x)*(a.y-s.y))/u;return Math.abs(c)*Math.sqrt(u)}},at.isOnLine=function(t,e){for(var n=new rt,i=1;i<e.length;i++){var r=e[i-1],o=e[i];if(n.computeIntersection(t,r,o),n.hasIntersection())return!0}return!1},ut.CLOCKWISE.get=function(){return-1},ut.RIGHT.get=function(){return at.CLOCKWISE},ut.COUNTERCLOCKWISE.get=function(){return 1},ut.LEFT.get=function(){return at.COUNTERCLOCKWISE},ut.COLLINEAR.get=function(){return 0},ut.STRAIGHT.get=function(){return at.COLLINEAR},Object.defineProperties(at,ut);var lt=function(){};lt.prototype.filter=function(t){},lt.prototype.interfaces_=function(){return[]},lt.prototype.getClass=function(){return lt};var ct=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},pt={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};ct.prototype.isGeometryCollection=function(){return this.getSortIndex()===ct.SORTINDEX_GEOMETRYCOLLECTION},ct.prototype.getFactory=function(){return this._factory},ct.prototype.getGeometryN=function(t){return this},ct.prototype.getArea=function(){return 0},ct.prototype.isRectangle=function(){return!1},ct.prototype.equals=function(){if(arguments[0]instanceof ct){var t=arguments[0];return null!==t&&this.equalsTopo(t)}if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof ct))return!1;var n=e;return this.equalsExact(n)}},ct.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)},ct.prototype.geometryChanged=function(){this.apply(ct.geometryChangedFilter)},ct.prototype.geometryChangedAction=function(){this._envelope=null},ct.prototype.equalsNorm=function(t){return null!==t&&this.norm().equalsExact(t.norm())},ct.prototype.getLength=function(){return 0},ct.prototype.getNumGeometries=function(){return 1},ct.prototype.compareTo=function(){if(1===arguments.length){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}if(2===arguments.length){var n=arguments[0],i=arguments[1];return this.getSortIndex()!==n.getSortIndex()?this.getSortIndex()-n.getSortIndex():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(n,i)}},ct.prototype.getUserData=function(){return this._userData},ct.prototype.getSRID=function(){return this._SRID},ct.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},ct.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===ct.SORTINDEX_GEOMETRYCOLLECTION)throw new m(\"This method does not support GeometryCollection arguments\")},ct.prototype.equal=function(t,e,n){return 0===n?t.equals(e):t.distance(e)<=n},ct.prototype.norm=function(){var t=this.copy();return t.normalize(),t},ct.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},ct.prototype.getEnvelopeInternal=function(){return null===this._envelope&&(this._envelope=this.computeEnvelopeInternal()),new j(this._envelope)},ct.prototype.setSRID=function(t){this._SRID=t},ct.prototype.setUserData=function(t){this._userData=t},ct.prototype.compare=function(t,e){for(var n=t.iterator(),i=e.iterator();n.hasNext()&&i.hasNext();){var r=n.next(),o=i.next(),s=r.compareTo(o);if(0!==s)return s}return n.hasNext()?1:i.hasNext()?-1:0},ct.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},ct.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===ct.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===ct.SORTINDEX_MULTIPOINT||this.getSortIndex()===ct.SORTINDEX_MULTILINESTRING||this.getSortIndex()===ct.SORTINDEX_MULTIPOLYGON},ct.prototype.interfaces_=function(){return[x,E,e]},ct.prototype.getClass=function(){return ct},ct.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},ct.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(null===t[e])return!0;return!1},pt.serialVersionUID.get=function(){return 0x799ea46522854c00},pt.SORTINDEX_POINT.get=function(){return 0},pt.SORTINDEX_MULTIPOINT.get=function(){return 1},pt.SORTINDEX_LINESTRING.get=function(){return 2},pt.SORTINDEX_LINEARRING.get=function(){return 3},pt.SORTINDEX_MULTILINESTRING.get=function(){return 4},pt.SORTINDEX_POLYGON.get=function(){return 5},pt.SORTINDEX_MULTIPOLYGON.get=function(){return 6},pt.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},pt.geometryChangedFilter.get=function(){return ht},Object.defineProperties(ct,pt);var ht=function(){};ht.interfaces_=function(){return[lt]},ht.filter=function(t){t.geometryChangedAction()};var ft=function(){};ft.prototype.filter=function(t){},ft.prototype.interfaces_=function(){return[]},ft.prototype.getClass=function(){return ft};var gt=function(){},dt={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};gt.prototype.isInBoundary=function(t){},gt.prototype.interfaces_=function(){return[]},gt.prototype.getClass=function(){return gt},dt.Mod2BoundaryNodeRule.get=function(){return yt},dt.EndPointBoundaryNodeRule.get=function(){return _t},dt.MultiValentEndPointBoundaryNodeRule.get=function(){return mt},dt.MonoValentEndPointBoundaryNodeRule.get=function(){return vt},dt.MOD2_BOUNDARY_RULE.get=function(){return new yt},dt.ENDPOINT_BOUNDARY_RULE.get=function(){return new _t},dt.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new mt},dt.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new vt},dt.OGC_SFS_BOUNDARY_RULE.get=function(){return gt.MOD2_BOUNDARY_RULE},Object.defineProperties(gt,dt);var yt=function(){};yt.prototype.isInBoundary=function(t){return t%2==1},yt.prototype.interfaces_=function(){return[gt]},yt.prototype.getClass=function(){return yt};var _t=function(){};_t.prototype.isInBoundary=function(t){return t>0},_t.prototype.interfaces_=function(){return[gt]},_t.prototype.getClass=function(){return _t};var mt=function(){};mt.prototype.isInBoundary=function(t){return t>1},mt.prototype.interfaces_=function(){return[gt]},mt.prototype.getClass=function(){return mt};var vt=function(){};vt.prototype.isInBoundary=function(t){return 1===t},vt.prototype.interfaces_=function(){return[gt]},vt.prototype.getClass=function(){return vt};var It=function(){};It.prototype.add=function(){},It.prototype.addAll=function(){},It.prototype.isEmpty=function(){},It.prototype.iterator=function(){},It.prototype.size=function(){},It.prototype.toArray=function(){},It.prototype.remove=function(){},(n.prototype=new Error).name=\"IndexOutOfBoundsException\";var Et=function(){};Et.prototype.hasNext=function(){},Et.prototype.next=function(){},Et.prototype.remove=function(){};var xt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(It);(i.prototype=new Error).name=\"NoSuchElementException\";var Nt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof It&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[t,It]},e.prototype.add=function(t){return 1===arguments.length?this.array_.push(t):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.set=function(t,e){var n=this.array_[t];return this.array_[t]=e,n},e.prototype.iterator=function(){return new Ct(this)},e.prototype.get=function(t){if(t<0||t>=this.size())throw new n;return this.array_[t]},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},e.prototype.remove=function(t){for(var e=!1,n=0,i=this.array_.length;n<i;n++)if(this.array_[n]===t){this.array_.splice(n,1),e=!0;break}return e},e}(xt),Ct=function(t){function e(e){t.call(this),this.arrayList_=e,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new i;return this.arrayList_.get(this.position_++)},e.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},e.prototype.set=function(t){return this.arrayList_.set(this.position_-1,t)},e.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},e}(Et),St=function(t){function e(){if(t.call(this),0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.ensureCapacity(e.length),this.add(e,!0)}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.ensureCapacity(n.length),this.add(n,i)}}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={coordArrayType:{configurable:!0}};return n.coordArrayType.get=function(){return new Array(0).fill(null)},e.prototype.getCoordinate=function(t){return this.get(t)},e.prototype.addAll=function(){if(2===arguments.length){for(var e=arguments[0],n=arguments[1],i=!1,r=e.iterator();r.hasNext();)this.add(r.next(),n),i=!0;return i}return t.prototype.addAll.apply(this,arguments)},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=0;n<this.size();n++)e.add(n,this.get(n).copy());return e},e.prototype.toCoordinateArray=function(){return this.toArray(e.coordArrayType)},e.prototype.add=function(){if(1===arguments.length){var e=arguments[0];t.prototype.add.call(this,e)}else if(2===arguments.length){if(arguments[0]instanceof Array&&\"boolean\"==typeof arguments[1]){var n=arguments[0],i=arguments[1];return this.add(n,i,!0),!0}if(arguments[0]instanceof C&&\"boolean\"==typeof arguments[1]){var r=arguments[0];if(!arguments[1]&&this.size()>=1){if(this.get(this.size()-1).equals2D(r))return null}t.prototype.add.call(this,r)}else if(arguments[0]instanceof Object&&\"boolean\"==typeof arguments[1]){var o=arguments[0],s=arguments[1];return this.add(o,s),!0}}else if(3===arguments.length){if(\"boolean\"==typeof arguments[2]&&arguments[0]instanceof Array&&\"boolean\"==typeof arguments[1]){var a=arguments[0],u=arguments[1];if(arguments[2])for(var l=0;l<a.length;l++)this.add(a[l],u);else for(var c=a.length-1;c>=0;c--)this.add(a[c],u);return!0}if(\"boolean\"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof C){var p=arguments[0],h=arguments[1];if(!arguments[2]){var f=this.size();if(f>0){if(p>0){if(this.get(p-1).equals2D(h))return null}if(p<f){if(this.get(p).equals2D(h))return null}}}t.prototype.add.call(this,p,h)}}else if(4===arguments.length){var g=arguments[0],d=arguments[1],y=arguments[2],_=arguments[3],m=1;y>_&&(m=-1);for(var v=y;v!==_;v+=m)this.add(g[v],d);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new C(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,n),e}(Nt),Lt=function(){},bt={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};bt.ForwardComparator.get=function(){return wt},bt.BidirectionalComparator.get=function(){return Ot},bt.coordArrayType.get=function(){return new Array(0).fill(null)},Lt.prototype.interfaces_=function(){return[]},Lt.prototype.getClass=function(){return Lt},Lt.isRing=function(t){return!(t.length<4)&&!!t[0].equals2D(t[t.length-1])},Lt.ptNotInList=function(t,e){for(var n=0;n<t.length;n++){var i=t[n];if(Lt.indexOf(i,e)<0)return i}return null},Lt.scroll=function(t,e){var n=Lt.indexOf(e,t);if(n<0)return null;var i=new Array(t.length).fill(null);Y.arraycopy(t,n,i,0,t.length-n),Y.arraycopy(t,0,i,t.length-n,n),Y.arraycopy(i,0,t,0,t.length)},Lt.equals=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(null===t||null===e)return!1;if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].equals(e[n]))return!1;return!0}if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];if(i===r)return!0;if(null===i||null===r)return!1;if(i.length!==r.length)return!1;for(var s=0;s<i.length;s++)if(0!==o.compare(i[s],r[s]))return!1;return!0}},Lt.intersection=function(t,e){for(var n=new St,i=0;i<t.length;i++)e.intersects(t[i])&&n.add(t[i],!0);return n.toCoordinateArray()},Lt.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},Lt.removeRepeatedPoints=function(t){if(!Lt.hasRepeatedPoints(t))return t;return new St(t,!1).toCoordinateArray()},Lt.reverse=function(t){for(var e=t.length-1,n=Math.trunc(e/2),i=0;i<=n;i++){var r=t[i];t[i]=t[e-i],t[e-i]=r}},Lt.removeNull=function(t){for(var e=0,n=0;n<t.length;n++)null!==t[n]&&e++;var i=new Array(e).fill(null);if(0===e)return i;for(var r=0,o=0;o<t.length;o++)null!==t[o]&&(i[r++]=t[o]);return i},Lt.copyDeep=function(){if(1===arguments.length){for(var t=arguments[0],e=new Array(t.length).fill(null),n=0;n<t.length;n++)e[n]=new C(t[n]);return e}if(5===arguments.length)for(var i=arguments[0],r=arguments[1],o=arguments[2],s=arguments[3],a=arguments[4],u=0;u<a;u++)o[s+u]=new C(i[r+u])},Lt.isEqualReversed=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],r=e[t.length-n-1];if(0!==i.compareTo(r))return!1}return!0},Lt.envelope=function(t){for(var e=new j,n=0;n<t.length;n++)e.expandToInclude(t[n]);return e},Lt.toCoordinateArray=function(t){return t.toArray(Lt.coordArrayType)},Lt.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},Lt.indexOf=function(t,e){for(var n=0;n<e.length;n++)if(t.equals(e[n]))return n;return-1},Lt.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var n=t.length-1-e,i=t[e].compareTo(t[n]);if(0!==i)return i}return 1},Lt.compare=function(t,e){for(var n=0;n<t.length&&n<e.length;){var i=t[n].compareTo(e[n]);if(0!==i)return i;n++}return n<e.length?-1:n<t.length?1:0},Lt.minCoordinate=function(t){for(var e=null,n=0;n<t.length;n++)(null===e||e.compareTo(t[n])>0)&&(e=t[n]);return e},Lt.extract=function(t,e,n){e=R.clamp(e,0,t.length);var i=(n=R.clamp(n,-1,t.length))-e+1;n<0&&(i=0),e>=t.length&&(i=0),n<e&&(i=0);var r=new Array(i).fill(null);if(0===i)return r;for(var o=0,s=e;s<=n;s++)r[o++]=t[s];return r},Object.defineProperties(Lt,bt);var wt=function(){};wt.prototype.compare=function(t,e){return Lt.compare(t,e)},wt.prototype.interfaces_=function(){return[N]},wt.prototype.getClass=function(){return wt};var Ot=function(){};Ot.prototype.compare=function(t,e){var n=t,i=e;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(0===n.length)return 0;var r=Lt.compare(n,i);return Lt.isEqualReversed(n,i)?0:r},Ot.prototype.OLDcompare=function(t,e){var n=t,i=e;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(0===n.length)return 0;for(var r=Lt.increasingDirection(n),o=Lt.increasingDirection(i),s=r>0?0:n.length-1,a=o>0?0:n.length-1,u=0;u<n.length;u++){var l=n[s].compareTo(i[a]);if(0!==l)return l;s+=r,a+=o}return 0},Ot.prototype.interfaces_=function(){return[N]},Ot.prototype.getClass=function(){return Ot};var Tt=function(){};Tt.prototype.get=function(){},Tt.prototype.put=function(){},Tt.prototype.size=function(){},Tt.prototype.values=function(){},Tt.prototype.entrySet=function(){};var Rt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Tt);(r.prototype=new Error).name=\"OperationNotSupported\",(o.prototype=new It).contains=function(){};var Pt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof It&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contains=function(t){for(var e=0,n=this.array_.length;e<n;e++){if(this.array_[e]===t)return!0}return!1},e.prototype.add=function(t){return!this.contains(t)&&(this.array_.push(t),!0)},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.remove=function(t){throw new Error},e.prototype.size=function(){return this.array_.length},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},e.prototype.iterator=function(){return new Dt(this)},e}(o),Dt=function(t){function e(e){t.call(this),this.hashSet_=e,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new i;return this.hashSet_.array_[this.position_++]},e.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},e.prototype.remove=function(){throw new r},e}(Et),Mt=0;(p.prototype=new Rt).get=function(t){for(var e=this.root_;null!==e;){var n=t.compareTo(e.key);if(n<0)e=e.left;else{if(!(n>0))return e.value;e=e.right}}return null},p.prototype.put=function(t,e){if(null===this.root_)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:Mt,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,i,r=this.root_;do{if(n=r,(i=t.compareTo(r.key))<0)r=r.left;else{if(!(i>0)){var o=r.value;return r.value=e,o}r=r.right}}while(null!==r);var s={key:t,left:null,right:null,value:e,parent:n,color:Mt,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?n.left=s:n.right=s,this.fixAfterInsertion(s),this.size_++,null},p.prototype.fixAfterInsertion=function(t){for(t.color=1;null!=t&&t!==this.root_&&1===t.parent.color;)if(a(t)===l(a(a(t)))){var e=c(a(a(t)));1===s(e)?(u(a(t),Mt),u(e,Mt),u(a(a(t)),1),t=a(a(t))):(t===c(a(t))&&(t=a(t),this.rotateLeft(t)),u(a(t),Mt),u(a(a(t)),1),this.rotateRight(a(a(t))))}else{var n=l(a(a(t)));1===s(n)?(u(a(t),Mt),u(n,Mt),u(a(a(t)),1),t=a(a(t))):(t===l(a(t))&&(t=a(t),this.rotateRight(t)),u(a(t),Mt),u(a(a(t)),1),this.rotateLeft(a(a(t))))}this.root_.color=Mt},p.prototype.values=function(){var t=new Nt,e=this.getFirstEntry();if(null!==e)for(t.add(e.value);null!==(e=p.successor(e));)t.add(e.value);return t},p.prototype.entrySet=function(){var t=new Pt,e=this.getFirstEntry();if(null!==e)for(t.add(e);null!==(e=p.successor(e));)t.add(e);return t},p.prototype.rotateLeft=function(t){if(null!=t){var e=t.right;t.right=e.left,null!=e.left&&(e.left.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}},p.prototype.rotateRight=function(t){if(null!=t){var e=t.left;t.left=e.right,null!=e.right&&(e.right.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}},p.prototype.getFirstEntry=function(){var t=this.root_;if(null!=t)for(;null!=t.left;)t=t.left;return t},p.successor=function(t){if(null===t)return null;if(null!==t.right){for(var e=t.right;null!==e.left;)e=e.left;return e}for(var n=t.parent,i=t;null!==n&&i===n.right;)i=n,n=n.parent;return n},p.prototype.size=function(){return this.size_};var At=function(){};At.prototype.interfaces_=function(){return[]},At.prototype.getClass=function(){return At},h.prototype=new o,(f.prototype=new h).contains=function(t){for(var e=0,n=this.array_.length;e<n;e++){if(0===this.array_[e].compareTo(t))return!0}return!1},f.prototype.add=function(t){if(this.contains(t))return!1;for(var e=0,n=this.array_.length;e<n;e++){if(1===this.array_[e].compareTo(t))return this.array_.splice(e,0,t),!0}return this.array_.push(t),!0},f.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},f.prototype.remove=function(t){throw new r},f.prototype.size=function(){return this.array_.length},f.prototype.isEmpty=function(){return 0===this.array_.length},f.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},f.prototype.iterator=function(){return new Ft(this)};var Ft=function(t){this.treeSet_=t,this.position_=0};Ft.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new i;return this.treeSet_.array_[this.position_++]},Ft.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},Ft.prototype.remove=function(){throw new r};var Gt=function(){};Gt.sort=function(){var t,e,n,i,r=arguments[0];if(1===arguments.length)i=function(t,e){return t.compareTo(e)},r.sort(i);else if(2===arguments.length)n=arguments[1],i=function(t,e){return n.compare(t,e)},r.sort(i);else if(3===arguments.length){(e=r.slice(arguments[1],arguments[2])).sort();var o=r.slice(0,arguments[1]).concat(e,r.slice(arguments[2],r.length));for(r.splice(0,r.length),t=0;t<o.length;t++)r.push(o[t])}else if(4===arguments.length)for(e=r.slice(arguments[1],arguments[2]),n=arguments[3],i=function(t,e){return n.compare(t,e)},e.sort(i),o=r.slice(0,arguments[1]).concat(e,r.slice(arguments[2],r.length)),r.splice(0,r.length),t=0;t<o.length;t++)r.push(o[t])},Gt.asList=function(t){for(var e=new Nt,n=0,i=t.length;n<i;n++)e.add(t[n]);return e};var qt=function(){},Bt={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};Bt.P.get=function(){return 0},Bt.L.get=function(){return 1},Bt.A.get=function(){return 2},Bt.FALSE.get=function(){return-1},Bt.TRUE.get=function(){return-2},Bt.DONTCARE.get=function(){return-3},Bt.SYM_FALSE.get=function(){return\"F\"},Bt.SYM_TRUE.get=function(){return\"T\"},Bt.SYM_DONTCARE.get=function(){return\"*\"},Bt.SYM_P.get=function(){return\"0\"},Bt.SYM_L.get=function(){return\"1\"},Bt.SYM_A.get=function(){return\"2\"},qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt},qt.toDimensionSymbol=function(t){switch(t){case qt.FALSE:return qt.SYM_FALSE;case qt.TRUE:return qt.SYM_TRUE;case qt.DONTCARE:return qt.SYM_DONTCARE;case qt.P:return qt.SYM_P;case qt.L:return qt.SYM_L;case qt.A:return qt.SYM_A}throw new m(\"Unknown dimension value: \"+t)},qt.toDimensionValue=function(t){switch(A.toUpperCase(t)){case qt.SYM_FALSE:return qt.FALSE;case qt.SYM_TRUE:return qt.TRUE;case qt.SYM_DONTCARE:return qt.DONTCARE;case qt.SYM_P:return qt.P;case qt.SYM_L:return qt.L;case qt.SYM_A:return qt.A}throw new m(\"Unknown dimension symbol: \"+t)},Object.defineProperties(qt,Bt);var Vt=function(){};Vt.prototype.filter=function(t){},Vt.prototype.interfaces_=function(){return[]},Vt.prototype.getClass=function(){return Vt};var Ut=function(){};Ut.prototype.filter=function(t,e){},Ut.prototype.isDone=function(){},Ut.prototype.isGeometryChanged=function(){},Ut.prototype.interfaces_=function(){return[]},Ut.prototype.getClass=function(){return Ut};var zt=function(t){function e(e,n){if(t.call(this,n),this._geometries=e||[],t.hasNullElements(this._geometries))throw new m(\"geometries must not contain null elements\")}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){for(var t=new j,e=0;e<this._geometries.length;e++)t.expandToInclude(this._geometries[e].getEnvelopeInternal());return t},e.prototype.getGeometryN=function(t){return this._geometries[t]},e.prototype.getSortIndex=function(){return t.SORTINDEX_GEOMETRYCOLLECTION},e.prototype.getCoordinates=function(){for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=0;n<this._geometries.length;n++)for(var i=this._geometries[n].getCoordinates(),r=0;r<i.length;r++)t[++e]=i[r];return t},e.prototype.getArea=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getArea();return t},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var i=e;if(this._geometries.length!==i._geometries.length)return!1;for(var r=0;r<this._geometries.length;r++)if(!this._geometries[r].equalsExact(i._geometries[r],n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var t=0;t<this._geometries.length;t++)this._geometries[t].normalize();Gt.sort(this._geometries)},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},e.prototype.getBoundaryDimension=function(){for(var t=qt.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getBoundaryDimension());return t},e.prototype.getDimension=function(){for(var t=qt.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getDimension());return t},e.prototype.getLength=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getLength();return t},e.prototype.getNumPoints=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getNumPoints();return t},e.prototype.getNumGeometries=function(){return this._geometries.length},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createGeometryCollection(e)},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0],e=new f(Gt.asList(this._geometries)),n=new f(Gt.asList(t._geometries));return this.compare(e,n)}if(2===arguments.length){for(var i=arguments[0],r=arguments[1],o=i,s=this.getNumGeometries(),a=o.getNumGeometries(),u=0;u<s&&u<a;){var l=this.getGeometryN(u),c=o.getGeometryN(u),p=l.compareToSameClass(c,r);if(0!==p)return p;u++}return u<s?1:u<a?-1:0}},e.prototype.apply=function(){if(T(arguments[0],ft))for(var t=arguments[0],e=0;e<this._geometries.length;e++)this._geometries[e].apply(t);else if(T(arguments[0],Ut)){var n=arguments[0];if(0===this._geometries.length)return null;for(var i=0;i<this._geometries.length&&(this._geometries[i].apply(n),!n.isDone());i++);n.isGeometryChanged()&&this.geometryChanged()}else if(T(arguments[0],Vt)){var r=arguments[0];r.filter(this);for(var o=0;o<this._geometries.length;o++)this._geometries[o].apply(r)}else if(T(arguments[0],lt)){var s=arguments[0];s.filter(this);for(var a=0;a<this._geometries.length;a++)this._geometries[a].apply(s)}},e.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),et.shouldNeverReachHere(),null},e.prototype.clone=function(){var e=t.prototype.clone.call(this);e._geometries=new Array(this._geometries.length).fill(null);for(var n=0;n<this._geometries.length;n++)e._geometries[n]=this._geometries[n].clone();return e},e.prototype.getGeometryType=function(){return\"GeometryCollection\"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.isEmpty=function(){for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isEmpty())return!1;return!0},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x4f07bcb1f857d800},Object.defineProperties(e,n),e}(ct),Xt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTILINESTRING},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?qt.FALSE:0},e.prototype.isClosed=function(){if(this.isEmpty())return!1;for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isClosed())return!1;return!0},e.prototype.getDimension=function(){return 1},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[t-1-n]=this._geometries[n].reverse();return this.getFactory().createMultiLineString(e)},e.prototype.getBoundary=function(){return new Yt(this).getBoundary()},e.prototype.getGeometryType=function(){return\"MultiLineString\"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[At]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x7155d2ab4afa8000},Object.defineProperties(e,n),e}(zt),Yt=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,1===arguments.length){var t=arguments[0],e=gt.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this._geom=n,this._geomFact=n.getFactory(),this._bnRule=i}};Yt.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return 1===e.length?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},Yt.prototype.getBoundary=function(){return this._geom instanceof Kt?this.boundaryLineString(this._geom):this._geom instanceof Xt?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},Yt.prototype.boundaryLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();if(t.isClosed()){return this._bnRule.isInBoundary(2)?t.getStartPoint():this._geomFact.createMultiPoint()}return this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},Yt.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},Yt.prototype.computeBoundaryCoordinates=function(t){var e=new Nt;this._endpointMap=new p;for(var n=0;n<t.getNumGeometries();n++){var i=t.getGeometryN(n);0!==i.getNumPoints()&&(this.addEndpoint(i.getCoordinateN(0)),this.addEndpoint(i.getCoordinateN(i.getNumPoints()-1)))}for(var r=this._endpointMap.entrySet().iterator();r.hasNext();){var o=r.next(),s=o.getValue().count;this._bnRule.isInBoundary(s)&&e.add(o.getKey())}return Lt.toCoordinateArray(e)},Yt.prototype.addEndpoint=function(t){var e=this._endpointMap.get(t);null===e&&(e=new kt,this._endpointMap.put(t,e)),e.count++},Yt.prototype.interfaces_=function(){return[]},Yt.prototype.getClass=function(){return Yt},Yt.getBoundary=function(){if(1===arguments.length){var t=arguments[0];return new Yt(t).getBoundary()}if(2===arguments.length){var e=arguments[0],n=arguments[1];return new Yt(e,n).getBoundary()}};var kt=function(){this.count=null};kt.prototype.interfaces_=function(){return[]},kt.prototype.getClass=function(){return kt};var jt=function(){},Ht={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};jt.prototype.interfaces_=function(){return[]},jt.prototype.getClass=function(){return jt},jt.chars=function(t,e){for(var n=new Array(e).fill(null),i=0;i<e;i++)n[i]=t;return String(n)},jt.getStackTrace=function(){if(1===arguments.length){var t=arguments[0],e=new function(){},n=new function(){}(e);return t.printStackTrace(n),e.toString()}if(2===arguments.length){for(var i=arguments[0],r=arguments[1],o=\"\",s=new function(){}(new function(){}(jt.getStackTrace(i))),a=0;a<r;a++)try{o+=s.readLine()+jt.NEWLINE}catch(t){if(!(t instanceof g))throw t;et.shouldNeverReachHere()}return o}},jt.split=function(t,e){for(var n=e.length,i=new Nt,r=\"\"+t,o=r.indexOf(e);o>=0;){var s=r.substring(0,o);i.add(s),o=(r=r.substring(o+n)).indexOf(e)}r.length>0&&i.add(r);for(var a=new Array(i.size()).fill(null),u=0;u<a.length;u++)a[u]=i.get(u);return a},jt.toString=function(){if(1===arguments.length){var t=arguments[0];return jt.SIMPLE_ORDINATE_FORMAT.format(t)}},jt.spaces=function(t){return jt.chars(\" \",t)},Ht.NEWLINE.get=function(){return Y.getProperty(\"line.separator\")},Ht.SIMPLE_ORDINATE_FORMAT.get=function(){return new function(){}(\"0.#\")},Object.defineProperties(jt,Ht);var Wt=function(){};Wt.prototype.interfaces_=function(){return[]},Wt.prototype.getClass=function(){return Wt},Wt.copyCoord=function(t,e,n,i){for(var r=Math.min(t.getDimension(),n.getDimension()),o=0;o<r;o++)n.setOrdinate(i,o,t.getOrdinate(e,o))},Wt.isRing=function(t){var e=t.size();return 0===e||!(e<=3)&&(t.getOrdinate(0,V.X)===t.getOrdinate(e-1,V.X)&&t.getOrdinate(0,V.Y)===t.getOrdinate(e-1,V.Y))},Wt.isEqual=function(t,e){var n=t.size();if(n!==e.size())return!1;for(var i=Math.min(t.getDimension(),e.getDimension()),r=0;r<n;r++)for(var o=0;o<i;o++){var s=t.getOrdinate(r,o),a=e.getOrdinate(r,o);if(t.getOrdinate(r,o)!==e.getOrdinate(r,o)&&(!v.isNaN(s)||!v.isNaN(a)))return!1}return!0},Wt.extend=function(t,e,n){var i=t.create(n,e.getDimension()),r=e.size();if(Wt.copy(e,0,i,0,r),r>0)for(var o=r;o<n;o++)Wt.copy(e,r-1,i,o,1);return i},Wt.reverse=function(t){for(var e=t.size()-1,n=Math.trunc(e/2),i=0;i<=n;i++)Wt.swap(t,i,e-i)},Wt.swap=function(t,e,n){if(e===n)return null;for(var i=0;i<t.getDimension();i++){var r=t.getOrdinate(e,i);t.setOrdinate(e,i,t.getOrdinate(n,i)),t.setOrdinate(n,i,r)}},Wt.copy=function(t,e,n,i,r){for(var o=0;o<r;o++)Wt.copyCoord(t,e+o,n,i+o)},Wt.toString=function(){if(1===arguments.length){var t=arguments[0],e=t.size();if(0===e)return\"()\";var n=t.getDimension(),i=new D;i.append(\"(\");for(var r=0;r<e;r++){r>0&&i.append(\" \");for(var o=0;o<n;o++)o>0&&i.append(\",\"),i.append(jt.toString(t.getOrdinate(r,o)))}return i.append(\")\"),i.toString()}},Wt.ensureValidRing=function(t,e){var n=e.size();if(0===n)return e;if(n<=3)return Wt.createClosedRing(t,e,4);return e.getOrdinate(0,V.X)===e.getOrdinate(n-1,V.X)&&e.getOrdinate(0,V.Y)===e.getOrdinate(n-1,V.Y)?e:Wt.createClosedRing(t,e,n+1)},Wt.createClosedRing=function(t,e,n){var i=t.create(n,e.getDimension()),r=e.size();Wt.copy(e,0,i,0,r);for(var o=r;o<n;o++)Wt.copy(e,0,i,o,1);return i};var Kt=function(t){function e(e,n){t.call(this,n),this._points=null,this.init(e)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new j:this._points.expandEnvelope(new j)},e.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},e.prototype.getSortIndex=function(){return t.SORTINDEX_LINESTRING},e.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var i=e;if(this._points.size()!==i._points.size())return!1;for(var r=0;r<this._points.size();r++)if(!this.equal(this._points.getCoordinate(r),i._points.getCoordinate(r),n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var t=0;t<Math.trunc(this._points.size()/2);t++){var e=this._points.size()-1-t;if(!this._points.getCoordinate(t).equals(this._points.getCoordinate(e)))return this._points.getCoordinate(t).compareTo(this._points.getCoordinate(e))>0&&Wt.reverse(this._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?qt.FALSE:0},e.prototype.isClosed=function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return at.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var t=this._points.copy();Wt.reverse(t);return this.getFactory().createLineString(t)},e.prototype.compareToSameClass=function(){if(1===arguments.length){for(var t=arguments[0],e=0,n=0;e<this._points.size()&&n<t._points.size();){var i=this._points.getCoordinate(e).compareTo(t._points.getCoordinate(n));if(0!==i)return i;e++,n++}return e<this._points.size()?1:n<t._points.size()?-1:0}if(2===arguments.length){var r=arguments[0];return arguments[1].compare(this._points,r._points)}},e.prototype.apply=function(){if(T(arguments[0],ft))for(var t=arguments[0],e=0;e<this._points.size();e++)t.filter(this._points.getCoordinate(e));else if(T(arguments[0],Ut)){var n=arguments[0];if(0===this._points.size())return null;for(var i=0;i<this._points.size()&&(n.filter(this._points,i),!n.isDone());i++);n.isGeometryChanged()&&this.geometryChanged()}else if(T(arguments[0],Vt)){arguments[0].filter(this)}else if(T(arguments[0],lt)){arguments[0].filter(this)}},e.prototype.getBoundary=function(){return new Yt(this).getBoundary()},e.prototype.isEquivalentClass=function(t){return t instanceof e},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e._points=this._points.clone(),e},e.prototype.getCoordinateN=function(t){return this._points.getCoordinate(t)},e.prototype.getGeometryType=function(){return\"LineString\"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._points},e.prototype.isEmpty=function(){return 0===this._points.size()},e.prototype.init=function(t){if(null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),1===t.size())throw new m(\"Invalid number of points in LineString (found \"+t.size()+\" - must be 0 or >= 2)\");this._points=t},e.prototype.isCoordinate=function(t){for(var e=0;e<this._points.size();e++)if(this._points.getCoordinate(e).equals(t))return!0;return!1},e.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},e.prototype.getPointN=function(t){return this.getFactory().createPoint(this._points.getCoordinate(t))},e.prototype.interfaces_=function(){return[At]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(e,n),e}(ct),Jt=function(){};Jt.prototype.interfaces_=function(){return[]},Jt.prototype.getClass=function(){return Jt};var Qt=function(t){function e(e,n){t.call(this,n),this._coordinates=e||null,this.init(this._coordinates)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new j;var t=new j;return t.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),t},e.prototype.getSortIndex=function(){return t.SORTINDEX_POINT},e.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&(!(!this.isEmpty()||!e.isEmpty())||this.isEmpty()===e.isEmpty()&&this.equal(e.getCoordinate(),this.getCoordinate(),n))}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){},e.prototype.getCoordinate=function(){return 0!==this._coordinates.size()?this._coordinates.getCoordinate(0):null},e.prototype.getBoundaryDimension=function(){return qt.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getNumPoints=function(){return this.isEmpty()?0:1},e.prototype.reverse=function(){return this.copy()},e.prototype.getX=function(){if(null===this.getCoordinate())throw new Error(\"getX called on empty Point\");return this.getCoordinate().x},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0];return this.getCoordinate().compareTo(t.getCoordinate())}if(2===arguments.length){var e=arguments[0];return arguments[1].compare(this._coordinates,e._coordinates)}},e.prototype.apply=function(){if(T(arguments[0],ft)){var t=arguments[0];if(this.isEmpty())return null;t.filter(this.getCoordinate())}else if(T(arguments[0],Ut)){var e=arguments[0];if(this.isEmpty())return null;e.filter(this._coordinates,0),e.isGeometryChanged()&&this.geometryChanged()}else if(T(arguments[0],Vt)){arguments[0].filter(this)}else if(T(arguments[0],lt)){arguments[0].filter(this)}},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e._coordinates=this._coordinates.clone(),e},e.prototype.getGeometryType=function(){return\"Point\"},e.prototype.copy=function(){return new e(this._coordinates.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._coordinates},e.prototype.getY=function(){if(null===this.getCoordinate())throw new Error(\"getY called on empty Point\");return this.getCoordinate().y},e.prototype.isEmpty=function(){return 0===this._coordinates.size()},e.prototype.init=function(t){null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),et.isTrue(t.size()<=1),this._coordinates=t},e.prototype.isSimple=function(){return!0},e.prototype.interfaces_=function(){return[Jt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x44077bad161cbc00},Object.defineProperties(e,n),e}(ct),Zt=function(){};Zt.prototype.interfaces_=function(){return[]},Zt.prototype.getClass=function(){return Zt};var $t=function(t){function e(e,n,i){if(t.call(this,i),this._shell=null,this._holes=null,null===e&&(e=this.getFactory().createLinearRing()),null===n&&(n=[]),t.hasNullElements(n))throw new m(\"holes must not contain null elements\");if(e.isEmpty()&&t.hasNonEmptyElements(n))throw new m(\"shell is empty but holes are not\");this._shell=e,this._holes=n}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},e.prototype.getSortIndex=function(){return t.SORTINDEX_POLYGON},e.prototype.getCoordinates=function(){if(this.isEmpty())return[];for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=this._shell.getCoordinates(),i=0;i<n.length;i++)t[++e]=n[i];for(var r=0;r<this._holes.length;r++)for(var o=this._holes[r].getCoordinates(),s=0;s<o.length;s++)t[++e]=o[s];return t},e.prototype.getArea=function(){var t=0;t+=Math.abs(at.signedArea(this._shell.getCoordinateSequence()));for(var e=0;e<this._holes.length;e++)t-=Math.abs(at.signedArea(this._holes[e].getCoordinateSequence()));return t},e.prototype.isRectangle=function(){if(0!==this.getNumInteriorRing())return!1;if(null===this._shell)return!1;if(5!==this._shell.getNumPoints())return!1;for(var t=this._shell.getCoordinateSequence(),e=this.getEnvelopeInternal(),n=0;n<5;n++){var i=t.getX(n);if(i!==e.getMinX()&&i!==e.getMaxX())return!1;var r=t.getY(n);if(r!==e.getMinY()&&r!==e.getMaxY())return!1}for(var o=t.getX(0),s=t.getY(0),a=1;a<=4;a++){var u=t.getX(a),l=t.getY(a);if(u!==o===(l!==s))return!1;o=u,s=l}return!0},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var i=e,r=this._shell,o=i._shell;if(!r.equalsExact(o,n))return!1;if(this._holes.length!==i._holes.length)return!1;for(var s=0;s<this._holes.length;s++)if(!this._holes[s].equalsExact(i._holes[s],n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){if(0===arguments.length){this.normalize(this._shell,!0);for(var t=0;t<this._holes.length;t++)this.normalize(this._holes[t],!1);Gt.sort(this._holes)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(e.isEmpty())return null;var i=new Array(e.getCoordinates().length-1).fill(null);Y.arraycopy(e.getCoordinates(),0,i,0,i.length);var r=Lt.minCoordinate(e.getCoordinates());Lt.scroll(i,r),Y.arraycopy(i,0,e.getCoordinates(),0,i.length),e.getCoordinates()[i.length]=i[0],at.isCCW(e.getCoordinates())===n&&Lt.reverse(e.getCoordinates())}},e.prototype.getCoordinate=function(){return this._shell.getCoordinate()},e.prototype.getNumInteriorRing=function(){return this._holes.length},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.getLength=function(){var t=0;t+=this._shell.getLength();for(var e=0;e<this._holes.length;e++)t+=this._holes[e].getLength();return t},e.prototype.getNumPoints=function(){for(var t=this._shell.getNumPoints(),e=0;e<this._holes.length;e++)t+=this._holes[e].getNumPoints();return t},e.prototype.reverse=function(){var t=this.copy();t._shell=this._shell.copy().reverse(),t._holes=new Array(this._holes.length).fill(null);for(var e=0;e<this._holes.length;e++)t._holes[e]=this._holes[e].copy().reverse();return t},e.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0],e=this._shell,n=t._shell;return e.compareToSameClass(n)}if(2===arguments.length){var i=arguments[0],r=arguments[1],o=i,s=this._shell,a=o._shell,u=s.compareToSameClass(a,r);if(0!==u)return u;for(var l=this.getNumInteriorRing(),c=o.getNumInteriorRing(),p=0;p<l&&p<c;){var h=this.getInteriorRingN(p),f=o.getInteriorRingN(p),g=h.compareToSameClass(f,r);if(0!==g)return g;p++}return p<l?1:p<c?-1:0}},e.prototype.apply=function(t){if(T(t,ft)){this._shell.apply(t);for(var e=0;e<this._holes.length;e++)this._holes[e].apply(t)}else if(T(t,Ut)){if(this._shell.apply(t),!t.isDone())for(var n=0;n<this._holes.length&&(this._holes[n].apply(t),!t.isDone());n++);t.isGeometryChanged()&&this.geometryChanged()}else if(T(t,Vt))t.filter(this);else if(T(t,lt)){t.filter(this),this._shell.apply(t);for(var i=0;i<this._holes.length;i++)this._holes[i].apply(t)}},e.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();var t=new Array(this._holes.length+1).fill(null);t[0]=this._shell;for(var e=0;e<this._holes.length;e++)t[e+1]=this._holes[e];return t.length<=1?this.getFactory().createLinearRing(t[0].getCoordinateSequence()):this.getFactory().createMultiLineString(t)},e.prototype.clone=function(){var e=t.prototype.clone.call(this);e._shell=this._shell.clone(),e._holes=new Array(this._holes.length).fill(null);for(var n=0;n<this._holes.length;n++)e._holes[n]=this._holes[n].clone();return e},e.prototype.getGeometryType=function(){return\"Polygon\"},e.prototype.copy=function(){for(var t=this._shell.copy(),n=new Array(this._holes.length).fill(null),i=0;i<n.length;i++)n[i]=this._holes[i].copy();return new e(t,n,this._factory)},e.prototype.getExteriorRing=function(){return this._shell},e.prototype.isEmpty=function(){return this._shell.isEmpty()},e.prototype.getInteriorRingN=function(t){return this._holes[t]},e.prototype.interfaces_=function(){return[Zt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(e,n),e}(ct),te=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTIPOINT},e.prototype.isValid=function(){return!0},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getCoordinate=function(){if(1===arguments.length){var e=arguments[0];return this._geometries[e].getCoordinate()}return t.prototype.getCoordinate.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return qt.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.getGeometryType=function(){return\"MultiPoint\"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[Jt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x6fb1ed4162e0fc00},Object.defineProperties(e,n),e}(zt),ee=function(t){function e(e,n){e instanceof C&&n instanceof _e&&(e=n.getCoordinateSequenceFactory().create(e)),t.call(this,e,n),this.validateConstruction()}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_LINEARRING},e.prototype.getBoundaryDimension=function(){return qt.FALSE},e.prototype.isClosed=function(){return!!this.isEmpty()||t.prototype.isClosed.call(this)},e.prototype.reverse=function(){var t=this._points.copy();Wt.reverse(t);return this.getFactory().createLinearRing(t)},e.prototype.validateConstruction=function(){if(!this.isEmpty()&&!t.prototype.isClosed.call(this))throw new m(\"Points of LinearRing do not form a closed linestring\");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<e.MINIMUM_VALID_SIZE)throw new m(\"Invalid number of points in LinearRing (found \"+this.getCoordinateSequence().size()+\" - must be 0 or >= 4)\")},e.prototype.getGeometryType=function(){return\"LinearRing\"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.MINIMUM_VALID_SIZE.get=function(){return 4},n.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,n),e}(Kt),ne=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createMultiPolygon(e)},e.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();for(var t=new Nt,e=0;e<this._geometries.length;e++)for(var n=this._geometries[e].getBoundary(),i=0;i<n.getNumGeometries();i++)t.add(n.getGeometryN(i));var r=new Array(t.size()).fill(null);return this.getFactory().createMultiLineString(t.toArray(r))},e.prototype.getGeometryType=function(){return\"MultiPolygon\"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[Zt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(e,n),e}(zt),ie=function(t){this._factory=t||null,this._isUserDataCopied=!1},re={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};ie.prototype.setCopyUserData=function(t){this._isUserDataCopied=t},ie.prototype.edit=function(t,e){if(null===t)return null;var n=this.editInternal(t,e);return this._isUserDataCopied&&n.setUserData(t.getUserData()),n},ie.prototype.editInternal=function(t,e){return null===this._factory&&(this._factory=t.getFactory()),t instanceof zt?this.editGeometryCollection(t,e):t instanceof $t?this.editPolygon(t,e):t instanceof Qt?e.edit(t,this._factory):t instanceof Kt?e.edit(t,this._factory):(et.shouldNeverReachHere(\"Unsupported Geometry class: \"+t.getClass().getName()),null)},ie.prototype.editGeometryCollection=function(t,e){for(var n=e.edit(t,this._factory),i=new Nt,r=0;r<n.getNumGeometries();r++){var o=this.edit(n.getGeometryN(r),e);null===o||o.isEmpty()||i.add(o)}return n.getClass()===te?this._factory.createMultiPoint(i.toArray([])):n.getClass()===Xt?this._factory.createMultiLineString(i.toArray([])):n.getClass()===ne?this._factory.createMultiPolygon(i.toArray([])):this._factory.createGeometryCollection(i.toArray([]))},ie.prototype.editPolygon=function(t,e){var n=e.edit(t,this._factory);if(null===n&&(n=this._factory.createPolygon(null)),n.isEmpty())return n;var i=this.edit(n.getExteriorRing(),e);if(null===i||i.isEmpty())return this._factory.createPolygon();for(var r=new Nt,o=0;o<n.getNumInteriorRing();o++){var s=this.edit(n.getInteriorRingN(o),e);null===s||s.isEmpty()||r.add(s)}return this._factory.createPolygon(i,r.toArray([]))},ie.prototype.interfaces_=function(){return[]},ie.prototype.getClass=function(){return ie},ie.GeometryEditorOperation=function(){},re.NoOpGeometryOperation.get=function(){return oe},re.CoordinateOperation.get=function(){return se},re.CoordinateSequenceOperation.get=function(){return ae},Object.defineProperties(ie,re);var oe=function(){};oe.prototype.edit=function(t,e){return t},oe.prototype.interfaces_=function(){return[ie.GeometryEditorOperation]},oe.prototype.getClass=function(){return oe};var se=function(){};se.prototype.edit=function(t,e){var n=this.editCoordinates(t.getCoordinates(),t);return null===n?t:t instanceof ee?e.createLinearRing(n):t instanceof Kt?e.createLineString(n):t instanceof Qt?n.length>0?e.createPoint(n[0]):e.createPoint():t},se.prototype.interfaces_=function(){return[ie.GeometryEditorOperation]},se.prototype.getClass=function(){return se};var ae=function(){};ae.prototype.edit=function(t,e){return t instanceof ee?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Kt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Qt?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},ae.prototype.interfaces_=function(){return[ie.GeometryEditorOperation]},ae.prototype.getClass=function(){return ae};var ue=function(){if(this._dimension=3,this._coordinates=null,1===arguments.length){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var t=arguments[0];this._coordinates=new Array(t).fill(null);for(var e=0;e<t;e++)this._coordinates[e]=new C}else if(T(arguments[0],V)){var n=arguments[0];if(null===n)return this._coordinates=new Array(0).fill(null),null;this._dimension=n.getDimension(),this._coordinates=new Array(n.size()).fill(null);for(var i=0;i<this._coordinates.length;i++)this._coordinates[i]=n.getCoordinateCopy(i)}}else if(2===arguments.length)if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var r=arguments[0],o=arguments[1];this._coordinates=r,this._dimension=o,null===r&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var s=arguments[0],a=arguments[1];this._coordinates=new Array(s).fill(null),this._dimension=a;for(var u=0;u<s;u++)this._coordinates[u]=new C}},le={serialVersionUID:{configurable:!0}};ue.prototype.setOrdinate=function(t,e,n){switch(e){case V.X:this._coordinates[t].x=n;break;case V.Y:this._coordinates[t].y=n;break;case V.Z:this._coordinates[t].z=n;break;default:throw new m(\"invalid ordinateIndex\")}},ue.prototype.size=function(){return this._coordinates.length},ue.prototype.getOrdinate=function(t,e){switch(e){case V.X:return this._coordinates[t].x;case V.Y:return this._coordinates[t].y;case V.Z:return this._coordinates[t].z}return v.NaN},ue.prototype.getCoordinate=function(){if(1===arguments.length){var t=arguments[0];return this._coordinates[t]}if(2===arguments.length){var e=arguments[0],n=arguments[1];n.x=this._coordinates[e].x,n.y=this._coordinates[e].y,n.z=this._coordinates[e].z}},ue.prototype.getCoordinateCopy=function(t){return new C(this._coordinates[t])},ue.prototype.getDimension=function(){return this._dimension},ue.prototype.getX=function(t){return this._coordinates[t].x},ue.prototype.clone=function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].clone();return new ue(t,this._dimension)},ue.prototype.expandEnvelope=function(t){for(var e=0;e<this._coordinates.length;e++)t.expandToInclude(this._coordinates[e]);return t},ue.prototype.copy=function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].copy();return new ue(t,this._dimension)},ue.prototype.toString=function(){if(this._coordinates.length>0){var t=new D(17*this._coordinates.length);t.append(\"(\"),t.append(this._coordinates[0]);for(var e=1;e<this._coordinates.length;e++)t.append(\", \"),t.append(this._coordinates[e]);return t.append(\")\"),t.toString()}return\"()\"},ue.prototype.getY=function(t){return this._coordinates[t].y},ue.prototype.toCoordinateArray=function(){return this._coordinates},ue.prototype.interfaces_=function(){return[V,e]},ue.prototype.getClass=function(){return ue},le.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(ue,le);var ce=function(){},pe={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};ce.prototype.readResolve=function(){return ce.instance()},ce.prototype.create=function(){if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return new ue(t)}if(T(arguments[0],V)){var e=arguments[0];return new ue(e)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return i>3&&(i=3),i<2?new ue(n):new ue(n,i)}},ce.prototype.interfaces_=function(){return[b,e]},ce.prototype.getClass=function(){return ce},ce.instance=function(){return ce.instanceObject},pe.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},pe.instanceObject.get=function(){return new ce},Object.defineProperties(ce,pe);var he=function(t){function e(){t.call(this),this.map_=new Map}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return this.map_.get(t)||null},e.prototype.put=function(t,e){return this.map_.set(t,e),e},e.prototype.values=function(){for(var t=new Nt,e=this.map_.values(),n=e.next();!n.done;)t.add(n.value),n=e.next();return t},e.prototype.entrySet=function(){var t=new Pt;return this.map_.entries().forEach(function(e){return t.add(e)}),t},e.prototype.size=function(){return this.map_.size()},e}(Tt),fe=function t(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=t.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof de){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if(\"number\"==typeof arguments[0]){var n=arguments[0];this._modelType=t.FIXED,this.setScale(n)}else if(arguments[0]instanceof t){var i=arguments[0];this._modelType=i._modelType,this._scale=i._scale}},ge={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};fe.prototype.equals=function(t){if(!(t instanceof fe))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},fe.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),i=e.getMaximumSignificantDigits();return new M(n).compareTo(new M(i))},fe.prototype.getScale=function(){return this._scale},fe.prototype.isFloating=function(){return this._modelType===fe.FLOATING||this._modelType===fe.FLOATING_SINGLE},fe.prototype.getType=function(){return this._modelType},fe.prototype.toString=function(){var t=\"UNKNOWN\";return this._modelType===fe.FLOATING?t=\"Floating\":this._modelType===fe.FLOATING_SINGLE?t=\"Floating-Single\":this._modelType===fe.FIXED&&(t=\"Fixed (Scale=\"+this.getScale()+\")\"),t},fe.prototype.makePrecise=function(){if(\"number\"==typeof arguments[0]){var t=arguments[0];if(v.isNaN(t))return t;if(this._modelType===fe.FLOATING_SINGLE){return t}return this._modelType===fe.FIXED?Math.round(t*this._scale)/this._scale:t}if(arguments[0]instanceof C){var e=arguments[0];if(this._modelType===fe.FLOATING)return null;e.x=this.makePrecise(e.x),e.y=this.makePrecise(e.y)}},fe.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===fe.FLOATING?t=16:this._modelType===fe.FLOATING_SINGLE?t=6:this._modelType===fe.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},fe.prototype.setScale=function(t){this._scale=Math.abs(t)},fe.prototype.interfaces_=function(){return[e,E]},fe.prototype.getClass=function(){return fe},fe.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},ge.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},ge.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(fe,ge);var de=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},ye={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};de.prototype.readResolve=function(){return de.nameToTypeMap.get(this._name)},de.prototype.toString=function(){return this._name},de.prototype.interfaces_=function(){return[e]},de.prototype.getClass=function(){return de},ye.serialVersionUID.get=function(){return-552860263173159e4},ye.nameToTypeMap.get=function(){return new he},Object.defineProperties(de,ye),fe.Type=de,fe.FIXED=new de(\"FIXED\"),fe.FLOATING=new de(\"FLOATING\"),fe.FLOATING_SINGLE=new de(\"FLOATING SINGLE\");var _e=function t(){this._precisionModel=new fe,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?T(arguments[0],b)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof fe&&(this._precisionModel=arguments[0]):2===arguments.length?(this._precisionModel=arguments[0],this._SRID=arguments[1]):3===arguments.length&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},me={serialVersionUID:{configurable:!0}};_e.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new C(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new C(t.getMinX(),t.getMinY()),new C(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new C(t.getMinX(),t.getMinY()),new C(t.getMinX(),t.getMaxY()),new C(t.getMaxX(),t.getMaxY()),new C(t.getMaxX(),t.getMinY()),new C(t.getMinX(),t.getMinY())]),null)},_e.prototype.createLineString=function(t){return t?t instanceof Array?new Kt(this.getCoordinateSequenceFactory().create(t),this):T(t,V)?new Kt(t,this):void 0:new Kt(this.getCoordinateSequenceFactory().create([]),this)},_e.prototype.createMultiLineString=function(){if(0===arguments.length)return new Xt(null,this);if(1===arguments.length){var t=arguments[0];return new Xt(t,this)}},_e.prototype.buildGeometry=function(t){for(var e=null,n=!1,i=!1,r=t.iterator();r.hasNext();){var o=r.next(),s=o.getClass();null===e&&(e=s),s!==e&&(n=!0),o.isGeometryCollectionOrDerived()&&(i=!0)}if(null===e)return this.createGeometryCollection();if(n||i)return this.createGeometryCollection(_e.toGeometryArray(t));var a=t.iterator().next();if(t.size()>1){if(a instanceof $t)return this.createMultiPolygon(_e.toPolygonArray(t));if(a instanceof Kt)return this.createMultiLineString(_e.toLineStringArray(t));if(a instanceof Qt)return this.createMultiPoint(_e.toPointArray(t));et.shouldNeverReachHere(\"Unhandled class: \"+a.getClass().getName())}return a},_e.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)},_e.prototype.createPoint=function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof C){var t=arguments[0];return this.createPoint(null!==t?this.getCoordinateSequenceFactory().create([t]):null)}if(T(arguments[0],V)){var e=arguments[0];return new Qt(e,this)}}},_e.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},_e.prototype.createPolygon=function(){if(0===arguments.length)return new $t(null,null,this);if(1===arguments.length){if(T(arguments[0],V)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof ee){var n=arguments[0];return this.createPolygon(n,null)}}else if(2===arguments.length){var i=arguments[0],r=arguments[1];return new $t(i,r,this)}},_e.prototype.getSRID=function(){return this._SRID},_e.prototype.createGeometryCollection=function(){if(0===arguments.length)return new zt(null,this);if(1===arguments.length){var t=arguments[0];return new zt(t,this)}},_e.prototype.createGeometry=function(t){return new ie(this).edit(t,{edit:function(){if(2===arguments.length){var t=arguments[0];return this._coordinateSequenceFactory.create(t)}}})},_e.prototype.getPrecisionModel=function(){return this._precisionModel},_e.prototype.createLinearRing=function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(T(arguments[0],V)){var e=arguments[0];return new ee(e,this)}}},_e.prototype.createMultiPolygon=function(){if(0===arguments.length)return new ne(null,this);if(1===arguments.length){var t=arguments[0];return new ne(t,this)}},_e.prototype.createMultiPoint=function(){if(0===arguments.length)return new te(null,this);if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return new te(t,this)}if(arguments[0]instanceof Array){var e=arguments[0];return this.createMultiPoint(null!==e?this.getCoordinateSequenceFactory().create(e):null)}if(T(arguments[0],V)){var n=arguments[0];if(null===n)return this.createMultiPoint(new Array(0).fill(null));for(var i=new Array(n.size()).fill(null),r=0;r<n.size();r++){var o=this.getCoordinateSequenceFactory().create(1,n.getDimension());Wt.copy(n,r,o,0,1),i[r]=this.createPoint(o)}return this.createMultiPoint(i)}}},_e.prototype.interfaces_=function(){return[e]},_e.prototype.getClass=function(){return _e},_e.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_e.toGeometryArray=function(t){if(null===t)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},_e.getDefaultCoordinateSequenceFactory=function(){return ce.instance()},_e.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_e.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_e.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_e.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_e.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_e.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_e.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},me.serialVersionUID.get=function(){return-0x5ea75f2051eeb400},Object.defineProperties(_e,me);var ve=[\"Point\",\"MultiPoint\",\"LineString\",\"MultiLineString\",\"Polygon\",\"MultiPolygon\"],Ie=function(t){this.geometryFactory=t||new _e};Ie.prototype.read=function(t){var e,n=(e=\"string\"==typeof t?JSON.parse(t):t).type;if(!Ee[n])throw new Error(\"Unknown GeoJSON type: \"+e.type);return-1!==ve.indexOf(n)?Ee[n].apply(this,[e.coordinates]):\"GeometryCollection\"===n?Ee[n].apply(this,[e.geometries]):Ee[n].apply(this,[e])},Ie.prototype.write=function(t){var e=t.getGeometryType();if(!xe[e])throw new Error(\"Geometry is not supported\");return xe[e].apply(this,[t])};var Ee={Feature:function(t){var e={};for(var n in t)e[n]=t[n];if(t.geometry){var i=t.geometry.type;if(!Ee[i])throw new Error(\"Unknown GeoJSON type: \"+t.type);e.geometry=this.read(t.geometry)}return t.bbox&&(e.bbox=Ee.bbox.apply(this,[t.bbox])),e},FeatureCollection:function(t){var e={};if(t.features){e.features=[];for(var n=0;n<t.features.length;++n)e.features.push(this.read(t.features[n]))}return t.bbox&&(e.bbox=this.parse.bbox.apply(this,[t.bbox])),e},coordinates:function(t){for(var e=[],n=0;n<t.length;++n){var i=t[n];e.push(new C(i[0],i[1]))}return e},bbox:function(t){return this.geometryFactory.createLinearRing([new C(t[0],t[1]),new C(t[2],t[1]),new C(t[2],t[3]),new C(t[0],t[3]),new C(t[0],t[1])])},Point:function(t){var e=new C(t[0],t[1]);return this.geometryFactory.createPoint(e)},MultiPoint:function(t){for(var e=[],n=0;n<t.length;++n)e.push(Ee.Point.apply(this,[t[n]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(t){var e=Ee.coordinates.apply(this,[t]);return this.geometryFactory.createLineString(e)},MultiLineString:function(t){for(var e=[],n=0;n<t.length;++n)e.push(Ee.LineString.apply(this,[t[n]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(t){for(var e=Ee.coordinates.apply(this,[t[0]]),n=this.geometryFactory.createLinearRing(e),i=[],r=1;r<t.length;++r){var o=t[r],s=Ee.coordinates.apply(this,[o]),a=this.geometryFactory.createLinearRing(s);i.push(a)}return this.geometryFactory.createPolygon(n,i)},MultiPolygon:function(t){for(var e=[],n=0;n<t.length;++n){var i=t[n];e.push(Ee.Polygon.apply(this,[i]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(t){for(var e=[],n=0;n<t.length;++n){var i=t[n];e.push(this.read(i))}return this.geometryFactory.createGeometryCollection(e)}},xe={coordinate:function(t){return[t.x,t.y]},Point:function(t){return{type:\"Point\",coordinates:xe.coordinate.apply(this,[t.getCoordinate()])}},MultiPoint:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=xe.Point.apply(this,[i]);e.push(r.coordinates)}return{type:\"MultiPoint\",coordinates:e}},LineString:function(t){for(var e=[],n=t.getCoordinates(),i=0;i<n.length;++i){var r=n[i];e.push(xe.coordinate.apply(this,[r]))}return{type:\"LineString\",coordinates:e}},MultiLineString:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=xe.LineString.apply(this,[i]);e.push(r.coordinates)}return{type:\"MultiLineString\",coordinates:e}},Polygon:function(t){var e=[],n=xe.LineString.apply(this,[t._shell]);e.push(n.coordinates);for(var i=0;i<t._holes.length;++i){var r=t._holes[i],o=xe.LineString.apply(this,[r]);e.push(o.coordinates)}return{type:\"Polygon\",coordinates:e}},MultiPolygon:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=xe.Polygon.apply(this,[i]);e.push(r.coordinates)}return{type:\"MultiPolygon\",coordinates:e}},GeometryCollection:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=i.getGeometryType();e.push(xe[r].apply(this,[i]))}return{type:\"GeometryCollection\",geometries:e}}},Ne=function(t){this.geometryFactory=t||new _e,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new Ie(this.geometryFactory)};Ne.prototype.read=function(t){var e=this.parser.read(t);return this.precisionModel.getType()===fe.FIXED&&this.reducePrecision(e),e},Ne.prototype.reducePrecision=function(t){var e,n;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(e=0,n=t.points.length;e<n;e++)this.precisionModel.makePrecise(t.points[e]);else if(t.geometries)for(e=0,n=t.geometries.length;e<n;e++)this.reducePrecision(t.geometries[e])};var Ce=function(){this.parser=new Ie(this.geometryFactory)};Ce.prototype.write=function(t){return this.parser.write(t)};var Se=function(){},Le={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};Se.prototype.interfaces_=function(){return[]},Se.prototype.getClass=function(){return Se},Se.opposite=function(t){return t===Se.LEFT?Se.RIGHT:t===Se.RIGHT?Se.LEFT:t},Le.ON.get=function(){return 0},Le.LEFT.get=function(){return 1},Le.RIGHT.get=function(){return 2},Object.defineProperties(Se,Le),(d.prototype=new Error).name=\"EmptyStackException\",(y.prototype=new xt).add=function(t){return this.array_.push(t),!0},y.prototype.get=function(t){if(t<0||t>=this.size())throw new Error;return this.array_[t]},y.prototype.push=function(t){return this.array_.push(t),t},y.prototype.pop=function(t){if(0===this.array_.length)throw new d;return this.array_.pop()},y.prototype.peek=function(){if(0===this.array_.length)throw new d;return this.array_[this.array_.length-1]},y.prototype.empty=function(){return 0===this.array_.length},y.prototype.isEmpty=function(){return this.empty()},y.prototype.search=function(t){return this.array_.indexOf(t)},y.prototype.size=function(){return this.array_.length},y.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t};var be=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};be.prototype.getCoordinate=function(){return this._minCoord},be.prototype.getRightmostSide=function(t,e){var n=this.getRightmostSideOfSegment(t,e);return n<0&&(n=this.getRightmostSideOfSegment(t,e-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),n},be.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();et.isTrue(this._minIndex>0&&this._minIndex<t.length,\"rightmost point expected to be interior vertex of edge\");var e=t[this._minIndex-1],n=t[this._minIndex+1],i=at.computeOrientation(this._minCoord,n,e),r=!1;e.y<this._minCoord.y&&n.y<this._minCoord.y&&i===at.COUNTERCLOCKWISE?r=!0:e.y>this._minCoord.y&&n.y>this._minCoord.y&&i===at.CLOCKWISE&&(r=!0),r&&(this._minIndex=this._minIndex-1)},be.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge().getCoordinates();if(e<0||e+1>=n.length)return-1;if(n[e].y===n[e+1].y)return-1;var i=Se.LEFT;return n[e].y<n[e+1].y&&(i=Se.RIGHT),i},be.prototype.getEdge=function(){return this._orientedDe},be.prototype.checkForRightmostCoordinate=function(t){for(var e=t.getEdge().getCoordinates(),n=0;n<e.length-1;n++)(null===this._minCoord||e[n].x>this._minCoord.x)&&(this._minDe=t,this._minIndex=n,this._minCoord=e[n])},be.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode().getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},be.prototype.findEdge=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}et.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),\"inconsistency in rightmost processing\"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;this.getRightmostSide(this._minDe,this._minIndex)===Se.LEFT&&(this._orientedDe=this._minDe.getSym())},be.prototype.interfaces_=function(){return[]},be.prototype.getClass=function(){return be};var we=function(t){function e(n,i){t.call(this,e.msgWithCoord(n,i)),this.pt=i?new C(i):null,this.name=\"TopologyException\"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(t,e){return e?t:t+\" [ \"+e+\" ]\"},e}($),Oe=function(){this.array_=[]};Oe.prototype.addLast=function(t){this.array_.push(t)},Oe.prototype.removeFirst=function(){return this.array_.shift()},Oe.prototype.isEmpty=function(){return 0===this.array_.length};var Te=function(){this._finder=null,this._dirEdgeList=new Nt,this._nodes=new Nt,this._rightMostCoord=null,this._env=null,this._finder=new be};Te.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){t.next().setVisited(!1)}},Te.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Te.prototype.computeNodeDepth=function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){var i=n.next();if(i.isVisited()||i.getSym().isVisited()){e=i;break}}if(null===e)throw new we(\"unable to find edge to compute depths at \"+t.getCoordinate());t.getEdges().computeDepths(e);for(var r=t.getEdges().iterator();r.hasNext();){var o=r.next();o.setVisited(!0),this.copySymDepths(o)}},Te.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(Se.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Te.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Te.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(Se.RIGHT)>=1&&e.getDepth(Se.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Te.prototype.computeDepths=function(t){var e=new Pt,n=new Oe,i=t.getNode();for(n.addLast(i),e.add(i),t.setVisited(!0);!n.isEmpty();){var r=n.removeFirst();e.add(r),this.computeNodeDepth(r);for(var o=r.getEdges().iterator();o.hasNext();){var s=o.next().getSym();if(!s.isVisited()){var a=s.getNode();e.contains(a)||(n.addLast(a),e.add(a))}}}},Te.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},Te.prototype.getEnvelope=function(){if(null===this._env){for(var t=new j,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next().getEdge().getCoordinates(),i=0;i<n.length-1;i++)t.expandToInclude(n[i]);this._env=t}return this._env},Te.prototype.addReachable=function(t){var e=new y;for(e.add(t);!e.empty();){var n=e.pop();this.add(n,e)}},Te.prototype.copySymDepths=function(t){var e=t.getSym();e.setDepth(Se.LEFT,t.getDepth(Se.RIGHT)),e.setDepth(Se.RIGHT,t.getDepth(Se.LEFT))},Te.prototype.add=function(t,e){t.setVisited(!0),this._nodes.add(t);for(var n=t.getEdges().iterator();n.hasNext();){var i=n.next();this._dirEdgeList.add(i);var r=i.getSym().getNode();r.isVisited()||e.push(r)}},Te.prototype.getNodes=function(){return this._nodes},Te.prototype.getDirectedEdges=function(){return this._dirEdgeList},Te.prototype.interfaces_=function(){return[E]},Te.prototype.getClass=function(){return Te};var Re=function t(){if(this.location=null,1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];this.init(e.length)}else if(Number.isInteger(arguments[0])){var n=arguments[0];this.init(1),this.location[Se.ON]=n}else if(arguments[0]instanceof t){var i=arguments[0];if(this.init(i.location.length),null!==i)for(var r=0;r<this.location.length;r++)this.location[r]=i.location[r]}}else if(3===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2];this.init(3),this.location[Se.ON]=o,this.location[Se.LEFT]=s,this.location[Se.RIGHT]=a}};Re.prototype.setAllLocations=function(t){for(var e=0;e<this.location.length;e++)this.location[e]=t},Re.prototype.isNull=function(){for(var t=0;t<this.location.length;t++)if(this.location[t]!==w.NONE)return!1;return!0},Re.prototype.setAllLocationsIfNull=function(t){for(var e=0;e<this.location.length;e++)this.location[e]===w.NONE&&(this.location[e]=t)},Re.prototype.isLine=function(){return 1===this.location.length},Re.prototype.merge=function(t){if(t.location.length>this.location.length){var e=new Array(3).fill(null);e[Se.ON]=this.location[Se.ON],e[Se.LEFT]=w.NONE,e[Se.RIGHT]=w.NONE,this.location=e}for(var n=0;n<this.location.length;n++)this.location[n]===w.NONE&&n<t.location.length&&(this.location[n]=t.location[n])},Re.prototype.getLocations=function(){return this.location},Re.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[Se.LEFT];this.location[Se.LEFT]=this.location[Se.RIGHT],this.location[Se.RIGHT]=t},Re.prototype.toString=function(){var t=new D;return this.location.length>1&&t.append(w.toLocationSymbol(this.location[Se.LEFT])),t.append(w.toLocationSymbol(this.location[Se.ON])),this.location.length>1&&t.append(w.toLocationSymbol(this.location[Se.RIGHT])),t.toString()},Re.prototype.setLocations=function(t,e,n){this.location[Se.ON]=t,this.location[Se.LEFT]=e,this.location[Se.RIGHT]=n},Re.prototype.get=function(t){return t<this.location.length?this.location[t]:w.NONE},Re.prototype.isArea=function(){return this.location.length>1},Re.prototype.isAnyNull=function(){for(var t=0;t<this.location.length;t++)if(this.location[t]===w.NONE)return!0;return!1},Re.prototype.setLocation=function(){if(1===arguments.length){var t=arguments[0];this.setLocation(Se.ON,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.location[e]=n}},Re.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(w.NONE)},Re.prototype.isEqualOnSide=function(t,e){return this.location[e]===t.location[e]},Re.prototype.allPositionsEqual=function(t){for(var e=0;e<this.location.length;e++)if(this.location[e]!==t)return!1;return!0},Re.prototype.interfaces_=function(){return[]},Re.prototype.getClass=function(){return Re};var Pe=function t(){if(this.elt=new Array(2).fill(null),1===arguments.length){if(Number.isInteger(arguments[0])){var e=arguments[0];this.elt[0]=new Re(e),this.elt[1]=new Re(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.elt[0]=new Re(n.elt[0]),this.elt[1]=new Re(n.elt[1])}}else if(2===arguments.length){var i=arguments[0],r=arguments[1];this.elt[0]=new Re(w.NONE),this.elt[1]=new Re(w.NONE),this.elt[i].setLocation(r)}else if(3===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2];this.elt[0]=new Re(o,s,a),this.elt[1]=new Re(o,s,a)}else if(4===arguments.length){var u=arguments[0],l=arguments[1],c=arguments[2],p=arguments[3];this.elt[0]=new Re(w.NONE,w.NONE,w.NONE),this.elt[1]=new Re(w.NONE,w.NONE,w.NONE),this.elt[u].setLocations(l,c,p)}};Pe.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},Pe.prototype.setAllLocations=function(t,e){this.elt[t].setAllLocations(e)},Pe.prototype.isNull=function(t){return this.elt[t].isNull()},Pe.prototype.setAllLocationsIfNull=function(){if(1===arguments.length){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.elt[e].setAllLocationsIfNull(n)}},Pe.prototype.isLine=function(t){return this.elt[t].isLine()},Pe.prototype.merge=function(t){for(var e=0;e<2;e++)null===this.elt[e]&&null!==t.elt[e]?this.elt[e]=new Re(t.elt[e]):this.elt[e].merge(t.elt[e])},Pe.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Pe.prototype.getLocation=function(){if(1===arguments.length){var t=arguments[0];return this.elt[t].get(Se.ON)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return this.elt[e].get(n)}},Pe.prototype.toString=function(){var t=new D;return null!==this.elt[0]&&(t.append(\"A:\"),t.append(this.elt[0].toString())),null!==this.elt[1]&&(t.append(\" B:\"),t.append(this.elt[1].toString())),t.toString()},Pe.prototype.isArea=function(){if(0===arguments.length)return this.elt[0].isArea()||this.elt[1].isArea();if(1===arguments.length){var t=arguments[0];return this.elt[t].isArea()}},Pe.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()},Pe.prototype.setLocation=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(Se.ON,e)}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this.elt[n].setLocation(i,r)}},Pe.prototype.isEqualOnSide=function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},Pe.prototype.allPositionsEqual=function(t,e){return this.elt[t].allPositionsEqual(e)},Pe.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new Re(this.elt[t].location[0]))},Pe.prototype.interfaces_=function(){return[]},Pe.prototype.getClass=function(){return Pe},Pe.toLineLabel=function(t){for(var e=new Pe(w.NONE),n=0;n<2;n++)e.setLocation(n,t.getLocation(n));return e};var De=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new Nt,this._pts=new Nt,this._label=new Pe(w.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new Nt,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()};De.prototype.computeRing=function(){if(null!==this._ring)return null;for(var t=new Array(this._pts.size()).fill(null),e=0;e<this._pts.size();e++)t[e]=this._pts.get(e);this._ring=this._geometryFactory.createLinearRing(t),this._isHole=at.isCCW(this._ring.getCoordinates())},De.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},De.prototype.computePoints=function(t){this._startDe=t;var e=t,n=!0;do{if(null===e)throw new we(\"Found null DirectedEdge\");if(e.getEdgeRing()===this)throw new we(\"Directed Edge visited twice during ring-building at \"+e.getCoordinate());this._edges.add(e);var i=e.getLabel();et.isTrue(i.isArea()),this.mergeLabel(i),this.addPoints(e.getEdge(),e.isForward(),n),n=!1,this.setEdgeRing(e,this),e=this.getNext(e)}while(e!==this._startDe)},De.prototype.getLinearRing=function(){return this._ring},De.prototype.getCoordinate=function(t){return this._pts.get(t)},De.prototype.computeMaxNodeDegree=function(){this._maxNodeDegree=0;var t=this._startDe;do{var e=t.getNode().getEdges().getOutgoingDegree(this);e>this._maxNodeDegree&&(this._maxNodeDegree=e),t=this.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},De.prototype.addPoints=function(t,e,n){var i=t.getCoordinates();if(e){var r=1;n&&(r=0);for(var o=r;o<i.length;o++)this._pts.add(i[o])}else{var s=i.length-2;n&&(s=i.length-1);for(var a=s;a>=0;a--)this._pts.add(i[a])}},De.prototype.isHole=function(){return this._isHole},De.prototype.setInResult=function(){var t=this._startDe;do{t.getEdge().setInResult(!0),t=t.getNext()}while(t!==this._startDe)},De.prototype.containsPoint=function(t){var e=this.getLinearRing();if(!e.getEnvelopeInternal().contains(t))return!1;if(!at.isPointInRing(t,e.getCoordinates()))return!1;for(var n=this._holes.iterator();n.hasNext();){if(n.next().containsPoint(t))return!1}return!0},De.prototype.addHole=function(t){this._holes.add(t)},De.prototype.isShell=function(){return null===this._shell},De.prototype.getLabel=function(){return this._label},De.prototype.getEdges=function(){return this._edges},De.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},De.prototype.getShell=function(){return this._shell},De.prototype.mergeLabel=function(){if(1===arguments.length){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=e.getLocation(n,Se.RIGHT);if(i===w.NONE)return null;if(this._label.getLocation(n)===w.NONE)return this._label.setLocation(n,i),null}},De.prototype.setShell=function(t){this._shell=t,null!==t&&t.addHole(this)},De.prototype.toPolygon=function(t){for(var e=new Array(this._holes.size()).fill(null),n=0;n<this._holes.size();n++)e[n]=this._holes.get(n).getLinearRing();return t.createPolygon(this.getLinearRing(),e)},De.prototype.interfaces_=function(){return[]},De.prototype.getClass=function(){return De};var Me=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setEdgeRing=function(t,e){t.setMinEdgeRing(e)},e.prototype.getNext=function(t){return t.getNextMin()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(De),Ae=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildMinimalRings=function(){var t=new Nt,e=this._startDe;do{if(null===e.getMinEdgeRing()){var n=new Me(e,this._geometryFactory);t.add(n)}e=e.getNext()}while(e!==this._startDe);return t},e.prototype.setEdgeRing=function(t,e){t.setEdgeRing(e)},e.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var t=this._startDe;do{t.getNode().getEdges().linkMinimalDirectedEdges(this),t=t.getNext()}while(t!==this._startDe)},e.prototype.getNext=function(t){return t.getNext()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(De),Fe=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._label=t}};Fe.prototype.setVisited=function(t){this._isVisited=t},Fe.prototype.setInResult=function(t){this._isInResult=t},Fe.prototype.isCovered=function(){return this._isCovered},Fe.prototype.isCoveredSet=function(){return this._isCoveredSet},Fe.prototype.setLabel=function(t){this._label=t},Fe.prototype.getLabel=function(){return this._label},Fe.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0},Fe.prototype.updateIM=function(t){et.isTrue(this._label.getGeometryCount()>=2,\"found partial label\"),this.computeIM(t)},Fe.prototype.isInResult=function(){return this._isInResult},Fe.prototype.isVisited=function(){return this._isVisited},Fe.prototype.interfaces_=function(){return[]},Fe.prototype.getClass=function(){return Fe};var Ge=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var e=arguments[0],n=arguments[1];this._coord=e,this._edges=n,this._label=new Pe(0,w.NONE)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var t=this.getEdges().getEdges().iterator();t.hasNext();){if(t.next().getEdge().isInResult())return!0}return!1},e.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(t){t.println(\"node \"+this._coord+\" lbl: \"+this._label)},e.prototype.computeIM=function(t){},e.prototype.computeMergedLocation=function(t,e){var n=w.NONE;if(n=this._label.getLocation(e),!t.isNull(e)){var i=t.getLocation(e);n!==w.BOUNDARY&&(n=i)}return n},e.prototype.setLabel=function(){if(2!==arguments.length)return t.prototype.setLabel.apply(this,arguments);var e=arguments[0],n=arguments[1];null===this._label?this._label=new Pe(e,n):this._label.setLocation(e,n)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){if(arguments[0]instanceof e){var t=arguments[0];this.mergeLabel(t._label)}else if(arguments[0]instanceof Pe)for(var n=arguments[0],i=0;i<2;i++){var r=this.computeMergedLocation(n,i);this._label.getLocation(i)===w.NONE&&this._label.setLocation(i,r)}},e.prototype.add=function(t){this._edges.insert(t),t.setNode(this)},e.prototype.setLabelBoundary=function(t){if(null===this._label)return null;var e=w.NONE;null!==this._label&&(e=this._label.getLocation(t));var n=null;switch(e){case w.BOUNDARY:n=w.INTERIOR;break;case w.INTERIOR:default:n=w.BOUNDARY}this._label.setLocation(t,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Fe),qe=function(){this.nodeMap=new p,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};qe.prototype.find=function(t){return this.nodeMap.get(t)},qe.prototype.addNode=function(){if(arguments[0]instanceof C){var t=arguments[0],e=this.nodeMap.get(t);return null===e&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}if(arguments[0]instanceof Ge){var n=arguments[0],i=this.nodeMap.get(n.getCoordinate());return null===i?(this.nodeMap.put(n.getCoordinate(),n),n):(i.mergeLabel(n),i)}},qe.prototype.print=function(t){for(var e=this.iterator();e.hasNext();){e.next().print(t)}},qe.prototype.iterator=function(){return this.nodeMap.values().iterator()},qe.prototype.values=function(){return this.nodeMap.values()},qe.prototype.getBoundaryNodes=function(t){for(var e=new Nt,n=this.iterator();n.hasNext();){var i=n.next();i.getLabel().getLocation(t)===w.BOUNDARY&&e.add(i)}return e},qe.prototype.add=function(t){var e=t.getCoordinate();this.addNode(e).add(t)},qe.prototype.interfaces_=function(){return[]},qe.prototype.getClass=function(){return qe};var Be=function(){},Ve={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Be.prototype.interfaces_=function(){return[]},Be.prototype.getClass=function(){return Be},Be.isNorthern=function(t){return t===Be.NE||t===Be.NW},Be.isOpposite=function(t,e){if(t===e)return!1;return 2===(t-e+4)%4},Be.commonHalfPlane=function(t,e){if(t===e)return t;if(2===(t-e+4)%4)return-1;var n=t<e?t:e;return 0===n&&3===(t>e?t:e)?3:n},Be.isInHalfPlane=function(t,e){return e===Be.SE?t===Be.SE||t===Be.SW:t===e||t===e+1},Be.quadrant=function(){if(\"number\"==typeof arguments[0]&&\"number\"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new m(\"Cannot compute the quadrant for point ( \"+t+\", \"+e+\" )\");return t>=0?e>=0?Be.NE:Be.SE:e>=0?Be.NW:Be.SW}if(arguments[0]instanceof C&&arguments[1]instanceof C){var n=arguments[0],i=arguments[1];if(i.x===n.x&&i.y===n.y)throw new m(\"Cannot compute the quadrant for two identical points \"+n);return i.x>=n.x?i.y>=n.y?Be.NE:Be.SE:i.y>=n.y?Be.NW:Be.SW}},Ve.NE.get=function(){return 0},Ve.NW.get=function(){return 1},Ve.SW.get=function(){return 2},Ve.SE.get=function(){return 3},Object.defineProperties(Be,Ve);var Ue=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,1===arguments.length){var t=arguments[0];this._edge=t}else if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2];this._edge=e,this.init(n,i),this._label=null}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this._edge=r,this.init(o,s),this._label=a}};Ue.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:at.computeOrientation(t._p0,t._p1,this._p1)},Ue.prototype.getDy=function(){return this._dy},Ue.prototype.getCoordinate=function(){return this._p0},Ue.prototype.setNode=function(t){this._node=t},Ue.prototype.print=function(t){var e=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),i=n.lastIndexOf(\".\"),r=n.substring(i+1);t.print(\"  \"+r+\": \"+this._p0+\" - \"+this._p1+\" \"+this._quadrant+\":\"+e+\"   \"+this._label)},Ue.prototype.compareTo=function(t){var e=t;return this.compareDirection(e)},Ue.prototype.getDirectedCoordinate=function(){return this._p1},Ue.prototype.getDx=function(){return this._dx},Ue.prototype.getLabel=function(){return this._label},Ue.prototype.getEdge=function(){return this._edge},Ue.prototype.getQuadrant=function(){return this._quadrant},Ue.prototype.getNode=function(){return this._node},Ue.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),n=e.lastIndexOf(\".\");return\"  \"+e.substring(n+1)+\": \"+this._p0+\" - \"+this._p1+\" \"+this._quadrant+\":\"+t+\"   \"+this._label},Ue.prototype.computeLabel=function(t){},Ue.prototype.init=function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=Be.quadrant(this._dx,this._dy),et.isTrue(!(0===this._dx&&0===this._dy),\"EdgeEnd with identical endpoints found\")},Ue.prototype.interfaces_=function(){return[E]},Ue.prototype.getClass=function(){return Ue};var ze=function(t){function e(){var e=arguments[0],n=arguments[1];if(t.call(this,e),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=n,n)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var i=e.getNumPoints()-1;this.init(e.getCoordinate(i),e.getCoordinate(i-1))}this.computeDirectedLabel()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getNextMin=function(){return this._nextMin},e.prototype.getDepth=function(t){return this._depth[t]},e.prototype.setVisited=function(t){this._isVisited=t},e.prototype.computeDirectedLabel=function(){this._label=new Pe(this._edge.getLabel()),this._isForward||this._label.flip()},e.prototype.getNext=function(){return this._next},e.prototype.setDepth=function(t,e){if(-999!==this._depth[t]&&this._depth[t]!==e)throw new we(\"assigned depths do not match\",this.getCoordinate());this._depth[t]=e},e.prototype.isInteriorAreaEdge=function(){for(var t=!0,e=0;e<2;e++)this._label.isArea(e)&&this._label.getLocation(e,Se.LEFT)===w.INTERIOR&&this._label.getLocation(e,Se.RIGHT)===w.INTERIOR||(t=!1);return t},e.prototype.setNextMin=function(t){this._nextMin=t},e.prototype.print=function(e){t.prototype.print.call(this,e),e.print(\" \"+this._depth[Se.LEFT]+\"/\"+this._depth[Se.RIGHT]),e.print(\" (\"+this.getDepthDelta()+\")\"),this._isInResult&&e.print(\" inResult\")},e.prototype.setMinEdgeRing=function(t){this._minEdgeRing=t},e.prototype.isLineEdge=function(){var t=this._label.isLine(0)||this._label.isLine(1),e=!this._label.isArea(0)||this._label.allPositionsEqual(0,w.EXTERIOR),n=!this._label.isArea(1)||this._label.allPositionsEqual(1,w.EXTERIOR);return t&&e&&n},e.prototype.setEdgeRing=function(t){this._edgeRing=t},e.prototype.getMinEdgeRing=function(){return this._minEdgeRing},e.prototype.getDepthDelta=function(){var t=this._edge.getDepthDelta();return this._isForward||(t=-t),t},e.prototype.setInResult=function(t){this._isInResult=t},e.prototype.getSym=function(){return this._sym},e.prototype.isForward=function(){return this._isForward},e.prototype.getEdge=function(){return this._edge},e.prototype.printEdge=function(t){this.print(t),t.print(\" \"),this._isForward?this._edge.print(t):this._edge.printReverse(t)},e.prototype.setSym=function(t){this._sym=t},e.prototype.setVisitedEdge=function(t){this.setVisited(t),this._sym.setVisited(t)},e.prototype.setEdgeDepths=function(t,e){var n=this.getEdge().getDepthDelta();this._isForward||(n=-n);var i=1;t===Se.LEFT&&(i=-1);var r=Se.opposite(t),o=e+n*i;this.setDepth(t,e),this.setDepth(r,o)},e.prototype.getEdgeRing=function(){return this._edgeRing},e.prototype.isInResult=function(){return this._isInResult},e.prototype.setNext=function(t){this._next=t},e.prototype.isVisited=function(){return this._isVisited},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.depthFactor=function(t,e){return t===w.EXTERIOR&&e===w.INTERIOR?1:t===w.INTERIOR&&e===w.EXTERIOR?-1:0},e}(Ue),Xe=function(){};Xe.prototype.createNode=function(t){return new Ge(t,null)},Xe.prototype.interfaces_=function(){return[]},Xe.prototype.getClass=function(){return Xe};var Ye=function(){if(this._edges=new Nt,this._nodes=null,this._edgeEndList=new Nt,0===arguments.length)this._nodes=new qe(new Xe);else if(1===arguments.length){var t=arguments[0];this._nodes=new qe(t)}};Ye.prototype.printEdges=function(t){t.println(\"Edges:\");for(var e=0;e<this._edges.size();e++){t.println(\"edge \"+e+\":\");var n=this._edges.get(e);n.print(t),n.eiList.print(t)}},Ye.prototype.find=function(t){return this._nodes.find(t)},Ye.prototype.addNode=function(){if(arguments[0]instanceof Ge){var t=arguments[0];return this._nodes.addNode(t)}if(arguments[0]instanceof C){var e=arguments[0];return this._nodes.addNode(e)}},Ye.prototype.getNodeIterator=function(){return this._nodes.iterator()},Ye.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){t.next().getEdges().linkResultDirectedEdges()}},Ye.prototype.debugPrintln=function(t){Y.out.println(t)},Ye.prototype.isBoundaryNode=function(t,e){var n=this._nodes.find(e);if(null===n)return!1;var i=n.getLabel();return null!==i&&i.getLocation(t)===w.BOUNDARY},Ye.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){t.next().getEdges().linkAllDirectedEdges()}},Ye.prototype.matchInSameDirection=function(t,e,n,i){return!!t.equals(n)&&(at.computeOrientation(t,e,i)===at.COLLINEAR&&Be.quadrant(t,e)===Be.quadrant(n,i))},Ye.prototype.getEdgeEnds=function(){return this._edgeEndList},Ye.prototype.debugPrint=function(t){Y.out.print(t)},Ye.prototype.getEdgeIterator=function(){return this._edges.iterator()},Ye.prototype.findEdgeInSameDirection=function(t,e){for(var n=0;n<this._edges.size();n++){var i=this._edges.get(n),r=i.getCoordinates();if(this.matchInSameDirection(t,e,r[0],r[1]))return i;if(this.matchInSameDirection(t,e,r[r.length-1],r[r.length-2]))return i}return null},Ye.prototype.insertEdge=function(t){this._edges.add(t)},Ye.prototype.findEdgeEnd=function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var n=e.next();if(n.getEdge()===t)return n}return null},Ye.prototype.addEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this._edges.add(n);var i=new ze(n,!0),r=new ze(n,!1);i.setSym(r),r.setSym(i),this.add(i),this.add(r)}},Ye.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)},Ye.prototype.getNodes=function(){return this._nodes.values()},Ye.prototype.findEdge=function(t,e){for(var n=0;n<this._edges.size();n++){var i=this._edges.get(n),r=i.getCoordinates();if(t.equals(r[0])&&e.equals(r[1]))return i}return null},Ye.prototype.interfaces_=function(){return[]},Ye.prototype.getClass=function(){return Ye},Ye.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();){e.next().getEdges().linkResultDirectedEdges()}};var ke=function(){this._geometryFactory=null,this._shellList=new Nt;var t=arguments[0];this._geometryFactory=t};ke.prototype.sortShellsAndHoles=function(t,e,n){for(var i=t.iterator();i.hasNext();){var r=i.next();r.isHole()?n.add(r):e.add(r)}},ke.prototype.computePolygons=function(t){for(var e=new Nt,n=t.iterator();n.hasNext();){var i=n.next().toPolygon(this._geometryFactory);e.add(i)}return e},ke.prototype.placeFreeHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();if(null===i.getShell()){var r=this.findEdgeRingContaining(i,t);if(null===r)throw new we(\"unable to assign hole to a shell\",i.getCoordinate(0));i.setShell(r)}}},ke.prototype.buildMinimalEdgeRings=function(t,e,n){for(var i=new Nt,r=t.iterator();r.hasNext();){var o=r.next();if(o.getMaxNodeDegree()>2){o.linkDirectedEdgesForMinimalEdgeRings();var s=o.buildMinimalRings(),a=this.findShell(s);null!==a?(this.placePolygonHoles(a,s),e.add(a)):n.addAll(s)}else i.add(o)}return i},ke.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();){if(e.next().containsPoint(t))return!0}return!1},ke.prototype.buildMaximalEdgeRings=function(t){for(var e=new Nt,n=t.iterator();n.hasNext();){var i=n.next();if(i.isInResult()&&i.getLabel().isArea()&&null===i.getEdgeRing()){var r=new Ae(i,this._geometryFactory);e.add(r),r.setInResult()}}return e},ke.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();i.isHole()&&i.setShell(t)}},ke.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},ke.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),i=n.getEnvelopeInternal(),r=n.getCoordinateN(0),o=null,s=null,a=e.iterator();a.hasNext();){var u=a.next(),l=u.getLinearRing(),c=l.getEnvelopeInternal();null!==o&&(s=o.getLinearRing().getEnvelopeInternal());var p=!1;c.contains(i)&&at.isPointInRing(r,l.getCoordinates())&&(p=!0),p&&(null===o||s.contains(c))&&(o=u)}return o},ke.prototype.findShell=function(t){for(var e=0,n=null,i=t.iterator();i.hasNext();){var r=i.next();r.isHole()||(n=r,e++)}return et.isTrue(e<=1,\"found two shells in MinimalEdgeRing list\"),n},ke.prototype.add=function(){if(1===arguments.length){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(2===arguments.length){var e=arguments[0],n=arguments[1];Ye.linkResultDirectedEdges(n);var i=this.buildMaximalEdgeRings(e),r=new Nt,o=this.buildMinimalEdgeRings(i,this._shellList,r);this.sortShellsAndHoles(o,this._shellList,r),this.placeFreeHoles(this._shellList,r)}},ke.prototype.interfaces_=function(){return[]},ke.prototype.getClass=function(){return ke};var je=function(){};je.prototype.getBounds=function(){},je.prototype.interfaces_=function(){return[]},je.prototype.getClass=function(){return je};var He=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};He.prototype.getItem=function(){return this._item},He.prototype.getBounds=function(){return this._bounds},He.prototype.interfaces_=function(){return[je,e]},He.prototype.getClass=function(){return He};var We=function(){this._size=null,this._items=null,this._size=0,this._items=new Nt,this._items.add(null)};We.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},We.prototype.size=function(){return this._size},We.prototype.reorder=function(t){for(var e=null,n=this._items.get(t);2*t<=this._size&&((e=2*t)!==this._size&&this._items.get(e+1).compareTo(this._items.get(e))<0&&e++,this._items.get(e).compareTo(n)<0);t=e)this._items.set(t,this._items.get(e));this._items.set(t,n)},We.prototype.clear=function(){this._size=0,this._items.clear()},We.prototype.isEmpty=function(){return 0===this._size},We.prototype.add=function(t){this._items.add(null),this._size+=1;var e=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(e/2)))<0;e/=2)this._items.set(e,this._items.get(Math.trunc(e/2)));this._items.set(e,t)},We.prototype.interfaces_=function(){return[]},We.prototype.getClass=function(){return We};var Ke=function(){};Ke.prototype.visitItem=function(t){},Ke.prototype.interfaces_=function(){return[]},Ke.prototype.getClass=function(){return Ke};var Je=function(){};Je.prototype.insert=function(t,e){},Je.prototype.remove=function(t,e){},Je.prototype.query=function(){},Je.prototype.interfaces_=function(){return[]},Je.prototype.getClass=function(){return Je};var Qe=function(){if(this._childBoundables=new Nt,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._level=t}},Ze={serialVersionUID:{configurable:!0}};Qe.prototype.getLevel=function(){return this._level},Qe.prototype.size=function(){return this._childBoundables.size()},Qe.prototype.getChildBoundables=function(){return this._childBoundables},Qe.prototype.addChildBoundable=function(t){et.isTrue(null===this._bounds),this._childBoundables.add(t)},Qe.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Qe.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},Qe.prototype.interfaces_=function(){return[je,e]},Qe.prototype.getClass=function(){return Qe},Ze.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties(Qe,Ze);var $e=function(){};$e.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}},$e.min=function(t){return $e.sort(t),t.get(0)},$e.sort=function(t,e){var n=t.toArray();e?Gt.sort(n,e):Gt.sort(n);for(var i=t.iterator(),r=0,o=n.length;r<o;r++)i.next(),i.set(n[r])},$e.singletonList=function(t){var e=new Nt;return e.add(t),e};var tn=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],n=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=n,this._distance=this.distance()};tn.prototype.expandToQueue=function(t,e){var n=tn.isComposite(this._boundable1),i=tn.isComposite(this._boundable2);if(n&&i)return tn.area(this._boundable1)>tn.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(i)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new m(\"neither boundable is composite\")},tn.prototype.isLeaves=function(){return!(tn.isComposite(this._boundable1)||tn.isComposite(this._boundable2))},tn.prototype.compareTo=function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},tn.prototype.expand=function(t,e,n,i){for(var r=t.getChildBoundables().iterator();r.hasNext();){var o=r.next(),s=new tn(o,e,this._itemDistance);s.getDistance()<i&&n.add(s)}},tn.prototype.getBoundable=function(t){return 0===t?this._boundable1:this._boundable2},tn.prototype.getDistance=function(){return this._distance},tn.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},tn.prototype.interfaces_=function(){return[E]},tn.prototype.getClass=function(){return tn},tn.area=function(t){return t.getBounds().getArea()},tn.isComposite=function(t){return t instanceof Qe};var en=function t(){if(this._root=null,this._built=!1,this._itemBoundables=new Nt,this._nodeCapacity=null,0===arguments.length){var e=t.DEFAULT_NODE_CAPACITY;this._nodeCapacity=e}else if(1===arguments.length){var n=arguments[0];et.isTrue(n>1,\"Node capacity must be greater than 1\"),this._nodeCapacity=n}},nn={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};en.prototype.getNodeCapacity=function(){return this._nodeCapacity},en.prototype.lastNode=function(t){return t.get(t.size()-1)},en.prototype.size=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();n instanceof Qe?t+=this.size(n):n instanceof He&&(t+=1)}return t}},en.prototype.removeItem=function(t,e){for(var n=null,i=t.getChildBoundables().iterator();i.hasNext();){var r=i.next();r instanceof He&&r.getItem()===e&&(n=r)}return null!==n&&(t.getChildBoundables().remove(n),!0)},en.prototype.itemsTree=function(){if(0===arguments.length){this.build();var t=this.itemsTree(this._root);return null===t?new Nt:t}if(1===arguments.length){for(var e=arguments[0],n=new Nt,i=e.getChildBoundables().iterator();i.hasNext();){var r=i.next();if(r instanceof Qe){var o=this.itemsTree(r);null!==o&&n.add(o)}else r instanceof He?n.add(r.getItem()):et.shouldNeverReachHere()}return n.size()<=0?null:n}},en.prototype.insert=function(t,e){et.isTrue(!this._built,\"Cannot insert items into an STR packed R-tree after it has been built.\"),this._itemBoundables.add(new He(t,e))},en.prototype.boundablesAtLevel=function(){if(1===arguments.length){var t=arguments[0],e=new Nt;return this.boundablesAtLevel(t,this._root,e),e}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];if(et.isTrue(n>-2),i.getLevel()===n)return r.add(i),null;for(var o=i.getChildBoundables().iterator();o.hasNext();){var s=o.next();s instanceof Qe?this.boundablesAtLevel(n,s,r):(et.isTrue(s instanceof He),-1===n&&r.add(s))}return null}},en.prototype.query=function(){if(1===arguments.length){var t=arguments[0];this.build();var e=new Nt;return this.isEmpty()?e:(this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.query(t,this._root,e),e)}if(2===arguments.length){var n=arguments[0],i=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.query(n,this._root,i)}else if(3===arguments.length)if(T(arguments[2],Ke)&&arguments[0]instanceof Object&&arguments[1]instanceof Qe)for(var r=arguments[0],o=arguments[1],s=arguments[2],a=o.getChildBoundables(),u=0;u<a.size();u++){var l=a.get(u);this.getIntersectsOp().intersects(l.getBounds(),r)&&(l instanceof Qe?this.query(r,l,s):l instanceof He?s.visitItem(l.getItem()):et.shouldNeverReachHere())}else if(T(arguments[2],xt)&&arguments[0]instanceof Object&&arguments[1]instanceof Qe)for(var c=arguments[0],p=arguments[1],h=arguments[2],f=p.getChildBoundables(),g=0;g<f.size();g++){var d=f.get(g);this.getIntersectsOp().intersects(d.getBounds(),c)&&(d instanceof Qe?this.query(c,d,h):d instanceof He?h.add(d.getItem()):et.shouldNeverReachHere())}},en.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},en.prototype.getRoot=function(){return this.build(),this._root},en.prototype.remove=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.remove(t,this._root,e)}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],o=this.removeItem(i,r);if(o)return!0;for(var s=null,a=i.getChildBoundables().iterator();a.hasNext();){var u=a.next();if(this.getIntersectsOp().intersects(u.getBounds(),n)&&(u instanceof Qe&&(o=this.remove(n,u,r)))){s=u;break}}return null!==s&&s.getChildBoundables().isEmpty()&&i.getChildBoundables().remove(s),o}},en.prototype.createHigherLevels=function(t,e){et.isTrue(!t.isEmpty());var n=this.createParentBoundables(t,e+1);return 1===n.size()?n.get(0):this.createHigherLevels(n,e+1)},en.prototype.depth=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();if(n instanceof Qe){var i=this.depth(n);i>t&&(t=i)}}return t+1}},en.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var n=new Nt;n.add(this.createNode(e));var i=new Nt(t);$e.sort(i,this.getComparator());for(var r=i.iterator();r.hasNext();){var o=r.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(e)),this.lastNode(n).addChildBoundable(o)}return n},en.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},en.prototype.interfaces_=function(){return[e]},en.prototype.getClass=function(){return en},en.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},nn.IntersectsOp.get=function(){return rn},nn.serialVersionUID.get=function(){return-0x35ef64c82d4c5400},nn.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(en,nn);var rn=function(){},on=function(){};on.prototype.distance=function(t,e){},on.prototype.interfaces_=function(){return[]},on.prototype.getClass=function(){return on};var sn=function(t){function n(e){e=e||n.DEFAULT_NODE_CAPACITY,t.call(this,e)}t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n;var i={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return n.prototype.createParentBoundablesFromVerticalSlices=function(t,e){et.isTrue(t.length>0);for(var n=new Nt,i=0;i<t.length;i++)n.addAll(this.createParentBoundablesFromVerticalSlice(t[i],e));return n},n.prototype.createNode=function(t){return new an(t)},n.prototype.size=function(){return 0===arguments.length?t.prototype.size.call(this):t.prototype.size.apply(this,arguments)},n.prototype.insert=function(){if(2!==arguments.length)return t.prototype.insert.apply(this,arguments);var e=arguments[0],n=arguments[1];if(e.isNull())return null;t.prototype.insert.call(this,e,n)},n.prototype.getIntersectsOp=function(){return n.intersectsOp},n.prototype.verticalSlices=function(t,e){for(var n=Math.trunc(Math.ceil(t.size()/e)),i=new Array(e).fill(null),r=t.iterator(),o=0;o<e;o++){i[o]=new Nt;for(var s=0;r.hasNext()&&s<n;){var a=r.next();i[o].add(a),s++}}return i},n.prototype.query=function(){if(1===arguments.length){var e=arguments[0];return t.prototype.query.call(this,e)}if(2===arguments.length){var n=arguments[0],i=arguments[1];t.prototype.query.call(this,n,i)}else if(3===arguments.length)if(T(arguments[2],Ke)&&arguments[0]instanceof Object&&arguments[1]instanceof Qe){var r=arguments[0],o=arguments[1],s=arguments[2];t.prototype.query.call(this,r,o,s)}else if(T(arguments[2],xt)&&arguments[0]instanceof Object&&arguments[1]instanceof Qe){var a=arguments[0],u=arguments[1],l=arguments[2];t.prototype.query.call(this,a,u,l)}},n.prototype.getComparator=function(){return n.yComparator},n.prototype.createParentBoundablesFromVerticalSlice=function(e,n){return t.prototype.createParentBoundables.call(this,e,n)},n.prototype.remove=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return t.prototype.remove.call(this,e,n)}return t.prototype.remove.apply(this,arguments)},n.prototype.depth=function(){return 0===arguments.length?t.prototype.depth.call(this):t.prototype.depth.apply(this,arguments)},n.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var i=Math.trunc(Math.ceil(t.size()/this.getNodeCapacity())),r=new Nt(t);$e.sort(r,n.xComparator);var o=this.verticalSlices(r,Math.trunc(Math.ceil(Math.sqrt(i))));return this.createParentBoundablesFromVerticalSlices(o,e)},n.prototype.nearestNeighbour=function(){if(1===arguments.length){if(T(arguments[0],on)){var t=arguments[0],e=new tn(this.getRoot(),this.getRoot(),t);return this.nearestNeighbour(e)}if(arguments[0]instanceof tn){var i=arguments[0];return this.nearestNeighbour(i,v.POSITIVE_INFINITY)}}else if(2===arguments.length){if(arguments[0]instanceof n&&T(arguments[1],on)){var r=arguments[0],o=arguments[1],s=new tn(this.getRoot(),r.getRoot(),o);return this.nearestNeighbour(s)}if(arguments[0]instanceof tn&&\"number\"==typeof arguments[1]){var a=arguments[0],u=arguments[1],l=null,c=new We;for(c.add(a);!c.isEmpty()&&u>0;){var p=c.poll(),h=p.getDistance();if(h>=u)break;p.isLeaves()?(u=h,l=p):p.expandToQueue(c,u)}return[l.getBoundable(0).getItem(),l.getBoundable(1).getItem()]}}else if(3===arguments.length){var f=arguments[0],g=arguments[1],d=arguments[2],y=new He(f,g),_=new tn(this.getRoot(),y,d);return this.nearestNeighbour(_)[0]}},n.prototype.interfaces_=function(){return[Je,e]},n.prototype.getClass=function(){return n},n.centreX=function(t){return n.avg(t.getMinX(),t.getMaxX())},n.avg=function(t,e){return(t+e)/2},n.centreY=function(t){return n.avg(t.getMinY(),t.getMaxY())},i.STRtreeNode.get=function(){return an},i.serialVersionUID.get=function(){return 0x39920f7d5f261e0},i.xComparator.get=function(){return{interfaces_:function(){return[N]},compare:function(e,i){return t.compareDoubles(n.centreX(e.getBounds()),n.centreX(i.getBounds()))}}},i.yComparator.get=function(){return{interfaces_:function(){return[N]},compare:function(e,i){return t.compareDoubles(n.centreY(e.getBounds()),n.centreY(i.getBounds()))}}},i.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(t,e){return t.intersects(e)}}},i.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(n,i),n}(en),an=function(t){function e(){var e=arguments[0];t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var n=e.next();null===t?t=new j(n.getBounds()):t.expandToInclude(n.getBounds())}return t},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Qe),un=function(){};un.prototype.interfaces_=function(){return[]},un.prototype.getClass=function(){return un},un.relativeSign=function(t,e){return t<e?-1:t>e?1:0},un.compare=function(t,e,n){if(e.equals2D(n))return 0;var i=un.relativeSign(e.x,n.x),r=un.relativeSign(e.y,n.y);switch(t){case 0:return un.compareValue(i,r);case 1:return un.compareValue(r,i);case 2:return un.compareValue(r,-i);case 3:return un.compareValue(-i,r);case 4:return un.compareValue(-i,-r);case 5:return un.compareValue(-r,-i);case 6:return un.compareValue(-r,i);case 7:return un.compareValue(i,-r)}return et.shouldNeverReachHere(\"invalid octant value\"),0},un.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var ln=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._segString=t,this.coord=new C(e),this.segmentIndex=n,this._segmentOctant=i,this._isInterior=!e.equals2D(t.getCoordinate(n))};ln.prototype.getCoordinate=function(){return this.coord},ln.prototype.print=function(t){t.print(this.coord),t.print(\" seg # = \"+this.segmentIndex)},ln.prototype.compareTo=function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:un.compare(this._segmentOctant,this.coord,e.coord)},ln.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===t},ln.prototype.isInterior=function(){return this._isInterior},ln.prototype.interfaces_=function(){return[E]},ln.prototype.getClass=function(){return ln};var cn=function(){this._nodeMap=new p,this._edge=null;var t=arguments[0];this._edge=t};cn.prototype.getSplitCoordinates=function(){var t=new St;this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var i=e.next();this.addEdgeCoordinates(n,i,t),n=i}return t.toCoordinateArray()},cn.prototype.addCollapsedNodes=function(){var t=new Nt;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var e=t.iterator();e.hasNext();){var n=e.next().intValue();this.add(this._edge.getCoordinate(n),n)}},cn.prototype.print=function(t){t.println(\"Intersections:\");for(var e=this.iterator();e.hasNext();){e.next().print(t)}},cn.prototype.findCollapsesFromExistingVertices=function(t){for(var e=0;e<this._edge.size()-2;e++){var n=this._edge.getCoordinate(e),i=this._edge.getCoordinate(e+2);n.equals2D(i)&&t.add(new M(e+1))}},cn.prototype.addEdgeCoordinates=function(t,e,n){var i=this._edge.getCoordinate(e.segmentIndex),r=e.isInterior()||!e.coord.equals2D(i);n.add(new C(t.coord),!1);for(var o=t.segmentIndex+1;o<=e.segmentIndex;o++)n.add(this._edge.getCoordinate(o));r&&n.add(new C(e.coord))},cn.prototype.iterator=function(){return this._nodeMap.values().iterator()},cn.prototype.addSplitEdges=function(t){this.addEndpoints(),this.addCollapsedNodes();for(var e=this.iterator(),n=e.next();e.hasNext();){var i=e.next(),r=this.createSplitEdge(n,i);t.add(r),n=i}},cn.prototype.findCollapseIndex=function(t,e,n){if(!t.coord.equals2D(e.coord))return!1;var i=e.segmentIndex-t.segmentIndex;return e.isInterior()||i--,1===i&&(n[0]=t.segmentIndex+1,!0)},cn.prototype.findCollapsesFromInsertedNodes=function(t){for(var e=new Array(1).fill(null),n=this.iterator(),i=n.next();n.hasNext();){var r=n.next();this.findCollapseIndex(i,r,e)&&t.add(new M(e[0])),i=r}},cn.prototype.getEdge=function(){return this._edge},cn.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},cn.prototype.createSplitEdge=function(t,e){var n=e.segmentIndex-t.segmentIndex+2,i=this._edge.getCoordinate(e.segmentIndex),r=e.isInterior()||!e.coord.equals2D(i);r||n--;var o=new Array(n).fill(null),s=0;o[s++]=new C(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)o[s++]=this._edge.getCoordinate(a);return r&&(o[s]=new C(e.coord)),new gn(o,this._edge.getData())},cn.prototype.add=function(t,e){var n=new ln(this._edge,t,e,this._edge.getSegmentOctant(e)),i=this._nodeMap.get(n);return null!==i?(et.isTrue(i.coord.equals2D(t),\"Found equal nodes with different coordinates\"),i):(this._nodeMap.put(n,n),n)},cn.prototype.checkSplitEdgesCorrectness=function(t){var e=this._edge.getCoordinates(),n=t.get(0).getCoordinate(0);if(!n.equals2D(e[0]))throw new $(\"bad split edge start point at \"+n);var i=t.get(t.size()-1).getCoordinates(),r=i[i.length-1];if(!r.equals2D(e[e.length-1]))throw new $(\"bad split edge end point at \"+r)},cn.prototype.interfaces_=function(){return[]},cn.prototype.getClass=function(){return cn};var pn=function(){};pn.prototype.interfaces_=function(){return[]},pn.prototype.getClass=function(){return pn},pn.octant=function(){if(\"number\"==typeof arguments[0]&&\"number\"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new m(\"Cannot compute the octant for point ( \"+t+\", \"+e+\" )\");var n=Math.abs(t),i=Math.abs(e);return t>=0?e>=0?n>=i?0:1:n>=i?7:6:e>=0?n>=i?3:2:n>=i?4:5}if(arguments[0]instanceof C&&arguments[1]instanceof C){var r=arguments[0],o=arguments[1],s=o.x-r.x,a=o.y-r.y;if(0===s&&0===a)throw new m(\"Cannot compute the octant for two identical points \"+r);return pn.octant(s,a)}};var hn=function(){};hn.prototype.getCoordinates=function(){},hn.prototype.size=function(){},hn.prototype.getCoordinate=function(t){},hn.prototype.isClosed=function(){},hn.prototype.setData=function(t){},hn.prototype.getData=function(){},hn.prototype.interfaces_=function(){return[]},hn.prototype.getClass=function(){return hn};var fn=function(){};fn.prototype.addIntersection=function(t,e){},fn.prototype.interfaces_=function(){return[hn]},fn.prototype.getClass=function(){return fn};var gn=function(){this._nodeList=new cn(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};gn.prototype.getCoordinates=function(){return this._pts},gn.prototype.size=function(){return this._pts.length},gn.prototype.getCoordinate=function(t){return this._pts[t]},gn.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},gn.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},gn.prototype.setData=function(t){this._data=t},gn.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:pn.octant(t,e)},gn.prototype.getData=function(){return this._data},gn.prototype.addIntersection=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(4===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[3],o=new C(n.getIntersection(r));this.addIntersection(o,i)}},gn.prototype.toString=function(){return Z.toLineString(new ue(this._pts))},gn.prototype.getNodeList=function(){return this._nodeList},gn.prototype.addIntersectionNode=function(t,e){var n=e,i=n+1;if(i<this._pts.length){var r=this._pts[i];t.equals2D(r)&&(n=i)}return this._nodeList.add(t,n)},gn.prototype.addIntersections=function(t,e,n){for(var i=0;i<t.getIntersectionNum();i++)this.addIntersection(t,e,n,i)},gn.prototype.interfaces_=function(){return[fn]},gn.prototype.getClass=function(){return gn},gn.getNodedSubstrings=function(){if(1===arguments.length){var t=arguments[0],e=new Nt;return gn.getNodedSubstrings(t,e),e}if(2===arguments.length)for(var n=arguments[0],i=arguments[1],r=n.iterator();r.hasNext();){r.next().getNodeList().addSplitEdges(i)}};var dn=function(){if(this.p0=null,this.p1=null,0===arguments.length)this.p0=new C,this.p1=new C;else if(1===arguments.length){var t=arguments[0];this.p0=new C(t.p0),this.p1=new C(t.p1)}else if(2===arguments.length)this.p0=arguments[0],this.p1=arguments[1];else if(4===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2],r=arguments[3];this.p0=new C(e,n),this.p1=new C(i,r)}},yn={serialVersionUID:{configurable:!0}};dn.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},dn.prototype.orientationIndex=function(){if(arguments[0]instanceof dn){var t=arguments[0],e=at.orientationIndex(this.p0,this.p1,t.p0),n=at.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&n>=0?Math.max(e,n):e<=0&&n<=0?Math.max(e,n):0}if(arguments[0]instanceof C){var i=arguments[0];return at.orientationIndex(this.p0,this.p1,i)}},dn.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},dn.prototype.isVertical=function(){return this.p0.x===this.p1.x},dn.prototype.equals=function(t){if(!(t instanceof dn))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},dn.prototype.intersection=function(t){var e=new rt;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},dn.prototype.project=function(){if(arguments[0]instanceof C){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new C(t);var e=this.projectionFactor(t),n=new C;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}if(arguments[0]instanceof dn){var i=arguments[0],r=this.projectionFactor(i.p0),o=this.projectionFactor(i.p1);if(r>=1&&o>=1)return null;if(r<=0&&o<=0)return null;var s=this.project(i.p0);r<0&&(s=this.p0),r>1&&(s=this.p1);var a=this.project(i.p1);return o<0&&(a=this.p0),o>1&&(a=this.p1),new dn(s,a)}},dn.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},dn.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},dn.prototype.getCoordinate=function(t){return 0===t?this.p0:this.p1},dn.prototype.distancePerpendicular=function(t){return at.distancePointLinePerpendicular(t,this.p0,this.p1)},dn.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},dn.prototype.midPoint=function(){return dn.midPoint(this.p0,this.p1)},dn.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,i=e*e+n*n;if(i<=0)return v.NaN;return((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/i},dn.prototype.closestPoints=function(t){var e=this.intersection(t);if(null!==e)return[e,e];var n=new Array(2).fill(null),i=v.MAX_VALUE,r=null,o=this.closestPoint(t.p0);i=o.distance(t.p0),n[0]=o,n[1]=t.p0;var s=this.closestPoint(t.p1);(r=s.distance(t.p1))<i&&(i=r,n[0]=s,n[1]=t.p1);var a=t.closestPoint(this.p0);(r=a.distance(this.p0))<i&&(i=r,n[0]=this.p0,n[1]=a);var u=t.closestPoint(this.p1);return(r=u.distance(this.p1))<i&&(i=r,n[0]=this.p1,n[1]=u),n},dn.prototype.closestPoint=function(t){var e=this.projectionFactor(t);if(e>0&&e<1)return this.project(t);return this.p0.distance(t)<this.p1.distance(t)?this.p0:this.p1},dn.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},dn.prototype.getLength=function(){return this.p0.distance(this.p1)},dn.prototype.compareTo=function(t){var e=t,n=this.p0.compareTo(e.p0);return 0!==n?n:this.p1.compareTo(e.p1)},dn.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t},dn.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)},dn.prototype.lineIntersection=function(t){try{return k.intersection(this.p0,this.p1,t.p0,t.p1)}catch(t){if(!(t instanceof X))throw t}return null},dn.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},dn.prototype.pointAlongOffset=function(t,e){var n=this.p0.x+t*(this.p1.x-this.p0.x),i=this.p0.y+t*(this.p1.y-this.p0.y),r=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,s=Math.sqrt(r*r+o*o),a=0,u=0;if(0!==e){if(s<=0)throw new Error(\"Cannot compute offset from zero-length line segment\");a=e*r/s,u=e*o/s}return new C(n-u,i+a)},dn.prototype.setCoordinates=function(){if(1===arguments.length){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=n.x,this.p1.y=n.y}},dn.prototype.segmentFraction=function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||v.isNaN(e))&&(e=1),e},dn.prototype.toString=function(){return\"LINESTRING( \"+this.p0.x+\" \"+this.p0.y+\", \"+this.p1.x+\" \"+this.p1.y+\")\"},dn.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},dn.prototype.distance=function(){if(arguments[0]instanceof dn){var t=arguments[0];return at.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof C){var e=arguments[0];return at.distancePointLine(e,this.p0,this.p1)}},dn.prototype.pointAlong=function(t){var e=new C;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},dn.prototype.hashCode=function(){var t=v.doubleToLongBits(this.p0.x);t^=31*v.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),n=v.doubleToLongBits(this.p1.x);n^=31*v.doubleToLongBits(this.p1.y);return e^(Math.trunc(n)^Math.trunc(n>>32))},dn.prototype.interfaces_=function(){return[E,e]},dn.prototype.getClass=function(){return dn},dn.midPoint=function(t,e){return new C((t.x+e.x)/2,(t.y+e.y)/2)},yn.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(dn,yn);var _n=function(){this.tempEnv1=new j,this.tempEnv2=new j,this._overlapSeg1=new dn,this._overlapSeg2=new dn};_n.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},_n.prototype.interfaces_=function(){return[]},_n.prototype.getClass=function(){return _n};var mn=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=i};mn.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},mn.prototype.computeSelect=function(t,e,n,i){var r=this._pts[e],o=this._pts[n];if(i.tempEnv1.init(r,o),n-e==1)return i.select(this,e),null;if(!t.intersects(i.tempEnv1))return null;var s=Math.trunc((e+n)/2);e<s&&this.computeSelect(t,e,s,i),s<n&&this.computeSelect(t,s,n,i)},mn.prototype.getCoordinates=function(){for(var t=new Array(this._end-this._start+1).fill(null),e=0,n=this._start;n<=this._end;n++)t[e++]=this._pts[n];return t},mn.prototype.computeOverlaps=function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)},mn.prototype.setId=function(t){this._id=t},mn.prototype.select=function(t,e){this.computeSelect(t,this._start,this._end,e)},mn.prototype.getEnvelope=function(){if(null===this._env){var t=this._pts[this._start],e=this._pts[this._end];this._env=new j(t,e)}return this._env},mn.prototype.getEndIndex=function(){return this._end},mn.prototype.getStartIndex=function(){return this._start},mn.prototype.getContext=function(){return this._context},mn.prototype.getId=function(){return this._id},mn.prototype.computeOverlapsInternal=function(t,e,n,i,r,o){var s=this._pts[t],a=this._pts[e],u=n._pts[i],l=n._pts[r];if(e-t==1&&r-i==1)return o.overlap(this,t,n,i),null;if(o.tempEnv1.init(s,a),o.tempEnv2.init(u,l),!o.tempEnv1.intersects(o.tempEnv2))return null;var c=Math.trunc((t+e)/2),p=Math.trunc((i+r)/2);t<c&&(i<p&&this.computeOverlapsInternal(t,c,n,i,p,o),p<r&&this.computeOverlapsInternal(t,c,n,p,r,o)),c<e&&(i<p&&this.computeOverlapsInternal(c,e,n,i,p,o),p<r&&this.computeOverlapsInternal(c,e,n,p,r,o))},mn.prototype.interfaces_=function(){return[]},mn.prototype.getClass=function(){return mn};var vn=function(){};vn.prototype.interfaces_=function(){return[]},vn.prototype.getClass=function(){return vn},vn.getChainStartIndices=function(t){var e=0,n=new Nt;n.add(new M(e));do{var i=vn.findChainEnd(t,e);n.add(new M(i)),e=i}while(e<t.length-1);return vn.toIntArray(n)},vn.findChainEnd=function(t,e){for(var n=e;n<t.length-1&&t[n].equals2D(t[n+1]);)n++;if(n>=t.length-1)return t.length-1;for(var i=Be.quadrant(t[n],t[n+1]),r=e+1;r<t.length;){if(!t[r-1].equals2D(t[r])){if(Be.quadrant(t[r-1],t[r])!==i)break}r++}return r-1},vn.getChains=function(){if(1===arguments.length){var t=arguments[0];return vn.getChains(t,null)}if(2===arguments.length){for(var e=arguments[0],n=arguments[1],i=new Nt,r=vn.getChainStartIndices(e),o=0;o<r.length-1;o++){var s=new mn(e,r[o],r[o+1],n);i.add(s)}return i}},vn.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var In=function(){};In.prototype.computeNodes=function(t){},In.prototype.getNodedSubstrings=function(){},In.prototype.interfaces_=function(){return[]},In.prototype.getClass=function(){return In};var En=function(){if(this._segInt=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.setSegmentIntersector(t)}};En.prototype.setSegmentIntersector=function(t){this._segInt=t},En.prototype.interfaces_=function(){return[In]},En.prototype.getClass=function(){return En};var xn=function(t){function e(e){e?t.call(this,e):t.call(this),this._monoChains=new Nt,this._index=new sn,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={SegmentOverlapAction:{configurable:!0}};return e.prototype.getMonotoneChains=function(){return this._monoChains},e.prototype.getNodedSubstrings=function(){return gn.getNodedSubstrings(this._nodedSegStrings)},e.prototype.getIndex=function(){return this._index},e.prototype.add=function(t){for(var e=vn.getChains(t.getCoordinates(),t).iterator();e.hasNext();){var n=e.next();n.setId(this._idCounter++),this._index.insert(n.getEnvelope(),n),this._monoChains.add(n)}},e.prototype.computeNodes=function(t){this._nodedSegStrings=t;for(var e=t.iterator();e.hasNext();)this.add(e.next());this.intersectChains()},e.prototype.intersectChains=function(){for(var t=new Nn(this._segInt),e=this._monoChains.iterator();e.hasNext();)for(var n=e.next(),i=this._index.query(n.getEnvelope()).iterator();i.hasNext();){var r=i.next();if(r.getId()>n.getId()&&(n.computeOverlaps(r,t),this._nOverlaps++),this._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.SegmentOverlapAction.get=function(){return Nn},Object.defineProperties(e,n),e}(En),Nn=function(t){function e(){t.call(this),this._si=null;var e=arguments[0];this._si=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(4!==arguments.length)return t.prototype.overlap.apply(this,arguments);var e=arguments[0],n=arguments[1],i=arguments[2],r=arguments[3],o=e.getContext(),s=i.getContext();this._si.processIntersections(o,n,s,r)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(_n),Cn=function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.setQuadrantSegments(e)}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(i)}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this.setQuadrantSegments(r),this.setEndCapStyle(o),this.setJoinStyle(s),this.setMitreLimit(a)}},Sn={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};Cn.prototype.getEndCapStyle=function(){return this._endCapStyle},Cn.prototype.isSingleSided=function(){return this._isSingleSided},Cn.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,0===this._quadrantSegments&&(this._joinStyle=Cn.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Cn.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==Cn.JOIN_ROUND&&(this._quadrantSegments=Cn.DEFAULT_QUADRANT_SEGMENTS)},Cn.prototype.getJoinStyle=function(){return this._joinStyle},Cn.prototype.setJoinStyle=function(t){this._joinStyle=t},Cn.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},Cn.prototype.getSimplifyFactor=function(){return this._simplifyFactor},Cn.prototype.getQuadrantSegments=function(){return this._quadrantSegments},Cn.prototype.setEndCapStyle=function(t){this._endCapStyle=t},Cn.prototype.getMitreLimit=function(){return this._mitreLimit},Cn.prototype.setMitreLimit=function(t){this._mitreLimit=t},Cn.prototype.setSingleSided=function(t){this._isSingleSided=t},Cn.prototype.interfaces_=function(){return[]},Cn.prototype.getClass=function(){return Cn},Cn.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Sn.CAP_ROUND.get=function(){return 1},Sn.CAP_FLAT.get=function(){return 2},Sn.CAP_SQUARE.get=function(){return 3},Sn.JOIN_ROUND.get=function(){return 1},Sn.JOIN_MITRE.get=function(){return 2},Sn.JOIN_BEVEL.get=function(){return 3},Sn.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Sn.DEFAULT_MITRE_LIMIT.get=function(){return 5},Sn.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(Cn,Sn);var Ln=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=at.COUNTERCLOCKWISE,this._inputLine=t||null},bn={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Ln.prototype.isDeletable=function(t,e,n,i){var r=this._inputLine[t],o=this._inputLine[e],s=this._inputLine[n];return!!this.isConcave(r,o,s)&&(!!this.isShallow(r,o,s,i)&&this.isShallowSampled(r,o,t,n,i))},Ln.prototype.deleteShallowConcavities=function(){for(var t=1,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e),i=!1;n<this._inputLine.length;){var r=!1;this.isDeletable(t,e,n,this._distanceTol)&&(this._isDeleted[e]=Ln.DELETE,r=!0,i=!0),t=r?n:e,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e)}return i},Ln.prototype.isShallowConcavity=function(t,e,n,i){if(!(at.computeOrientation(t,e,n)===this._angleOrientation))return!1;return at.distancePointLine(e,t,n)<i},Ln.prototype.isShallowSampled=function(t,e,n,i,r){var o=Math.trunc((i-n)/Ln.NUM_PTS_TO_CHECK);o<=0&&(o=1);for(var s=n;s<i;s+=o)if(!this.isShallow(t,e,this._inputLine[s],r))return!1;return!0},Ln.prototype.isConcave=function(t,e,n){var i=at.computeOrientation(t,e,n)===this._angleOrientation;return i},Ln.prototype.simplify=function(t){this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=at.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var e=!1;do{e=this.deleteShallowConcavities()}while(e);return this.collapseLine()},Ln.prototype.findNextNonDeletedIndex=function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===Ln.DELETE;)e++;return e},Ln.prototype.isShallow=function(t,e,n,i){return at.distancePointLine(e,t,n)<i},Ln.prototype.collapseLine=function(){for(var t=new St,e=0;e<this._inputLine.length;e++)this._isDeleted[e]!==Ln.DELETE&&t.add(this._inputLine[e]);return t.toCoordinateArray()},Ln.prototype.interfaces_=function(){return[]},Ln.prototype.getClass=function(){return Ln},Ln.simplify=function(t,e){return new Ln(t).simplify(e)},bn.INIT.get=function(){return 0},bn.DELETE.get=function(){return 1},bn.KEEP.get=function(){return 1},bn.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(Ln,bn);var wn=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new Nt},On={COORDINATE_ARRAY_TYPE:{configurable:!0}};wn.prototype.getCoordinates=function(){return this._ptList.toArray(wn.COORDINATE_ARRAY_TYPE)},wn.prototype.setPrecisionModel=function(t){this._precisionModel=t},wn.prototype.addPt=function(t){var e=new C(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},wn.prototype.revere=function(){},wn.prototype.addPts=function(t,e){if(e)for(var n=0;n<t.length;n++)this.addPt(t[n]);else for(var i=t.length-1;i>=0;i--)this.addPt(t[i])},wn.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1);return t.distance(e)<this._minimimVertexDistance},wn.prototype.toString=function(){return(new _e).createLineString(this.getCoordinates()).toString()},wn.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new C(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)},wn.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t},wn.prototype.interfaces_=function(){return[]},wn.prototype.getClass=function(){return wn},On.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(wn,On);var Tn=function(){},Rn={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};Tn.prototype.interfaces_=function(){return[]},Tn.prototype.getClass=function(){return Tn},Tn.toDegrees=function(t){return 180*t/Math.PI},Tn.normalize=function(t){for(;t>Math.PI;)t-=Tn.PI_TIMES_2;for(;t<=-Math.PI;)t+=Tn.PI_TIMES_2;return t},Tn.angle=function(){if(1===arguments.length){var t=arguments[0];return Math.atan2(t.y,t.x)}if(2===arguments.length){var e=arguments[0],n=arguments[1],i=n.x-e.x,r=n.y-e.y;return Math.atan2(r,i)}},Tn.isAcute=function(t,e,n){var i=t.x-e.x,r=t.y-e.y;return i*(n.x-e.x)+r*(n.y-e.y)>0},Tn.isObtuse=function(t,e,n){var i=t.x-e.x,r=t.y-e.y;return i*(n.x-e.x)+r*(n.y-e.y)<0},Tn.interiorAngle=function(t,e,n){var i=Tn.angle(e,t),r=Tn.angle(e,n);return Math.abs(r-i)},Tn.normalizePositive=function(t){if(t<0){for(;t<0;)t+=Tn.PI_TIMES_2;t>=Tn.PI_TIMES_2&&(t=0)}else{for(;t>=Tn.PI_TIMES_2;)t-=Tn.PI_TIMES_2;t<0&&(t=0)}return t},Tn.angleBetween=function(t,e,n){var i=Tn.angle(e,t),r=Tn.angle(e,n);return Tn.diff(i,r)},Tn.diff=function(t,e){var n=null;return(n=t<e?e-t:t-e)>Math.PI&&(n=2*Math.PI-n),n},Tn.toRadians=function(t){return t*Math.PI/180},Tn.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?Tn.COUNTERCLOCKWISE:n<0?Tn.CLOCKWISE:Tn.NONE},Tn.angleBetweenOriented=function(t,e,n){var i=Tn.angle(e,t),r=Tn.angle(e,n)-i;return r<=-Math.PI?r+Tn.PI_TIMES_2:r>Math.PI?r-Tn.PI_TIMES_2:r},Rn.PI_TIMES_2.get=function(){return 2*Math.PI},Rn.PI_OVER_2.get=function(){return Math.PI/2},Rn.PI_OVER_4.get=function(){return Math.PI/4},Rn.COUNTERCLOCKWISE.get=function(){return at.COUNTERCLOCKWISE},Rn.CLOCKWISE.get=function(){return at.CLOCKWISE},Rn.NONE.get=function(){return at.COLLINEAR},Object.defineProperties(Tn,Rn);var Pn=function t(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new dn,this._seg1=new dn,this._offset0=new dn,this._offset1=new dn,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],i=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new rt,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===Cn.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(i)},Dn={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};Pn.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=at.computeOrientation(this._s0,this._s1,this._s2),i=n===at.CLOCKWISE&&this._side===Se.LEFT||n===at.COUNTERCLOCKWISE&&this._side===Se.RIGHT;0===n?this.addCollinear(e):i?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},Pn.prototype.addLineEndCap=function(t,e){var n=new dn(t,e),i=new dn;this.computeOffsetSegment(n,Se.LEFT,this._distance,i);var r=new dn;this.computeOffsetSegment(n,Se.RIGHT,this._distance,r);var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o);switch(this._bufParams.getEndCapStyle()){case Cn.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(e,a+Math.PI/2,a-Math.PI/2,at.CLOCKWISE,this._distance),this._segList.addPt(r.p1);break;case Cn.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(r.p1);break;case Cn.CAP_SQUARE:var u=new C;u.x=Math.abs(this._distance)*Math.cos(a),u.y=Math.abs(this._distance)*Math.sin(a);var l=new C(i.p1.x+u.x,i.p1.y+u.y),c=new C(r.p1.x+u.x,r.p1.y+u.y);this._segList.addPt(l),this._segList.addPt(c)}},Pn.prototype.getCoordinates=function(){return this._segList.getCoordinates()},Pn.prototype.addMitreJoin=function(t,e,n,i){var r=!0,o=null;try{o=k.intersection(e.p0,e.p1,n.p0,n.p1);(i<=0?1:o.distance(t)/Math.abs(i))>this._bufParams.getMitreLimit()&&(r=!1)}catch(t){if(!(t instanceof X))throw t;o=new C(0,0),r=!1}r?this._segList.addPt(o):this.addLimitedMitreJoin(e,n,i,this._bufParams.getMitreLimit())},Pn.prototype.addFilletCorner=function(t,e,n,i,r){var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o),u=n.x-t.x,l=n.y-t.y,c=Math.atan2(l,u);i===at.CLOCKWISE?a<=c&&(a+=2*Math.PI):a>=c&&(a-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,a,c,i,r),this._segList.addPt(n)},Pn.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*Pn.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===Cn.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===Cn.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},Pn.prototype.createSquare=function(t){this._segList.addPt(new C(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new C(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new C(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new C(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},Pn.prototype.addSegments=function(t,e){this._segList.addPts(t,e)},Pn.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},Pn.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},Pn.prototype.initSideSegments=function(t,e,n){this._s1=t,this._s2=e,this._side=n,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)},Pn.prototype.addLimitedMitreJoin=function(t,e,n,i){var r=this._seg0.p1,o=Tn.angle(r,this._seg0.p0),s=Tn.angleBetweenOriented(this._seg0.p0,r,this._seg1.p1)/2,a=Tn.normalize(o+s),u=Tn.normalize(a+Math.PI),l=i*n,c=n-l*Math.abs(Math.sin(s)),p=r.x+l*Math.cos(u),h=r.y+l*Math.sin(u),f=new C(p,h),g=new dn(r,f),d=g.pointAlongOffset(1,c),y=g.pointAlongOffset(1,-c);this._side===Se.LEFT?(this._segList.addPt(d),this._segList.addPt(y)):(this._segList.addPt(y),this._segList.addPt(d))},Pn.prototype.computeOffsetSegment=function(t,e,n,i){var r=e===Se.LEFT?1:-1,o=t.p1.x-t.p0.x,s=t.p1.y-t.p0.y,a=Math.sqrt(o*o+s*s),u=r*n*o/a,l=r*n*s/a;i.p0.x=t.p0.x-l,i.p0.y=t.p0.y+u,i.p1.x=t.p1.x-l,i.p1.y=t.p1.y+u},Pn.prototype.addFilletArc=function(t,e,n,i,r){var o=i===at.CLOCKWISE?-1:1,s=Math.abs(e-n),a=Math.trunc(s/this._filletAngleQuantum+.5);if(a<1)return null;for(var u=s/a,l=0,c=new C;l<s;){var p=e+o*l;c.x=t.x+r*Math.cos(p),c.y=t.y+r*Math.sin(p),this._segList.addPt(c),l+=u}},Pn.prototype.addInsideTurn=function(t,e){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*Pn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var n=new C((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var i=new C((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},Pn.prototype.createCircle=function(t){var e=new C(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},Pn.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},Pn.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new wn,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*Pn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},Pn.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===Cn.JOIN_BEVEL||this._bufParams.getJoinStyle()===Cn.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,at.CLOCKWISE,this._distance))},Pn.prototype.closeRing=function(){this._segList.closeRing()},Pn.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},Pn.prototype.interfaces_=function(){return[]},Pn.prototype.getClass=function(){return Pn},Dn.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return.001},Dn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return.001},Dn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},Dn.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(Pn,Dn);var Mn=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};Mn.prototype.getOffsetCurve=function(t,e){if(this._distance=e,0===e)return null;var n=e<0,i=Math.abs(e),r=this.getSegGen(i);t.length<=1?this.computePointCurve(t[0],r):this.computeOffsetCurve(t,n,r);var o=r.getCoordinates();return n&&Lt.reverse(o),o},Mn.prototype.computeSingleSidedBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var r=Ln.simplify(t,-i),o=r.length-1;n.initSideSegments(r[o],r[o-1],Se.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(r[s],!0)}else{n.addSegments(t,!1);var a=Ln.simplify(t,i),u=a.length-1;n.initSideSegments(a[0],a[1],Se.LEFT),n.addFirstSegment();for(var l=2;l<=u;l++)n.addNextSegment(a[l],!0)}n.addLastSegment(),n.closeRing()},Mn.prototype.computeRingBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);e===Se.RIGHT&&(i=-i);var r=Ln.simplify(t,i),o=r.length-1;n.initSideSegments(r[o-1],r[0],e);for(var s=1;s<=o;s++){var a=1!==s;n.addNextSegment(r[s],a)}n.closeRing()},Mn.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),i=Ln.simplify(t,n),r=i.length-1;e.initSideSegments(i[0],i[1],Se.LEFT);for(var o=2;o<=r;o++)e.addNextSegment(i[o],!0);e.addLastSegment(),e.addLineEndCap(i[r-1],i[r]);var s=Ln.simplify(t,-n),a=s.length-1;e.initSideSegments(s[a],s[a-1],Se.LEFT);for(var u=a-2;u>=0;u--)e.addNextSegment(s[u],!0);e.addLastSegment(),e.addLineEndCap(s[1],s[0]),e.closeRing()},Mn.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case Cn.CAP_ROUND:e.createCircle(t);break;case Cn.CAP_SQUARE:e.createSquare(t)}},Mn.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided())return null;if(0===e)return null;var n=Math.abs(e),i=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],i);else if(this._bufParams.isSingleSided()){var r=e<0;this.computeSingleSidedBufferCurve(t,r,i)}else this.computeLineBufferCurve(t,i);return i.getCoordinates()},Mn.prototype.getBufferParameters=function(){return this._bufParams},Mn.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},Mn.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(0===n)return Mn.copyCoordinates(t);var i=this.getSegGen(n);return this.computeRingBufferCurve(t,e,i),i.getCoordinates()},Mn.prototype.computeOffsetCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){var r=Ln.simplify(t,-i),o=r.length-1;n.initSideSegments(r[o],r[o-1],Se.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(r[s],!0)}else{var a=Ln.simplify(t,i),u=a.length-1;n.initSideSegments(a[0],a[1],Se.LEFT),n.addFirstSegment();for(var l=2;l<=u;l++)n.addNextSegment(a[l],!0)}n.addLastSegment()},Mn.prototype.getSegGen=function(t){return new Pn(this._precisionModel,this._bufParams,t)},Mn.prototype.interfaces_=function(){return[]},Mn.prototype.getClass=function(){return Mn},Mn.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;n<e.length;n++)e[n]=new C(t[n]);return e};var An=function(){this._subgraphs=null,this._seg=new dn,this._cga=new at;var t=arguments[0];this._subgraphs=t},Fn={DepthSegment:{configurable:!0}};An.prototype.findStabbedSegments=function(){if(1===arguments.length){for(var t=arguments[0],e=new Nt,n=this._subgraphs.iterator();n.hasNext();){var i=n.next(),r=i.getEnvelope();t.y<r.getMinY()||t.y>r.getMaxY()||this.findStabbedSegments(t,i.getDirectedEdges(),e)}return e}if(3===arguments.length)if(T(arguments[2],xt)&&arguments[0]instanceof C&&arguments[1]instanceof ze)for(var o=arguments[0],s=arguments[1],a=arguments[2],u=s.getEdge().getCoordinates(),l=0;l<u.length-1;l++){this._seg.p0=u[l],this._seg.p1=u[l+1],this._seg.p0.y>this._seg.p1.y&&this._seg.reverse();if(!(Math.max(this._seg.p0.x,this._seg.p1.x)<o.x)&&!(this._seg.isHorizontal()||o.y<this._seg.p0.y||o.y>this._seg.p1.y||at.computeOrientation(this._seg.p0,this._seg.p1,o)===at.RIGHT)){var c=s.getDepth(Se.LEFT);this._seg.p0.equals(u[l])||(c=s.getDepth(Se.RIGHT));var p=new Gn(this._seg,c);a.add(p)}}else if(T(arguments[2],xt)&&arguments[0]instanceof C&&T(arguments[1],xt))for(var h=arguments[0],f=arguments[1],g=arguments[2],d=f.iterator();d.hasNext();){var y=d.next();y.isForward()&&this.findStabbedSegments(h,y,g)}},An.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);if(0===e.size())return 0;return $e.min(e)._leftDepth},An.prototype.interfaces_=function(){return[]},An.prototype.getClass=function(){return An},Fn.DepthSegment.get=function(){return Gn},Object.defineProperties(An,Fn);var Gn=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new dn(t),this._leftDepth=e};Gn.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return 0!==n?n:0!=(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(e._upwardSeg)},Gn.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return 0!==n?n:t.p1.compareTo(e.p1)},Gn.prototype.toString=function(){return this._upwardSeg.toString()},Gn.prototype.interfaces_=function(){return[E]},Gn.prototype.getClass=function(){return Gn};var qn=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};qn.prototype.area=function(){return qn.area(this.p0,this.p1,this.p2)},qn.prototype.signedArea=function(){return qn.signedArea(this.p0,this.p1,this.p2)},qn.prototype.interpolateZ=function(t){if(null===t)throw new m(\"Supplied point is null.\");return qn.interpolateZ(t,this.p0,this.p1,this.p2)},qn.prototype.longestSideLength=function(){return qn.longestSideLength(this.p0,this.p1,this.p2)},qn.prototype.isAcute=function(){return qn.isAcute(this.p0,this.p1,this.p2)},qn.prototype.circumcentre=function(){return qn.circumcentre(this.p0,this.p1,this.p2)},qn.prototype.area3D=function(){return qn.area3D(this.p0,this.p1,this.p2)},qn.prototype.centroid=function(){return qn.centroid(this.p0,this.p1,this.p2)},qn.prototype.inCentre=function(){return qn.inCentre(this.p0,this.p1,this.p2)},qn.prototype.interfaces_=function(){return[]},qn.prototype.getClass=function(){return qn},qn.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},qn.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},qn.det=function(t,e,n,i){return t*i-e*n},qn.interpolateZ=function(t,e,n,i){var r=e.x,o=e.y,s=n.x-r,a=i.x-r,u=n.y-o,l=i.y-o,c=s*l-a*u,p=t.x-r,h=t.y-o,f=(l*p-a*h)/c,g=(-u*p+s*h)/c;return e.z+f*(n.z-e.z)+g*(i.z-e.z)},qn.longestSideLength=function(t,e,n){var i=t.distance(e),r=e.distance(n),o=n.distance(t),s=i;return r>s&&(s=r),o>s&&(s=o),s},qn.isAcute=function(t,e,n){return!!Tn.isAcute(t,e,n)&&(!!Tn.isAcute(e,n,t)&&!!Tn.isAcute(n,t,e))},qn.circumcentre=function(t,e,n){var i=n.x,r=n.y,o=t.x-i,s=t.y-r,a=e.x-i,u=e.y-r,l=2*qn.det(o,s,a,u),c=qn.det(s,o*o+s*s,u,a*a+u*u),p=qn.det(o,o*o+s*s,a,a*a+u*u);return new C(i-c/l,r+p/l)},qn.perpendicularBisector=function(t,e){var n=e.x-t.x,i=e.y-t.y,r=new k(t.x+n/2,t.y+i/2,1),o=new k(t.x-i+n/2,t.y+n+i/2,1);return new k(r,o)},qn.angleBisector=function(t,e,n){var i=e.distance(t),r=i/(i+e.distance(n)),o=n.x-t.x,s=n.y-t.y;return new C(t.x+r*o,t.y+r*s)},qn.area3D=function(t,e,n){var i=e.x-t.x,r=e.y-t.y,o=e.z-t.z,s=n.x-t.x,a=n.y-t.y,u=n.z-t.z,l=r*u-o*a,c=o*s-i*u,p=i*a-r*s,h=l*l+c*c+p*p,f=Math.sqrt(h)/2;return f},qn.centroid=function(t,e,n){var i=(t.x+e.x+n.x)/3,r=(t.y+e.y+n.y)/3;return new C(i,r)},qn.inCentre=function(t,e,n){var i=e.distance(n),r=t.distance(n),o=t.distance(e),s=i+r+o,a=(i*t.x+r*e.x+o*n.x)/s,u=(i*t.y+r*e.y+o*n.y)/s;return new C(a,u)};var Bn=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new Nt;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};Bn.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,w.EXTERIOR,w.INTERIOR)},Bn.prototype.addPolygon=function(t){var e=this._distance,n=Se.LEFT;this._distance<0&&(e=-this._distance,n=Se.RIGHT);var i=t.getExteriorRing(),r=Lt.removeRepeatedPoints(i.getCoordinates());if(this._distance<0&&this.isErodedCompletely(i,this._distance))return null;if(this._distance<=0&&r.length<3)return null;this.addPolygonRing(r,e,n,w.EXTERIOR,w.INTERIOR);for(var o=0;o<t.getNumInteriorRing();o++){var s=t.getInteriorRingN(o),a=Lt.removeRepeatedPoints(s.getCoordinates());this._distance>0&&this.isErodedCompletely(s,-this._distance)||this.addPolygonRing(a,e,Se.opposite(n),w.INTERIOR,w.EXTERIOR)}},Bn.prototype.isTriangleErodedCompletely=function(t,e){var n=new qn(t[0],t[1],t[2]),i=n.inCentre();return at.distancePointLine(i,n.p0,n.p1)<Math.abs(e)},Bn.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=Lt.removeRepeatedPoints(t.getCoordinates()),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,w.EXTERIOR,w.INTERIOR)},Bn.prototype.addCurve=function(t,e,n){if(null===t||t.length<2)return null;var i=new gn(t,new Pe(0,w.BOUNDARY,e,n));this._curveList.add(i)},Bn.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},Bn.prototype.addPolygonRing=function(t,e,n,i,r){if(0===e&&t.length<ee.MINIMUM_VALID_SIZE)return null;var o=i,s=r;t.length>=ee.MINIMUM_VALID_SIZE&&at.isCCW(t)&&(o=r,s=i,n=Se.opposite(n));var a=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(a,o,s)},Bn.prototype.add=function(t){if(t.isEmpty())return null;t instanceof $t?this.addPolygon(t):t instanceof Kt?this.addLineString(t):t instanceof Qt?this.addPoint(t):t instanceof te?this.addCollection(t):t instanceof Xt?this.addCollection(t):t instanceof ne?this.addCollection(t):t instanceof zt&&this.addCollection(t)},Bn.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(4===n.length)return this.isTriangleErodedCompletely(n,e);var i=t.getEnvelopeInternal(),r=Math.min(i.getHeight(),i.getWidth());return e<0&&2*Math.abs(e)>r},Bn.prototype.addCollection=function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},Bn.prototype.interfaces_=function(){return[]},Bn.prototype.getClass=function(){return Bn};var Vn=function(){};Vn.prototype.locate=function(t){},Vn.prototype.interfaces_=function(){return[]},Vn.prototype.getClass=function(){return Vn};var Un=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};Un.prototype.next=function(){if(this._atStart)return this._atStart=!1,Un.isAtomic(this._parent)&&this._index++,this._parent;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new i;var t=this._parent.getGeometryN(this._index++);return t instanceof zt?(this._subcollectionIterator=new Un(t),this._subcollectionIterator.next()):t},Un.prototype.remove=function(){throw new Error(this.getClass().getName())},Un.prototype.hasNext=function(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},Un.prototype.interfaces_=function(){return[Et]},Un.prototype.getClass=function(){return Un},Un.isAtomic=function(t){return!(t instanceof zt)};var zn=function(){this._geom=null;var t=arguments[0];this._geom=t};zn.prototype.locate=function(t){return zn.locate(t,this._geom)},zn.prototype.interfaces_=function(){return[Vn]},zn.prototype.getClass=function(){return zn},zn.isPointInRing=function(t,e){return!!e.getEnvelopeInternal().intersects(t)&&at.isPointInRing(t,e.getCoordinates())},zn.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!zn.isPointInRing(t,n))return!1;for(var i=0;i<e.getNumInteriorRing();i++){var r=e.getInteriorRingN(i);if(zn.isPointInRing(t,r))return!1}return!0},zn.containsPoint=function(t,e){if(e instanceof $t)return zn.containsPointInPolygon(t,e);if(e instanceof zt)for(var n=new Un(e);n.hasNext();){var i=n.next();if(i!==e&&zn.containsPoint(t,i))return!0}return!1},zn.locate=function(t,e){return e.isEmpty()?w.EXTERIOR:zn.containsPoint(t,e)?w.INTERIOR:w.EXTERIOR};var Xn=function(){this._edgeMap=new p,this._edgeList=null,this._ptInAreaLocation=[w.NONE,w.NONE]};Xn.prototype.getNextCW=function(t){this.getEdges();var e=this._edgeList.indexOf(t),n=e-1;return 0===e&&(n=this._edgeList.size()-1),this._edgeList.get(n)},Xn.prototype.propagateSideLabels=function(t){for(var e=w.NONE,n=this.iterator();n.hasNext();){var i=n.next().getLabel();i.isArea(t)&&i.getLocation(t,Se.LEFT)!==w.NONE&&(e=i.getLocation(t,Se.LEFT))}if(e===w.NONE)return null;for(var r=e,o=this.iterator();o.hasNext();){var s=o.next(),a=s.getLabel();if(a.getLocation(t,Se.ON)===w.NONE&&a.setLocation(t,Se.ON,r),a.isArea(t)){var u=a.getLocation(t,Se.LEFT),l=a.getLocation(t,Se.RIGHT);if(l!==w.NONE){if(l!==r)throw new we(\"side location conflict\",s.getCoordinate());u===w.NONE&&et.shouldNeverReachHere(\"found single null side (at \"+s.getCoordinate()+\")\"),r=u}else et.isTrue(a.getLocation(t,Se.LEFT)===w.NONE,\"found single null side\"),a.setLocation(t,Se.RIGHT,r),a.setLocation(t,Se.LEFT,r)}}},Xn.prototype.getCoordinate=function(){var t=this.iterator();if(!t.hasNext())return null;return t.next().getCoordinate()},Xn.prototype.print=function(t){Y.out.println(\"EdgeEndStar:   \"+this.getCoordinate());for(var e=this.iterator();e.hasNext();){e.next().print(t)}},Xn.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},Xn.prototype.checkAreaLabelsConsistent=function(t){var e=this.getEdges();if(e.size()<=0)return!0;var n=e.size()-1,i=e.get(n).getLabel().getLocation(t,Se.LEFT);et.isTrue(i!==w.NONE,\"Found unlabelled area edge\");for(var r=i,o=this.iterator();o.hasNext();){var s=o.next().getLabel();et.isTrue(s.isArea(t),\"Found non-area edge\");var a=s.getLocation(t,Se.LEFT),u=s.getLocation(t,Se.RIGHT);if(a===u)return!1;if(u!==r)return!1;r=a}return!0},Xn.prototype.findIndex=function(t){this.iterator();for(var e=0;e<this._edgeList.size();e++){if(this._edgeList.get(e)===t)return e}return-1},Xn.prototype.iterator=function(){return this.getEdges().iterator()},Xn.prototype.getEdges=function(){return null===this._edgeList&&(this._edgeList=new Nt(this._edgeMap.values())),this._edgeList},Xn.prototype.getLocation=function(t,e,n){return this._ptInAreaLocation[t]===w.NONE&&(this._ptInAreaLocation[t]=zn.locate(e,n[t].getGeometry())),this._ptInAreaLocation[t]},Xn.prototype.toString=function(){var t=new D;t.append(\"EdgeEndStar:   \"+this.getCoordinate()),t.append(\"\\n\");for(var e=this.iterator();e.hasNext();){var n=e.next();t.append(n),t.append(\"\\n\")}return t.toString()},Xn.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();){e.next().computeLabel(t)}},Xn.prototype.computeLabelling=function(t){this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var e=[!1,!1],n=this.iterator();n.hasNext();)for(var i=n.next().getLabel(),r=0;r<2;r++)i.isLine(r)&&i.getLocation(r)===w.BOUNDARY&&(e[r]=!0);for(var o=this.iterator();o.hasNext();)for(var s=o.next(),a=s.getLabel(),u=0;u<2;u++)if(a.isAnyNull(u)){var l=w.NONE;if(e[u])l=w.EXTERIOR;else{var c=s.getCoordinate();l=this.getLocation(u,c,t)}a.setAllLocationsIfNull(u,l)}},Xn.prototype.getDegree=function(){return this._edgeMap.size()},Xn.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},Xn.prototype.interfaces_=function(){return[]},Xn.prototype.getClass=function(){return Xn};var Yn=function(t){function e(){t.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linkResultDirectedEdges=function(){this.getResultAreaEdges();for(var t=null,e=null,n=this._SCANNING_FOR_INCOMING,i=0;i<this._resultAreaEdgeList.size();i++){var r=this._resultAreaEdgeList.get(i),o=r.getSym();if(r.getLabel().isArea())switch(null===t&&r.isInResult()&&(t=r),n){case this._SCANNING_FOR_INCOMING:if(!o.isInResult())continue;e=o,n=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(!r.isInResult())continue;e.setNext(r),n=this._SCANNING_FOR_INCOMING}}if(n===this._LINKING_TO_OUTGOING){if(null===t)throw new we(\"no outgoing dirEdge found\",this.getCoordinate());et.isTrue(t.isInResult(),\"unable to link last incoming dirEdge\"),e.setNext(t)}},e.prototype.insert=function(t){var e=t;this.insertEdgeEnd(e,e)},e.prototype.getRightmostEdge=function(){var t=this.getEdges(),e=t.size();if(e<1)return null;var n=t.get(0);if(1===e)return n;var i=t.get(e-1),r=n.getQuadrant(),o=i.getQuadrant();return Be.isNorthern(r)&&Be.isNorthern(o)?n:Be.isNorthern(r)||Be.isNorthern(o)?0!==n.getDy()?n:0!==i.getDy()?i:(et.shouldNeverReachHere(\"found two horizontal edges incident on node\"),null):i},e.prototype.print=function(t){Y.out.println(\"DirectedEdgeStar: \"+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var n=e.next();t.print(\"out \"),n.print(t),t.println(),t.print(\"in \"),n.getSym().print(t),t.println()}},e.prototype.getResultAreaEdges=function(){if(null!==this._resultAreaEdgeList)return this._resultAreaEdgeList;this._resultAreaEdgeList=new Nt;for(var t=this.iterator();t.hasNext();){var e=t.next();(e.isInResult()||e.getSym().isInResult())&&this._resultAreaEdgeList.add(e)}return this._resultAreaEdgeList},e.prototype.updateLabelling=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next().getLabel();n.setAllLocationsIfNull(0,t.getLocation(0)),n.setAllLocationsIfNull(1,t.getLocation(1))}},e.prototype.linkAllDirectedEdges=function(){this.getEdges();for(var t=null,e=null,n=this._edgeList.size()-1;n>=0;n--){var i=this._edgeList.get(n),r=i.getSym();null===e&&(e=r),null!==t&&r.setNext(t),t=i}e.setNext(t)},e.prototype.computeDepths=function(){if(1===arguments.length){var t=arguments[0],e=this.findIndex(t),n=t.getDepth(Se.LEFT),i=t.getDepth(Se.RIGHT),r=this.computeDepths(e+1,this._edgeList.size(),n);if(this.computeDepths(0,e,r)!==i)throw new we(\"depth mismatch at \"+t.getCoordinate())}else if(3===arguments.length){for(var o=arguments[0],s=arguments[1],a=arguments[2],u=o;u<s;u++){var l=this._edgeList.get(u);l.setEdgeDepths(Se.RIGHT,a),a=l.getDepth(Se.LEFT)}return a}},e.prototype.mergeSymLabels=function(){for(var t=this.iterator();t.hasNext();){var e=t.next();e.getLabel().merge(e.getSym().getLabel())}},e.prototype.linkMinimalDirectedEdges=function(t){for(var e=null,n=null,i=this._SCANNING_FOR_INCOMING,r=this._resultAreaEdgeList.size()-1;r>=0;r--){var o=this._resultAreaEdgeList.get(r),s=o.getSym();switch(null===e&&o.getEdgeRing()===t&&(e=o),i){case this._SCANNING_FOR_INCOMING:if(s.getEdgeRing()!==t)continue;n=s,i=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(o.getEdgeRing()!==t)continue;n.setNextMin(o),i=this._SCANNING_FOR_INCOMING}}i===this._LINKING_TO_OUTGOING&&(et.isTrue(null!==e,\"found null for first outgoing dirEdge\"),et.isTrue(e.getEdgeRing()===t,\"unable to link last incoming dirEdge\"),n.setNextMin(e))},e.prototype.getOutgoingDegree=function(){if(0===arguments.length){for(var t=0,e=this.iterator();e.hasNext();){e.next().isInResult()&&t++}return t}if(1===arguments.length){for(var n=arguments[0],i=0,r=this.iterator();r.hasNext();){r.next().getEdgeRing()===n&&i++}return i}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var t=w.NONE,e=this.iterator();e.hasNext();){var n=e.next(),i=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){t=w.INTERIOR;break}if(i.isInResult()){t=w.EXTERIOR;break}}}if(t===w.NONE)return null;for(var r=t,o=this.iterator();o.hasNext();){var s=o.next(),a=s.getSym();s.isLineEdge()?s.getEdge().setCovered(r===w.INTERIOR):(s.isInResult()&&(r=w.EXTERIOR),a.isInResult()&&(r=w.INTERIOR))}},e.prototype.computeLabelling=function(e){t.prototype.computeLabelling.call(this,e),this._label=new Pe(w.NONE);for(var n=this.iterator();n.hasNext();)for(var i=n.next().getEdge().getLabel(),r=0;r<2;r++){var o=i.getLocation(r);o!==w.INTERIOR&&o!==w.BOUNDARY||this._label.setLocation(r,w.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Xn),kn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createNode=function(t){return new Ge(t,new Yn)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Xe),jn=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};jn.prototype.compareTo=function(t){var e=t;return jn.compareOriented(this._pts,this._orientation,e._pts,e._orientation)},jn.prototype.interfaces_=function(){return[E]},jn.prototype.getClass=function(){return jn},jn.orientation=function(t){return 1===Lt.increasingDirection(t)},jn.compareOriented=function(t,e,n,i){for(var r=e?1:-1,o=i?1:-1,s=e?t.length:-1,a=i?n.length:-1,u=e?0:t.length-1,l=i?0:n.length-1;;){var c=t[u].compareTo(n[l]);if(0!==c)return c;var p=(u+=r)===s,h=(l+=o)===a;if(p&&!h)return-1;if(!p&&h)return 1;if(p&&h)return 0}};var Hn=function(){this._edges=new Nt,this._ocaMap=new p};Hn.prototype.print=function(t){t.print(\"MULTILINESTRING ( \");for(var e=0;e<this._edges.size();e++){var n=this._edges.get(e);e>0&&t.print(\",\"),t.print(\"(\");for(var i=n.getCoordinates(),r=0;r<i.length;r++)r>0&&t.print(\",\"),t.print(i[r].x+\" \"+i[r].y);t.println(\")\")}t.print(\")  \")},Hn.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next())},Hn.prototype.findEdgeIndex=function(t){for(var e=0;e<this._edges.size();e++)if(this._edges.get(e).equals(t))return e;return-1},Hn.prototype.iterator=function(){return this._edges.iterator()},Hn.prototype.getEdges=function(){return this._edges},Hn.prototype.get=function(t){return this._edges.get(t)},Hn.prototype.findEqualEdge=function(t){var e=new jn(t.getCoordinates());return this._ocaMap.get(e)},Hn.prototype.add=function(t){this._edges.add(t);var e=new jn(t.getCoordinates());this._ocaMap.put(e,t)},Hn.prototype.interfaces_=function(){return[]},Hn.prototype.getClass=function(){return Hn};var Wn=function(){};Wn.prototype.processIntersections=function(t,e,n,i){},Wn.prototype.isDone=function(){},Wn.prototype.interfaces_=function(){return[]},Wn.prototype.getClass=function(){return Wn};var Kn=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t};Kn.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&1===this._li.getIntersectionNum()){if(Kn.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var r=t.size()-1;if(0===e&&i===r||0===i&&e===r)return!0}}return!1},Kn.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Kn.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Kn.prototype.getLineIntersector=function(){return this._li},Kn.prototype.hasProperIntersection=function(){return this._hasProper},Kn.prototype.processIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},Kn.prototype.hasIntersection=function(){return this._hasIntersection},Kn.prototype.isDone=function(){return!1},Kn.prototype.hasInteriorIntersection=function(){return this._hasInterior},Kn.prototype.interfaces_=function(){return[Wn]},Kn.prototype.getClass=function(){return Kn},Kn.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var Jn=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.coord=new C(t),this.segmentIndex=e,this.dist=n};Jn.prototype.getSegmentIndex=function(){return this.segmentIndex},Jn.prototype.getCoordinate=function(){return this.coord},Jn.prototype.print=function(t){t.print(this.coord),t.print(\" seg # = \"+this.segmentIndex),t.println(\" dist = \"+this.dist)},Jn.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},Jn.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&0===this.dist||this.segmentIndex===t},Jn.prototype.toString=function(){return this.coord+\" seg # = \"+this.segmentIndex+\" dist = \"+this.dist},Jn.prototype.getDistance=function(){return this.dist},Jn.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},Jn.prototype.interfaces_=function(){return[E]},Jn.prototype.getClass=function(){return Jn};var Qn=function(){this._nodeMap=new p,this.edge=null;var t=arguments[0];this.edge=t};Qn.prototype.print=function(t){t.println(\"Intersections:\");for(var e=this.iterator();e.hasNext();){e.next().print(t)}},Qn.prototype.iterator=function(){return this._nodeMap.values().iterator()},Qn.prototype.addSplitEdges=function(t){this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var i=e.next(),r=this.createSplitEdge(n,i);t.add(r),n=i}},Qn.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},Qn.prototype.createSplitEdge=function(t,e){var n=e.segmentIndex-t.segmentIndex+2,i=this.edge.pts[e.segmentIndex],r=e.dist>0||!e.coord.equals2D(i);r||n--;var o=new Array(n).fill(null),s=0;o[s++]=new C(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)o[s++]=this.edge.pts[a];return r&&(o[s]=e.coord),new ni(o,new Pe(this.edge._label))},Qn.prototype.add=function(t,e,n){var i=new Jn(t,e,n),r=this._nodeMap.get(i);return null!==r?r:(this._nodeMap.put(i,i),i)},Qn.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();){if(e.next().coord.equals(t))return!0}return!1},Qn.prototype.interfaces_=function(){return[]},Qn.prototype.getClass=function(){return Qn};var Zn=function(){};Zn.prototype.getChainStartIndices=function(t){var e=0,n=new Nt;n.add(new M(e));do{var i=this.findChainEnd(t,e);n.add(new M(i)),e=i}while(e<t.length-1);return Zn.toIntArray(n)},Zn.prototype.findChainEnd=function(t,e){for(var n=Be.quadrant(t[e],t[e+1]),i=e+1;i<t.length;){if(Be.quadrant(t[i-1],t[i])!==n)break;i++}return i-1},Zn.prototype.interfaces_=function(){return[]},Zn.prototype.getClass=function(){return Zn},Zn.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var $n=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new j,this.env2=new j;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new Zn;this.startIndex=e.getChainStartIndices(this.pts)};$n.prototype.getCoordinates=function(){return this.pts},$n.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e>n?e:n},$n.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e<n?e:n},$n.prototype.computeIntersectsForChain=function(){if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[n],e.startIndex[n+1],i)}else if(6===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3],u=arguments[4],l=arguments[5],c=this.pts[r],p=this.pts[o],h=s.pts[a],f=s.pts[u];if(o-r==1&&u-a==1)return l.addIntersections(this.e,r,s.e,a),null;if(this.env1.init(c,p),this.env2.init(h,f),!this.env1.intersects(this.env2))return null;var g=Math.trunc((r+o)/2),d=Math.trunc((a+u)/2);r<g&&(a<d&&this.computeIntersectsForChain(r,g,s,a,d,l),d<u&&this.computeIntersectsForChain(r,g,s,d,u,l)),g<o&&(a<d&&this.computeIntersectsForChain(g,o,s,a,d,l),d<u&&this.computeIntersectsForChain(g,o,s,d,u,l))}},$n.prototype.getStartIndexes=function(){return this.startIndex},$n.prototype.computeIntersects=function(t,e){for(var n=0;n<this.startIndex.length-1;n++)for(var i=0;i<t.startIndex.length-1;i++)this.computeIntersectsForChain(n,t,i,e)},$n.prototype.interfaces_=function(){return[]},$n.prototype.getClass=function(){return $n};var ti=function t(){this._depth=Array(2).fill().map(function(){return Array(3)});for(var e=0;e<2;e++)for(var n=0;n<3;n++)this._depth[e][n]=t.NULL_VALUE},ei={NULL_VALUE:{configurable:!0}};ti.prototype.getDepth=function(t,e){return this._depth[t][e]},ti.prototype.setDepth=function(t,e,n){this._depth[t][e]=n},ti.prototype.isNull=function(){if(0===arguments.length){for(var t=0;t<2;t++)for(var e=0;e<3;e++)if(this._depth[t][e]!==ti.NULL_VALUE)return!1;return!0}if(1===arguments.length){var n=arguments[0];return this._depth[n][1]===ti.NULL_VALUE}if(2===arguments.length){var i=arguments[0],r=arguments[1];return this._depth[i][r]===ti.NULL_VALUE}},ti.prototype.normalize=function(){for(var t=0;t<2;t++)if(!this.isNull(t)){var e=this._depth[t][1];this._depth[t][2]<e&&(e=this._depth[t][2]),e<0&&(e=0);for(var n=1;n<3;n++){var i=0;this._depth[t][n]>e&&(i=1),this._depth[t][n]=i}}},ti.prototype.getDelta=function(t){return this._depth[t][Se.RIGHT]-this._depth[t][Se.LEFT]},ti.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?w.EXTERIOR:w.INTERIOR},ti.prototype.toString=function(){return\"A: \"+this._depth[0][1]+\",\"+this._depth[0][2]+\" B: \"+this._depth[1][1]+\",\"+this._depth[1][2]},ti.prototype.add=function(){if(1===arguments.length)for(var t=arguments[0],e=0;e<2;e++)for(var n=1;n<3;n++){var i=t.getLocation(e,n);i!==w.EXTERIOR&&i!==w.INTERIOR||(this.isNull(e,n)?this._depth[e][n]=ti.depthAtLocation(i):this._depth[e][n]+=ti.depthAtLocation(i))}else if(3===arguments.length){var r=arguments[0],o=arguments[1];arguments[2]===w.INTERIOR&&this._depth[r][o]++}},ti.prototype.interfaces_=function(){return[]},ti.prototype.getClass=function(){return ti},ti.depthAtLocation=function(t){return t===w.EXTERIOR?0:t===w.INTERIOR?1:ti.NULL_VALUE},ei.NULL_VALUE.get=function(){return-1},Object.defineProperties(ti,ei);var ni=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new Qn(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new ti,this._depthDelta=0,1===arguments.length){var n=arguments[0];e.call(this,n,null)}else if(2===arguments.length){var i=arguments[0],r=arguments[1];this.pts=i,this._label=r}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var t=new Array(2).fill(null);t[0]=this.pts[0],t[1]=this.pts[1];return new e(t,Pe.toLineLabel(this._label))},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(t){this._isIsolated=t},e.prototype.setName=function(t){this._name=t},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;if(this.pts.length!==n.pts.length)return!1;for(var i=!0,r=!0,o=this.pts.length,s=0;s<this.pts.length;s++)if(this.pts[s].equals2D(n.pts[s])||(i=!1),this.pts[s].equals2D(n.pts[--o])||(r=!1),!i&&!r)return!1;return!0},e.prototype.getCoordinate=function(){if(0===arguments.length)return this.pts.length>0?this.pts[0]:null;if(1===arguments.length){var t=arguments[0];return this.pts[t]}},e.prototype.print=function(t){t.print(\"edge \"+this._name+\": \"),t.print(\"LINESTRING (\");for(var e=0;e<this.pts.length;e++)e>0&&t.print(\",\"),t.print(this.pts[e].x+\" \"+this.pts[e].y);t.print(\")  \"+this._label+\" \"+this._depthDelta)},e.prototype.computeIM=function(t){e.updateIM(this._label,t)},e.prototype.isCollapsed=function(){return!!this._label.isArea()&&(3===this.pts.length&&!!this.pts[0].equals(this.pts[2]))},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(t){t.print(\"edge \"+this._name+\": \");for(var e=this.pts.length-1;e>=0;e--)t.print(this.pts[e]+\" \");t.println(\"\")},e.prototype.getMonotoneChainEdge=function(){return null===this._mce&&(this._mce=new $n(this)),this._mce},e.prototype.getEnvelope=function(){if(null===this._env){this._env=new j;for(var t=0;t<this.pts.length;t++)this._env.expandToInclude(this.pts[t])}return this._env},e.prototype.addIntersection=function(t,e,n,i){var r=new C(t.getIntersection(i)),o=e,s=t.getEdgeDistance(n,i),a=o+1;if(a<this.pts.length){var u=this.pts[a];r.equals2D(u)&&(o=a,s=0)}this.eiList.add(r,o,s)},e.prototype.toString=function(){var t=new D;t.append(\"edge \"+this._name+\": \"),t.append(\"LINESTRING (\");for(var e=0;e<this.pts.length;e++)e>0&&t.append(\",\"),t.append(this.pts[e].x+\" \"+this.pts[e].y);return t.append(\")  \"+this._label+\" \"+this._depthDelta),t.toString()},e.prototype.isPointwiseEqual=function(t){if(this.pts.length!==t.pts.length)return!1;for(var e=0;e<this.pts.length;e++)if(!this.pts[e].equals2D(t.pts[e]))return!1;return!0},e.prototype.setDepthDelta=function(t){this._depthDelta=t},e.prototype.getEdgeIntersectionList=function(){return this.eiList},e.prototype.addIntersections=function(t,e,n){for(var i=0;i<t.getIntersectionNum();i++)this.addIntersection(t,e,n,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.updateIM=function(){if(2!==arguments.length)return t.prototype.updateIM.apply(this,arguments);var e=arguments[0],n=arguments[1];n.setAtLeastIfValid(e.getLocation(0,Se.ON),e.getLocation(1,Se.ON),1),e.isArea()&&(n.setAtLeastIfValid(e.getLocation(0,Se.LEFT),e.getLocation(1,Se.LEFT),2),n.setAtLeastIfValid(e.getLocation(0,Se.RIGHT),e.getLocation(1,Se.RIGHT),2))},e}(Fe),ii=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new Hn,this._bufParams=t||null};ii.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},ii.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new Pe(t.getLabel())).flip(),n.merge(i);var r=ii.depthDelta(i),o=e.getDepthDelta()+r;e.setDepthDelta(o)}else this._edgeList.add(t),t.setDepthDelta(ii.depthDelta(t.getLabel()))},ii.prototype.buildSubgraphs=function(t,e){for(var n=new Nt,i=t.iterator();i.hasNext();){var r=i.next(),o=r.getRightmostCoordinate(),s=new An(n).getDepth(o);r.computeDepth(s),r.findResultEdges(),n.add(r),e.add(r.getDirectedEdges(),r.getNodes())}},ii.prototype.createSubgraphs=function(t){for(var e=new Nt,n=t.getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isVisited()){var r=new Te;r.create(i),e.add(r)}}return $e.sort(e,$e.reverseOrder()),e},ii.prototype.createEmptyResultGeometry=function(){return this._geomFact.createPolygon()},ii.prototype.getNoder=function(t){if(null!==this._workingNoder)return this._workingNoder;var e=new xn,n=new rt;return n.setPrecisionModel(t),e.setSegmentIntersector(new Kn(n)),e},ii.prototype.buffer=function(t,e){var n=this._workingPrecisionModel;null===n&&(n=t.getPrecisionModel()),this._geomFact=t.getFactory();var i=new Mn(n,this._bufParams),r=new Bn(t,e,i).getCurves();if(r.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(r,n),this._graph=new Ye(new kn),this._graph.addEdges(this._edgeList.getEdges());var o=this.createSubgraphs(this._graph),s=new ke(this._geomFact);this.buildSubgraphs(o,s);var a=s.getPolygons();if(a.size()<=0)return this.createEmptyResultGeometry();return this._geomFact.buildGeometry(a)},ii.prototype.computeNodedEdges=function(t,e){var n=this.getNoder(e);n.computeNodes(t);for(var i=n.getNodedSubstrings().iterator();i.hasNext();){var r=i.next(),o=r.getCoordinates();if(2!==o.length||!o[0].equals2D(o[1])){var s=r.getData(),a=new ni(r.getCoordinates(),new Pe(s));this.insertUniqueEdge(a)}}},ii.prototype.setNoder=function(t){this._workingNoder=t},ii.prototype.interfaces_=function(){return[]},ii.prototype.getClass=function(){return ii},ii.depthDelta=function(t){var e=t.getLocation(0,Se.LEFT),n=t.getLocation(0,Se.RIGHT);return e===w.INTERIOR&&n===w.EXTERIOR?1:e===w.EXTERIOR&&n===w.INTERIOR?-1:0},ii.convertSegStrings=function(t){for(var e=new _e,n=new Nt;t.hasNext();){var i=t.next(),r=e.createLineString(i.getCoordinates());n.add(r)}return e.buildGeometry(n)};var ri=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,2===arguments.length){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(4===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],o=arguments[3];this._noder=n,this._scaleFactor=i,this._offsetX=r,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};ri.prototype.rescale=function(){if(T(arguments[0],It))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.rescale(e.getCoordinates())}else if(arguments[0]instanceof Array){for(var n=arguments[0],i=0;i<n.length;i++)n[i].x=n[i].x/this._scaleFactor+this._offsetX,n[i].y=n[i].y/this._scaleFactor+this._offsetY;2===n.length&&n[0].equals2D(n[1])&&Y.out.println(n)}},ri.prototype.scale=function(){if(T(arguments[0],It)){for(var t=arguments[0],e=new Nt,n=t.iterator();n.hasNext();){var i=n.next();e.add(new gn(this.scale(i.getCoordinates()),i.getData()))}return e}if(arguments[0]instanceof Array){for(var r=arguments[0],o=new Array(r.length).fill(null),s=0;s<r.length;s++)o[s]=new C(Math.round((r[s].x-this._offsetX)*this._scaleFactor),Math.round((r[s].y-this._offsetY)*this._scaleFactor),r[s].z);return Lt.removeRepeatedPoints(o)}},ri.prototype.isIntegerPrecision=function(){return 1===this._scaleFactor},ri.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},ri.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},ri.prototype.interfaces_=function(){return[In]},ri.prototype.getClass=function(){return ri};var oi=function(){this._li=new rt,this._segStrings=null;var t=arguments[0];this._segStrings=t},si={fact:{configurable:!0}};oi.prototype.checkEndPtVertexIntersections=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next().getCoordinates();this.checkEndPtVertexIntersections(e[0],this._segStrings),this.checkEndPtVertexIntersections(e[e.length-1],this._segStrings)}else if(2===arguments.length)for(var n=arguments[0],i=arguments[1].iterator();i.hasNext();)for(var r=i.next().getCoordinates(),o=1;o<r.length-1;o++)if(r[o].equals(n))throw new $(\"found endpt/interior pt intersection at index \"+o+\" :pt \"+n)},oi.prototype.checkInteriorIntersections=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();)for(var e=t.next(),n=this._segStrings.iterator();n.hasNext();){var i=n.next();this.checkInteriorIntersections(e,i)}else if(2===arguments.length)for(var r=arguments[0],o=arguments[1],s=r.getCoordinates(),a=o.getCoordinates(),u=0;u<s.length-1;u++)for(var l=0;l<a.length-1;l++)this.checkInteriorIntersections(r,u,o,l);else if(4===arguments.length){var c=arguments[0],p=arguments[1],h=arguments[2],f=arguments[3];if(c===h&&p===f)return null;var g=c.getCoordinates()[p],d=c.getCoordinates()[p+1],y=h.getCoordinates()[f],_=h.getCoordinates()[f+1];if(this._li.computeIntersection(g,d,y,_),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,g,d)||this.hasInteriorIntersection(this._li,y,_)))throw new $(\"found non-noded intersection at \"+g+\"-\"+d+\" and \"+y+\"-\"+_)}},oi.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},oi.prototype.checkCollapses=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next();this.checkCollapses(e)}else if(1===arguments.length)for(var n=arguments[0].getCoordinates(),i=0;i<n.length-2;i++)this.checkCollapse(n[i],n[i+1],n[i+2])},oi.prototype.hasInteriorIntersection=function(t,e,n){for(var i=0;i<t.getIntersectionNum();i++){var r=t.getIntersection(i);if(!r.equals(e)&&!r.equals(n))return!0}return!1},oi.prototype.checkCollapse=function(t,e,n){if(t.equals(n))throw new $(\"found non-noded collapse at \"+oi.fact.createLineString([t,e,n]))},oi.prototype.interfaces_=function(){return[]},oi.prototype.getClass=function(){return oi},si.fact.get=function(){return new _e},Object.defineProperties(oi,si);var ai=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=n,e<=0)throw new m(\"Scale factor must be non-zero\");1!==e&&(this._pt=new C(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new C,this._p1Scaled=new C),this.initCorners(this._pt)},ui={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};ai.prototype.intersectsScaled=function(t,e){var n=Math.min(t.x,e.x),i=Math.max(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.y,e.y),s=this._maxx<n||this._minx>i||this._maxy<r||this._miny>o;if(s)return!1;var a=this.intersectsToleranceSquare(t,e);return et.isTrue(!(s&&a),\"Found bad envelope test\"),a},ai.prototype.initCorners=function(t){this._minx=t.x-.5,this._maxx=t.x+.5,this._miny=t.y-.5,this._maxy=t.y+.5,this._corner[0]=new C(this._maxx,this._maxy),this._corner[1]=new C(this._minx,this._maxy),this._corner[2]=new C(this._minx,this._miny),this._corner[3]=new C(this._maxx,this._miny)},ai.prototype.intersects=function(t,e){return 1===this._scaleFactor?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},ai.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},ai.prototype.getCoordinate=function(){return this._originalPt},ai.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},ai.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var t=ai.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new j(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},ai.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))},ai.prototype.intersectsToleranceSquare=function(t,e){var n=!1,i=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.isProper()||(!(!n||!i)||(!!t.equals(this._pt)||!!e.equals(this._pt))))))},ai.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),i=t.getCoordinate(e+1);return!!this.intersects(n,i)&&(t.addIntersection(this.getCoordinate(),e),!0)},ai.prototype.interfaces_=function(){return[]},ai.prototype.getClass=function(){return ai},ui.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(ai,ui);var li=function(){this.tempEnv1=new j,this.selectedSegment=new dn};li.prototype.select=function(){if(1===arguments.length);else if(2===arguments.length){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}},li.prototype.interfaces_=function(){return[]},li.prototype.getClass=function(){return li};var ci=function(){this._index=null;var t=arguments[0];this._index=t},pi={HotPixelSnapAction:{configurable:!0}};ci.prototype.snap=function(){if(1===arguments.length){var t=arguments[0];return this.snap(t,null,-1)}if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2],r=e.getSafeEnvelope(),o=new hi(e,n,i);return this._index.query(r,{interfaces_:function(){return[Ke]},visitItem:function(t){t.select(r,o)}}),o.isNodeAdded()}},ci.prototype.interfaces_=function(){return[]},ci.prototype.getClass=function(){return ci},pi.HotPixelSnapAction.get=function(){return hi},Object.defineProperties(ci,pi);var hi=function(t){function e(){t.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],n=arguments[1],i=arguments[2];this._hotPixel=e,this._parentEdge=n,this._hotPixelVertexIndex=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(2!==arguments.length)return t.prototype.select.apply(this,arguments);var e=arguments[0],n=arguments[1],i=e.getContext();if(null!==this._parentEdge&&i===this._parentEdge&&n===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(i,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(li),fi=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new Nt};fi.prototype.processIntersections=function(t,e,n,i){if(t===n&&e===i)return null;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];if(this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var u=0;u<this._li.getIntersectionNum();u++)this._interiorIntersections.add(this._li.getIntersection(u));t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)}},fi.prototype.isDone=function(){return!1},fi.prototype.getInteriorIntersections=function(){return this._interiorIntersections},fi.prototype.interfaces_=function(){return[Wn]},fi.prototype.getClass=function(){return fi};var gi=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new rt,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};gi.prototype.checkCorrectness=function(t){var e=gn.getNodedSubstrings(t),n=new oi(e);try{n.checkValid()}catch(t){if(!(t instanceof z))throw t;t.printStackTrace()}},gi.prototype.getNodedSubstrings=function(){return gn.getNodedSubstrings(this._nodedSegStrings)},gi.prototype.snapRound=function(t,e){var n=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(n),this.computeVertexSnaps(t)},gi.prototype.findInteriorIntersections=function(t,e){var n=new fi(e);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(t),n.getInteriorIntersections()},gi.prototype.computeVertexSnaps=function(){if(T(arguments[0],It))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.computeVertexSnaps(e)}else if(arguments[0]instanceof gn)for(var n=arguments[0],i=n.getCoordinates(),r=0;r<i.length;r++){var o=new ai(i[r],this._scaleFactor,this._li);this._pointSnapper.snap(o,n,r)&&n.addIntersection(i[r],r)}},gi.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new xn,this._pointSnapper=new ci(this._noder.getIndex()),this.snapRound(t,this._li)},gi.prototype.computeIntersectionSnaps=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),i=new ai(n,this._scaleFactor,this._li);this._pointSnapper.snap(i)}},gi.prototype.interfaces_=function(){return[In]},gi.prototype.getClass=function(){return gi};var di=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new Cn,this._resultGeometry=null,this._saveException=null,1===arguments.length){var t=arguments[0];this._argGeom=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._argGeom=e,this._bufParams=n}},yi={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};di.prototype.bufferFixedPrecision=function(t){var e=new ri(new gi(new fe(1)),t.getScale()),n=new ii(this._bufParams);n.setWorkingPrecisionModel(t),n.setNoder(e),this._resultGeometry=n.buffer(this._argGeom,this._distance)},di.prototype.bufferReducedPrecision=function(){var t=this;if(0===arguments.length){for(var e=di.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(e){if(!(e instanceof we))throw e;t._saveException=e}if(null!==t._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var n=arguments[0],i=di.precisionScaleFactor(this._argGeom,this._distance,n),r=new fe(i);this.bufferFixedPrecision(r)}},di.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===fe.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},di.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},di.prototype.bufferOriginalPrecision=function(){try{var t=new ii(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(t){if(!(t instanceof $))throw t;this._saveException=t}},di.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},di.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},di.prototype.interfaces_=function(){return[]},di.prototype.getClass=function(){return di},di.bufferOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new di(t).getResultGeometry(e)}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof ct&&\"number\"==typeof arguments[1]){var n=arguments[0],i=arguments[1],r=arguments[2],o=new di(n);o.setQuadrantSegments(r);return o.getResultGeometry(i)}if(arguments[2]instanceof Cn&&arguments[0]instanceof ct&&\"number\"==typeof arguments[1]){var s=arguments[0],a=arguments[1],u=arguments[2];return new di(s,u).getResultGeometry(a)}}else if(4===arguments.length){var l=arguments[0],c=arguments[1],p=arguments[2],h=arguments[3],f=new di(l);f.setQuadrantSegments(p),f.setEndCapStyle(h);return f.getResultGeometry(c)}},di.precisionScaleFactor=function(t,e,n){var i=t.getEnvelopeInternal(),r=R.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY()))+2*(e>0?e:0),o=n-Math.trunc(Math.log(r)/Math.log(10)+1);return Math.pow(10,o)},yi.CAP_ROUND.get=function(){return Cn.CAP_ROUND},yi.CAP_BUTT.get=function(){return Cn.CAP_FLAT},yi.CAP_FLAT.get=function(){return Cn.CAP_FLAT},yi.CAP_SQUARE.get=function(){return Cn.CAP_SQUARE},yi.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(di,yi);var _i=function(){this._pt=[new C,new C],this._distance=v.NaN,this._isNull=!0};_i.prototype.getCoordinates=function(){return this._pt},_i.prototype.getCoordinate=function(t){return this._pt[t]},_i.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i<this._distance&&this.initialize(e,n,i)}},_i.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=r,this._isNull=!1}},_i.prototype.getDistance=function(){return this._distance},_i.prototype.setMaximum=function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i>this._distance&&this.initialize(e,n,i)}},_i.prototype.interfaces_=function(){return[]},_i.prototype.getClass=function(){return _i};var mi=function(){};mi.prototype.interfaces_=function(){return[]},mi.prototype.getClass=function(){return mi},mi.computeDistance=function(){if(arguments[2]instanceof _i&&arguments[0]instanceof Kt&&arguments[1]instanceof C)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=t.getCoordinates(),r=new dn,o=0;o<i.length-1;o++){r.setCoordinates(i[o],i[o+1]);var s=r.closestPoint(e);n.setMinimum(s,e)}else if(arguments[2]instanceof _i&&arguments[0]instanceof $t&&arguments[1]instanceof C){var a=arguments[0],u=arguments[1],l=arguments[2];mi.computeDistance(a.getExteriorRing(),u,l);for(var c=0;c<a.getNumInteriorRing();c++)mi.computeDistance(a.getInteriorRingN(c),u,l)}else if(arguments[2]instanceof _i&&arguments[0]instanceof ct&&arguments[1]instanceof C){var p=arguments[0],h=arguments[1],f=arguments[2];if(p instanceof Kt)mi.computeDistance(p,h,f);else if(p instanceof $t)mi.computeDistance(p,h,f);else if(p instanceof zt)for(var g=p,d=0;d<g.getNumGeometries();d++){var y=g.getGeometryN(d);mi.computeDistance(y,h,f)}else f.setMinimum(p.getCoordinate(),h)}else if(arguments[2]instanceof _i&&arguments[0]instanceof dn&&arguments[1]instanceof C){var _=arguments[0],m=arguments[1],v=arguments[2],I=_.closestPoint(m);v.setMinimum(I,m)}};var vi=function(t){this._maxPtDist=new _i,this._inputGeom=t||null},Ii={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};vi.prototype.computeMaxMidpointDistance=function(t){var e=new xi(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},vi.prototype.computeMaxVertexDistance=function(t){var e=new Ei(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},vi.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},vi.prototype.getDistancePoints=function(){return this._maxPtDist},vi.prototype.interfaces_=function(){return[]},vi.prototype.getClass=function(){return vi},Ii.MaxPointDistanceFilter.get=function(){return Ei},Ii.MaxMidpointDistanceFilter.get=function(){return xi},Object.defineProperties(vi,Ii);var Ei=function(t){this._maxPtDist=new _i,this._minPtDist=new _i,this._geom=t||null};Ei.prototype.filter=function(t){this._minPtDist.initialize(),mi.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Ei.prototype.getMaxPointDistance=function(){return this._maxPtDist},Ei.prototype.interfaces_=function(){return[ft]},Ei.prototype.getClass=function(){return Ei};var xi=function(t){this._maxPtDist=new _i,this._minPtDist=new _i,this._geom=t||null};xi.prototype.filter=function(t,e){if(0===e)return null;var n=t.getCoordinate(e-1),i=t.getCoordinate(e),r=new C((n.x+i.x)/2,(n.y+i.y)/2);this._minPtDist.initialize(),mi.computeDistance(this._geom,r,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},xi.prototype.isDone=function(){return!1},xi.prototype.isGeometryChanged=function(){return!1},xi.prototype.getMaxPointDistance=function(){return this._maxPtDist},xi.prototype.interfaces_=function(){return[Ut]},xi.prototype.getClass=function(){return xi};var Ni=function(t){this._comps=t||null};Ni.prototype.filter=function(t){t instanceof $t&&this._comps.add(t)},Ni.prototype.interfaces_=function(){return[Vt]},Ni.prototype.getClass=function(){return Ni},Ni.getPolygons=function(){if(1===arguments.length){var t=arguments[0];return Ni.getPolygons(t,new Nt)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof $t?n.add(e):e instanceof zt&&e.apply(new Ni(n)),n}};var Ci=function(){if(this._lines=null,this._isForcedToLineString=!1,1===arguments.length){var t=arguments[0];this._lines=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._lines=e,this._isForcedToLineString=n}};Ci.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof ee){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof Kt&&this._lines.add(t)},Ci.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},Ci.prototype.interfaces_=function(){return[lt]},Ci.prototype.getClass=function(){return Ci},Ci.getGeometry=function(){if(1===arguments.length){var t=arguments[0];return t.getFactory().buildGeometry(Ci.getLines(t))}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e.getFactory().buildGeometry(Ci.getLines(e,n))}},Ci.getLines=function(){if(1===arguments.length){var t=arguments[0];return Ci.getLines(t,!1)}if(2===arguments.length){if(T(arguments[0],It)&&T(arguments[1],It)){for(var e=arguments[0],n=arguments[1],i=e.iterator();i.hasNext();){var r=i.next();Ci.getLines(r,n)}return n}if(arguments[0]instanceof ct&&\"boolean\"==typeof arguments[1]){var o=arguments[0],s=arguments[1],a=new Nt;return o.apply(new Ci(a,s)),a}if(arguments[0]instanceof ct&&T(arguments[1],It)){var u=arguments[0],l=arguments[1];return u instanceof Kt?l.add(u):u.apply(new Ci(l)),l}}else if(3===arguments.length){if(\"boolean\"==typeof arguments[2]&&T(arguments[0],It)&&T(arguments[1],It)){for(var c=arguments[0],p=arguments[1],h=arguments[2],f=c.iterator();f.hasNext();){var g=f.next();Ci.getLines(g,p,h)}return p}if(\"boolean\"==typeof arguments[2]&&arguments[0]instanceof ct&&T(arguments[1],It)){var d=arguments[0],y=arguments[1],_=arguments[2];return d.apply(new Ci(y,_)),y}}};var Si=function(){if(this._boundaryRule=gt.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];if(null===t)throw new m(\"Rule must be non-null\");this._boundaryRule=t}};Si.prototype.locateInternal=function(){if(arguments[0]instanceof C&&arguments[1]instanceof $t){var t=arguments[0],e=arguments[1];if(e.isEmpty())return w.EXTERIOR;var n=e.getExteriorRing(),i=this.locateInPolygonRing(t,n);if(i===w.EXTERIOR)return w.EXTERIOR;if(i===w.BOUNDARY)return w.BOUNDARY;for(var r=0;r<e.getNumInteriorRing();r++){var o=e.getInteriorRingN(r),s=this.locateInPolygonRing(t,o);if(s===w.INTERIOR)return w.EXTERIOR;if(s===w.BOUNDARY)return w.BOUNDARY}return w.INTERIOR}if(arguments[0]instanceof C&&arguments[1]instanceof Kt){var a=arguments[0],u=arguments[1];if(!u.getEnvelopeInternal().intersects(a))return w.EXTERIOR;var l=u.getCoordinates();return u.isClosed()||!a.equals(l[0])&&!a.equals(l[l.length-1])?at.isOnLine(a,l)?w.INTERIOR:w.EXTERIOR:w.BOUNDARY}if(arguments[0]instanceof C&&arguments[1]instanceof Qt){var c=arguments[0];return arguments[1].getCoordinate().equals2D(c)?w.INTERIOR:w.EXTERIOR}},Si.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?at.locatePointInRing(t,e.getCoordinates()):w.EXTERIOR},Si.prototype.intersects=function(t,e){return this.locate(t,e)!==w.EXTERIOR},Si.prototype.updateLocationInfo=function(t){t===w.INTERIOR&&(this._isIn=!0),t===w.BOUNDARY&&this._numBoundaries++},Si.prototype.computeLocation=function(t,e){if(e instanceof Qt&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof Kt)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof $t)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Xt)for(var n=e,i=0;i<n.getNumGeometries();i++){var r=n.getGeometryN(i);this.updateLocationInfo(this.locateInternal(t,r))}else if(e instanceof ne)for(var o=e,s=0;s<o.getNumGeometries();s++){var a=o.getGeometryN(s);this.updateLocationInfo(this.locateInternal(t,a))}else if(e instanceof zt)for(var u=new Un(e);u.hasNext();){var l=u.next();l!==e&&this.computeLocation(t,l)}},Si.prototype.locate=function(t,e){return e.isEmpty()?w.EXTERIOR:e instanceof Kt?this.locateInternal(t,e):e instanceof $t?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?w.BOUNDARY:this._numBoundaries>0||this._isIn?w.INTERIOR:w.EXTERIOR)},Si.prototype.interfaces_=function(){return[]},Si.prototype.getClass=function(){return Si};var Li=function t(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length){var e=arguments[0],n=arguments[1];t.call(this,e,t.INSIDE_AREA,n)}else if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];this._component=i,this._segIndex=r,this._pt=o}},bi={INSIDE_AREA:{configurable:!0}};Li.prototype.isInsideArea=function(){return this._segIndex===Li.INSIDE_AREA},Li.prototype.getCoordinate=function(){return this._pt},Li.prototype.getGeometryComponent=function(){return this._component},Li.prototype.getSegmentIndex=function(){return this._segIndex},Li.prototype.interfaces_=function(){return[]},Li.prototype.getClass=function(){return Li},bi.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Li,bi);var wi=function(t){this._pts=t||null};wi.prototype.filter=function(t){t instanceof Qt&&this._pts.add(t)},wi.prototype.interfaces_=function(){return[Vt]},wi.prototype.getClass=function(){return wi},wi.getPoints=function(){if(1===arguments.length){var t=arguments[0];return t instanceof Qt?$e.singletonList(t):wi.getPoints(t,new Nt)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof Qt?n.add(e):e instanceof zt&&e.apply(new wi(n)),n}};var Oi=function(){this._locations=null;var t=arguments[0];this._locations=t};Oi.prototype.filter=function(t){(t instanceof Qt||t instanceof Kt||t instanceof $t)&&this._locations.add(new Li(t,0,t.getCoordinate()))},Oi.prototype.interfaces_=function(){return[Vt]},Oi.prototype.getClass=function(){return Oi},Oi.getLocations=function(t){var e=new Nt;return t.apply(new Oi(e)),e};var Ti=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Si,this._minDistanceLocation=null,this._minDistance=v.MAX_VALUE,2===arguments.length){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=i,this._terminateDistance=r}};Ti.prototype.computeContainmentDistance=function(){if(0===arguments.length){var t=new Array(2).fill(null);if(this.computeContainmentDistance(0,t),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=1-e,r=Ni.getPolygons(this._geom[e]);if(r.size()>0){var o=Oi.getLocations(this._geom[i]);if(this.computeContainmentDistance(o,r,n),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[i]=n[0],this._minDistanceLocation[e]=n[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&T(arguments[0],xt)&&T(arguments[1],xt)){for(var s=arguments[0],a=arguments[1],u=arguments[2],l=0;l<s.size();l++)for(var c=s.get(l),p=0;p<a.size();p++)if(this.computeContainmentDistance(c,a.get(p),u),this._minDistance<=this._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof Li&&arguments[1]instanceof $t){var h=arguments[0],f=arguments[1],g=arguments[2],d=h.getCoordinate();if(w.EXTERIOR!==this._ptLocator.locate(d,f))return this._minDistance=0,g[0]=h,g[1]=new Li(f,d),null}},Ti.prototype.computeMinDistanceLinesPoints=function(t,e,n){for(var i=0;i<t.size();i++)for(var r=t.get(i),o=0;o<e.size();o++){var s=e.get(o);if(this.computeMinDistance(r,s,n),this._minDistance<=this._terminateDistance)return null}},Ti.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=Ci.getLines(this._geom[0]),n=Ci.getLines(this._geom[1]),i=wi.getPoints(this._geom[0]),r=wi.getPoints(this._geom[1]);return this.computeMinDistanceLines(e,n,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,r,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(n,i,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistancePoints(i,r,t),void this.updateMinDistance(t,!1))))},Ti.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},Ti.prototype.updateMinDistance=function(t,e){if(null===t[0])return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},Ti.prototype.nearestPoints=function(){this.computeMinDistance();return[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()]},Ti.prototype.computeMinDistance=function(){if(0===arguments.length){if(null!==this._minDistanceLocation)return null;if(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance)return null;this.computeFacetDistance()}else if(3===arguments.length)if(arguments[2]instanceof Array&&arguments[0]instanceof Kt&&arguments[1]instanceof Qt){var t=arguments[0],e=arguments[1],n=arguments[2];if(t.getEnvelopeInternal().distance(e.getEnvelopeInternal())>this._minDistance)return null;for(var i=t.getCoordinates(),r=e.getCoordinate(),o=0;o<i.length-1;o++){var s=at.distancePointLine(r,i[o],i[o+1]);if(s<this._minDistance){this._minDistance=s;var a=new dn(i[o],i[o+1]).closestPoint(r);n[0]=new Li(t,o,a),n[1]=new Li(e,0,r)}if(this._minDistance<=this._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof Kt&&arguments[1]instanceof Kt){var u=arguments[0],l=arguments[1],c=arguments[2];if(u.getEnvelopeInternal().distance(l.getEnvelopeInternal())>this._minDistance)return null;for(var p=u.getCoordinates(),h=l.getCoordinates(),f=0;f<p.length-1;f++)for(var g=0;g<h.length-1;g++){var d=at.distanceLineLine(p[f],p[f+1],h[g],h[g+1]);if(d<this._minDistance){this._minDistance=d;var y=new dn(p[f],p[f+1]),_=new dn(h[g],h[g+1]),m=y.closestPoints(_);c[0]=new Li(u,f,m[0]),c[1]=new Li(l,g,m[1])}if(this._minDistance<=this._terminateDistance)return null}}},Ti.prototype.computeMinDistancePoints=function(t,e,n){for(var i=0;i<t.size();i++)for(var r=t.get(i),o=0;o<e.size();o++){var s=e.get(o),a=r.getCoordinate().distance(s.getCoordinate());if(a<this._minDistance&&(this._minDistance=a,n[0]=new Li(r,0,r.getCoordinate()),n[1]=new Li(s,0,s.getCoordinate())),this._minDistance<=this._terminateDistance)return null}},Ti.prototype.distance=function(){if(null===this._geom[0]||null===this._geom[1])throw new m(\"null geometries are not supported\");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},Ti.prototype.computeMinDistanceLines=function(t,e,n){for(var i=0;i<t.size();i++)for(var r=t.get(i),o=0;o<e.size();o++){var s=e.get(o);if(this.computeMinDistance(r,s,n),this._minDistance<=this._terminateDistance)return null}},Ti.prototype.interfaces_=function(){return[]},Ti.prototype.getClass=function(){return Ti},Ti.distance=function(t,e){return new Ti(t,e).distance()},Ti.isWithinDistance=function(t,e,n){return new Ti(t,e,n).distance()<=n},Ti.nearestPoints=function(t,e){return new Ti(t,e).nearestPoints()};var Ri=function(){this._pt=[new C,new C],this._distance=v.NaN,this._isNull=!0};Ri.prototype.getCoordinates=function(){return this._pt},Ri.prototype.getCoordinate=function(t){return this._pt[t]},Ri.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i<this._distance&&this.initialize(e,n,i)}},Ri.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=r,this._isNull=!1}},Ri.prototype.toString=function(){return Z.toLineString(this._pt[0],this._pt[1])},Ri.prototype.getDistance=function(){return this._distance},Ri.prototype.setMaximum=function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i>this._distance&&this.initialize(e,n,i)}},Ri.prototype.interfaces_=function(){return[]},Ri.prototype.getClass=function(){return Ri};var Pi=function(){};Pi.prototype.interfaces_=function(){return[]},Pi.prototype.getClass=function(){return Pi},Pi.computeDistance=function(){if(arguments[2]instanceof Ri&&arguments[0]instanceof Kt&&arguments[1]instanceof C)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=new dn,r=t.getCoordinates(),o=0;o<r.length-1;o++){i.setCoordinates(r[o],r[o+1]);var s=i.closestPoint(e);n.setMinimum(s,e)}else if(arguments[2]instanceof Ri&&arguments[0]instanceof $t&&arguments[1]instanceof C){var a=arguments[0],u=arguments[1],l=arguments[2];Pi.computeDistance(a.getExteriorRing(),u,l);for(var c=0;c<a.getNumInteriorRing();c++)Pi.computeDistance(a.getInteriorRingN(c),u,l)}else if(arguments[2]instanceof Ri&&arguments[0]instanceof ct&&arguments[1]instanceof C){var p=arguments[0],h=arguments[1],f=arguments[2];if(p instanceof Kt)Pi.computeDistance(p,h,f);else if(p instanceof $t)Pi.computeDistance(p,h,f);else if(p instanceof zt)for(var g=p,d=0;d<g.getNumGeometries();d++){var y=g.getGeometryN(d);Pi.computeDistance(y,h,f)}else f.setMinimum(p.getCoordinate(),h)}else if(arguments[2]instanceof Ri&&arguments[0]instanceof dn&&arguments[1]instanceof C){var _=arguments[0],m=arguments[1],v=arguments[2],I=_.closestPoint(m);v.setMinimum(I,m)}};var Di=function(){this._g0=null,this._g1=null,this._ptDist=new Ri,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},Mi={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};Di.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},Di.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new m(\"Fraction is not in range (0.0 - 1.0]\");this._densifyFrac=t},Di.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},Di.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Di.prototype.computeOrientedDistance=function(t,e,n){var i=new Ai(e);if(t.apply(i),n.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var r=new Fi(e,this._densifyFrac);t.apply(r),n.setMaximum(r.getMaxPointDistance())}},Di.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Di.prototype.interfaces_=function(){return[]},Di.prototype.getClass=function(){return Di},Di.distance=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new Di(t,e).distance()}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],o=new Di(n,i);return o.setDensifyFraction(r),o.distance()}},Mi.MaxPointDistanceFilter.get=function(){return Ai},Mi.MaxDensifiedByFractionDistanceFilter.get=function(){return Fi},Object.defineProperties(Di,Mi);var Ai=function(){this._maxPtDist=new Ri,this._minPtDist=new Ri,this._euclideanDist=new Pi,this._geom=null;var t=arguments[0];this._geom=t};Ai.prototype.filter=function(t){this._minPtDist.initialize(),Pi.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Ai.prototype.getMaxPointDistance=function(){return this._maxPtDist},Ai.prototype.interfaces_=function(){return[ft]},Ai.prototype.getClass=function(){return Ai};var Fi=function(){this._maxPtDist=new Ri,this._minPtDist=new Ri,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};Fi.prototype.filter=function(t,e){if(0===e)return null;for(var n=t.getCoordinate(e-1),i=t.getCoordinate(e),r=(i.x-n.x)/this._numSubSegs,o=(i.y-n.y)/this._numSubSegs,s=0;s<this._numSubSegs;s++){var a=n.x+s*r,u=n.y+s*o,l=new C(a,u);this._minPtDist.initialize(),Pi.computeDistance(this._geom,l,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)}},Fi.prototype.isDone=function(){return!1},Fi.prototype.isGeometryChanged=function(){return!1},Fi.prototype.getMaxPointDistance=function(){return this._maxPtDist},Fi.prototype.interfaces_=function(){return[Ut]},Fi.prototype.getClass=function(){return Fi};var Gi=function(t,e,n){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=e||null,this._result=n||null},qi={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Gi.prototype.checkMaximumDistance=function(t,e,n){var i=new Di(e,t);if(i.setDensifyFraction(.25),this._maxDistanceFound=i.orientedDistance(),this._maxDistanceFound>n){this._isValid=!1;var r=i.getCoordinates();this._errorLocation=r[1],this._errorIndicator=t.getFactory().createLineString(r),this._errMsg=\"Distance between buffer curve and input is too large (\"+this._maxDistanceFound+\" at \"+Z.toLineString(r[0],r[1])+\")\"}},Gi.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Gi.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Gi.VERBOSE&&Y.out.println(\"Min Dist= \"+this._minDistanceFound+\"  err= \"+(1-this._minDistanceFound/this._bufDistance)+\"  Max Dist= \"+this._maxDistanceFound+\"  err= \"+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Gi.prototype.checkNegativeValid=function(){if(!(this._input instanceof $t||this._input instanceof ne||this._input instanceof zt))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Gi.prototype.getErrorIndicator=function(){return this._errorIndicator},Gi.prototype.checkMinimumDistance=function(t,e,n){var i=new Ti(t,e,n);if(this._minDistanceFound=i.distance(),this._minDistanceFound<n){this._isValid=!1;var r=i.nearestPoints();this._errorLocation=i.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(r),this._errMsg=\"Distance between buffer curve and input is too small (\"+this._minDistanceFound+\" at \"+Z.toLineString(r[0],r[1])+\" )\"}},Gi.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},Gi.prototype.getErrorLocation=function(){return this._errorLocation},Gi.prototype.getPolygonLines=function(t){for(var e=new Nt,n=new Ci(e),i=Ni.getPolygons(t).iterator();i.hasNext();){i.next().apply(n)}return t.getFactory().buildGeometry(e)},Gi.prototype.getErrorMessage=function(){return this._errMsg},Gi.prototype.interfaces_=function(){return[]},Gi.prototype.getClass=function(){return Gi},qi.VERBOSE.get=function(){return!1},qi.MAX_DISTANCE_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Gi,qi);var Bi=function(t,e,n){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=n||null},Vi={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};Bi.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},Bi.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*Bi.MAX_ENV_DIFF_FRAC;0===t&&(t=.001);var e=new j(this._input.getEnvelopeInternal());e.expandBy(this._distance);var n=new j(this._result.getEnvelopeInternal());n.expandBy(t),n.contains(e)||(this._isValid=!1,this._errorMsg=\"Buffer envelope is incorrect\",this._errorIndicator=this._input.getFactory().toGeometry(n)),this.report(\"Envelope\")},Bi.prototype.checkDistance=function(){var t=new Gi(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report(\"Distance\")},Bi.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg=\"Area of positive buffer is smaller than input\",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg=\"Area of negative buffer is larger than input\",this._errorIndicator=this._result),this.report(\"Area\")},Bi.prototype.checkPolygonal=function(){this._result instanceof $t||this._result instanceof ne||(this._isValid=!1),this._errorMsg=\"Result is not polygonal\",this._errorIndicator=this._result,this.report(\"Polygonal\")},Bi.prototype.getErrorIndicator=function(){return this._errorIndicator},Bi.prototype.getErrorLocation=function(){return this._errorLocation},Bi.prototype.checkExpectedEmpty=function(){return this._input.getDimension()>=2?null:this._distance>0?null:(this._result.isEmpty()||(this._isValid=!1,this._errorMsg=\"Result is non-empty\",this._errorIndicator=this._result),void this.report(\"ExpectedEmpty\"))},Bi.prototype.report=function(t){if(!Bi.VERBOSE)return null;Y.out.println(\"Check \"+t+\": \"+(this._isValid?\"passed\":\"FAILED\"))},Bi.prototype.getErrorMessage=function(){return this._errorMsg},Bi.prototype.interfaces_=function(){return[]},Bi.prototype.getClass=function(){return Bi},Bi.isValidMsg=function(t,e,n){var i=new Bi(t,e,n);return i.isValid()?null:i.getErrorMessage()},Bi.isValid=function(t,e,n){return!!new Bi(t,e,n).isValid()},Vi.VERBOSE.get=function(){return!1},Vi.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Bi,Vi);var Ui=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Ui.prototype.getCoordinates=function(){return this._pts},Ui.prototype.size=function(){return this._pts.length},Ui.prototype.getCoordinate=function(t){return this._pts[t]},Ui.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Ui.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:pn.octant(this.getCoordinate(t),this.getCoordinate(t+1))},Ui.prototype.setData=function(t){this._data=t},Ui.prototype.getData=function(){return this._data},Ui.prototype.toString=function(){return Z.toLineString(new ue(this._pts))},Ui.prototype.interfaces_=function(){return[hn]},Ui.prototype.getClass=function(){return Ui};var zi=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new Nt,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};zi.prototype.getInteriorIntersection=function(){return this._interiorIntersection},zi.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},zi.prototype.getIntersectionSegments=function(){return this._intSegments},zi.prototype.count=function(){return this._intersectionCount},zi.prototype.getIntersections=function(){return this._intersections},zi.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},zi.prototype.setKeepIntersections=function(t){this._keepIntersections=t},zi.prototype.processIntersections=function(t,e,n,i){if(!this._findAllIntersections&&this.hasIntersection())return null;if(t===n&&e===i)return null;if(this._isCheckEndSegmentsOnly){if(!(this.isEndSegment(t,e)||this.isEndSegment(n,i)))return null}var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=r,this._intSegments[1]=o,this._intSegments[2]=s,this._intSegments[3]=a,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},zi.prototype.isEndSegment=function(t,e){return 0===e||e>=t.size()-2},zi.prototype.hasIntersection=function(){return null!==this._interiorIntersection},zi.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},zi.prototype.interfaces_=function(){return[Wn]},zi.prototype.getClass=function(){return zi},zi.createAllIntersectionsFinder=function(t){var e=new zi(t);return e.setFindAllIntersections(!0),e},zi.createAnyIntersectionFinder=function(t){return new zi(t)},zi.createIntersectionCounter=function(t){var e=new zi(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Xi=function(){this._li=new rt,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Xi.prototype.execute=function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},Xi.prototype.getIntersections=function(){return this._segInt.getIntersections()},Xi.prototype.isValid=function(){return this.execute(),this._isValid},Xi.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Xi.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new zi(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new xn;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Xi.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new we(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Xi.prototype.getErrorMessage=function(){if(this._isValid)return\"no intersections found\";var t=this._segInt.getIntersectionSegments();return\"found non-noded intersection between \"+Z.toLineString(t[0],t[1])+\" and \"+Z.toLineString(t[2],t[3])},Xi.prototype.interfaces_=function(){return[]},Xi.prototype.getClass=function(){return Xi},Xi.computeIntersections=function(t){var e=new Xi(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var Yi=function t(){this._nv=null;var e=arguments[0];this._nv=new Xi(t.toSegmentStrings(e))};Yi.prototype.checkValid=function(){this._nv.checkValid()},Yi.prototype.interfaces_=function(){return[]},Yi.prototype.getClass=function(){return Yi},Yi.toSegmentStrings=function(t){for(var e=new Nt,n=t.iterator();n.hasNext();){var i=n.next();e.add(new Ui(i.getCoordinates(),i))}return e},Yi.checkValid=function(t){new Yi(t).checkValid()};var ki=function(t){this._mapOp=t};ki.prototype.map=function(t){for(var e=new Nt,n=0;n<t.getNumGeometries();n++){var i=this._mapOp.map(t.getGeometryN(n));i.isEmpty()||e.add(i)}return t.getFactory().createGeometryCollection(_e.toGeometryArray(e))},ki.prototype.interfaces_=function(){return[]},ki.prototype.getClass=function(){return ki},ki.map=function(t,e){return new ki(e).map(t)};var ji=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new Nt,this._resultLineList=new Nt;var t=arguments[0],e=arguments[1],n=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=n};ji.prototype.collectLines=function(t){for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var n=e.next();this.collectLineEdge(n,t,this._lineEdgesList),this.collectBoundaryTouchEdge(n,t,this._lineEdgesList)}},ji.prototype.labelIsolatedLine=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,n)},ji.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},ji.prototype.collectLineEdge=function(t,e,n){var i=t.getLabel(),r=t.getEdge();t.isLineEdge()&&(t.isVisited()||!Lr.isResultOfOp(i,e)||r.isCovered()||(n.add(r),t.setVisitedEdge(!0)))},ji.prototype.findCoveredLineEdges=function(){for(var t=this._op.getGraph().getNodes().iterator();t.hasNext();){t.next().getEdges().findCoveredLineEdges()}for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var n=e.next(),i=n.getEdge();if(n.isLineEdge()&&!i.isCoveredSet()){var r=this._op.isCoveredByA(n.getCoordinate());i.setCovered(r)}}},ji.prototype.labelIsolatedLines=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),i=n.getLabel();n.isIsolated()&&(i.isNull(0)?this.labelIsolatedLine(n,0):this.labelIsolatedLine(n,1))}},ji.prototype.buildLines=function(t){for(var e=this._lineEdgesList.iterator();e.hasNext();){var n=e.next(),i=this._geometryFactory.createLineString(n.getCoordinates());this._resultLineList.add(i),n.setInResult(!0)}},ji.prototype.collectBoundaryTouchEdge=function(t,e,n){var i=t.getLabel();return t.isLineEdge()?null:t.isVisited()?null:t.isInteriorAreaEdge()?null:t.getEdge().isInResult()?null:(et.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),void(Lr.isResultOfOp(i,e)&&e===Lr.INTERSECTION&&(n.add(t.getEdge()),t.setVisitedEdge(!0))))},ji.prototype.interfaces_=function(){return[]},ji.prototype.getClass=function(){return ji};var Hi=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new Nt;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};Hi.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var n=this._geometryFactory.createPoint(e);this._resultPointList.add(n)}},Hi.prototype.extractNonCoveredResultNodes=function(t){for(var e=this._op.getGraph().getNodes().iterator();e.hasNext();){var n=e.next();if(!n.isInResult()&&(!n.isIncidentEdgeInResult()&&(0===n.getEdges().getDegree()||t===Lr.INTERSECTION))){var i=n.getLabel();Lr.isResultOfOp(i,t)&&this.filterCoveredNodeToPoint(n)}}},Hi.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},Hi.prototype.interfaces_=function(){return[]},Hi.prototype.getClass=function(){return Hi};var Wi=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};Wi.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},Wi.prototype.transformPolygon=function(t,e){var n=!0,i=this.transformLinearRing(t.getExteriorRing(),t);null!==i&&i instanceof ee&&!i.isEmpty()||(n=!1);for(var r=new Nt,o=0;o<t.getNumInteriorRing();o++){var s=this.transformLinearRing(t.getInteriorRingN(o),t);null===s||s.isEmpty()||(s instanceof ee||(n=!1),r.add(s))}if(n)return this._factory.createPolygon(i,r.toArray([]));var a=new Nt;return null!==i&&a.add(i),a.addAll(r),this._factory.buildGeometry(a)},Wi.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},Wi.prototype.getInputGeometry=function(){return this._inputGeom},Wi.prototype.transformMultiLineString=function(t,e){for(var n=new Nt,i=0;i<t.getNumGeometries();i++){var r=this.transformLineString(t.getGeometryN(i),t);null!==r&&(r.isEmpty()||n.add(r))}return this._factory.buildGeometry(n)},Wi.prototype.transformCoordinates=function(t,e){return this.copy(t)},Wi.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},Wi.prototype.transformMultiPoint=function(t,e){for(var n=new Nt,i=0;i<t.getNumGeometries();i++){var r=this.transformPoint(t.getGeometryN(i),t);null!==r&&(r.isEmpty()||n.add(r))}return this._factory.buildGeometry(n)},Wi.prototype.transformMultiPolygon=function(t,e){for(var n=new Nt,i=0;i<t.getNumGeometries();i++){var r=this.transformPolygon(t.getGeometryN(i),t);null!==r&&(r.isEmpty()||n.add(r))}return this._factory.buildGeometry(n)},Wi.prototype.copy=function(t){return t.copy()},Wi.prototype.transformGeometryCollection=function(t,e){for(var n=new Nt,i=0;i<t.getNumGeometries();i++){var r=this.transform(t.getGeometryN(i));null!==r&&(this._pruneEmptyGeometry&&r.isEmpty()||n.add(r))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(_e.toGeometryArray(n)):this._factory.buildGeometry(n)},Wi.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof Qt)return this.transformPoint(t,null);if(t instanceof te)return this.transformMultiPoint(t,null);if(t instanceof ee)return this.transformLinearRing(t,null);if(t instanceof Kt)return this.transformLineString(t,null);if(t instanceof Xt)return this.transformMultiLineString(t,null);if(t instanceof $t)return this.transformPolygon(t,null);if(t instanceof ne)return this.transformMultiPolygon(t,null);if(t instanceof zt)return this.transformGeometryCollection(t,null);throw new m(\"Unknown Geometry subtype: \"+t.getClass().getName())},Wi.prototype.transformLinearRing=function(t,e){var n=this.transformCoordinates(t.getCoordinateSequence(),t);if(null===n)return this._factory.createLinearRing(null);var i=n.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},Wi.prototype.interfaces_=function(){return[]},Wi.prototype.getClass=function(){return Wi};var Ki=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new dn,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Kt&&\"number\"==typeof arguments[1]){var e=arguments[0],n=arguments[1];t.call(this,e.getCoordinates(),n)}else if(arguments[0]instanceof Array&&\"number\"==typeof arguments[1]){var i=arguments[0],r=arguments[1];this._srcPts=i,this._isClosed=t.isClosed(i),this._snapTolerance=r}};Ki.prototype.snapVertices=function(t,e){for(var n=this._isClosed?t.size()-1:t.size(),i=0;i<n;i++){var r=t.get(i),o=this.findSnapForVertex(r,e);null!==o&&(t.set(i,new C(o)),0===i&&this._isClosed&&t.set(t.size()-1,new C(o)))}},Ki.prototype.findSnapForVertex=function(t,e){for(var n=0;n<e.length;n++){if(t.equals2D(e[n]))return null;if(t.distance(e[n])<this._snapTolerance)return e[n]}return null},Ki.prototype.snapTo=function(t){var e=new St(this._srcPts);this.snapVertices(e,t),this.snapSegments(e,t);return e.toCoordinateArray()},Ki.prototype.snapSegments=function(t,e){if(0===e.length)return null;var n=e.length;e[0].equals2D(e[e.length-1])&&(n=e.length-1);for(var i=0;i<n;i++){var r=e[i],o=this.findSegmentIndexToSnap(r,t);o>=0&&t.add(o+1,new C(r),!1)}},Ki.prototype.findSegmentIndexToSnap=function(t,e){for(var n=v.MAX_VALUE,i=-1,r=0;r<e.size()-1;r++){if(this._seg.p0=e.get(r),this._seg.p1=e.get(r+1),this._seg.p0.equals2D(t)||this._seg.p1.equals2D(t)){if(this._allowSnappingToSourceVertices)continue;return-1}var o=this._seg.distance(t);o<this._snapTolerance&&o<n&&(n=o,i=r)}return i},Ki.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},Ki.prototype.interfaces_=function(){return[]},Ki.prototype.getClass=function(){return Ki},Ki.isClosed=function(t){return!(t.length<=1)&&t[0].equals2D(t[t.length-1])};var Ji=function(t){this._srcGeom=t||null},Qi={SNAP_PRECISION_FACTOR:{configurable:!0}};Ji.prototype.snapTo=function(t,e){var n=this.extractTargetCoordinates(t);return new Zi(e,n).transform(this._srcGeom)},Ji.prototype.snapToSelf=function(t,e){var n=this.extractTargetCoordinates(this._srcGeom),i=new Zi(t,n,!0).transform(this._srcGeom),r=i;return e&&T(r,Zt)&&(r=i.buffer(0)),r},Ji.prototype.computeSnapTolerance=function(t){return this.computeMinimumSegmentLength(t)/10},Ji.prototype.extractTargetCoordinates=function(t){for(var e=new f,n=t.getCoordinates(),i=0;i<n.length;i++)e.add(n[i]);return e.toArray(new Array(0).fill(null))},Ji.prototype.computeMinimumSegmentLength=function(t){for(var e=v.MAX_VALUE,n=0;n<t.length-1;n++){var i=t[n].distance(t[n+1]);i<e&&(e=i)}return e},Ji.prototype.interfaces_=function(){return[]},Ji.prototype.getClass=function(){return Ji},Ji.snap=function(t,e,n){var i=new Array(2).fill(null),r=new Ji(t);i[0]=r.snapTo(e,n);var o=new Ji(e);return i[1]=o.snapTo(i[0],n),i},Ji.computeOverlaySnapTolerance=function(){if(1===arguments.length){var t=arguments[0],e=Ji.computeSizeBasedSnapTolerance(t),n=t.getPrecisionModel();if(n.getType()===fe.FIXED){var i=1/n.getScale()*2/1.415;i>e&&(e=i)}return e}if(2===arguments.length){var r=arguments[0],o=arguments[1];return Math.min(Ji.computeOverlaySnapTolerance(r),Ji.computeOverlaySnapTolerance(o))}},Ji.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal();return Math.min(e.getHeight(),e.getWidth())*Ji.SNAP_PRECISION_FACTOR},Ji.snapToSelf=function(t,e,n){return new Ji(t).snapToSelf(e,n)},Qi.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Ji,Qi);var Zi=function(t){function e(e,n,i){t.call(this),this._snapTolerance=e||null,this._snapPts=n||null,this._isSelfSnap=void 0!==i&&i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(t,e){var n=new Ki(t,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(e)},e.prototype.transformCoordinates=function(t,e){var n=t.toCoordinateArray(),i=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Wi),$i=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};$i.prototype.getCommon=function(){return v.longBitsToDouble(this._commonBits)},$i.prototype.add=function(t){var e=v.doubleToLongBits(t);if(this._isFirst)return this._commonBits=e,this._commonSignExp=$i.signExpBits(this._commonBits),this._isFirst=!1,null;if($i.signExpBits(e)!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=$i.numCommonMostSigMantissaBits(this._commonBits,e),this._commonBits=$i.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))},$i.prototype.toString=function(){if(1===arguments.length){var t=arguments[0],e=v.longBitsToDouble(t),n=\"0000000000000000000000000000000000000000000000000000000000000000\"+v.toBinaryString(t),i=n.substring(n.length-64);return i.substring(0,1)+\"  \"+i.substring(1,12)+\"(exp) \"+i.substring(12)+\" [ \"+e+\" ]\"}},$i.prototype.interfaces_=function(){return[]},$i.prototype.getClass=function(){return $i},$i.getBit=function(t,e){return 0!=(t&1<<e)?1:0},$i.signExpBits=function(t){return t>>52},$i.zeroLowerBits=function(t,e){return t&~((1<<e)-1)},$i.numCommonMostSigMantissaBits=function(t,e){for(var n=0,i=52;i>=0;i--){if($i.getBit(t,i)!==$i.getBit(e,i))return n;n++}return 52};var tr=function(){this._commonCoord=null,this._ccFilter=new nr},er={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};tr.prototype.addCommonBits=function(t){var e=new ir(this._commonCoord);t.apply(e),t.geometryChanged()},tr.prototype.removeCommonBits=function(t){if(0===this._commonCoord.x&&0===this._commonCoord.y)return t;var e=new C(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new ir(e);return t.apply(n),t.geometryChanged(),t},tr.prototype.getCommonCoordinate=function(){return this._commonCoord},tr.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},tr.prototype.interfaces_=function(){return[]},tr.prototype.getClass=function(){return tr},er.CommonCoordinateFilter.get=function(){return nr},er.Translater.get=function(){return ir},Object.defineProperties(tr,er);var nr=function(){this._commonBitsX=new $i,this._commonBitsY=new $i};nr.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},nr.prototype.getCommonCoordinate=function(){return new C(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},nr.prototype.interfaces_=function(){return[ft]},nr.prototype.getClass=function(){return nr};var ir=function(){this.trans=null;var t=arguments[0];this.trans=t};ir.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,i=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,i)},ir.prototype.isDone=function(){return!1},ir.prototype.isGeometryChanged=function(){return!0},ir.prototype.interfaces_=function(){return[Ut]},ir.prototype.getClass=function(){return ir};var rr=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};rr.prototype.selfSnap=function(t){return new Ji(t).snapTo(t,this._snapTolerance)},rr.prototype.removeCommonBits=function(t){this._cbr=new tr,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},rr.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},rr.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=Lr.overlayOp(e[0],e[1],t);return this.prepareResult(n)},rr.prototype.checkValid=function(t){t.isValid()||Y.out.println(\"Snapped geometry is invalid\")},rr.prototype.computeSnapTolerance=function(){this._snapTolerance=Ji.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},rr.prototype.snap=function(t){var e=this.removeCommonBits(t);return Ji.snap(e[0],e[1],this._snapTolerance)},rr.prototype.interfaces_=function(){return[]},rr.prototype.getClass=function(){return rr},rr.overlayOp=function(t,e,n){return new rr(t,e).getResultGeometry(n)},rr.union=function(t,e){return rr.overlayOp(t,e,Lr.UNION)},rr.intersection=function(t,e){return rr.overlayOp(t,e,Lr.INTERSECTION)},rr.symDifference=function(t,e){return rr.overlayOp(t,e,Lr.SYMDIFFERENCE)},rr.difference=function(t,e){return rr.overlayOp(t,e,Lr.DIFFERENCE)};var or=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};or.prototype.getResultGeometry=function(t){var e=null,n=!1,i=null;try{e=Lr.overlayOp(this._geom[0],this._geom[1],t);n=!0}catch(t){if(!(t instanceof $))throw t;i=t}if(!n)try{e=rr.overlayOp(this._geom[0],this._geom[1],t)}catch(t){throw t instanceof $?i:t}return e},or.prototype.interfaces_=function(){return[]},or.prototype.getClass=function(){return or},or.overlayOp=function(t,e,n){return new or(t,e).getResultGeometry(n)},or.union=function(t,e){return or.overlayOp(t,e,Lr.UNION)},or.intersection=function(t,e){return or.overlayOp(t,e,Lr.INTERSECTION)},or.symDifference=function(t,e){return or.overlayOp(t,e,Lr.SYMDIFFERENCE)},or.difference=function(t,e){return or.overlayOp(t,e,Lr.DIFFERENCE)};var sr=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};sr.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},sr.prototype.interfaces_=function(){return[]},sr.prototype.getClass=function(){return sr};var ar=function t(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){var e=arguments[0],n=arguments[1];this._eventType=t.DELETE,this._xValue=e,this._insertEvent=n}else if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];this._eventType=t.INSERT,this._label=i,this._xValue=r,this._obj=o}},ur={INSERT:{configurable:!0},DELETE:{configurable:!0}};ar.prototype.isDelete=function(){return this._eventType===ar.DELETE},ar.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},ar.prototype.getObject=function(){return this._obj},ar.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},ar.prototype.getInsertEvent=function(){return this._insertEvent},ar.prototype.isInsert=function(){return this._eventType===ar.INSERT},ar.prototype.isSameLabel=function(t){return null!==this._label&&this._label===t._label},ar.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},ar.prototype.interfaces_=function(){return[E]},ar.prototype.getClass=function(){return ar},ur.INSERT.get=function(){return 1},ur.DELETE.get=function(){return 2},Object.defineProperties(ar,ur);var lr=function(){};lr.prototype.interfaces_=function(){return[]},lr.prototype.getClass=function(){return lr};var cr=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};cr.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&1===this._li.getIntersectionNum()){if(cr.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var r=t.getNumPoints()-1;if(0===e&&i===r||0===i&&e===r)return!0}}return!1},cr.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},cr.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},cr.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},cr.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next().getCoordinate();if(t.isIntersection(i))return!0}return!1},cr.prototype.hasProperIntersection=function(){return this._hasProper},cr.prototype.hasIntersection=function(){return this._hasIntersection},cr.prototype.isDone=function(){return this._isDone},cr.prototype.isBoundaryPoint=function(t,e){return null!==e&&(!!this.isBoundaryPointInternal(t,e[0])||!!this.isBoundaryPointInternal(t,e[1]))},cr.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},cr.prototype.addIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr},cr.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var pr=function(t){function e(){t.call(this),this.events=new Nt,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){$e.sort(this.events);for(var t=0;t<this.events.size();t++){var e=this.events.get(t);e.isDelete()&&e.getInsertEvent().setDeleteEventIndex(t)}},e.prototype.computeIntersections=function(){if(1===arguments.length){var t=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var e=0;e<this.events.size();e++){var n=this.events.get(e);if(n.isInsert()&&this.processOverlaps(e,n.getDeleteEventIndex(),n,t),t.isDone())break}}else if(3===arguments.length)if(arguments[2]instanceof cr&&T(arguments[0],xt)&&T(arguments[1],xt)){var i=arguments[0],r=arguments[1],o=arguments[2];this.addEdges(i,i),this.addEdges(r,r),this.computeIntersections(o)}else if(\"boolean\"==typeof arguments[2]&&T(arguments[0],xt)&&arguments[1]instanceof cr){var s=arguments[0],a=arguments[1];arguments[2]?this.addEdges(s,null):this.addEdges(s),this.computeIntersections(a)}},e.prototype.addEdge=function(t,e){for(var n=t.getMonotoneChainEdge(),i=n.getStartIndexes(),r=0;r<i.length-1;r++){var o=new sr(n,r),s=new ar(e,n.getMinX(r),o);this.events.add(s),this.events.add(new ar(n.getMaxX(r),s))}},e.prototype.processOverlaps=function(t,e,n,i){for(var r=n.getObject(),o=t;o<e;o++){var s=this.events.get(o);if(s.isInsert()){var a=s.getObject();n.isSameLabel(s)||(r.computeIntersections(a,i),this.nOverlaps++)}}},e.prototype.addEdges=function(){if(1===arguments.length)for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.addEdge(e,e)}else if(2===arguments.length)for(var n=arguments[0],i=arguments[1],r=n.iterator();r.hasNext();){var o=r.next();this.addEdge(o,i)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(lr),hr=function(){this._min=v.POSITIVE_INFINITY,this._max=v.NEGATIVE_INFINITY},fr={NodeComparator:{configurable:!0}};hr.prototype.getMin=function(){return this._min},hr.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},hr.prototype.getMax=function(){return this._max},hr.prototype.toString=function(){return Z.toLineString(new C(this._min,0),new C(this._max,0))},hr.prototype.interfaces_=function(){return[]},hr.prototype.getClass=function(){return hr},fr.NodeComparator.get=function(){return gr},Object.defineProperties(hr,fr);var gr=function(){};gr.prototype.compare=function(t,e){var n=t,i=e,r=(n._min+n._max)/2,o=(i._min+i._max)/2;return r<o?-1:r>o?1:0},gr.prototype.interfaces_=function(){return[N]},gr.prototype.getClass=function(){return gr};var dr=function(t){function e(){t.call(this),this._item=null;var e=arguments[0],n=arguments[1],i=arguments[2];this._min=e,this._max=n,this._item=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;n.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(hr),yr=function(t){function e(){t.call(this),this._node1=null,this._node2=null;var e=arguments[0],n=arguments[1];this._node1=e,this._node2=n,this.buildExtent(this._node1,this._node2)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(t,e){this._min=Math.min(t._min,e._min),this._max=Math.max(t._max,e._max)},e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;null!==this._node1&&this._node1.query(t,e,n),null!==this._node2&&this._node2.query(t,e,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(hr),_r=function(){this._leaves=new Nt,this._root=null,this._level=0};_r.prototype.buildTree=function(){$e.sort(this._leaves,new hr.NodeComparator);for(var t=this._leaves,e=null,n=new Nt;;){if(this.buildLevel(t,n),1===n.size())return n.get(0);e=t,t=n,n=e}},_r.prototype.insert=function(t,e,n){if(null!==this._root)throw new Error(\"Index cannot be added to once it has been queried\");this._leaves.add(new dr(t,e,n))},_r.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)},_r.prototype.buildRoot=function(){if(null!==this._root)return null;this._root=this.buildTree()},_r.prototype.printNode=function(t){Y.out.println(Z.toLineString(new C(t._min,this._level),new C(t._max,this._level)))},_r.prototype.init=function(){if(null!==this._root)return null;this.buildRoot()},_r.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n<t.size();n+=2){var i=t.get(n);if(null===(n+1<t.size()?t.get(n):null))e.add(i);else{var r=new yr(t.get(n),t.get(n+1));e.add(r)}}},_r.prototype.interfaces_=function(){return[]},_r.prototype.getClass=function(){return _r};var mr=function(){this._items=new Nt};mr.prototype.visitItem=function(t){this._items.add(t)},mr.prototype.getItems=function(){return this._items},mr.prototype.interfaces_=function(){return[Ke]},mr.prototype.getClass=function(){return mr};var vr=function(){this._index=null;var t=arguments[0];if(!T(t,Zt))throw new m(\"Argument must be Polygonal\");this._index=new xr(t)},Ir={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};vr.prototype.locate=function(t){var e=new st(t),n=new Er(e);return this._index.query(t.y,t.y,n),e.getLocation()},vr.prototype.interfaces_=function(){return[Vn]},vr.prototype.getClass=function(){return vr},Ir.SegmentVisitor.get=function(){return Er},Ir.IntervalIndexedGeometry.get=function(){return xr},Object.defineProperties(vr,Ir);var Er=function(){this._counter=null;var t=arguments[0];this._counter=t};Er.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},Er.prototype.interfaces_=function(){return[Ke]},Er.prototype.getClass=function(){return Er};var xr=function(){this._index=new _r;var t=arguments[0];this.init(t)};xr.prototype.init=function(t){for(var e=Ci.getLines(t).iterator();e.hasNext();){var n=e.next().getCoordinates();this.addLine(n)}},xr.prototype.addLine=function(t){for(var e=1;e<t.length;e++){var n=new dn(t[e-1],t[e]),i=Math.min(n.p0.y,n.p1.y),r=Math.max(n.p0.y,n.p1.y);this._index.insert(i,r,n)}},xr.prototype.query=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new mr;return this._index.query(t,e,n),n.getItems()}if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];this._index.query(i,r,o)}},xr.prototype.interfaces_=function(){return[]},xr.prototype.getClass=function(){return xr};var Nr=function(t){function e(){if(t.call(this),this._parentGeom=null,this._lineEdgeMap=new he,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Si,2===arguments.length){var e=arguments[0],n=arguments[1],i=gt.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=n,this._boundaryNodeRule=i,null!==n&&this.add(n)}else if(3===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2];this._argIndex=r,this._parentGeom=o,this._boundaryNodeRule=s,null!==o&&this.add(o)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertBoundaryPoint=function(t,n){var i=this._nodes.addNode(n).getLabel(),r=1;w.NONE;i.getLocation(t,Se.ON)===w.BOUNDARY&&r++;var o=e.determineBoundary(this._boundaryNodeRule,r);i.setLocation(t,o)},e.prototype.computeSelfNodes=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.computeSelfNodes(t,e,!1)}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],o=new cr(n,!0,!1);o.setIsDoneIfProperInt(r);var s=this.createEdgeSetIntersector(),a=this._parentGeom instanceof ee||this._parentGeom instanceof $t||this._parentGeom instanceof ne,u=i||!a;return s.computeIntersections(this._edges,o,u),this.addSelfIntersectionNodes(this._argIndex),o}},e.prototype.computeSplitEdges=function(t){for(var e=this._edges.iterator();e.hasNext();){e.next().eiList.addSplitEdges(t)}},e.prototype.computeEdgeIntersections=function(t,e,n){var i=new cr(e,n,!0);i.setBoundaryNodes(this.getBoundaryNodes(),t.getBoundaryNodes());return this.createEdgeSetIntersector().computeIntersections(this._edges,t._edges,i),i},e.prototype.getGeometry=function(){return this._parentGeom},e.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},e.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},e.prototype.addPoint=function(){if(arguments[0]instanceof Qt){var t=arguments[0].getCoordinate();this.insertPoint(this._argIndex,t,w.INTERIOR)}else if(arguments[0]instanceof C){var e=arguments[0];this.insertPoint(this._argIndex,e,w.INTERIOR)}},e.prototype.addPolygon=function(t){this.addPolygonRing(t.getExteriorRing(),w.EXTERIOR,w.INTERIOR);for(var e=0;e<t.getNumInteriorRing();e++){var n=t.getInteriorRingN(e);this.addPolygonRing(n,w.INTERIOR,w.EXTERIOR)}},e.prototype.addEdge=function(t){this.insertEdge(t);var e=t.getCoordinates();this.insertPoint(this._argIndex,e[0],w.BOUNDARY),this.insertPoint(this._argIndex,e[e.length-1],w.BOUNDARY)},e.prototype.addLineString=function(t){var e=Lt.removeRepeatedPoints(t.getCoordinates());if(e.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=e[0],null;var n=new ni(e,new Pe(this._argIndex,w.INTERIOR));this._lineEdgeMap.put(t,n),this.insertEdge(n),et.isTrue(e.length>=2,\"found LineString with single point\"),this.insertBoundaryPoint(this._argIndex,e[0]),this.insertBoundaryPoint(this._argIndex,e[e.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var t=this.getBoundaryNodes(),e=new Array(t.size()).fill(null),n=0,i=t.iterator();i.hasNext();){var r=i.next();e[n++]=r.getCoordinate().copy()}return e},e.prototype.getBoundaryNodes=function(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(t,e,n){if(this.isBoundaryNode(t,e))return null;n===w.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(t,e):this.insertPoint(t,e,n)},e.prototype.addPolygonRing=function(t,e,n){if(t.isEmpty())return null;var i=Lt.removeRepeatedPoints(t.getCoordinates());if(i.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var r=e,o=n;at.isCCW(i)&&(r=n,o=e);var s=new ni(i,new Pe(this._argIndex,w.BOUNDARY,r,o));this._lineEdgeMap.put(t,s),this.insertEdge(s),this.insertPoint(this._argIndex,i[0],w.BOUNDARY)},e.prototype.insertPoint=function(t,e,n){var i=this._nodes.addNode(e),r=i.getLabel();null===r?i._label=new Pe(t,n):r.setLocation(t,n)},e.prototype.createEdgeSetIntersector=function(){return new pr},e.prototype.addSelfIntersectionNodes=function(t){for(var e=this._edges.iterator();e.hasNext();)for(var n=e.next(),i=n.getLabel().getLocation(t),r=n.eiList.iterator();r.hasNext();){var o=r.next();this.addSelfIntersectionNode(t,o.coord,i)}},e.prototype.add=function(){if(1!==arguments.length)return t.prototype.add.apply(this,arguments);var e=arguments[0];if(e.isEmpty())return null;if(e instanceof ne&&(this._useBoundaryDeterminationRule=!1),e instanceof $t)this.addPolygon(e);else if(e instanceof Kt)this.addLineString(e);else if(e instanceof Qt)this.addPoint(e);else if(e instanceof te)this.addCollection(e);else if(e instanceof Xt)this.addCollection(e);else if(e instanceof ne)this.addCollection(e);else{if(!(e instanceof zt))throw new Error(e.getClass().getName());this.addCollection(e)}},e.prototype.addCollection=function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},e.prototype.locate=function(t){return T(this._parentGeom,Zt)&&this._parentGeom.getNumGeometries()>50?(null===this._areaPtLocator&&(this._areaPtLocator=new vr(this._parentGeom)),this._areaPtLocator.locate(t)):this._ptLocator.locate(t,this._parentGeom)},e.prototype.findEdge=function(){if(1===arguments.length){var e=arguments[0];return this._lineEdgeMap.get(e)}return t.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(t,e){return t.isInBoundary(e)?w.BOUNDARY:w.INTERIOR},e}(Ye),Cr=function(){if(this._li=new rt,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Nr(0,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=gt.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Nr(0,e,i),this._arg[1]=new Nr(1,n,i)}else if(3===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2];r.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(r.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Nr(0,r,s),this._arg[1]=new Nr(1,o,s)}};Cr.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Cr.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Cr.prototype.interfaces_=function(){return[]},Cr.prototype.getClass=function(){return Cr};var Sr=function(){};Sr.prototype.interfaces_=function(){return[]},Sr.prototype.getClass=function(){return Sr},Sr.map=function(){if(arguments[0]instanceof ct&&T(arguments[1],Sr.MapOp)){for(var t=arguments[0],e=arguments[1],n=new Nt,i=0;i<t.getNumGeometries();i++){var r=e.map(t.getGeometryN(i));null!==r&&n.add(r)}return t.getFactory().buildGeometry(n)}if(T(arguments[0],It)&&T(arguments[1],Sr.MapOp)){for(var o=arguments[0],s=arguments[1],a=new Nt,u=o.iterator();u.hasNext();){var l=u.next(),c=s.map(l);null!==c&&a.add(c)}return a}},Sr.MapOp=function(){};var Lr=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n),this._ptLocator=new Si,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new Hn,this._resultPolyList=new Nt,this._resultLineList=new Nt,this._resultPointList=new Nt,this._graph=new Ye(new kn),this._geomFact=e.getFactory()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new Pe(t.getLabel())).flip();var r=e.getDepth();r.isNull()&&r.add(n),r.add(i),n.merge(i)}else this._edgeList.add(t)},e.prototype.getGraph=function(){return this._graph},e.prototype.cancelDuplicateResultEdges=function(){for(var t=this._graph.getEdgeEnds().iterator();t.hasNext();){var e=t.next(),n=e.getSym();e.isInResult()&&n.isInResult()&&(e.setInResult(!1),n.setInResult(!1))}},e.prototype.isCoveredByLA=function(t){return!!this.isCovered(t,this._resultLineList)||!!this.isCovered(t,this._resultPolyList)},e.prototype.computeGeometry=function(t,n,i,r){var o=new Nt;return o.addAll(t),o.addAll(n),o.addAll(i),o.isEmpty()?e.createEmptyResult(r,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(o)},e.prototype.mergeSymLabels=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){t.next().getEdges().mergeSymLabels()}},e.prototype.isCovered=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();if(this._ptLocator.locate(t,i)!==w.EXTERIOR)return!0}return!1},e.prototype.replaceCollapsedEdges=function(){for(var t=new Nt,e=this._edgeList.iterator();e.hasNext();){var n=e.next();n.isCollapsed()&&(e.remove(),t.add(n.getCollapsedEdge()))}this._edgeList.addAll(t)},e.prototype.updateNodeLabelling=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getEdges().getLabel();e.getLabel().merge(n)}},e.prototype.getResultGeometry=function(t){return this.computeOverlay(t),this._resultGeom},e.prototype.insertUniqueEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.insertUniqueEdge(n)}},e.prototype.computeOverlay=function(t){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var e=new Nt;this._arg[0].computeSplitEdges(e),this._arg[1].computeSplitEdges(e),this.insertUniqueEdges(e),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),Yi.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(t),this.cancelDuplicateResultEdges();var n=new ke(this._geomFact);n.add(this._graph),this._resultPolyList=n.getPolygons();var i=new ji(this,this._geomFact,this._ptLocator);this._resultLineList=i.build(t);var r=new Hi(this,this._geomFact,this._ptLocator);this._resultPointList=r.build(t),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,t)},e.prototype.labelIncompleteNode=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._arg[e].getGeometry());t.getLabel().setLocation(e,n)},e.prototype.copyPoints=function(t){for(var e=this._arg[t].getNodeIterator();e.hasNext();){var n=e.next();this._graph.addNode(n.getCoordinate()).setLabel(t,n.getLabel().getLocation(t))}},e.prototype.findResultAreaEdges=function(t){for(var n=this._graph.getEdgeEnds().iterator();n.hasNext();){var i=n.next(),r=i.getLabel();r.isArea()&&!i.isInteriorAreaEdge()&&e.isResultOfOp(r.getLocation(0,Se.RIGHT),r.getLocation(1,Se.RIGHT),t)&&i.setInResult(!0)}},e.prototype.computeLabelsFromDepths=function(){for(var t=this._edgeList.iterator();t.hasNext();){var e=t.next(),n=e.getLabel(),i=e.getDepth();if(!i.isNull()){i.normalize();for(var r=0;r<2;r++)n.isNull(r)||!n.isArea()||i.isNull(r)||(0===i.getDelta(r)?n.toLine(r):(et.isTrue(!i.isNull(r,Se.LEFT),\"depth of LEFT side has not been initialized\"),n.setLocation(r,Se.LEFT,i.getLocation(r,Se.LEFT)),et.isTrue(!i.isNull(r,Se.RIGHT),\"depth of RIGHT side has not been initialized\"),n.setLocation(r,Se.RIGHT,i.getLocation(r,Se.RIGHT))))}}},e.prototype.computeLabelling=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){t.next().getEdges().computeLabelling(this._arg)}this.mergeSymLabels(),this.updateNodeLabelling()},e.prototype.labelIncompleteNodes=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getLabel();e.isIsolated()&&(n.isNull(0)?this.labelIncompleteNode(e,0):this.labelIncompleteNode(e,1)),e.getEdges().updateLabelling(n)}},e.prototype.isCoveredByA=function(t){return!!this.isCovered(t,this._resultPolyList)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Cr);Lr.overlayOp=function(t,e,n){return new Lr(t,e).getResultGeometry(n)},Lr.intersection=function(t,e){if(t.isEmpty()||e.isEmpty())return Lr.createEmptyResult(Lr.INTERSECTION,t,e,t.getFactory());if(t.isGeometryCollection()){var n=e;return ki.map(t,{interfaces_:function(){return[Sr.MapOp]},map:function(t){return t.intersection(n)}})}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),or.overlayOp(t,e,Lr.INTERSECTION)},Lr.symDifference=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Lr.createEmptyResult(Lr.SYMDIFFERENCE,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),or.overlayOp(t,e,Lr.SYMDIFFERENCE)},Lr.resultDimension=function(t,e,n){var i=e.getDimension(),r=n.getDimension(),o=-1;switch(t){case Lr.INTERSECTION:o=Math.min(i,r);break;case Lr.UNION:o=Math.max(i,r);break;case Lr.DIFFERENCE:o=i;break;case Lr.SYMDIFFERENCE:o=Math.max(i,r)}return o},Lr.createEmptyResult=function(t,e,n,i){var r=null;switch(Lr.resultDimension(t,e,n)){case-1:r=i.createGeometryCollection(new Array(0).fill(null));break;case 0:r=i.createPoint();break;case 1:r=i.createLineString();break;case 2:r=i.createPolygon()}return r},Lr.difference=function(t,e){return t.isEmpty()?Lr.createEmptyResult(Lr.DIFFERENCE,t,e,t.getFactory()):e.isEmpty()?t.copy():(t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),or.overlayOp(t,e,Lr.DIFFERENCE))},Lr.isResultOfOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=t.getLocation(0),i=t.getLocation(1);return Lr.isResultOfOp(n,i,e)}if(3===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2];switch(r===w.BOUNDARY&&(r=w.INTERIOR),o===w.BOUNDARY&&(o=w.INTERIOR),s){case Lr.INTERSECTION:return r===w.INTERIOR&&o===w.INTERIOR;case Lr.UNION:return r===w.INTERIOR||o===w.INTERIOR;case Lr.DIFFERENCE:return r===w.INTERIOR&&o!==w.INTERIOR;case Lr.SYMDIFFERENCE:return r===w.INTERIOR&&o!==w.INTERIOR||r!==w.INTERIOR&&o===w.INTERIOR}return!1}},Lr.INTERSECTION=1,Lr.UNION=2,Lr.DIFFERENCE=3,Lr.SYMDIFFERENCE=4;var br=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Si,this._seg=new dn;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};br.prototype.isWithinToleranceOfBoundary=function(t){for(var e=0;e<this._linework.getNumGeometries();e++)for(var n=this._linework.getGeometryN(e).getCoordinateSequence(),i=0;i<n.size()-1;i++){n.getCoordinate(i,this._seg.p0),n.getCoordinate(i+1,this._seg.p1);if(this._seg.distance(t)<=this._boundaryDistanceTolerance)return!0}return!1},br.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?w.BOUNDARY:this._ptLocator.locate(t,this._g)},br.prototype.extractLinework=function(t){var e=new wr;t.apply(e);var n=e.getLinework(),i=_e.toLineStringArray(n);return t.getFactory().createMultiLineString(i)},br.prototype.interfaces_=function(){return[]},br.prototype.getClass=function(){return br};var wr=function(){this._linework=null,this._linework=new Nt};wr.prototype.getLinework=function(){return this._linework},wr.prototype.filter=function(t){if(t instanceof $t){var e=t;this._linework.add(e.getExteriorRing());for(var n=0;n<e.getNumInteriorRing();n++)this._linework.add(e.getInteriorRingN(n))}},wr.prototype.interfaces_=function(){return[Vt]},wr.prototype.getClass=function(){return wr};var Or=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};Or.prototype.extractPoints=function(t,e,n){for(var i=t.getCoordinates(),r=0;r<i.length-1;r++)this.computeOffsetPoints(i[r],i[r+1],e,n)},Or.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},Or.prototype.getPoints=function(t){for(var e=new Nt,n=Ci.getLines(this._g).iterator();n.hasNext();){var i=n.next();this.extractPoints(i,t,e)}return e},Or.prototype.computeOffsetPoints=function(t,e,n,i){var r=e.x-t.x,o=e.y-t.y,s=Math.sqrt(r*r+o*o),a=n*r/s,u=n*o/s,l=(e.x+t.x)/2,c=(e.y+t.y)/2;if(this._doLeft){var p=new C(l-u,c+a);i.add(p)}if(this._doRight){var h=new C(l+u,c-a);i.add(h)}},Or.prototype.interfaces_=function(){return[]},Or.prototype.getClass=function(){return Or};var Tr=function t(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=t.TOLERANCE,this._testCoords=new Nt;var e=arguments[0],n=arguments[1],i=arguments[2];this._boundaryDistanceTolerance=t.computeBoundaryDistanceTolerance(e,n),this._geom=[e,n,i],this._locFinder=[new br(this._geom[0],this._boundaryDistanceTolerance),new br(this._geom[1],this._boundaryDistanceTolerance),new br(this._geom[2],this._boundaryDistanceTolerance)]},Rr={TOLERANCE:{configurable:!0}};Tr.prototype.reportResult=function(t,e,n){Y.out.println(\"Overlay result invalid - A:\"+w.toLocationSymbol(e[0])+\" B:\"+w.toLocationSymbol(e[1])+\" expected:\"+(n?\"i\":\"e\")+\" actual:\"+w.toLocationSymbol(e[2]))},Tr.prototype.isValid=function(t){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var e=this.checkValid(t);return e},Tr.prototype.checkValid=function(){if(1===arguments.length){for(var t=arguments[0],e=0;e<this._testCoords.size();e++){var n=this._testCoords.get(e);if(!this.checkValid(t,n))return this._invalidLocation=n,!1}return!0}if(2===arguments.length){var i=arguments[0],r=arguments[1];return this._location[0]=this._locFinder[0].getLocation(r),this._location[1]=this._locFinder[1].getLocation(r),this._location[2]=this._locFinder[2].getLocation(r),!!Tr.hasLocation(this._location,w.BOUNDARY)||this.isValidResult(i,this._location)}},Tr.prototype.addTestPts=function(t){var e=new Or(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},Tr.prototype.isValidResult=function(t,e){var n=Lr.isResultOfOp(e[0],e[1],t),i=!(n^e[2]===w.INTERIOR);return i||this.reportResult(t,e,n),i},Tr.prototype.getInvalidLocation=function(){return this._invalidLocation},Tr.prototype.interfaces_=function(){return[]},Tr.prototype.getClass=function(){return Tr},Tr.hasLocation=function(t,e){for(var n=0;n<3;n++)if(t[n]===e)return!0;return!1},Tr.computeBoundaryDistanceTolerance=function(t,e){return Math.min(Ji.computeSizeBasedSnapTolerance(t),Ji.computeSizeBasedSnapTolerance(e))},Tr.isValid=function(t,e,n,i){return new Tr(t,e,i).isValid(n)},Rr.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(Tr,Rr);var Pr=function t(e){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=t.extractFactory(e),this._inputGeoms=e};Pr.prototype.extractElements=function(t,e){if(null===t)return null;for(var n=0;n<t.getNumGeometries();n++){var i=t.getGeometryN(n);this._skipEmpty&&i.isEmpty()||e.add(i)}},Pr.prototype.combine=function(){for(var t=new Nt,e=this._inputGeoms.iterator();e.hasNext();){var n=e.next();this.extractElements(n,t)}return 0===t.size()?null!==this._geomFactory?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(t)},Pr.prototype.interfaces_=function(){return[]},Pr.prototype.getClass=function(){return Pr},Pr.combine=function(){if(1===arguments.length){var t=arguments[0];return new Pr(t).combine()}if(2===arguments.length){var e=arguments[0],n=arguments[1];return new Pr(Pr.createList(e,n)).combine()}if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];return new Pr(Pr.createList(i,r,o)).combine()}},Pr.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},Pr.createList=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new Nt;return n.add(t),n.add(e),n}if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2],s=new Nt;return s.add(i),s.add(r),s.add(o),s}};var Dr=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,null===this._inputPolys&&(this._inputPolys=new Nt)},Mr={STRTREE_NODE_CAPACITY:{configurable:!0}};Dr.prototype.reduceToGeometries=function(t){for(var e=new Nt,n=t.iterator();n.hasNext();){var i=n.next(),r=null;T(i,xt)?r=this.unionTree(i):i instanceof ct&&(r=i),e.add(r)}return e},Dr.prototype.extractByEnvelope=function(t,e,n){for(var i=new Nt,r=0;r<e.getNumGeometries();r++){var o=e.getGeometryN(r);o.getEnvelopeInternal().intersects(t)?i.add(o):n.add(o)}return this._geomFactory.buildGeometry(i)},Dr.prototype.unionOptimized=function(t,e){var n=t.getEnvelopeInternal(),i=e.getEnvelopeInternal();if(!n.intersects(i)){return Pr.combine(t,e)}if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var r=n.intersection(i);return this.unionUsingEnvelopeIntersection(t,e,r)},Dr.prototype.union=function(){if(null===this._inputPolys)throw new Error(\"union() method cannot be called twice\");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new sn(Dr.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var n=e.next();t.insert(n.getEnvelopeInternal(),n)}this._inputPolys=null;var i=t.itemsTree();return this.unionTree(i)},Dr.prototype.binaryUnion=function(){if(1===arguments.length){var t=arguments[0];return this.binaryUnion(t,0,t.size())}if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2];if(i-n<=1){var r=Dr.getGeometry(e,n);return this.unionSafe(r,null)}if(i-n==2)return this.unionSafe(Dr.getGeometry(e,n),Dr.getGeometry(e,n+1));var o=Math.trunc((i+n)/2),s=this.binaryUnion(e,n,o),a=this.binaryUnion(e,o,i);return this.unionSafe(s,a)}},Dr.prototype.repeatedUnion=function(t){for(var e=null,n=t.iterator();n.hasNext();){var i=n.next();e=null===e?i.copy():e.union(i)}return e},Dr.prototype.unionSafe=function(t,e){return null===t&&null===e?null:null===t?e.copy():null===e?t.copy():this.unionOptimized(t,e)},Dr.prototype.unionActual=function(t,e){return Dr.restrictToPolygons(t.union(e))},Dr.prototype.unionTree=function(t){var e=this.reduceToGeometries(t);return this.binaryUnion(e)},Dr.prototype.unionUsingEnvelopeIntersection=function(t,e,n){var i=new Nt,r=this.extractByEnvelope(n,t,i),o=this.extractByEnvelope(n,e,i),s=this.unionActual(r,o);i.add(s);return Pr.combine(i)},Dr.prototype.bufferUnion=function(){if(1===arguments.length){var t=arguments[0];return t.get(0).getFactory().buildGeometry(t).buffer(0)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e.getFactory().createGeometryCollection([e,n]).buffer(0)}},Dr.prototype.interfaces_=function(){return[]},Dr.prototype.getClass=function(){return Dr},Dr.restrictToPolygons=function(t){if(T(t,Zt))return t;var e=Ni.getPolygons(t);return 1===e.size()?e.get(0):t.getFactory().createMultiPolygon(_e.toPolygonArray(e))},Dr.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},Dr.union=function(t){return new Dr(t).union()},Mr.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Dr,Mr);var Ar=function(){};Ar.prototype.interfaces_=function(){return[]},Ar.prototype.getClass=function(){return Ar},Ar.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Lr.createEmptyResult(Lr.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),or.overlayOp(t,e,Lr.UNION)},t.GeoJSONReader=Ne,t.GeoJSONWriter=Ce,t.OverlayOp=Lr,t.UnionOp=Ar,t.BufferOp=di,Object.defineProperty(t,\"__esModule\",{value:!0})});\n","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/source/Source\n */\nimport BaseObject from '../Object.js';\nimport SourceState from './State.js';\nimport { abstract } from '../util.js';\nimport { get as getProjection } from '../proj.js';\n/**\n * A function that takes a {@link module:ol/PluggableMap~FrameState} and returns a string or\n * an array of strings representing source attributions.\n *\n * @typedef {function(import(\"../PluggableMap.js\").FrameState): (string|Array<string>)} Attribution\n */\n/**\n * A type that can be used to provide attribution information for data sources.\n *\n * It represents either\n * * a simple string (e.g. `'© Acme Inc.'`)\n * * an array of simple strings (e.g. `['© Acme Inc.', '© Bacme Inc.']`)\n * * a function that returns a string or array of strings ({@link module:ol/source/Source~Attribution})\n *\n * @typedef {string|Array<string>|Attribution} AttributionLike\n */\n/**\n * @typedef {Object} Options\n * @property {AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {import(\"./State.js\").default} [state='ready'] State.\n * @property {boolean} [wrapX=false] WrapX.\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for {@link module:ol/layer/Layer~Layer} sources.\n *\n * A generic `change` event is triggered when the state of the source changes.\n * @abstract\n * @api\n */\nvar Source = /** @class */ (function (_super) {\n    __extends(Source, _super);\n    /**\n     * @param {Options} options Source options.\n     */\n    function Source(options) {\n        var _this = _super.call(this) || this;\n        /**\n         * @protected\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.projection = getProjection(options.projection);\n        /**\n         * @private\n         * @type {?Attribution}\n         */\n        _this.attributions_ = adaptAttributions(options.attributions);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.attributionsCollapsible_ =\n            options.attributionsCollapsible !== undefined\n                ? options.attributionsCollapsible\n                : true;\n        /**\n         * This source is currently loading data. Sources that defer loading to the\n         * map's tile queue never set this to `true`.\n         * @type {boolean}\n         */\n        _this.loading = false;\n        /**\n         * @private\n         * @type {import(\"./State.js\").default}\n         */\n        _this.state_ =\n            options.state !== undefined ? options.state : SourceState.READY;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.wrapX_ = options.wrapX !== undefined ? options.wrapX : false;\n        return _this;\n    }\n    /**\n     * Get the attribution function for the source.\n     * @return {?Attribution} Attribution function.\n     */\n    Source.prototype.getAttributions = function () {\n        return this.attributions_;\n    };\n    /**\n     * @return {boolean} Attributions are collapsible.\n     */\n    Source.prototype.getAttributionsCollapsible = function () {\n        return this.attributionsCollapsible_;\n    };\n    /**\n     * Get the projection of the source.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     * @api\n     */\n    Source.prototype.getProjection = function () {\n        return this.projection;\n    };\n    /**\n     * @abstract\n     * @return {Array<number>|undefined} Resolutions.\n     */\n    Source.prototype.getResolutions = function () {\n        return abstract();\n    };\n    /**\n     * Get the state of the source, see {@link module:ol/source/State~State} for possible states.\n     * @return {import(\"./State.js\").default} State.\n     * @api\n     */\n    Source.prototype.getState = function () {\n        return this.state_;\n    };\n    /**\n     * @return {boolean|undefined} Wrap X.\n     */\n    Source.prototype.getWrapX = function () {\n        return this.wrapX_;\n    };\n    /**\n     * @return {Object|undefined} Context options.\n     */\n    Source.prototype.getContextOptions = function () {\n        return undefined;\n    };\n    /**\n     * Refreshes the source. The source will be cleared, and data from the server will be reloaded.\n     * @api\n     */\n    Source.prototype.refresh = function () {\n        this.changed();\n    };\n    /**\n     * Set the attributions of the source.\n     * @param {AttributionLike|undefined} attributions Attributions.\n     *     Can be passed as `string`, `Array<string>`, {@link module:ol/source/Source~Attribution},\n     *     or `undefined`.\n     * @api\n     */\n    Source.prototype.setAttributions = function (attributions) {\n        this.attributions_ = adaptAttributions(attributions);\n        this.changed();\n    };\n    /**\n     * Set the state of the source.\n     * @param {import(\"./State.js\").default} state State.\n     */\n    Source.prototype.setState = function (state) {\n        this.state_ = state;\n        this.changed();\n    };\n    return Source;\n}(BaseObject));\n/**\n * Turns the attributions option into an attributions function.\n * @param {AttributionLike|undefined} attributionLike The attribution option.\n * @return {?Attribution} An attribution function (or null).\n */\nfunction adaptAttributions(attributionLike) {\n    if (!attributionLike) {\n        return null;\n    }\n    if (Array.isArray(attributionLike)) {\n        return function (frameState) {\n            return attributionLike;\n        };\n    }\n    if (typeof attributionLike === 'function') {\n        return attributionLike;\n    }\n    return function (frameState) {\n        return [attributionLike];\n    };\n}\nexport default Source;\n//# sourceMappingURL=Source.js.map","var $version = 8;\nvar $root = {\n\tversion: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: [\n\t\t\t8\n\t\t],\n\t\tdoc: \"Style specification version number. Must be 8.\",\n\t\texample: 8\n\t},\n\tname: {\n\t\ttype: \"string\",\n\t\tdoc: \"A human-readable name for the style.\",\n\t\texample: \"Bright\"\n\t},\n\tmetadata: {\n\t\ttype: \"*\",\n\t\tdoc: \"Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'.\"\n\t},\n\tcenter: {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tdoc: \"Default map center in longitude and latitude.  The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\",\n\t\texample: [\n\t\t\t-73.9749,\n\t\t\t40.7736\n\t\t]\n\t},\n\tzoom: {\n\t\ttype: \"number\",\n\t\tdoc: \"Default zoom level.  The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\",\n\t\texample: 12.5\n\t},\n\tbearing: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tperiod: 360,\n\t\tunits: \"degrees\",\n\t\tdoc: \"Default bearing, in degrees. The bearing is the compass direction that is \\\"up\\\"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\",\n\t\texample: 29\n\t},\n\tpitch: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tunits: \"degrees\",\n\t\tdoc: \"Default pitch, in degrees. Zero is perpendicular to the surface, for a look straight down at the map, while a greater value like 60 looks ahead towards the horizon. The style pitch will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\",\n\t\texample: 50\n\t},\n\tlight: {\n\t\ttype: \"light\",\n\t\tdoc: \"The global light source.\",\n\t\texample: {\n\t\t\tanchor: \"viewport\",\n\t\t\tcolor: \"white\",\n\t\t\tintensity: 0.4\n\t\t}\n\t},\n\tterrain: {\n\t\ttype: \"terrain\",\n\t\tdoc: \"A global modifier that elevates layers and markers based on a DEM data source.\"\n\t},\n\tfog: {\n\t\ttype: \"fog\",\n\t\tdoc: \"A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features.\"\n\t},\n\tsources: {\n\t\trequired: true,\n\t\ttype: \"sources\",\n\t\tdoc: \"Data source specifications.\",\n\t\texample: {\n\t\t\t\"mapbox-streets\": {\n\t\t\t\ttype: \"vector\",\n\t\t\t\turl: \"mapbox://mapbox.mapbox-streets-v6\"\n\t\t\t}\n\t\t}\n\t},\n\tsprite: {\n\t\ttype: \"string\",\n\t\tdoc: \"A base URL for retrieving the sprite image and metadata. The extensions `.png`, `.json` and scale factor `@2x.png` will be automatically appended. This property is required if any layer uses the `background-pattern`, `fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, or `icon-image` properties. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).\",\n\t\texample: \"mapbox://sprites/mapbox/bright-v8\"\n\t},\n\tglyphs: {\n\t\ttype: \"string\",\n\t\tdoc: \"A URL template for loading signed-distance-field glyph sets in PBF format. The URL must include `{fontstack}` and `{range}` tokens. This property is required if any layer uses the `text-field` layout property. The URL must be absolute, containing the [scheme, authority and path components](https://en.wikipedia.org/wiki/URL#Syntax).\",\n\t\texample: \"mapbox://fonts/mapbox/{fontstack}/{range}.pbf\"\n\t},\n\ttransition: {\n\t\ttype: \"transition\",\n\t\tdoc: \"A global transition definition to use as a default across properties, to be used for timing transitions between one value and the next when no property-specific transition is set. Collision-based symbol fading is controlled independently of the style's `transition` property.\",\n\t\texample: {\n\t\t\tduration: 300,\n\t\t\tdelay: 0\n\t\t}\n\t},\n\tlayers: {\n\t\trequired: true,\n\t\ttype: \"array\",\n\t\tvalue: \"layer\",\n\t\tdoc: \"Layers will be drawn in the order of this array.\",\n\t\texample: [\n\t\t\t{\n\t\t\t\tid: \"water\",\n\t\t\t\tsource: \"mapbox-streets\",\n\t\t\t\t\"source-layer\": \"water\",\n\t\t\t\ttype: \"fill\",\n\t\t\t\tpaint: {\n\t\t\t\t\t\"fill-color\": \"#00ffff\"\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t}\n};\nvar sources = {\n\t\"*\": {\n\t\ttype: \"source\",\n\t\tdoc: \"Specification of a data source. For vector and raster sources, either TileJSON or a URL to a TileJSON must be provided. For image and video sources, a URL must be provided. For GeoJSON sources, a URL or inline GeoJSON must be provided.\"\n\t}\n};\nvar source = [\n\t\"source_vector\",\n\t\"source_raster\",\n\t\"source_raster_dem\",\n\t\"source_geojson\",\n\t\"source_video\",\n\t\"source_image\"\n];\nvar source_vector = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvector: {\n\t\t\t\tdoc: \"A vector tile source.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The type of the source.\"\n\t},\n\turl: {\n\t\ttype: \"string\",\n\t\tdoc: \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`.\"\n\t},\n\ttiles: {\n\t\ttype: \"array\",\n\t\tvalue: \"string\",\n\t\tdoc: \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n\t},\n\tbounds: {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 4,\n\t\t\"default\": [\n\t\t\t-180,\n\t\t\t-85.051129,\n\t\t\t180,\n\t\t\t85.051129\n\t\t],\n\t\tdoc: \"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL.\"\n\t},\n\tscheme: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\txyz: {\n\t\t\t\tdoc: \"Slippy map tilenames scheme.\"\n\t\t\t},\n\t\t\ttms: {\n\t\t\t\tdoc: \"OSGeo spec scheme.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"xyz\",\n\t\tdoc: \"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed.\"\n\t},\n\tminzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tdoc: \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 22,\n\t\tdoc: \"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels.\"\n\t},\n\tattribution: {\n\t\ttype: \"string\",\n\t\tdoc: \"Contains an attribution to be displayed when the map is shown to a user.\"\n\t},\n\tpromoteId: {\n\t\ttype: \"promoteId\",\n\t\tdoc: \"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`. If specified as a string for a vector tile source, the same property is used across all its source layers.\"\n\t},\n\tvolatile: {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"A setting to determine whether a source's tiles are cached locally.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tandroid: \"9.3.0\",\n\t\t\t\tios: \"5.10.0\"\n\t\t\t}\n\t\t}\n\t},\n\t\"*\": {\n\t\ttype: \"*\",\n\t\tdoc: \"Other keys to configure the data source.\"\n\t}\n};\nvar source_raster = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\traster: {\n\t\t\t\tdoc: \"A raster tile source.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The type of the source.\"\n\t},\n\turl: {\n\t\ttype: \"string\",\n\t\tdoc: \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`.\"\n\t},\n\ttiles: {\n\t\ttype: \"array\",\n\t\tvalue: \"string\",\n\t\tdoc: \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n\t},\n\tbounds: {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 4,\n\t\t\"default\": [\n\t\t\t-180,\n\t\t\t-85.051129,\n\t\t\t180,\n\t\t\t85.051129\n\t\t],\n\t\tdoc: \"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL.\"\n\t},\n\tminzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tdoc: \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 22,\n\t\tdoc: \"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels.\"\n\t},\n\ttileSize: {\n\t\ttype: \"number\",\n\t\t\"default\": 512,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The minimum visual size to display tiles for this layer. Only configurable for raster layers.\"\n\t},\n\tscheme: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\txyz: {\n\t\t\t\tdoc: \"Slippy map tilenames scheme.\"\n\t\t\t},\n\t\t\ttms: {\n\t\t\t\tdoc: \"OSGeo spec scheme.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"xyz\",\n\t\tdoc: \"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed.\"\n\t},\n\tattribution: {\n\t\ttype: \"string\",\n\t\tdoc: \"Contains an attribution to be displayed when the map is shown to a user.\"\n\t},\n\tvolatile: {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"A setting to determine whether a source's tiles are cached locally.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tandroid: \"9.3.0\",\n\t\t\t\tios: \"5.10.0\"\n\t\t\t}\n\t\t}\n\t},\n\t\"*\": {\n\t\ttype: \"*\",\n\t\tdoc: \"Other keys to configure the data source.\"\n\t}\n};\nvar source_raster_dem = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\t\"raster-dem\": {\n\t\t\t\tdoc: \"A RGB-encoded raster DEM source\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The type of the source.\"\n\t},\n\turl: {\n\t\ttype: \"string\",\n\t\tdoc: \"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://<Tileset ID>`.\"\n\t},\n\ttiles: {\n\t\ttype: \"array\",\n\t\tvalue: \"string\",\n\t\tdoc: \"An array of one or more tile source URLs, as in the TileJSON spec.\"\n\t},\n\tbounds: {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 4,\n\t\t\"default\": [\n\t\t\t-180,\n\t\t\t-85.051129,\n\t\t\t180,\n\t\t\t85.051129\n\t\t],\n\t\tdoc: \"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL.\"\n\t},\n\tminzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tdoc: \"Minimum zoom level for which tiles are available, as in the TileJSON spec.\"\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 22,\n\t\tdoc: \"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels.\"\n\t},\n\ttileSize: {\n\t\ttype: \"number\",\n\t\t\"default\": 512,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The minimum visual size to display tiles for this layer. Only configurable for raster layers.\"\n\t},\n\tattribution: {\n\t\ttype: \"string\",\n\t\tdoc: \"Contains an attribution to be displayed when the map is shown to a user.\"\n\t},\n\tencoding: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tterrarium: {\n\t\t\t\tdoc: \"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info.\"\n\t\t\t},\n\t\t\tmapbox: {\n\t\t\t\tdoc: \"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"mapbox\",\n\t\tdoc: \"The encoding used by this source. Mapbox Terrain RGB is used by default\"\n\t},\n\tvolatile: {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"A setting to determine whether a source's tiles are cached locally.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tandroid: \"9.3.0\",\n\t\t\t\tios: \"5.10.0\"\n\t\t\t}\n\t\t}\n\t},\n\t\"*\": {\n\t\ttype: \"*\",\n\t\tdoc: \"Other keys to configure the data source.\"\n\t}\n};\nvar source_geojson = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tgeojson: {\n\t\t\t\tdoc: \"A GeoJSON data source.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The data type of the GeoJSON source.\"\n\t},\n\tdata: {\n\t\ttype: \"*\",\n\t\tdoc: \"A URL to a GeoJSON file, or inline GeoJSON.\"\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\t\t\"default\": 18,\n\t\tdoc: \"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels).\"\n\t},\n\tattribution: {\n\t\ttype: \"string\",\n\t\tdoc: \"Contains an attribution to be displayed when the map is shown to a user.\"\n\t},\n\tbuffer: {\n\t\ttype: \"number\",\n\t\t\"default\": 128,\n\t\tmaximum: 512,\n\t\tminimum: 0,\n\t\tdoc: \"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance.\"\n\t},\n\tfilter: {\n\t\ttype: \"*\",\n\t\tdoc: \"An expression for filtering features prior to processing them for rendering.\"\n\t},\n\ttolerance: {\n\t\ttype: \"number\",\n\t\t\"default\": 0.375,\n\t\tdoc: \"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance).\"\n\t},\n\tcluster: {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\\n * `cluster` Is `true` if the point is a cluster \\n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\\n * `point_count` Number of original points grouped into this cluster\\n * `point_count_abbreviated` An abbreviated point count\"\n\t},\n\tclusterRadius: {\n\t\ttype: \"number\",\n\t\t\"default\": 50,\n\t\tminimum: 0,\n\t\tdoc: \"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile.\"\n\t},\n\tclusterMaxZoom: {\n\t\ttype: \"number\",\n\t\tdoc: \"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15.\"\n\t},\n\tclusterMinPoints: {\n\t\ttype: \"number\",\n\t\tdoc: \"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`.\"\n\t},\n\tclusterProperties: {\n\t\ttype: \"*\",\n\t\tdoc: \"An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{\\\"property_name\\\": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `\\\"+\\\"` or `\\\"max\\\"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\\n\\nExample: `{\\\"sum\\\": [\\\"+\\\", [\\\"get\\\", \\\"scalerank\\\"]]}`.\\n\\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `[\\\"accumulated\\\"]` value, e.g.:\\n`{\\\"sum\\\": [[\\\"+\\\", [\\\"accumulated\\\"], [\\\"get\\\", \\\"sum\\\"]], [\\\"get\\\", \\\"scalerank\\\"]]}`\"\n\t},\n\tlineMetrics: {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values.\"\n\t},\n\tgenerateId: {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values.\"\n\t},\n\tpromoteId: {\n\t\ttype: \"promoteId\",\n\t\tdoc: \"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{<sourceLayer>: <propertyName>}`.\"\n\t}\n};\nvar source_video = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvideo: {\n\t\t\t\tdoc: \"A video data source.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The data type of the video source.\"\n\t},\n\turls: {\n\t\trequired: true,\n\t\ttype: \"array\",\n\t\tvalue: \"string\",\n\t\tdoc: \"URLs to video content in order of preferred format.\"\n\t},\n\tcoordinates: {\n\t\trequired: true,\n\t\tdoc: \"Corners of video specified in longitude, latitude pairs.\",\n\t\ttype: \"array\",\n\t\tlength: 4,\n\t\tvalue: {\n\t\t\ttype: \"array\",\n\t\t\tlength: 2,\n\t\t\tvalue: \"number\",\n\t\t\tdoc: \"A single longitude, latitude pair.\"\n\t\t}\n\t}\n};\nvar source_image = {\n\ttype: {\n\t\trequired: true,\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\timage: {\n\t\t\t\tdoc: \"An image data source.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The data type of the image source.\"\n\t},\n\turl: {\n\t\trequired: true,\n\t\ttype: \"string\",\n\t\tdoc: \"URL that points to an image.\"\n\t},\n\tcoordinates: {\n\t\trequired: true,\n\t\tdoc: \"Corners of image specified in longitude, latitude pairs.\",\n\t\ttype: \"array\",\n\t\tlength: 4,\n\t\tvalue: {\n\t\t\ttype: \"array\",\n\t\t\tlength: 2,\n\t\t\tvalue: \"number\",\n\t\t\tdoc: \"A single longitude, latitude pair.\"\n\t\t}\n\t}\n};\nvar layer = {\n\tid: {\n\t\ttype: \"string\",\n\t\tdoc: \"Unique layer name.\",\n\t\trequired: true\n\t},\n\ttype: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tfill: {\n\t\t\t\tdoc: \"A filled polygon with an optional stroked border.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.10.0\",\n\t\t\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\t\t\tios: \"2.0.0\",\n\t\t\t\t\t\tmacos: \"0.1.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tline: {\n\t\t\t\tdoc: \"A stroked line.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.10.0\",\n\t\t\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\t\t\tios: \"2.0.0\",\n\t\t\t\t\t\tmacos: \"0.1.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tsymbol: {\n\t\t\t\tdoc: \"An icon or a text label.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.10.0\",\n\t\t\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\t\t\tios: \"2.0.0\",\n\t\t\t\t\t\tmacos: \"0.1.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tcircle: {\n\t\t\t\tdoc: \"A filled circle.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.10.0\",\n\t\t\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\t\t\tios: \"2.0.0\",\n\t\t\t\t\t\tmacos: \"0.1.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\theatmap: {\n\t\t\t\tdoc: \"A heatmap.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"fill-extrusion\": {\n\t\t\t\tdoc: \"An extruded (3D) polygon.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.27.0\",\n\t\t\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\t\t\tios: \"3.6.0\",\n\t\t\t\t\t\tmacos: \"0.5.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\traster: {\n\t\t\t\tdoc: \"Raster map textures such as satellite imagery.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.10.0\",\n\t\t\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\t\t\tios: \"2.0.0\",\n\t\t\t\t\t\tmacos: \"0.1.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\thillshade: {\n\t\t\t\tdoc: \"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.43.0\",\n\t\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tbackground: {\n\t\t\t\tdoc: \"The background color or pattern of the map.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"0.10.0\",\n\t\t\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\t\t\tios: \"2.0.0\",\n\t\t\t\t\t\tmacos: \"0.1.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tsky: {\n\t\t\t\tdoc: \"A spherical dome around the map that is always rendered behind all other layers.\",\n\t\t\t\t\"sdk-support\": {\n\t\t\t\t\t\"basic functionality\": {\n\t\t\t\t\t\tjs: \"2.0.0\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdoc: \"Rendering type of this layer.\",\n\t\trequired: true\n\t},\n\tmetadata: {\n\t\ttype: \"*\",\n\t\tdoc: \"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'.\"\n\t},\n\tsource: {\n\t\ttype: \"string\",\n\t\tdoc: \"Name of a source description to be used for this layer. Required for all layer types except `background`.\"\n\t},\n\t\"source-layer\": {\n\t\ttype: \"string\",\n\t\tdoc: \"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.\"\n\t},\n\tminzoom: {\n\t\ttype: \"number\",\n\t\tminimum: 0,\n\t\tmaximum: 24,\n\t\tdoc: \"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.\"\n\t},\n\tmaxzoom: {\n\t\ttype: \"number\",\n\t\tminimum: 0,\n\t\tmaximum: 24,\n\t\tdoc: \"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.\"\n\t},\n\tfilter: {\n\t\ttype: \"filter\",\n\t\tdoc: \"A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions.\"\n\t},\n\tlayout: {\n\t\ttype: \"layout\",\n\t\tdoc: \"Layout properties for the layer.\"\n\t},\n\tpaint: {\n\t\ttype: \"paint\",\n\t\tdoc: \"Default paint properties for this layer.\"\n\t}\n};\nvar layout = [\n\t\"layout_fill\",\n\t\"layout_line\",\n\t\"layout_circle\",\n\t\"layout_heatmap\",\n\t\"layout_fill-extrusion\",\n\t\"layout_symbol\",\n\t\"layout_raster\",\n\t\"layout_hillshade\",\n\t\"layout_background\",\n\t\"layout_sky\"\n];\nvar layout_background = {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_sky = {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"2.0.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_fill = {\n\t\"fill-sort-key\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"1.2.0\",\n\t\t\t\tandroid: \"9.1.0\",\n\t\t\t\tios: \"5.8.0\",\n\t\t\t\tmacos: \"0.15.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"1.2.0\",\n\t\t\t\tandroid: \"9.1.0\",\n\t\t\t\tios: \"5.8.0\",\n\t\t\t\tmacos: \"0.15.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_circle = {\n\t\"circle-sort-key\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"1.2.0\",\n\t\t\t\tandroid: \"9.2.0\",\n\t\t\t\tios: \"5.9.0\",\n\t\t\t\tmacos: \"0.16.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"1.2.0\",\n\t\t\t\tandroid: \"9.2.0\",\n\t\t\t\tios: \"5.9.0\",\n\t\t\t\tmacos: \"0.16.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_heatmap = {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_line = {\n\t\"line-cap\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tbutt: {\n\t\t\t\tdoc: \"A cap with a squared-off end which is drawn to the exact endpoint of the line.\"\n\t\t\t},\n\t\t\tround: {\n\t\t\t\tdoc: \"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.\"\n\t\t\t},\n\t\t\tsquare: {\n\t\t\t\tdoc: \"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"butt\",\n\t\tdoc: \"The display of line endings.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"2.3.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-join\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tbevel: {\n\t\t\t\tdoc: \"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width.\"\n\t\t\t},\n\t\t\tround: {\n\t\t\t\tdoc: \"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line.\"\n\t\t\t},\n\t\t\tmiter: {\n\t\t\t\tdoc: \"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"miter\",\n\t\tdoc: \"The display of lines when joining.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.40.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-miter-limit\": {\n\t\ttype: \"number\",\n\t\t\"default\": 2,\n\t\tdoc: \"Used to automatically convert miter joins to bevel joins for sharp angles.\",\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"line-join\": \"miter\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"line-round-limit\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1.05,\n\t\tdoc: \"Used to automatically convert round joins to miter joins for shallow angles.\",\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"line-join\": \"round\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"line-sort-key\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"1.2.0\",\n\t\t\t\tandroid: \"9.1.0\",\n\t\t\t\tios: \"5.8.0\",\n\t\t\t\tmacos: \"0.15.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"1.2.0\",\n\t\t\t\tandroid: \"9.1.0\",\n\t\t\t\tios: \"5.8.0\",\n\t\t\t\tmacos: \"0.15.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_symbol = {\n\t\"symbol-placement\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tpoint: {\n\t\t\t\tdoc: \"The label is placed at the point where the geometry is located.\"\n\t\t\t},\n\t\t\tline: {\n\t\t\t\tdoc: \"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries.\"\n\t\t\t},\n\t\t\t\"line-center\": {\n\t\t\t\tdoc: \"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"point\",\n\t\tdoc: \"Label placement relative to its geometry.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"`line-center` value\": {\n\t\t\t\tjs: \"0.47.0\",\n\t\t\t\tandroid: \"6.4.0\",\n\t\t\t\tios: \"4.3.0\",\n\t\t\t\tmacos: \"0.10.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"symbol-spacing\": {\n\t\ttype: \"number\",\n\t\t\"default\": 250,\n\t\tminimum: 1,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Distance between two symbol anchors.\",\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"symbol-placement\": \"line\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"symbol-avoid-edges\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"symbol-sort-key\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first.  When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.53.0\",\n\t\t\t\tandroid: \"7.4.0\",\n\t\t\t\tios: \"4.11.0\",\n\t\t\t\tmacos: \"0.14.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.53.0\",\n\t\t\t\tandroid: \"7.4.0\",\n\t\t\t\tios: \"4.11.0\",\n\t\t\t\tmacos: \"0.14.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"symbol-z-order\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tauto: {\n\t\t\t\tdoc: \"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`.\"\n\t\t\t},\n\t\t\t\"viewport-y\": {\n\t\t\t\tdoc: \"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`.\"\n\t\t\t},\n\t\t\tsource: {\n\t\t\t\tdoc: \"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n\t\tdoc: \"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.49.0\",\n\t\t\t\tandroid: \"6.6.0\",\n\t\t\t\tios: \"4.5.0\",\n\t\t\t\tmacos: \"0.12.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-allow-overlap\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, the icon will be visible even if it collides with other previously drawn symbols.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-ignore-placement\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, other symbols can be visible even if they collide with the icon.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-optional\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.\",\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-rotation-alignment\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.\"\n\t\t\t},\n\t\t\tauto: {\n\t\t\t\tdoc: \"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n\t\tdoc: \"In combination with `symbol-placement`, determines the rotation behavior of icons.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"`auto` value\": {\n\t\t\t\tjs: \"0.25.0\",\n\t\t\t\tandroid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.3.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-size\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tunits: \"factor of the original icon size\",\n\t\tdoc: \"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.35.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-text-fit\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tnone: {\n\t\t\t\tdoc: \"The icon is displayed at its intrinsic aspect ratio.\"\n\t\t\t},\n\t\t\twidth: {\n\t\t\t\tdoc: \"The icon is scaled in the x-dimension to fit the width of the text.\"\n\t\t\t},\n\t\t\theight: {\n\t\t\t\tdoc: \"The icon is scaled in the y-dimension to fit the height of the text.\"\n\t\t\t},\n\t\t\tboth: {\n\t\t\t\tdoc: \"The icon is scaled in both x- and y-dimensions.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"none\",\n\t\tdoc: \"Scales the icon to fit around the associated text.\",\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.21.0\",\n\t\t\t\tandroid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.2.1\"\n\t\t\t},\n\t\t\t\"stretchable icons\": {\n\t\t\t\tjs: \"1.6.0\",\n\t\t\t\tandroid: \"9.2.0\",\n\t\t\t\tios: \"5.8.0\",\n\t\t\t\tmacos: \"0.15.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-text-fit-padding\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 4,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0,\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tunits: \"pixels\",\n\t\tdoc: \"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.\",\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"icon-text-fit\": [\n\t\t\t\t\t\"both\",\n\t\t\t\t\t\"width\",\n\t\t\t\t\t\"height\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.21.0\",\n\t\t\t\tandroid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.2.1\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-image\": {\n\t\ttype: \"resolvedImage\",\n\t\tdoc: \"Name of image in sprite to use for drawing an image background.\",\n\t\ttokens: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.35.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-rotate\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tperiod: 360,\n\t\tunits: \"degrees\",\n\t\tdoc: \"Rotates the icon clockwise.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.21.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-padding\": {\n\t\ttype: \"number\",\n\t\t\"default\": 2,\n\t\tminimum: 0,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Size of the additional area around the icon bounding box used for detecting symbol collisions.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-keep-upright\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, the icon may be flipped to prevent it from being rendered upside-down.\",\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t{\n\t\t\t\t\"icon-rotation-alignment\": \"map\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"line\",\n\t\t\t\t\t\"line-center\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-offset\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tdoc: \"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tcenter: {\n\t\t\t\tdoc: \"The center of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tleft: {\n\t\t\t\tdoc: \"The left side of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tright: {\n\t\t\t\tdoc: \"The right side of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\ttop: {\n\t\t\t\tdoc: \"The top of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tbottom: {\n\t\t\t\tdoc: \"The bottom of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"top-left\": {\n\t\t\t\tdoc: \"The top left corner of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"top-right\": {\n\t\t\t\tdoc: \"The top right corner of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"bottom-left\": {\n\t\t\t\tdoc: \"The bottom left corner of the icon is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"bottom-right\": {\n\t\t\t\tdoc: \"The bottom right corner of the icon is placed closest to the anchor.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"center\",\n\t\tdoc: \"Part of the icon placed closest to the anchor.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.40.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.40.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-pitch-alignment\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The icon is aligned to the plane of the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The icon is aligned to the plane of the viewport.\"\n\t\t\t},\n\t\t\tauto: {\n\t\t\t\tdoc: \"Automatically matches the value of `icon-rotation-alignment`.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n\t\tdoc: \"Orientation of icon when map is pitched.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.39.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-pitch-alignment\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The text is aligned to the plane of the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The text is aligned to the plane of the viewport.\"\n\t\t\t},\n\t\t\tauto: {\n\t\t\t\tdoc: \"Automatically matches the value of `text-rotation-alignment`.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n\t\tdoc: \"Orientation of text when map is pitched.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.21.0\",\n\t\t\t\tandroid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.2.1\"\n\t\t\t},\n\t\t\t\"`auto` value\": {\n\t\t\t\tjs: \"0.25.0\",\n\t\t\t\tandroid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.3.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-rotation-alignment\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`.\"\n\t\t\t},\n\t\t\tauto: {\n\t\t\t\tdoc: \"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"auto\",\n\t\tdoc: \"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"`auto` value\": {\n\t\t\t\tjs: \"0.25.0\",\n\t\t\t\tandroid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.3.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-field\": {\n\t\ttype: \"formatted\",\n\t\t\"default\": \"\",\n\t\ttokens: true,\n\t\tdoc: \"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-font\": {\n\t\ttype: \"array\",\n\t\tvalue: \"string\",\n\t\t\"default\": [\n\t\t\t\"Open Sans Regular\",\n\t\t\t\"Arial Unicode MS Regular\"\n\t\t],\n\t\tdoc: \"Font stack to use for displaying text.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-size\": {\n\t\ttype: \"number\",\n\t\t\"default\": 16,\n\t\tminimum: 0,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Font size.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.35.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-max-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 10,\n\t\tminimum: 0,\n\t\tunits: \"ems\",\n\t\tdoc: \"The maximum line width for text wrapping.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.40.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-line-height\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1.2,\n\t\tunits: \"ems\",\n\t\tdoc: \"Text leading value for multi-line text.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"2.3.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-letter-spacing\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tunits: \"ems\",\n\t\tdoc: \"Text tracking amount.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.40.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-justify\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tauto: {\n\t\t\t\tdoc: \"The text is aligned towards the anchor position.\"\n\t\t\t},\n\t\t\tleft: {\n\t\t\t\tdoc: \"The text is aligned to the left.\"\n\t\t\t},\n\t\t\tcenter: {\n\t\t\t\tdoc: \"The text is centered.\"\n\t\t\t},\n\t\t\tright: {\n\t\t\t\tdoc: \"The text is aligned to the right.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"center\",\n\t\tdoc: \"Text justification options.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.39.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t},\n\t\t\tauto: {\n\t\t\t\tjs: \"0.54.0\",\n\t\t\t\tandroid: \"7.4.0\",\n\t\t\t\tios: \"4.10.0\",\n\t\t\t\tmacos: \"0.14.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-radial-offset\": {\n\t\ttype: \"number\",\n\t\tunits: \"ems\",\n\t\t\"default\": 0,\n\t\tdoc: \"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.54.0\",\n\t\t\t\tandroid: \"7.4.0\",\n\t\t\t\tios: \"4.10.0\",\n\t\t\t\tmacos: \"0.14.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.54.0\",\n\t\t\t\tandroid: \"7.4.0\",\n\t\t\t\tios: \"4.10.0\",\n\t\t\t\tmacos: \"0.14.0\"\n\t\t\t}\n\t\t},\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"property-type\": \"data-driven\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t}\n\t},\n\t\"text-variable-anchor\": {\n\t\ttype: \"array\",\n\t\tvalue: \"enum\",\n\t\tvalues: {\n\t\t\tcenter: {\n\t\t\t\tdoc: \"The center of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tleft: {\n\t\t\t\tdoc: \"The left side of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tright: {\n\t\t\t\tdoc: \"The right side of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\ttop: {\n\t\t\t\tdoc: \"The top of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tbottom: {\n\t\t\t\tdoc: \"The bottom of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"top-left\": {\n\t\t\t\tdoc: \"The top left corner of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"top-right\": {\n\t\t\t\tdoc: \"The top right corner of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"bottom-left\": {\n\t\t\t\tdoc: \"The bottom left corner of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"bottom-right\": {\n\t\t\t\tdoc: \"The bottom right corner of the text is placed closest to the anchor.\"\n\t\t\t}\n\t\t},\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"point\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\tdoc: \"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.54.0\",\n\t\t\t\tandroid: \"7.4.0\",\n\t\t\t\tios: \"4.10.0\",\n\t\t\t\tmacos: \"0.14.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tcenter: {\n\t\t\t\tdoc: \"The center of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tleft: {\n\t\t\t\tdoc: \"The left side of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tright: {\n\t\t\t\tdoc: \"The right side of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\ttop: {\n\t\t\t\tdoc: \"The top of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\tbottom: {\n\t\t\t\tdoc: \"The bottom of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"top-left\": {\n\t\t\t\tdoc: \"The top left corner of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"top-right\": {\n\t\t\t\tdoc: \"The top right corner of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"bottom-left\": {\n\t\t\t\tdoc: \"The bottom left corner of the text is placed closest to the anchor.\"\n\t\t\t},\n\t\t\t\"bottom-right\": {\n\t\t\t\tdoc: \"The bottom right corner of the text is placed closest to the anchor.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"center\",\n\t\tdoc: \"Part of the text placed closest to the anchor.\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"!\": \"text-variable-anchor\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.39.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-max-angle\": {\n\t\ttype: \"number\",\n\t\t\"default\": 45,\n\t\tunits: \"degrees\",\n\t\tdoc: \"Maximum angle change between adjacent characters.\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"line\",\n\t\t\t\t\t\"line-center\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-writing-mode\": {\n\t\ttype: \"array\",\n\t\tvalue: \"enum\",\n\t\tvalues: {\n\t\t\thorizontal: {\n\t\t\t\tdoc: \"If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally.\"\n\t\t\t},\n\t\t\tvertical: {\n\t\t\t\tdoc: \"If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"point\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"1.3.0\",\n\t\t\t\tandroid: \"8.3.0\",\n\t\t\t\tios: \"5.3.0\",\n\t\t\t\tmacos: \"0.15.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-rotate\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tperiod: 360,\n\t\tunits: \"degrees\",\n\t\tdoc: \"Rotates the text clockwise.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.35.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-padding\": {\n\t\ttype: \"number\",\n\t\t\"default\": 2,\n\t\tminimum: 0,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Size of the additional area around the text bounding box used for detecting symbol collisions.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-keep-upright\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": true,\n\t\tdoc: \"If true, the text may be flipped vertically to prevent it from being rendered upside-down.\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"text-rotation-alignment\": \"map\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"symbol-placement\": [\n\t\t\t\t\t\"line\",\n\t\t\t\t\t\"line-center\"\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-transform\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tnone: {\n\t\t\t\tdoc: \"The text is not altered.\"\n\t\t\t},\n\t\t\tuppercase: {\n\t\t\t\tdoc: \"Forces all letters to be displayed in uppercase.\"\n\t\t\t},\n\t\t\tlowercase: {\n\t\t\t\tdoc: \"Forces all letters to be displayed in lowercase.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"none\",\n\t\tdoc: \"Specifies how to capitalize text, similar to the CSS `text-transform` property.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-offset\": {\n\t\ttype: \"array\",\n\t\tdoc: \"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.\",\n\t\tvalue: \"number\",\n\t\tunits: \"ems\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t{\n\t\t\t\t\"!\": \"text-radial-offset\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.35.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-allow-overlap\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, the text will be visible even if it collides with other previously drawn symbols.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-ignore-placement\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, other symbols can be visible even if they collide with the text.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-optional\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": false,\n\t\tdoc: \"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_raster = {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar layout_hillshade = {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n};\nvar filter = {\n\ttype: \"array\",\n\tvalue: \"*\",\n\tdoc: \"A filter selects specific features from a layer.\"\n};\nvar filter_operator = {\n\ttype: \"enum\",\n\tvalues: {\n\t\t\"==\": {\n\t\t\tdoc: \"`[\\\"==\\\", key, value]` equality: `feature[key] = value`\"\n\t\t},\n\t\t\"!=\": {\n\t\t\tdoc: \"`[\\\"!=\\\", key, value]` inequality: `feature[key] ≠ value`\"\n\t\t},\n\t\t\">\": {\n\t\t\tdoc: \"`[\\\">\\\", key, value]` greater than: `feature[key] > value`\"\n\t\t},\n\t\t\">=\": {\n\t\t\tdoc: \"`[\\\">=\\\", key, value]` greater than or equal: `feature[key] ≥ value`\"\n\t\t},\n\t\t\"<\": {\n\t\t\tdoc: \"`[\\\"<\\\", key, value]` less than: `feature[key] < value`\"\n\t\t},\n\t\t\"<=\": {\n\t\t\tdoc: \"`[\\\"<=\\\", key, value]` less than or equal: `feature[key] ≤ value`\"\n\t\t},\n\t\t\"in\": {\n\t\t\tdoc: \"`[\\\"in\\\", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`\"\n\t\t},\n\t\t\"!in\": {\n\t\t\tdoc: \"`[\\\"!in\\\", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`\"\n\t\t},\n\t\tall: {\n\t\t\tdoc: \"`[\\\"all\\\", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`\"\n\t\t},\n\t\tany: {\n\t\t\tdoc: \"`[\\\"any\\\", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`\"\n\t\t},\n\t\tnone: {\n\t\t\tdoc: \"`[\\\"none\\\", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`\"\n\t\t},\n\t\thas: {\n\t\t\tdoc: \"`[\\\"has\\\", key]` `feature[key]` exists\"\n\t\t},\n\t\t\"!has\": {\n\t\t\tdoc: \"`[\\\"!has\\\", key]` `feature[key]` does not exist\"\n\t\t},\n\t\twithin: {\n\t\t\tdoc: \"`[\\\"within\\\", object]` feature geometry is within object geometry\"\n\t\t}\n\t},\n\tdoc: \"The filter operator.\"\n};\nvar geometry_type = {\n\ttype: \"enum\",\n\tvalues: {\n\t\tPoint: {\n\t\t\tdoc: \"Filter to point geometries.\"\n\t\t},\n\t\tLineString: {\n\t\t\tdoc: \"Filter to line geometries.\"\n\t\t},\n\t\tPolygon: {\n\t\t\tdoc: \"Filter to polygon geometries.\"\n\t\t}\n\t},\n\tdoc: \"The geometry type for the filter to select.\"\n};\nvar function_stop = {\n\ttype: \"array\",\n\tminimum: 0,\n\tmaximum: 24,\n\tvalue: [\n\t\t\"number\",\n\t\t\"color\"\n\t],\n\tlength: 2,\n\tdoc: \"Zoom level and value pair.\"\n};\nvar expression = {\n\ttype: \"array\",\n\tvalue: \"*\",\n\tminimum: 1,\n\tdoc: \"An expression defines a function that can be used for data-driven style properties or feature filters.\"\n};\nvar expression_name = {\n\tdoc: \"\",\n\ttype: \"enum\",\n\tvalues: {\n\t\t\"let\": {\n\t\t\tdoc: \"Binds expressions to named variables, which can then be referenced in the result expression using [\\\"var\\\", \\\"variable_name\\\"].\",\n\t\t\tgroup: \"Variable binding\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"var\": {\n\t\t\tdoc: \"References variable bound using \\\"let\\\".\",\n\t\t\tgroup: \"Variable binding\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tliteral: {\n\t\t\tdoc: \"Provides a literal array or object value.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tarray: {\n\t\t\tdoc: \"Asserts that the input is an array (optionally with a specific item type and length).  If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tat: {\n\t\t\tdoc: \"Retrieves an item from an array.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"in\": {\n\t\t\tdoc: \"Determines whether an item exists in an array or a substring exists in a string.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"1.6.0\",\n\t\t\t\t\tandroid: \"9.1.0\",\n\t\t\t\t\tios: \"5.8.0\",\n\t\t\t\t\tmacos: \"0.15.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"index-of\": {\n\t\t\tdoc: \"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"1.10.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tslice: {\n\t\t\tdoc: \"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"1.10.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"case\": {\n\t\t\tdoc: \"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tmatch: {\n\t\t\tdoc: \"Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `[\\\"get\\\", \\\"building_type\\\"]`). Each label must be unique, and must be either:\\n - a single literal value; or\\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `[\\\"c\\\", \\\"b\\\"]`).\\n\\nThe input matches if any of the values in the array matches using strict equality, similar to the `\\\"in\\\"` operator.\\nIf the input type does not match the type of the labels, the result will be the fallback value.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcoalesce: {\n\t\t\tdoc: \"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tstep: {\n\t\t\tdoc: \"Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values (\\\"stops\\\"). The `input` may be any numeric expression (e.g., `[\\\"get\\\", \\\"population\\\"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.\",\n\t\t\tgroup: \"Ramps, scales, curves\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.42.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tinterpolate: {\n\t\t\tdoc: \"Produces continuous, smooth results by interpolating between pairs of input and output values (\\\"stops\\\"). The `input` may be any numeric expression (e.g., `[\\\"get\\\", \\\"population\\\"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array<number>`, or `color`.\\n\\nInterpolation types:\\n- `[\\\"linear\\\"]`: Interpolates linearly between the pair of stops just less than and just greater than the input.\\n- `[\\\"exponential\\\", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\\n- `[\\\"cubic-bezier\\\", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.\",\n\t\t\tgroup: \"Ramps, scales, curves\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.42.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"interpolate-hcl\": {\n\t\t\tdoc: \"Produces continuous, smooth results by interpolating between pairs of input and output values (\\\"stops\\\"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.\",\n\t\t\tgroup: \"Ramps, scales, curves\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.49.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"interpolate-lab\": {\n\t\t\tdoc: \"Produces continuous, smooth results by interpolating between pairs of input and output values (\\\"stops\\\"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.\",\n\t\t\tgroup: \"Ramps, scales, curves\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.49.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tln2: {\n\t\t\tdoc: \"Returns mathematical constant ln(2).\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tpi: {\n\t\t\tdoc: \"Returns the mathematical constant pi.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\te: {\n\t\t\tdoc: \"Returns the mathematical constant e.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"typeof\": {\n\t\t\tdoc: \"Returns a string describing the type of the given value.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tstring: {\n\t\t\tdoc: \"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tnumber: {\n\t\t\tdoc: \"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tboolean: {\n\t\t\tdoc: \"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tobject: {\n\t\t\tdoc: \"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcollator: {\n\t\t\tdoc: \"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tformat: {\n\t\t\tdoc: \"Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`'image'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\\n- `\\\"text-font\\\"`: Overrides the font stack specified by the root layout property.\\n- `\\\"text-color\\\"`: Overrides the color specified by the root paint property.\\n- `\\\"font-scale\\\"`: Applies a scaling factor on `text-size` as specified by the root layout property.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.48.0\",\n\t\t\t\t\tandroid: \"6.7.0\",\n\t\t\t\t\tios: \"4.6.0\",\n\t\t\t\t\tmacos: \"0.12.0\"\n\t\t\t\t},\n\t\t\t\t\"text-font\": {\n\t\t\t\t\tjs: \"0.48.0\",\n\t\t\t\t\tandroid: \"6.7.0\",\n\t\t\t\t\tios: \"4.6.0\",\n\t\t\t\t\tmacos: \"0.12.0\"\n\t\t\t\t},\n\t\t\t\t\"font-scale\": {\n\t\t\t\t\tjs: \"0.48.0\",\n\t\t\t\t\tandroid: \"6.7.0\",\n\t\t\t\t\tios: \"4.6.0\",\n\t\t\t\t\tmacos: \"0.12.0\"\n\t\t\t\t},\n\t\t\t\t\"text-color\": {\n\t\t\t\t\tjs: \"1.3.0\",\n\t\t\t\t\tandroid: \"7.3.0\",\n\t\t\t\t\tios: \"4.10.0\",\n\t\t\t\t\tmacos: \"0.14.0\"\n\t\t\t\t},\n\t\t\t\timage: {\n\t\t\t\t\tjs: \"1.6.0\",\n\t\t\t\t\tandroid: \"8.6.0\",\n\t\t\t\t\tios: \"5.7.0\",\n\t\t\t\t\tmacos: \"0.15.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\timage: {\n\t\t\tdoc: \"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"1.4.0\",\n\t\t\t\t\tandroid: \"8.6.0\",\n\t\t\t\t\tios: \"5.7.0\",\n\t\t\t\t\tmacos: \"0.15.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"number-format\": {\n\t\t\tdoc: \"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.54.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"to-string\": {\n\t\t\tdoc: \"Converts the input value to a string. If the input is `null`, the result is `\\\"\\\"`. If the input is a boolean, the result is `\\\"true\\\"` or `\\\"false\\\"`. If the input is a number, it is converted to a string as specified by the [\\\"NumberToString\\\" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `\\\"rgba(r,g,b,a)\\\"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"to-number\": {\n\t\t\tdoc: \"Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the [\\\"ToNumber Applied to the String Type\\\" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"to-boolean\": {\n\t\t\tdoc: \"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"to-rgba\": {\n\t\t\tdoc: \"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.\",\n\t\t\tgroup: \"Color\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"to-color\": {\n\t\t\tdoc: \"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.\",\n\t\t\tgroup: \"Types\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\trgb: {\n\t\t\tdoc: \"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.\",\n\t\t\tgroup: \"Color\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\trgba: {\n\t\t\tdoc: \"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.\",\n\t\t\tgroup: \"Color\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tget: {\n\t\t\tdoc: \"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: {\n\t\t\tdoc: \"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tlength: {\n\t\t\tdoc: \"Gets the length of an array or string.\",\n\t\t\tgroup: \"Lookup\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tproperties: {\n\t\t\tdoc: \"Gets the feature properties object.  Note that in some cases, it may be more efficient to use [\\\"get\\\", \\\"property_name\\\"] directly.\",\n\t\t\tgroup: \"Feature data\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"feature-state\": {\n\t\t\tdoc: \"Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\\\"feature-state\\\"] can only be used with paint properties that support data-driven styling.\",\n\t\t\tgroup: \"Feature data\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.46.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"geometry-type\": {\n\t\t\tdoc: \"Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`.\",\n\t\t\tgroup: \"Feature data\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tid: {\n\t\t\tdoc: \"Gets the feature's id, if it has one.\",\n\t\t\tgroup: \"Feature data\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tzoom: {\n\t\t\tdoc: \"Gets the current zoom level.  Note that in style layout and paint properties, [\\\"zoom\\\"] may only appear as the input to a top-level \\\"step\\\" or \\\"interpolate\\\" expression.\",\n\t\t\tgroup: \"Zoom\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"heatmap-density\": {\n\t\t\tdoc: \"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.\",\n\t\t\tgroup: \"Heatmap\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"line-progress\": {\n\t\t\tdoc: \"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.\",\n\t\t\tgroup: \"Feature data\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.6.0\",\n\t\t\t\t\tmacos: \"0.12.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"sky-radial-progress\": {\n\t\t\tdoc: \"Gets the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.\",\n\t\t\tgroup: \"sky\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"2.0.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\taccumulated: {\n\t\t\tdoc: \"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.\",\n\t\t\tgroup: \"Feature data\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.53.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"+\": {\n\t\t\tdoc: \"Returns the sum of the inputs.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"*\": {\n\t\t\tdoc: \"Returns the product of the inputs.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"-\": {\n\t\t\tdoc: \"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"/\": {\n\t\t\tdoc: \"Returns the result of floating point division of the first input by the second.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"%\": {\n\t\t\tdoc: \"Returns the remainder after integer division of the first input by the second.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"^\": {\n\t\t\tdoc: \"Returns the result of raising the first input to the power specified by the second.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tsqrt: {\n\t\t\tdoc: \"Returns the square root of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.42.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tlog10: {\n\t\t\tdoc: \"Returns the base-ten logarithm of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tln: {\n\t\t\tdoc: \"Returns the natural logarithm of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tlog2: {\n\t\t\tdoc: \"Returns the base-two logarithm of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tsin: {\n\t\t\tdoc: \"Returns the sine of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcos: {\n\t\t\tdoc: \"Returns the cosine of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\ttan: {\n\t\t\tdoc: \"Returns the tangent of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tasin: {\n\t\t\tdoc: \"Returns the arcsine of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tacos: {\n\t\t\tdoc: \"Returns the arccosine of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tatan: {\n\t\t\tdoc: \"Returns the arctangent of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tmin: {\n\t\t\tdoc: \"Returns the minimum value of the inputs.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tmax: {\n\t\t\tdoc: \"Returns the maximum value of the inputs.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tround: {\n\t\t\tdoc: \"Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `[\\\"round\\\", -1.5]` evaluates to -2.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tabs: {\n\t\t\tdoc: \"Returns the absolute value of the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tceil: {\n\t\t\tdoc: \"Returns the smallest integer that is greater than or equal to the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tfloor: {\n\t\t\tdoc: \"Returns the largest integer that is less than or equal to the input.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdistance: {\n\t\t\tdoc: \"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.\",\n\t\t\tgroup: \"Math\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tandroid: \"9.2.0\",\n\t\t\t\t\tios: \"5.9.0\",\n\t\t\t\t\tmacos: \"0.16.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"==\": {\n\t\t\tdoc: \"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t},\n\t\t\t\tcollator: {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"!=\": {\n\t\t\tdoc: \"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t},\n\t\t\t\tcollator: {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\">\": {\n\t\t\tdoc: \"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t},\n\t\t\t\tcollator: {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"<\": {\n\t\t\tdoc: \"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t},\n\t\t\t\tcollator: {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\">=\": {\n\t\t\tdoc: \"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t},\n\t\t\t\tcollator: {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"<=\": {\n\t\t\tdoc: \"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t},\n\t\t\t\tcollator: {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tall: {\n\t\t\tdoc: \"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tany: {\n\t\t\tdoc: \"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"!\": {\n\t\t\tdoc: \"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\twithin: {\n\t\t\tdoc: \"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.\",\n\t\t\tgroup: \"Decision\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"1.9.0\",\n\t\t\t\t\tandroid: \"9.1.0\",\n\t\t\t\t\tios: \"5.8.0\",\n\t\t\t\t\tmacos: \"0.15.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"is-supported-script\": {\n\t\t\tdoc: \"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).\",\n\t\t\tgroup: \"String\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.6.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tupcase: {\n\t\t\tdoc: \"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.\",\n\t\t\tgroup: \"String\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdowncase: {\n\t\t\tdoc: \"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.\",\n\t\t\tgroup: \"String\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tconcat: {\n\t\t\tdoc: \"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.\",\n\t\t\tgroup: \"String\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.41.0\",\n\t\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\t\tios: \"4.0.0\",\n\t\t\t\t\tmacos: \"0.7.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"resolved-locale\": {\n\t\t\tdoc: \"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.\",\n\t\t\tgroup: \"String\",\n\t\t\t\"sdk-support\": {\n\t\t\t\t\"basic functionality\": {\n\t\t\t\t\tjs: \"0.45.0\",\n\t\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\t\tios: \"4.2.0\",\n\t\t\t\t\tmacos: \"0.9.0\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\nvar fog = {\n\trange: {\n\t\ttype: \"array\",\n\t\t\"default\": [\n\t\t\t0.5,\n\t\t\t10\n\t\t],\n\t\tminimum: -20,\n\t\tmaximum: 20,\n\t\tlength: 2,\n\t\tvalue: \"number\",\n\t\t\"property-type\": \"data-constant\",\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\tdoc: \"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.\",\n\t\texample: [\n\t\t\t0.5,\n\t\t\t10\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"2.3.0\"\n\t\t\t}\n\t\t}\n\t},\n\tcolor: {\n\t\ttype: \"color\",\n\t\t\"property-type\": \"data-constant\",\n\t\t\"default\": \"#ffffff\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\ttransition: true,\n\t\tdoc: \"The color of the fog. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"2.3.0\"\n\t\t\t}\n\t\t}\n\t},\n\t\"horizon-blend\": {\n\t\ttype: \"number\",\n\t\t\"property-type\": \"data-constant\",\n\t\t\"default\": 0.1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\ttransition: true,\n\t\tdoc: \"Horizon blend applies a smooth fade from the color of the fog to the color of the sky. A value of zero leaves a sharp transition from fog to sky. Increasing the value blends the color of fog into increasingly high angles of the sky.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"2.3.0\"\n\t\t\t}\n\t\t}\n\t}\n};\nvar light = {\n\tanchor: {\n\t\ttype: \"enum\",\n\t\t\"default\": \"viewport\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The position of the light source is aligned to the rotation of the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The position of the light source is aligned to the rotation of the viewport.\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"data-constant\",\n\t\ttransition: false,\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\tdoc: \"Whether extruded geometries are lit relative to the map or viewport.\",\n\t\texample: \"map\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t}\n\t},\n\tposition: {\n\t\ttype: \"array\",\n\t\t\"default\": [\n\t\t\t1.15,\n\t\t\t210,\n\t\t\t30\n\t\t],\n\t\tlength: 3,\n\t\tvalue: \"number\",\n\t\t\"property-type\": \"data-constant\",\n\t\ttransition: true,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\tdoc: \"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).\",\n\t\texample: [\n\t\t\t1.5,\n\t\t\t90,\n\t\t\t80\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t}\n\t},\n\tcolor: {\n\t\ttype: \"color\",\n\t\t\"property-type\": \"data-constant\",\n\t\t\"default\": \"#ffffff\",\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\ttransition: true,\n\t\tdoc: \"Color tint for lighting extruded geometries.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t}\n\t},\n\tintensity: {\n\t\ttype: \"number\",\n\t\t\"property-type\": \"data-constant\",\n\t\t\"default\": 0.5,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\ttransition: true,\n\t\tdoc: \"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t}\n\t}\n};\nvar terrain = {\n\tsource: {\n\t\ttype: \"string\",\n\t\tdoc: \"Name of a source of `raster_dem` type to be used for terrain elevation.\",\n\t\trequired: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"2.0.0\"\n\t\t\t}\n\t\t}\n\t},\n\texaggeration: {\n\t\ttype: \"number\",\n\t\t\"property-type\": \"data-constant\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1000,\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\ttransition: true,\n\t\tdoc: \"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"2.0.0\"\n\t\t\t}\n\t\t}\n\t}\n};\nvar paint = [\n\t\"paint_fill\",\n\t\"paint_line\",\n\t\"paint_circle\",\n\t\"paint_heatmap\",\n\t\"paint_fill-extrusion\",\n\t\"paint_symbol\",\n\t\"paint_raster\",\n\t\"paint_hillshade\",\n\t\"paint_background\",\n\t\"paint_sky\"\n];\nvar paint_fill = {\n\t\"fill-antialias\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": true,\n\t\tdoc: \"Whether or not the fill should be antialiased.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\tdoc: \"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.21.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"fill-pattern\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.19.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-outline-color\": {\n\t\ttype: \"color\",\n\t\tdoc: \"The outline color of the fill. Matches the value of `fill-color` if unspecified.\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"fill-pattern\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"fill-antialias\": true\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.19.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The fill is translated relative to the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The fill is translated relative to the viewport.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"Controls the frame of reference for `fill-translate`.\",\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"fill-translate\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-pattern\": {\n\t\ttype: \"resolvedImage\",\n\t\ttransition: true,\n\t\tdoc: \"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.49.0\",\n\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\tmacos: \"0.11.0\",\n\t\t\t\tios: \"4.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"cross-faded-data-driven\"\n\t}\n};\nvar paint_line = {\n\t\"line-opacity\": {\n\t\ttype: \"number\",\n\t\tdoc: \"The opacity at which the line will be drawn.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-color\": {\n\t\ttype: \"color\",\n\t\tdoc: \"The color with which the line will be drawn.\",\n\t\t\"default\": \"#000000\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"line-pattern\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.23.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"line-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The line is translated relative to the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The line is translated relative to the viewport.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"Controls the frame of reference for `line-translate`.\",\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"line-translate\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"line-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Stroke thickness.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.39.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-gap-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\tdoc: \"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.\",\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-offset\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tdoc: \"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.\",\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.12.1\",\n\t\t\t\tandroid: \"3.0.0\",\n\t\t\t\tios: \"3.1.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-blur\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Blur applied to the line, in pixels.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"line-dasharray\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tdoc: \"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"line widths\",\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"line-pattern\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"2.3.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"cross-faded-data-driven\"\n\t},\n\t\"line-pattern\": {\n\t\ttype: \"resolvedImage\",\n\t\ttransition: true,\n\t\tdoc: \"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.49.0\",\n\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\tmacos: \"0.11.0\",\n\t\t\t\tios: \"4.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"cross-faded-data-driven\"\n\t},\n\t\"line-gradient\": {\n\t\ttype: \"color\",\n\t\tdoc: \"Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `\\\"lineMetrics\\\": true`.\",\n\t\ttransition: false,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"line-dasharray\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"!\": \"line-pattern\"\n\t\t\t},\n\t\t\t{\n\t\t\t\tsource: \"geojson\",\n\t\t\t\thas: {\n\t\t\t\t\tlineMetrics: true\n\t\t\t\t}\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.45.0\",\n\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\tios: \"4.4.0\",\n\t\t\t\tmacos: \"0.11.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"line-progress\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"color-ramp\"\n\t}\n};\nvar paint_circle = {\n\t\"circle-radius\": {\n\t\ttype: \"number\",\n\t\t\"default\": 5,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Circle radius.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.18.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The fill color of the circle.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.18.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-blur\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tdoc: \"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.20.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-opacity\": {\n\t\ttype: \"number\",\n\t\tdoc: \"The opacity at which the circle will be drawn.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.20.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"circle-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The circle is translated relative to the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The circle is translated relative to the viewport.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"Controls the frame of reference for `circle-translate`.\",\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"circle-translate\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"circle-pitch-scale\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"Circles are scaled according to their apparent distance to the camera.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"Circles are not scaled.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"map\",\n\t\tdoc: \"Controls the scaling behavior of the circle when the map is pitched.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.21.0\",\n\t\t\t\tandroid: \"4.2.0\",\n\t\t\t\tios: \"3.4.0\",\n\t\t\t\tmacos: \"0.2.1\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"circle-pitch-alignment\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The circle is aligned to the plane of the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The circle is aligned to the plane of the viewport.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"viewport\",\n\t\tdoc: \"Orientation of circle when map is pitched.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.39.0\",\n\t\t\t\tandroid: \"5.2.0\",\n\t\t\t\tios: \"3.7.0\",\n\t\t\t\tmacos: \"0.6.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"circle-stroke-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-stroke-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The stroke color of the circle.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"circle-stroke-opacity\": {\n\t\ttype: \"number\",\n\t\tdoc: \"The opacity of the circle's stroke.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.29.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t}\n};\nvar paint_heatmap = {\n\t\"heatmap-radius\": {\n\t\ttype: \"number\",\n\t\t\"default\": 30,\n\t\tminimum: 1,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"heatmap-weight\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\ttransition: false,\n\t\tdoc: \"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"heatmap-intensity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tdoc: \"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"heatmap-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": [\n\t\t\t\"interpolate\",\n\t\t\t[\n\t\t\t\t\"linear\"\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"heatmap-density\"\n\t\t\t],\n\t\t\t0,\n\t\t\t\"rgba(0, 0, 255, 0)\",\n\t\t\t0.1,\n\t\t\t\"royalblue\",\n\t\t\t0.3,\n\t\t\t\"cyan\",\n\t\t\t0.5,\n\t\t\t\"lime\",\n\t\t\t0.7,\n\t\t\t\"yellow\",\n\t\t\t1,\n\t\t\t\"red\"\n\t\t],\n\t\tdoc: \"Defines the color of each pixel based on its density value in a heatmap.  Should be an expression that uses `[\\\"heatmap-density\\\"]` as input.\",\n\t\ttransition: false,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"heatmap-density\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"color-ramp\"\n\t},\n\t\"heatmap-opacity\": {\n\t\ttype: \"number\",\n\t\tdoc: \"The global opacity at which the heatmap layer will be drawn.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.41.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar paint_symbol = {\n\t\"icon-opacity\": {\n\t\tdoc: \"The opacity at which the icon will be drawn.\",\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\ttransition: true,\n\t\tdoc: \"The color of the icon. This can only be used with sdf icons.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-halo-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"rgba(0, 0, 0, 0)\",\n\t\ttransition: true,\n\t\tdoc: \"The color of the icon's halo. Icon halos can only be used with SDF icons.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-halo-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Distance of halo to the icon outline.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-halo-blur\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Fade out the halo towards the outside.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"icon-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.\",\n\t\trequires: [\n\t\t\t\"icon-image\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"icon-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"Icons are translated relative to the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"Icons are translated relative to the viewport.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"Controls the frame of reference for `icon-translate`.\",\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"icon-image\",\n\t\t\t\"icon-translate\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-opacity\": {\n\t\ttype: \"number\",\n\t\tdoc: \"The opacity at which the text will be drawn.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-color\": {\n\t\ttype: \"color\",\n\t\tdoc: \"The color with which the text will be drawn.\",\n\t\t\"default\": \"#000000\",\n\t\ttransition: true,\n\t\toverridable: true,\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-halo-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"rgba(0, 0, 0, 0)\",\n\t\ttransition: true,\n\t\tdoc: \"The color of the text's halo, which helps it stand out from backgrounds.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-halo-width\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-halo-blur\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The halo's fadeout distance towards the outside.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.33.0\",\n\t\t\t\tandroid: \"5.0.0\",\n\t\t\t\tios: \"3.5.0\",\n\t\t\t\tmacos: \"0.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"text-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.\",\n\t\trequires: [\n\t\t\t\"text-field\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"text-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The text is translated relative to the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The text is translated relative to the viewport.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"Controls the frame of reference for `text-translate`.\",\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"text-field\",\n\t\t\t\"text-translate\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar paint_raster = {\n\t\"raster-opacity\": {\n\t\ttype: \"number\",\n\t\tdoc: \"The opacity at which the image will be drawn.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-hue-rotate\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tperiod: 360,\n\t\ttransition: true,\n\t\tunits: \"degrees\",\n\t\tdoc: \"Rotates hues around the color wheel.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-brightness-min\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Increase or reduce the brightness of the image. The value is the minimum brightness.\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-brightness-max\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Increase or reduce the brightness of the image. The value is the maximum brightness.\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-saturation\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Increase or reduce the saturation of the image.\",\n\t\t\"default\": 0,\n\t\tminimum: -1,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-contrast\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Increase or reduce the contrast of the image.\",\n\t\t\"default\": 0,\n\t\tminimum: -1,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-resampling\": {\n\t\ttype: \"enum\",\n\t\tdoc: \"The resampling/interpolation method to use for overscaling, also known as texture magnification filter\",\n\t\tvalues: {\n\t\t\tlinear: {\n\t\t\t\tdoc: \"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled\"\n\t\t\t},\n\t\t\tnearest: {\n\t\t\t\tdoc: \"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"linear\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.47.0\",\n\t\t\t\tandroid: \"6.3.0\",\n\t\t\t\tios: \"4.2.0\",\n\t\t\t\tmacos: \"0.9.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"raster-fade-duration\": {\n\t\ttype: \"number\",\n\t\t\"default\": 300,\n\t\tminimum: 0,\n\t\ttransition: false,\n\t\tunits: \"milliseconds\",\n\t\tdoc: \"Fade duration when a new tile is added.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar paint_hillshade = {\n\t\"hillshade-illumination-direction\": {\n\t\ttype: \"number\",\n\t\t\"default\": 335,\n\t\tminimum: 0,\n\t\tmaximum: 359,\n\t\tdoc: \"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.\",\n\t\ttransition: false,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-illumination-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The hillshade illumination is relative to the north direction.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The hillshade illumination is relative to the top of the viewport.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"viewport\",\n\t\tdoc: \"Direction of light source when map is rotated.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-exaggeration\": {\n\t\ttype: \"number\",\n\t\tdoc: \"Intensity of the hillshade\",\n\t\t\"default\": 0.5,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-shadow-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The shading color of areas that face away from the light source.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-highlight-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#FFFFFF\",\n\t\tdoc: \"The shading color of areas that faces towards the light source.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"hillshade-accent-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.43.0\",\n\t\t\t\tandroid: \"6.0.0\",\n\t\t\t\tios: \"4.0.0\",\n\t\t\t\tmacos: \"0.7.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar paint_background = {\n\t\"background-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The color with which the background will be drawn.\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"background-pattern\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"background-pattern\": {\n\t\ttype: \"resolvedImage\",\n\t\ttransition: true,\n\t\tdoc: \"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"cross-faded\"\n\t},\n\t\"background-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\tdoc: \"The opacity at which the background will be drawn.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.10.0\",\n\t\t\t\tandroid: \"2.0.1\",\n\t\t\t\tios: \"2.0.0\",\n\t\t\t\tmacos: \"0.1.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar paint_sky = {\n\t\"sky-type\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tgradient: {\n\t\t\t\tdoc: \"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`.\"\n\t\t\t},\n\t\t\tatmosphere: {\n\t\t\t\tdoc: \"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"atmosphere\",\n\t\tdoc: \"The type of the sky\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"2.0.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"sky-atmosphere-sun\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\tunits: \"degrees\",\n\t\tminimum: [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tmaximum: [\n\t\t\t360,\n\t\t\t180\n\t\t],\n\t\ttransition: false,\n\t\tdoc: \"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"2.0.0\"\n\t\t\t}\n\t\t},\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"sky-type\": \"atmosphere\"\n\t\t\t}\n\t\t],\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"sky-atmosphere-sun-intensity\": {\n\t\ttype: \"number\",\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"sky-type\": \"atmosphere\"\n\t\t\t}\n\t\t],\n\t\t\"default\": 10,\n\t\tminimum: 0,\n\t\tmaximum: 100,\n\t\ttransition: false,\n\t\tdoc: \"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"2.0.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"sky-gradient-center\": {\n\t\ttype: \"array\",\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"sky-type\": \"gradient\"\n\t\t\t}\n\t\t],\n\t\tvalue: \"number\",\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tlength: 2,\n\t\tunits: \"degrees\",\n\t\tminimum: [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\tmaximum: [\n\t\t\t360,\n\t\t\t180\n\t\t],\n\t\ttransition: false,\n\t\tdoc: \"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"2.0.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"sky-gradient-radius\": {\n\t\ttype: \"number\",\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"sky-type\": \"gradient\"\n\t\t\t}\n\t\t],\n\t\t\"default\": 90,\n\t\tminimum: 0,\n\t\tmaximum: 180,\n\t\ttransition: false,\n\t\tdoc: \"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"2.0.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"sky-gradient\": {\n\t\ttype: \"color\",\n\t\t\"default\": [\n\t\t\t\"interpolate\",\n\t\t\t[\n\t\t\t\t\"linear\"\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"sky-radial-progress\"\n\t\t\t],\n\t\t\t0.8,\n\t\t\t\"#87ceeb\",\n\t\t\t1,\n\t\t\t\"white\"\n\t\t],\n\t\tdoc: \"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.\",\n\t\ttransition: false,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"sky-type\": \"gradient\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"2.0.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"sky-radial-progress\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"color-ramp\"\n\t},\n\t\"sky-atmosphere-halo-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"white\",\n\t\tdoc: \"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.\",\n\t\ttransition: false,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"sky-type\": \"atmosphere\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"2.0.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"sky-atmosphere-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"white\",\n\t\tdoc: \"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.\",\n\t\ttransition: false,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"sky-type\": \"atmosphere\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"2.0.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"sky-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\tdoc: \"The opacity of the entire sky layer.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"2.0.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n};\nvar transition = {\n\tduration: {\n\t\ttype: \"number\",\n\t\t\"default\": 300,\n\t\tminimum: 0,\n\t\tunits: \"milliseconds\",\n\t\tdoc: \"Time allotted for transitions to complete.\"\n\t},\n\tdelay: {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\tunits: \"milliseconds\",\n\t\tdoc: \"Length of time before a transition begins.\"\n\t}\n};\nvar promoteId = {\n\t\"*\": {\n\t\ttype: \"string\",\n\t\tdoc: \"A name of a feature property to use as ID for feature state.\"\n\t}\n};\nvar v8 = {\n\t$version: $version,\n\t$root: $root,\n\tsources: sources,\n\tsource: source,\n\tsource_vector: source_vector,\n\tsource_raster: source_raster,\n\tsource_raster_dem: source_raster_dem,\n\tsource_geojson: source_geojson,\n\tsource_video: source_video,\n\tsource_image: source_image,\n\tlayer: layer,\n\tlayout: layout,\n\tlayout_background: layout_background,\n\tlayout_sky: layout_sky,\n\tlayout_fill: layout_fill,\n\tlayout_circle: layout_circle,\n\tlayout_heatmap: layout_heatmap,\n\t\"layout_fill-extrusion\": {\n\tvisibility: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tvisible: {\n\t\t\t\tdoc: \"The layer is shown.\"\n\t\t\t},\n\t\t\tnone: {\n\t\t\t\tdoc: \"The layer is not shown.\"\n\t\t\t}\n\t\t},\n\t\t\"default\": \"visible\",\n\t\tdoc: \"Whether this layer is displayed.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\t\"property-type\": \"constant\"\n\t}\n},\n\tlayout_line: layout_line,\n\tlayout_symbol: layout_symbol,\n\tlayout_raster: layout_raster,\n\tlayout_hillshade: layout_hillshade,\n\tfilter: filter,\n\tfilter_operator: filter_operator,\n\tgeometry_type: geometry_type,\n\t\"function\": {\n\texpression: {\n\t\ttype: \"expression\",\n\t\tdoc: \"An expression.\"\n\t},\n\tstops: {\n\t\ttype: \"array\",\n\t\tdoc: \"An array of stops.\",\n\t\tvalue: \"function_stop\"\n\t},\n\tbase: {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tdoc: \"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly.\"\n\t},\n\tproperty: {\n\t\ttype: \"string\",\n\t\tdoc: \"The name of a feature property to use as the function input.\",\n\t\t\"default\": \"$zoom\"\n\t},\n\ttype: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tidentity: {\n\t\t\t\tdoc: \"Return the input value as the output value.\"\n\t\t\t},\n\t\t\texponential: {\n\t\t\t\tdoc: \"Generate an output by interpolating between stops just less than and just greater than the function input.\"\n\t\t\t},\n\t\t\tinterval: {\n\t\t\t\tdoc: \"Return the output value of the stop just less than the function input.\"\n\t\t\t},\n\t\t\tcategorical: {\n\t\t\t\tdoc: \"Return the output value of the stop equal to the function input.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The interpolation strategy to use in function evaluation.\",\n\t\t\"default\": \"exponential\"\n\t},\n\tcolorSpace: {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\trgb: {\n\t\t\t\tdoc: \"Use the RGB color space to interpolate color values\"\n\t\t\t},\n\t\t\tlab: {\n\t\t\t\tdoc: \"Use the LAB color space to interpolate color values.\"\n\t\t\t},\n\t\t\thcl: {\n\t\t\t\tdoc: \"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.\",\n\t\t\"default\": \"rgb\"\n\t},\n\t\"default\": {\n\t\ttype: \"*\",\n\t\trequired: false,\n\t\tdoc: \"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\\n* In categorical functions, when the feature value does not match any of the stop domain values.\\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\\nIf no default is provided, the style property's default is used in these circumstances.\"\n\t}\n},\n\tfunction_stop: function_stop,\n\texpression: expression,\n\texpression_name: expression_name,\n\tfog: fog,\n\tlight: light,\n\tterrain: terrain,\n\tpaint: paint,\n\tpaint_fill: paint_fill,\n\t\"paint_fill-extrusion\": {\n\t\"fill-extrusion-opacity\": {\n\t\ttype: \"number\",\n\t\t\"default\": 1,\n\t\tminimum: 0,\n\t\tmaximum: 1,\n\t\tdoc: \"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-extrusion-color\": {\n\t\ttype: \"color\",\n\t\t\"default\": \"#000000\",\n\t\tdoc: \"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t{\n\t\t\t\t\"!\": \"fill-extrusion-pattern\"\n\t\t\t}\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-extrusion-translate\": {\n\t\ttype: \"array\",\n\t\tvalue: \"number\",\n\t\tlength: 2,\n\t\t\"default\": [\n\t\t\t0,\n\t\t\t0\n\t\t],\n\t\ttransition: true,\n\t\tunits: \"pixels\",\n\t\tdoc: \"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-extrusion-translate-anchor\": {\n\t\ttype: \"enum\",\n\t\tvalues: {\n\t\t\tmap: {\n\t\t\t\tdoc: \"The fill extrusion is translated relative to the map.\"\n\t\t\t},\n\t\t\tviewport: {\n\t\t\t\tdoc: \"The fill extrusion is translated relative to the viewport.\"\n\t\t\t}\n\t\t},\n\t\tdoc: \"Controls the frame of reference for `fill-extrusion-translate`.\",\n\t\t\"default\": \"map\",\n\t\trequires: [\n\t\t\t\"fill-extrusion-translate\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t},\n\t\"fill-extrusion-pattern\": {\n\t\ttype: \"resolvedImage\",\n\t\ttransition: true,\n\t\tdoc: \"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.\",\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.49.0\",\n\t\t\t\tandroid: \"6.5.0\",\n\t\t\t\tmacos: \"0.11.0\",\n\t\t\t\tios: \"4.4.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"cross-faded-data-driven\"\n\t},\n\t\"fill-extrusion-height\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\tunits: \"meters\",\n\t\tdoc: \"The height with which to extrude this layer.\",\n\t\ttransition: true,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-extrusion-base\": {\n\t\ttype: \"number\",\n\t\t\"default\": 0,\n\t\tminimum: 0,\n\t\tunits: \"meters\",\n\t\tdoc: \"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.\",\n\t\ttransition: true,\n\t\trequires: [\n\t\t\t\"fill-extrusion-height\"\n\t\t],\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t},\n\t\t\t\"data-driven styling\": {\n\t\t\t\tjs: \"0.27.0\",\n\t\t\t\tandroid: \"5.1.0\",\n\t\t\t\tios: \"3.6.0\",\n\t\t\t\tmacos: \"0.5.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: true,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\",\n\t\t\t\t\"feature\",\n\t\t\t\t\"feature-state\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-driven\"\n\t},\n\t\"fill-extrusion-vertical-gradient\": {\n\t\ttype: \"boolean\",\n\t\t\"default\": true,\n\t\tdoc: \"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.\",\n\t\ttransition: false,\n\t\t\"sdk-support\": {\n\t\t\t\"basic functionality\": {\n\t\t\t\tjs: \"0.50.0\",\n\t\t\t\tios: \"4.7.0\",\n\t\t\t\tmacos: \"0.13.0\"\n\t\t\t}\n\t\t},\n\t\texpression: {\n\t\t\tinterpolated: false,\n\t\t\tparameters: [\n\t\t\t\t\"zoom\"\n\t\t\t]\n\t\t},\n\t\t\"property-type\": \"data-constant\"\n\t}\n},\n\tpaint_line: paint_line,\n\tpaint_circle: paint_circle,\n\tpaint_heatmap: paint_heatmap,\n\tpaint_symbol: paint_symbol,\n\tpaint_raster: paint_raster,\n\tpaint_hillshade: paint_hillshade,\n\tpaint_background: paint_background,\n\tpaint_sky: paint_sky,\n\ttransition: transition,\n\t\"property-type\": {\n\t\"data-driven\": {\n\t\ttype: \"property-type\",\n\t\tdoc: \"Property is interpolable and can be represented using a property expression.\"\n\t},\n\t\"cross-faded\": {\n\t\ttype: \"property-type\",\n\t\tdoc: \"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms.\"\n\t},\n\t\"cross-faded-data-driven\": {\n\t\ttype: \"property-type\",\n\t\tdoc: \"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression.\"\n\t},\n\t\"color-ramp\": {\n\t\ttype: \"property-type\",\n\t\tdoc: \"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation.\"\n\t},\n\t\"data-constant\": {\n\t\ttype: \"property-type\",\n\t\tdoc: \"Property is interpolable but cannot be represented using a property expression.\"\n\t},\n\tconstant: {\n\t\ttype: \"property-type\",\n\t\tdoc: \"Property is constant across all zoom levels and property values.\"\n\t}\n},\n\tpromoteId: promoteId\n};\n\n// Note: This regex matches even invalid JSON strings, but since we’re\n// working on the output of `JSON.stringify` we know that only valid strings\n// are present (unless the user supplied a weird `options.indent` but in\n// that case we don’t care since the output would be invalid anyway).\nvar stringOrChar = /(\"(?:[^\\\\\"]|\\\\.)*\")|[:,]/g;\n\nvar jsonStringifyPrettyCompact = function stringify(passedObj, options) {\n  var indent, maxLength, replacer;\n\n  options = options || {};\n  indent = JSON.stringify(\n    [1],\n    undefined,\n    options.indent === undefined ? 2 : options.indent\n  ).slice(2, -3);\n  maxLength =\n    indent === \"\"\n      ? Infinity\n      : options.maxLength === undefined\n      ? 80\n      : options.maxLength;\n  replacer = options.replacer;\n\n  return (function _stringify(obj, currentIndent, reserved) {\n    // prettier-ignore\n    var end, index, items, key, keyPart, keys, length, nextIndent, prettified, start, string, value;\n\n    if (obj && typeof obj.toJSON === \"function\") {\n      obj = obj.toJSON();\n    }\n\n    string = JSON.stringify(obj, replacer);\n\n    if (string === undefined) {\n      return string;\n    }\n\n    length = maxLength - currentIndent.length - reserved;\n\n    if (string.length <= length) {\n      prettified = string.replace(stringOrChar, function(match, stringLiteral) {\n        return stringLiteral || match + \" \";\n      });\n      if (prettified.length <= length) {\n        return prettified;\n      }\n    }\n\n    if (replacer != null) {\n      obj = JSON.parse(string);\n      replacer = undefined;\n    }\n\n    if (typeof obj === \"object\" && obj !== null) {\n      nextIndent = currentIndent + indent;\n      items = [];\n      index = 0;\n\n      if (Array.isArray(obj)) {\n        start = \"[\";\n        end = \"]\";\n        length = obj.length;\n        for (; index < length; index++) {\n          items.push(\n            _stringify(obj[index], nextIndent, index === length - 1 ? 0 : 1) ||\n              \"null\"\n          );\n        }\n      } else {\n        start = \"{\";\n        end = \"}\";\n        keys = Object.keys(obj);\n        length = keys.length;\n        for (; index < length; index++) {\n          key = keys[index];\n          keyPart = JSON.stringify(key) + \": \";\n          value = _stringify(\n            obj[key],\n            nextIndent,\n            keyPart.length + (index === length - 1 ? 0 : 1)\n          );\n          if (value !== undefined) {\n            items.push(keyPart + value);\n          }\n        }\n      }\n\n      if (items.length > 0) {\n        return [start, indent + items.join(\",\\n\" + nextIndent), end].join(\n          \"\\n\" + currentIndent\n        );\n      }\n    }\n\n    return string;\n  })(passedObj, \"\", 0);\n};\n\nfunction sortKeysBy(obj, reference) {\n    const result = {};\n    for (const key in reference) {\n        if (obj[key] !== undefined) {\n            result[key] = obj[key];\n        }\n    }\n    for (const key in obj) {\n        if (result[key] === undefined) {\n            result[key] = obj[key];\n        }\n    }\n    return result;\n}\nfunction format(style, space = 2) {\n    style = sortKeysBy(style, v8.$root);\n    if (style.layers) {\n        style.layers = style.layers.map(layer => sortKeysBy(layer, v8.layer));\n    }\n    return jsonStringifyPrettyCompact(style, { indent: space });\n}\n\nvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction createCommonjsModule(fn) {\n  var module = { exports: {} };\n\treturn fn(module, module.exports), module.exports;\n}\n\nfunction commonjsRequire (target) {\n\tthrow new Error('Could not dynamically require \"' + target + '\". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.');\n}\n\n/*! https://mths.be/punycode v1.3.2 by @mathias */\n\nvar punycode = createCommonjsModule(function (module, exports) {\n(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t    counter = 0,\n\t\t    length = string.length,\n\t\t    value,\n\t\t    extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t//  0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * http://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t    inputLength = input.length,\n\t\t    out,\n\t\t    i = 0,\n\t\t    n = initialN,\n\t\t    bias = initialBias,\n\t\t    basic,\n\t\t    j,\n\t\t    index,\n\t\t    oldi,\n\t\t    w,\n\t\t    k,\n\t\t    digit,\n\t\t    t,\n\t\t    /** Cached calculation results */\n\t\t    baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t    delta,\n\t\t    handledCPCount,\n\t\t    basicLength,\n\t\t    bias,\n\t\t    j,\n\t\t    m,\n\t\t    q,\n\t\t    k,\n\t\t    t,\n\t\t    currentValue,\n\t\t    output = [],\n\t\t    /** `inputLength` will hold the number of code points in `input`. */\n\t\t    inputLength,\n\t\t    /** Cached calculation results */\n\t\t    handledCPCountPlusOne,\n\t\t    baseMinusT,\n\t\t    qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.3.2',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(commonjsGlobal));\n});\n\nvar util = {\n  isString: function(arg) {\n    return typeof(arg) === 'string';\n  },\n  isObject: function(arg) {\n    return typeof(arg) === 'object' && arg !== null;\n  },\n  isNull: function(arg) {\n    return arg === null;\n  },\n  isNullOrUndefined: function(arg) {\n    return arg == null;\n  }\n};\n\n// Copyright Joyent, Inc. and other Node contributors.\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n  return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar decode = function(qs, sep, eq, options) {\n  sep = sep || '&';\n  eq = eq || '=';\n  var obj = {};\n\n  if (typeof qs !== 'string' || qs.length === 0) {\n    return obj;\n  }\n\n  var regexp = /\\+/g;\n  qs = qs.split(sep);\n\n  var maxKeys = 1000;\n  if (options && typeof options.maxKeys === 'number') {\n    maxKeys = options.maxKeys;\n  }\n\n  var len = qs.length;\n  // maxKeys <= 0 means that we should not limit keys count\n  if (maxKeys > 0 && len > maxKeys) {\n    len = maxKeys;\n  }\n\n  for (var i = 0; i < len; ++i) {\n    var x = qs[i].replace(regexp, '%20'),\n        idx = x.indexOf(eq),\n        kstr, vstr, k, v;\n\n    if (idx >= 0) {\n      kstr = x.substr(0, idx);\n      vstr = x.substr(idx + 1);\n    } else {\n      kstr = x;\n      vstr = '';\n    }\n\n    k = decodeURIComponent(kstr);\n    v = decodeURIComponent(vstr);\n\n    if (!hasOwnProperty(obj, k)) {\n      obj[k] = v;\n    } else if (Array.isArray(obj[k])) {\n      obj[k].push(v);\n    } else {\n      obj[k] = [obj[k], v];\n    }\n  }\n\n  return obj;\n};\n\n// Copyright Joyent, Inc. and other Node contributors.\n\nvar stringifyPrimitive = function(v) {\n  switch (typeof v) {\n    case 'string':\n      return v;\n\n    case 'boolean':\n      return v ? 'true' : 'false';\n\n    case 'number':\n      return isFinite(v) ? v : '';\n\n    default:\n      return '';\n  }\n};\n\nvar encode = function(obj, sep, eq, name) {\n  sep = sep || '&';\n  eq = eq || '=';\n  if (obj === null) {\n    obj = undefined;\n  }\n\n  if (typeof obj === 'object') {\n    return Object.keys(obj).map(function(k) {\n      var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n      if (Array.isArray(obj[k])) {\n        return obj[k].map(function(v) {\n          return ks + encodeURIComponent(stringifyPrimitive(v));\n        }).join(sep);\n      } else {\n        return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n      }\n    }).join(sep);\n\n  }\n\n  if (!name) return '';\n  return encodeURIComponent(stringifyPrimitive(name)) + eq +\n         encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar querystring = createCommonjsModule(function (module, exports) {\n\nexports.decode = exports.parse = decode;\nexports.encode = exports.stringify = encode;\n});\n\nvar parse = urlParse;\nvar resolve = urlResolve;\nvar resolveObject = urlResolveObject;\nvar format$1 = urlFormat;\n\nvar Url_1 = Url;\n\nfunction Url() {\n  this.protocol = null;\n  this.slashes = null;\n  this.auth = null;\n  this.host = null;\n  this.port = null;\n  this.hostname = null;\n  this.hash = null;\n  this.search = null;\n  this.query = null;\n  this.pathname = null;\n  this.path = null;\n  this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n    portPattern = /:[0-9]*$/,\n\n    // Special case for a simple path URL\n    simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n    // RFC 2396: characters reserved for delimiting URLs.\n    // We actually just auto-escape these.\n    delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n    // RFC 2396: characters not allowed for various reasons.\n    unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n    // Allowed by RFCs, but cause of XSS attacks.  Always escape these.\n    autoEscape = ['\\''].concat(unwise),\n    // Characters that are never ever allowed in a hostname.\n    // Note that any invalid chars are also handled, but these\n    // are the ones that are *expected* to be seen, so we fast-path\n    // them.\n    nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n    hostEndingChars = ['/', '?', '#'],\n    hostnameMaxLen = 255,\n    hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n    hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n    // protocols that can allow \"unsafe\" and \"unwise\" chars.\n    unsafeProtocol = {\n      'javascript': true,\n      'javascript:': true\n    },\n    // protocols that never have a hostname.\n    hostlessProtocol = {\n      'javascript': true,\n      'javascript:': true\n    },\n    // protocols that always contain a // bit.\n    slashedProtocol = {\n      'http': true,\n      'https': true,\n      'ftp': true,\n      'gopher': true,\n      'file': true,\n      'http:': true,\n      'https:': true,\n      'ftp:': true,\n      'gopher:': true,\n      'file:': true\n    };\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n  if (url && util.isObject(url) && url instanceof Url) return url;\n\n  var u = new Url;\n  u.parse(url, parseQueryString, slashesDenoteHost);\n  return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n  if (!util.isString(url)) {\n    throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n  }\n\n  // Copy chrome, IE, opera backslash-handling behavior.\n  // Back slashes before the query string get converted to forward slashes\n  // See: https://code.google.com/p/chromium/issues/detail?id=25916\n  var queryIndex = url.indexOf('?'),\n      splitter =\n          (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n      uSplit = url.split(splitter),\n      slashRegex = /\\\\/g;\n  uSplit[0] = uSplit[0].replace(slashRegex, '/');\n  url = uSplit.join(splitter);\n\n  var rest = url;\n\n  // trim before proceeding.\n  // This is to support parse stuff like \"  http://foo.com  \\n\"\n  rest = rest.trim();\n\n  if (!slashesDenoteHost && url.split('#').length === 1) {\n    // Try fast path regexp\n    var simplePath = simplePathPattern.exec(rest);\n    if (simplePath) {\n      this.path = rest;\n      this.href = rest;\n      this.pathname = simplePath[1];\n      if (simplePath[2]) {\n        this.search = simplePath[2];\n        if (parseQueryString) {\n          this.query = querystring.parse(this.search.substr(1));\n        } else {\n          this.query = this.search.substr(1);\n        }\n      } else if (parseQueryString) {\n        this.search = '';\n        this.query = {};\n      }\n      return this;\n    }\n  }\n\n  var proto = protocolPattern.exec(rest);\n  if (proto) {\n    proto = proto[0];\n    var lowerProto = proto.toLowerCase();\n    this.protocol = lowerProto;\n    rest = rest.substr(proto.length);\n  }\n\n  // figure out if it's got a host\n  // user@server is *always* interpreted as a hostname, and url\n  // resolution will treat //foo/bar as host=foo,path=bar because that's\n  // how the browser resolves relative URLs.\n  if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n    var slashes = rest.substr(0, 2) === '//';\n    if (slashes && !(proto && hostlessProtocol[proto])) {\n      rest = rest.substr(2);\n      this.slashes = true;\n    }\n  }\n\n  if (!hostlessProtocol[proto] &&\n      (slashes || (proto && !slashedProtocol[proto]))) {\n\n    // there's a hostname.\n    // the first instance of /, ?, ;, or # ends the host.\n    //\n    // If there is an @ in the hostname, then non-host chars *are* allowed\n    // to the left of the last @ sign, unless some host-ending character\n    // comes *before* the @-sign.\n    // URLs are obnoxious.\n    //\n    // ex:\n    // http://a@b@c/ => user:a@b host:c\n    // http://a@b?@c => user:a host:c path:/?@c\n\n    // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n    // Review our test case against browsers more comprehensively.\n\n    // find the first instance of any hostEndingChars\n    var hostEnd = -1;\n    for (var i = 0; i < hostEndingChars.length; i++) {\n      var hec = rest.indexOf(hostEndingChars[i]);\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n        hostEnd = hec;\n    }\n\n    // at this point, either we have an explicit point where the\n    // auth portion cannot go past, or the last @ char is the decider.\n    var auth, atSign;\n    if (hostEnd === -1) {\n      // atSign can be anywhere.\n      atSign = rest.lastIndexOf('@');\n    } else {\n      // atSign must be in auth portion.\n      // http://a@b/c@d => host:b auth:a path:/c@d\n      atSign = rest.lastIndexOf('@', hostEnd);\n    }\n\n    // Now we have a portion which is definitely the auth.\n    // Pull that off.\n    if (atSign !== -1) {\n      auth = rest.slice(0, atSign);\n      rest = rest.slice(atSign + 1);\n      this.auth = decodeURIComponent(auth);\n    }\n\n    // the host is the remaining to the left of the first non-host char\n    hostEnd = -1;\n    for (var i = 0; i < nonHostChars.length; i++) {\n      var hec = rest.indexOf(nonHostChars[i]);\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n        hostEnd = hec;\n    }\n    // if we still have not hit it, then the entire thing is a host.\n    if (hostEnd === -1)\n      hostEnd = rest.length;\n\n    this.host = rest.slice(0, hostEnd);\n    rest = rest.slice(hostEnd);\n\n    // pull out port.\n    this.parseHost();\n\n    // we've indicated that there is a hostname,\n    // so even if it's empty, it has to be present.\n    this.hostname = this.hostname || '';\n\n    // if hostname begins with [ and ends with ]\n    // assume that it's an IPv6 address.\n    var ipv6Hostname = this.hostname[0] === '[' &&\n        this.hostname[this.hostname.length - 1] === ']';\n\n    // validate a little.\n    if (!ipv6Hostname) {\n      var hostparts = this.hostname.split(/\\./);\n      for (var i = 0, l = hostparts.length; i < l; i++) {\n        var part = hostparts[i];\n        if (!part) continue;\n        if (!part.match(hostnamePartPattern)) {\n          var newpart = '';\n          for (var j = 0, k = part.length; j < k; j++) {\n            if (part.charCodeAt(j) > 127) {\n              // we replace non-ASCII char with a temporary placeholder\n              // we need this to make sure size of hostname is not\n              // broken by replacing non-ASCII by nothing\n              newpart += 'x';\n            } else {\n              newpart += part[j];\n            }\n          }\n          // we test again with ASCII char only\n          if (!newpart.match(hostnamePartPattern)) {\n            var validParts = hostparts.slice(0, i);\n            var notHost = hostparts.slice(i + 1);\n            var bit = part.match(hostnamePartStart);\n            if (bit) {\n              validParts.push(bit[1]);\n              notHost.unshift(bit[2]);\n            }\n            if (notHost.length) {\n              rest = '/' + notHost.join('.') + rest;\n            }\n            this.hostname = validParts.join('.');\n            break;\n          }\n        }\n      }\n    }\n\n    if (this.hostname.length > hostnameMaxLen) {\n      this.hostname = '';\n    } else {\n      // hostnames are always lower case.\n      this.hostname = this.hostname.toLowerCase();\n    }\n\n    if (!ipv6Hostname) {\n      // IDNA Support: Returns a punycoded representation of \"domain\".\n      // It only converts parts of the domain name that\n      // have non-ASCII characters, i.e. it doesn't matter if\n      // you call it with a domain that already is ASCII-only.\n      this.hostname = punycode.toASCII(this.hostname);\n    }\n\n    var p = this.port ? ':' + this.port : '';\n    var h = this.hostname || '';\n    this.host = h + p;\n    this.href += this.host;\n\n    // strip [ and ] from the hostname\n    // the host field still retains them, though\n    if (ipv6Hostname) {\n      this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n      if (rest[0] !== '/') {\n        rest = '/' + rest;\n      }\n    }\n  }\n\n  // now rest is set to the post-host stuff.\n  // chop off any delim chars.\n  if (!unsafeProtocol[lowerProto]) {\n\n    // First, make 100% sure that any \"autoEscape\" chars get\n    // escaped, even if encodeURIComponent doesn't think they\n    // need to be.\n    for (var i = 0, l = autoEscape.length; i < l; i++) {\n      var ae = autoEscape[i];\n      if (rest.indexOf(ae) === -1)\n        continue;\n      var esc = encodeURIComponent(ae);\n      if (esc === ae) {\n        esc = escape(ae);\n      }\n      rest = rest.split(ae).join(esc);\n    }\n  }\n\n\n  // chop off from the tail first.\n  var hash = rest.indexOf('#');\n  if (hash !== -1) {\n    // got a fragment string.\n    this.hash = rest.substr(hash);\n    rest = rest.slice(0, hash);\n  }\n  var qm = rest.indexOf('?');\n  if (qm !== -1) {\n    this.search = rest.substr(qm);\n    this.query = rest.substr(qm + 1);\n    if (parseQueryString) {\n      this.query = querystring.parse(this.query);\n    }\n    rest = rest.slice(0, qm);\n  } else if (parseQueryString) {\n    // no query string, but parseQueryString still requested\n    this.search = '';\n    this.query = {};\n  }\n  if (rest) this.pathname = rest;\n  if (slashedProtocol[lowerProto] &&\n      this.hostname && !this.pathname) {\n    this.pathname = '/';\n  }\n\n  //to support http.request\n  if (this.pathname || this.search) {\n    var p = this.pathname || '';\n    var s = this.search || '';\n    this.path = p + s;\n  }\n\n  // finally, reconstruct the href based on what has been validated.\n  this.href = this.format();\n  return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n  // ensure it's an object, and not a string url.\n  // If it's an obj, this is a no-op.\n  // this way, you can call url_format() on strings\n  // to clean up potentially wonky urls.\n  if (util.isString(obj)) obj = urlParse(obj);\n  if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n  return obj.format();\n}\n\nUrl.prototype.format = function() {\n  var auth = this.auth || '';\n  if (auth) {\n    auth = encodeURIComponent(auth);\n    auth = auth.replace(/%3A/i, ':');\n    auth += '@';\n  }\n\n  var protocol = this.protocol || '',\n      pathname = this.pathname || '',\n      hash = this.hash || '',\n      host = false,\n      query = '';\n\n  if (this.host) {\n    host = auth + this.host;\n  } else if (this.hostname) {\n    host = auth + (this.hostname.indexOf(':') === -1 ?\n        this.hostname :\n        '[' + this.hostname + ']');\n    if (this.port) {\n      host += ':' + this.port;\n    }\n  }\n\n  if (this.query &&\n      util.isObject(this.query) &&\n      Object.keys(this.query).length) {\n    query = querystring.stringify(this.query);\n  }\n\n  var search = this.search || (query && ('?' + query)) || '';\n\n  if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n  // only the slashedProtocols get the //.  Not mailto:, xmpp:, etc.\n  // unless they had them to begin with.\n  if (this.slashes ||\n      (!protocol || slashedProtocol[protocol]) && host !== false) {\n    host = '//' + (host || '');\n    if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n  } else if (!host) {\n    host = '';\n  }\n\n  if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n  if (search && search.charAt(0) !== '?') search = '?' + search;\n\n  pathname = pathname.replace(/[?#]/g, function(match) {\n    return encodeURIComponent(match);\n  });\n  search = search.replace('#', '%23');\n\n  return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n  return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n  return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n  if (!source) return relative;\n  return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n  if (util.isString(relative)) {\n    var rel = new Url();\n    rel.parse(relative, false, true);\n    relative = rel;\n  }\n\n  var result = new Url();\n  var tkeys = Object.keys(this);\n  for (var tk = 0; tk < tkeys.length; tk++) {\n    var tkey = tkeys[tk];\n    result[tkey] = this[tkey];\n  }\n\n  // hash is always overridden, no matter what.\n  // even href=\"\" will remove it.\n  result.hash = relative.hash;\n\n  // if the relative url is empty, then there's nothing left to do here.\n  if (relative.href === '') {\n    result.href = result.format();\n    return result;\n  }\n\n  // hrefs like //foo/bar always cut to the protocol.\n  if (relative.slashes && !relative.protocol) {\n    // take everything except the protocol from relative\n    var rkeys = Object.keys(relative);\n    for (var rk = 0; rk < rkeys.length; rk++) {\n      var rkey = rkeys[rk];\n      if (rkey !== 'protocol')\n        result[rkey] = relative[rkey];\n    }\n\n    //urlParse appends trailing / to urls like http://www.example.com\n    if (slashedProtocol[result.protocol] &&\n        result.hostname && !result.pathname) {\n      result.path = result.pathname = '/';\n    }\n\n    result.href = result.format();\n    return result;\n  }\n\n  if (relative.protocol && relative.protocol !== result.protocol) {\n    // if it's a known url protocol, then changing\n    // the protocol does weird things\n    // first, if it's not file:, then we MUST have a host,\n    // and if there was a path\n    // to begin with, then we MUST have a path.\n    // if it is file:, then the host is dropped,\n    // because that's known to be hostless.\n    // anything else is assumed to be absolute.\n    if (!slashedProtocol[relative.protocol]) {\n      var keys = Object.keys(relative);\n      for (var v = 0; v < keys.length; v++) {\n        var k = keys[v];\n        result[k] = relative[k];\n      }\n      result.href = result.format();\n      return result;\n    }\n\n    result.protocol = relative.protocol;\n    if (!relative.host && !hostlessProtocol[relative.protocol]) {\n      var relPath = (relative.pathname || '').split('/');\n      while (relPath.length && !(relative.host = relPath.shift()));\n      if (!relative.host) relative.host = '';\n      if (!relative.hostname) relative.hostname = '';\n      if (relPath[0] !== '') relPath.unshift('');\n      if (relPath.length < 2) relPath.unshift('');\n      result.pathname = relPath.join('/');\n    } else {\n      result.pathname = relative.pathname;\n    }\n    result.search = relative.search;\n    result.query = relative.query;\n    result.host = relative.host || '';\n    result.auth = relative.auth;\n    result.hostname = relative.hostname || relative.host;\n    result.port = relative.port;\n    // to support http.request\n    if (result.pathname || result.search) {\n      var p = result.pathname || '';\n      var s = result.search || '';\n      result.path = p + s;\n    }\n    result.slashes = result.slashes || relative.slashes;\n    result.href = result.format();\n    return result;\n  }\n\n  var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n      isRelAbs = (\n          relative.host ||\n          relative.pathname && relative.pathname.charAt(0) === '/'\n      ),\n      mustEndAbs = (isRelAbs || isSourceAbs ||\n                    (result.host && relative.pathname)),\n      removeAllDots = mustEndAbs,\n      srcPath = result.pathname && result.pathname.split('/') || [],\n      relPath = relative.pathname && relative.pathname.split('/') || [],\n      psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n  // if the url is a non-slashed url, then relative\n  // links like ../.. should be able\n  // to crawl up to the hostname, as well.  This is strange.\n  // result.protocol has already been set by now.\n  // Later on, put the first path part into the host field.\n  if (psychotic) {\n    result.hostname = '';\n    result.port = null;\n    if (result.host) {\n      if (srcPath[0] === '') srcPath[0] = result.host;\n      else srcPath.unshift(result.host);\n    }\n    result.host = '';\n    if (relative.protocol) {\n      relative.hostname = null;\n      relative.port = null;\n      if (relative.host) {\n        if (relPath[0] === '') relPath[0] = relative.host;\n        else relPath.unshift(relative.host);\n      }\n      relative.host = null;\n    }\n    mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n  }\n\n  if (isRelAbs) {\n    // it's absolute.\n    result.host = (relative.host || relative.host === '') ?\n                  relative.host : result.host;\n    result.hostname = (relative.hostname || relative.hostname === '') ?\n                      relative.hostname : result.hostname;\n    result.search = relative.search;\n    result.query = relative.query;\n    srcPath = relPath;\n    // fall through to the dot-handling below.\n  } else if (relPath.length) {\n    // it's relative\n    // throw away the existing file, and take the new path instead.\n    if (!srcPath) srcPath = [];\n    srcPath.pop();\n    srcPath = srcPath.concat(relPath);\n    result.search = relative.search;\n    result.query = relative.query;\n  } else if (!util.isNullOrUndefined(relative.search)) {\n    // just pull out the search.\n    // like href='?foo'.\n    // Put this after the other two cases because it simplifies the booleans\n    if (psychotic) {\n      result.hostname = result.host = srcPath.shift();\n      //occationaly the auth can get stuck only in host\n      //this especially happens in cases like\n      //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n      var authInHost = result.host && result.host.indexOf('@') > 0 ?\n                       result.host.split('@') : false;\n      if (authInHost) {\n        result.auth = authInHost.shift();\n        result.host = result.hostname = authInHost.shift();\n      }\n    }\n    result.search = relative.search;\n    result.query = relative.query;\n    //to support http.request\n    if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n      result.path = (result.pathname ? result.pathname : '') +\n                    (result.search ? result.search : '');\n    }\n    result.href = result.format();\n    return result;\n  }\n\n  if (!srcPath.length) {\n    // no path at all.  easy.\n    // we've already handled the other stuff above.\n    result.pathname = null;\n    //to support http.request\n    if (result.search) {\n      result.path = '/' + result.search;\n    } else {\n      result.path = null;\n    }\n    result.href = result.format();\n    return result;\n  }\n\n  // if a url ENDs in . or .., then it must get a trailing slash.\n  // however, if it ends in anything else non-slashy,\n  // then it must NOT get a trailing slash.\n  var last = srcPath.slice(-1)[0];\n  var hasTrailingSlash = (\n      (result.host || relative.host || srcPath.length > 1) &&\n      (last === '.' || last === '..') || last === '');\n\n  // strip single dots, resolve double dots to parent dir\n  // if the path tries to go above the root, `up` ends up > 0\n  var up = 0;\n  for (var i = srcPath.length; i >= 0; i--) {\n    last = srcPath[i];\n    if (last === '.') {\n      srcPath.splice(i, 1);\n    } else if (last === '..') {\n      srcPath.splice(i, 1);\n      up++;\n    } else if (up) {\n      srcPath.splice(i, 1);\n      up--;\n    }\n  }\n\n  // if the path is allowed to go above the root, restore leading ..s\n  if (!mustEndAbs && !removeAllDots) {\n    for (; up--; up) {\n      srcPath.unshift('..');\n    }\n  }\n\n  if (mustEndAbs && srcPath[0] !== '' &&\n      (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n    srcPath.unshift('');\n  }\n\n  if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n    srcPath.push('');\n  }\n\n  var isAbsolute = srcPath[0] === '' ||\n      (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n  // put the host back\n  if (psychotic) {\n    result.hostname = result.host = isAbsolute ? '' :\n                                    srcPath.length ? srcPath.shift() : '';\n    //occationaly the auth can get stuck only in host\n    //this especially happens in cases like\n    //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n    var authInHost = result.host && result.host.indexOf('@') > 0 ?\n                     result.host.split('@') : false;\n    if (authInHost) {\n      result.auth = authInHost.shift();\n      result.host = result.hostname = authInHost.shift();\n    }\n  }\n\n  mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n  if (mustEndAbs && !isAbsolute) {\n    srcPath.unshift('');\n  }\n\n  if (!srcPath.length) {\n    result.pathname = null;\n    result.path = null;\n  } else {\n    result.pathname = srcPath.join('/');\n  }\n\n  //to support request.http\n  if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n    result.path = (result.pathname ? result.pathname : '') +\n                  (result.search ? result.search : '');\n  }\n  result.auth = relative.auth || result.auth;\n  result.slashes = result.slashes || relative.slashes;\n  result.href = result.format();\n  return result;\n};\n\nUrl.prototype.parseHost = function() {\n  var host = this.host;\n  var port = portPattern.exec(host);\n  if (port) {\n    port = port[0];\n    if (port !== ':') {\n      this.port = port.substr(1);\n    }\n    host = host.substr(0, host.length - port.length);\n  }\n  if (host) this.hostname = host;\n};\n\nvar url = {\n\tparse: parse,\n\tresolve: resolve,\n\tresolveObject: resolveObject,\n\tformat: format$1,\n\tUrl: Url_1\n};\n\nfunction getPropertyReference(propertyName) {\n    for (let i = 0; i < v8.layout.length; i++) {\n        for (const key in v8[v8.layout[i]]) {\n            if (key === propertyName)\n                return v8[v8.layout[i]][key];\n        }\n    }\n    for (let i = 0; i < v8.paint.length; i++) {\n        for (const key in v8[v8.paint[i]]) {\n            if (key === propertyName)\n                return v8[v8.paint[i]][key];\n        }\n    }\n    return null;\n}\nfunction eachSource(style, callback) {\n    for (const k in style.sources) {\n        callback(style.sources[k]);\n    }\n}\nfunction eachLayer(style, callback) {\n    for (const layer of style.layers) {\n        callback(layer);\n    }\n}\nfunction eachProperty(style, options, callback) {\n    function inner(layer, propertyType) {\n        const properties = layer[propertyType];\n        if (!properties)\n            return;\n        Object.keys(properties).forEach(key => {\n            callback({\n                path: [\n                    layer.id,\n                    propertyType,\n                    key\n                ],\n                key,\n                value: properties[key],\n                reference: getPropertyReference(key),\n                set(x) {\n                    properties[key] = x;\n                }\n            });\n        });\n    }\n    eachLayer(style, layer => {\n        if (options.paint) {\n            inner(layer, 'paint');\n        }\n        if (options.layout) {\n            inner(layer, 'layout');\n        }\n    });\n}\n\nfunction eachLayout(layer, callback) {\n    for (const k in layer) {\n        if (k.indexOf('layout') === 0) {\n            callback(layer[k], k);\n        }\n    }\n}\nfunction eachPaint(layer, callback) {\n    for (const k in layer) {\n        if (k.indexOf('paint') === 0) {\n            callback(layer[k], k);\n        }\n    }\n}\nfunction resolveConstant(style, value) {\n    if (typeof value === 'string' && value[0] === '@') {\n        return resolveConstant(style, style.constants[value]);\n    } else {\n        return value;\n    }\n}\nfunction isFunction(value) {\n    return Array.isArray(value.stops);\n}\nfunction renameProperty(obj, from, to) {\n    obj[to] = obj[from];\n    delete obj[from];\n}\nfunction migrateToV8 (style) {\n    style.version = 8;\n    eachSource(style, source => {\n        if (source.type === 'video' && source.url !== undefined) {\n            renameProperty(source, 'url', 'urls');\n        }\n        if (source.type === 'video') {\n            source.coordinates.forEach(coord => {\n                return coord.reverse();\n            });\n        }\n    });\n    eachLayer(style, layer => {\n        eachLayout(layer, layout => {\n            if (layout['symbol-min-distance'] !== undefined) {\n                renameProperty(layout, 'symbol-min-distance', 'symbol-spacing');\n            }\n        });\n        eachPaint(layer, paint => {\n            if (paint['background-image'] !== undefined) {\n                renameProperty(paint, 'background-image', 'background-pattern');\n            }\n            if (paint['line-image'] !== undefined) {\n                renameProperty(paint, 'line-image', 'line-pattern');\n            }\n            if (paint['fill-image'] !== undefined) {\n                renameProperty(paint, 'fill-image', 'fill-pattern');\n            }\n        });\n    });\n    eachProperty(style, {\n        paint: true,\n        layout: true\n    }, property => {\n        const value = resolveConstant(style, property.value);\n        if (isFunction(value)) {\n            value.stops.forEach(stop => {\n                stop[1] = resolveConstant(style, stop[1]);\n            });\n        }\n        property.set(value);\n    });\n    delete style.constants;\n    eachLayer(style, layer => {\n        eachLayout(layer, layout => {\n            delete layout['text-max-size'];\n            delete layout['icon-max-size'];\n        });\n        eachPaint(layer, paint => {\n            if (paint['text-size']) {\n                if (!layer.layout)\n                    layer.layout = {};\n                layer.layout['text-size'] = paint['text-size'];\n                delete paint['text-size'];\n            }\n            if (paint['icon-size']) {\n                if (!layer.layout)\n                    layer.layout = {};\n                layer.layout['icon-size'] = paint['icon-size'];\n                delete paint['icon-size'];\n            }\n        });\n    });\n    function migrateFontstackURL(input) {\n        const inputParsed = url.parse(input);\n        const inputPathnameParts = inputParsed.pathname.split('/');\n        if (inputParsed.protocol !== 'mapbox:') {\n            return input;\n        } else if (inputParsed.hostname === 'fontstack') {\n            return 'mapbox://fonts/mapbox/{fontstack}/{range}.pbf';\n        } else if (inputParsed.hostname === 'fonts') {\n            return `mapbox://fonts/${ inputPathnameParts[2] }/{fontstack}/{range}.pbf`;\n        } else ;\n    }\n    if (style.glyphs) {\n        style.glyphs = migrateFontstackURL(style.glyphs);\n    }\n    function migrateFontStack(font) {\n        function splitAndTrim(string) {\n            return string.split(',').map(s => {\n                return s.trim();\n            });\n        }\n        if (Array.isArray(font)) {\n            return font;\n        } else if (typeof font === 'string') {\n            return splitAndTrim(font);\n        } else if (typeof font === 'object') {\n            font.stops.forEach(stop => {\n                stop[1] = splitAndTrim(stop[1]);\n            });\n            return font;\n        } else {\n            throw new Error('unexpected font value');\n        }\n    }\n    eachLayer(style, layer => {\n        eachLayout(layer, layout => {\n            if (layout['text-font']) {\n                layout['text-font'] = migrateFontStack(layout['text-font']);\n            }\n        });\n    });\n    let firstSymbolLayer = 0;\n    for (let i = style.layers.length - 1; i >= 0; i--) {\n        const layer = style.layers[i];\n        if (layer.type !== 'symbol') {\n            firstSymbolLayer = i + 1;\n            break;\n        }\n    }\n    const symbolLayers = style.layers.splice(firstSymbolLayer);\n    symbolLayers.reverse();\n    style.layers = style.layers.concat(symbolLayers);\n    return style;\n}\n\nfunction extend (output, ...inputs) {\n    for (const input of inputs) {\n        for (const k in input) {\n            output[k] = input[k];\n        }\n    }\n    return output;\n}\n\nclass ParsingError extends Error {\n    constructor(key, message) {\n        super(message);\n        this.message = message;\n        this.key = key;\n    }\n}\n\nclass Scope {\n    constructor(parent, bindings = []) {\n        this.parent = parent;\n        this.bindings = {};\n        for (const [name, expression] of bindings) {\n            this.bindings[name] = expression;\n        }\n    }\n    concat(bindings) {\n        return new Scope(this, bindings);\n    }\n    get(name) {\n        if (this.bindings[name]) {\n            return this.bindings[name];\n        }\n        if (this.parent) {\n            return this.parent.get(name);\n        }\n        throw new Error(`${ name } not found in scope.`);\n    }\n    has(name) {\n        if (this.bindings[name])\n            return true;\n        return this.parent ? this.parent.has(name) : false;\n    }\n}\n\nconst NullType = { kind: 'null' };\nconst NumberType = { kind: 'number' };\nconst StringType = { kind: 'string' };\nconst BooleanType = { kind: 'boolean' };\nconst ColorType = { kind: 'color' };\nconst ObjectType = { kind: 'object' };\nconst ValueType = { kind: 'value' };\nconst ErrorType = { kind: 'error' };\nconst CollatorType = { kind: 'collator' };\nconst FormattedType = { kind: 'formatted' };\nconst ResolvedImageType = { kind: 'resolvedImage' };\nfunction array(itemType, N) {\n    return {\n        kind: 'array',\n        itemType,\n        N\n    };\n}\nfunction toString(type) {\n    if (type.kind === 'array') {\n        const itemType = toString(type.itemType);\n        return typeof type.N === 'number' ? `array<${ itemType }, ${ type.N }>` : type.itemType.kind === 'value' ? 'array' : `array<${ itemType }>`;\n    } else {\n        return type.kind;\n    }\n}\nconst valueMemberTypes = [\n    NullType,\n    NumberType,\n    StringType,\n    BooleanType,\n    ColorType,\n    FormattedType,\n    ObjectType,\n    array(ValueType),\n    ResolvedImageType\n];\nfunction checkSubtype(expected, t) {\n    if (t.kind === 'error') {\n        return null;\n    } else if (expected.kind === 'array') {\n        if (t.kind === 'array' && (t.N === 0 && t.itemType.kind === 'value' || !checkSubtype(expected.itemType, t.itemType)) && (typeof expected.N !== 'number' || expected.N === t.N)) {\n            return null;\n        }\n    } else if (expected.kind === t.kind) {\n        return null;\n    } else if (expected.kind === 'value') {\n        for (const memberType of valueMemberTypes) {\n            if (!checkSubtype(memberType, t)) {\n                return null;\n            }\n        }\n    }\n    return `Expected ${ toString(expected) } but found ${ toString(t) } instead.`;\n}\nfunction isValidType(provided, allowedTypes) {\n    return allowedTypes.some(t => t.kind === provided.kind);\n}\nfunction isValidNativeType(provided, allowedTypes) {\n    return allowedTypes.some(t => {\n        if (t === 'null') {\n            return provided === null;\n        } else if (t === 'array') {\n            return Array.isArray(provided);\n        } else if (t === 'object') {\n            return provided && !Array.isArray(provided) && typeof provided === 'object';\n        } else {\n            return t === typeof provided;\n        }\n    });\n}\n\nvar csscolorparser = createCommonjsModule(function (module, exports) {\n// (c) Dean McNamee <dean@gmail.com>, 2012.\n//\n// https://github.com/deanm/css-color-parser-js\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n// IN THE SOFTWARE.\n\n// http://www.w3.org/TR/css3-color/\nvar kCSSColorTable = {\n  \"transparent\": [0,0,0,0], \"aliceblue\": [240,248,255,1],\n  \"antiquewhite\": [250,235,215,1], \"aqua\": [0,255,255,1],\n  \"aquamarine\": [127,255,212,1], \"azure\": [240,255,255,1],\n  \"beige\": [245,245,220,1], \"bisque\": [255,228,196,1],\n  \"black\": [0,0,0,1], \"blanchedalmond\": [255,235,205,1],\n  \"blue\": [0,0,255,1], \"blueviolet\": [138,43,226,1],\n  \"brown\": [165,42,42,1], \"burlywood\": [222,184,135,1],\n  \"cadetblue\": [95,158,160,1], \"chartreuse\": [127,255,0,1],\n  \"chocolate\": [210,105,30,1], \"coral\": [255,127,80,1],\n  \"cornflowerblue\": [100,149,237,1], \"cornsilk\": [255,248,220,1],\n  \"crimson\": [220,20,60,1], \"cyan\": [0,255,255,1],\n  \"darkblue\": [0,0,139,1], \"darkcyan\": [0,139,139,1],\n  \"darkgoldenrod\": [184,134,11,1], \"darkgray\": [169,169,169,1],\n  \"darkgreen\": [0,100,0,1], \"darkgrey\": [169,169,169,1],\n  \"darkkhaki\": [189,183,107,1], \"darkmagenta\": [139,0,139,1],\n  \"darkolivegreen\": [85,107,47,1], \"darkorange\": [255,140,0,1],\n  \"darkorchid\": [153,50,204,1], \"darkred\": [139,0,0,1],\n  \"darksalmon\": [233,150,122,1], \"darkseagreen\": [143,188,143,1],\n  \"darkslateblue\": [72,61,139,1], \"darkslategray\": [47,79,79,1],\n  \"darkslategrey\": [47,79,79,1], \"darkturquoise\": [0,206,209,1],\n  \"darkviolet\": [148,0,211,1], \"deeppink\": [255,20,147,1],\n  \"deepskyblue\": [0,191,255,1], \"dimgray\": [105,105,105,1],\n  \"dimgrey\": [105,105,105,1], \"dodgerblue\": [30,144,255,1],\n  \"firebrick\": [178,34,34,1], \"floralwhite\": [255,250,240,1],\n  \"forestgreen\": [34,139,34,1], \"fuchsia\": [255,0,255,1],\n  \"gainsboro\": [220,220,220,1], \"ghostwhite\": [248,248,255,1],\n  \"gold\": [255,215,0,1], \"goldenrod\": [218,165,32,1],\n  \"gray\": [128,128,128,1], \"green\": [0,128,0,1],\n  \"greenyellow\": [173,255,47,1], \"grey\": [128,128,128,1],\n  \"honeydew\": [240,255,240,1], \"hotpink\": [255,105,180,1],\n  \"indianred\": [205,92,92,1], \"indigo\": [75,0,130,1],\n  \"ivory\": [255,255,240,1], \"khaki\": [240,230,140,1],\n  \"lavender\": [230,230,250,1], \"lavenderblush\": [255,240,245,1],\n  \"lawngreen\": [124,252,0,1], \"lemonchiffon\": [255,250,205,1],\n  \"lightblue\": [173,216,230,1], \"lightcoral\": [240,128,128,1],\n  \"lightcyan\": [224,255,255,1], \"lightgoldenrodyellow\": [250,250,210,1],\n  \"lightgray\": [211,211,211,1], \"lightgreen\": [144,238,144,1],\n  \"lightgrey\": [211,211,211,1], \"lightpink\": [255,182,193,1],\n  \"lightsalmon\": [255,160,122,1], \"lightseagreen\": [32,178,170,1],\n  \"lightskyblue\": [135,206,250,1], \"lightslategray\": [119,136,153,1],\n  \"lightslategrey\": [119,136,153,1], \"lightsteelblue\": [176,196,222,1],\n  \"lightyellow\": [255,255,224,1], \"lime\": [0,255,0,1],\n  \"limegreen\": [50,205,50,1], \"linen\": [250,240,230,1],\n  \"magenta\": [255,0,255,1], \"maroon\": [128,0,0,1],\n  \"mediumaquamarine\": [102,205,170,1], \"mediumblue\": [0,0,205,1],\n  \"mediumorchid\": [186,85,211,1], \"mediumpurple\": [147,112,219,1],\n  \"mediumseagreen\": [60,179,113,1], \"mediumslateblue\": [123,104,238,1],\n  \"mediumspringgreen\": [0,250,154,1], \"mediumturquoise\": [72,209,204,1],\n  \"mediumvioletred\": [199,21,133,1], \"midnightblue\": [25,25,112,1],\n  \"mintcream\": [245,255,250,1], \"mistyrose\": [255,228,225,1],\n  \"moccasin\": [255,228,181,1], \"navajowhite\": [255,222,173,1],\n  \"navy\": [0,0,128,1], \"oldlace\": [253,245,230,1],\n  \"olive\": [128,128,0,1], \"olivedrab\": [107,142,35,1],\n  \"orange\": [255,165,0,1], \"orangered\": [255,69,0,1],\n  \"orchid\": [218,112,214,1], \"palegoldenrod\": [238,232,170,1],\n  \"palegreen\": [152,251,152,1], \"paleturquoise\": [175,238,238,1],\n  \"palevioletred\": [219,112,147,1], \"papayawhip\": [255,239,213,1],\n  \"peachpuff\": [255,218,185,1], \"peru\": [205,133,63,1],\n  \"pink\": [255,192,203,1], \"plum\": [221,160,221,1],\n  \"powderblue\": [176,224,230,1], \"purple\": [128,0,128,1],\n  \"rebeccapurple\": [102,51,153,1],\n  \"red\": [255,0,0,1], \"rosybrown\": [188,143,143,1],\n  \"royalblue\": [65,105,225,1], \"saddlebrown\": [139,69,19,1],\n  \"salmon\": [250,128,114,1], \"sandybrown\": [244,164,96,1],\n  \"seagreen\": [46,139,87,1], \"seashell\": [255,245,238,1],\n  \"sienna\": [160,82,45,1], \"silver\": [192,192,192,1],\n  \"skyblue\": [135,206,235,1], \"slateblue\": [106,90,205,1],\n  \"slategray\": [112,128,144,1], \"slategrey\": [112,128,144,1],\n  \"snow\": [255,250,250,1], \"springgreen\": [0,255,127,1],\n  \"steelblue\": [70,130,180,1], \"tan\": [210,180,140,1],\n  \"teal\": [0,128,128,1], \"thistle\": [216,191,216,1],\n  \"tomato\": [255,99,71,1], \"turquoise\": [64,224,208,1],\n  \"violet\": [238,130,238,1], \"wheat\": [245,222,179,1],\n  \"white\": [255,255,255,1], \"whitesmoke\": [245,245,245,1],\n  \"yellow\": [255,255,0,1], \"yellowgreen\": [154,205,50,1]};\n\nfunction clamp_css_byte(i) {  // Clamp to integer 0 .. 255.\n  i = Math.round(i);  // Seems to be what Chrome does (vs truncation).\n  return i < 0 ? 0 : i > 255 ? 255 : i;\n}\n\nfunction clamp_css_float(f) {  // Clamp to float 0.0 .. 1.0.\n  return f < 0 ? 0 : f > 1 ? 1 : f;\n}\n\nfunction parse_css_int(str) {  // int or percentage.\n  if (str[str.length - 1] === '%')\n    return clamp_css_byte(parseFloat(str) / 100 * 255);\n  return clamp_css_byte(parseInt(str));\n}\n\nfunction parse_css_float(str) {  // float or percentage.\n  if (str[str.length - 1] === '%')\n    return clamp_css_float(parseFloat(str) / 100);\n  return clamp_css_float(parseFloat(str));\n}\n\nfunction css_hue_to_rgb(m1, m2, h) {\n  if (h < 0) h += 1;\n  else if (h > 1) h -= 1;\n\n  if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;\n  if (h * 2 < 1) return m2;\n  if (h * 3 < 2) return m1 + (m2 - m1) * (2/3 - h) * 6;\n  return m1;\n}\n\nfunction parseCSSColor(css_str) {\n  // Remove all whitespace, not compliant, but should just be more accepting.\n  var str = css_str.replace(/ /g, '').toLowerCase();\n\n  // Color keywords (and transparent) lookup.\n  if (str in kCSSColorTable) return kCSSColorTable[str].slice();  // dup.\n\n  // #abc and #abc123 syntax.\n  if (str[0] === '#') {\n    if (str.length === 4) {\n      var iv = parseInt(str.substr(1), 16);  // TODO(deanm): Stricter parsing.\n      if (!(iv >= 0 && iv <= 0xfff)) return null;  // Covers NaN.\n      return [((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8),\n              (iv & 0xf0) | ((iv & 0xf0) >> 4),\n              (iv & 0xf) | ((iv & 0xf) << 4),\n              1];\n    } else if (str.length === 7) {\n      var iv = parseInt(str.substr(1), 16);  // TODO(deanm): Stricter parsing.\n      if (!(iv >= 0 && iv <= 0xffffff)) return null;  // Covers NaN.\n      return [(iv & 0xff0000) >> 16,\n              (iv & 0xff00) >> 8,\n              iv & 0xff,\n              1];\n    }\n\n    return null;\n  }\n\n  var op = str.indexOf('('), ep = str.indexOf(')');\n  if (op !== -1 && ep + 1 === str.length) {\n    var fname = str.substr(0, op);\n    var params = str.substr(op+1, ep-(op+1)).split(',');\n    var alpha = 1;  // To allow case fallthrough.\n    switch (fname) {\n      case 'rgba':\n        if (params.length !== 4) return null;\n        alpha = parse_css_float(params.pop());\n        // Fall through.\n      case 'rgb':\n        if (params.length !== 3) return null;\n        return [parse_css_int(params[0]),\n                parse_css_int(params[1]),\n                parse_css_int(params[2]),\n                alpha];\n      case 'hsla':\n        if (params.length !== 4) return null;\n        alpha = parse_css_float(params.pop());\n        // Fall through.\n      case 'hsl':\n        if (params.length !== 3) return null;\n        var h = (((parseFloat(params[0]) % 360) + 360) % 360) / 360;  // 0 .. 1\n        // NOTE(deanm): According to the CSS spec s/l should only be\n        // percentages, but we don't bother and let float or percentage.\n        var s = parse_css_float(params[1]);\n        var l = parse_css_float(params[2]);\n        var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n        var m1 = l * 2 - m2;\n        return [clamp_css_byte(css_hue_to_rgb(m1, m2, h+1/3) * 255),\n                clamp_css_byte(css_hue_to_rgb(m1, m2, h) * 255),\n                clamp_css_byte(css_hue_to_rgb(m1, m2, h-1/3) * 255),\n                alpha];\n      default:\n        return null;\n    }\n  }\n\n  return null;\n}\n\ntry { exports.parseCSSColor = parseCSSColor; } catch(e) { }\n});\n\nclass Color {\n    constructor(r, g, b, a = 1) {\n        this.r = r;\n        this.g = g;\n        this.b = b;\n        this.a = a;\n    }\n    static parse(input) {\n        if (!input) {\n            return undefined;\n        }\n        if (input instanceof Color) {\n            return input;\n        }\n        if (typeof input !== 'string') {\n            return undefined;\n        }\n        const rgba = csscolorparser.parseCSSColor(input);\n        if (!rgba) {\n            return undefined;\n        }\n        return new Color(rgba[0] / 255 * rgba[3], rgba[1] / 255 * rgba[3], rgba[2] / 255 * rgba[3], rgba[3]);\n    }\n    toString() {\n        const [r, g, b, a] = this.toArray();\n        return `rgba(${ Math.round(r) },${ Math.round(g) },${ Math.round(b) },${ a })`;\n    }\n    toArray() {\n        const {r, g, b, a} = this;\n        return a === 0 ? [\n            0,\n            0,\n            0,\n            0\n        ] : [\n            r * 255 / a,\n            g * 255 / a,\n            b * 255 / a,\n            a\n        ];\n    }\n}\nColor.black = new Color(0, 0, 0, 1);\nColor.white = new Color(1, 1, 1, 1);\nColor.transparent = new Color(0, 0, 0, 0);\nColor.red = new Color(1, 0, 0, 1);\nColor.blue = new Color(0, 0, 1, 1);\n\nclass Collator {\n    constructor(caseSensitive, diacriticSensitive, locale) {\n        if (caseSensitive)\n            this.sensitivity = diacriticSensitive ? 'variant' : 'case';\n        else\n            this.sensitivity = diacriticSensitive ? 'accent' : 'base';\n        this.locale = locale;\n        this.collator = new Intl.Collator(this.locale ? this.locale : [], {\n            sensitivity: this.sensitivity,\n            usage: 'search'\n        });\n    }\n    compare(lhs, rhs) {\n        return this.collator.compare(lhs, rhs);\n    }\n    resolvedLocale() {\n        return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale;\n    }\n}\n\nclass FormattedSection {\n    constructor(text, image, scale, fontStack, textColor) {\n        this.text = text;\n        this.image = image;\n        this.scale = scale;\n        this.fontStack = fontStack;\n        this.textColor = textColor;\n    }\n}\nclass Formatted {\n    constructor(sections) {\n        this.sections = sections;\n    }\n    static fromString(unformatted) {\n        return new Formatted([new FormattedSection(unformatted, null, null, null, null)]);\n    }\n    isEmpty() {\n        if (this.sections.length === 0)\n            return true;\n        return !this.sections.some(section => section.text.length !== 0 || section.image && section.image.name.length !== 0);\n    }\n    static factory(text) {\n        if (text instanceof Formatted) {\n            return text;\n        } else {\n            return Formatted.fromString(text);\n        }\n    }\n    toString() {\n        if (this.sections.length === 0)\n            return '';\n        return this.sections.map(section => section.text).join('');\n    }\n    serialize() {\n        const serialized = ['format'];\n        for (const section of this.sections) {\n            if (section.image) {\n                serialized.push([\n                    'image',\n                    section.image.name\n                ]);\n                continue;\n            }\n            serialized.push(section.text);\n            const options = {};\n            if (section.fontStack) {\n                options['text-font'] = [\n                    'literal',\n                    section.fontStack.split(',')\n                ];\n            }\n            if (section.scale) {\n                options['font-scale'] = section.scale;\n            }\n            if (section.textColor) {\n                options['text-color'] = ['rgba'].concat(section.textColor.toArray());\n            }\n            serialized.push(options);\n        }\n        return serialized;\n    }\n}\n\nclass ResolvedImage {\n    constructor(options) {\n        this.name = options.name;\n        this.available = options.available;\n    }\n    toString() {\n        return this.name;\n    }\n    static fromString(name) {\n        if (!name)\n            return null;\n        return new ResolvedImage({\n            name,\n            available: false\n        });\n    }\n    serialize() {\n        return [\n            'image',\n            this.name\n        ];\n    }\n}\n\nfunction validateRGBA(r, g, b, a) {\n    if (!(typeof r === 'number' && r >= 0 && r <= 255 && typeof g === 'number' && g >= 0 && g <= 255 && typeof b === 'number' && b >= 0 && b <= 255)) {\n        const value = typeof a === 'number' ? [\n            r,\n            g,\n            b,\n            a\n        ] : [\n            r,\n            g,\n            b\n        ];\n        return `Invalid rgba value [${ value.join(', ') }]: 'r', 'g', and 'b' must be between 0 and 255.`;\n    }\n    if (!(typeof a === 'undefined' || typeof a === 'number' && a >= 0 && a <= 1)) {\n        return `Invalid rgba value [${ [\n            r,\n            g,\n            b,\n            a\n        ].join(', ') }]: 'a' must be between 0 and 1.`;\n    }\n    return null;\n}\nfunction isValue(mixed) {\n    if (mixed === null) {\n        return true;\n    } else if (typeof mixed === 'string') {\n        return true;\n    } else if (typeof mixed === 'boolean') {\n        return true;\n    } else if (typeof mixed === 'number') {\n        return true;\n    } else if (mixed instanceof Color) {\n        return true;\n    } else if (mixed instanceof Collator) {\n        return true;\n    } else if (mixed instanceof Formatted) {\n        return true;\n    } else if (mixed instanceof ResolvedImage) {\n        return true;\n    } else if (Array.isArray(mixed)) {\n        for (const item of mixed) {\n            if (!isValue(item)) {\n                return false;\n            }\n        }\n        return true;\n    } else if (typeof mixed === 'object') {\n        for (const key in mixed) {\n            if (!isValue(mixed[key])) {\n                return false;\n            }\n        }\n        return true;\n    } else {\n        return false;\n    }\n}\nfunction typeOf(value) {\n    if (value === null) {\n        return NullType;\n    } else if (typeof value === 'string') {\n        return StringType;\n    } else if (typeof value === 'boolean') {\n        return BooleanType;\n    } else if (typeof value === 'number') {\n        return NumberType;\n    } else if (value instanceof Color) {\n        return ColorType;\n    } else if (value instanceof Collator) {\n        return CollatorType;\n    } else if (value instanceof Formatted) {\n        return FormattedType;\n    } else if (value instanceof ResolvedImage) {\n        return ResolvedImageType;\n    } else if (Array.isArray(value)) {\n        const length = value.length;\n        let itemType;\n        for (const item of value) {\n            const t = typeOf(item);\n            if (!itemType) {\n                itemType = t;\n            } else if (itemType === t) {\n                continue;\n            } else {\n                itemType = ValueType;\n                break;\n            }\n        }\n        return array(itemType || ValueType, length);\n    } else {\n        return ObjectType;\n    }\n}\nfunction toString$1(value) {\n    const type = typeof value;\n    if (value === null) {\n        return '';\n    } else if (type === 'string' || type === 'number' || type === 'boolean') {\n        return String(value);\n    } else if (value instanceof Color || value instanceof Formatted || value instanceof ResolvedImage) {\n        return value.toString();\n    } else {\n        return JSON.stringify(value);\n    }\n}\n\nclass Literal {\n    constructor(type, value) {\n        this.type = type;\n        this.value = value;\n    }\n    static parse(args, context) {\n        if (args.length !== 2)\n            return context.error(`'literal' expression requires exactly one argument, but found ${ args.length - 1 } instead.`);\n        if (!isValue(args[1]))\n            return context.error(`invalid value`);\n        const value = args[1];\n        let type = typeOf(value);\n        const expected = context.expectedType;\n        if (type.kind === 'array' && type.N === 0 && expected && expected.kind === 'array' && (typeof expected.N !== 'number' || expected.N === 0)) {\n            type = expected;\n        }\n        return new Literal(type, value);\n    }\n    evaluate() {\n        return this.value;\n    }\n    eachChild() {\n    }\n    outputDefined() {\n        return true;\n    }\n    serialize() {\n        if (this.type.kind === 'array' || this.type.kind === 'object') {\n            return [\n                'literal',\n                this.value\n            ];\n        } else if (this.value instanceof Color) {\n            return ['rgba'].concat(this.value.toArray());\n        } else if (this.value instanceof Formatted) {\n            return this.value.serialize();\n        } else {\n            return this.value;\n        }\n    }\n}\n\nclass RuntimeError {\n    constructor(message) {\n        this.name = 'ExpressionEvaluationError';\n        this.message = message;\n    }\n    toJSON() {\n        return this.message;\n    }\n}\n\nconst types = {\n    string: StringType,\n    number: NumberType,\n    boolean: BooleanType,\n    object: ObjectType\n};\nclass Assertion {\n    constructor(type, args) {\n        this.type = type;\n        this.args = args;\n    }\n    static parse(args, context) {\n        if (args.length < 2)\n            return context.error(`Expected at least one argument.`);\n        let i = 1;\n        let type;\n        const name = args[0];\n        if (name === 'array') {\n            let itemType;\n            if (args.length > 2) {\n                const type = args[1];\n                if (typeof type !== 'string' || !(type in types) || type === 'object')\n                    return context.error('The item type argument of \"array\" must be one of string, number, boolean', 1);\n                itemType = types[type];\n                i++;\n            } else {\n                itemType = ValueType;\n            }\n            let N;\n            if (args.length > 3) {\n                if (args[2] !== null && (typeof args[2] !== 'number' || args[2] < 0 || args[2] !== Math.floor(args[2]))) {\n                    return context.error('The length argument to \"array\" must be a positive integer literal', 2);\n                }\n                N = args[2];\n                i++;\n            }\n            type = array(itemType, N);\n        } else {\n            type = types[name];\n        }\n        const parsed = [];\n        for (; i < args.length; i++) {\n            const input = context.parse(args[i], i, ValueType);\n            if (!input)\n                return null;\n            parsed.push(input);\n        }\n        return new Assertion(type, parsed);\n    }\n    evaluate(ctx) {\n        for (let i = 0; i < this.args.length; i++) {\n            const value = this.args[i].evaluate(ctx);\n            const error = checkSubtype(this.type, typeOf(value));\n            if (!error) {\n                return value;\n            } else if (i === this.args.length - 1) {\n                throw new RuntimeError(`Expected value to be of type ${ toString(this.type) }, but found ${ toString(typeOf(value)) } instead.`);\n            }\n        }\n        return null;\n    }\n    eachChild(fn) {\n        this.args.forEach(fn);\n    }\n    outputDefined() {\n        return this.args.every(arg => arg.outputDefined());\n    }\n    serialize() {\n        const type = this.type;\n        const serialized = [type.kind];\n        if (type.kind === 'array') {\n            const itemType = type.itemType;\n            if (itemType.kind === 'string' || itemType.kind === 'number' || itemType.kind === 'boolean') {\n                serialized.push(itemType.kind);\n                const N = type.N;\n                if (typeof N === 'number' || this.args.length > 1) {\n                    serialized.push(N);\n                }\n            }\n        }\n        return serialized.concat(this.args.map(arg => arg.serialize()));\n    }\n}\n\nclass FormatExpression {\n    constructor(sections) {\n        this.type = FormattedType;\n        this.sections = sections;\n    }\n    static parse(args, context) {\n        if (args.length < 2) {\n            return context.error(`Expected at least one argument.`);\n        }\n        const firstArg = args[1];\n        if (!Array.isArray(firstArg) && typeof firstArg === 'object') {\n            return context.error(`First argument must be an image or text section.`);\n        }\n        const sections = [];\n        let nextTokenMayBeObject = false;\n        for (let i = 1; i <= args.length - 1; ++i) {\n            const arg = args[i];\n            if (nextTokenMayBeObject && typeof arg === 'object' && !Array.isArray(arg)) {\n                nextTokenMayBeObject = false;\n                let scale = null;\n                if (arg['font-scale']) {\n                    scale = context.parse(arg['font-scale'], 1, NumberType);\n                    if (!scale)\n                        return null;\n                }\n                let font = null;\n                if (arg['text-font']) {\n                    font = context.parse(arg['text-font'], 1, array(StringType));\n                    if (!font)\n                        return null;\n                }\n                let textColor = null;\n                if (arg['text-color']) {\n                    textColor = context.parse(arg['text-color'], 1, ColorType);\n                    if (!textColor)\n                        return null;\n                }\n                const lastExpression = sections[sections.length - 1];\n                lastExpression.scale = scale;\n                lastExpression.font = font;\n                lastExpression.textColor = textColor;\n            } else {\n                const content = context.parse(args[i], 1, ValueType);\n                if (!content)\n                    return null;\n                const kind = content.type.kind;\n                if (kind !== 'string' && kind !== 'value' && kind !== 'null' && kind !== 'resolvedImage')\n                    return context.error(`Formatted text type must be 'string', 'value', 'image' or 'null'.`);\n                nextTokenMayBeObject = true;\n                sections.push({\n                    content,\n                    scale: null,\n                    font: null,\n                    textColor: null\n                });\n            }\n        }\n        return new FormatExpression(sections);\n    }\n    evaluate(ctx) {\n        const evaluateSection = section => {\n            const evaluatedContent = section.content.evaluate(ctx);\n            if (typeOf(evaluatedContent) === ResolvedImageType) {\n                return new FormattedSection('', evaluatedContent, null, null, null);\n            }\n            return new FormattedSection(toString$1(evaluatedContent), null, section.scale ? section.scale.evaluate(ctx) : null, section.font ? section.font.evaluate(ctx).join(',') : null, section.textColor ? section.textColor.evaluate(ctx) : null);\n        };\n        return new Formatted(this.sections.map(evaluateSection));\n    }\n    eachChild(fn) {\n        for (const section of this.sections) {\n            fn(section.content);\n            if (section.scale) {\n                fn(section.scale);\n            }\n            if (section.font) {\n                fn(section.font);\n            }\n            if (section.textColor) {\n                fn(section.textColor);\n            }\n        }\n    }\n    outputDefined() {\n        return false;\n    }\n    serialize() {\n        const serialized = ['format'];\n        for (const section of this.sections) {\n            serialized.push(section.content.serialize());\n            const options = {};\n            if (section.scale) {\n                options['font-scale'] = section.scale.serialize();\n            }\n            if (section.font) {\n                options['text-font'] = section.font.serialize();\n            }\n            if (section.textColor) {\n                options['text-color'] = section.textColor.serialize();\n            }\n            serialized.push(options);\n        }\n        return serialized;\n    }\n}\n\nclass ImageExpression {\n    constructor(input) {\n        this.type = ResolvedImageType;\n        this.input = input;\n    }\n    static parse(args, context) {\n        if (args.length !== 2) {\n            return context.error(`Expected two arguments.`);\n        }\n        const name = context.parse(args[1], 1, StringType);\n        if (!name)\n            return context.error(`No image name provided.`);\n        return new ImageExpression(name);\n    }\n    evaluate(ctx) {\n        const evaluatedImageName = this.input.evaluate(ctx);\n        const value = ResolvedImage.fromString(evaluatedImageName);\n        if (value && ctx.availableImages)\n            value.available = ctx.availableImages.indexOf(evaluatedImageName) > -1;\n        return value;\n    }\n    eachChild(fn) {\n        fn(this.input);\n    }\n    outputDefined() {\n        return false;\n    }\n    serialize() {\n        return [\n            'image',\n            this.input.serialize()\n        ];\n    }\n}\n\nconst types$1 = {\n    'to-boolean': BooleanType,\n    'to-color': ColorType,\n    'to-number': NumberType,\n    'to-string': StringType\n};\nclass Coercion {\n    constructor(type, args) {\n        this.type = type;\n        this.args = args;\n    }\n    static parse(args, context) {\n        if (args.length < 2)\n            return context.error(`Expected at least one argument.`);\n        const name = args[0];\n        if ((name === 'to-boolean' || name === 'to-string') && args.length !== 2)\n            return context.error(`Expected one argument.`);\n        const type = types$1[name];\n        const parsed = [];\n        for (let i = 1; i < args.length; i++) {\n            const input = context.parse(args[i], i, ValueType);\n            if (!input)\n                return null;\n            parsed.push(input);\n        }\n        return new Coercion(type, parsed);\n    }\n    evaluate(ctx) {\n        if (this.type.kind === 'boolean') {\n            return Boolean(this.args[0].evaluate(ctx));\n        } else if (this.type.kind === 'color') {\n            let input;\n            let error;\n            for (const arg of this.args) {\n                input = arg.evaluate(ctx);\n                error = null;\n                if (input instanceof Color) {\n                    return input;\n                } else if (typeof input === 'string') {\n                    const c = ctx.parseColor(input);\n                    if (c)\n                        return c;\n                } else if (Array.isArray(input)) {\n                    if (input.length < 3 || input.length > 4) {\n                        error = `Invalid rbga value ${ JSON.stringify(input) }: expected an array containing either three or four numeric values.`;\n                    } else {\n                        error = validateRGBA(input[0], input[1], input[2], input[3]);\n                    }\n                    if (!error) {\n                        return new Color(input[0] / 255, input[1] / 255, input[2] / 255, input[3]);\n                    }\n                }\n            }\n            throw new RuntimeError(error || `Could not parse color from value '${ typeof input === 'string' ? input : String(JSON.stringify(input)) }'`);\n        } else if (this.type.kind === 'number') {\n            let value = null;\n            for (const arg of this.args) {\n                value = arg.evaluate(ctx);\n                if (value === null)\n                    return 0;\n                const num = Number(value);\n                if (isNaN(num))\n                    continue;\n                return num;\n            }\n            throw new RuntimeError(`Could not convert ${ JSON.stringify(value) } to number.`);\n        } else if (this.type.kind === 'formatted') {\n            return Formatted.fromString(toString$1(this.args[0].evaluate(ctx)));\n        } else if (this.type.kind === 'resolvedImage') {\n            return ResolvedImage.fromString(toString$1(this.args[0].evaluate(ctx)));\n        } else {\n            return toString$1(this.args[0].evaluate(ctx));\n        }\n    }\n    eachChild(fn) {\n        this.args.forEach(fn);\n    }\n    outputDefined() {\n        return this.args.every(arg => arg.outputDefined());\n    }\n    serialize() {\n        if (this.type.kind === 'formatted') {\n            return new FormatExpression([{\n                    content: this.args[0],\n                    scale: null,\n                    font: null,\n                    textColor: null\n                }]).serialize();\n        }\n        if (this.type.kind === 'resolvedImage') {\n            return new ImageExpression(this.args[0]).serialize();\n        }\n        const serialized = [`to-${ this.type.kind }`];\n        this.eachChild(child => {\n            serialized.push(child.serialize());\n        });\n        return serialized;\n    }\n}\n\nconst geometryTypes = [\n    'Unknown',\n    'Point',\n    'LineString',\n    'Polygon'\n];\nclass EvaluationContext {\n    constructor() {\n        this.globals = null;\n        this.feature = null;\n        this.featureState = null;\n        this.formattedSection = null;\n        this._parseColorCache = {};\n        this.availableImages = null;\n        this.canonical = null;\n    }\n    id() {\n        return this.feature && 'id' in this.feature ? this.feature.id : null;\n    }\n    geometryType() {\n        return this.feature ? typeof this.feature.type === 'number' ? geometryTypes[this.feature.type] : this.feature.type : null;\n    }\n    geometry() {\n        return this.feature && 'geometry' in this.feature ? this.feature.geometry : null;\n    }\n    canonicalID() {\n        return this.canonical;\n    }\n    properties() {\n        return this.feature && this.feature.properties || {};\n    }\n    parseColor(input) {\n        let cached = this._parseColorCache[input];\n        if (!cached) {\n            cached = this._parseColorCache[input] = Color.parse(input);\n        }\n        return cached;\n    }\n}\n\nclass CompoundExpression {\n    constructor(name, type, evaluate, args) {\n        this.name = name;\n        this.type = type;\n        this._evaluate = evaluate;\n        this.args = args;\n    }\n    evaluate(ctx) {\n        return this._evaluate(ctx, this.args);\n    }\n    eachChild(fn) {\n        this.args.forEach(fn);\n    }\n    outputDefined() {\n        return false;\n    }\n    serialize() {\n        return [this.name].concat(this.args.map(arg => arg.serialize()));\n    }\n    static parse(args, context) {\n        const op = args[0];\n        const definition = CompoundExpression.definitions[op];\n        if (!definition) {\n            return context.error(`Unknown expression \"${ op }\". If you wanted a literal array, use [\"literal\", [...]].`, 0);\n        }\n        const type = Array.isArray(definition) ? definition[0] : definition.type;\n        const availableOverloads = Array.isArray(definition) ? [[\n                definition[1],\n                definition[2]\n            ]] : definition.overloads;\n        const overloads = availableOverloads.filter(([signature]) => !Array.isArray(signature) || signature.length === args.length - 1);\n        let signatureContext = null;\n        for (const [params, evaluate] of overloads) {\n            signatureContext = new ParsingContext(context.registry, context.path, null, context.scope);\n            const parsedArgs = [];\n            let argParseFailed = false;\n            for (let i = 1; i < args.length; i++) {\n                const arg = args[i];\n                const expectedType = Array.isArray(params) ? params[i - 1] : params.type;\n                const parsed = signatureContext.parse(arg, 1 + parsedArgs.length, expectedType);\n                if (!parsed) {\n                    argParseFailed = true;\n                    break;\n                }\n                parsedArgs.push(parsed);\n            }\n            if (argParseFailed) {\n                continue;\n            }\n            if (Array.isArray(params)) {\n                if (params.length !== parsedArgs.length) {\n                    signatureContext.error(`Expected ${ params.length } arguments, but found ${ parsedArgs.length } instead.`);\n                    continue;\n                }\n            }\n            for (let i = 0; i < parsedArgs.length; i++) {\n                const expected = Array.isArray(params) ? params[i] : params.type;\n                const arg = parsedArgs[i];\n                signatureContext.concat(i + 1).checkSubtype(expected, arg.type);\n            }\n            if (signatureContext.errors.length === 0) {\n                return new CompoundExpression(op, type, evaluate, parsedArgs);\n            }\n        }\n        if (overloads.length === 1) {\n            context.errors.push(...signatureContext.errors);\n        } else {\n            const expected = overloads.length ? overloads : availableOverloads;\n            const signatures = expected.map(([params]) => stringifySignature(params)).join(' | ');\n            const actualTypes = [];\n            for (let i = 1; i < args.length; i++) {\n                const parsed = context.parse(args[i], 1 + actualTypes.length);\n                if (!parsed)\n                    return null;\n                actualTypes.push(toString(parsed.type));\n            }\n            context.error(`Expected arguments of type ${ signatures }, but found (${ actualTypes.join(', ') }) instead.`);\n        }\n        return null;\n    }\n    static register(registry, definitions) {\n        CompoundExpression.definitions = definitions;\n        for (const name in definitions) {\n            registry[name] = CompoundExpression;\n        }\n    }\n}\nfunction stringifySignature(signature) {\n    if (Array.isArray(signature)) {\n        return `(${ signature.map(toString).join(', ') })`;\n    } else {\n        return `(${ toString(signature.type) }...)`;\n    }\n}\n\nclass CollatorExpression {\n    constructor(caseSensitive, diacriticSensitive, locale) {\n        this.type = CollatorType;\n        this.locale = locale;\n        this.caseSensitive = caseSensitive;\n        this.diacriticSensitive = diacriticSensitive;\n    }\n    static parse(args, context) {\n        if (args.length !== 2)\n            return context.error(`Expected one argument.`);\n        const options = args[1];\n        if (typeof options !== 'object' || Array.isArray(options))\n            return context.error(`Collator options argument must be an object.`);\n        const caseSensitive = context.parse(options['case-sensitive'] === undefined ? false : options['case-sensitive'], 1, BooleanType);\n        if (!caseSensitive)\n            return null;\n        const diacriticSensitive = context.parse(options['diacritic-sensitive'] === undefined ? false : options['diacritic-sensitive'], 1, BooleanType);\n        if (!diacriticSensitive)\n            return null;\n        let locale = null;\n        if (options['locale']) {\n            locale = context.parse(options['locale'], 1, StringType);\n            if (!locale)\n                return null;\n        }\n        return new CollatorExpression(caseSensitive, diacriticSensitive, locale);\n    }\n    evaluate(ctx) {\n        return new Collator(this.caseSensitive.evaluate(ctx), this.diacriticSensitive.evaluate(ctx), this.locale ? this.locale.evaluate(ctx) : null);\n    }\n    eachChild(fn) {\n        fn(this.caseSensitive);\n        fn(this.diacriticSensitive);\n        if (this.locale) {\n            fn(this.locale);\n        }\n    }\n    outputDefined() {\n        return false;\n    }\n    serialize() {\n        const options = {};\n        options['case-sensitive'] = this.caseSensitive.serialize();\n        options['diacritic-sensitive'] = this.diacriticSensitive.serialize();\n        if (this.locale) {\n            options['locale'] = this.locale.serialize();\n        }\n        return [\n            'collator',\n            options\n        ];\n    }\n}\n\nconst EXTENT = 8192;\nfunction updateBBox(bbox, coord) {\n    bbox[0] = Math.min(bbox[0], coord[0]);\n    bbox[1] = Math.min(bbox[1], coord[1]);\n    bbox[2] = Math.max(bbox[2], coord[0]);\n    bbox[3] = Math.max(bbox[3], coord[1]);\n}\nfunction mercatorXfromLng(lng) {\n    return (180 + lng) / 360;\n}\nfunction mercatorYfromLat(lat) {\n    return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + lat * Math.PI / 360))) / 360;\n}\nfunction boxWithinBox(bbox1, bbox2) {\n    if (bbox1[0] <= bbox2[0])\n        return false;\n    if (bbox1[2] >= bbox2[2])\n        return false;\n    if (bbox1[1] <= bbox2[1])\n        return false;\n    if (bbox1[3] >= bbox2[3])\n        return false;\n    return true;\n}\nfunction getTileCoordinates(p, canonical) {\n    const x = mercatorXfromLng(p[0]);\n    const y = mercatorYfromLat(p[1]);\n    const tilesAtZoom = Math.pow(2, canonical.z);\n    return [\n        Math.round(x * tilesAtZoom * EXTENT),\n        Math.round(y * tilesAtZoom * EXTENT)\n    ];\n}\nfunction onBoundary(p, p1, p2) {\n    const x1 = p[0] - p1[0];\n    const y1 = p[1] - p1[1];\n    const x2 = p[0] - p2[0];\n    const y2 = p[1] - p2[1];\n    return x1 * y2 - x2 * y1 === 0 && x1 * x2 <= 0 && y1 * y2 <= 0;\n}\nfunction rayIntersect(p, p1, p2) {\n    return p1[1] > p[1] !== p2[1] > p[1] && p[0] < (p2[0] - p1[0]) * (p[1] - p1[1]) / (p2[1] - p1[1]) + p1[0];\n}\nfunction pointWithinPolygon(point, rings) {\n    let inside = false;\n    for (let i = 0, len = rings.length; i < len; i++) {\n        const ring = rings[i];\n        for (let j = 0, len2 = ring.length; j < len2 - 1; j++) {\n            if (onBoundary(point, ring[j], ring[j + 1]))\n                return false;\n            if (rayIntersect(point, ring[j], ring[j + 1]))\n                inside = !inside;\n        }\n    }\n    return inside;\n}\nfunction pointWithinPolygons(point, polygons) {\n    for (let i = 0; i < polygons.length; i++) {\n        if (pointWithinPolygon(point, polygons[i]))\n            return true;\n    }\n    return false;\n}\nfunction perp(v1, v2) {\n    return v1[0] * v2[1] - v1[1] * v2[0];\n}\nfunction twoSided(p1, p2, q1, q2) {\n    const x1 = p1[0] - q1[0];\n    const y1 = p1[1] - q1[1];\n    const x2 = p2[0] - q1[0];\n    const y2 = p2[1] - q1[1];\n    const x3 = q2[0] - q1[0];\n    const y3 = q2[1] - q1[1];\n    const det1 = x1 * y3 - x3 * y1;\n    const det2 = x2 * y3 - x3 * y2;\n    if (det1 > 0 && det2 < 0 || det1 < 0 && det2 > 0)\n        return true;\n    return false;\n}\nfunction lineIntersectLine(a, b, c, d) {\n    const vectorP = [\n        b[0] - a[0],\n        b[1] - a[1]\n    ];\n    const vectorQ = [\n        d[0] - c[0],\n        d[1] - c[1]\n    ];\n    if (perp(vectorQ, vectorP) === 0)\n        return false;\n    if (twoSided(a, b, c, d) && twoSided(c, d, a, b))\n        return true;\n    return false;\n}\nfunction lineIntersectPolygon(p1, p2, polygon) {\n    for (const ring of polygon) {\n        for (let j = 0; j < ring.length - 1; ++j) {\n            if (lineIntersectLine(p1, p2, ring[j], ring[j + 1])) {\n                return true;\n            }\n        }\n    }\n    return false;\n}\nfunction lineStringWithinPolygon(line, polygon) {\n    for (let i = 0; i < line.length; ++i) {\n        if (!pointWithinPolygon(line[i], polygon)) {\n            return false;\n        }\n    }\n    for (let i = 0; i < line.length - 1; ++i) {\n        if (lineIntersectPolygon(line[i], line[i + 1], polygon)) {\n            return false;\n        }\n    }\n    return true;\n}\nfunction lineStringWithinPolygons(line, polygons) {\n    for (let i = 0; i < polygons.length; i++) {\n        if (lineStringWithinPolygon(line, polygons[i]))\n            return true;\n    }\n    return false;\n}\nfunction getTilePolygon(coordinates, bbox, canonical) {\n    const polygon = [];\n    for (let i = 0; i < coordinates.length; i++) {\n        const ring = [];\n        for (let j = 0; j < coordinates[i].length; j++) {\n            const coord = getTileCoordinates(coordinates[i][j], canonical);\n            updateBBox(bbox, coord);\n            ring.push(coord);\n        }\n        polygon.push(ring);\n    }\n    return polygon;\n}\nfunction getTilePolygons(coordinates, bbox, canonical) {\n    const polygons = [];\n    for (let i = 0; i < coordinates.length; i++) {\n        const polygon = getTilePolygon(coordinates[i], bbox, canonical);\n        polygons.push(polygon);\n    }\n    return polygons;\n}\nfunction updatePoint(p, bbox, polyBBox, worldSize) {\n    if (p[0] < polyBBox[0] || p[0] > polyBBox[2]) {\n        const halfWorldSize = worldSize * 0.5;\n        let shift = p[0] - polyBBox[0] > halfWorldSize ? -worldSize : polyBBox[0] - p[0] > halfWorldSize ? worldSize : 0;\n        if (shift === 0) {\n            shift = p[0] - polyBBox[2] > halfWorldSize ? -worldSize : polyBBox[2] - p[0] > halfWorldSize ? worldSize : 0;\n        }\n        p[0] += shift;\n    }\n    updateBBox(bbox, p);\n}\nfunction resetBBox(bbox) {\n    bbox[0] = bbox[1] = Infinity;\n    bbox[2] = bbox[3] = -Infinity;\n}\nfunction getTilePoints(geometry, pointBBox, polyBBox, canonical) {\n    const worldSize = Math.pow(2, canonical.z) * EXTENT;\n    const shifts = [\n        canonical.x * EXTENT,\n        canonical.y * EXTENT\n    ];\n    const tilePoints = [];\n    for (const points of geometry) {\n        for (const point of points) {\n            const p = [\n                point.x + shifts[0],\n                point.y + shifts[1]\n            ];\n            updatePoint(p, pointBBox, polyBBox, worldSize);\n            tilePoints.push(p);\n        }\n    }\n    return tilePoints;\n}\nfunction getTileLines(geometry, lineBBox, polyBBox, canonical) {\n    const worldSize = Math.pow(2, canonical.z) * EXTENT;\n    const shifts = [\n        canonical.x * EXTENT,\n        canonical.y * EXTENT\n    ];\n    const tileLines = [];\n    for (const line of geometry) {\n        const tileLine = [];\n        for (const point of line) {\n            const p = [\n                point.x + shifts[0],\n                point.y + shifts[1]\n            ];\n            updateBBox(lineBBox, p);\n            tileLine.push(p);\n        }\n        tileLines.push(tileLine);\n    }\n    if (lineBBox[2] - lineBBox[0] <= worldSize / 2) {\n        resetBBox(lineBBox);\n        for (const line of tileLines) {\n            for (const p of line) {\n                updatePoint(p, lineBBox, polyBBox, worldSize);\n            }\n        }\n    }\n    return tileLines;\n}\nfunction pointsWithinPolygons(ctx, polygonGeometry) {\n    const pointBBox = [\n        Infinity,\n        Infinity,\n        -Infinity,\n        -Infinity\n    ];\n    const polyBBox = [\n        Infinity,\n        Infinity,\n        -Infinity,\n        -Infinity\n    ];\n    const canonical = ctx.canonicalID();\n    if (polygonGeometry.type === 'Polygon') {\n        const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n        const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n        if (!boxWithinBox(pointBBox, polyBBox))\n            return false;\n        for (const point of tilePoints) {\n            if (!pointWithinPolygon(point, tilePolygon))\n                return false;\n        }\n    }\n    if (polygonGeometry.type === 'MultiPolygon') {\n        const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n        const tilePoints = getTilePoints(ctx.geometry(), pointBBox, polyBBox, canonical);\n        if (!boxWithinBox(pointBBox, polyBBox))\n            return false;\n        for (const point of tilePoints) {\n            if (!pointWithinPolygons(point, tilePolygons))\n                return false;\n        }\n    }\n    return true;\n}\nfunction linesWithinPolygons(ctx, polygonGeometry) {\n    const lineBBox = [\n        Infinity,\n        Infinity,\n        -Infinity,\n        -Infinity\n    ];\n    const polyBBox = [\n        Infinity,\n        Infinity,\n        -Infinity,\n        -Infinity\n    ];\n    const canonical = ctx.canonicalID();\n    if (polygonGeometry.type === 'Polygon') {\n        const tilePolygon = getTilePolygon(polygonGeometry.coordinates, polyBBox, canonical);\n        const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n        if (!boxWithinBox(lineBBox, polyBBox))\n            return false;\n        for (const line of tileLines) {\n            if (!lineStringWithinPolygon(line, tilePolygon))\n                return false;\n        }\n    }\n    if (polygonGeometry.type === 'MultiPolygon') {\n        const tilePolygons = getTilePolygons(polygonGeometry.coordinates, polyBBox, canonical);\n        const tileLines = getTileLines(ctx.geometry(), lineBBox, polyBBox, canonical);\n        if (!boxWithinBox(lineBBox, polyBBox))\n            return false;\n        for (const line of tileLines) {\n            if (!lineStringWithinPolygons(line, tilePolygons))\n                return false;\n        }\n    }\n    return true;\n}\nclass Within {\n    constructor(geojson, geometries) {\n        this.type = BooleanType;\n        this.geojson = geojson;\n        this.geometries = geometries;\n    }\n    static parse(args, context) {\n        if (args.length !== 2)\n            return context.error(`'within' expression requires exactly one argument, but found ${ args.length - 1 } instead.`);\n        if (isValue(args[1])) {\n            const geojson = args[1];\n            if (geojson.type === 'FeatureCollection') {\n                for (let i = 0; i < geojson.features.length; ++i) {\n                    const type = geojson.features[i].geometry.type;\n                    if (type === 'Polygon' || type === 'MultiPolygon') {\n                        return new Within(geojson, geojson.features[i].geometry);\n                    }\n                }\n            } else if (geojson.type === 'Feature') {\n                const type = geojson.geometry.type;\n                if (type === 'Polygon' || type === 'MultiPolygon') {\n                    return new Within(geojson, geojson.geometry);\n                }\n            } else if (geojson.type === 'Polygon' || geojson.type === 'MultiPolygon') {\n                return new Within(geojson, geojson);\n            }\n        }\n        return context.error(`'within' expression requires valid geojson object that contains polygon geometry type.`);\n    }\n    evaluate(ctx) {\n        if (ctx.geometry() != null && ctx.canonicalID() != null) {\n            if (ctx.geometryType() === 'Point') {\n                return pointsWithinPolygons(ctx, this.geometries);\n            } else if (ctx.geometryType() === 'LineString') {\n                return linesWithinPolygons(ctx, this.geometries);\n            }\n        }\n        return false;\n    }\n    eachChild() {\n    }\n    outputDefined() {\n        return true;\n    }\n    serialize() {\n        return [\n            'within',\n            this.geojson\n        ];\n    }\n}\n\nfunction isFeatureConstant(e) {\n    if (e instanceof CompoundExpression) {\n        if (e.name === 'get' && e.args.length === 1) {\n            return false;\n        } else if (e.name === 'feature-state') {\n            return false;\n        } else if (e.name === 'has' && e.args.length === 1) {\n            return false;\n        } else if (e.name === 'properties' || e.name === 'geometry-type' || e.name === 'id') {\n            return false;\n        } else if (/^filter-/.test(e.name)) {\n            return false;\n        }\n    }\n    if (e instanceof Within) {\n        return false;\n    }\n    let result = true;\n    e.eachChild(arg => {\n        if (result && !isFeatureConstant(arg)) {\n            result = false;\n        }\n    });\n    return result;\n}\nfunction isStateConstant(e) {\n    if (e instanceof CompoundExpression) {\n        if (e.name === 'feature-state') {\n            return false;\n        }\n    }\n    let result = true;\n    e.eachChild(arg => {\n        if (result && !isStateConstant(arg)) {\n            result = false;\n        }\n    });\n    return result;\n}\nfunction isGlobalPropertyConstant(e, properties) {\n    if (e instanceof CompoundExpression && properties.indexOf(e.name) >= 0) {\n        return false;\n    }\n    let result = true;\n    e.eachChild(arg => {\n        if (result && !isGlobalPropertyConstant(arg, properties)) {\n            result = false;\n        }\n    });\n    return result;\n}\n\nclass Var {\n    constructor(name, boundExpression) {\n        this.type = boundExpression.type;\n        this.name = name;\n        this.boundExpression = boundExpression;\n    }\n    static parse(args, context) {\n        if (args.length !== 2 || typeof args[1] !== 'string')\n            return context.error(`'var' expression requires exactly one string literal argument.`);\n        const name = args[1];\n        if (!context.scope.has(name)) {\n            return context.error(`Unknown variable \"${ name }\". Make sure \"${ name }\" has been bound in an enclosing \"let\" expression before using it.`, 1);\n        }\n        return new Var(name, context.scope.get(name));\n    }\n    evaluate(ctx) {\n        return this.boundExpression.evaluate(ctx);\n    }\n    eachChild() {\n    }\n    outputDefined() {\n        return false;\n    }\n    serialize() {\n        return [\n            'var',\n            this.name\n        ];\n    }\n}\n\nclass ParsingContext {\n    constructor(registry, path = [], expectedType, scope = new Scope(), errors = []) {\n        this.registry = registry;\n        this.path = path;\n        this.key = path.map(part => `[${ part }]`).join('');\n        this.scope = scope;\n        this.errors = errors;\n        this.expectedType = expectedType;\n    }\n    parse(expr, index, expectedType, bindings, options = {}) {\n        if (index) {\n            return this.concat(index, expectedType, bindings)._parse(expr, options);\n        }\n        return this._parse(expr, options);\n    }\n    _parse(expr, options) {\n        if (expr === null || typeof expr === 'string' || typeof expr === 'boolean' || typeof expr === 'number') {\n            expr = [\n                'literal',\n                expr\n            ];\n        }\n        function annotate(parsed, type, typeAnnotation) {\n            if (typeAnnotation === 'assert') {\n                return new Assertion(type, [parsed]);\n            } else if (typeAnnotation === 'coerce') {\n                return new Coercion(type, [parsed]);\n            } else {\n                return parsed;\n            }\n        }\n        if (Array.isArray(expr)) {\n            if (expr.length === 0) {\n                return this.error(`Expected an array with at least one element. If you wanted a literal array, use [\"literal\", []].`);\n            }\n            const op = expr[0];\n            if (typeof op !== 'string') {\n                this.error(`Expression name must be a string, but found ${ typeof op } instead. If you wanted a literal array, use [\"literal\", [...]].`, 0);\n                return null;\n            }\n            const Expr = this.registry[op];\n            if (Expr) {\n                let parsed = Expr.parse(expr, this);\n                if (!parsed)\n                    return null;\n                if (this.expectedType) {\n                    const expected = this.expectedType;\n                    const actual = parsed.type;\n                    if ((expected.kind === 'string' || expected.kind === 'number' || expected.kind === 'boolean' || expected.kind === 'object' || expected.kind === 'array') && actual.kind === 'value') {\n                        parsed = annotate(parsed, expected, options.typeAnnotation || 'assert');\n                    } else if ((expected.kind === 'color' || expected.kind === 'formatted' || expected.kind === 'resolvedImage') && (actual.kind === 'value' || actual.kind === 'string')) {\n                        parsed = annotate(parsed, expected, options.typeAnnotation || 'coerce');\n                    } else if (this.checkSubtype(expected, actual)) {\n                        return null;\n                    }\n                }\n                if (!(parsed instanceof Literal) && parsed.type.kind !== 'resolvedImage' && isConstant(parsed)) {\n                    const ec = new EvaluationContext();\n                    try {\n                        parsed = new Literal(parsed.type, parsed.evaluate(ec));\n                    } catch (e) {\n                        this.error(e.message);\n                        return null;\n                    }\n                }\n                return parsed;\n            }\n            return this.error(`Unknown expression \"${ op }\". If you wanted a literal array, use [\"literal\", [...]].`, 0);\n        } else if (typeof expr === 'undefined') {\n            return this.error(`'undefined' value invalid. Use null instead.`);\n        } else if (typeof expr === 'object') {\n            return this.error(`Bare objects invalid. Use [\"literal\", {...}] instead.`);\n        } else {\n            return this.error(`Expected an array, but found ${ typeof expr } instead.`);\n        }\n    }\n    concat(index, expectedType, bindings) {\n        const path = typeof index === 'number' ? this.path.concat(index) : this.path;\n        const scope = bindings ? this.scope.concat(bindings) : this.scope;\n        return new ParsingContext(this.registry, path, expectedType || null, scope, this.errors);\n    }\n    error(error, ...keys) {\n        const key = `${ this.key }${ keys.map(k => `[${ k }]`).join('') }`;\n        this.errors.push(new ParsingError(key, error));\n    }\n    checkSubtype(expected, t) {\n        const error = checkSubtype(expected, t);\n        if (error)\n            this.error(error);\n        return error;\n    }\n}\nfunction isConstant(expression) {\n    if (expression instanceof Var) {\n        return isConstant(expression.boundExpression);\n    } else if (expression instanceof CompoundExpression && expression.name === 'error') {\n        return false;\n    } else if (expression instanceof CollatorExpression) {\n        return false;\n    } else if (expression instanceof Within) {\n        return false;\n    }\n    const isTypeAnnotation = expression instanceof Coercion || expression instanceof Assertion;\n    let childrenConstant = true;\n    expression.eachChild(child => {\n        if (isTypeAnnotation) {\n            childrenConstant = childrenConstant && isConstant(child);\n        } else {\n            childrenConstant = childrenConstant && child instanceof Literal;\n        }\n    });\n    if (!childrenConstant) {\n        return false;\n    }\n    return isFeatureConstant(expression) && isGlobalPropertyConstant(expression, [\n        'zoom',\n        'heatmap-density',\n        'line-progress',\n        'sky-radial-progress',\n        'accumulated',\n        'is-supported-script'\n    ]);\n}\n\nfunction findStopLessThanOrEqualTo(stops, input) {\n    const lastIndex = stops.length - 1;\n    let lowerIndex = 0;\n    let upperIndex = lastIndex;\n    let currentIndex = 0;\n    let currentValue, nextValue;\n    while (lowerIndex <= upperIndex) {\n        currentIndex = Math.floor((lowerIndex + upperIndex) / 2);\n        currentValue = stops[currentIndex];\n        nextValue = stops[currentIndex + 1];\n        if (currentValue <= input) {\n            if (currentIndex === lastIndex || input < nextValue) {\n                return currentIndex;\n            }\n            lowerIndex = currentIndex + 1;\n        } else if (currentValue > input) {\n            upperIndex = currentIndex - 1;\n        } else {\n            throw new RuntimeError('Input is not a number.');\n        }\n    }\n    return 0;\n}\n\nclass Step {\n    constructor(type, input, stops) {\n        this.type = type;\n        this.input = input;\n        this.labels = [];\n        this.outputs = [];\n        for (const [label, expression] of stops) {\n            this.labels.push(label);\n            this.outputs.push(expression);\n        }\n    }\n    static parse(args, context) {\n        if (args.length - 1 < 4) {\n            return context.error(`Expected at least 4 arguments, but found only ${ args.length - 1 }.`);\n        }\n        if ((args.length - 1) % 2 !== 0) {\n            return context.error(`Expected an even number of arguments.`);\n        }\n        const input = context.parse(args[1], 1, NumberType);\n        if (!input)\n            return null;\n        const stops = [];\n        let outputType = null;\n        if (context.expectedType && context.expectedType.kind !== 'value') {\n            outputType = context.expectedType;\n        }\n        for (let i = 1; i < args.length; i += 2) {\n            const label = i === 1 ? -Infinity : args[i];\n            const value = args[i + 1];\n            const labelKey = i;\n            const valueKey = i + 1;\n            if (typeof label !== 'number') {\n                return context.error('Input/output pairs for \"step\" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey);\n            }\n            if (stops.length && stops[stops.length - 1][0] >= label) {\n                return context.error('Input/output pairs for \"step\" expressions must be arranged with input values in strictly ascending order.', labelKey);\n            }\n            const parsed = context.parse(value, valueKey, outputType);\n            if (!parsed)\n                return null;\n            outputType = outputType || parsed.type;\n            stops.push([\n                label,\n                parsed\n            ]);\n        }\n        return new Step(outputType, input, stops);\n    }\n    evaluate(ctx) {\n        const labels = this.labels;\n        const outputs = this.outputs;\n        if (labels.length === 1) {\n            return outputs[0].evaluate(ctx);\n        }\n        const value = this.input.evaluate(ctx);\n        if (value <= labels[0]) {\n            return outputs[0].evaluate(ctx);\n        }\n        const stopCount = labels.length;\n        if (value >= labels[stopCount - 1]) {\n            return outputs[stopCount - 1].evaluate(ctx);\n        }\n        const index = findStopLessThanOrEqualTo(labels, value);\n        return outputs[index].evaluate(ctx);\n    }\n    eachChild(fn) {\n        fn(this.input);\n        for (const expression of this.outputs) {\n            fn(expression);\n        }\n    }\n    outputDefined() {\n        return this.outputs.every(out => out.outputDefined());\n    }\n    serialize() {\n        const serialized = [\n            'step',\n            this.input.serialize()\n        ];\n        for (let i = 0; i < this.labels.length; i++) {\n            if (i > 0) {\n                serialized.push(this.labels[i]);\n            }\n            serialized.push(this.outputs[i].serialize());\n        }\n        return serialized;\n    }\n}\n\n/*\n * Copyright (C) 2008 Apple Inc. All Rights Reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * Ported from Webkit\n * http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/platform/graphics/UnitBezier.h\n */\nvar unitbezier = UnitBezier;\n\nfunction UnitBezier(p1x, p1y, p2x, p2y) {\n    // Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1).\n    this.cx = 3.0 * p1x;\n    this.bx = 3.0 * (p2x - p1x) - this.cx;\n    this.ax = 1.0 - this.cx - this.bx;\n\n    this.cy = 3.0 * p1y;\n    this.by = 3.0 * (p2y - p1y) - this.cy;\n    this.ay = 1.0 - this.cy - this.by;\n\n    this.p1x = p1x;\n    this.p1y = p2y;\n    this.p2x = p2x;\n    this.p2y = p2y;\n}\n\nUnitBezier.prototype.sampleCurveX = function(t) {\n    // `ax t^3 + bx t^2 + cx t' expanded using Horner's rule.\n    return ((this.ax * t + this.bx) * t + this.cx) * t;\n};\n\nUnitBezier.prototype.sampleCurveY = function(t) {\n    return ((this.ay * t + this.by) * t + this.cy) * t;\n};\n\nUnitBezier.prototype.sampleCurveDerivativeX = function(t) {\n    return (3.0 * this.ax * t + 2.0 * this.bx) * t + this.cx;\n};\n\nUnitBezier.prototype.solveCurveX = function(x, epsilon) {\n    if (typeof epsilon === 'undefined') epsilon = 1e-6;\n\n    var t0, t1, t2, x2, i;\n\n    // First try a few iterations of Newton's method -- normally very fast.\n    for (t2 = x, i = 0; i < 8; i++) {\n\n        x2 = this.sampleCurveX(t2) - x;\n        if (Math.abs(x2) < epsilon) return t2;\n\n        var d2 = this.sampleCurveDerivativeX(t2);\n        if (Math.abs(d2) < 1e-6) break;\n\n        t2 = t2 - x2 / d2;\n    }\n\n    // Fall back to the bisection method for reliability.\n    t0 = 0.0;\n    t1 = 1.0;\n    t2 = x;\n\n    if (t2 < t0) return t0;\n    if (t2 > t1) return t1;\n\n    while (t0 < t1) {\n\n        x2 = this.sampleCurveX(t2);\n        if (Math.abs(x2 - x) < epsilon) return t2;\n\n        if (x > x2) {\n            t0 = t2;\n        } else {\n            t1 = t2;\n        }\n\n        t2 = (t1 - t0) * 0.5 + t0;\n    }\n\n    // Failure.\n    return t2;\n};\n\nUnitBezier.prototype.solve = function(x, epsilon) {\n    return this.sampleCurveY(this.solveCurveX(x, epsilon));\n};\n\nfunction number(a, b, t) {\n    return a * (1 - t) + b * t;\n}\nfunction color(from, to, t) {\n    return new Color(number(from.r, to.r, t), number(from.g, to.g, t), number(from.b, to.b, t), number(from.a, to.a, t));\n}\nfunction array$1(from, to, t) {\n    return from.map((d, i) => {\n        return number(d, to[i], t);\n    });\n}\n\nvar interpolate = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  number: number,\n  color: color,\n  array: array$1\n});\n\nconst Xn = 0.95047, Yn = 1, Zn = 1.08883, t0 = 4 / 29, t1 = 6 / 29, t2 = 3 * t1 * t1, t3 = t1 * t1 * t1, deg2rad = Math.PI / 180, rad2deg = 180 / Math.PI;\nfunction xyz2lab(t) {\n    return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\nfunction lab2xyz(t) {\n    return t > t1 ? t * t * t : t2 * (t - t0);\n}\nfunction xyz2rgb(x) {\n    return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\nfunction rgb2xyz(x) {\n    x /= 255;\n    return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\nfunction rgbToLab(rgbColor) {\n    const b = rgb2xyz(rgbColor.r), a = rgb2xyz(rgbColor.g), l = rgb2xyz(rgbColor.b), x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn), y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.072175 * l) / Yn), z = xyz2lab((0.0193339 * b + 0.119192 * a + 0.9503041 * l) / Zn);\n    return {\n        l: 116 * y - 16,\n        a: 500 * (x - y),\n        b: 200 * (y - z),\n        alpha: rgbColor.a\n    };\n}\nfunction labToRgb(labColor) {\n    let y = (labColor.l + 16) / 116, x = isNaN(labColor.a) ? y : y + labColor.a / 500, z = isNaN(labColor.b) ? y : y - labColor.b / 200;\n    y = Yn * lab2xyz(y);\n    x = Xn * lab2xyz(x);\n    z = Zn * lab2xyz(z);\n    return new Color(xyz2rgb(3.2404542 * x - 1.5371385 * y - 0.4985314 * z), xyz2rgb(-0.969266 * x + 1.8760108 * y + 0.041556 * z), xyz2rgb(0.0556434 * x - 0.2040259 * y + 1.0572252 * z), labColor.alpha);\n}\nfunction interpolateLab(from, to, t) {\n    return {\n        l: number(from.l, to.l, t),\n        a: number(from.a, to.a, t),\n        b: number(from.b, to.b, t),\n        alpha: number(from.alpha, to.alpha, t)\n    };\n}\nfunction rgbToHcl(rgbColor) {\n    const {l, a, b} = rgbToLab(rgbColor);\n    const h = Math.atan2(b, a) * rad2deg;\n    return {\n        h: h < 0 ? h + 360 : h,\n        c: Math.sqrt(a * a + b * b),\n        l,\n        alpha: rgbColor.a\n    };\n}\nfunction hclToRgb(hclColor) {\n    const h = hclColor.h * deg2rad, c = hclColor.c, l = hclColor.l;\n    return labToRgb({\n        l,\n        a: Math.cos(h) * c,\n        b: Math.sin(h) * c,\n        alpha: hclColor.alpha\n    });\n}\nfunction interpolateHue(a, b, t) {\n    const d = b - a;\n    return a + t * (d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d);\n}\nfunction interpolateHcl(from, to, t) {\n    return {\n        h: interpolateHue(from.h, to.h, t),\n        c: number(from.c, to.c, t),\n        l: number(from.l, to.l, t),\n        alpha: number(from.alpha, to.alpha, t)\n    };\n}\nconst lab = {\n    forward: rgbToLab,\n    reverse: labToRgb,\n    interpolate: interpolateLab\n};\nconst hcl = {\n    forward: rgbToHcl,\n    reverse: hclToRgb,\n    interpolate: interpolateHcl\n};\n\nvar colorSpaces = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  lab: lab,\n  hcl: hcl\n});\n\nclass Interpolate {\n    constructor(type, operator, interpolation, input, stops) {\n        this.type = type;\n        this.operator = operator;\n        this.interpolation = interpolation;\n        this.input = input;\n        this.labels = [];\n        this.outputs = [];\n        for (const [label, expression] of stops) {\n            this.labels.push(label);\n            this.outputs.push(expression);\n        }\n    }\n    static interpolationFactor(interpolation, input, lower, upper) {\n        let t = 0;\n        if (interpolation.name === 'exponential') {\n            t = exponentialInterpolation(input, interpolation.base, lower, upper);\n        } else if (interpolation.name === 'linear') {\n            t = exponentialInterpolation(input, 1, lower, upper);\n        } else if (interpolation.name === 'cubic-bezier') {\n            const c = interpolation.controlPoints;\n            const ub = new unitbezier(c[0], c[1], c[2], c[3]);\n            t = ub.solve(exponentialInterpolation(input, 1, lower, upper));\n        }\n        return t;\n    }\n    static parse(args, context) {\n        let [operator, interpolation, input, ...rest] = args;\n        if (!Array.isArray(interpolation) || interpolation.length === 0) {\n            return context.error(`Expected an interpolation type expression.`, 1);\n        }\n        if (interpolation[0] === 'linear') {\n            interpolation = { name: 'linear' };\n        } else if (interpolation[0] === 'exponential') {\n            const base = interpolation[1];\n            if (typeof base !== 'number')\n                return context.error(`Exponential interpolation requires a numeric base.`, 1, 1);\n            interpolation = {\n                name: 'exponential',\n                base\n            };\n        } else if (interpolation[0] === 'cubic-bezier') {\n            const controlPoints = interpolation.slice(1);\n            if (controlPoints.length !== 4 || controlPoints.some(t => typeof t !== 'number' || t < 0 || t > 1)) {\n                return context.error('Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.', 1);\n            }\n            interpolation = {\n                name: 'cubic-bezier',\n                controlPoints: controlPoints\n            };\n        } else {\n            return context.error(`Unknown interpolation type ${ String(interpolation[0]) }`, 1, 0);\n        }\n        if (args.length - 1 < 4) {\n            return context.error(`Expected at least 4 arguments, but found only ${ args.length - 1 }.`);\n        }\n        if ((args.length - 1) % 2 !== 0) {\n            return context.error(`Expected an even number of arguments.`);\n        }\n        input = context.parse(input, 2, NumberType);\n        if (!input)\n            return null;\n        const stops = [];\n        let outputType = null;\n        if (operator === 'interpolate-hcl' || operator === 'interpolate-lab') {\n            outputType = ColorType;\n        } else if (context.expectedType && context.expectedType.kind !== 'value') {\n            outputType = context.expectedType;\n        }\n        for (let i = 0; i < rest.length; i += 2) {\n            const label = rest[i];\n            const value = rest[i + 1];\n            const labelKey = i + 3;\n            const valueKey = i + 4;\n            if (typeof label !== 'number') {\n                return context.error('Input/output pairs for \"interpolate\" expressions must be defined using literal numeric values (not computed expressions) for the input values.', labelKey);\n            }\n            if (stops.length && stops[stops.length - 1][0] >= label) {\n                return context.error('Input/output pairs for \"interpolate\" expressions must be arranged with input values in strictly ascending order.', labelKey);\n            }\n            const parsed = context.parse(value, valueKey, outputType);\n            if (!parsed)\n                return null;\n            outputType = outputType || parsed.type;\n            stops.push([\n                label,\n                parsed\n            ]);\n        }\n        if (outputType.kind !== 'number' && outputType.kind !== 'color' && !(outputType.kind === 'array' && outputType.itemType.kind === 'number' && typeof outputType.N === 'number')) {\n            return context.error(`Type ${ toString(outputType) } is not interpolatable.`);\n        }\n        return new Interpolate(outputType, operator, interpolation, input, stops);\n    }\n    evaluate(ctx) {\n        const labels = this.labels;\n        const outputs = this.outputs;\n        if (labels.length === 1) {\n            return outputs[0].evaluate(ctx);\n        }\n        const value = this.input.evaluate(ctx);\n        if (value <= labels[0]) {\n            return outputs[0].evaluate(ctx);\n        }\n        const stopCount = labels.length;\n        if (value >= labels[stopCount - 1]) {\n            return outputs[stopCount - 1].evaluate(ctx);\n        }\n        const index = findStopLessThanOrEqualTo(labels, value);\n        const lower = labels[index];\n        const upper = labels[index + 1];\n        const t = Interpolate.interpolationFactor(this.interpolation, value, lower, upper);\n        const outputLower = outputs[index].evaluate(ctx);\n        const outputUpper = outputs[index + 1].evaluate(ctx);\n        if (this.operator === 'interpolate') {\n            return interpolate[this.type.kind.toLowerCase()](outputLower, outputUpper, t);\n        } else if (this.operator === 'interpolate-hcl') {\n            return hcl.reverse(hcl.interpolate(hcl.forward(outputLower), hcl.forward(outputUpper), t));\n        } else {\n            return lab.reverse(lab.interpolate(lab.forward(outputLower), lab.forward(outputUpper), t));\n        }\n    }\n    eachChild(fn) {\n        fn(this.input);\n        for (const expression of this.outputs) {\n            fn(expression);\n        }\n    }\n    outputDefined() {\n        return this.outputs.every(out => out.outputDefined());\n    }\n    serialize() {\n        let interpolation;\n        if (this.interpolation.name === 'linear') {\n            interpolation = ['linear'];\n        } else if (this.interpolation.name === 'exponential') {\n            if (this.interpolation.base === 1) {\n                interpolation = ['linear'];\n            } else {\n                interpolation = [\n                    'exponential',\n                    this.interpolation.base\n                ];\n            }\n        } else {\n            interpolation = ['cubic-bezier'].concat(this.interpolation.controlPoints);\n        }\n        const serialized = [\n            this.operator,\n            interpolation,\n            this.input.serialize()\n        ];\n        for (let i = 0; i < this.labels.length; i++) {\n            serialized.push(this.labels[i], this.outputs[i].serialize());\n        }\n        return serialized;\n    }\n}\nfunction exponentialInterpolation(input, base, lowerValue, upperValue) {\n    const difference = upperValue - lowerValue;\n    const progress = input - lowerValue;\n    if (difference === 0) {\n        return 0;\n    } else if (base === 1) {\n        return progress / difference;\n    } else {\n        return (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1);\n    }\n}\n\nclass Coalesce {\n    constructor(type, args) {\n        this.type = type;\n        this.args = args;\n    }\n    static parse(args, context) {\n        if (args.length < 2) {\n            return context.error('Expectected at least one argument.');\n        }\n        let outputType = null;\n        const expectedType = context.expectedType;\n        if (expectedType && expectedType.kind !== 'value') {\n            outputType = expectedType;\n        }\n        const parsedArgs = [];\n        for (const arg of args.slice(1)) {\n            const parsed = context.parse(arg, 1 + parsedArgs.length, outputType, undefined, { typeAnnotation: 'omit' });\n            if (!parsed)\n                return null;\n            outputType = outputType || parsed.type;\n            parsedArgs.push(parsed);\n        }\n        const needsAnnotation = expectedType && parsedArgs.some(arg => checkSubtype(expectedType, arg.type));\n        return needsAnnotation ? new Coalesce(ValueType, parsedArgs) : new Coalesce(outputType, parsedArgs);\n    }\n    evaluate(ctx) {\n        let result = null;\n        let argCount = 0;\n        let requestedImageName;\n        for (const arg of this.args) {\n            argCount++;\n            result = arg.evaluate(ctx);\n            if (result && result instanceof ResolvedImage && !result.available) {\n                if (!requestedImageName) {\n                    requestedImageName = result.name;\n                }\n                result = null;\n                if (argCount === this.args.length) {\n                    result = requestedImageName;\n                }\n            }\n            if (result !== null)\n                break;\n        }\n        return result;\n    }\n    eachChild(fn) {\n        this.args.forEach(fn);\n    }\n    outputDefined() {\n        return this.args.every(arg => arg.outputDefined());\n    }\n    serialize() {\n        const serialized = ['coalesce'];\n        this.eachChild(child => {\n            serialized.push(child.serialize());\n        });\n        return serialized;\n    }\n}\n\nclass Let {\n    constructor(bindings, result) {\n        this.type = result.type;\n        this.bindings = [].concat(bindings);\n        this.result = result;\n    }\n    evaluate(ctx) {\n        return this.result.evaluate(ctx);\n    }\n    eachChild(fn) {\n        for (const binding of this.bindings) {\n            fn(binding[1]);\n        }\n        fn(this.result);\n    }\n    static parse(args, context) {\n        if (args.length < 4)\n            return context.error(`Expected at least 3 arguments, but found ${ args.length - 1 } instead.`);\n        const bindings = [];\n        for (let i = 1; i < args.length - 1; i += 2) {\n            const name = args[i];\n            if (typeof name !== 'string') {\n                return context.error(`Expected string, but found ${ typeof name } instead.`, i);\n            }\n            if (/[^a-zA-Z0-9_]/.test(name)) {\n                return context.error(`Variable names must contain only alphanumeric characters or '_'.`, i);\n            }\n            const value = context.parse(args[i + 1], i + 1);\n            if (!value)\n                return null;\n            bindings.push([\n                name,\n                value\n            ]);\n        }\n        const result = context.parse(args[args.length - 1], args.length - 1, context.expectedType, bindings);\n        if (!result)\n            return null;\n        return new Let(bindings, result);\n    }\n    outputDefined() {\n        return this.result.outputDefined();\n    }\n    serialize() {\n        const serialized = ['let'];\n        for (const [name, expr] of this.bindings) {\n            serialized.push(name, expr.serialize());\n        }\n        serialized.push(this.result.serialize());\n        return serialized;\n    }\n}\n\nclass At {\n    constructor(type, index, input) {\n        this.type = type;\n        this.index = index;\n        this.input = input;\n    }\n    static parse(args, context) {\n        if (args.length !== 3)\n            return context.error(`Expected 2 arguments, but found ${ args.length - 1 } instead.`);\n        const index = context.parse(args[1], 1, NumberType);\n        const input = context.parse(args[2], 2, array(context.expectedType || ValueType));\n        if (!index || !input)\n            return null;\n        const t = input.type;\n        return new At(t.itemType, index, input);\n    }\n    evaluate(ctx) {\n        const index = this.index.evaluate(ctx);\n        const array = this.input.evaluate(ctx);\n        if (index < 0) {\n            throw new RuntimeError(`Array index out of bounds: ${ index } < 0.`);\n        }\n        if (index >= array.length) {\n            throw new RuntimeError(`Array index out of bounds: ${ index } > ${ array.length - 1 }.`);\n        }\n        if (index !== Math.floor(index)) {\n            throw new RuntimeError(`Array index must be an integer, but found ${ index } instead.`);\n        }\n        return array[index];\n    }\n    eachChild(fn) {\n        fn(this.index);\n        fn(this.input);\n    }\n    outputDefined() {\n        return false;\n    }\n    serialize() {\n        return [\n            'at',\n            this.index.serialize(),\n            this.input.serialize()\n        ];\n    }\n}\n\nclass In {\n    constructor(needle, haystack) {\n        this.type = BooleanType;\n        this.needle = needle;\n        this.haystack = haystack;\n    }\n    static parse(args, context) {\n        if (args.length !== 3) {\n            return context.error(`Expected 2 arguments, but found ${ args.length - 1 } instead.`);\n        }\n        const needle = context.parse(args[1], 1, ValueType);\n        const haystack = context.parse(args[2], 2, ValueType);\n        if (!needle || !haystack)\n            return null;\n        if (!isValidType(needle.type, [\n                BooleanType,\n                StringType,\n                NumberType,\n                NullType,\n                ValueType\n            ])) {\n            return context.error(`Expected first argument to be of type boolean, string, number or null, but found ${ toString(needle.type) } instead`);\n        }\n        return new In(needle, haystack);\n    }\n    evaluate(ctx) {\n        const needle = this.needle.evaluate(ctx);\n        const haystack = this.haystack.evaluate(ctx);\n        if (!haystack)\n            return false;\n        if (!isValidNativeType(needle, [\n                'boolean',\n                'string',\n                'number',\n                'null'\n            ])) {\n            throw new RuntimeError(`Expected first argument to be of type boolean, string, number or null, but found ${ toString(typeOf(needle)) } instead.`);\n        }\n        if (!isValidNativeType(haystack, [\n                'string',\n                'array'\n            ])) {\n            throw new RuntimeError(`Expected second argument to be of type array or string, but found ${ toString(typeOf(haystack)) } instead.`);\n        }\n        return haystack.indexOf(needle) >= 0;\n    }\n    eachChild(fn) {\n        fn(this.needle);\n        fn(this.haystack);\n    }\n    outputDefined() {\n        return true;\n    }\n    serialize() {\n        return [\n            'in',\n            this.needle.serialize(),\n            this.haystack.serialize()\n        ];\n    }\n}\n\nclass IndexOf {\n    constructor(needle, haystack, fromIndex) {\n        this.type = NumberType;\n        this.needle = needle;\n        this.haystack = haystack;\n        this.fromIndex = fromIndex;\n    }\n    static parse(args, context) {\n        if (args.length <= 2 || args.length >= 5) {\n            return context.error(`Expected 3 or 4 arguments, but found ${ args.length - 1 } instead.`);\n        }\n        const needle = context.parse(args[1], 1, ValueType);\n        const haystack = context.parse(args[2], 2, ValueType);\n        if (!needle || !haystack)\n            return null;\n        if (!isValidType(needle.type, [\n                BooleanType,\n                StringType,\n                NumberType,\n                NullType,\n                ValueType\n            ])) {\n            return context.error(`Expected first argument to be of type boolean, string, number or null, but found ${ toString(needle.type) } instead`);\n        }\n        if (args.length === 4) {\n            const fromIndex = context.parse(args[3], 3, NumberType);\n            if (!fromIndex)\n                return null;\n            return new IndexOf(needle, haystack, fromIndex);\n        } else {\n            return new IndexOf(needle, haystack);\n        }\n    }\n    evaluate(ctx) {\n        const needle = this.needle.evaluate(ctx);\n        const haystack = this.haystack.evaluate(ctx);\n        if (!isValidNativeType(needle, [\n                'boolean',\n                'string',\n                'number',\n                'null'\n            ])) {\n            throw new RuntimeError(`Expected first argument to be of type boolean, string, number or null, but found ${ toString(typeOf(needle)) } instead.`);\n        }\n        if (!isValidNativeType(haystack, [\n                'string',\n                'array'\n            ])) {\n            throw new RuntimeError(`Expected second argument to be of type array or string, but found ${ toString(typeOf(haystack)) } instead.`);\n        }\n        if (this.fromIndex) {\n            const fromIndex = this.fromIndex.evaluate(ctx);\n            return haystack.indexOf(needle, fromIndex);\n        }\n        return haystack.indexOf(needle);\n    }\n    eachChild(fn) {\n        fn(this.needle);\n        fn(this.haystack);\n        if (this.fromIndex) {\n            fn(this.fromIndex);\n        }\n    }\n    outputDefined() {\n        return false;\n    }\n    serialize() {\n        if (this.fromIndex != null && this.fromIndex !== undefined) {\n            const fromIndex = this.fromIndex.serialize();\n            return [\n                'index-of',\n                this.needle.serialize(),\n                this.haystack.serialize(),\n                fromIndex\n            ];\n        }\n        return [\n            'index-of',\n            this.needle.serialize(),\n            this.haystack.serialize()\n        ];\n    }\n}\n\nclass Match {\n    constructor(inputType, outputType, input, cases, outputs, otherwise) {\n        this.inputType = inputType;\n        this.type = outputType;\n        this.input = input;\n        this.cases = cases;\n        this.outputs = outputs;\n        this.otherwise = otherwise;\n    }\n    static parse(args, context) {\n        if (args.length < 5)\n            return context.error(`Expected at least 4 arguments, but found only ${ args.length - 1 }.`);\n        if (args.length % 2 !== 1)\n            return context.error(`Expected an even number of arguments.`);\n        let inputType;\n        let outputType;\n        if (context.expectedType && context.expectedType.kind !== 'value') {\n            outputType = context.expectedType;\n        }\n        const cases = {};\n        const outputs = [];\n        for (let i = 2; i < args.length - 1; i += 2) {\n            let labels = args[i];\n            const value = args[i + 1];\n            if (!Array.isArray(labels)) {\n                labels = [labels];\n            }\n            const labelContext = context.concat(i);\n            if (labels.length === 0) {\n                return labelContext.error('Expected at least one branch label.');\n            }\n            for (const label of labels) {\n                if (typeof label !== 'number' && typeof label !== 'string') {\n                    return labelContext.error(`Branch labels must be numbers or strings.`);\n                } else if (typeof label === 'number' && Math.abs(label) > Number.MAX_SAFE_INTEGER) {\n                    return labelContext.error(`Branch labels must be integers no larger than ${ Number.MAX_SAFE_INTEGER }.`);\n                } else if (typeof label === 'number' && Math.floor(label) !== label) {\n                    return labelContext.error(`Numeric branch labels must be integer values.`);\n                } else if (!inputType) {\n                    inputType = typeOf(label);\n                } else if (labelContext.checkSubtype(inputType, typeOf(label))) {\n                    return null;\n                }\n                if (typeof cases[String(label)] !== 'undefined') {\n                    return labelContext.error('Branch labels must be unique.');\n                }\n                cases[String(label)] = outputs.length;\n            }\n            const result = context.parse(value, i, outputType);\n            if (!result)\n                return null;\n            outputType = outputType || result.type;\n            outputs.push(result);\n        }\n        const input = context.parse(args[1], 1, ValueType);\n        if (!input)\n            return null;\n        const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n        if (!otherwise)\n            return null;\n        if (input.type.kind !== 'value' && context.concat(1).checkSubtype(inputType, input.type)) {\n            return null;\n        }\n        return new Match(inputType, outputType, input, cases, outputs, otherwise);\n    }\n    evaluate(ctx) {\n        const input = this.input.evaluate(ctx);\n        const output = typeOf(input) === this.inputType && this.outputs[this.cases[input]] || this.otherwise;\n        return output.evaluate(ctx);\n    }\n    eachChild(fn) {\n        fn(this.input);\n        this.outputs.forEach(fn);\n        fn(this.otherwise);\n    }\n    outputDefined() {\n        return this.outputs.every(out => out.outputDefined()) && this.otherwise.outputDefined();\n    }\n    serialize() {\n        const serialized = [\n            'match',\n            this.input.serialize()\n        ];\n        const sortedLabels = Object.keys(this.cases).sort();\n        const groupedByOutput = [];\n        const outputLookup = {};\n        for (const label of sortedLabels) {\n            const outputIndex = outputLookup[this.cases[label]];\n            if (outputIndex === undefined) {\n                outputLookup[this.cases[label]] = groupedByOutput.length;\n                groupedByOutput.push([\n                    this.cases[label],\n                    [label]\n                ]);\n            } else {\n                groupedByOutput[outputIndex][1].push(label);\n            }\n        }\n        const coerceLabel = label => this.inputType.kind === 'number' ? Number(label) : label;\n        for (const [outputIndex, labels] of groupedByOutput) {\n            if (labels.length === 1) {\n                serialized.push(coerceLabel(labels[0]));\n            } else {\n                serialized.push(labels.map(coerceLabel));\n            }\n            serialized.push(this.outputs[outputIndex].serialize());\n        }\n        serialized.push(this.otherwise.serialize());\n        return serialized;\n    }\n}\n\nclass Case {\n    constructor(type, branches, otherwise) {\n        this.type = type;\n        this.branches = branches;\n        this.otherwise = otherwise;\n    }\n    static parse(args, context) {\n        if (args.length < 4)\n            return context.error(`Expected at least 3 arguments, but found only ${ args.length - 1 }.`);\n        if (args.length % 2 !== 0)\n            return context.error(`Expected an odd number of arguments.`);\n        let outputType;\n        if (context.expectedType && context.expectedType.kind !== 'value') {\n            outputType = context.expectedType;\n        }\n        const branches = [];\n        for (let i = 1; i < args.length - 1; i += 2) {\n            const test = context.parse(args[i], i, BooleanType);\n            if (!test)\n                return null;\n            const result = context.parse(args[i + 1], i + 1, outputType);\n            if (!result)\n                return null;\n            branches.push([\n                test,\n                result\n            ]);\n            outputType = outputType || result.type;\n        }\n        const otherwise = context.parse(args[args.length - 1], args.length - 1, outputType);\n        if (!otherwise)\n            return null;\n        return new Case(outputType, branches, otherwise);\n    }\n    evaluate(ctx) {\n        for (const [test, expression] of this.branches) {\n            if (test.evaluate(ctx)) {\n                return expression.evaluate(ctx);\n            }\n        }\n        return this.otherwise.evaluate(ctx);\n    }\n    eachChild(fn) {\n        for (const [test, expression] of this.branches) {\n            fn(test);\n            fn(expression);\n        }\n        fn(this.otherwise);\n    }\n    outputDefined() {\n        return this.branches.every(([_, out]) => out.outputDefined()) && this.otherwise.outputDefined();\n    }\n    serialize() {\n        const serialized = ['case'];\n        this.eachChild(child => {\n            serialized.push(child.serialize());\n        });\n        return serialized;\n    }\n}\n\nclass Slice {\n    constructor(type, input, beginIndex, endIndex) {\n        this.type = type;\n        this.input = input;\n        this.beginIndex = beginIndex;\n        this.endIndex = endIndex;\n    }\n    static parse(args, context) {\n        if (args.length <= 2 || args.length >= 5) {\n            return context.error(`Expected 3 or 4 arguments, but found ${ args.length - 1 } instead.`);\n        }\n        const input = context.parse(args[1], 1, ValueType);\n        const beginIndex = context.parse(args[2], 2, NumberType);\n        if (!input || !beginIndex)\n            return null;\n        if (!isValidType(input.type, [\n                array(ValueType),\n                StringType,\n                ValueType\n            ])) {\n            return context.error(`Expected first argument to be of type array or string, but found ${ toString(input.type) } instead`);\n        }\n        if (args.length === 4) {\n            const endIndex = context.parse(args[3], 3, NumberType);\n            if (!endIndex)\n                return null;\n            return new Slice(input.type, input, beginIndex, endIndex);\n        } else {\n            return new Slice(input.type, input, beginIndex);\n        }\n    }\n    evaluate(ctx) {\n        const input = this.input.evaluate(ctx);\n        const beginIndex = this.beginIndex.evaluate(ctx);\n        if (!isValidNativeType(input, [\n                'string',\n                'array'\n            ])) {\n            throw new RuntimeError(`Expected first argument to be of type array or string, but found ${ toString(typeOf(input)) } instead.`);\n        }\n        if (this.endIndex) {\n            const endIndex = this.endIndex.evaluate(ctx);\n            return input.slice(beginIndex, endIndex);\n        }\n        return input.slice(beginIndex);\n    }\n    eachChild(fn) {\n        fn(this.input);\n        fn(this.beginIndex);\n        if (this.endIndex) {\n            fn(this.endIndex);\n        }\n    }\n    outputDefined() {\n        return false;\n    }\n    serialize() {\n        if (this.endIndex != null && this.endIndex !== undefined) {\n            const endIndex = this.endIndex.serialize();\n            return [\n                'slice',\n                this.input.serialize(),\n                this.beginIndex.serialize(),\n                endIndex\n            ];\n        }\n        return [\n            'slice',\n            this.input.serialize(),\n            this.beginIndex.serialize()\n        ];\n    }\n}\n\nfunction isComparableType(op, type) {\n    if (op === '==' || op === '!=') {\n        return type.kind === 'boolean' || type.kind === 'string' || type.kind === 'number' || type.kind === 'null' || type.kind === 'value';\n    } else {\n        return type.kind === 'string' || type.kind === 'number' || type.kind === 'value';\n    }\n}\nfunction eq(ctx, a, b) {\n    return a === b;\n}\nfunction neq(ctx, a, b) {\n    return a !== b;\n}\nfunction lt(ctx, a, b) {\n    return a < b;\n}\nfunction gt(ctx, a, b) {\n    return a > b;\n}\nfunction lteq(ctx, a, b) {\n    return a <= b;\n}\nfunction gteq(ctx, a, b) {\n    return a >= b;\n}\nfunction eqCollate(ctx, a, b, c) {\n    return c.compare(a, b) === 0;\n}\nfunction neqCollate(ctx, a, b, c) {\n    return !eqCollate(ctx, a, b, c);\n}\nfunction ltCollate(ctx, a, b, c) {\n    return c.compare(a, b) < 0;\n}\nfunction gtCollate(ctx, a, b, c) {\n    return c.compare(a, b) > 0;\n}\nfunction lteqCollate(ctx, a, b, c) {\n    return c.compare(a, b) <= 0;\n}\nfunction gteqCollate(ctx, a, b, c) {\n    return c.compare(a, b) >= 0;\n}\nfunction makeComparison(op, compareBasic, compareWithCollator) {\n    const isOrderComparison = op !== '==' && op !== '!=';\n    return class Comparison {\n        constructor(lhs, rhs, collator) {\n            this.type = BooleanType;\n            this.lhs = lhs;\n            this.rhs = rhs;\n            this.collator = collator;\n            this.hasUntypedArgument = lhs.type.kind === 'value' || rhs.type.kind === 'value';\n        }\n        static parse(args, context) {\n            if (args.length !== 3 && args.length !== 4)\n                return context.error(`Expected two or three arguments.`);\n            const op = args[0];\n            let lhs = context.parse(args[1], 1, ValueType);\n            if (!lhs)\n                return null;\n            if (!isComparableType(op, lhs.type)) {\n                return context.concat(1).error(`\"${ op }\" comparisons are not supported for type '${ toString(lhs.type) }'.`);\n            }\n            let rhs = context.parse(args[2], 2, ValueType);\n            if (!rhs)\n                return null;\n            if (!isComparableType(op, rhs.type)) {\n                return context.concat(2).error(`\"${ op }\" comparisons are not supported for type '${ toString(rhs.type) }'.`);\n            }\n            if (lhs.type.kind !== rhs.type.kind && lhs.type.kind !== 'value' && rhs.type.kind !== 'value') {\n                return context.error(`Cannot compare types '${ toString(lhs.type) }' and '${ toString(rhs.type) }'.`);\n            }\n            if (isOrderComparison) {\n                if (lhs.type.kind === 'value' && rhs.type.kind !== 'value') {\n                    lhs = new Assertion(rhs.type, [lhs]);\n                } else if (lhs.type.kind !== 'value' && rhs.type.kind === 'value') {\n                    rhs = new Assertion(lhs.type, [rhs]);\n                }\n            }\n            let collator = null;\n            if (args.length === 4) {\n                if (lhs.type.kind !== 'string' && rhs.type.kind !== 'string' && lhs.type.kind !== 'value' && rhs.type.kind !== 'value') {\n                    return context.error(`Cannot use collator to compare non-string types.`);\n                }\n                collator = context.parse(args[3], 3, CollatorType);\n                if (!collator)\n                    return null;\n            }\n            return new Comparison(lhs, rhs, collator);\n        }\n        evaluate(ctx) {\n            const lhs = this.lhs.evaluate(ctx);\n            const rhs = this.rhs.evaluate(ctx);\n            if (isOrderComparison && this.hasUntypedArgument) {\n                const lt = typeOf(lhs);\n                const rt = typeOf(rhs);\n                if (lt.kind !== rt.kind || !(lt.kind === 'string' || lt.kind === 'number')) {\n                    throw new RuntimeError(`Expected arguments for \"${ op }\" to be (string, string) or (number, number), but found (${ lt.kind }, ${ rt.kind }) instead.`);\n                }\n            }\n            if (this.collator && !isOrderComparison && this.hasUntypedArgument) {\n                const lt = typeOf(lhs);\n                const rt = typeOf(rhs);\n                if (lt.kind !== 'string' || rt.kind !== 'string') {\n                    return compareBasic(ctx, lhs, rhs);\n                }\n            }\n            return this.collator ? compareWithCollator(ctx, lhs, rhs, this.collator.evaluate(ctx)) : compareBasic(ctx, lhs, rhs);\n        }\n        eachChild(fn) {\n            fn(this.lhs);\n            fn(this.rhs);\n            if (this.collator) {\n                fn(this.collator);\n            }\n        }\n        outputDefined() {\n            return true;\n        }\n        serialize() {\n            const serialized = [op];\n            this.eachChild(child => {\n                serialized.push(child.serialize());\n            });\n            return serialized;\n        }\n    };\n}\nconst Equals = makeComparison('==', eq, eqCollate);\nconst NotEquals = makeComparison('!=', neq, neqCollate);\nconst LessThan = makeComparison('<', lt, ltCollate);\nconst GreaterThan = makeComparison('>', gt, gtCollate);\nconst LessThanOrEqual = makeComparison('<=', lteq, lteqCollate);\nconst GreaterThanOrEqual = makeComparison('>=', gteq, gteqCollate);\n\nclass NumberFormat {\n    constructor(number, locale, currency, minFractionDigits, maxFractionDigits) {\n        this.type = StringType;\n        this.number = number;\n        this.locale = locale;\n        this.currency = currency;\n        this.minFractionDigits = minFractionDigits;\n        this.maxFractionDigits = maxFractionDigits;\n    }\n    static parse(args, context) {\n        if (args.length !== 3)\n            return context.error(`Expected two arguments.`);\n        const number = context.parse(args[1], 1, NumberType);\n        if (!number)\n            return null;\n        const options = args[2];\n        if (typeof options !== 'object' || Array.isArray(options))\n            return context.error(`NumberFormat options argument must be an object.`);\n        let locale = null;\n        if (options['locale']) {\n            locale = context.parse(options['locale'], 1, StringType);\n            if (!locale)\n                return null;\n        }\n        let currency = null;\n        if (options['currency']) {\n            currency = context.parse(options['currency'], 1, StringType);\n            if (!currency)\n                return null;\n        }\n        let minFractionDigits = null;\n        if (options['min-fraction-digits']) {\n            minFractionDigits = context.parse(options['min-fraction-digits'], 1, NumberType);\n            if (!minFractionDigits)\n                return null;\n        }\n        let maxFractionDigits = null;\n        if (options['max-fraction-digits']) {\n            maxFractionDigits = context.parse(options['max-fraction-digits'], 1, NumberType);\n            if (!maxFractionDigits)\n                return null;\n        }\n        return new NumberFormat(number, locale, currency, minFractionDigits, maxFractionDigits);\n    }\n    evaluate(ctx) {\n        return new Intl.NumberFormat(this.locale ? this.locale.evaluate(ctx) : [], {\n            style: this.currency ? 'currency' : 'decimal',\n            currency: this.currency ? this.currency.evaluate(ctx) : undefined,\n            minimumFractionDigits: this.minFractionDigits ? this.minFractionDigits.evaluate(ctx) : undefined,\n            maximumFractionDigits: this.maxFractionDigits ? this.maxFractionDigits.evaluate(ctx) : undefined\n        }).format(this.number.evaluate(ctx));\n    }\n    eachChild(fn) {\n        fn(this.number);\n        if (this.locale) {\n            fn(this.locale);\n        }\n        if (this.currency) {\n            fn(this.currency);\n        }\n        if (this.minFractionDigits) {\n            fn(this.minFractionDigits);\n        }\n        if (this.maxFractionDigits) {\n            fn(this.maxFractionDigits);\n        }\n    }\n    outputDefined() {\n        return false;\n    }\n    serialize() {\n        const options = {};\n        if (this.locale) {\n            options['locale'] = this.locale.serialize();\n        }\n        if (this.currency) {\n            options['currency'] = this.currency.serialize();\n        }\n        if (this.minFractionDigits) {\n            options['min-fraction-digits'] = this.minFractionDigits.serialize();\n        }\n        if (this.maxFractionDigits) {\n            options['max-fraction-digits'] = this.maxFractionDigits.serialize();\n        }\n        return [\n            'number-format',\n            this.number.serialize(),\n            options\n        ];\n    }\n}\n\nclass Length {\n    constructor(input) {\n        this.type = NumberType;\n        this.input = input;\n    }\n    static parse(args, context) {\n        if (args.length !== 2)\n            return context.error(`Expected 1 argument, but found ${ args.length - 1 } instead.`);\n        const input = context.parse(args[1], 1);\n        if (!input)\n            return null;\n        if (input.type.kind !== 'array' && input.type.kind !== 'string' && input.type.kind !== 'value')\n            return context.error(`Expected argument of type string or array, but found ${ toString(input.type) } instead.`);\n        return new Length(input);\n    }\n    evaluate(ctx) {\n        const input = this.input.evaluate(ctx);\n        if (typeof input === 'string') {\n            return input.length;\n        } else if (Array.isArray(input)) {\n            return input.length;\n        } else {\n            throw new RuntimeError(`Expected value to be of type string or array, but found ${ toString(typeOf(input)) } instead.`);\n        }\n    }\n    eachChild(fn) {\n        fn(this.input);\n    }\n    outputDefined() {\n        return false;\n    }\n    serialize() {\n        const serialized = ['length'];\n        this.eachChild(child => {\n            serialized.push(child.serialize());\n        });\n        return serialized;\n    }\n}\n\nconst expressions = {\n    '==': Equals,\n    '!=': NotEquals,\n    '>': GreaterThan,\n    '<': LessThan,\n    '>=': GreaterThanOrEqual,\n    '<=': LessThanOrEqual,\n    'array': Assertion,\n    'at': At,\n    'boolean': Assertion,\n    'case': Case,\n    'coalesce': Coalesce,\n    'collator': CollatorExpression,\n    'format': FormatExpression,\n    'image': ImageExpression,\n    'in': In,\n    'index-of': IndexOf,\n    'interpolate': Interpolate,\n    'interpolate-hcl': Interpolate,\n    'interpolate-lab': Interpolate,\n    'length': Length,\n    'let': Let,\n    'literal': Literal,\n    'match': Match,\n    'number': Assertion,\n    'number-format': NumberFormat,\n    'object': Assertion,\n    'slice': Slice,\n    'step': Step,\n    'string': Assertion,\n    'to-boolean': Coercion,\n    'to-color': Coercion,\n    'to-number': Coercion,\n    'to-string': Coercion,\n    'var': Var,\n    'within': Within\n};\nfunction rgba(ctx, [r, g, b, a]) {\n    r = r.evaluate(ctx);\n    g = g.evaluate(ctx);\n    b = b.evaluate(ctx);\n    const alpha = a ? a.evaluate(ctx) : 1;\n    const error = validateRGBA(r, g, b, alpha);\n    if (error)\n        throw new RuntimeError(error);\n    return new Color(r / 255 * alpha, g / 255 * alpha, b / 255 * alpha, alpha);\n}\nfunction has(key, obj) {\n    return key in obj;\n}\nfunction get(key, obj) {\n    const v = obj[key];\n    return typeof v === 'undefined' ? null : v;\n}\nfunction binarySearch(v, a, i, j) {\n    while (i <= j) {\n        const m = i + j >> 1;\n        if (a[m] === v)\n            return true;\n        if (a[m] > v)\n            j = m - 1;\n        else\n            i = m + 1;\n    }\n    return false;\n}\nfunction varargs(type) {\n    return { type };\n}\nCompoundExpression.register(expressions, {\n    'error': [\n        ErrorType,\n        [StringType],\n        (ctx, [v]) => {\n            throw new RuntimeError(v.evaluate(ctx));\n        }\n    ],\n    'typeof': [\n        StringType,\n        [ValueType],\n        (ctx, [v]) => toString(typeOf(v.evaluate(ctx)))\n    ],\n    'to-rgba': [\n        array(NumberType, 4),\n        [ColorType],\n        (ctx, [v]) => {\n            return v.evaluate(ctx).toArray();\n        }\n    ],\n    'rgb': [\n        ColorType,\n        [\n            NumberType,\n            NumberType,\n            NumberType\n        ],\n        rgba\n    ],\n    'rgba': [\n        ColorType,\n        [\n            NumberType,\n            NumberType,\n            NumberType,\n            NumberType\n        ],\n        rgba\n    ],\n    'has': {\n        type: BooleanType,\n        overloads: [\n            [\n                [StringType],\n                (ctx, [key]) => has(key.evaluate(ctx), ctx.properties())\n            ],\n            [\n                [\n                    StringType,\n                    ObjectType\n                ],\n                (ctx, [key, obj]) => has(key.evaluate(ctx), obj.evaluate(ctx))\n            ]\n        ]\n    },\n    'get': {\n        type: ValueType,\n        overloads: [\n            [\n                [StringType],\n                (ctx, [key]) => get(key.evaluate(ctx), ctx.properties())\n            ],\n            [\n                [\n                    StringType,\n                    ObjectType\n                ],\n                (ctx, [key, obj]) => get(key.evaluate(ctx), obj.evaluate(ctx))\n            ]\n        ]\n    },\n    'feature-state': [\n        ValueType,\n        [StringType],\n        (ctx, [key]) => get(key.evaluate(ctx), ctx.featureState || {})\n    ],\n    'properties': [\n        ObjectType,\n        [],\n        ctx => ctx.properties()\n    ],\n    'geometry-type': [\n        StringType,\n        [],\n        ctx => ctx.geometryType()\n    ],\n    'id': [\n        ValueType,\n        [],\n        ctx => ctx.id()\n    ],\n    'zoom': [\n        NumberType,\n        [],\n        ctx => ctx.globals.zoom\n    ],\n    'heatmap-density': [\n        NumberType,\n        [],\n        ctx => ctx.globals.heatmapDensity || 0\n    ],\n    'line-progress': [\n        NumberType,\n        [],\n        ctx => ctx.globals.lineProgress || 0\n    ],\n    'sky-radial-progress': [\n        NumberType,\n        [],\n        ctx => ctx.globals.skyRadialProgress || 0\n    ],\n    'accumulated': [\n        ValueType,\n        [],\n        ctx => ctx.globals.accumulated === undefined ? null : ctx.globals.accumulated\n    ],\n    '+': [\n        NumberType,\n        varargs(NumberType),\n        (ctx, args) => {\n            let result = 0;\n            for (const arg of args) {\n                result += arg.evaluate(ctx);\n            }\n            return result;\n        }\n    ],\n    '*': [\n        NumberType,\n        varargs(NumberType),\n        (ctx, args) => {\n            let result = 1;\n            for (const arg of args) {\n                result *= arg.evaluate(ctx);\n            }\n            return result;\n        }\n    ],\n    '-': {\n        type: NumberType,\n        overloads: [\n            [\n                [\n                    NumberType,\n                    NumberType\n                ],\n                (ctx, [a, b]) => a.evaluate(ctx) - b.evaluate(ctx)\n            ],\n            [\n                [NumberType],\n                (ctx, [a]) => -a.evaluate(ctx)\n            ]\n        ]\n    },\n    '/': [\n        NumberType,\n        [\n            NumberType,\n            NumberType\n        ],\n        (ctx, [a, b]) => a.evaluate(ctx) / b.evaluate(ctx)\n    ],\n    '%': [\n        NumberType,\n        [\n            NumberType,\n            NumberType\n        ],\n        (ctx, [a, b]) => a.evaluate(ctx) % b.evaluate(ctx)\n    ],\n    'ln2': [\n        NumberType,\n        [],\n        () => Math.LN2\n    ],\n    'pi': [\n        NumberType,\n        [],\n        () => Math.PI\n    ],\n    'e': [\n        NumberType,\n        [],\n        () => Math.E\n    ],\n    '^': [\n        NumberType,\n        [\n            NumberType,\n            NumberType\n        ],\n        (ctx, [b, e]) => Math.pow(b.evaluate(ctx), e.evaluate(ctx))\n    ],\n    'sqrt': [\n        NumberType,\n        [NumberType],\n        (ctx, [x]) => Math.sqrt(x.evaluate(ctx))\n    ],\n    'log10': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN10\n    ],\n    'ln': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.log(n.evaluate(ctx))\n    ],\n    'log2': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.log(n.evaluate(ctx)) / Math.LN2\n    ],\n    'sin': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.sin(n.evaluate(ctx))\n    ],\n    'cos': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.cos(n.evaluate(ctx))\n    ],\n    'tan': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.tan(n.evaluate(ctx))\n    ],\n    'asin': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.asin(n.evaluate(ctx))\n    ],\n    'acos': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.acos(n.evaluate(ctx))\n    ],\n    'atan': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.atan(n.evaluate(ctx))\n    ],\n    'min': [\n        NumberType,\n        varargs(NumberType),\n        (ctx, args) => Math.min(...args.map(arg => arg.evaluate(ctx)))\n    ],\n    'max': [\n        NumberType,\n        varargs(NumberType),\n        (ctx, args) => Math.max(...args.map(arg => arg.evaluate(ctx)))\n    ],\n    'abs': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.abs(n.evaluate(ctx))\n    ],\n    'round': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => {\n            const v = n.evaluate(ctx);\n            return v < 0 ? -Math.round(-v) : Math.round(v);\n        }\n    ],\n    'floor': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.floor(n.evaluate(ctx))\n    ],\n    'ceil': [\n        NumberType,\n        [NumberType],\n        (ctx, [n]) => Math.ceil(n.evaluate(ctx))\n    ],\n    'filter-==': [\n        BooleanType,\n        [\n            StringType,\n            ValueType\n        ],\n        (ctx, [k, v]) => ctx.properties()[k.value] === v.value\n    ],\n    'filter-id-==': [\n        BooleanType,\n        [ValueType],\n        (ctx, [v]) => ctx.id() === v.value\n    ],\n    'filter-type-==': [\n        BooleanType,\n        [StringType],\n        (ctx, [v]) => ctx.geometryType() === v.value\n    ],\n    'filter-<': [\n        BooleanType,\n        [\n            StringType,\n            ValueType\n        ],\n        (ctx, [k, v]) => {\n            const a = ctx.properties()[k.value];\n            const b = v.value;\n            return typeof a === typeof b && a < b;\n        }\n    ],\n    'filter-id-<': [\n        BooleanType,\n        [ValueType],\n        (ctx, [v]) => {\n            const a = ctx.id();\n            const b = v.value;\n            return typeof a === typeof b && a < b;\n        }\n    ],\n    'filter->': [\n        BooleanType,\n        [\n            StringType,\n            ValueType\n        ],\n        (ctx, [k, v]) => {\n            const a = ctx.properties()[k.value];\n            const b = v.value;\n            return typeof a === typeof b && a > b;\n        }\n    ],\n    'filter-id->': [\n        BooleanType,\n        [ValueType],\n        (ctx, [v]) => {\n            const a = ctx.id();\n            const b = v.value;\n            return typeof a === typeof b && a > b;\n        }\n    ],\n    'filter-<=': [\n        BooleanType,\n        [\n            StringType,\n            ValueType\n        ],\n        (ctx, [k, v]) => {\n            const a = ctx.properties()[k.value];\n            const b = v.value;\n            return typeof a === typeof b && a <= b;\n        }\n    ],\n    'filter-id-<=': [\n        BooleanType,\n        [ValueType],\n        (ctx, [v]) => {\n            const a = ctx.id();\n            const b = v.value;\n            return typeof a === typeof b && a <= b;\n        }\n    ],\n    'filter->=': [\n        BooleanType,\n        [\n            StringType,\n            ValueType\n        ],\n        (ctx, [k, v]) => {\n            const a = ctx.properties()[k.value];\n            const b = v.value;\n            return typeof a === typeof b && a >= b;\n        }\n    ],\n    'filter-id->=': [\n        BooleanType,\n        [ValueType],\n        (ctx, [v]) => {\n            const a = ctx.id();\n            const b = v.value;\n            return typeof a === typeof b && a >= b;\n        }\n    ],\n    'filter-has': [\n        BooleanType,\n        [ValueType],\n        (ctx, [k]) => k.value in ctx.properties()\n    ],\n    'filter-has-id': [\n        BooleanType,\n        [],\n        ctx => ctx.id() !== null && ctx.id() !== undefined\n    ],\n    'filter-type-in': [\n        BooleanType,\n        [array(StringType)],\n        (ctx, [v]) => v.value.indexOf(ctx.geometryType()) >= 0\n    ],\n    'filter-id-in': [\n        BooleanType,\n        [array(ValueType)],\n        (ctx, [v]) => v.value.indexOf(ctx.id()) >= 0\n    ],\n    'filter-in-small': [\n        BooleanType,\n        [\n            StringType,\n            array(ValueType)\n        ],\n        (ctx, [k, v]) => v.value.indexOf(ctx.properties()[k.value]) >= 0\n    ],\n    'filter-in-large': [\n        BooleanType,\n        [\n            StringType,\n            array(ValueType)\n        ],\n        (ctx, [k, v]) => binarySearch(ctx.properties()[k.value], v.value, 0, v.value.length - 1)\n    ],\n    'all': {\n        type: BooleanType,\n        overloads: [\n            [\n                [\n                    BooleanType,\n                    BooleanType\n                ],\n                (ctx, [a, b]) => a.evaluate(ctx) && b.evaluate(ctx)\n            ],\n            [\n                varargs(BooleanType),\n                (ctx, args) => {\n                    for (const arg of args) {\n                        if (!arg.evaluate(ctx))\n                            return false;\n                    }\n                    return true;\n                }\n            ]\n        ]\n    },\n    'any': {\n        type: BooleanType,\n        overloads: [\n            [\n                [\n                    BooleanType,\n                    BooleanType\n                ],\n                (ctx, [a, b]) => a.evaluate(ctx) || b.evaluate(ctx)\n            ],\n            [\n                varargs(BooleanType),\n                (ctx, args) => {\n                    for (const arg of args) {\n                        if (arg.evaluate(ctx))\n                            return true;\n                    }\n                    return false;\n                }\n            ]\n        ]\n    },\n    '!': [\n        BooleanType,\n        [BooleanType],\n        (ctx, [b]) => !b.evaluate(ctx)\n    ],\n    'is-supported-script': [\n        BooleanType,\n        [StringType],\n        (ctx, [s]) => {\n            const isSupportedScript = ctx.globals && ctx.globals.isSupportedScript;\n            if (isSupportedScript) {\n                return isSupportedScript(s.evaluate(ctx));\n            }\n            return true;\n        }\n    ],\n    'upcase': [\n        StringType,\n        [StringType],\n        (ctx, [s]) => s.evaluate(ctx).toUpperCase()\n    ],\n    'downcase': [\n        StringType,\n        [StringType],\n        (ctx, [s]) => s.evaluate(ctx).toLowerCase()\n    ],\n    'concat': [\n        StringType,\n        varargs(ValueType),\n        (ctx, args) => args.map(arg => toString$1(arg.evaluate(ctx))).join('')\n    ],\n    'resolved-locale': [\n        StringType,\n        [CollatorType],\n        (ctx, [collator]) => collator.evaluate(ctx).resolvedLocale()\n    ]\n});\n\nfunction success(value) {\n    return {\n        result: 'success',\n        value\n    };\n}\nfunction error(value) {\n    return {\n        result: 'error',\n        value\n    };\n}\n\nfunction supportsPropertyExpression(spec) {\n    return spec['property-type'] === 'data-driven' || spec['property-type'] === 'cross-faded-data-driven';\n}\nfunction supportsZoomExpression(spec) {\n    return !!spec.expression && spec.expression.parameters.indexOf('zoom') > -1;\n}\nfunction supportsInterpolation(spec) {\n    return !!spec.expression && spec.expression.interpolated;\n}\n\nfunction getType(val) {\n    if (val instanceof Number) {\n        return 'number';\n    } else if (val instanceof String) {\n        return 'string';\n    } else if (val instanceof Boolean) {\n        return 'boolean';\n    } else if (Array.isArray(val)) {\n        return 'array';\n    } else if (val === null) {\n        return 'null';\n    } else {\n        return typeof val;\n    }\n}\n\nfunction isFunction$1(value) {\n    return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\nfunction identityFunction(x) {\n    return x;\n}\nfunction createFunction(parameters, propertySpec) {\n    const isColor = propertySpec.type === 'color';\n    const zoomAndFeatureDependent = parameters.stops && typeof parameters.stops[0][0] === 'object';\n    const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n    const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n    const type = parameters.type || (supportsInterpolation(propertySpec) ? 'exponential' : 'interval');\n    if (isColor) {\n        parameters = extend({}, parameters);\n        if (parameters.stops) {\n            parameters.stops = parameters.stops.map(stop => {\n                return [\n                    stop[0],\n                    Color.parse(stop[1])\n                ];\n            });\n        }\n        if (parameters.default) {\n            parameters.default = Color.parse(parameters.default);\n        } else {\n            parameters.default = Color.parse(propertySpec.default);\n        }\n    }\n    if (parameters.colorSpace && parameters.colorSpace !== 'rgb' && !colorSpaces[parameters.colorSpace]) {\n        throw new Error(`Unknown color space: ${ parameters.colorSpace }`);\n    }\n    let innerFun;\n    let hashedStops;\n    let categoricalKeyType;\n    if (type === 'exponential') {\n        innerFun = evaluateExponentialFunction;\n    } else if (type === 'interval') {\n        innerFun = evaluateIntervalFunction;\n    } else if (type === 'categorical') {\n        innerFun = evaluateCategoricalFunction;\n        hashedStops = Object.create(null);\n        for (const stop of parameters.stops) {\n            hashedStops[stop[0]] = stop[1];\n        }\n        categoricalKeyType = typeof parameters.stops[0][0];\n    } else if (type === 'identity') {\n        innerFun = evaluateIdentityFunction;\n    } else {\n        throw new Error(`Unknown function type \"${ type }\"`);\n    }\n    if (zoomAndFeatureDependent) {\n        const featureFunctions = {};\n        const zoomStops = [];\n        for (let s = 0; s < parameters.stops.length; s++) {\n            const stop = parameters.stops[s];\n            const zoom = stop[0].zoom;\n            if (featureFunctions[zoom] === undefined) {\n                featureFunctions[zoom] = {\n                    zoom,\n                    type: parameters.type,\n                    property: parameters.property,\n                    default: parameters.default,\n                    stops: []\n                };\n                zoomStops.push(zoom);\n            }\n            featureFunctions[zoom].stops.push([\n                stop[0].value,\n                stop[1]\n            ]);\n        }\n        const featureFunctionStops = [];\n        for (const z of zoomStops) {\n            featureFunctionStops.push([\n                featureFunctions[z].zoom,\n                createFunction(featureFunctions[z], propertySpec)\n            ]);\n        }\n        const interpolationType = { name: 'linear' };\n        return {\n            kind: 'composite',\n            interpolationType,\n            interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n            zoomStops: featureFunctionStops.map(s => s[0]),\n            evaluate({zoom}, properties) {\n                return evaluateExponentialFunction({\n                    stops: featureFunctionStops,\n                    base: parameters.base\n                }, propertySpec, zoom).evaluate(zoom, properties);\n            }\n        };\n    } else if (zoomDependent) {\n        const interpolationType = type === 'exponential' ? {\n            name: 'exponential',\n            base: parameters.base !== undefined ? parameters.base : 1\n        } : null;\n        return {\n            kind: 'camera',\n            interpolationType,\n            interpolationFactor: Interpolate.interpolationFactor.bind(undefined, interpolationType),\n            zoomStops: parameters.stops.map(s => s[0]),\n            evaluate: ({zoom}) => innerFun(parameters, propertySpec, zoom, hashedStops, categoricalKeyType)\n        };\n    } else {\n        return {\n            kind: 'source',\n            evaluate(_, feature) {\n                const value = feature && feature.properties ? feature.properties[parameters.property] : undefined;\n                if (value === undefined) {\n                    return coalesce(parameters.default, propertySpec.default);\n                }\n                return innerFun(parameters, propertySpec, value, hashedStops, categoricalKeyType);\n            }\n        };\n    }\n}\nfunction coalesce(a, b, c) {\n    if (a !== undefined)\n        return a;\n    if (b !== undefined)\n        return b;\n    if (c !== undefined)\n        return c;\n}\nfunction evaluateCategoricalFunction(parameters, propertySpec, input, hashedStops, keyType) {\n    const evaluated = typeof input === keyType ? hashedStops[input] : undefined;\n    return coalesce(evaluated, parameters.default, propertySpec.default);\n}\nfunction evaluateIntervalFunction(parameters, propertySpec, input) {\n    if (getType(input) !== 'number')\n        return coalesce(parameters.default, propertySpec.default);\n    const n = parameters.stops.length;\n    if (n === 1)\n        return parameters.stops[0][1];\n    if (input <= parameters.stops[0][0])\n        return parameters.stops[0][1];\n    if (input >= parameters.stops[n - 1][0])\n        return parameters.stops[n - 1][1];\n    const index = findStopLessThanOrEqualTo(parameters.stops.map(stop => stop[0]), input);\n    return parameters.stops[index][1];\n}\nfunction evaluateExponentialFunction(parameters, propertySpec, input) {\n    const base = parameters.base !== undefined ? parameters.base : 1;\n    if (getType(input) !== 'number')\n        return coalesce(parameters.default, propertySpec.default);\n    const n = parameters.stops.length;\n    if (n === 1)\n        return parameters.stops[0][1];\n    if (input <= parameters.stops[0][0])\n        return parameters.stops[0][1];\n    if (input >= parameters.stops[n - 1][0])\n        return parameters.stops[n - 1][1];\n    const index = findStopLessThanOrEqualTo(parameters.stops.map(stop => stop[0]), input);\n    const t = interpolationFactor(input, base, parameters.stops[index][0], parameters.stops[index + 1][0]);\n    const outputLower = parameters.stops[index][1];\n    const outputUpper = parameters.stops[index + 1][1];\n    let interp = interpolate[propertySpec.type] || identityFunction;\n    if (parameters.colorSpace && parameters.colorSpace !== 'rgb') {\n        const colorspace = colorSpaces[parameters.colorSpace];\n        interp = (a, b) => colorspace.reverse(colorspace.interpolate(colorspace.forward(a), colorspace.forward(b), t));\n    }\n    if (typeof outputLower.evaluate === 'function') {\n        return {\n            evaluate(...args) {\n                const evaluatedLower = outputLower.evaluate.apply(undefined, args);\n                const evaluatedUpper = outputUpper.evaluate.apply(undefined, args);\n                if (evaluatedLower === undefined || evaluatedUpper === undefined) {\n                    return undefined;\n                }\n                return interp(evaluatedLower, evaluatedUpper, t);\n            }\n        };\n    }\n    return interp(outputLower, outputUpper, t);\n}\nfunction evaluateIdentityFunction(parameters, propertySpec, input) {\n    if (propertySpec.type === 'color') {\n        input = Color.parse(input);\n    } else if (propertySpec.type === 'formatted') {\n        input = Formatted.fromString(input.toString());\n    } else if (propertySpec.type === 'resolvedImage') {\n        input = ResolvedImage.fromString(input.toString());\n    } else if (getType(input) !== propertySpec.type && (propertySpec.type !== 'enum' || !propertySpec.values[input])) {\n        input = undefined;\n    }\n    return coalesce(input, parameters.default, propertySpec.default);\n}\nfunction interpolationFactor(input, base, lowerValue, upperValue) {\n    const difference = upperValue - lowerValue;\n    const progress = input - lowerValue;\n    if (difference === 0) {\n        return 0;\n    } else if (base === 1) {\n        return progress / difference;\n    } else {\n        return (Math.pow(base, progress) - 1) / (Math.pow(base, difference) - 1);\n    }\n}\n\nclass StyleExpression {\n    constructor(expression, propertySpec) {\n        this.expression = expression;\n        this._warningHistory = {};\n        this._evaluator = new EvaluationContext();\n        this._defaultValue = propertySpec ? getDefaultValue(propertySpec) : null;\n        this._enumValues = propertySpec && propertySpec.type === 'enum' ? propertySpec.values : null;\n    }\n    evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {\n        this._evaluator.globals = globals;\n        this._evaluator.feature = feature;\n        this._evaluator.featureState = featureState;\n        this._evaluator.canonical = canonical;\n        this._evaluator.availableImages = availableImages || null;\n        this._evaluator.formattedSection = formattedSection;\n        return this.expression.evaluate(this._evaluator);\n    }\n    evaluate(globals, feature, featureState, canonical, availableImages, formattedSection) {\n        this._evaluator.globals = globals;\n        this._evaluator.feature = feature || null;\n        this._evaluator.featureState = featureState || null;\n        this._evaluator.canonical = canonical;\n        this._evaluator.availableImages = availableImages || null;\n        this._evaluator.formattedSection = formattedSection || null;\n        try {\n            const val = this.expression.evaluate(this._evaluator);\n            if (val === null || val === undefined || typeof val === 'number' && val !== val) {\n                return this._defaultValue;\n            }\n            if (this._enumValues && !(val in this._enumValues)) {\n                throw new RuntimeError(`Expected value to be one of ${ Object.keys(this._enumValues).map(v => JSON.stringify(v)).join(', ') }, but found ${ JSON.stringify(val) } instead.`);\n            }\n            return val;\n        } catch (e) {\n            if (!this._warningHistory[e.message]) {\n                this._warningHistory[e.message] = true;\n                if (typeof console !== 'undefined') {\n                    console.warn(e.message);\n                }\n            }\n            return this._defaultValue;\n        }\n    }\n}\nfunction isExpression(expression) {\n    return Array.isArray(expression) && expression.length > 0 && typeof expression[0] === 'string' && expression[0] in expressions;\n}\nfunction createExpression(expression, propertySpec) {\n    const parser = new ParsingContext(expressions, [], propertySpec ? getExpectedType(propertySpec) : undefined);\n    const parsed = parser.parse(expression, undefined, undefined, undefined, propertySpec && propertySpec.type === 'string' ? { typeAnnotation: 'coerce' } : undefined);\n    if (!parsed) {\n        return error(parser.errors);\n    }\n    return success(new StyleExpression(parsed, propertySpec));\n}\nclass ZoomConstantExpression {\n    constructor(kind, expression) {\n        this.kind = kind;\n        this._styleExpression = expression;\n        this.isStateDependent = kind !== 'constant' && !isStateConstant(expression.expression);\n    }\n    evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {\n        return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n    }\n    evaluate(globals, feature, featureState, canonical, availableImages, formattedSection) {\n        return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n    }\n}\nclass ZoomDependentExpression {\n    constructor(kind, expression, zoomStops, interpolationType) {\n        this.kind = kind;\n        this.zoomStops = zoomStops;\n        this._styleExpression = expression;\n        this.isStateDependent = kind !== 'camera' && !isStateConstant(expression.expression);\n        this.interpolationType = interpolationType;\n    }\n    evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection) {\n        return this._styleExpression.evaluateWithoutErrorHandling(globals, feature, featureState, canonical, availableImages, formattedSection);\n    }\n    evaluate(globals, feature, featureState, canonical, availableImages, formattedSection) {\n        return this._styleExpression.evaluate(globals, feature, featureState, canonical, availableImages, formattedSection);\n    }\n    interpolationFactor(input, lower, upper) {\n        if (this.interpolationType) {\n            return Interpolate.interpolationFactor(this.interpolationType, input, lower, upper);\n        } else {\n            return 0;\n        }\n    }\n}\nfunction createPropertyExpression(expression, propertySpec) {\n    expression = createExpression(expression, propertySpec);\n    if (expression.result === 'error') {\n        return expression;\n    }\n    const parsed = expression.value.expression;\n    const isFeatureConstant$1 = isFeatureConstant(parsed);\n    if (!isFeatureConstant$1 && !supportsPropertyExpression(propertySpec)) {\n        return error([new ParsingError('', 'data expressions not supported')]);\n    }\n    const isZoomConstant = isGlobalPropertyConstant(parsed, ['zoom']);\n    if (!isZoomConstant && !supportsZoomExpression(propertySpec)) {\n        return error([new ParsingError('', 'zoom expressions not supported')]);\n    }\n    const zoomCurve = findZoomCurve(parsed);\n    if (!zoomCurve && !isZoomConstant) {\n        return error([new ParsingError('', '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.')]);\n    } else if (zoomCurve instanceof ParsingError) {\n        return error([zoomCurve]);\n    } else if (zoomCurve instanceof Interpolate && !supportsInterpolation(propertySpec)) {\n        return error([new ParsingError('', '\"interpolate\" expressions cannot be used with this property')]);\n    }\n    if (!zoomCurve) {\n        return success(isFeatureConstant$1 ? new ZoomConstantExpression('constant', expression.value) : new ZoomConstantExpression('source', expression.value));\n    }\n    const interpolationType = zoomCurve instanceof Interpolate ? zoomCurve.interpolation : undefined;\n    return success(isFeatureConstant$1 ? new ZoomDependentExpression('camera', expression.value, zoomCurve.labels, interpolationType) : new ZoomDependentExpression('composite', expression.value, zoomCurve.labels, interpolationType));\n}\nclass StylePropertyFunction {\n    constructor(parameters, specification) {\n        this._parameters = parameters;\n        this._specification = specification;\n        extend(this, createFunction(this._parameters, this._specification));\n    }\n    static deserialize(serialized) {\n        return new StylePropertyFunction(serialized._parameters, serialized._specification);\n    }\n    static serialize(input) {\n        return {\n            _parameters: input._parameters,\n            _specification: input._specification\n        };\n    }\n}\nfunction normalizePropertyExpression(value, specification) {\n    if (isFunction$1(value)) {\n        return new StylePropertyFunction(value, specification);\n    } else if (isExpression(value)) {\n        const expression = createPropertyExpression(value, specification);\n        if (expression.result === 'error') {\n            throw new Error(expression.value.map(err => `${ err.key }: ${ err.message }`).join(', '));\n        }\n        return expression.value;\n    } else {\n        let constant = value;\n        if (typeof value === 'string' && specification.type === 'color') {\n            constant = Color.parse(value);\n        }\n        return {\n            kind: 'constant',\n            evaluate: () => constant\n        };\n    }\n}\nfunction findZoomCurve(expression) {\n    let result = null;\n    if (expression instanceof Let) {\n        result = findZoomCurve(expression.result);\n    } else if (expression instanceof Coalesce) {\n        for (const arg of expression.args) {\n            result = findZoomCurve(arg);\n            if (result) {\n                break;\n            }\n        }\n    } else if ((expression instanceof Step || expression instanceof Interpolate) && expression.input instanceof CompoundExpression && expression.input.name === 'zoom') {\n        result = expression;\n    }\n    if (result instanceof ParsingError) {\n        return result;\n    }\n    expression.eachChild(child => {\n        const childResult = findZoomCurve(child);\n        if (childResult instanceof ParsingError) {\n            result = childResult;\n        } else if (!result && childResult) {\n            result = new ParsingError('', '\"zoom\" expression may only be used as input to a top-level \"step\" or \"interpolate\" expression.');\n        } else if (result && childResult && result !== childResult) {\n            result = new ParsingError('', 'Only one zoom-based \"step\" or \"interpolate\" subexpression may be used in an expression.');\n        }\n    });\n    return result;\n}\nfunction getExpectedType(spec) {\n    const types = {\n        color: ColorType,\n        string: StringType,\n        number: NumberType,\n        enum: StringType,\n        boolean: BooleanType,\n        formatted: FormattedType,\n        resolvedImage: ResolvedImageType\n    };\n    if (spec.type === 'array') {\n        return array(types[spec.value] || ValueType, spec.length);\n    }\n    return types[spec.type];\n}\nfunction getDefaultValue(spec) {\n    if (spec.type === 'color' && isFunction$1(spec.default)) {\n        return new Color(0, 0, 0, 0);\n    } else if (spec.type === 'color') {\n        return Color.parse(spec.default) || null;\n    } else if (spec.default === undefined) {\n        return null;\n    } else {\n        return spec.default;\n    }\n}\n\nfunction convertLiteral(value) {\n    return typeof value === 'object' ? [\n        'literal',\n        value\n    ] : value;\n}\nfunction convertFunction(parameters, propertySpec) {\n    let stops = parameters.stops;\n    if (!stops) {\n        return convertIdentityFunction(parameters, propertySpec);\n    }\n    const zoomAndFeatureDependent = stops && typeof stops[0][0] === 'object';\n    const featureDependent = zoomAndFeatureDependent || parameters.property !== undefined;\n    const zoomDependent = zoomAndFeatureDependent || !featureDependent;\n    stops = stops.map(stop => {\n        if (!featureDependent && propertySpec.tokens && typeof stop[1] === 'string') {\n            return [\n                stop[0],\n                convertTokenString(stop[1])\n            ];\n        }\n        return [\n            stop[0],\n            convertLiteral(stop[1])\n        ];\n    });\n    if (zoomAndFeatureDependent) {\n        return convertZoomAndPropertyFunction(parameters, propertySpec, stops);\n    } else if (zoomDependent) {\n        return convertZoomFunction(parameters, propertySpec, stops);\n    } else {\n        return convertPropertyFunction(parameters, propertySpec, stops);\n    }\n}\nfunction convertIdentityFunction(parameters, propertySpec) {\n    const get = [\n        'get',\n        parameters.property\n    ];\n    if (parameters.default === undefined) {\n        return propertySpec.type === 'string' ? [\n            'string',\n            get\n        ] : get;\n    } else if (propertySpec.type === 'enum') {\n        return [\n            'match',\n            get,\n            Object.keys(propertySpec.values),\n            get,\n            parameters.default\n        ];\n    } else {\n        const expression = [\n            propertySpec.type === 'color' ? 'to-color' : propertySpec.type,\n            get,\n            convertLiteral(parameters.default)\n        ];\n        if (propertySpec.type === 'array') {\n            expression.splice(1, 0, propertySpec.value, propertySpec.length || null);\n        }\n        return expression;\n    }\n}\nfunction getInterpolateOperator(parameters) {\n    switch (parameters.colorSpace) {\n    case 'hcl':\n        return 'interpolate-hcl';\n    case 'lab':\n        return 'interpolate-lab';\n    default:\n        return 'interpolate';\n    }\n}\nfunction convertZoomAndPropertyFunction(parameters, propertySpec, stops) {\n    const featureFunctionParameters = {};\n    const featureFunctionStops = {};\n    const zoomStops = [];\n    for (let s = 0; s < stops.length; s++) {\n        const stop = stops[s];\n        const zoom = stop[0].zoom;\n        if (featureFunctionParameters[zoom] === undefined) {\n            featureFunctionParameters[zoom] = {\n                zoom,\n                type: parameters.type,\n                property: parameters.property,\n                default: parameters.default\n            };\n            featureFunctionStops[zoom] = [];\n            zoomStops.push(zoom);\n        }\n        featureFunctionStops[zoom].push([\n            stop[0].value,\n            stop[1]\n        ]);\n    }\n    const functionType = getFunctionType({}, propertySpec);\n    if (functionType === 'exponential') {\n        const expression = [\n            getInterpolateOperator(parameters),\n            ['linear'],\n            ['zoom']\n        ];\n        for (const z of zoomStops) {\n            const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n            appendStopPair(expression, z, output, false);\n        }\n        return expression;\n    } else {\n        const expression = [\n            'step',\n            ['zoom']\n        ];\n        for (const z of zoomStops) {\n            const output = convertPropertyFunction(featureFunctionParameters[z], propertySpec, featureFunctionStops[z]);\n            appendStopPair(expression, z, output, true);\n        }\n        fixupDegenerateStepCurve(expression);\n        return expression;\n    }\n}\nfunction coalesce$1(a, b) {\n    if (a !== undefined)\n        return a;\n    if (b !== undefined)\n        return b;\n}\nfunction getFallback(parameters, propertySpec) {\n    const defaultValue = convertLiteral(coalesce$1(parameters.default, propertySpec.default));\n    if (defaultValue === undefined && propertySpec.type === 'resolvedImage') {\n        return '';\n    }\n    return defaultValue;\n}\nfunction convertPropertyFunction(parameters, propertySpec, stops) {\n    const type = getFunctionType(parameters, propertySpec);\n    const get = [\n        'get',\n        parameters.property\n    ];\n    if (type === 'categorical' && typeof stops[0][0] === 'boolean') {\n        const expression = ['case'];\n        for (const stop of stops) {\n            expression.push([\n                '==',\n                get,\n                stop[0]\n            ], stop[1]);\n        }\n        expression.push(getFallback(parameters, propertySpec));\n        return expression;\n    } else if (type === 'categorical') {\n        const expression = [\n            'match',\n            get\n        ];\n        for (const stop of stops) {\n            appendStopPair(expression, stop[0], stop[1], false);\n        }\n        expression.push(getFallback(parameters, propertySpec));\n        return expression;\n    } else if (type === 'interval') {\n        const expression = [\n            'step',\n            [\n                'number',\n                get\n            ]\n        ];\n        for (const stop of stops) {\n            appendStopPair(expression, stop[0], stop[1], true);\n        }\n        fixupDegenerateStepCurve(expression);\n        return parameters.default === undefined ? expression : [\n            'case',\n            [\n                '==',\n                [\n                    'typeof',\n                    get\n                ],\n                'number'\n            ],\n            expression,\n            convertLiteral(parameters.default)\n        ];\n    } else if (type === 'exponential') {\n        const base = parameters.base !== undefined ? parameters.base : 1;\n        const expression = [\n            getInterpolateOperator(parameters),\n            base === 1 ? ['linear'] : [\n                'exponential',\n                base\n            ],\n            [\n                'number',\n                get\n            ]\n        ];\n        for (const stop of stops) {\n            appendStopPair(expression, stop[0], stop[1], false);\n        }\n        return parameters.default === undefined ? expression : [\n            'case',\n            [\n                '==',\n                [\n                    'typeof',\n                    get\n                ],\n                'number'\n            ],\n            expression,\n            convertLiteral(parameters.default)\n        ];\n    } else {\n        throw new Error(`Unknown property function type ${ type }`);\n    }\n}\nfunction convertZoomFunction(parameters, propertySpec, stops, input = ['zoom']) {\n    const type = getFunctionType(parameters, propertySpec);\n    let expression;\n    let isStep = false;\n    if (type === 'interval') {\n        expression = [\n            'step',\n            input\n        ];\n        isStep = true;\n    } else if (type === 'exponential') {\n        const base = parameters.base !== undefined ? parameters.base : 1;\n        expression = [\n            getInterpolateOperator(parameters),\n            base === 1 ? ['linear'] : [\n                'exponential',\n                base\n            ],\n            input\n        ];\n    } else {\n        throw new Error(`Unknown zoom function type \"${ type }\"`);\n    }\n    for (const stop of stops) {\n        appendStopPair(expression, stop[0], stop[1], isStep);\n    }\n    fixupDegenerateStepCurve(expression);\n    return expression;\n}\nfunction fixupDegenerateStepCurve(expression) {\n    if (expression[0] === 'step' && expression.length === 3) {\n        expression.push(0);\n        expression.push(expression[3]);\n    }\n}\nfunction appendStopPair(curve, input, output, isStep) {\n    if (curve.length > 3 && input === curve[curve.length - 2]) {\n        return;\n    }\n    if (!(isStep && curve.length === 2)) {\n        curve.push(input);\n    }\n    curve.push(output);\n}\nfunction getFunctionType(parameters, propertySpec) {\n    if (parameters.type) {\n        return parameters.type;\n    } else {\n        return propertySpec.expression.interpolated ? 'exponential' : 'interval';\n    }\n}\nfunction convertTokenString(s) {\n    const result = ['concat'];\n    const re = /{([^{}]+)}/g;\n    let pos = 0;\n    for (let match = re.exec(s); match !== null; match = re.exec(s)) {\n        const literal = s.slice(pos, re.lastIndex - match[0].length);\n        pos = re.lastIndex;\n        if (literal.length > 0)\n            result.push(literal);\n        result.push([\n            'get',\n            match[1]\n        ]);\n    }\n    if (result.length === 1) {\n        return s;\n    }\n    if (pos < s.length) {\n        result.push(s.slice(pos));\n    } else if (result.length === 2) {\n        return [\n            'to-string',\n            result[1]\n        ];\n    }\n    return result;\n}\n\nfunction isExpressionFilter(filter) {\n    if (filter === true || filter === false) {\n        return true;\n    }\n    if (!Array.isArray(filter) || filter.length === 0) {\n        return false;\n    }\n    switch (filter[0]) {\n    case 'has':\n        return filter.length >= 2 && filter[1] !== '$id' && filter[1] !== '$type';\n    case 'in':\n        return filter.length >= 3 && (typeof filter[1] !== 'string' || Array.isArray(filter[2]));\n    case '!in':\n    case '!has':\n    case 'none':\n        return false;\n    case '==':\n    case '!=':\n    case '>':\n    case '>=':\n    case '<':\n    case '<=':\n        return filter.length !== 3 || (Array.isArray(filter[1]) || Array.isArray(filter[2]));\n    case 'any':\n    case 'all':\n        for (const f of filter.slice(1)) {\n            if (!isExpressionFilter(f) && typeof f !== 'boolean') {\n                return false;\n            }\n        }\n        return true;\n    default:\n        return true;\n    }\n}\nconst filterSpec = {\n    'type': 'boolean',\n    'default': false,\n    'transition': false,\n    'property-type': 'data-driven',\n    'expression': {\n        'interpolated': false,\n        'parameters': [\n            'zoom',\n            'feature'\n        ]\n    }\n};\nfunction createFilter(filter) {\n    if (filter === null || filter === undefined) {\n        return {\n            filter: () => true,\n            needGeometry: false\n        };\n    }\n    if (!isExpressionFilter(filter)) {\n        filter = convertFilter(filter);\n    }\n    const compiled = createExpression(filter, filterSpec);\n    if (compiled.result === 'error') {\n        throw new Error(compiled.value.map(err => `${ err.key }: ${ err.message }`).join(', '));\n    } else {\n        const needGeometry = geometryNeeded(filter);\n        return {\n            filter: (globalProperties, feature, canonical) => compiled.value.evaluate(globalProperties, feature, {}, canonical),\n            needGeometry\n        };\n    }\n}\nfunction compare(a, b) {\n    return a < b ? -1 : a > b ? 1 : 0;\n}\nfunction geometryNeeded(filter) {\n    if (!Array.isArray(filter))\n        return false;\n    if (filter[0] === 'within')\n        return true;\n    for (let index = 1; index < filter.length; index++) {\n        if (geometryNeeded(filter[index]))\n            return true;\n    }\n    return false;\n}\nfunction convertFilter(filter) {\n    if (!filter)\n        return true;\n    const op = filter[0];\n    if (filter.length <= 1)\n        return op !== 'any';\n    const converted = op === '==' ? convertComparisonOp(filter[1], filter[2], '==') : op === '!=' ? convertNegation(convertComparisonOp(filter[1], filter[2], '==')) : op === '<' || op === '>' || op === '<=' || op === '>=' ? convertComparisonOp(filter[1], filter[2], op) : op === 'any' ? convertDisjunctionOp(filter.slice(1)) : op === 'all' ? ['all'].concat(filter.slice(1).map(convertFilter)) : op === 'none' ? ['all'].concat(filter.slice(1).map(convertFilter).map(convertNegation)) : op === 'in' ? convertInOp(filter[1], filter.slice(2)) : op === '!in' ? convertNegation(convertInOp(filter[1], filter.slice(2))) : op === 'has' ? convertHasOp(filter[1]) : op === '!has' ? convertNegation(convertHasOp(filter[1])) : op === 'within' ? filter : true;\n    return converted;\n}\nfunction convertComparisonOp(property, value, op) {\n    switch (property) {\n    case '$type':\n        return [\n            `filter-type-${ op }`,\n            value\n        ];\n    case '$id':\n        return [\n            `filter-id-${ op }`,\n            value\n        ];\n    default:\n        return [\n            `filter-${ op }`,\n            property,\n            value\n        ];\n    }\n}\nfunction convertDisjunctionOp(filters) {\n    return ['any'].concat(filters.map(convertFilter));\n}\nfunction convertInOp(property, values) {\n    if (values.length === 0) {\n        return false;\n    }\n    switch (property) {\n    case '$type':\n        return [\n            `filter-type-in`,\n            [\n                'literal',\n                values\n            ]\n        ];\n    case '$id':\n        return [\n            `filter-id-in`,\n            [\n                'literal',\n                values\n            ]\n        ];\n    default:\n        if (values.length > 200 && !values.some(v => typeof v !== typeof values[0])) {\n            return [\n                'filter-in-large',\n                property,\n                [\n                    'literal',\n                    values.sort(compare)\n                ]\n            ];\n        } else {\n            return [\n                'filter-in-small',\n                property,\n                [\n                    'literal',\n                    values\n                ]\n            ];\n        }\n    }\n}\nfunction convertHasOp(property) {\n    switch (property) {\n    case '$type':\n        return true;\n    case '$id':\n        return [`filter-has-id`];\n    default:\n        return [\n            `filter-has`,\n            property\n        ];\n    }\n}\nfunction convertNegation(filter) {\n    return [\n        '!',\n        filter\n    ];\n}\n\nfunction convertFilter$1(filter) {\n    return _convertFilter(filter, {});\n}\nfunction _convertFilter(filter, expectedTypes) {\n    if (isExpressionFilter(filter)) {\n        return filter;\n    }\n    if (!filter)\n        return true;\n    const op = filter[0];\n    if (filter.length <= 1)\n        return op !== 'any';\n    let converted;\n    if (op === '==' || op === '!=' || op === '<' || op === '>' || op === '<=' || op === '>=') {\n        const [, property, value] = filter;\n        converted = convertComparisonOp$1(property, value, op, expectedTypes);\n    } else if (op === 'any') {\n        const children = filter.slice(1).map(f => {\n            const types = {};\n            const child = _convertFilter(f, types);\n            const typechecks = runtimeTypeChecks(types);\n            return typechecks === true ? child : [\n                'case',\n                typechecks,\n                child,\n                false\n            ];\n        });\n        return ['any'].concat(children);\n    } else if (op === 'all') {\n        const children = filter.slice(1).map(f => _convertFilter(f, expectedTypes));\n        return children.length > 1 ? ['all'].concat(children) : [].concat(...children);\n    } else if (op === 'none') {\n        return [\n            '!',\n            _convertFilter(['any'].concat(filter.slice(1)), {})\n        ];\n    } else if (op === 'in') {\n        converted = convertInOp$1(filter[1], filter.slice(2));\n    } else if (op === '!in') {\n        converted = convertInOp$1(filter[1], filter.slice(2), true);\n    } else if (op === 'has') {\n        converted = convertHasOp$1(filter[1]);\n    } else if (op === '!has') {\n        converted = [\n            '!',\n            convertHasOp$1(filter[1])\n        ];\n    } else {\n        converted = true;\n    }\n    return converted;\n}\nfunction runtimeTypeChecks(expectedTypes) {\n    const conditions = [];\n    for (const property in expectedTypes) {\n        const get = property === '$id' ? ['id'] : [\n            'get',\n            property\n        ];\n        conditions.push([\n            '==',\n            [\n                'typeof',\n                get\n            ],\n            expectedTypes[property]\n        ]);\n    }\n    if (conditions.length === 0)\n        return true;\n    if (conditions.length === 1)\n        return conditions[0];\n    return ['all'].concat(conditions);\n}\nfunction convertComparisonOp$1(property, value, op, expectedTypes) {\n    let get;\n    if (property === '$type') {\n        return [\n            op,\n            ['geometry-type'],\n            value\n        ];\n    } else if (property === '$id') {\n        get = ['id'];\n    } else {\n        get = [\n            'get',\n            property\n        ];\n    }\n    if (expectedTypes && value !== null) {\n        const type = typeof value;\n        expectedTypes[property] = type;\n    }\n    if (op === '==' && property !== '$id' && value === null) {\n        return [\n            'all',\n            [\n                'has',\n                property\n            ],\n            [\n                '==',\n                get,\n                null\n            ]\n        ];\n    } else if (op === '!=' && property !== '$id' && value === null) {\n        return [\n            'any',\n            [\n                '!',\n                [\n                    'has',\n                    property\n                ]\n            ],\n            [\n                '!=',\n                get,\n                null\n            ]\n        ];\n    }\n    return [\n        op,\n        get,\n        value\n    ];\n}\nfunction convertInOp$1(property, values, negate = false) {\n    if (values.length === 0)\n        return negate;\n    let get;\n    if (property === '$type') {\n        get = ['geometry-type'];\n    } else if (property === '$id') {\n        get = ['id'];\n    } else {\n        get = [\n            'get',\n            property\n        ];\n    }\n    let uniformTypes = true;\n    const type = typeof values[0];\n    for (const value of values) {\n        if (typeof value !== type) {\n            uniformTypes = false;\n            break;\n        }\n    }\n    if (uniformTypes && (type === 'string' || type === 'number')) {\n        const uniqueValues = values.sort().filter((v, i) => i === 0 || values[i - 1] !== v);\n        return [\n            'match',\n            get,\n            uniqueValues,\n            !negate,\n            negate\n        ];\n    }\n    return [negate ? 'all' : 'any'].concat(values.map(v => [\n        negate ? '!=' : '==',\n        get,\n        v\n    ]));\n}\nfunction convertHasOp$1(property) {\n    if (property === '$type') {\n        return true;\n    } else if (property === '$id') {\n        return [\n            '!=',\n            ['id'],\n            null\n        ];\n    } else {\n        return [\n            'has',\n            property\n        ];\n    }\n}\n\nfunction migrateToExpressions (style) {\n    const converted = [];\n    eachLayer(style, layer => {\n        if (layer.filter) {\n            layer.filter = convertFilter$1(layer.filter);\n        }\n    });\n    eachProperty(style, {\n        paint: true,\n        layout: true\n    }, ({path, value, reference, set}) => {\n        if (isExpression(value))\n            return;\n        if (typeof value === 'object' && !Array.isArray(value)) {\n            set(convertFunction(value, reference));\n            converted.push(path.join('.'));\n        } else if (reference.tokens && typeof value === 'string') {\n            set(convertTokenString(value));\n        }\n    });\n    return style;\n}\n\nfunction migrate (style) {\n    let migrated = false;\n    if (style.version === 7) {\n        style = migrateToV8(style);\n        migrated = true;\n    }\n    if (style.version === 8) {\n        migrated = migrateToExpressions(style);\n        migrated = true;\n    }\n    if (!migrated) {\n        throw new Error('cannot migrate from', style.version);\n    }\n    return style;\n}\n\nfunction composite (style) {\n    const styleIDs = [];\n    const sourceIDs = [];\n    const compositedSourceLayers = [];\n    for (const id in style.sources) {\n        const source = style.sources[id];\n        if (source.type !== 'vector')\n            continue;\n        const match = /^mapbox:\\/\\/(.*)/.exec(source.url);\n        if (!match)\n            continue;\n        styleIDs.push(id);\n        sourceIDs.push(match[1]);\n    }\n    if (styleIDs.length < 2)\n        return style;\n    styleIDs.forEach(id => {\n        delete style.sources[id];\n    });\n    const compositeID = sourceIDs.join(',');\n    style.sources[compositeID] = {\n        'type': 'vector',\n        'url': `mapbox://${ compositeID }`\n    };\n    style.layers.forEach(layer => {\n        if (styleIDs.indexOf(layer.source) >= 0) {\n            layer.source = compositeID;\n            if ('source-layer' in layer) {\n                if (compositedSourceLayers.indexOf(layer['source-layer']) >= 0) {\n                    throw new Error('Conflicting source layer names');\n                } else {\n                    compositedSourceLayers.push(layer['source-layer']);\n                }\n            }\n        }\n    });\n    return style;\n}\n\nvar refProperties = [\n    'type',\n    'source',\n    'source-layer',\n    'minzoom',\n    'maxzoom',\n    'filter',\n    'layout'\n];\n\nfunction deref(layer, parent) {\n    const result = {};\n    for (const k in layer) {\n        if (k !== 'ref') {\n            result[k] = layer[k];\n        }\n    }\n    refProperties.forEach(k => {\n        if (k in parent) {\n            result[k] = parent[k];\n        }\n    });\n    return result;\n}\nfunction derefLayers(layers) {\n    layers = layers.slice();\n    const map = Object.create(null);\n    for (let i = 0; i < layers.length; i++) {\n        map[layers[i].id] = layers[i];\n    }\n    for (let i = 0; i < layers.length; i++) {\n        if ('ref' in layers[i]) {\n            layers[i] = deref(layers[i], map[layers[i].ref]);\n        }\n    }\n    return layers;\n}\n\nfunction deepEqual(a, b) {\n    if (Array.isArray(a)) {\n        if (!Array.isArray(b) || a.length !== b.length)\n            return false;\n        for (let i = 0; i < a.length; i++) {\n            if (!deepEqual(a[i], b[i]))\n                return false;\n        }\n        return true;\n    }\n    if (typeof a === 'object' && a !== null && b !== null) {\n        if (!(typeof b === 'object'))\n            return false;\n        const keys = Object.keys(a);\n        if (keys.length !== Object.keys(b).length)\n            return false;\n        for (const key in a) {\n            if (!deepEqual(a[key], b[key]))\n                return false;\n        }\n        return true;\n    }\n    return a === b;\n}\n\nconst operations = {\n    setStyle: 'setStyle',\n    addLayer: 'addLayer',\n    removeLayer: 'removeLayer',\n    setPaintProperty: 'setPaintProperty',\n    setLayoutProperty: 'setLayoutProperty',\n    setFilter: 'setFilter',\n    addSource: 'addSource',\n    removeSource: 'removeSource',\n    setGeoJSONSourceData: 'setGeoJSONSourceData',\n    setLayerZoomRange: 'setLayerZoomRange',\n    setLayerProperty: 'setLayerProperty',\n    setCenter: 'setCenter',\n    setZoom: 'setZoom',\n    setBearing: 'setBearing',\n    setPitch: 'setPitch',\n    setSprite: 'setSprite',\n    setGlyphs: 'setGlyphs',\n    setTransition: 'setTransition',\n    setLight: 'setLight',\n    setTerrain: 'setTerrain',\n    setFog: 'setFog'\n};\nfunction addSource(sourceId, after, commands) {\n    commands.push({\n        command: operations.addSource,\n        args: [\n            sourceId,\n            after[sourceId]\n        ]\n    });\n}\nfunction removeSource(sourceId, commands, sourcesRemoved) {\n    commands.push({\n        command: operations.removeSource,\n        args: [sourceId]\n    });\n    sourcesRemoved[sourceId] = true;\n}\nfunction updateSource(sourceId, after, commands, sourcesRemoved) {\n    removeSource(sourceId, commands, sourcesRemoved);\n    addSource(sourceId, after, commands);\n}\nfunction canUpdateGeoJSON(before, after, sourceId) {\n    let prop;\n    for (prop in before[sourceId]) {\n        if (!before[sourceId].hasOwnProperty(prop))\n            continue;\n        if (prop !== 'data' && !deepEqual(before[sourceId][prop], after[sourceId][prop])) {\n            return false;\n        }\n    }\n    for (prop in after[sourceId]) {\n        if (!after[sourceId].hasOwnProperty(prop))\n            continue;\n        if (prop !== 'data' && !deepEqual(before[sourceId][prop], after[sourceId][prop])) {\n            return false;\n        }\n    }\n    return true;\n}\nfunction diffSources(before, after, commands, sourcesRemoved) {\n    before = before || {};\n    after = after || {};\n    let sourceId;\n    for (sourceId in before) {\n        if (!before.hasOwnProperty(sourceId))\n            continue;\n        if (!after.hasOwnProperty(sourceId)) {\n            removeSource(sourceId, commands, sourcesRemoved);\n        }\n    }\n    for (sourceId in after) {\n        if (!after.hasOwnProperty(sourceId))\n            continue;\n        if (!before.hasOwnProperty(sourceId)) {\n            addSource(sourceId, after, commands);\n        } else if (!deepEqual(before[sourceId], after[sourceId])) {\n            if (before[sourceId].type === 'geojson' && after[sourceId].type === 'geojson' && canUpdateGeoJSON(before, after, sourceId)) {\n                commands.push({\n                    command: operations.setGeoJSONSourceData,\n                    args: [\n                        sourceId,\n                        after[sourceId].data\n                    ]\n                });\n            } else {\n                updateSource(sourceId, after, commands, sourcesRemoved);\n            }\n        }\n    }\n}\nfunction diffLayerPropertyChanges(before, after, commands, layerId, klass, command) {\n    before = before || {};\n    after = after || {};\n    let prop;\n    for (prop in before) {\n        if (!before.hasOwnProperty(prop))\n            continue;\n        if (!deepEqual(before[prop], after[prop])) {\n            commands.push({\n                command,\n                args: [\n                    layerId,\n                    prop,\n                    after[prop],\n                    klass\n                ]\n            });\n        }\n    }\n    for (prop in after) {\n        if (!after.hasOwnProperty(prop) || before.hasOwnProperty(prop))\n            continue;\n        if (!deepEqual(before[prop], after[prop])) {\n            commands.push({\n                command,\n                args: [\n                    layerId,\n                    prop,\n                    after[prop],\n                    klass\n                ]\n            });\n        }\n    }\n}\nfunction pluckId(layer) {\n    return layer.id;\n}\nfunction indexById(group, layer) {\n    group[layer.id] = layer;\n    return group;\n}\nfunction diffLayers(before, after, commands) {\n    before = before || [];\n    after = after || [];\n    const beforeOrder = before.map(pluckId);\n    const afterOrder = after.map(pluckId);\n    const beforeIndex = before.reduce(indexById, {});\n    const afterIndex = after.reduce(indexById, {});\n    const tracker = beforeOrder.slice();\n    const clean = Object.create(null);\n    let i, d, layerId, beforeLayer, afterLayer, insertBeforeLayerId, prop;\n    for (i = 0, d = 0; i < beforeOrder.length; i++) {\n        layerId = beforeOrder[i];\n        if (!afterIndex.hasOwnProperty(layerId)) {\n            commands.push({\n                command: operations.removeLayer,\n                args: [layerId]\n            });\n            tracker.splice(tracker.indexOf(layerId, d), 1);\n        } else {\n            d++;\n        }\n    }\n    for (i = 0, d = 0; i < afterOrder.length; i++) {\n        layerId = afterOrder[afterOrder.length - 1 - i];\n        if (tracker[tracker.length - 1 - i] === layerId)\n            continue;\n        if (beforeIndex.hasOwnProperty(layerId)) {\n            commands.push({\n                command: operations.removeLayer,\n                args: [layerId]\n            });\n            tracker.splice(tracker.lastIndexOf(layerId, tracker.length - d), 1);\n        } else {\n            d++;\n        }\n        insertBeforeLayerId = tracker[tracker.length - i];\n        commands.push({\n            command: operations.addLayer,\n            args: [\n                afterIndex[layerId],\n                insertBeforeLayerId\n            ]\n        });\n        tracker.splice(tracker.length - i, 0, layerId);\n        clean[layerId] = true;\n    }\n    for (i = 0; i < afterOrder.length; i++) {\n        layerId = afterOrder[i];\n        beforeLayer = beforeIndex[layerId];\n        afterLayer = afterIndex[layerId];\n        if (clean[layerId] || deepEqual(beforeLayer, afterLayer))\n            continue;\n        if (!deepEqual(beforeLayer.source, afterLayer.source) || !deepEqual(beforeLayer['source-layer'], afterLayer['source-layer']) || !deepEqual(beforeLayer.type, afterLayer.type)) {\n            commands.push({\n                command: operations.removeLayer,\n                args: [layerId]\n            });\n            insertBeforeLayerId = tracker[tracker.lastIndexOf(layerId) + 1];\n            commands.push({\n                command: operations.addLayer,\n                args: [\n                    afterLayer,\n                    insertBeforeLayerId\n                ]\n            });\n            continue;\n        }\n        diffLayerPropertyChanges(beforeLayer.layout, afterLayer.layout, commands, layerId, null, operations.setLayoutProperty);\n        diffLayerPropertyChanges(beforeLayer.paint, afterLayer.paint, commands, layerId, null, operations.setPaintProperty);\n        if (!deepEqual(beforeLayer.filter, afterLayer.filter)) {\n            commands.push({\n                command: operations.setFilter,\n                args: [\n                    layerId,\n                    afterLayer.filter\n                ]\n            });\n        }\n        if (!deepEqual(beforeLayer.minzoom, afterLayer.minzoom) || !deepEqual(beforeLayer.maxzoom, afterLayer.maxzoom)) {\n            commands.push({\n                command: operations.setLayerZoomRange,\n                args: [\n                    layerId,\n                    afterLayer.minzoom,\n                    afterLayer.maxzoom\n                ]\n            });\n        }\n        for (prop in beforeLayer) {\n            if (!beforeLayer.hasOwnProperty(prop))\n                continue;\n            if (prop === 'layout' || prop === 'paint' || prop === 'filter' || prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom')\n                continue;\n            if (prop.indexOf('paint.') === 0) {\n                diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), operations.setPaintProperty);\n            } else if (!deepEqual(beforeLayer[prop], afterLayer[prop])) {\n                commands.push({\n                    command: operations.setLayerProperty,\n                    args: [\n                        layerId,\n                        prop,\n                        afterLayer[prop]\n                    ]\n                });\n            }\n        }\n        for (prop in afterLayer) {\n            if (!afterLayer.hasOwnProperty(prop) || beforeLayer.hasOwnProperty(prop))\n                continue;\n            if (prop === 'layout' || prop === 'paint' || prop === 'filter' || prop === 'metadata' || prop === 'minzoom' || prop === 'maxzoom')\n                continue;\n            if (prop.indexOf('paint.') === 0) {\n                diffLayerPropertyChanges(beforeLayer[prop], afterLayer[prop], commands, layerId, prop.slice(6), operations.setPaintProperty);\n            } else if (!deepEqual(beforeLayer[prop], afterLayer[prop])) {\n                commands.push({\n                    command: operations.setLayerProperty,\n                    args: [\n                        layerId,\n                        prop,\n                        afterLayer[prop]\n                    ]\n                });\n            }\n        }\n    }\n}\nfunction diffStyles(before, after) {\n    if (!before)\n        return [{\n                command: operations.setStyle,\n                args: [after]\n            }];\n    let commands = [];\n    try {\n        if (!deepEqual(before.version, after.version)) {\n            return [{\n                    command: operations.setStyle,\n                    args: [after]\n                }];\n        }\n        if (!deepEqual(before.center, after.center)) {\n            commands.push({\n                command: operations.setCenter,\n                args: [after.center]\n            });\n        }\n        if (!deepEqual(before.zoom, after.zoom)) {\n            commands.push({\n                command: operations.setZoom,\n                args: [after.zoom]\n            });\n        }\n        if (!deepEqual(before.bearing, after.bearing)) {\n            commands.push({\n                command: operations.setBearing,\n                args: [after.bearing]\n            });\n        }\n        if (!deepEqual(before.pitch, after.pitch)) {\n            commands.push({\n                command: operations.setPitch,\n                args: [after.pitch]\n            });\n        }\n        if (!deepEqual(before.sprite, after.sprite)) {\n            commands.push({\n                command: operations.setSprite,\n                args: [after.sprite]\n            });\n        }\n        if (!deepEqual(before.glyphs, after.glyphs)) {\n            commands.push({\n                command: operations.setGlyphs,\n                args: [after.glyphs]\n            });\n        }\n        if (!deepEqual(before.transition, after.transition)) {\n            commands.push({\n                command: operations.setTransition,\n                args: [after.transition]\n            });\n        }\n        if (!deepEqual(before.light, after.light)) {\n            commands.push({\n                command: operations.setLight,\n                args: [after.light]\n            });\n        }\n        if (!deepEqual(before.fog, after.fog)) {\n            commands.push({\n                command: operations.setFog,\n                args: [after.fog]\n            });\n        }\n        const sourcesRemoved = {};\n        const removeOrAddSourceCommands = [];\n        diffSources(before.sources, after.sources, removeOrAddSourceCommands, sourcesRemoved);\n        const beforeLayers = [];\n        if (before.layers) {\n            before.layers.forEach(layer => {\n                if (sourcesRemoved[layer.source]) {\n                    commands.push({\n                        command: operations.removeLayer,\n                        args: [layer.id]\n                    });\n                } else {\n                    beforeLayers.push(layer);\n                }\n            });\n        }\n        let beforeTerrain = before.terrain;\n        if (beforeTerrain) {\n            if (sourcesRemoved[beforeTerrain.source]) {\n                commands.push({\n                    command: operations.setTerrain,\n                    args: [undefined]\n                });\n                beforeTerrain = undefined;\n            }\n        }\n        commands = commands.concat(removeOrAddSourceCommands);\n        if (!deepEqual(beforeTerrain, after.terrain)) {\n            commands.push({\n                command: operations.setTerrain,\n                args: [after.terrain]\n            });\n        }\n        diffLayers(beforeLayers, after.layers, commands);\n    } catch (e) {\n        console.warn('Unable to compute style diff:', e);\n        commands = [{\n                command: operations.setStyle,\n                args: [after]\n            }];\n    }\n    return commands;\n}\n\nclass ValidationError {\n    constructor(key, value, message, identifier) {\n        this.message = (key ? `${ key }: ` : '') + message;\n        if (identifier)\n            this.identifier = identifier;\n        if (value !== null && value !== undefined && value.__line__) {\n            this.line = value.__line__;\n        }\n    }\n}\n\nclass ParsingError$1 {\n    constructor(error) {\n        this.error = error;\n        this.message = error.message;\n        const match = error.message.match(/line (\\d+)/);\n        this.line = match ? parseInt(match[1], 10) : 0;\n    }\n}\n\nfunction validateConstants(options) {\n    const key = options.key;\n    const constants = options.value;\n    if (constants) {\n        return [new ValidationError(key, constants, 'constants have been deprecated as of v8')];\n    } else {\n        return [];\n    }\n}\n\nfunction unbundle(value) {\n    if (value instanceof Number || value instanceof String || value instanceof Boolean) {\n        return value.valueOf();\n    } else {\n        return value;\n    }\n}\nfunction deepUnbundle(value) {\n    if (Array.isArray(value)) {\n        return value.map(deepUnbundle);\n    } else if (value instanceof Object && !(value instanceof Number || value instanceof String || value instanceof Boolean)) {\n        const unbundledValue = {};\n        for (const key in value) {\n            unbundledValue[key] = deepUnbundle(value[key]);\n        }\n        return unbundledValue;\n    }\n    return unbundle(value);\n}\n\nfunction validateObject(options) {\n    const key = options.key;\n    const object = options.value;\n    const elementSpecs = options.valueSpec || {};\n    const elementValidators = options.objectElementValidators || {};\n    const style = options.style;\n    const styleSpec = options.styleSpec;\n    let errors = [];\n    const type = getType(object);\n    if (type !== 'object') {\n        return [new ValidationError(key, object, `object expected, ${ type } found`)];\n    }\n    for (const objectKey in object) {\n        const elementSpecKey = objectKey.split('.')[0];\n        const elementSpec = elementSpecs[elementSpecKey] || elementSpecs['*'];\n        let validateElement;\n        if (elementValidators[elementSpecKey]) {\n            validateElement = elementValidators[elementSpecKey];\n        } else if (elementSpecs[elementSpecKey]) {\n            validateElement = validate;\n        } else if (elementValidators['*']) {\n            validateElement = elementValidators['*'];\n        } else if (elementSpecs['*']) {\n            validateElement = validate;\n        } else {\n            errors.push(new ValidationError(key, object[objectKey], `unknown property \"${ objectKey }\"`));\n            continue;\n        }\n        errors = errors.concat(validateElement({\n            key: (key ? `${ key }.` : key) + objectKey,\n            value: object[objectKey],\n            valueSpec: elementSpec,\n            style,\n            styleSpec,\n            object,\n            objectKey\n        }, object));\n    }\n    for (const elementSpecKey in elementSpecs) {\n        if (elementValidators[elementSpecKey]) {\n            continue;\n        }\n        if (elementSpecs[elementSpecKey].required && elementSpecs[elementSpecKey]['default'] === undefined && object[elementSpecKey] === undefined) {\n            errors.push(new ValidationError(key, object, `missing required property \"${ elementSpecKey }\"`));\n        }\n    }\n    return errors;\n}\n\nfunction validateArray(options) {\n    const array = options.value;\n    const arraySpec = options.valueSpec;\n    const style = options.style;\n    const styleSpec = options.styleSpec;\n    const key = options.key;\n    const validateArrayElement = options.arrayElementValidator || validate;\n    if (getType(array) !== 'array') {\n        return [new ValidationError(key, array, `array expected, ${ getType(array) } found`)];\n    }\n    if (arraySpec.length && array.length !== arraySpec.length) {\n        return [new ValidationError(key, array, `array length ${ arraySpec.length } expected, length ${ array.length } found`)];\n    }\n    if (arraySpec['min-length'] && array.length < arraySpec['min-length']) {\n        return [new ValidationError(key, array, `array length at least ${ arraySpec['min-length'] } expected, length ${ array.length } found`)];\n    }\n    let arrayElementSpec = {\n        'type': arraySpec.value,\n        'values': arraySpec.values,\n        'minimum': arraySpec.minimum,\n        'maximum': arraySpec.maximum\n    };\n    if (styleSpec.$version < 7) {\n        arrayElementSpec.function = arraySpec.function;\n    }\n    if (getType(arraySpec.value) === 'object') {\n        arrayElementSpec = arraySpec.value;\n    }\n    let errors = [];\n    for (let i = 0; i < array.length; i++) {\n        errors = errors.concat(validateArrayElement({\n            array,\n            arrayIndex: i,\n            value: array[i],\n            valueSpec: arrayElementSpec,\n            style,\n            styleSpec,\n            key: `${ key }[${ i }]`\n        }));\n    }\n    return errors;\n}\n\nfunction validateNumber(options) {\n    const key = options.key;\n    const value = options.value;\n    const valueSpec = options.valueSpec;\n    let type = getType(value);\n    if (type === 'number' && value !== value) {\n        type = 'NaN';\n    }\n    if (type !== 'number') {\n        return [new ValidationError(key, value, `number expected, ${ type } found`)];\n    }\n    if ('minimum' in valueSpec) {\n        let specMin = valueSpec.minimum;\n        if (getType(valueSpec.minimum) === 'array') {\n            const i = options.arrayIndex;\n            specMin = valueSpec.minimum[i];\n        }\n        if (value < specMin) {\n            return [new ValidationError(key, value, `${ value } is less than the minimum value ${ specMin }`)];\n        }\n    }\n    if ('maximum' in valueSpec) {\n        let specMax = valueSpec.maximum;\n        if (getType(valueSpec.maximum) === 'array') {\n            const i = options.arrayIndex;\n            specMax = valueSpec.maximum[i];\n        }\n        if (value > specMax) {\n            return [new ValidationError(key, value, `${ value } is greater than the maximum value ${ specMax }`)];\n        }\n    }\n    return [];\n}\n\nfunction validateFunction(options) {\n    const functionValueSpec = options.valueSpec;\n    const functionType = unbundle(options.value.type);\n    let stopKeyType;\n    let stopDomainValues = {};\n    let previousStopDomainValue;\n    let previousStopDomainZoom;\n    const isZoomFunction = functionType !== 'categorical' && options.value.property === undefined;\n    const isPropertyFunction = !isZoomFunction;\n    const isZoomAndPropertyFunction = getType(options.value.stops) === 'array' && getType(options.value.stops[0]) === 'array' && getType(options.value.stops[0][0]) === 'object';\n    const errors = validateObject({\n        key: options.key,\n        value: options.value,\n        valueSpec: options.styleSpec.function,\n        style: options.style,\n        styleSpec: options.styleSpec,\n        objectElementValidators: {\n            stops: validateFunctionStops,\n            default: validateFunctionDefault\n        }\n    });\n    if (functionType === 'identity' && isZoomFunction) {\n        errors.push(new ValidationError(options.key, options.value, 'missing required property \"property\"'));\n    }\n    if (functionType !== 'identity' && !options.value.stops) {\n        errors.push(new ValidationError(options.key, options.value, 'missing required property \"stops\"'));\n    }\n    if (functionType === 'exponential' && options.valueSpec.expression && !supportsInterpolation(options.valueSpec)) {\n        errors.push(new ValidationError(options.key, options.value, 'exponential functions not supported'));\n    }\n    if (options.styleSpec.$version >= 8) {\n        if (isPropertyFunction && !supportsPropertyExpression(options.valueSpec)) {\n            errors.push(new ValidationError(options.key, options.value, 'property functions not supported'));\n        } else if (isZoomFunction && !supportsZoomExpression(options.valueSpec)) {\n            errors.push(new ValidationError(options.key, options.value, 'zoom functions not supported'));\n        }\n    }\n    if ((functionType === 'categorical' || isZoomAndPropertyFunction) && options.value.property === undefined) {\n        errors.push(new ValidationError(options.key, options.value, '\"property\" property is required'));\n    }\n    return errors;\n    function validateFunctionStops(options) {\n        if (functionType === 'identity') {\n            return [new ValidationError(options.key, options.value, 'identity function may not have a \"stops\" property')];\n        }\n        let errors = [];\n        const value = options.value;\n        errors = errors.concat(validateArray({\n            key: options.key,\n            value,\n            valueSpec: options.valueSpec,\n            style: options.style,\n            styleSpec: options.styleSpec,\n            arrayElementValidator: validateFunctionStop\n        }));\n        if (getType(value) === 'array' && value.length === 0) {\n            errors.push(new ValidationError(options.key, value, 'array must have at least one stop'));\n        }\n        return errors;\n    }\n    function validateFunctionStop(options) {\n        let errors = [];\n        const value = options.value;\n        const key = options.key;\n        if (getType(value) !== 'array') {\n            return [new ValidationError(key, value, `array expected, ${ getType(value) } found`)];\n        }\n        if (value.length !== 2) {\n            return [new ValidationError(key, value, `array length 2 expected, length ${ value.length } found`)];\n        }\n        if (isZoomAndPropertyFunction) {\n            if (getType(value[0]) !== 'object') {\n                return [new ValidationError(key, value, `object expected, ${ getType(value[0]) } found`)];\n            }\n            if (value[0].zoom === undefined) {\n                return [new ValidationError(key, value, 'object stop key must have zoom')];\n            }\n            if (value[0].value === undefined) {\n                return [new ValidationError(key, value, 'object stop key must have value')];\n            }\n            if (previousStopDomainZoom && previousStopDomainZoom > unbundle(value[0].zoom)) {\n                return [new ValidationError(key, value[0].zoom, 'stop zoom values must appear in ascending order')];\n            }\n            if (unbundle(value[0].zoom) !== previousStopDomainZoom) {\n                previousStopDomainZoom = unbundle(value[0].zoom);\n                previousStopDomainValue = undefined;\n                stopDomainValues = {};\n            }\n            errors = errors.concat(validateObject({\n                key: `${ key }[0]`,\n                value: value[0],\n                valueSpec: { zoom: {} },\n                style: options.style,\n                styleSpec: options.styleSpec,\n                objectElementValidators: {\n                    zoom: validateNumber,\n                    value: validateStopDomainValue\n                }\n            }));\n        } else {\n            errors = errors.concat(validateStopDomainValue({\n                key: `${ key }[0]`,\n                value: value[0],\n                valueSpec: {},\n                style: options.style,\n                styleSpec: options.styleSpec\n            }, value));\n        }\n        if (isExpression(deepUnbundle(value[1]))) {\n            return errors.concat([new ValidationError(`${ key }[1]`, value[1], 'expressions are not allowed in function stops.')]);\n        }\n        return errors.concat(validate({\n            key: `${ key }[1]`,\n            value: value[1],\n            valueSpec: functionValueSpec,\n            style: options.style,\n            styleSpec: options.styleSpec\n        }));\n    }\n    function validateStopDomainValue(options, stop) {\n        const type = getType(options.value);\n        const value = unbundle(options.value);\n        const reportValue = options.value !== null ? options.value : stop;\n        if (!stopKeyType) {\n            stopKeyType = type;\n        } else if (type !== stopKeyType) {\n            return [new ValidationError(options.key, reportValue, `${ type } stop domain type must match previous stop domain type ${ stopKeyType }`)];\n        }\n        if (type !== 'number' && type !== 'string' && type !== 'boolean') {\n            return [new ValidationError(options.key, reportValue, 'stop domain value must be a number, string, or boolean')];\n        }\n        if (type !== 'number' && functionType !== 'categorical') {\n            let message = `number expected, ${ type } found`;\n            if (supportsPropertyExpression(functionValueSpec) && functionType === undefined) {\n                message += '\\nIf you intended to use a categorical function, specify `\"type\": \"categorical\"`.';\n            }\n            return [new ValidationError(options.key, reportValue, message)];\n        }\n        if (functionType === 'categorical' && type === 'number' && (!isFinite(value) || Math.floor(value) !== value)) {\n            return [new ValidationError(options.key, reportValue, `integer expected, found ${ value }`)];\n        }\n        if (functionType !== 'categorical' && type === 'number' && previousStopDomainValue !== undefined && value < previousStopDomainValue) {\n            return [new ValidationError(options.key, reportValue, 'stop domain values must appear in ascending order')];\n        } else {\n            previousStopDomainValue = value;\n        }\n        if (functionType === 'categorical' && value in stopDomainValues) {\n            return [new ValidationError(options.key, reportValue, 'stop domain values must be unique')];\n        } else {\n            stopDomainValues[value] = true;\n        }\n        return [];\n    }\n    function validateFunctionDefault(options) {\n        return validate({\n            key: options.key,\n            value: options.value,\n            valueSpec: functionValueSpec,\n            style: options.style,\n            styleSpec: options.styleSpec\n        });\n    }\n}\n\nfunction validateExpression(options) {\n    const expression = (options.expressionContext === 'property' ? createPropertyExpression : createExpression)(deepUnbundle(options.value), options.valueSpec);\n    if (expression.result === 'error') {\n        return expression.value.map(error => {\n            return new ValidationError(`${ options.key }${ error.key }`, options.value, error.message);\n        });\n    }\n    const expressionObj = expression.value.expression || expression.value._styleExpression.expression;\n    if (options.expressionContext === 'property' && options.propertyKey === 'text-font' && !expressionObj.outputDefined()) {\n        return [new ValidationError(options.key, options.value, `Invalid data expression for \"${ options.propertyKey }\". Output values must be contained as literals within the expression.`)];\n    }\n    if (options.expressionContext === 'property' && options.propertyType === 'layout' && !isStateConstant(expressionObj)) {\n        return [new ValidationError(options.key, options.value, '\"feature-state\" data expressions are not supported with layout properties.')];\n    }\n    if (options.expressionContext === 'filter' && !isStateConstant(expressionObj)) {\n        return [new ValidationError(options.key, options.value, '\"feature-state\" data expressions are not supported with filters.')];\n    }\n    if (options.expressionContext && options.expressionContext.indexOf('cluster') === 0) {\n        if (!isGlobalPropertyConstant(expressionObj, [\n                'zoom',\n                'feature-state'\n            ])) {\n            return [new ValidationError(options.key, options.value, '\"zoom\" and \"feature-state\" expressions are not supported with cluster properties.')];\n        }\n        if (options.expressionContext === 'cluster-initial' && !isFeatureConstant(expressionObj)) {\n            return [new ValidationError(options.key, options.value, 'Feature data expressions are not supported with initial expression part of cluster properties.')];\n        }\n    }\n    return [];\n}\n\nfunction validateBoolean(options) {\n    const value = options.value;\n    const key = options.key;\n    const type = getType(value);\n    if (type !== 'boolean') {\n        return [new ValidationError(key, value, `boolean expected, ${ type } found`)];\n    }\n    return [];\n}\n\nfunction validateColor(options) {\n    const key = options.key;\n    const value = options.value;\n    const type = getType(value);\n    if (type !== 'string') {\n        return [new ValidationError(key, value, `color expected, ${ type } found`)];\n    }\n    if (csscolorparser.parseCSSColor(value) === null) {\n        return [new ValidationError(key, value, `color expected, \"${ value }\" found`)];\n    }\n    return [];\n}\n\nfunction validateEnum(options) {\n    const key = options.key;\n    const value = options.value;\n    const valueSpec = options.valueSpec;\n    const errors = [];\n    if (Array.isArray(valueSpec.values)) {\n        if (valueSpec.values.indexOf(unbundle(value)) === -1) {\n            errors.push(new ValidationError(key, value, `expected one of [${ valueSpec.values.join(', ') }], ${ JSON.stringify(value) } found`));\n        }\n    } else {\n        if (Object.keys(valueSpec.values).indexOf(unbundle(value)) === -1) {\n            errors.push(new ValidationError(key, value, `expected one of [${ Object.keys(valueSpec.values).join(', ') }], ${ JSON.stringify(value) } found`));\n        }\n    }\n    return errors;\n}\n\nfunction validateFilter(options) {\n    if (isExpressionFilter(deepUnbundle(options.value))) {\n        return validateExpression(extend({}, options, {\n            expressionContext: 'filter',\n            valueSpec: { value: 'boolean' }\n        }));\n    } else {\n        return validateNonExpressionFilter(options);\n    }\n}\nfunction validateNonExpressionFilter(options) {\n    const value = options.value;\n    const key = options.key;\n    if (getType(value) !== 'array') {\n        return [new ValidationError(key, value, `array expected, ${ getType(value) } found`)];\n    }\n    const styleSpec = options.styleSpec;\n    let type;\n    let errors = [];\n    if (value.length < 1) {\n        return [new ValidationError(key, value, 'filter array must have at least 1 element')];\n    }\n    errors = errors.concat(validateEnum({\n        key: `${ key }[0]`,\n        value: value[0],\n        valueSpec: styleSpec.filter_operator,\n        style: options.style,\n        styleSpec: options.styleSpec\n    }));\n    switch (unbundle(value[0])) {\n    case '<':\n    case '<=':\n    case '>':\n    case '>=':\n        if (value.length >= 2 && unbundle(value[1]) === '$type') {\n            errors.push(new ValidationError(key, value, `\"$type\" cannot be use with operator \"${ value[0] }\"`));\n        }\n    case '==':\n    case '!=':\n        if (value.length !== 3) {\n            errors.push(new ValidationError(key, value, `filter array for operator \"${ value[0] }\" must have 3 elements`));\n        }\n    case 'in':\n    case '!in':\n        if (value.length >= 2) {\n            type = getType(value[1]);\n            if (type !== 'string') {\n                errors.push(new ValidationError(`${ key }[1]`, value[1], `string expected, ${ type } found`));\n            }\n        }\n        for (let i = 2; i < value.length; i++) {\n            type = getType(value[i]);\n            if (unbundle(value[1]) === '$type') {\n                errors = errors.concat(validateEnum({\n                    key: `${ key }[${ i }]`,\n                    value: value[i],\n                    valueSpec: styleSpec.geometry_type,\n                    style: options.style,\n                    styleSpec: options.styleSpec\n                }));\n            } else if (type !== 'string' && type !== 'number' && type !== 'boolean') {\n                errors.push(new ValidationError(`${ key }[${ i }]`, value[i], `string, number, or boolean expected, ${ type } found`));\n            }\n        }\n        break;\n    case 'any':\n    case 'all':\n    case 'none':\n        for (let i = 1; i < value.length; i++) {\n            errors = errors.concat(validateNonExpressionFilter({\n                key: `${ key }[${ i }]`,\n                value: value[i],\n                style: options.style,\n                styleSpec: options.styleSpec\n            }));\n        }\n        break;\n    case 'has':\n    case '!has':\n        type = getType(value[1]);\n        if (value.length !== 2) {\n            errors.push(new ValidationError(key, value, `filter array for \"${ value[0] }\" operator must have 2 elements`));\n        } else if (type !== 'string') {\n            errors.push(new ValidationError(`${ key }[1]`, value[1], `string expected, ${ type } found`));\n        }\n        break;\n    case 'within':\n        type = getType(value[1]);\n        if (value.length !== 2) {\n            errors.push(new ValidationError(key, value, `filter array for \"${ value[0] }\" operator must have 2 elements`));\n        } else if (type !== 'object') {\n            errors.push(new ValidationError(`${ key }[1]`, value[1], `object expected, ${ type } found`));\n        }\n        break;\n    }\n    return errors;\n}\n\nfunction validateProperty(options, propertyType) {\n    const key = options.key;\n    const style = options.style;\n    const styleSpec = options.styleSpec;\n    const value = options.value;\n    const propertyKey = options.objectKey;\n    const layerSpec = styleSpec[`${ propertyType }_${ options.layerType }`];\n    if (!layerSpec)\n        return [];\n    const transitionMatch = propertyKey.match(/^(.*)-transition$/);\n    if (propertyType === 'paint' && transitionMatch && layerSpec[transitionMatch[1]] && layerSpec[transitionMatch[1]].transition) {\n        return validate({\n            key,\n            value,\n            valueSpec: styleSpec.transition,\n            style,\n            styleSpec\n        });\n    }\n    const valueSpec = options.valueSpec || layerSpec[propertyKey];\n    if (!valueSpec) {\n        return [new ValidationError(key, value, `unknown property \"${ propertyKey }\"`)];\n    }\n    let tokenMatch;\n    if (getType(value) === 'string' && supportsPropertyExpression(valueSpec) && !valueSpec.tokens && (tokenMatch = /^{([^}]+)}$/.exec(value))) {\n        return [new ValidationError(key, value, `\"${ propertyKey }\" does not support interpolation syntax\\n` + `Use an identity property function instead: \\`{ \"type\": \"identity\", \"property\": ${ JSON.stringify(tokenMatch[1]) } }\\`.`)];\n    }\n    const errors = [];\n    if (options.layerType === 'symbol') {\n        if (propertyKey === 'text-field' && style && !style.glyphs) {\n            errors.push(new ValidationError(key, value, 'use of \"text-field\" requires a style \"glyphs\" property'));\n        }\n        if (propertyKey === 'text-font' && isFunction$1(deepUnbundle(value)) && unbundle(value.type) === 'identity') {\n            errors.push(new ValidationError(key, value, '\"text-font\" does not support identity functions'));\n        }\n    }\n    return errors.concat(validate({\n        key: options.key,\n        value,\n        valueSpec,\n        style,\n        styleSpec,\n        expressionContext: 'property',\n        propertyType,\n        propertyKey\n    }));\n}\n\nfunction validatePaintProperty(options) {\n    return validateProperty(options, 'paint');\n}\n\nfunction validateLayoutProperty(options) {\n    return validateProperty(options, 'layout');\n}\n\nfunction validateLayer(options) {\n    let errors = [];\n    const layer = options.value;\n    const key = options.key;\n    const style = options.style;\n    const styleSpec = options.styleSpec;\n    if (!layer.type && !layer.ref) {\n        errors.push(new ValidationError(key, layer, 'either \"type\" or \"ref\" is required'));\n    }\n    let type = unbundle(layer.type);\n    const ref = unbundle(layer.ref);\n    if (layer.id) {\n        const layerId = unbundle(layer.id);\n        for (let i = 0; i < options.arrayIndex; i++) {\n            const otherLayer = style.layers[i];\n            if (unbundle(otherLayer.id) === layerId) {\n                errors.push(new ValidationError(key, layer.id, `duplicate layer id \"${ layer.id }\", previously used at line ${ otherLayer.id.__line__ }`));\n            }\n        }\n    }\n    if ('ref' in layer) {\n        [\n            'type',\n            'source',\n            'source-layer',\n            'filter',\n            'layout'\n        ].forEach(p => {\n            if (p in layer) {\n                errors.push(new ValidationError(key, layer[p], `\"${ p }\" is prohibited for ref layers`));\n            }\n        });\n        let parent;\n        style.layers.forEach(layer => {\n            if (unbundle(layer.id) === ref)\n                parent = layer;\n        });\n        if (!parent) {\n            errors.push(new ValidationError(key, layer.ref, `ref layer \"${ ref }\" not found`));\n        } else if (parent.ref) {\n            errors.push(new ValidationError(key, layer.ref, 'ref cannot reference another ref layer'));\n        } else {\n            type = unbundle(parent.type);\n        }\n    } else if (!(type === 'background' || type === 'sky')) {\n        if (!layer.source) {\n            errors.push(new ValidationError(key, layer, 'missing required property \"source\"'));\n        } else {\n            const source = style.sources && style.sources[layer.source];\n            const sourceType = source && unbundle(source.type);\n            if (!source) {\n                errors.push(new ValidationError(key, layer.source, `source \"${ layer.source }\" not found`));\n            } else if (sourceType === 'vector' && type === 'raster') {\n                errors.push(new ValidationError(key, layer.source, `layer \"${ layer.id }\" requires a raster source`));\n            } else if (sourceType === 'raster' && type !== 'raster') {\n                errors.push(new ValidationError(key, layer.source, `layer \"${ layer.id }\" requires a vector source`));\n            } else if (sourceType === 'vector' && !layer['source-layer']) {\n                errors.push(new ValidationError(key, layer, `layer \"${ layer.id }\" must specify a \"source-layer\"`));\n            } else if (sourceType === 'raster-dem' && type !== 'hillshade') {\n                errors.push(new ValidationError(key, layer.source, 'raster-dem source can only be used with layer type \\'hillshade\\'.'));\n            } else if (type === 'line' && layer.paint && layer.paint['line-gradient'] && (sourceType !== 'geojson' || !source.lineMetrics)) {\n                errors.push(new ValidationError(key, layer, `layer \"${ layer.id }\" specifies a line-gradient, which requires a GeoJSON source with \\`lineMetrics\\` enabled.`));\n            }\n        }\n    }\n    errors = errors.concat(validateObject({\n        key,\n        value: layer,\n        valueSpec: styleSpec.layer,\n        style: options.style,\n        styleSpec: options.styleSpec,\n        objectElementValidators: {\n            '*'() {\n                return [];\n            },\n            type() {\n                return validate({\n                    key: `${ key }.type`,\n                    value: layer.type,\n                    valueSpec: styleSpec.layer.type,\n                    style: options.style,\n                    styleSpec: options.styleSpec,\n                    object: layer,\n                    objectKey: 'type'\n                });\n            },\n            filter: validateFilter,\n            layout(options) {\n                return validateObject({\n                    layer,\n                    key: options.key,\n                    value: options.value,\n                    style: options.style,\n                    styleSpec: options.styleSpec,\n                    objectElementValidators: {\n                        '*'(options) {\n                            return validateLayoutProperty(extend({ layerType: type }, options));\n                        }\n                    }\n                });\n            },\n            paint(options) {\n                return validateObject({\n                    layer,\n                    key: options.key,\n                    value: options.value,\n                    style: options.style,\n                    styleSpec: options.styleSpec,\n                    objectElementValidators: {\n                        '*'(options) {\n                            return validatePaintProperty(extend({ layerType: type }, options));\n                        }\n                    }\n                });\n            }\n        }\n    }));\n    return errors;\n}\n\nfunction validateString(options) {\n    const value = options.value;\n    const key = options.key;\n    const type = getType(value);\n    if (type !== 'string') {\n        return [new ValidationError(key, value, `string expected, ${ type } found`)];\n    }\n    return [];\n}\n\nconst objectElementValidators = { promoteId: validatePromoteId };\nfunction validateSource(options) {\n    const value = options.value;\n    const key = options.key;\n    const styleSpec = options.styleSpec;\n    const style = options.style;\n    if (!value.type) {\n        return [new ValidationError(key, value, '\"type\" is required')];\n    }\n    const type = unbundle(value.type);\n    let errors;\n    switch (type) {\n    case 'vector':\n    case 'raster':\n    case 'raster-dem':\n        errors = validateObject({\n            key,\n            value,\n            valueSpec: styleSpec[`source_${ type.replace('-', '_') }`],\n            style: options.style,\n            styleSpec,\n            objectElementValidators\n        });\n        return errors;\n    case 'geojson':\n        errors = validateObject({\n            key,\n            value,\n            valueSpec: styleSpec.source_geojson,\n            style,\n            styleSpec,\n            objectElementValidators\n        });\n        if (value.cluster) {\n            for (const prop in value.clusterProperties) {\n                const [operator, mapExpr] = value.clusterProperties[prop];\n                const reduceExpr = typeof operator === 'string' ? [\n                    operator,\n                    ['accumulated'],\n                    [\n                        'get',\n                        prop\n                    ]\n                ] : operator;\n                errors.push(...validateExpression({\n                    key: `${ key }.${ prop }.map`,\n                    value: mapExpr,\n                    expressionContext: 'cluster-map'\n                }));\n                errors.push(...validateExpression({\n                    key: `${ key }.${ prop }.reduce`,\n                    value: reduceExpr,\n                    expressionContext: 'cluster-reduce'\n                }));\n            }\n        }\n        return errors;\n    case 'video':\n        return validateObject({\n            key,\n            value,\n            valueSpec: styleSpec.source_video,\n            style,\n            styleSpec\n        });\n    case 'image':\n        return validateObject({\n            key,\n            value,\n            valueSpec: styleSpec.source_image,\n            style,\n            styleSpec\n        });\n    case 'canvas':\n        return [new ValidationError(key, null, `Please use runtime APIs to add canvas sources, rather than including them in stylesheets.`, 'source.canvas')];\n    default:\n        return validateEnum({\n            key: `${ key }.type`,\n            value: value.type,\n            valueSpec: {\n                values: [\n                    'vector',\n                    'raster',\n                    'raster-dem',\n                    'geojson',\n                    'video',\n                    'image'\n                ]\n            },\n            style,\n            styleSpec\n        });\n    }\n}\nfunction validatePromoteId({key, value}) {\n    if (getType(value) === 'string') {\n        return validateString({\n            key,\n            value\n        });\n    } else {\n        const errors = [];\n        for (const prop in value) {\n            errors.push(...validateString({\n                key: `${ key }.${ prop }`,\n                value: value[prop]\n            }));\n        }\n        return errors;\n    }\n}\n\nfunction validateLight(options) {\n    const light = options.value;\n    const styleSpec = options.styleSpec;\n    const lightSpec = styleSpec.light;\n    const style = options.style;\n    let errors = [];\n    const rootType = getType(light);\n    if (light === undefined) {\n        return errors;\n    } else if (rootType !== 'object') {\n        errors = errors.concat([new ValidationError('light', light, `object expected, ${ rootType } found`)]);\n        return errors;\n    }\n    for (const key in light) {\n        const transitionMatch = key.match(/^(.*)-transition$/);\n        if (transitionMatch && lightSpec[transitionMatch[1]] && lightSpec[transitionMatch[1]].transition) {\n            errors = errors.concat(validate({\n                key,\n                value: light[key],\n                valueSpec: styleSpec.transition,\n                style,\n                styleSpec\n            }));\n        } else if (lightSpec[key]) {\n            errors = errors.concat(validate({\n                key,\n                value: light[key],\n                valueSpec: lightSpec[key],\n                style,\n                styleSpec\n            }));\n        } else {\n            errors = errors.concat([new ValidationError(key, light[key], `unknown property \"${ key }\"`)]);\n        }\n    }\n    return errors;\n}\n\nfunction validateTerrain(options) {\n    const terrain = options.value;\n    const key = options.key;\n    const style = options.style;\n    const styleSpec = options.styleSpec;\n    const terrainSpec = styleSpec.terrain;\n    let errors = [];\n    const rootType = getType(terrain);\n    if (terrain === undefined) {\n        return errors;\n    } else if (rootType !== 'object') {\n        errors = errors.concat([new ValidationError('terrain', terrain, `object expected, ${ rootType } found`)]);\n        return errors;\n    }\n    for (const key in terrain) {\n        const transitionMatch = key.match(/^(.*)-transition$/);\n        if (transitionMatch && terrainSpec[transitionMatch[1]] && terrainSpec[transitionMatch[1]].transition) {\n            errors = errors.concat(validate({\n                key,\n                value: terrain[key],\n                valueSpec: styleSpec.transition,\n                style,\n                styleSpec\n            }));\n        } else if (terrainSpec[key]) {\n            errors = errors.concat(validate({\n                key,\n                value: terrain[key],\n                valueSpec: terrainSpec[key],\n                style,\n                styleSpec\n            }));\n        } else {\n            errors = errors.concat([new ValidationError(key, terrain[key], `unknown property \"${ key }\"`)]);\n        }\n    }\n    if (!terrain.source) {\n        errors.push(new ValidationError(key, terrain, `terrain is missing required property \"source\"`));\n    } else {\n        const source = style.sources && style.sources[terrain.source];\n        const sourceType = source && unbundle(source.type);\n        if (!source) {\n            errors.push(new ValidationError(key, terrain.source, `source \"${ terrain.source }\" not found`));\n        } else if (sourceType !== 'raster-dem') {\n            errors.push(new ValidationError(key, terrain.source, `terrain cannot be used with a source of type ${ sourceType }, it only be used with a \"raster-dem\" source type`));\n        }\n    }\n    return errors;\n}\n\nfunction validateFog(options) {\n    const fog = options.value;\n    const style = options.style;\n    const styleSpec = options.styleSpec;\n    const fogSpec = styleSpec.fog;\n    let errors = [];\n    const rootType = getType(fog);\n    if (fog === undefined) {\n        return errors;\n    } else if (rootType !== 'object') {\n        errors = errors.concat([new ValidationError('fog', fog, `object expected, ${ rootType } found`)]);\n        return errors;\n    }\n    for (const key in fog) {\n        const transitionMatch = key.match(/^(.*)-transition$/);\n        if (transitionMatch && fogSpec[transitionMatch[1]] && fogSpec[transitionMatch[1]].transition) {\n            errors = errors.concat(validate({\n                key,\n                value: fog[key],\n                valueSpec: styleSpec.transition,\n                style,\n                styleSpec\n            }));\n        } else if (fogSpec[key]) {\n            errors = errors.concat(validate({\n                key,\n                value: fog[key],\n                valueSpec: fogSpec[key],\n                style,\n                styleSpec\n            }));\n        } else {\n            errors = errors.concat([new ValidationError(key, fog[key], `unknown property \"${ key }\"`)]);\n        }\n    }\n    return errors;\n}\n\nfunction validateFormatted(options) {\n    if (validateString(options).length === 0) {\n        return [];\n    }\n    return validateExpression(options);\n}\n\nfunction validateImage(options) {\n    if (validateString(options).length === 0) {\n        return [];\n    }\n    return validateExpression(options);\n}\n\nconst VALIDATORS = {\n    '*'() {\n        return [];\n    },\n    'array': validateArray,\n    'boolean': validateBoolean,\n    'number': validateNumber,\n    'color': validateColor,\n    'constants': validateConstants,\n    'enum': validateEnum,\n    'filter': validateFilter,\n    'function': validateFunction,\n    'layer': validateLayer,\n    'object': validateObject,\n    'source': validateSource,\n    'light': validateLight,\n    'terrain': validateTerrain,\n    'fog': validateFog,\n    'string': validateString,\n    'formatted': validateFormatted,\n    'resolvedImage': validateImage\n};\nfunction validate(options) {\n    const value = options.value;\n    const valueSpec = options.valueSpec;\n    const styleSpec = options.styleSpec;\n    if (valueSpec.expression && isFunction$1(unbundle(value))) {\n        return validateFunction(options);\n    } else if (valueSpec.expression && isExpression(deepUnbundle(value))) {\n        return validateExpression(options);\n    } else if (valueSpec.type && VALIDATORS[valueSpec.type]) {\n        return VALIDATORS[valueSpec.type](options);\n    } else {\n        const valid = validateObject(extend({}, options, { valueSpec: valueSpec.type ? styleSpec[valueSpec.type] : valueSpec }));\n        return valid;\n    }\n}\n\nfunction validateGlyphsURL (options) {\n    const value = options.value;\n    const key = options.key;\n    const errors = validateString(options);\n    if (errors.length)\n        return errors;\n    if (value.indexOf('{fontstack}') === -1) {\n        errors.push(new ValidationError(key, value, '\"glyphs\" url must include a \"{fontstack}\" token'));\n    }\n    if (value.indexOf('{range}') === -1) {\n        errors.push(new ValidationError(key, value, '\"glyphs\" url must include a \"{range}\" token'));\n    }\n    return errors;\n}\n\nfunction validateStyleMin(style, styleSpec = v8) {\n    let errors = [];\n    errors = errors.concat(validate({\n        key: '',\n        value: style,\n        valueSpec: styleSpec.$root,\n        styleSpec,\n        style,\n        objectElementValidators: {\n            glyphs: validateGlyphsURL,\n            '*'() {\n                return [];\n            }\n        }\n    }));\n    if (style.constants) {\n        errors = errors.concat(validateConstants({\n            key: 'constants',\n            value: style.constants,\n            style,\n            styleSpec\n        }));\n    }\n    return sortErrors(errors);\n}\nvalidateStyleMin.source = wrapCleanErrors(validateSource);\nvalidateStyleMin.light = wrapCleanErrors(validateLight);\nvalidateStyleMin.terrain = wrapCleanErrors(validateTerrain);\nvalidateStyleMin.fog = wrapCleanErrors(validateFog);\nvalidateStyleMin.layer = wrapCleanErrors(validateLayer);\nvalidateStyleMin.filter = wrapCleanErrors(validateFilter);\nvalidateStyleMin.paintProperty = wrapCleanErrors(validatePaintProperty);\nvalidateStyleMin.layoutProperty = wrapCleanErrors(validateLayoutProperty);\nfunction sortErrors(errors) {\n    return [].concat(errors).sort((a, b) => {\n        return a.line - b.line;\n    });\n}\nfunction wrapCleanErrors(inner) {\n    return function (...args) {\n        return sortErrors(inner.apply(this, args));\n    };\n}\n\n/* parser generated by jison 0.4.15 */\n\nvar jsonlint = createCommonjsModule(function (module, exports) {\n/*\n  Returns a Parser object of the following structure:\n\n  Parser: {\n    yy: {}\n  }\n\n  Parser.prototype: {\n    yy: {},\n    trace: function(),\n    symbols_: {associative list: name ==> number},\n    terminals_: {associative list: number ==> name},\n    productions_: [...],\n    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n    table: [...],\n    defaultActions: {...},\n    parseError: function(str, hash),\n    parse: function(input),\n\n    lexer: {\n        EOF: 1,\n        parseError: function(str, hash),\n        setInput: function(input),\n        input: function(),\n        unput: function(str),\n        more: function(),\n        less: function(n),\n        pastInput: function(),\n        upcomingInput: function(),\n        showPosition: function(),\n        test_match: function(regex_match_array, rule_index),\n        next: function(),\n        lex: function(),\n        begin: function(condition),\n        popState: function(),\n        _currentRules: function(),\n        topState: function(),\n        pushState: function(condition),\n\n        options: {\n            ranges: boolean           (optional: true ==> token location info will include a .range[] member)\n            flex: boolean             (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n            backtrack_lexer: boolean  (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n        },\n\n        performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n        rules: [...],\n        conditions: {associative list: name ==> set},\n    }\n  }\n\n\n  token location info (@$, _$, etc.): {\n    first_line: n,\n    last_line: n,\n    first_column: n,\n    last_column: n,\n    range: [start_number, end_number]       (where the numbers are indexes into the input string, regular zero-based)\n  }\n\n\n  the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n    text:        (matched text)\n    token:       (the produced terminal token, if any)\n    line:        (yylineno)\n  }\n  while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n    loc:         (yylloc)\n    expected:    (string describing the set of expected tokens)\n    recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n  }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,12],$V1=[1,13],$V2=[1,9],$V3=[1,10],$V4=[1,11],$V5=[1,14],$V6=[1,15],$V7=[14,18,22,24],$V8=[18,22],$V9=[22,24];\nvar parser = {trace: function trace() { },\nyy: {},\nsymbols_: {\"error\":2,\"JSONString\":3,\"STRING\":4,\"JSONNumber\":5,\"NUMBER\":6,\"JSONNullLiteral\":7,\"NULL\":8,\"JSONBooleanLiteral\":9,\"TRUE\":10,\"FALSE\":11,\"JSONText\":12,\"JSONValue\":13,\"EOF\":14,\"JSONObject\":15,\"JSONArray\":16,\"{\":17,\"}\":18,\"JSONMemberList\":19,\"JSONMember\":20,\":\":21,\",\":22,\"[\":23,\"]\":24,\"JSONElementList\":25,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"STRING\",6:\"NUMBER\",8:\"NULL\",10:\"TRUE\",11:\"FALSE\",14:\"EOF\",17:\"{\",18:\"}\",21:\":\",22:\",\",23:\"[\",24:\"]\"},\nproductions_: [0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1:\n // replace escaped characters with actual character\n          this.$ = new String(yytext.replace(/\\\\(\\\\|\")/g, \"$\"+\"1\")\n                     .replace(/\\\\n/g,'\\n')\n                     .replace(/\\\\r/g,'\\r')\n                     .replace(/\\\\t/g,'\\t')\n                     .replace(/\\\\v/g,'\\v')\n                     .replace(/\\\\f/g,'\\f')\n                     .replace(/\\\\b/g,'\\b'));\n          this.$.__line__ =  this._$.first_line;\n        \nbreak;\ncase 2:\n\n            this.$ = new Number(yytext);\n            this.$.__line__ =  this._$.first_line;\n        \nbreak;\ncase 3:\n\n            this.$ = null;\n        \nbreak;\ncase 4:\n\n            this.$ = new Boolean(true);\n            this.$.__line__ = this._$.first_line;\n        \nbreak;\ncase 5:\n\n            this.$ = new Boolean(false);\n            this.$.__line__ = this._$.first_line;\n        \nbreak;\ncase 6:\nreturn this.$ = $$[$0-1];\ncase 13:\nthis.$ = {}; Object.defineProperty(this.$, '__line__', {\n            value: this._$.first_line,\n            enumerable: false\n        });\nbreak;\ncase 14: case 19:\nthis.$ = $$[$0-1]; Object.defineProperty(this.$, '__line__', {\n            value: this._$.first_line,\n            enumerable: false\n        });\nbreak;\ncase 15:\nthis.$ = [$$[$0-2], $$[$0]];\nbreak;\ncase 16:\nthis.$ = {}; this.$[$$[$0][0]] = $$[$0][1];\nbreak;\ncase 17:\nthis.$ = $$[$0-2]; $$[$0-2][$$[$0][0]] = $$[$0][1];\nbreak;\ncase 18:\nthis.$ = []; Object.defineProperty(this.$, '__line__', {\n            value: this._$.first_line,\n            enumerable: false\n        });\nbreak;\ncase 20:\nthis.$ = [$$[$0]];\nbreak;\ncase 21:\nthis.$ = $$[$0-2]; $$[$0-2].push($$[$0]);\nbreak;\n}\n},\ntable: [{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,12:1,13:2,15:7,16:8,17:$V5,23:$V6},{1:[3]},{14:[1,16]},o($V7,[2,7]),o($V7,[2,8]),o($V7,[2,9]),o($V7,[2,10]),o($V7,[2,11]),o($V7,[2,12]),o($V7,[2,3]),o($V7,[2,4]),o($V7,[2,5]),o([14,18,21,22,24],[2,1]),o($V7,[2,2]),{3:20,4:$V0,18:[1,17],19:18,20:19},{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,13:23,15:7,16:8,17:$V5,23:$V6,24:[1,21],25:22},{1:[2,6]},o($V7,[2,13]),{18:[1,24],22:[1,25]},o($V8,[2,16]),{21:[1,26]},o($V7,[2,18]),{22:[1,28],24:[1,27]},o($V9,[2,20]),o($V7,[2,14]),{3:20,4:$V0,20:29},{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,13:30,15:7,16:8,17:$V5,23:$V6},o($V7,[2,19]),{3:5,4:$V0,5:6,6:$V1,7:3,8:$V2,9:4,10:$V3,11:$V4,13:31,15:7,16:8,17:$V5,23:$V6},o($V8,[2,17]),o($V8,[2,15]),o($V9,[2,21])],\ndefaultActions: {16:[2,6]},\nparseError: function parseError(str, hash) {\n    if (hash.recoverable) {\n        this.trace(str);\n    } else {\n        throw new Error(str);\n    }\n},\nparse: function parse(input) {\n    var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;\n    var args = lstack.slice.call(arguments, 1);\n    var lexer = Object.create(this.lexer);\n    var sharedState = { yy: {} };\n    for (var k in this.yy) {\n        if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n            sharedState.yy[k] = this.yy[k];\n        }\n    }\n    lexer.setInput(input, sharedState.yy);\n    sharedState.yy.lexer = lexer;\n    sharedState.yy.parser = this;\n    if (typeof lexer.yylloc == 'undefined') {\n        lexer.yylloc = {};\n    }\n    var yyloc = lexer.yylloc;\n    lstack.push(yyloc);\n    var ranges = lexer.options && lexer.options.ranges;\n    if (typeof sharedState.yy.parseError === 'function') {\n        this.parseError = sharedState.yy.parseError;\n    } else {\n        this.parseError = Object.getPrototypeOf(this).parseError;\n    }\n    \n        function lex() {\n            var token;\n            token = lexer.lex() || EOF;\n            if (typeof token !== 'number') {\n                token = self.symbols_[token] || token;\n            }\n            return token;\n        }\n    var symbol, state, action, r, yyval = {}, p, len, newState, expected;\n    while (true) {\n        state = stack[stack.length - 1];\n        if (this.defaultActions[state]) {\n            action = this.defaultActions[state];\n        } else {\n            if (symbol === null || typeof symbol == 'undefined') {\n                symbol = lex();\n            }\n            action = table[state] && table[state][symbol];\n        }\n                    if (typeof action === 'undefined' || !action.length || !action[0]) {\n                var errStr = '';\n                expected = [];\n                for (p in table[state]) {\n                    if (this.terminals_[p] && p > TERROR) {\n                        expected.push('\\'' + this.terminals_[p] + '\\'');\n                    }\n                }\n                if (lexer.showPosition) {\n                    errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n                } else {\n                    errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n                }\n                this.parseError(errStr, {\n                    text: lexer.match,\n                    token: this.terminals_[symbol] || symbol,\n                    line: lexer.yylineno,\n                    loc: yyloc,\n                    expected: expected\n                });\n            }\n        if (action[0] instanceof Array && action.length > 1) {\n            throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n        }\n        switch (action[0]) {\n        case 1:\n            stack.push(symbol);\n            vstack.push(lexer.yytext);\n            lstack.push(lexer.yylloc);\n            stack.push(action[1]);\n            symbol = null;\n            {\n                yyleng = lexer.yyleng;\n                yytext = lexer.yytext;\n                yylineno = lexer.yylineno;\n                yyloc = lexer.yylloc;\n            }\n            break;\n        case 2:\n            len = this.productions_[action[1]][1];\n            yyval.$ = vstack[vstack.length - len];\n            yyval._$ = {\n                first_line: lstack[lstack.length - (len || 1)].first_line,\n                last_line: lstack[lstack.length - 1].last_line,\n                first_column: lstack[lstack.length - (len || 1)].first_column,\n                last_column: lstack[lstack.length - 1].last_column\n            };\n            if (ranges) {\n                yyval._$.range = [\n                    lstack[lstack.length - (len || 1)].range[0],\n                    lstack[lstack.length - 1].range[1]\n                ];\n            }\n            r = this.performAction.apply(yyval, [\n                yytext,\n                yyleng,\n                yylineno,\n                sharedState.yy,\n                action[1],\n                vstack,\n                lstack\n            ].concat(args));\n            if (typeof r !== 'undefined') {\n                return r;\n            }\n            if (len) {\n                stack = stack.slice(0, -1 * len * 2);\n                vstack = vstack.slice(0, -1 * len);\n                lstack = lstack.slice(0, -1 * len);\n            }\n            stack.push(this.productions_[action[1]][0]);\n            vstack.push(yyval.$);\n            lstack.push(yyval._$);\n            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n            stack.push(newState);\n            break;\n        case 3:\n            return true;\n        }\n    }\n    return true;\n}};\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n        if (this.yy.parser) {\n            this.yy.parser.parseError(str, hash);\n        } else {\n            throw new Error(str);\n        }\n    },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n        this.yy = yy || this.yy || {};\n        this._input = input;\n        this._more = this._backtrack = this.done = false;\n        this.yylineno = this.yyleng = 0;\n        this.yytext = this.matched = this.match = '';\n        this.conditionStack = ['INITIAL'];\n        this.yylloc = {\n            first_line: 1,\n            first_column: 0,\n            last_line: 1,\n            last_column: 0\n        };\n        if (this.options.ranges) {\n            this.yylloc.range = [0,0];\n        }\n        this.offset = 0;\n        return this;\n    },\n\n// consumes and returns one char from the input\ninput:function () {\n        var ch = this._input[0];\n        this.yytext += ch;\n        this.yyleng++;\n        this.offset++;\n        this.match += ch;\n        this.matched += ch;\n        var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno++;\n            this.yylloc.last_line++;\n        } else {\n            this.yylloc.last_column++;\n        }\n        if (this.options.ranges) {\n            this.yylloc.range[1]++;\n        }\n\n        this._input = this._input.slice(1);\n        return ch;\n    },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n        var len = ch.length;\n        var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n        this._input = ch + this._input;\n        this.yytext = this.yytext.substr(0, this.yytext.length - len);\n        //this.yyleng -= len;\n        this.offset -= len;\n        var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n        this.match = this.match.substr(0, this.match.length - 1);\n        this.matched = this.matched.substr(0, this.matched.length - 1);\n\n        if (lines.length - 1) {\n            this.yylineno -= lines.length - 1;\n        }\n        var r = this.yylloc.range;\n\n        this.yylloc = {\n            first_line: this.yylloc.first_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.first_column,\n            last_column: lines ?\n                (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n                 + oldLines[oldLines.length - lines.length].length - lines[0].length :\n              this.yylloc.first_column - len\n        };\n\n        if (this.options.ranges) {\n            this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n        }\n        this.yyleng = this.yytext.length;\n        return this;\n    },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n        this._more = true;\n        return this;\n    },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n        if (this.options.backtrack_lexer) {\n            this._backtrack = true;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n\n        }\n        return this;\n    },\n\n// retain first n characters of the match\nless:function (n) {\n        this.unput(this.match.slice(n));\n    },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n        var past = this.matched.substr(0, this.matched.length - this.match.length);\n        return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n    },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n        var next = this.match;\n        if (next.length < 20) {\n            next += this._input.substr(0, 20-next.length);\n        }\n        return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n    },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n        var pre = this.pastInput();\n        var c = new Array(pre.length + 1).join(\"-\");\n        return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n    },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function (match, indexed_rule) {\n        var token,\n            lines,\n            backup;\n\n        if (this.options.backtrack_lexer) {\n            // save context\n            backup = {\n                yylineno: this.yylineno,\n                yylloc: {\n                    first_line: this.yylloc.first_line,\n                    last_line: this.last_line,\n                    first_column: this.yylloc.first_column,\n                    last_column: this.yylloc.last_column\n                },\n                yytext: this.yytext,\n                match: this.match,\n                matches: this.matches,\n                matched: this.matched,\n                yyleng: this.yyleng,\n                offset: this.offset,\n                _more: this._more,\n                _input: this._input,\n                yy: this.yy,\n                conditionStack: this.conditionStack.slice(0),\n                done: this.done\n            };\n            if (this.options.ranges) {\n                backup.yylloc.range = this.yylloc.range.slice(0);\n            }\n        }\n\n        lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n            this.yylineno += lines.length;\n        }\n        this.yylloc = {\n            first_line: this.yylloc.last_line,\n            last_line: this.yylineno + 1,\n            first_column: this.yylloc.last_column,\n            last_column: lines ?\n                         lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n                         this.yylloc.last_column + match[0].length\n        };\n        this.yytext += match[0];\n        this.match += match[0];\n        this.matches = match;\n        this.yyleng = this.yytext.length;\n        if (this.options.ranges) {\n            this.yylloc.range = [this.offset, this.offset += this.yyleng];\n        }\n        this._more = false;\n        this._backtrack = false;\n        this._input = this._input.slice(match[0].length);\n        this.matched += match[0];\n        token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n        if (this.done && this._input) {\n            this.done = false;\n        }\n        if (token) {\n            return token;\n        } else if (this._backtrack) {\n            // recover context\n            for (var k in backup) {\n                this[k] = backup[k];\n            }\n            return false; // rule action called reject() implying the next rule should be tested instead.\n        }\n        return false;\n    },\n\n// return next match in input\nnext:function () {\n        if (this.done) {\n            return this.EOF;\n        }\n        if (!this._input) {\n            this.done = true;\n        }\n\n        var token,\n            match,\n            tempMatch,\n            index;\n        if (!this._more) {\n            this.yytext = '';\n            this.match = '';\n        }\n        var rules = this._currentRules();\n        for (var i = 0; i < rules.length; i++) {\n            tempMatch = this._input.match(this.rules[rules[i]]);\n            if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n                match = tempMatch;\n                index = i;\n                if (this.options.backtrack_lexer) {\n                    token = this.test_match(tempMatch, rules[i]);\n                    if (token !== false) {\n                        return token;\n                    } else if (this._backtrack) {\n                        match = false;\n                        continue; // rule action called reject() implying a rule MISmatch.\n                    } else {\n                        // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n                        return false;\n                    }\n                } else if (!this.options.flex) {\n                    break;\n                }\n            }\n        }\n        if (match) {\n            token = this.test_match(match, rules[index]);\n            if (token !== false) {\n                return token;\n            }\n            // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n            return false;\n        }\n        if (this._input === \"\") {\n            return this.EOF;\n        } else {\n            return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n                text: \"\",\n                token: null,\n                line: this.yylineno\n            });\n        }\n    },\n\n// return next match that has a token\nlex:function lex() {\n        var r = this.next();\n        if (r) {\n            return r;\n        } else {\n            return this.lex();\n        }\n    },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin(condition) {\n        this.conditionStack.push(condition);\n    },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState() {\n        var n = this.conditionStack.length - 1;\n        if (n > 0) {\n            return this.conditionStack.pop();\n        } else {\n            return this.conditionStack[0];\n        }\n    },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules() {\n        if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n            return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n        } else {\n            return this.conditions[\"INITIAL\"].rules;\n        }\n    },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState(n) {\n        n = this.conditionStack.length - 1 - Math.abs(n || 0);\n        if (n >= 0) {\n            return this.conditionStack[n];\n        } else {\n            return \"INITIAL\";\n        }\n    },\n\n// alias for begin(condition)\npushState:function pushState(condition) {\n        this.begin(condition);\n    },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n        return this.conditionStack.length;\n    },\noptions: {},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nswitch($avoiding_name_collisions) {\ncase 0:/* skip whitespace */\nbreak;\ncase 1:return 6\ncase 2:yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2); return 4\ncase 3:return 17\ncase 4:return 18\ncase 5:return 23\ncase 6:return 24\ncase 7:return 22\ncase 8:return 21\ncase 9:return 10\ncase 10:return 11\ncase 11:return 8\ncase 12:return 14\ncase 13:return 'INVALID'\n}\n},\nrules: [/^(?:\\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\\.[0-9]+)?([eE][-+]?[0-9]+)?\\b)/,/^(?:\"(?:\\\\[\\\\\"bfnrt/]|\\\\u[a-fA-F0-9]{4}|[^\\\\\\0-\\x09\\x0a-\\x1f\"])*\")/,/^(?:\\{)/,/^(?:\\})/,/^(?:\\[)/,/^(?:\\])/,/^(?:,)/,/^(?::)/,/^(?:true\\b)/,/^(?:false\\b)/,/^(?:null\\b)/,/^(?:$)/,/^(?:.)/],\nconditions: {\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n  this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (typeof commonjsRequire !== 'undefined' && 'object' !== 'undefined') {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\n}\n});\n\nfunction readStyle(style) {\n    if (style instanceof String || typeof style === 'string' || style instanceof Buffer) {\n        try {\n            return jsonlint.parse(style.toString());\n        } catch (e) {\n            throw new ParsingError$1(e);\n        }\n    }\n    return style;\n}\n\nfunction validateStyle(style, styleSpec = v8) {\n    let s = style;\n    try {\n        s = readStyle(s);\n    } catch (e) {\n        return [e];\n    }\n    return validateStyleMin(s, styleSpec);\n}\n\nconst SUPPORTED_SPEC_VERSION = 8;\nconst MAX_SOURCES_IN_STYLE = 15;\nfunction isValid(value, regex) {\n    if (!value || getType(value) !== 'string')\n        return true;\n    return !!value.match(regex);\n}\nfunction getSourceCount(source) {\n    if (source.url) {\n        return source.url.split(',').length;\n    } else {\n        return 0;\n    }\n}\nfunction getAllowedKeyErrors(obj, keys, path) {\n    const allowed = new Set(keys);\n    const errors = [];\n    Object.keys(obj).forEach(k => {\n        if (!allowed.has(k)) {\n            const prop = path ? `${ path }.${ k }` : null;\n            errors.push(new ValidationError(prop, obj[k], `Unsupported property \"${ k }\"`));\n        }\n    });\n    return errors;\n}\nconst acceptedSourceTypes = new Set([\n    'vector',\n    'raster',\n    'raster-dem'\n]);\nfunction getSourceErrors(source, i) {\n    const errors = [];\n    const sourceKeys = [\n        'type',\n        'url',\n        'tileSize'\n    ];\n    errors.push(...getAllowedKeyErrors(source, sourceKeys, 'source'));\n    if (!acceptedSourceTypes.has(String(source.type))) {\n        errors.push(new ValidationError(`sources[${ i }].type`, source.type, `Expected one of [${ Array.from(acceptedSourceTypes).join(', ') }]`));\n    }\n    const sourceUrlPattern = /^mapbox:\\/\\/([^/]*)$/;\n    if (!source.url || !isValid(source.url, sourceUrlPattern)) {\n        errors.push(new ValidationError(`sources[${ i }].url`, source.url, 'Expected a valid Mapbox tileset url'));\n    }\n    return errors;\n}\nfunction getSourcesErrors(sources) {\n    const errors = [];\n    let count = 0;\n    Object.keys(sources).forEach((s, i) => {\n        const sourceErrors = getSourceErrors(sources[s], i);\n        if (!sourceErrors.length) {\n            count = count + getSourceCount(sources[s]);\n        }\n        errors.push(...sourceErrors);\n    });\n    if (count > MAX_SOURCES_IN_STYLE) {\n        errors.push(new ValidationError('sources', null, `Styles must contain ${ MAX_SOURCES_IN_STYLE } or fewer sources`));\n    }\n    return errors;\n}\nfunction getRootErrors(style, specKeys) {\n    const errors = [];\n    const optionalRootProperties = [\n        'owner',\n        'id',\n        'cacheControl',\n        'draft',\n        'created',\n        'modified',\n        'visibility'\n    ];\n    const allowedKeyErrors = getAllowedKeyErrors(style, [\n        ...specKeys,\n        ...optionalRootProperties\n    ]);\n    errors.push(...allowedKeyErrors);\n    if (style.version > SUPPORTED_SPEC_VERSION || style.version < SUPPORTED_SPEC_VERSION) {\n        errors.push(new ValidationError('version', style.version, `Style version must be ${ SUPPORTED_SPEC_VERSION }`));\n    }\n    const glyphUrlPattern = /^mapbox:\\/\\/fonts\\/([^/]*)\\/{fontstack}\\/{range}.pbf$/;\n    if (!isValid(style.glyphs, glyphUrlPattern)) {\n        errors.push(new ValidationError('glyphs', style.glyphs, 'Styles must reference glyphs hosted by Mapbox'));\n    }\n    const spriteUrlPattern = /^mapbox:\\/\\/sprites\\/([^/]*)\\/([^/]*)\\/?([^/]*)?$/;\n    if (!isValid(style.sprite, spriteUrlPattern)) {\n        errors.push(new ValidationError('sprite', style.sprite, 'Styles must reference sprites hosted by Mapbox'));\n    }\n    const visibilityPattern = /^(public|private)$/;\n    if (!isValid(style.visibility, visibilityPattern)) {\n        errors.push(new ValidationError('visibility', style.visibility, 'Style visibility must be public or private'));\n    }\n    return errors;\n}\nfunction validateMapboxApiSupported(style) {\n    let s = style;\n    try {\n        s = readStyle(s);\n    } catch (e) {\n        return [e];\n    }\n    let errors = validateStyleMin(s, v8).concat(getRootErrors(s, Object.keys(v8.$root)));\n    if (s.sources) {\n        errors = errors.concat(getSourcesErrors(s.sources));\n    }\n    return errors;\n}\n\nconst expression$1 = {\n    StyleExpression,\n    isExpression,\n    isExpressionFilter,\n    createExpression,\n    createPropertyExpression,\n    normalizePropertyExpression,\n    ZoomConstantExpression,\n    ZoomDependentExpression,\n    StylePropertyFunction\n};\nconst styleFunction = {\n    convertFunction,\n    createFunction,\n    isFunction: isFunction$1\n};\nconst visit = {\n    eachSource,\n    eachLayer,\n    eachProperty\n};\nvalidateStyle.parsed = validateStyle;\nvalidateStyle.latest = validateStyle;\n\nexport { Color, ParsingError$1 as ParsingError, ValidationError, composite, convertFilter$1 as convertFilter, derefLayers, diffStyles as diff, expression$1 as expression, createFilter as featureFilter, format, styleFunction as function, v8 as latest, migrate, v8, validateStyle as validate, validateMapboxApiSupported, visit };\n//# sourceMappingURL=index.es.js.map\n","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/BaseTile\n */\nimport Layer from './Layer.js';\nimport TileProperty from './TileProperty.js';\nimport { assign } from '../obj.js';\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable\").OnSignature<import(\"./Base\").BaseLayerObjectEventTypes|\n *     'change:source'|'change:preload'|'change:useInterimTilesOnError', import(\"../Object\").ObjectEvent, Return> &\n *   import(\"../Observable\").OnSignature<import(\"../render/EventType\").LayerRenderEventTypes, import(\"../render/Event\").default, Return> &\n *   import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"./Base\").BaseLayerObjectEventTypes|\n *   'change:source'|'change:preload'|'change:useInterimTilesOnError'|import(\"../render/EventType\").LayerRenderEventTypes, Return>} BaseTileLayerOnSignature\n */\n/**\n * @template {import(\"../source/Tile.js\").default} TileSourceType\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {TileSourceType} [source] Source for this layer.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link import(\"../PluggableMap.js\").default#addLayer map.addLayer()}.\n * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n/**\n * @classdesc\n * For layer sources that provide pre-rendered, tiled images in grids that are\n * organized by zoom levels for specific resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Tile.js\").default} TileSourceType\n * @extends {Layer<TileSourceType>}\n * @api\n */\nvar BaseTileLayer = /** @class */ (function (_super) {\n    __extends(BaseTileLayer, _super);\n    /**\n     * @param {Options<TileSourceType>} [opt_options] Tile layer options.\n     */\n    function BaseTileLayer(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var baseOptions = assign({}, options);\n        delete baseOptions.preload;\n        delete baseOptions.useInterimTilesOnError;\n        _this = _super.call(this, baseOptions) || this;\n        /***\n         * @type {BaseTileLayerOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {BaseTileLayerOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {BaseTileLayerOnSignature<void>}\n         */\n        _this.un;\n        _this.setPreload(options.preload !== undefined ? options.preload : 0);\n        _this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined\n            ? options.useInterimTilesOnError\n            : true);\n        return _this;\n    }\n    /**\n     * Return the level as number to which we will preload tiles up to.\n     * @return {number} The level to preload tiles up to.\n     * @observable\n     * @api\n     */\n    BaseTileLayer.prototype.getPreload = function () {\n        return /** @type {number} */ (this.get(TileProperty.PRELOAD));\n    };\n    /**\n     * Set the level as number to which we will preload tiles up to.\n     * @param {number} preload The level to preload tiles up to.\n     * @observable\n     * @api\n     */\n    BaseTileLayer.prototype.setPreload = function (preload) {\n        this.set(TileProperty.PRELOAD, preload);\n    };\n    /**\n     * Whether we use interim tiles on error.\n     * @return {boolean} Use interim tiles on error.\n     * @observable\n     * @api\n     */\n    BaseTileLayer.prototype.getUseInterimTilesOnError = function () {\n        return /** @type {boolean} */ (this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR));\n    };\n    /**\n     * Set whether we use interim tiles on error.\n     * @param {boolean} useInterimTilesOnError Use interim tiles on error.\n     * @observable\n     * @api\n     */\n    BaseTileLayer.prototype.setUseInterimTilesOnError = function (useInterimTilesOnError) {\n        this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n    };\n    return BaseTileLayer;\n}(Layer));\nexport default BaseTileLayer;\n//# sourceMappingURL=BaseTile.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Tile\n */\nimport BaseTileLayer from './BaseTile.js';\nimport CanvasTileLayerRenderer from '../renderer/canvas/TileLayer.js';\n/**\n * @classdesc\n * For layer sources that provide pre-rendered, tiled images in grids that are\n * organized by zoom levels for specific resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Tile.js\").default} TileSourceType\n * @extends {BaseTileLayer<TileSourceType>}\n * @api\n */\nvar TileLayer = /** @class */ (function (_super) {\n    __extends(TileLayer, _super);\n    /**\n     * @param {import(\"./BaseTile.js\").Options<TileSourceType>} [opt_options] Tile layer options.\n     */\n    function TileLayer(opt_options) {\n        return _super.call(this, opt_options) || this;\n    }\n    /**\n     * Create a renderer for this layer.\n     * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n     * @protected\n     */\n    TileLayer.prototype.createRenderer = function () {\n        return new CanvasTileLayerRenderer(this);\n    };\n    return TileLayer;\n}(BaseTileLayer));\nexport default TileLayer;\n//# sourceMappingURL=Tile.js.map","/**\n * @module ol/Disposable\n */\n/**\n * @classdesc\n * Objects that need to clean up after themselves.\n */\nvar Disposable = /** @class */ (function () {\n    function Disposable() {\n        /**\n         * The object has already been disposed.\n         * @type {boolean}\n         * @protected\n         */\n        this.disposed = false;\n    }\n    /**\n     * Clean up.\n     */\n    Disposable.prototype.dispose = function () {\n        if (!this.disposed) {\n            this.disposed = true;\n            this.disposeInternal();\n        }\n    };\n    /**\n     * Extension point for disposable objects.\n     * @protected\n     */\n    Disposable.prototype.disposeInternal = function () { };\n    return Disposable;\n}());\nexport default Disposable;\n//# sourceMappingURL=Disposable.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/render/canvas/Builder\n */\nimport CanvasInstruction from './Instruction.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport Relationship from '../../extent/Relationship.js';\nimport VectorContext from '../VectorContext.js';\nimport { asColorLike } from '../../colorlike.js';\nimport { buffer, clone, containsCoordinate, coordinateRelationship, } from '../../extent.js';\nimport { defaultFillStyle, defaultLineCap, defaultLineDash, defaultLineDashOffset, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, } from '../canvas.js';\nimport { equals, reverseSubArray } from '../../array.js';\nimport { inflateCoordinates, inflateCoordinatesArray, inflateMultiCoordinatesArray, } from '../../geom/flat/inflate.js';\nvar CanvasBuilder = /** @class */ (function (_super) {\n    __extends(CanvasBuilder, _super);\n    /**\n     * @param {number} tolerance Tolerance.\n     * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     */\n    function CanvasBuilder(tolerance, maxExtent, resolution, pixelRatio) {\n        var _this = _super.call(this) || this;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.tolerance = tolerance;\n        /**\n         * @protected\n         * @const\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.maxExtent = maxExtent;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.pixelRatio = pixelRatio;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.maxLineWidth = 0;\n        /**\n         * @protected\n         * @const\n         * @type {number}\n         */\n        _this.resolution = resolution;\n        /**\n         * @private\n         * @type {Array<*>}\n         */\n        _this.beginGeometryInstruction1_ = null;\n        /**\n         * @private\n         * @type {Array<*>}\n         */\n        _this.beginGeometryInstruction2_ = null;\n        /**\n         * @private\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.bufferedMaxExtent_ = null;\n        /**\n         * @protected\n         * @type {Array<*>}\n         */\n        _this.instructions = [];\n        /**\n         * @protected\n         * @type {Array<number>}\n         */\n        _this.coordinates = [];\n        /**\n         * @private\n         * @type {import(\"../../coordinate.js\").Coordinate}\n         */\n        _this.tmpCoordinate_ = [];\n        /**\n         * @protected\n         * @type {Array<*>}\n         */\n        _this.hitDetectionInstructions = [];\n        /**\n         * @protected\n         * @type {import(\"../canvas.js\").FillStrokeState}\n         */\n        _this.state = /** @type {import(\"../canvas.js\").FillStrokeState} */ ({});\n        return _this;\n    }\n    /**\n     * @protected\n     * @param {Array<number>} dashArray Dash array.\n     * @return {Array<number>} Dash array with pixel ratio applied\n     */\n    CanvasBuilder.prototype.applyPixelRatio = function (dashArray) {\n        var pixelRatio = this.pixelRatio;\n        return pixelRatio == 1\n            ? dashArray\n            : dashArray.map(function (dash) {\n                return dash * pixelRatio;\n            });\n    };\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} stride Stride.\n     * @protected\n     * @return {number} My end\n     */\n    CanvasBuilder.prototype.appendFlatPointCoordinates = function (flatCoordinates, stride) {\n        var extent = this.getBufferedMaxExtent();\n        var tmpCoord = this.tmpCoordinate_;\n        var coordinates = this.coordinates;\n        var myEnd = coordinates.length;\n        for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n            tmpCoord[0] = flatCoordinates[i];\n            tmpCoord[1] = flatCoordinates[i + 1];\n            if (containsCoordinate(extent, tmpCoord)) {\n                coordinates[myEnd++] = tmpCoord[0];\n                coordinates[myEnd++] = tmpCoord[1];\n            }\n        }\n        return myEnd;\n    };\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {number} end End.\n     * @param {number} stride Stride.\n     * @param {boolean} closed Last input coordinate equals first.\n     * @param {boolean} skipFirst Skip first coordinate.\n     * @protected\n     * @return {number} My end.\n     */\n    CanvasBuilder.prototype.appendFlatLineCoordinates = function (flatCoordinates, offset, end, stride, closed, skipFirst) {\n        var coordinates = this.coordinates;\n        var myEnd = coordinates.length;\n        var extent = this.getBufferedMaxExtent();\n        if (skipFirst) {\n            offset += stride;\n        }\n        var lastXCoord = flatCoordinates[offset];\n        var lastYCoord = flatCoordinates[offset + 1];\n        var nextCoord = this.tmpCoordinate_;\n        var skipped = true;\n        var i, lastRel, nextRel;\n        for (i = offset + stride; i < end; i += stride) {\n            nextCoord[0] = flatCoordinates[i];\n            nextCoord[1] = flatCoordinates[i + 1];\n            nextRel = coordinateRelationship(extent, nextCoord);\n            if (nextRel !== lastRel) {\n                if (skipped) {\n                    coordinates[myEnd++] = lastXCoord;\n                    coordinates[myEnd++] = lastYCoord;\n                    skipped = false;\n                }\n                coordinates[myEnd++] = nextCoord[0];\n                coordinates[myEnd++] = nextCoord[1];\n            }\n            else if (nextRel === Relationship.INTERSECTING) {\n                coordinates[myEnd++] = nextCoord[0];\n                coordinates[myEnd++] = nextCoord[1];\n                skipped = false;\n            }\n            else {\n                skipped = true;\n            }\n            lastXCoord = nextCoord[0];\n            lastYCoord = nextCoord[1];\n            lastRel = nextRel;\n        }\n        // Last coordinate equals first or only one point to append:\n        if ((closed && skipped) || i === offset + stride) {\n            coordinates[myEnd++] = lastXCoord;\n            coordinates[myEnd++] = lastYCoord;\n        }\n        return myEnd;\n    };\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {Array<number>} ends Ends.\n     * @param {number} stride Stride.\n     * @param {Array<number>} builderEnds Builder ends.\n     * @return {number} Offset.\n     */\n    CanvasBuilder.prototype.drawCustomCoordinates_ = function (flatCoordinates, offset, ends, stride, builderEnds) {\n        for (var i = 0, ii = ends.length; i < ii; ++i) {\n            var end = ends[i];\n            var builderEnd = this.appendFlatLineCoordinates(flatCoordinates, offset, end, stride, false, false);\n            builderEnds.push(builderEnd);\n            offset = end;\n        }\n        return offset;\n    };\n    /**\n     * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     * @param {Function} renderer Renderer.\n     */\n    CanvasBuilder.prototype.drawCustom = function (geometry, feature, renderer) {\n        this.beginGeometry(geometry, feature);\n        var type = geometry.getType();\n        var stride = geometry.getStride();\n        var builderBegin = this.coordinates.length;\n        var flatCoordinates, builderEnd, builderEnds, builderEndss;\n        var offset;\n        if (type == GeometryType.MULTI_POLYGON) {\n            flatCoordinates =\n                /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getOrientedFlatCoordinates();\n            builderEndss = [];\n            var endss = \n            /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getEndss();\n            offset = 0;\n            for (var i = 0, ii = endss.length; i < ii; ++i) {\n                var myEnds = [];\n                offset = this.drawCustomCoordinates_(flatCoordinates, offset, endss[i], stride, myEnds);\n                builderEndss.push(myEnds);\n            }\n            this.instructions.push([\n                CanvasInstruction.CUSTOM,\n                builderBegin,\n                builderEndss,\n                geometry,\n                renderer,\n                inflateMultiCoordinatesArray,\n            ]);\n        }\n        else if (type == GeometryType.POLYGON ||\n            type == GeometryType.MULTI_LINE_STRING) {\n            builderEnds = [];\n            flatCoordinates =\n                type == GeometryType.POLYGON\n                    ? /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry).getOrientedFlatCoordinates()\n                    : geometry.getFlatCoordinates();\n            offset = this.drawCustomCoordinates_(flatCoordinates, 0, \n            /** @type {import(\"../../geom/Polygon.js\").default|import(\"../../geom/MultiLineString.js\").default} */ (geometry).getEnds(), stride, builderEnds);\n            this.instructions.push([\n                CanvasInstruction.CUSTOM,\n                builderBegin,\n                builderEnds,\n                geometry,\n                renderer,\n                inflateCoordinatesArray,\n            ]);\n        }\n        else if (type == GeometryType.LINE_STRING ||\n            type == GeometryType.CIRCLE) {\n            flatCoordinates = geometry.getFlatCoordinates();\n            builderEnd = this.appendFlatLineCoordinates(flatCoordinates, 0, flatCoordinates.length, stride, false, false);\n            this.instructions.push([\n                CanvasInstruction.CUSTOM,\n                builderBegin,\n                builderEnd,\n                geometry,\n                renderer,\n                inflateCoordinates,\n            ]);\n        }\n        else if (type == GeometryType.MULTI_POINT) {\n            flatCoordinates = geometry.getFlatCoordinates();\n            builderEnd = this.appendFlatPointCoordinates(flatCoordinates, stride);\n            if (builderEnd > builderBegin) {\n                this.instructions.push([\n                    CanvasInstruction.CUSTOM,\n                    builderBegin,\n                    builderEnd,\n                    geometry,\n                    renderer,\n                    inflateCoordinates,\n                ]);\n            }\n        }\n        else if (type == GeometryType.POINT) {\n            flatCoordinates = geometry.getFlatCoordinates();\n            this.coordinates.push(flatCoordinates[0], flatCoordinates[1]);\n            builderEnd = this.coordinates.length;\n            this.instructions.push([\n                CanvasInstruction.CUSTOM,\n                builderBegin,\n                builderEnd,\n                geometry,\n                renderer,\n            ]);\n        }\n        this.endGeometry(feature);\n    };\n    /**\n     * @protected\n     * @param {import(\"../../geom/Geometry\").default|import(\"../Feature.js\").default} geometry The geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasBuilder.prototype.beginGeometry = function (geometry, feature) {\n        this.beginGeometryInstruction1_ = [\n            CanvasInstruction.BEGIN_GEOMETRY,\n            feature,\n            0,\n            geometry,\n        ];\n        this.instructions.push(this.beginGeometryInstruction1_);\n        this.beginGeometryInstruction2_ = [\n            CanvasInstruction.BEGIN_GEOMETRY,\n            feature,\n            0,\n            geometry,\n        ];\n        this.hitDetectionInstructions.push(this.beginGeometryInstruction2_);\n    };\n    /**\n     * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n     */\n    CanvasBuilder.prototype.finish = function () {\n        return {\n            instructions: this.instructions,\n            hitDetectionInstructions: this.hitDetectionInstructions,\n            coordinates: this.coordinates,\n        };\n    };\n    /**\n     * Reverse the hit detection instructions.\n     */\n    CanvasBuilder.prototype.reverseHitDetectionInstructions = function () {\n        var hitDetectionInstructions = this.hitDetectionInstructions;\n        // step 1 - reverse array\n        hitDetectionInstructions.reverse();\n        // step 2 - reverse instructions within geometry blocks\n        var i;\n        var n = hitDetectionInstructions.length;\n        var instruction;\n        var type;\n        var begin = -1;\n        for (i = 0; i < n; ++i) {\n            instruction = hitDetectionInstructions[i];\n            type = /** @type {import(\"./Instruction.js\").default} */ (instruction[0]);\n            if (type == CanvasInstruction.END_GEOMETRY) {\n                begin = i;\n            }\n            else if (type == CanvasInstruction.BEGIN_GEOMETRY) {\n                instruction[2] = i;\n                reverseSubArray(this.hitDetectionInstructions, begin, i);\n                begin = -1;\n            }\n        }\n    };\n    /**\n     * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n     * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n     */\n    CanvasBuilder.prototype.setFillStrokeStyle = function (fillStyle, strokeStyle) {\n        var state = this.state;\n        if (fillStyle) {\n            var fillStyleColor = fillStyle.getColor();\n            state.fillStyle = asColorLike(fillStyleColor ? fillStyleColor : defaultFillStyle);\n        }\n        else {\n            state.fillStyle = undefined;\n        }\n        if (strokeStyle) {\n            var strokeStyleColor = strokeStyle.getColor();\n            state.strokeStyle = asColorLike(strokeStyleColor ? strokeStyleColor : defaultStrokeStyle);\n            var strokeStyleLineCap = strokeStyle.getLineCap();\n            state.lineCap =\n                strokeStyleLineCap !== undefined ? strokeStyleLineCap : defaultLineCap;\n            var strokeStyleLineDash = strokeStyle.getLineDash();\n            state.lineDash = strokeStyleLineDash\n                ? strokeStyleLineDash.slice()\n                : defaultLineDash;\n            var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n            state.lineDashOffset = strokeStyleLineDashOffset\n                ? strokeStyleLineDashOffset\n                : defaultLineDashOffset;\n            var strokeStyleLineJoin = strokeStyle.getLineJoin();\n            state.lineJoin =\n                strokeStyleLineJoin !== undefined\n                    ? strokeStyleLineJoin\n                    : defaultLineJoin;\n            var strokeStyleWidth = strokeStyle.getWidth();\n            state.lineWidth =\n                strokeStyleWidth !== undefined ? strokeStyleWidth : defaultLineWidth;\n            var strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n            state.miterLimit =\n                strokeStyleMiterLimit !== undefined\n                    ? strokeStyleMiterLimit\n                    : defaultMiterLimit;\n            if (state.lineWidth > this.maxLineWidth) {\n                this.maxLineWidth = state.lineWidth;\n                // invalidate the buffered max extent cache\n                this.bufferedMaxExtent_ = null;\n            }\n        }\n        else {\n            state.strokeStyle = undefined;\n            state.lineCap = undefined;\n            state.lineDash = null;\n            state.lineDashOffset = undefined;\n            state.lineJoin = undefined;\n            state.lineWidth = undefined;\n            state.miterLimit = undefined;\n        }\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillStrokeState} state State.\n     * @return {Array<*>} Fill instruction.\n     */\n    CanvasBuilder.prototype.createFill = function (state) {\n        var fillStyle = state.fillStyle;\n        /** @type {Array<*>} */\n        var fillInstruction = [CanvasInstruction.SET_FILL_STYLE, fillStyle];\n        if (typeof fillStyle !== 'string') {\n            // Fill is a pattern or gradient - align it!\n            fillInstruction.push(true);\n        }\n        return fillInstruction;\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillStrokeState} state State.\n     */\n    CanvasBuilder.prototype.applyStroke = function (state) {\n        this.instructions.push(this.createStroke(state));\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillStrokeState} state State.\n     * @return {Array<*>} Stroke instruction.\n     */\n    CanvasBuilder.prototype.createStroke = function (state) {\n        return [\n            CanvasInstruction.SET_STROKE_STYLE,\n            state.strokeStyle,\n            state.lineWidth * this.pixelRatio,\n            state.lineCap,\n            state.lineJoin,\n            state.miterLimit,\n            this.applyPixelRatio(state.lineDash),\n            state.lineDashOffset * this.pixelRatio,\n        ];\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillStrokeState} state State.\n     * @param {function(this:CanvasBuilder, import(\"../canvas.js\").FillStrokeState):Array<*>} createFill Create fill.\n     */\n    CanvasBuilder.prototype.updateFillStyle = function (state, createFill) {\n        var fillStyle = state.fillStyle;\n        if (typeof fillStyle !== 'string' || state.currentFillStyle != fillStyle) {\n            if (fillStyle !== undefined) {\n                this.instructions.push(createFill.call(this, state));\n            }\n            state.currentFillStyle = fillStyle;\n        }\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillStrokeState} state State.\n     * @param {function(this:CanvasBuilder, import(\"../canvas.js\").FillStrokeState): void} applyStroke Apply stroke.\n     */\n    CanvasBuilder.prototype.updateStrokeStyle = function (state, applyStroke) {\n        var strokeStyle = state.strokeStyle;\n        var lineCap = state.lineCap;\n        var lineDash = state.lineDash;\n        var lineDashOffset = state.lineDashOffset;\n        var lineJoin = state.lineJoin;\n        var lineWidth = state.lineWidth;\n        var miterLimit = state.miterLimit;\n        if (state.currentStrokeStyle != strokeStyle ||\n            state.currentLineCap != lineCap ||\n            (lineDash != state.currentLineDash &&\n                !equals(state.currentLineDash, lineDash)) ||\n            state.currentLineDashOffset != lineDashOffset ||\n            state.currentLineJoin != lineJoin ||\n            state.currentLineWidth != lineWidth ||\n            state.currentMiterLimit != miterLimit) {\n            if (strokeStyle !== undefined) {\n                applyStroke.call(this, state);\n            }\n            state.currentStrokeStyle = strokeStyle;\n            state.currentLineCap = lineCap;\n            state.currentLineDash = lineDash;\n            state.currentLineDashOffset = lineDashOffset;\n            state.currentLineJoin = lineJoin;\n            state.currentLineWidth = lineWidth;\n            state.currentMiterLimit = miterLimit;\n        }\n    };\n    /**\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasBuilder.prototype.endGeometry = function (feature) {\n        this.beginGeometryInstruction1_[2] = this.instructions.length;\n        this.beginGeometryInstruction1_ = null;\n        this.beginGeometryInstruction2_[2] = this.hitDetectionInstructions.length;\n        this.beginGeometryInstruction2_ = null;\n        var endGeometryInstruction = [CanvasInstruction.END_GEOMETRY, feature];\n        this.instructions.push(endGeometryInstruction);\n        this.hitDetectionInstructions.push(endGeometryInstruction);\n    };\n    /**\n     * Get the buffered rendering extent.  Rendering will be clipped to the extent\n     * provided to the constructor.  To account for symbolizers that may intersect\n     * this extent, we calculate a buffered extent (e.g. based on stroke width).\n     * @return {import(\"../../extent.js\").Extent} The buffered rendering extent.\n     * @protected\n     */\n    CanvasBuilder.prototype.getBufferedMaxExtent = function () {\n        if (!this.bufferedMaxExtent_) {\n            this.bufferedMaxExtent_ = clone(this.maxExtent);\n            if (this.maxLineWidth > 0) {\n                var width = (this.resolution * (this.maxLineWidth + 1)) / 2;\n                buffer(this.bufferedMaxExtent_, width, this.bufferedMaxExtent_);\n            }\n        }\n        return this.bufferedMaxExtent_;\n    };\n    return CanvasBuilder;\n}(VectorContext));\nexport default CanvasBuilder;\n//# sourceMappingURL=Builder.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Tile\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport TileState from './TileState.js';\nimport { abstract } from './util.js';\nimport { easeIn } from './easing.js';\n/**\n * A function that takes an {@link module:ol/Tile} for the tile and a\n * `{string}` for the url as arguments. The default is\n * ```js\n * source.setTileLoadFunction(function(tile, src) {\n *   tile.getImage().src = src;\n * });\n * ```\n * For more fine grained control, the load function can use fetch or XMLHttpRequest and involve\n * error handling:\n *\n * ```js\n * import TileState from 'ol/TileState';\n *\n * source.setTileLoadFunction(function(tile, src) {\n *   var xhr = new XMLHttpRequest();\n *   xhr.responseType = 'blob';\n *   xhr.addEventListener('loadend', function (evt) {\n *     var data = this.response;\n *     if (data !== undefined) {\n *       tile.getImage().src = URL.createObjectURL(data);\n *     } else {\n *       tile.setState(TileState.ERROR);\n *     }\n *   });\n *   xhr.addEventListener('error', function () {\n *     tile.setState(TileState.ERROR);\n *   });\n *   xhr.open('GET', src);\n *   xhr.send();\n * });\n * ```\n *\n * @typedef {function(Tile, string): void} LoadFunction\n * @api\n */\n/**\n * {@link module:ol/source/Tile~Tile} sources use a function of this type to get\n * the url that provides a tile for a given tile coordinate.\n *\n * This function takes an {@link module:ol/tilecoord~TileCoord} for the tile\n * coordinate, a `{number}` representing the pixel ratio and a\n * {@link module:ol/proj/Projection} for the projection  as arguments\n * and returns a `{string}` representing the tile URL, or undefined if no tile\n * should be requested for the passed tile coordinate.\n *\n * @typedef {function(import(\"./tilecoord.js\").TileCoord, number,\n *           import(\"./proj/Projection.js\").default): (string|undefined)} UrlFunction\n * @api\n */\n/**\n * @typedef {Object} Options\n * @property {number} [transition=250] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @api\n */\n/**\n * @classdesc\n * Base class for tiles.\n *\n * @abstract\n */\nvar Tile = /** @class */ (function (_super) {\n    __extends(Tile, _super);\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"./TileState.js\").default} state State.\n     * @param {Options} [opt_options] Tile options.\n     */\n    function Tile(tileCoord, state, opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @type {import(\"./tilecoord.js\").TileCoord}\n         */\n        _this.tileCoord = tileCoord;\n        /**\n         * @protected\n         * @type {import(\"./TileState.js\").default}\n         */\n        _this.state = state;\n        /**\n         * An \"interim\" tile for this tile. The interim tile may be used while this\n         * one is loading, for \"smooth\" transitions when changing params/dimensions\n         * on the source.\n         * @type {Tile}\n         */\n        _this.interimTile = null;\n        /**\n         * A key assigned to the tile. This is used by the tile source to determine\n         * if this tile can effectively be used, or if a new tile should be created\n         * and this one be used as an interim tile for this new tile.\n         * @type {string}\n         */\n        _this.key = '';\n        /**\n         * The duration for the opacity transition.\n         * @type {number}\n         */\n        _this.transition_ =\n            options.transition === undefined ? 250 : options.transition;\n        /**\n         * Lookup of start times for rendering transitions.  If the start time is\n         * equal to -1, the transition is complete.\n         * @type {Object<string, number>}\n         */\n        _this.transitionStarts_ = {};\n        return _this;\n    }\n    /**\n     * @protected\n     */\n    Tile.prototype.changed = function () {\n        this.dispatchEvent(EventType.CHANGE);\n    };\n    /**\n     * Called by the tile cache when the tile is removed from the cache due to expiry\n     */\n    Tile.prototype.release = function () { };\n    /**\n     * @return {string} Key.\n     */\n    Tile.prototype.getKey = function () {\n        return this.key + '/' + this.tileCoord;\n    };\n    /**\n     * Get the interim tile most suitable for rendering using the chain of interim\n     * tiles. This corresponds to the  most recent tile that has been loaded, if no\n     * such tile exists, the original tile is returned.\n     * @return {!Tile} Best tile for rendering.\n     */\n    Tile.prototype.getInterimTile = function () {\n        if (!this.interimTile) {\n            //empty chain\n            return this;\n        }\n        var tile = this.interimTile;\n        // find the first loaded tile and return it. Since the chain is sorted in\n        // decreasing order of creation time, there is no need to search the remainder\n        // of the list (all those tiles correspond to older requests and will be\n        // cleaned up by refreshInterimChain)\n        do {\n            if (tile.getState() == TileState.LOADED) {\n                // Show tile immediately instead of fading it in after loading, because\n                // the interim tile is in place already\n                this.transition_ = 0;\n                return tile;\n            }\n            tile = tile.interimTile;\n        } while (tile);\n        // we can not find a better tile\n        return this;\n    };\n    /**\n     * Goes through the chain of interim tiles and discards sections of the chain\n     * that are no longer relevant.\n     */\n    Tile.prototype.refreshInterimChain = function () {\n        if (!this.interimTile) {\n            return;\n        }\n        var tile = this.interimTile;\n        var prev = /** @type {Tile} */ (this);\n        do {\n            if (tile.getState() == TileState.LOADED) {\n                //we have a loaded tile, we can discard the rest of the list\n                //we would could abort any LOADING tile request\n                //older than this tile (i.e. any LOADING tile following this entry in the chain)\n                tile.interimTile = null;\n                break;\n            }\n            else if (tile.getState() == TileState.LOADING) {\n                //keep this LOADING tile any loaded tiles later in the chain are\n                //older than this tile, so we're still interested in the request\n                prev = tile;\n            }\n            else if (tile.getState() == TileState.IDLE) {\n                //the head of the list is the most current tile, we don't need\n                //to start any other requests for this chain\n                prev.interimTile = tile.interimTile;\n            }\n            else {\n                prev = tile;\n            }\n            tile = prev.interimTile;\n        } while (tile);\n    };\n    /**\n     * Get the tile coordinate for this tile.\n     * @return {import(\"./tilecoord.js\").TileCoord} The tile coordinate.\n     * @api\n     */\n    Tile.prototype.getTileCoord = function () {\n        return this.tileCoord;\n    };\n    /**\n     * @return {import(\"./TileState.js\").default} State.\n     */\n    Tile.prototype.getState = function () {\n        return this.state;\n    };\n    /**\n     * Sets the state of this tile. If you write your own {@link module:ol/Tile~LoadFunction tileLoadFunction} ,\n     * it is important to set the state correctly to {@link module:ol/TileState~ERROR}\n     * when the tile cannot be loaded. Otherwise the tile cannot be removed from\n     * the tile queue and will block other requests.\n     * @param {import(\"./TileState.js\").default} state State.\n     * @api\n     */\n    Tile.prototype.setState = function (state) {\n        if (this.state !== TileState.ERROR && this.state > state) {\n            throw new Error('Tile load sequence violation');\n        }\n        this.state = state;\n        this.changed();\n    };\n    /**\n     * Load the image or retry if loading previously failed.\n     * Loading is taken care of by the tile queue, and calling this method is\n     * only needed for preloading or for reloading in case of an error.\n     * @abstract\n     * @api\n     */\n    Tile.prototype.load = function () {\n        abstract();\n    };\n    /**\n     * Get the alpha value for rendering.\n     * @param {string} id An id for the renderer.\n     * @param {number} time The render frame time.\n     * @return {number} A number between 0 and 1.\n     */\n    Tile.prototype.getAlpha = function (id, time) {\n        if (!this.transition_) {\n            return 1;\n        }\n        var start = this.transitionStarts_[id];\n        if (!start) {\n            start = time;\n            this.transitionStarts_[id] = start;\n        }\n        else if (start === -1) {\n            return 1;\n        }\n        var delta = time - start + 1000 / 60; // avoid rendering at 0\n        if (delta >= this.transition_) {\n            return 1;\n        }\n        return easeIn(delta / this.transition_);\n    };\n    /**\n     * Determine if a tile is in an alpha transition.  A tile is considered in\n     * transition if tile.getAlpha() has not yet been called or has been called\n     * and returned 1.\n     * @param {string} id An id for the renderer.\n     * @return {boolean} The tile is in transition.\n     */\n    Tile.prototype.inTransition = function (id) {\n        if (!this.transition_) {\n            return false;\n        }\n        return this.transitionStarts_[id] !== -1;\n    };\n    /**\n     * Mark a transition as complete.\n     * @param {string} id An id for the renderer.\n     */\n    Tile.prototype.endTransition = function (id) {\n        if (this.transition_) {\n            this.transitionStarts_[id] = -1;\n        }\n    };\n    return Tile;\n}(EventTarget));\nexport default Tile;\n//# sourceMappingURL=Tile.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/LinearRing\n */\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { assignClosestPoint, maxSquaredDelta } from './flat/closest.js';\nimport { closestSquaredDistanceXY } from '../extent.js';\nimport { deflateCoordinates } from './flat/deflate.js';\nimport { douglasPeucker } from './flat/simplify.js';\nimport { inflateCoordinates } from './flat/inflate.js';\nimport { linearRing as linearRingArea } from './flat/area.js';\n/**\n * @classdesc\n * Linear ring geometry. Only used as part of polygon; cannot be rendered\n * on its own.\n *\n * @api\n */\nvar LinearRing = /** @class */ (function (_super) {\n    __extends(LinearRing, _super);\n    /**\n     * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n     *     For internal use, flat coordinates in combination with `opt_layout` are also accepted.\n     * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n     */\n    function LinearRing(coordinates, opt_layout) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDelta_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDeltaRevision_ = -1;\n        if (opt_layout !== undefined && !Array.isArray(coordinates[0])) {\n            _this.setFlatCoordinates(opt_layout, \n            /** @type {Array<number>} */ (coordinates));\n        }\n        else {\n            _this.setCoordinates(\n            /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates), opt_layout);\n        }\n        return _this;\n    }\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!LinearRing} Clone.\n     * @api\n     */\n    LinearRing.prototype.clone = function () {\n        return new LinearRing(this.flatCoordinates.slice(), this.layout);\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    LinearRing.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n            return minSquaredDistance;\n        }\n        if (this.maxDeltaRevision_ != this.getRevision()) {\n            this.maxDelta_ = Math.sqrt(maxSquaredDelta(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));\n            this.maxDeltaRevision_ = this.getRevision();\n        }\n        return assignClosestPoint(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n    };\n    /**\n     * Return the area of the linear ring on projected plane.\n     * @return {number} Area (on projected plane).\n     * @api\n     */\n    LinearRing.prototype.getArea = function () {\n        return linearRingArea(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n    };\n    /**\n     * Return the coordinates of the linear ring.\n     * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n     * @api\n     */\n    LinearRing.prototype.getCoordinates = function () {\n        return inflateCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {LinearRing} Simplified LinearRing.\n     * @protected\n     */\n    LinearRing.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {\n        var simplifiedFlatCoordinates = [];\n        simplifiedFlatCoordinates.length = douglasPeucker(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, squaredTolerance, simplifiedFlatCoordinates, 0);\n        return new LinearRing(simplifiedFlatCoordinates, GeometryLayout.XY);\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    LinearRing.prototype.getType = function () {\n        return GeometryType.LINEAR_RING;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    LinearRing.prototype.intersectsExtent = function (extent) {\n        return false;\n    };\n    /**\n     * Set the coordinates of the linear ring.\n     * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n     * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n     * @api\n     */\n    LinearRing.prototype.setCoordinates = function (coordinates, opt_layout) {\n        this.setLayout(opt_layout, coordinates, 1);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        this.flatCoordinates.length = deflateCoordinates(this.flatCoordinates, 0, coordinates, this.stride);\n        this.changed();\n    };\n    return LinearRing;\n}(SimpleGeometry));\nexport default LinearRing;\n//# sourceMappingURL=LinearRing.js.map","import { feature, lineString } from '@turf/helpers';\n\n/**\n * Callback for coordEach\n *\n * @callback coordEachCallback\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()\n *\n * @name coordEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @example\n * var features = turf.featureCollection([\n *   turf.point([26, 37], {\"foo\": \"bar\"}),\n *   turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n *   //=currentCoord\n *   //=coordIndex\n *   //=featureIndex\n *   //=multiFeatureIndex\n *   //=geometryIndex\n * });\n */\nfunction coordEach(geojson, callback, excludeWrapCoord) {\n    // Handles null Geometry -- Skips this GeoJSON\n    if (geojson === null) return;\n    var j, k, l, geometry, stopG, coords,\n        geometryMaybeCollection,\n        wrapShrink = 0,\n        coordIndex = 0,\n        isGeometryCollection,\n        type = geojson.type,\n        isFeatureCollection = type === 'FeatureCollection',\n        isFeature = type === 'Feature',\n        stop = isFeatureCollection ? geojson.features.length : 1;\n\n    // This logic may look a little weird. The reason why it is that way\n    // is because it's trying to be fast. GeoJSON supports multiple kinds\n    // of objects at its root: FeatureCollection, Features, Geometries.\n    // This function has the responsibility of handling all of them, and that\n    // means that some of the `for` loops you see below actually just don't apply\n    // to certain inputs. For instance, if you give this just a\n    // Point geometry, then both loops are short-circuited and all we do\n    // is gradually rename the input until it's called 'geometry'.\n    //\n    // This also aims to allocate as few resources as possible: just a\n    // few numbers and booleans, rather than any temporary arrays as would\n    // be required with the normalization approach.\n    for (var featureIndex = 0; featureIndex < stop; featureIndex++) {\n        geometryMaybeCollection = (isFeatureCollection ? geojson.features[featureIndex].geometry :\n            (isFeature ? geojson.geometry : geojson));\n        isGeometryCollection = (geometryMaybeCollection) ? geometryMaybeCollection.type === 'GeometryCollection' : false;\n        stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;\n\n        for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {\n            var multiFeatureIndex = 0;\n            var geometryIndex = 0;\n            geometry = isGeometryCollection ?\n                geometryMaybeCollection.geometries[geomIndex] : geometryMaybeCollection;\n\n            // Handles null Geometry -- Skips this geometry\n            if (geometry === null) continue;\n            coords = geometry.coordinates;\n            var geomType = geometry.type;\n\n            wrapShrink = (excludeWrapCoord && (geomType === 'Polygon' || geomType === 'MultiPolygon')) ? 1 : 0;\n\n            switch (geomType) {\n            case null:\n                break;\n            case 'Point':\n                callback(coords, coordIndex, featureIndex, multiFeatureIndex, geometryIndex);\n                coordIndex++;\n                multiFeatureIndex++;\n                break;\n            case 'LineString':\n            case 'MultiPoint':\n                for (j = 0; j < coords.length; j++) {\n                    callback(coords[j], coordIndex, featureIndex, multiFeatureIndex, geometryIndex);\n                    coordIndex++;\n                    if (geomType === 'MultiPoint') multiFeatureIndex++;\n                }\n                if (geomType === 'LineString') multiFeatureIndex++;\n                break;\n            case 'Polygon':\n            case 'MultiLineString':\n                for (j = 0; j < coords.length; j++) {\n                    for (k = 0; k < coords[j].length - wrapShrink; k++) {\n                        callback(coords[j][k], coordIndex, featureIndex, multiFeatureIndex, geometryIndex);\n                        coordIndex++;\n                    }\n                    if (geomType === 'MultiLineString') multiFeatureIndex++;\n                    if (geomType === 'Polygon') geometryIndex++;\n                }\n                if (geomType === 'Polygon') multiFeatureIndex++;\n                break;\n            case 'MultiPolygon':\n                for (j = 0; j < coords.length; j++) {\n                    if (geomType === 'MultiPolygon') geometryIndex = 0;\n                    for (k = 0; k < coords[j].length; k++) {\n                        for (l = 0; l < coords[j][k].length - wrapShrink; l++) {\n                            callback(coords[j][k][l], coordIndex, featureIndex, multiFeatureIndex, geometryIndex);\n                            coordIndex++;\n                        }\n                        geometryIndex++;\n                    }\n                    multiFeatureIndex++;\n                }\n                break;\n            case 'GeometryCollection':\n                for (j = 0; j < geometry.geometries.length; j++)\n                    coordEach(geometry.geometries[j], callback, excludeWrapCoord);\n                break;\n            default:\n                throw new Error('Unknown Geometry Type');\n            }\n        }\n    }\n}\n\n/**\n * Callback for coordReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n *  - The previousValue argument is initialValue.\n *  - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n *  - The previousValue argument is the value of the first element present in the array.\n *  - The currentValue argument is the value of the second element present in the array.\n *\n * @callback coordReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Reduce coordinates in any GeoJSON object, similar to Array.reduce()\n *\n * @name coordReduce\n * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n *   turf.point([26, 37], {\"foo\": \"bar\"}),\n *   turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n *   //=previousValue\n *   //=currentCoord\n *   //=coordIndex\n *   //=featureIndex\n *   //=multiFeatureIndex\n *   //=geometryIndex\n *   return currentCoord;\n * });\n */\nfunction coordReduce(geojson, callback, initialValue, excludeWrapCoord) {\n    var previousValue = initialValue;\n    coordEach(geojson, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n        if (coordIndex === 0 && initialValue === undefined) previousValue = currentCoord;\n        else previousValue = callback(previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex);\n    }, excludeWrapCoord);\n    return previousValue;\n}\n\n/**\n * Callback for propEach\n *\n * @callback propEachCallback\n * @param {Object} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over properties in any GeoJSON object, similar to Array.forEach()\n *\n * @name propEach\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentProperties, featureIndex)\n * @example\n * var features = turf.featureCollection([\n *     turf.point([26, 37], {foo: 'bar'}),\n *     turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propEach(features, function (currentProperties, featureIndex) {\n *   //=currentProperties\n *   //=featureIndex\n * });\n */\nfunction propEach(geojson, callback) {\n    var i;\n    switch (geojson.type) {\n    case 'FeatureCollection':\n        for (i = 0; i < geojson.features.length; i++) {\n            callback(geojson.features[i].properties, i);\n        }\n        break;\n    case 'Feature':\n        callback(geojson.properties, 0);\n        break;\n    }\n}\n\n\n/**\n * Callback for propReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n *  - The previousValue argument is initialValue.\n *  - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n *  - The previousValue argument is the value of the first element present in the array.\n *  - The currentValue argument is the value of the second element present in the array.\n *\n * @callback propReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {*} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce properties in any GeoJSON object into a single value,\n * similar to how Array.reduce works. However, in this case we lazily run\n * the reduction, so an array of all properties is unnecessary.\n *\n * @name propReduce\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n *     turf.point([26, 37], {foo: 'bar'}),\n *     turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {\n *   //=previousValue\n *   //=currentProperties\n *   //=featureIndex\n *   return currentProperties\n * });\n */\nfunction propReduce(geojson, callback, initialValue) {\n    var previousValue = initialValue;\n    propEach(geojson, function (currentProperties, featureIndex) {\n        if (featureIndex === 0 && initialValue === undefined) previousValue = currentProperties;\n        else previousValue = callback(previousValue, currentProperties, featureIndex);\n    });\n    return previousValue;\n}\n\n/**\n * Callback for featureEach\n *\n * @callback featureEachCallback\n * @param {Feature<any>} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name featureEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex)\n * @example\n * var features = turf.featureCollection([\n *   turf.point([26, 37], {foo: 'bar'}),\n *   turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.featureEach(features, function (currentFeature, featureIndex) {\n *   //=currentFeature\n *   //=featureIndex\n * });\n */\nfunction featureEach(geojson, callback) {\n    if (geojson.type === 'Feature') {\n        callback(geojson, 0);\n    } else if (geojson.type === 'FeatureCollection') {\n        for (var i = 0; i < geojson.features.length; i++) {\n            callback(geojson.features[i], i);\n        }\n    }\n}\n\n/**\n * Callback for featureReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n *  - The previousValue argument is initialValue.\n *  - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n *  - The previousValue argument is the value of the first element present in the array.\n *  - The currentValue argument is the value of the second element present in the array.\n *\n * @callback featureReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name featureReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n *   turf.point([26, 37], {\"foo\": \"bar\"}),\n *   turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {\n *   //=previousValue\n *   //=currentFeature\n *   //=featureIndex\n *   return currentFeature\n * });\n */\nfunction featureReduce(geojson, callback, initialValue) {\n    var previousValue = initialValue;\n    featureEach(geojson, function (currentFeature, featureIndex) {\n        if (featureIndex === 0 && initialValue === undefined) previousValue = currentFeature;\n        else previousValue = callback(previousValue, currentFeature, featureIndex);\n    });\n    return previousValue;\n}\n\n/**\n * Get all coordinates from any GeoJSON object.\n *\n * @name coordAll\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @returns {Array<Array<number>>} coordinate position array\n * @example\n * var features = turf.featureCollection([\n *   turf.point([26, 37], {foo: 'bar'}),\n *   turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * var coords = turf.coordAll(features);\n * //= [[26, 37], [36, 53]]\n */\nfunction coordAll(geojson) {\n    var coords = [];\n    coordEach(geojson, function (coord) {\n        coords.push(coord);\n    });\n    return coords;\n}\n\n/**\n * Callback for geomEach\n *\n * @callback geomEachCallback\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()\n *\n * @name geomEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @example\n * var features = turf.featureCollection([\n *     turf.point([26, 37], {foo: 'bar'}),\n *     turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n *   //=currentGeometry\n *   //=featureIndex\n *   //=featureProperties\n *   //=featureBBox\n *   //=featureId\n * });\n */\nfunction geomEach(geojson, callback) {\n    var i, j, g, geometry, stopG,\n        geometryMaybeCollection,\n        isGeometryCollection,\n        featureProperties,\n        featureBBox,\n        featureId,\n        featureIndex = 0,\n        isFeatureCollection = geojson.type === 'FeatureCollection',\n        isFeature = geojson.type === 'Feature',\n        stop = isFeatureCollection ? geojson.features.length : 1;\n\n    // This logic may look a little weird. The reason why it is that way\n    // is because it's trying to be fast. GeoJSON supports multiple kinds\n    // of objects at its root: FeatureCollection, Features, Geometries.\n    // This function has the responsibility of handling all of them, and that\n    // means that some of the `for` loops you see below actually just don't apply\n    // to certain inputs. For instance, if you give this just a\n    // Point geometry, then both loops are short-circuited and all we do\n    // is gradually rename the input until it's called 'geometry'.\n    //\n    // This also aims to allocate as few resources as possible: just a\n    // few numbers and booleans, rather than any temporary arrays as would\n    // be required with the normalization approach.\n    for (i = 0; i < stop; i++) {\n\n        geometryMaybeCollection = (isFeatureCollection ? geojson.features[i].geometry :\n            (isFeature ? geojson.geometry : geojson));\n        featureProperties = (isFeatureCollection ? geojson.features[i].properties :\n            (isFeature ? geojson.properties : {}));\n        featureBBox = (isFeatureCollection ? geojson.features[i].bbox :\n            (isFeature ? geojson.bbox : undefined));\n        featureId = (isFeatureCollection ? geojson.features[i].id :\n            (isFeature ? geojson.id : undefined));\n        isGeometryCollection = (geometryMaybeCollection) ? geometryMaybeCollection.type === 'GeometryCollection' : false;\n        stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;\n\n        for (g = 0; g < stopG; g++) {\n            geometry = isGeometryCollection ?\n                geometryMaybeCollection.geometries[g] : geometryMaybeCollection;\n\n            // Handle null Geometry\n            if (geometry === null) {\n                callback(null, featureIndex, featureProperties, featureBBox, featureId);\n                continue;\n            }\n            switch (geometry.type) {\n            case 'Point':\n            case 'LineString':\n            case 'MultiPoint':\n            case 'Polygon':\n            case 'MultiLineString':\n            case 'MultiPolygon': {\n                callback(geometry, featureIndex, featureProperties, featureBBox, featureId);\n                break;\n            }\n            case 'GeometryCollection': {\n                for (j = 0; j < geometry.geometries.length; j++) {\n                    callback(geometry.geometries[j], featureIndex, featureProperties, featureBBox, featureId);\n                }\n                break;\n            }\n            default:\n                throw new Error('Unknown Geometry Type');\n            }\n        }\n        // Only increase `featureIndex` per each feature\n        featureIndex++;\n    }\n}\n\n/**\n * Callback for geomReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n *  - The previousValue argument is initialValue.\n *  - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n *  - The previousValue argument is the value of the first element present in the array.\n *  - The currentValue argument is the value of the second element present in the array.\n *\n * @callback geomReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Reduce geometry in any GeoJSON object, similar to Array.reduce().\n *\n * @name geomReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n *     turf.point([26, 37], {foo: 'bar'}),\n *     turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n *   //=previousValue\n *   //=currentGeometry\n *   //=featureIndex\n *   //=featureProperties\n *   //=featureBBox\n *   //=featureId\n *   return currentGeometry\n * });\n */\nfunction geomReduce(geojson, callback, initialValue) {\n    var previousValue = initialValue;\n    geomEach(geojson, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n        if (featureIndex === 0 && initialValue === undefined) previousValue = currentGeometry;\n        else previousValue = callback(previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId);\n    });\n    return previousValue;\n}\n\n/**\n * Callback for flattenEach\n *\n * @callback flattenEachCallback\n * @param {Feature} currentFeature The current flattened feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Iterate over flattened features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name flattenEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)\n * @example\n * var features = turf.featureCollection([\n *     turf.point([26, 37], {foo: 'bar'}),\n *     turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {\n *   //=currentFeature\n *   //=featureIndex\n *   //=multiFeatureIndex\n * });\n */\nfunction flattenEach(geojson, callback) {\n    geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {\n        // Callback for single geometry\n        var type = (geometry === null) ? null : geometry.type;\n        switch (type) {\n        case null:\n        case 'Point':\n        case 'LineString':\n        case 'Polygon':\n            callback(feature(geometry, properties, {bbox: bbox, id: id}), featureIndex, 0);\n            return;\n        }\n\n        var geomType;\n\n        // Callback for multi-geometry\n        switch (type) {\n        case 'MultiPoint':\n            geomType = 'Point';\n            break;\n        case 'MultiLineString':\n            geomType = 'LineString';\n            break;\n        case 'MultiPolygon':\n            geomType = 'Polygon';\n            break;\n        }\n\n        geometry.coordinates.forEach(function (coordinate, multiFeatureIndex) {\n            var geom = {\n                type: geomType,\n                coordinates: coordinate\n            };\n            callback(feature(geom, properties), featureIndex, multiFeatureIndex);\n        });\n\n    });\n}\n\n/**\n * Callback for flattenReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n *  - The previousValue argument is initialValue.\n *  - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n *  - The previousValue argument is the value of the first element present in the array.\n *  - The currentValue argument is the value of the second element present in the array.\n *\n * @callback flattenReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Reduce flattened features in any GeoJSON object, similar to Array.reduce().\n *\n * @name flattenReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n *     turf.point([26, 37], {foo: 'bar'}),\n *     turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {\n *   //=previousValue\n *   //=currentFeature\n *   //=featureIndex\n *   //=multiFeatureIndex\n *   return currentFeature\n * });\n */\nfunction flattenReduce(geojson, callback, initialValue) {\n    var previousValue = initialValue;\n    flattenEach(geojson, function (currentFeature, featureIndex, multiFeatureIndex) {\n        if (featureIndex === 0 && multiFeatureIndex === 0 && initialValue === undefined) previousValue = currentFeature;\n        else previousValue = callback(previousValue, currentFeature, featureIndex, multiFeatureIndex);\n    });\n    return previousValue;\n}\n\n/**\n * Callback for segmentEach\n *\n * @callback segmentEachCallback\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n * @returns {void}\n */\n\n/**\n * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n *   //=currentSegment\n *   //=featureIndex\n *   //=multiFeatureIndex\n *   //=geometryIndex\n *   //=segmentIndex\n * });\n *\n * // Calculate the total number of segments\n * var total = 0;\n * turf.segmentEach(polygon, function () {\n *     total++;\n * });\n */\nfunction segmentEach(geojson, callback) {\n    flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {\n        var segmentIndex = 0;\n\n        // Exclude null Geometries\n        if (!feature$$1.geometry) return;\n        // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n        var type = feature$$1.geometry.type;\n        if (type === 'Point' || type === 'MultiPoint') return;\n\n        // Generate 2-vertex line segments\n        coordReduce(feature$$1, function (previousCoords, currentCoord, coordIndex, featureIndexCoord, mutliPartIndexCoord, geometryIndex) {\n            var currentSegment = lineString([previousCoords, currentCoord], feature$$1.properties);\n            callback(currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex);\n            segmentIndex++;\n            return currentCoord;\n        });\n    });\n}\n\n/**\n * Callback for segmentReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n *  - The previousValue argument is initialValue.\n *  - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n *  - The previousValue argument is the value of the first element present in the array.\n *  - The currentValue argument is the value of the second element present in the array.\n *\n * @callback segmentReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n */\n\n/**\n * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n *   //= previousSegment\n *   //= currentSegment\n *   //= featureIndex\n *   //= multiFeatureIndex\n *   //= geometryIndex\n *   //= segmentInex\n *   return currentSegment\n * });\n *\n * // Calculate the total number of segments\n * var initialValue = 0\n * var total = turf.segmentReduce(polygon, function (previousValue) {\n *     previousValue++;\n *     return previousValue;\n * }, initialValue);\n */\nfunction segmentReduce(geojson, callback, initialValue) {\n    var previousValue = initialValue;\n    var started = false;\n    segmentEach(geojson, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n        if (started === false && initialValue === undefined) previousValue = currentSegment;\n        else previousValue = callback(previousValue, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex);\n        started = true;\n    });\n    return previousValue;\n}\n\n/**\n * Callback for lineEach\n *\n * @callback lineEachCallback\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,\n * similar to Array.forEach.\n *\n * @name lineEach\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @example\n * var multiLine = turf.multiLineString([\n *   [[26, 37], [35, 45]],\n *   [[36, 53], [38, 50], [41, 55]]\n * ]);\n *\n * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n *   //=currentLine\n *   //=featureIndex\n *   //=multiFeatureIndex\n *   //=geometryIndex\n * });\n */\nfunction lineEach(geojson, callback) {\n    // validation\n    if (!geojson) throw new Error('geojson is required');\n\n    flattenEach(geojson, function (feature$$1, featureIndex, multiFeatureIndex) {\n        if (feature$$1.geometry === null) return;\n        var type = feature$$1.geometry.type;\n        var coords = feature$$1.geometry.coordinates;\n        switch (type) {\n        case 'LineString':\n            callback(feature$$1, featureIndex, multiFeatureIndex, 0, 0);\n            break;\n        case 'Polygon':\n            for (var geometryIndex = 0; geometryIndex < coords.length; geometryIndex++) {\n                callback(lineString(coords[geometryIndex], feature$$1.properties), featureIndex, multiFeatureIndex, geometryIndex);\n            }\n            break;\n        }\n    });\n}\n\n/**\n * Callback for lineReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n *  - The previousValue argument is initialValue.\n *  - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n *  - The previousValue argument is the value of the first element present in the array.\n *  - The currentValue argument is the value of the second element present in the array.\n *\n * @callback lineReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name lineReduce\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var multiPoly = turf.multiPolygon([\n *   turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),\n *   turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])\n * ]);\n *\n * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n *   //=previousValue\n *   //=currentLine\n *   //=featureIndex\n *   //=multiFeatureIndex\n *   //=geometryIndex\n *   return currentLine\n * });\n */\nfunction lineReduce(geojson, callback, initialValue) {\n    var previousValue = initialValue;\n    lineEach(geojson, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n        if (featureIndex === 0 && initialValue === undefined) previousValue = currentLine;\n        else previousValue = callback(previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex);\n    });\n    return previousValue;\n}\n\nexport { coordEach, coordReduce, propEach, propReduce, featureEach, featureReduce, coordAll, geomEach, geomReduce, flattenEach, flattenReduce, segmentEach, segmentReduce, lineEach, lineReduce };\n","/**\n * @module ol/reproj\n */\nimport { IMAGE_SMOOTHING_DISABLED } from './source/common.js';\nimport { assign } from './obj.js';\nimport { containsCoordinate, createEmpty, extend, forEachCorner, getCenter, getHeight, getTopLeft, getWidth, } from './extent.js';\nimport { createCanvasContext2D } from './dom.js';\nimport { getPointResolution, transform } from './proj.js';\nimport { solveLinearSystem } from './math.js';\nvar brokenDiagonalRendering_;\n/**\n * This draws a small triangle into a canvas by setting the triangle as the clip region\n * and then drawing a (too large) rectangle\n *\n * @param {CanvasRenderingContext2D} ctx The context in which to draw the triangle\n * @param {number} u1 The x-coordinate of the second point. The first point is 0,0.\n * @param {number} v1 The y-coordinate of the second point.\n * @param {number} u2 The x-coordinate of the third point.\n * @param {number} v2 The y-coordinate of the third point.\n */\nfunction drawTestTriangle(ctx, u1, v1, u2, v2) {\n    ctx.beginPath();\n    ctx.moveTo(0, 0);\n    ctx.lineTo(u1, v1);\n    ctx.lineTo(u2, v2);\n    ctx.closePath();\n    ctx.save();\n    ctx.clip();\n    ctx.fillRect(0, 0, Math.max(u1, u2) + 1, Math.max(v1, v2));\n    ctx.restore();\n}\n/**\n * Given the data from getImageData, see if the right values appear at the provided offset.\n * Returns true if either the color or transparency is off\n *\n * @param {Uint8ClampedArray} data The data returned from getImageData\n * @param {number} offset The pixel offset from the start of data.\n * @return {boolean} true if the diagonal rendering is broken\n */\nfunction verifyBrokenDiagonalRendering(data, offset) {\n    // the values ought to be close to the rgba(210, 0, 0, 0.75)\n    return (Math.abs(data[offset * 4] - 210) > 2 ||\n        Math.abs(data[offset * 4 + 3] - 0.75 * 255) > 2);\n}\n/**\n * Determines if the current browser configuration can render triangular clip regions correctly.\n * This value is cached so the function is only expensive the first time called.\n * Firefox on Windows (as of now) does not if HWA is enabled. See https://bugzilla.mozilla.org/show_bug.cgi?id=1606976\n * IE also doesn't. Chrome works, and everything seems to work on OSX and Android. This function caches the\n * result. I suppose that it is conceivably possible that a browser might flip modes while the app is\n * running, but lets hope not.\n *\n * @return {boolean} true if the Diagonal Rendering is broken.\n */\nfunction isBrokenDiagonalRendering() {\n    if (brokenDiagonalRendering_ === undefined) {\n        var ctx = document.createElement('canvas').getContext('2d');\n        ctx.globalCompositeOperation = 'lighter';\n        ctx.fillStyle = 'rgba(210, 0, 0, 0.75)';\n        drawTestTriangle(ctx, 4, 5, 4, 0);\n        drawTestTriangle(ctx, 4, 5, 0, 5);\n        var data = ctx.getImageData(0, 0, 3, 3).data;\n        brokenDiagonalRendering_ =\n            verifyBrokenDiagonalRendering(data, 0) ||\n                verifyBrokenDiagonalRendering(data, 4) ||\n                verifyBrokenDiagonalRendering(data, 8);\n    }\n    return brokenDiagonalRendering_;\n}\n/**\n * Calculates ideal resolution to use from the source in order to achieve\n * pixel mapping as close as possible to 1:1 during reprojection.\n * The resolution is calculated regardless of what resolutions\n * are actually available in the dataset (TileGrid, Image, ...).\n *\n * @param {import(\"./proj/Projection.js\").default} sourceProj Source projection.\n * @param {import(\"./proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"./coordinate.js\").Coordinate} targetCenter Target center.\n * @param {number} targetResolution Target resolution.\n * @return {number} The best resolution to use. Can be +-Infinity, NaN or 0.\n */\nexport function calculateSourceResolution(sourceProj, targetProj, targetCenter, targetResolution) {\n    var sourceCenter = transform(targetCenter, targetProj, sourceProj);\n    // calculate the ideal resolution of the source data\n    var sourceResolution = getPointResolution(targetProj, targetResolution, targetCenter);\n    var targetMetersPerUnit = targetProj.getMetersPerUnit();\n    if (targetMetersPerUnit !== undefined) {\n        sourceResolution *= targetMetersPerUnit;\n    }\n    var sourceMetersPerUnit = sourceProj.getMetersPerUnit();\n    if (sourceMetersPerUnit !== undefined) {\n        sourceResolution /= sourceMetersPerUnit;\n    }\n    // Based on the projection properties, the point resolution at the specified\n    // coordinates may be slightly different. We need to reverse-compensate this\n    // in order to achieve optimal results.\n    var sourceExtent = sourceProj.getExtent();\n    if (!sourceExtent || containsCoordinate(sourceExtent, sourceCenter)) {\n        var compensationFactor = getPointResolution(sourceProj, sourceResolution, sourceCenter) /\n            sourceResolution;\n        if (isFinite(compensationFactor) && compensationFactor > 0) {\n            sourceResolution /= compensationFactor;\n        }\n    }\n    return sourceResolution;\n}\n/**\n * Calculates ideal resolution to use from the source in order to achieve\n * pixel mapping as close as possible to 1:1 during reprojection.\n * The resolution is calculated regardless of what resolutions\n * are actually available in the dataset (TileGrid, Image, ...).\n *\n * @param {import(\"./proj/Projection.js\").default} sourceProj Source projection.\n * @param {import(\"./proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"./extent.js\").Extent} targetExtent Target extent\n * @param {number} targetResolution Target resolution.\n * @return {number} The best resolution to use. Can be +-Infinity, NaN or 0.\n */\nexport function calculateSourceExtentResolution(sourceProj, targetProj, targetExtent, targetResolution) {\n    var targetCenter = getCenter(targetExtent);\n    var sourceResolution = calculateSourceResolution(sourceProj, targetProj, targetCenter, targetResolution);\n    if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n        forEachCorner(targetExtent, function (corner) {\n            sourceResolution = calculateSourceResolution(sourceProj, targetProj, corner, targetResolution);\n            return isFinite(sourceResolution) && sourceResolution > 0;\n        });\n    }\n    return sourceResolution;\n}\n/**\n * @typedef {Object} ImageExtent\n * @property {import(\"./extent.js\").Extent} extent Extent.\n * @property {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image.\n */\n/**\n * Renders the source data into new canvas based on the triangulation.\n *\n * @param {number} width Width of the canvas.\n * @param {number} height Height of the canvas.\n * @param {number} pixelRatio Pixel ratio.\n * @param {number} sourceResolution Source resolution.\n * @param {import(\"./extent.js\").Extent} sourceExtent Extent of the data source.\n * @param {number} targetResolution Target resolution.\n * @param {import(\"./extent.js\").Extent} targetExtent Target extent.\n * @param {import(\"./reproj/Triangulation.js\").default} triangulation Calculated triangulation.\n * @param {Array<ImageExtent>} sources Array of sources.\n * @param {number} gutter Gutter of the sources.\n * @param {boolean} [opt_renderEdges] Render reprojection edges.\n * @param {object} [opt_contextOptions] Properties to set on the canvas context.\n * @return {HTMLCanvasElement} Canvas with reprojected data.\n */\nexport function render(width, height, pixelRatio, sourceResolution, sourceExtent, targetResolution, targetExtent, triangulation, sources, gutter, opt_renderEdges, opt_contextOptions) {\n    var context = createCanvasContext2D(Math.round(pixelRatio * width), Math.round(pixelRatio * height));\n    assign(context, opt_contextOptions);\n    if (sources.length === 0) {\n        return context.canvas;\n    }\n    context.scale(pixelRatio, pixelRatio);\n    function pixelRound(value) {\n        return Math.round(value * pixelRatio) / pixelRatio;\n    }\n    context.globalCompositeOperation = 'lighter';\n    var sourceDataExtent = createEmpty();\n    sources.forEach(function (src, i, arr) {\n        extend(sourceDataExtent, src.extent);\n    });\n    var canvasWidthInUnits = getWidth(sourceDataExtent);\n    var canvasHeightInUnits = getHeight(sourceDataExtent);\n    var stitchContext = createCanvasContext2D(Math.round((pixelRatio * canvasWidthInUnits) / sourceResolution), Math.round((pixelRatio * canvasHeightInUnits) / sourceResolution));\n    assign(stitchContext, opt_contextOptions);\n    var stitchScale = pixelRatio / sourceResolution;\n    sources.forEach(function (src, i, arr) {\n        var xPos = src.extent[0] - sourceDataExtent[0];\n        var yPos = -(src.extent[3] - sourceDataExtent[3]);\n        var srcWidth = getWidth(src.extent);\n        var srcHeight = getHeight(src.extent);\n        // This test should never fail -- but it does. Need to find a fix the upstream condition\n        if (src.image.width > 0 && src.image.height > 0) {\n            stitchContext.drawImage(src.image, gutter, gutter, src.image.width - 2 * gutter, src.image.height - 2 * gutter, xPos * stitchScale, yPos * stitchScale, srcWidth * stitchScale, srcHeight * stitchScale);\n        }\n    });\n    var targetTopLeft = getTopLeft(targetExtent);\n    triangulation.getTriangles().forEach(function (triangle, i, arr) {\n        /* Calculate affine transform (src -> dst)\n         * Resulting matrix can be used to transform coordinate\n         * from `sourceProjection` to destination pixels.\n         *\n         * To optimize number of context calls and increase numerical stability,\n         * we also do the following operations:\n         * trans(-topLeftExtentCorner), scale(1 / targetResolution), scale(1, -1)\n         * here before solving the linear system so [ui, vi] are pixel coordinates.\n         *\n         * Src points: xi, yi\n         * Dst points: ui, vi\n         * Affine coefficients: aij\n         *\n         * | x0 y0 1  0  0 0 |   |a00|   |u0|\n         * | x1 y1 1  0  0 0 |   |a01|   |u1|\n         * | x2 y2 1  0  0 0 | x |a02| = |u2|\n         * |  0  0 0 x0 y0 1 |   |a10|   |v0|\n         * |  0  0 0 x1 y1 1 |   |a11|   |v1|\n         * |  0  0 0 x2 y2 1 |   |a12|   |v2|\n         */\n        var source = triangle.source;\n        var target = triangle.target;\n        var x0 = source[0][0], y0 = source[0][1];\n        var x1 = source[1][0], y1 = source[1][1];\n        var x2 = source[2][0], y2 = source[2][1];\n        // Make sure that everything is on pixel boundaries\n        var u0 = pixelRound((target[0][0] - targetTopLeft[0]) / targetResolution);\n        var v0 = pixelRound(-(target[0][1] - targetTopLeft[1]) / targetResolution);\n        var u1 = pixelRound((target[1][0] - targetTopLeft[0]) / targetResolution);\n        var v1 = pixelRound(-(target[1][1] - targetTopLeft[1]) / targetResolution);\n        var u2 = pixelRound((target[2][0] - targetTopLeft[0]) / targetResolution);\n        var v2 = pixelRound(-(target[2][1] - targetTopLeft[1]) / targetResolution);\n        // Shift all the source points to improve numerical stability\n        // of all the subsequent calculations. The [x0, y0] is used here.\n        // This is also used to simplify the linear system.\n        var sourceNumericalShiftX = x0;\n        var sourceNumericalShiftY = y0;\n        x0 = 0;\n        y0 = 0;\n        x1 -= sourceNumericalShiftX;\n        y1 -= sourceNumericalShiftY;\n        x2 -= sourceNumericalShiftX;\n        y2 -= sourceNumericalShiftY;\n        var augmentedMatrix = [\n            [x1, y1, 0, 0, u1 - u0],\n            [x2, y2, 0, 0, u2 - u0],\n            [0, 0, x1, y1, v1 - v0],\n            [0, 0, x2, y2, v2 - v0],\n        ];\n        var affineCoefs = solveLinearSystem(augmentedMatrix);\n        if (!affineCoefs) {\n            return;\n        }\n        context.save();\n        context.beginPath();\n        if (isBrokenDiagonalRendering() ||\n            opt_contextOptions === IMAGE_SMOOTHING_DISABLED) {\n            // Make sure that all lines are horizontal or vertical\n            context.moveTo(u1, v1);\n            // This is the diagonal line. Do it in 4 steps\n            var steps = 4;\n            var ud = u0 - u1;\n            var vd = v0 - v1;\n            for (var step = 0; step < steps; step++) {\n                // Go horizontally\n                context.lineTo(u1 + pixelRound(((step + 1) * ud) / steps), v1 + pixelRound((step * vd) / (steps - 1)));\n                // Go vertically\n                if (step != steps - 1) {\n                    context.lineTo(u1 + pixelRound(((step + 1) * ud) / steps), v1 + pixelRound(((step + 1) * vd) / (steps - 1)));\n                }\n            }\n            // We are almost at u0r, v0r\n            context.lineTo(u2, v2);\n        }\n        else {\n            context.moveTo(u1, v1);\n            context.lineTo(u0, v0);\n            context.lineTo(u2, v2);\n        }\n        context.clip();\n        context.transform(affineCoefs[0], affineCoefs[2], affineCoefs[1], affineCoefs[3], u0, v0);\n        context.translate(sourceDataExtent[0] - sourceNumericalShiftX, sourceDataExtent[3] - sourceNumericalShiftY);\n        context.scale(sourceResolution / pixelRatio, -sourceResolution / pixelRatio);\n        context.drawImage(stitchContext.canvas, 0, 0);\n        context.restore();\n    });\n    if (opt_renderEdges) {\n        context.save();\n        context.globalCompositeOperation = 'source-over';\n        context.strokeStyle = 'black';\n        context.lineWidth = 1;\n        triangulation.getTriangles().forEach(function (triangle, i, arr) {\n            var target = triangle.target;\n            var u0 = (target[0][0] - targetTopLeft[0]) / targetResolution;\n            var v0 = -(target[0][1] - targetTopLeft[1]) / targetResolution;\n            var u1 = (target[1][0] - targetTopLeft[0]) / targetResolution;\n            var v1 = -(target[1][1] - targetTopLeft[1]) / targetResolution;\n            var u2 = (target[2][0] - targetTopLeft[0]) / targetResolution;\n            var v2 = -(target[2][1] - targetTopLeft[1]) / targetResolution;\n            context.beginPath();\n            context.moveTo(u1, v1);\n            context.lineTo(u0, v0);\n            context.lineTo(u2, v2);\n            context.closePath();\n            context.stroke();\n        });\n        context.restore();\n    }\n    return context.canvas;\n}\n//# sourceMappingURL=reproj.js.map","/**\n * @module ol/MapEventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    /**\n     * Triggered after a map frame is rendered.\n     * @event module:ol/MapEvent~MapEvent#postrender\n     * @api\n     */\n    POSTRENDER: 'postrender',\n    /**\n     * Triggered when the map starts moving.\n     * @event module:ol/MapEvent~MapEvent#movestart\n     * @api\n     */\n    MOVESTART: 'movestart',\n    /**\n     * Triggered after the map is moved.\n     * @event module:ol/MapEvent~MapEvent#moveend\n     * @api\n     */\n    MOVEEND: 'moveend',\n};\n/***\n * @typedef {'postrender'|'movestart'|'moveend'} Types\n */\n//# sourceMappingURL=MapEventType.js.map","/**\n * @module ol/rotationconstraint\n */\nimport { toRadians } from './math.js';\n/**\n * @typedef {function((number|undefined), boolean=): (number|undefined)} Type\n */\n/**\n * @param {number|undefined} rotation Rotation.\n * @return {number|undefined} Rotation.\n */\nexport function disable(rotation) {\n    if (rotation !== undefined) {\n        return 0;\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @param {number|undefined} rotation Rotation.\n * @return {number|undefined} Rotation.\n */\nexport function none(rotation) {\n    if (rotation !== undefined) {\n        return rotation;\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @param {number} n N.\n * @return {Type} Rotation constraint.\n */\nexport function createSnapToN(n) {\n    var theta = (2 * Math.PI) / n;\n    return (\n    /**\n     * @param {number|undefined} rotation Rotation.\n     * @param {boolean} [opt_isMoving] True if an interaction or animation is in progress.\n     * @return {number|undefined} Rotation.\n     */\n    function (rotation, opt_isMoving) {\n        if (opt_isMoving) {\n            return rotation;\n        }\n        if (rotation !== undefined) {\n            rotation = Math.floor(rotation / theta + 0.5) * theta;\n            return rotation;\n        }\n        else {\n            return undefined;\n        }\n    });\n}\n/**\n * @param {number} [opt_tolerance] Tolerance.\n * @return {Type} Rotation constraint.\n */\nexport function createSnapToZero(opt_tolerance) {\n    var tolerance = opt_tolerance || toRadians(5);\n    return (\n    /**\n     * @param {number|undefined} rotation Rotation.\n     * @param {boolean} [opt_isMoving] True if an interaction or animation is in progress.\n     * @return {number|undefined} Rotation.\n     */\n    function (rotation, opt_isMoving) {\n        if (opt_isMoving) {\n            return rotation;\n        }\n        if (rotation !== undefined) {\n            if (Math.abs(rotation) <= tolerance) {\n                return 0;\n            }\n            else {\n                return rotation;\n            }\n        }\n        else {\n            return undefined;\n        }\n    });\n}\n//# sourceMappingURL=rotationconstraint.js.map","/**\n * @module ol/TileRange\n */\n/**\n * A representation of a contiguous block of tiles.  A tile range is specified\n * by its min/max tile coordinates and is inclusive of coordinates.\n */\nvar TileRange = /** @class */ (function () {\n    /**\n     * @param {number} minX Minimum X.\n     * @param {number} maxX Maximum X.\n     * @param {number} minY Minimum Y.\n     * @param {number} maxY Maximum Y.\n     */\n    function TileRange(minX, maxX, minY, maxY) {\n        /**\n         * @type {number}\n         */\n        this.minX = minX;\n        /**\n         * @type {number}\n         */\n        this.maxX = maxX;\n        /**\n         * @type {number}\n         */\n        this.minY = minY;\n        /**\n         * @type {number}\n         */\n        this.maxY = maxY;\n    }\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @return {boolean} Contains tile coordinate.\n     */\n    TileRange.prototype.contains = function (tileCoord) {\n        return this.containsXY(tileCoord[1], tileCoord[2]);\n    };\n    /**\n     * @param {TileRange} tileRange Tile range.\n     * @return {boolean} Contains.\n     */\n    TileRange.prototype.containsTileRange = function (tileRange) {\n        return (this.minX <= tileRange.minX &&\n            tileRange.maxX <= this.maxX &&\n            this.minY <= tileRange.minY &&\n            tileRange.maxY <= this.maxY);\n    };\n    /**\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @return {boolean} Contains coordinate.\n     */\n    TileRange.prototype.containsXY = function (x, y) {\n        return this.minX <= x && x <= this.maxX && this.minY <= y && y <= this.maxY;\n    };\n    /**\n     * @param {TileRange} tileRange Tile range.\n     * @return {boolean} Equals.\n     */\n    TileRange.prototype.equals = function (tileRange) {\n        return (this.minX == tileRange.minX &&\n            this.minY == tileRange.minY &&\n            this.maxX == tileRange.maxX &&\n            this.maxY == tileRange.maxY);\n    };\n    /**\n     * @param {TileRange} tileRange Tile range.\n     */\n    TileRange.prototype.extend = function (tileRange) {\n        if (tileRange.minX < this.minX) {\n            this.minX = tileRange.minX;\n        }\n        if (tileRange.maxX > this.maxX) {\n            this.maxX = tileRange.maxX;\n        }\n        if (tileRange.minY < this.minY) {\n            this.minY = tileRange.minY;\n        }\n        if (tileRange.maxY > this.maxY) {\n            this.maxY = tileRange.maxY;\n        }\n    };\n    /**\n     * @return {number} Height.\n     */\n    TileRange.prototype.getHeight = function () {\n        return this.maxY - this.minY + 1;\n    };\n    /**\n     * @return {import(\"./size.js\").Size} Size.\n     */\n    TileRange.prototype.getSize = function () {\n        return [this.getWidth(), this.getHeight()];\n    };\n    /**\n     * @return {number} Width.\n     */\n    TileRange.prototype.getWidth = function () {\n        return this.maxX - this.minX + 1;\n    };\n    /**\n     * @param {TileRange} tileRange Tile range.\n     * @return {boolean} Intersects.\n     */\n    TileRange.prototype.intersects = function (tileRange) {\n        return (this.minX <= tileRange.maxX &&\n            this.maxX >= tileRange.minX &&\n            this.minY <= tileRange.maxY &&\n            this.maxY >= tileRange.minY);\n    };\n    return TileRange;\n}());\n/**\n * @param {number} minX Minimum X.\n * @param {number} maxX Maximum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxY Maximum Y.\n * @param {TileRange} [tileRange] TileRange.\n * @return {TileRange} Tile range.\n */\nexport function createOrUpdate(minX, maxX, minY, maxY, tileRange) {\n    if (tileRange !== undefined) {\n        tileRange.minX = minX;\n        tileRange.maxX = maxX;\n        tileRange.minY = minY;\n        tileRange.maxY = maxY;\n        return tileRange;\n    }\n    else {\n        return new TileRange(minX, maxX, minY, maxY);\n    }\n}\nexport default TileRange;\n//# sourceMappingURL=TileRange.js.map","/**\n * @module ol/layer/TileProperty\n */\n/**\n * @enum {string}\n */\nexport default {\n    PRELOAD: 'preload',\n    USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError',\n};\n//# sourceMappingURL=TileProperty.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/source/Tile\n */\nimport Event from '../events/Event.js';\nimport Source from './Source.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport { abstract } from '../util.js';\nimport { assert } from '../asserts.js';\nimport { equivalent } from '../proj.js';\nimport { getKeyZXY, withinExtentAndZ } from '../tilecoord.js';\nimport { getForProjection as getTileGridForProjection, wrapX, } from '../tilegrid.js';\nimport { scale as scaleSize, toSize } from '../size.js';\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types, import(\"../Object\").ObjectEvent, Return> &\n *   import(\"../Observable\").OnSignature<import(\"./TileEventType\").TileSourceEventTypes, TileSourceEvent, Return> &\n *   import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"../ObjectEventType\").Types|\n *     import(\"./TileEventType\").TileSourceEventTypes, Return>} TileSourceOnSignature\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] CacheSize.\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {number} [tilePixelRatio] TilePixelRatio.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {import(\"./State.js\").default} [state] State.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] TileGrid.\n * @property {boolean} [wrapX=true] WrapX.\n * @property {number} [transition] Transition.\n * @property {string} [key] Key.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0] ZDirection.\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for sources providing images divided into a tile grid.\n * @abstract\n * @api\n */\nvar TileSource = /** @class */ (function (_super) {\n    __extends(TileSource, _super);\n    /**\n     * @param {Options} options SourceTile source options.\n     */\n    function TileSource(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            attributionsCollapsible: options.attributionsCollapsible,\n            projection: options.projection,\n            state: options.state,\n            wrapX: options.wrapX,\n        }) || this;\n        /***\n         * @type {TileSourceOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {TileSourceOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {TileSourceOnSignature<void>}\n         */\n        _this.un;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.opaque_ = options.opaque !== undefined ? options.opaque : false;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.tilePixelRatio_ =\n            options.tilePixelRatio !== undefined ? options.tilePixelRatio : 1;\n        /**\n         * @protected\n         * @type {import(\"../tilegrid/TileGrid.js\").default}\n         */\n        _this.tileGrid = options.tileGrid !== undefined ? options.tileGrid : null;\n        var tileSize = [256, 256];\n        var tileGrid = options.tileGrid;\n        if (tileGrid) {\n            toSize(tileGrid.getTileSize(tileGrid.getMinZoom()), tileSize);\n        }\n        /**\n         * @protected\n         * @type {import(\"../TileCache.js\").default}\n         */\n        _this.tileCache = new TileCache(options.cacheSize || 0);\n        /**\n         * @protected\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.tmpSize = [0, 0];\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.key_ = options.key || '';\n        /**\n         * @protected\n         * @type {import(\"../Tile.js\").Options}\n         */\n        _this.tileOptions = { transition: options.transition };\n        /**\n         * zDirection hint, read by the renderer. Indicates which resolution should be used\n         * by a renderer if the views resolution does not match any resolution of the tile source.\n         * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n         * will be used. If -1, the nearest higher resolution will be used.\n         * @type {number|import(\"../array.js\").NearestDirectionFunction}\n         */\n        _this.zDirection = options.zDirection ? options.zDirection : 0;\n        return _this;\n    }\n    /**\n     * @return {boolean} Can expire cache.\n     */\n    TileSource.prototype.canExpireCache = function () {\n        return this.tileCache.canExpireCache();\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {!Object<string, boolean>} usedTiles Used tiles.\n     */\n    TileSource.prototype.expireCache = function (projection, usedTiles) {\n        var tileCache = this.getTileCacheForProjection(projection);\n        if (tileCache) {\n            tileCache.expireCache(usedTiles);\n        }\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {number} z Zoom level.\n     * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n     * @param {function(import(\"../Tile.js\").default):(boolean|void)} callback Called with each\n     *     loaded tile.  If the callback returns `false`, the tile will not be\n     *     considered loaded.\n     * @return {boolean} The tile range is fully covered with loaded tiles.\n     */\n    TileSource.prototype.forEachLoadedTile = function (projection, z, tileRange, callback) {\n        var tileCache = this.getTileCacheForProjection(projection);\n        if (!tileCache) {\n            return false;\n        }\n        var covered = true;\n        var tile, tileCoordKey, loaded;\n        for (var x = tileRange.minX; x <= tileRange.maxX; ++x) {\n            for (var y = tileRange.minY; y <= tileRange.maxY; ++y) {\n                tileCoordKey = getKeyZXY(z, x, y);\n                loaded = false;\n                if (tileCache.containsKey(tileCoordKey)) {\n                    tile = /** @type {!import(\"../Tile.js\").default} */ (tileCache.get(tileCoordKey));\n                    loaded = tile.getState() === TileState.LOADED;\n                    if (loaded) {\n                        loaded = callback(tile) !== false;\n                    }\n                }\n                if (!loaded) {\n                    covered = false;\n                }\n            }\n        }\n        return covered;\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {number} Gutter.\n     */\n    TileSource.prototype.getGutterForProjection = function (projection) {\n        return 0;\n    };\n    /**\n     * Return the key to be used for all tiles in the source.\n     * @return {string} The key for all tiles.\n     * @protected\n     */\n    TileSource.prototype.getKey = function () {\n        return this.key_;\n    };\n    /**\n     * Set the value to be used as the key for all tiles in the source.\n     * @param {string} key The key for tiles.\n     * @protected\n     */\n    TileSource.prototype.setKey = function (key) {\n        if (this.key_ !== key) {\n            this.key_ = key;\n            this.changed();\n        }\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {boolean} Opaque.\n     */\n    TileSource.prototype.getOpaque = function (projection) {\n        return this.opaque_;\n    };\n    /**\n     * @return {Array<number>} Resolutions.\n     */\n    TileSource.prototype.getResolutions = function () {\n        return this.tileGrid.getResolutions();\n    };\n    /**\n     * @abstract\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!import(\"../Tile.js\").default} Tile.\n     */\n    TileSource.prototype.getTile = function (z, x, y, pixelRatio, projection) {\n        return abstract();\n    };\n    /**\n     * Return the tile grid of the tile source.\n     * @return {import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n     * @api\n     */\n    TileSource.prototype.getTileGrid = function () {\n        return this.tileGrid;\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n     */\n    TileSource.prototype.getTileGridForProjection = function (projection) {\n        if (!this.tileGrid) {\n            return getTileGridForProjection(projection);\n        }\n        else {\n            return this.tileGrid;\n        }\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../TileCache.js\").default} Tile cache.\n     * @protected\n     */\n    TileSource.prototype.getTileCacheForProjection = function (projection) {\n        assert(equivalent(this.getProjection(), projection), 68 // A VectorTile source can only be rendered if it has a projection compatible with the view projection.\n        );\n        return this.tileCache;\n    };\n    /**\n     * Get the tile pixel ratio for this source. Subclasses may override this\n     * method, which is meant to return a supported pixel ratio that matches the\n     * provided `pixelRatio` as close as possible.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} Tile pixel ratio.\n     */\n    TileSource.prototype.getTilePixelRatio = function (pixelRatio) {\n        return this.tilePixelRatio_;\n    };\n    /**\n     * @param {number} z Z.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../size.js\").Size} Tile size.\n     */\n    TileSource.prototype.getTilePixelSize = function (z, pixelRatio, projection) {\n        var tileGrid = this.getTileGridForProjection(projection);\n        var tilePixelRatio = this.getTilePixelRatio(pixelRatio);\n        var tileSize = toSize(tileGrid.getTileSize(z), this.tmpSize);\n        if (tilePixelRatio == 1) {\n            return tileSize;\n        }\n        else {\n            return scaleSize(tileSize, tilePixelRatio, this.tmpSize);\n        }\n    };\n    /**\n     * Returns a tile coordinate wrapped around the x-axis. When the tile coordinate\n     * is outside the resolution and extent range of the tile grid, `null` will be\n     * returned.\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../proj/Projection.js\").default} [opt_projection] Projection.\n     * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate to be passed to the tileUrlFunction or\n     *     null if no tile URL should be created for the passed `tileCoord`.\n     */\n    TileSource.prototype.getTileCoordForTileUrlFunction = function (tileCoord, opt_projection) {\n        var projection = opt_projection !== undefined ? opt_projection : this.getProjection();\n        var tileGrid = this.getTileGridForProjection(projection);\n        if (this.getWrapX() && projection.isGlobal()) {\n            tileCoord = wrapX(tileGrid, tileCoord, projection);\n        }\n        return withinExtentAndZ(tileCoord, tileGrid) ? tileCoord : null;\n    };\n    /**\n     * Remove all cached tiles from the source. The next render cycle will fetch new tiles.\n     * @api\n     */\n    TileSource.prototype.clear = function () {\n        this.tileCache.clear();\n    };\n    TileSource.prototype.refresh = function () {\n        this.clear();\n        _super.prototype.refresh.call(this);\n    };\n    /**\n     * Increases the cache size if needed\n     * @param {number} tileCount Minimum number of tiles needed.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     */\n    TileSource.prototype.updateCacheSize = function (tileCount, projection) {\n        var tileCache = this.getTileCacheForProjection(projection);\n        if (tileCount > tileCache.highWaterMark) {\n            tileCache.highWaterMark = tileCount;\n        }\n    };\n    /**\n     * Marks a tile coord as being used, without triggering a load.\n     * @abstract\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     */\n    TileSource.prototype.useTile = function (z, x, y, projection) { };\n    return TileSource;\n}(Source));\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Tile~TileSource} instances are instances of this\n * type.\n */\nvar TileSourceEvent = /** @class */ (function (_super) {\n    __extends(TileSourceEvent, _super);\n    /**\n     * @param {string} type Type.\n     * @param {import(\"../Tile.js\").default} tile The tile.\n     */\n    function TileSourceEvent(type, tile) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The tile related to the event.\n         * @type {import(\"../Tile.js\").default}\n         * @api\n         */\n        _this.tile = tile;\n        return _this;\n    }\n    return TileSourceEvent;\n}(Event));\nexport { TileSourceEvent };\nexport default TileSource;\n//# sourceMappingURL=Tile.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/style/Icon\n */\nimport EventType from '../events/EventType.js';\nimport IconAnchorUnits from './IconAnchorUnits.js';\nimport IconOrigin from './IconOrigin.js';\nimport ImageState from '../ImageState.js';\nimport ImageStyle from './Image.js';\nimport { asArray } from '../color.js';\nimport { assert } from '../asserts.js';\nimport { get as getIconImage } from './IconImage.js';\nimport { getUid } from '../util.js';\n/**\n * @typedef {Object} Options\n * @property {Array<number>} [anchor=[0.5, 0.5]] Anchor. Default value is the icon center.\n * @property {import(\"./IconOrigin.js\").default} [anchorOrigin='top-left'] Origin of the anchor: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {import(\"./IconAnchorUnits.js\").default} [anchorXUnits='fraction'] Units in which the anchor x value is\n * specified. A value of `'fraction'` indicates the x value is a fraction of the icon. A value of `'pixels'` indicates\n * the x value in pixels.\n * @property {import(\"./IconAnchorUnits.js\").default} [anchorYUnits='fraction'] Units in which the anchor y value is\n * specified. A value of `'fraction'` indicates the y value is a fraction of the icon. A value of `'pixels'` indicates\n * the y value in pixels.\n * @property {import(\"../color.js\").Color|string} [color] Color to tint the icon. If not specified,\n * the icon will be left as is.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that you must provide a\n * `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {HTMLImageElement|HTMLCanvasElement} [img] Image object for the icon. If the `src` option is not provided then the\n * provided image must already be loaded. And in that case, it is required\n * to provide the size of the image, with the `imgSize` option.\n * @property {Array<number>} [offset=[0, 0]] Offset, which, together with the size and the offset origin, define the\n * sub-rectangle to use from the original icon image.\n * @property {Array<number>} [displacement=[0,0]] Displacement the icon\n * @property {import(\"./IconOrigin.js\").default} [offsetOrigin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`.\n * @property {number} [opacity=1] Opacity of the icon.\n * @property {number|import(\"../size.js\").Size} [scale=1] Scale.\n * @property {boolean} [rotateWithView=false] Whether to rotate the icon with the view.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {import(\"../size.js\").Size} [size] Icon size in pixel. Can be used together with `offset` to define the\n * sub-rectangle to use from the origin (sprite) icon image.\n * @property {import(\"../size.js\").Size} [imgSize] Image size in pixels. Only required if `img` is set and `src` is not, and\n * for SVG images in Internet Explorer 11. The provided `imgSize` needs to match the actual size of the image.\n * @property {string} [src] Image source URI.\n */\n/**\n * @classdesc\n * Set icon style for vector features.\n * @api\n */\nvar Icon = /** @class */ (function (_super) {\n    __extends(Icon, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function Icon(opt_options) {\n        var _this = this;\n        var options = opt_options || {};\n        /**\n         * @type {number}\n         */\n        var opacity = options.opacity !== undefined ? options.opacity : 1;\n        /**\n         * @type {number}\n         */\n        var rotation = options.rotation !== undefined ? options.rotation : 0;\n        /**\n         * @type {number|import(\"../size.js\").Size}\n         */\n        var scale = options.scale !== undefined ? options.scale : 1;\n        /**\n         * @type {boolean}\n         */\n        var rotateWithView = options.rotateWithView !== undefined ? options.rotateWithView : false;\n        _this = _super.call(this, {\n            opacity: opacity,\n            rotation: rotation,\n            scale: scale,\n            displacement: options.displacement !== undefined ? options.displacement : [0, 0],\n            rotateWithView: rotateWithView,\n        }) || this;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.anchor_ = options.anchor !== undefined ? options.anchor : [0.5, 0.5];\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.normalizedAnchor_ = null;\n        /**\n         * @private\n         * @type {import(\"./IconOrigin.js\").default}\n         */\n        _this.anchorOrigin_ =\n            options.anchorOrigin !== undefined\n                ? options.anchorOrigin\n                : IconOrigin.TOP_LEFT;\n        /**\n         * @private\n         * @type {import(\"./IconAnchorUnits.js\").default}\n         */\n        _this.anchorXUnits_ =\n            options.anchorXUnits !== undefined\n                ? options.anchorXUnits\n                : IconAnchorUnits.FRACTION;\n        /**\n         * @private\n         * @type {import(\"./IconAnchorUnits.js\").default}\n         */\n        _this.anchorYUnits_ =\n            options.anchorYUnits !== undefined\n                ? options.anchorYUnits\n                : IconAnchorUnits.FRACTION;\n        /**\n         * @private\n         * @type {?string}\n         */\n        _this.crossOrigin_ =\n            options.crossOrigin !== undefined ? options.crossOrigin : null;\n        /**\n         * @type {HTMLImageElement|HTMLCanvasElement}\n         */\n        var image = options.img !== undefined ? options.img : null;\n        /**\n         * @type {import(\"../size.js\").Size}\n         */\n        var imgSize = options.imgSize !== undefined ? options.imgSize : null;\n        /**\n         * @type {string|undefined}\n         */\n        var src = options.src;\n        assert(!(src !== undefined && image), 4); // `image` and `src` cannot be provided at the same time\n        assert(!image || (image && imgSize), 5); // `imgSize` must be set when `image` is provided\n        if ((src === undefined || src.length === 0) && image) {\n            src = /** @type {HTMLImageElement} */ (image).src || getUid(image);\n        }\n        assert(src !== undefined && src.length > 0, 6); // A defined and non-empty `src` or `image` must be provided\n        /**\n         * @type {import(\"../ImageState.js\").default}\n         */\n        var imageState = options.src !== undefined ? ImageState.IDLE : ImageState.LOADED;\n        /**\n         * @private\n         * @type {import(\"../color.js\").Color}\n         */\n        _this.color_ = options.color !== undefined ? asArray(options.color) : null;\n        /**\n         * @private\n         * @type {import(\"./IconImage.js\").default}\n         */\n        _this.iconImage_ = getIconImage(image, \n        /** @type {string} */ (src), imgSize, _this.crossOrigin_, imageState, _this.color_);\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.offset_ = options.offset !== undefined ? options.offset : [0, 0];\n        /**\n         * @private\n         * @type {import(\"./IconOrigin.js\").default}\n         */\n        _this.offsetOrigin_ =\n            options.offsetOrigin !== undefined\n                ? options.offsetOrigin\n                : IconOrigin.TOP_LEFT;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.origin_ = null;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.size_ = options.size !== undefined ? options.size : null;\n        return _this;\n    }\n    /**\n     * Clones the style. The underlying Image/HTMLCanvasElement is not cloned.\n     * @return {Icon} The cloned style.\n     * @api\n     */\n    Icon.prototype.clone = function () {\n        var scale = this.getScale();\n        return new Icon({\n            anchor: this.anchor_.slice(),\n            anchorOrigin: this.anchorOrigin_,\n            anchorXUnits: this.anchorXUnits_,\n            anchorYUnits: this.anchorYUnits_,\n            crossOrigin: this.crossOrigin_,\n            color: this.color_ && this.color_.slice\n                ? this.color_.slice()\n                : this.color_ || undefined,\n            src: this.getSrc(),\n            offset: this.offset_.slice(),\n            offsetOrigin: this.offsetOrigin_,\n            size: this.size_ !== null ? this.size_.slice() : undefined,\n            opacity: this.getOpacity(),\n            scale: Array.isArray(scale) ? scale.slice() : scale,\n            rotation: this.getRotation(),\n            rotateWithView: this.getRotateWithView(),\n        });\n    };\n    /**\n     * Get the anchor point in pixels. The anchor determines the center point for the\n     * symbolizer.\n     * @return {Array<number>} Anchor.\n     * @api\n     */\n    Icon.prototype.getAnchor = function () {\n        if (this.normalizedAnchor_) {\n            return this.normalizedAnchor_;\n        }\n        var anchor = this.anchor_;\n        var size = this.getSize();\n        if (this.anchorXUnits_ == IconAnchorUnits.FRACTION ||\n            this.anchorYUnits_ == IconAnchorUnits.FRACTION) {\n            if (!size) {\n                return null;\n            }\n            anchor = this.anchor_.slice();\n            if (this.anchorXUnits_ == IconAnchorUnits.FRACTION) {\n                anchor[0] *= size[0];\n            }\n            if (this.anchorYUnits_ == IconAnchorUnits.FRACTION) {\n                anchor[1] *= size[1];\n            }\n        }\n        if (this.anchorOrigin_ != IconOrigin.TOP_LEFT) {\n            if (!size) {\n                return null;\n            }\n            if (anchor === this.anchor_) {\n                anchor = this.anchor_.slice();\n            }\n            if (this.anchorOrigin_ == IconOrigin.TOP_RIGHT ||\n                this.anchorOrigin_ == IconOrigin.BOTTOM_RIGHT) {\n                anchor[0] = -anchor[0] + size[0];\n            }\n            if (this.anchorOrigin_ == IconOrigin.BOTTOM_LEFT ||\n                this.anchorOrigin_ == IconOrigin.BOTTOM_RIGHT) {\n                anchor[1] = -anchor[1] + size[1];\n            }\n        }\n        var displacement = this.getDisplacement();\n        anchor[0] -= displacement[0];\n        anchor[1] += displacement[1];\n        this.normalizedAnchor_ = anchor;\n        return this.normalizedAnchor_;\n    };\n    /**\n     * Set the anchor point. The anchor determines the center point for the\n     * symbolizer.\n     *\n     * @param {Array<number>} anchor Anchor.\n     * @api\n     */\n    Icon.prototype.setAnchor = function (anchor) {\n        this.anchor_ = anchor;\n        this.normalizedAnchor_ = null;\n    };\n    /**\n     * Get the icon color.\n     * @return {import(\"../color.js\").Color} Color.\n     * @api\n     */\n    Icon.prototype.getColor = function () {\n        return this.color_;\n    };\n    /**\n     * Get the image icon.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {HTMLImageElement|HTMLCanvasElement} Image or Canvas element.\n     * @api\n     */\n    Icon.prototype.getImage = function (pixelRatio) {\n        return this.iconImage_.getImage(pixelRatio);\n    };\n    /**\n     * Get the pixel ratio.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} The pixel ratio of the image.\n     * @api\n     */\n    Icon.prototype.getPixelRatio = function (pixelRatio) {\n        return this.iconImage_.getPixelRatio(pixelRatio);\n    };\n    /**\n     * @return {import(\"../size.js\").Size} Image size.\n     */\n    Icon.prototype.getImageSize = function () {\n        return this.iconImage_.getSize();\n    };\n    /**\n     * @return {import(\"../ImageState.js\").default} Image state.\n     */\n    Icon.prototype.getImageState = function () {\n        return this.iconImage_.getImageState();\n    };\n    /**\n     * @return {HTMLImageElement|HTMLCanvasElement} Image element.\n     */\n    Icon.prototype.getHitDetectionImage = function () {\n        return this.iconImage_.getHitDetectionImage();\n    };\n    /**\n     * Get the origin of the symbolizer.\n     * @return {Array<number>} Origin.\n     * @api\n     */\n    Icon.prototype.getOrigin = function () {\n        if (this.origin_) {\n            return this.origin_;\n        }\n        var offset = this.offset_;\n        if (this.offsetOrigin_ != IconOrigin.TOP_LEFT) {\n            var size = this.getSize();\n            var iconImageSize = this.iconImage_.getSize();\n            if (!size || !iconImageSize) {\n                return null;\n            }\n            offset = offset.slice();\n            if (this.offsetOrigin_ == IconOrigin.TOP_RIGHT ||\n                this.offsetOrigin_ == IconOrigin.BOTTOM_RIGHT) {\n                offset[0] = iconImageSize[0] - size[0] - offset[0];\n            }\n            if (this.offsetOrigin_ == IconOrigin.BOTTOM_LEFT ||\n                this.offsetOrigin_ == IconOrigin.BOTTOM_RIGHT) {\n                offset[1] = iconImageSize[1] - size[1] - offset[1];\n            }\n        }\n        this.origin_ = offset;\n        return this.origin_;\n    };\n    /**\n     * Get the image URL.\n     * @return {string|undefined} Image src.\n     * @api\n     */\n    Icon.prototype.getSrc = function () {\n        return this.iconImage_.getSrc();\n    };\n    /**\n     * Get the size of the icon (in pixels).\n     * @return {import(\"../size.js\").Size} Image size.\n     * @api\n     */\n    Icon.prototype.getSize = function () {\n        return !this.size_ ? this.iconImage_.getSize() : this.size_;\n    };\n    /**\n     * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n     */\n    Icon.prototype.listenImageChange = function (listener) {\n        this.iconImage_.addEventListener(EventType.CHANGE, listener);\n    };\n    /**\n     * Load not yet loaded URI.\n     * When rendering a feature with an icon style, the vector renderer will\n     * automatically call this method. However, you might want to call this\n     * method yourself for preloading or other purposes.\n     * @api\n     */\n    Icon.prototype.load = function () {\n        this.iconImage_.load();\n    };\n    /**\n     * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n     */\n    Icon.prototype.unlistenImageChange = function (listener) {\n        this.iconImage_.removeEventListener(EventType.CHANGE, listener);\n    };\n    return Icon;\n}(ImageStyle));\nexport default Icon;\n//# sourceMappingURL=Icon.js.map","/**\n * @module ol/centerconstraint\n */\nimport { clamp } from './math.js';\n/**\n * @typedef {function((import(\"./coordinate.js\").Coordinate|undefined), number, import(\"./size.js\").Size, boolean=, Array<number>=): (import(\"./coordinate.js\").Coordinate|undefined)} Type\n */\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {boolean} onlyCenter If true, the constraint will only apply to the view center.\n * @param {boolean} smooth If true, the view will be able to go slightly out of the given extent\n * (only during interaction and animation).\n * @return {Type} The constraint.\n */\nexport function createExtent(extent, onlyCenter, smooth) {\n    return (\n    /**\n     * @param {import(\"./coordinate.js\").Coordinate|undefined} center Center.\n     * @param {number} resolution Resolution.\n     * @param {import(\"./size.js\").Size} size Viewport size; unused if `onlyCenter` was specified.\n     * @param {boolean} [opt_isMoving] True if an interaction or animation is in progress.\n     * @param {Array<number>} [opt_centerShift] Shift between map center and viewport center.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n     */\n    function (center, resolution, size, opt_isMoving, opt_centerShift) {\n        if (center) {\n            var viewWidth = onlyCenter ? 0 : size[0] * resolution;\n            var viewHeight = onlyCenter ? 0 : size[1] * resolution;\n            var shiftX = opt_centerShift ? opt_centerShift[0] : 0;\n            var shiftY = opt_centerShift ? opt_centerShift[1] : 0;\n            var minX = extent[0] + viewWidth / 2 + shiftX;\n            var maxX = extent[2] - viewWidth / 2 + shiftX;\n            var minY = extent[1] + viewHeight / 2 + shiftY;\n            var maxY = extent[3] - viewHeight / 2 + shiftY;\n            // note: when zooming out of bounds, min and max values for x and y may\n            // end up inverted (min > max); this has to be accounted for\n            if (minX > maxX) {\n                minX = (maxX + minX) / 2;\n                maxX = minX;\n            }\n            if (minY > maxY) {\n                minY = (maxY + minY) / 2;\n                maxY = minY;\n            }\n            var x = clamp(center[0], minX, maxX);\n            var y = clamp(center[1], minY, maxY);\n            var ratio = 30 * resolution;\n            // during an interaction, allow some overscroll\n            if (opt_isMoving && smooth) {\n                x +=\n                    -ratio * Math.log(1 + Math.max(0, minX - center[0]) / ratio) +\n                        ratio * Math.log(1 + Math.max(0, center[0] - maxX) / ratio);\n                y +=\n                    -ratio * Math.log(1 + Math.max(0, minY - center[1]) / ratio) +\n                        ratio * Math.log(1 + Math.max(0, center[1] - maxY) / ratio);\n            }\n            return [x, y];\n        }\n        else {\n            return undefined;\n        }\n    });\n}\n/**\n * @param {import(\"./coordinate.js\").Coordinate} [center] Center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\nexport function none(center) {\n    return center;\n}\n//# sourceMappingURL=centerconstraint.js.map","/**\n * @module ol/resolutionconstraint\n */\nimport { clamp } from './math.js';\nimport { getHeight, getWidth } from './extent.js';\nimport { linearFindNearest } from './array.js';\n/**\n * @typedef {function((number|undefined), number, import(\"./size.js\").Size, boolean=): (number|undefined)} Type\n */\n/**\n * Returns a modified resolution taking into account the viewport size and maximum\n * allowed extent.\n * @param {number} resolution Resolution\n * @param {import(\"./extent.js\").Extent} maxExtent Maximum allowed extent.\n * @param {import(\"./size.js\").Size} viewportSize Viewport size.\n * @param {boolean} showFullExtent Whether to show the full extent.\n * @return {number} Capped resolution.\n */\nfunction getViewportClampedResolution(resolution, maxExtent, viewportSize, showFullExtent) {\n    var xResolution = getWidth(maxExtent) / viewportSize[0];\n    var yResolution = getHeight(maxExtent) / viewportSize[1];\n    if (showFullExtent) {\n        return Math.min(resolution, Math.max(xResolution, yResolution));\n    }\n    return Math.min(resolution, Math.min(xResolution, yResolution));\n}\n/**\n * Returns a modified resolution to be between maxResolution and minResolution while\n * still allowing the value to be slightly out of bounds.\n * Note: the computation is based on the logarithm function (ln):\n *  - at 1, ln(x) is 0\n *  - above 1, ln(x) keeps increasing but at a much slower pace than x\n * The final result is clamped to prevent getting too far away from bounds.\n * @param {number} resolution Resolution.\n * @param {number} maxResolution Max resolution.\n * @param {number} minResolution Min resolution.\n * @return {number} Smoothed resolution.\n */\nfunction getSmoothClampedResolution(resolution, maxResolution, minResolution) {\n    var result = Math.min(resolution, maxResolution);\n    var ratio = 50;\n    result *=\n        Math.log(1 + ratio * Math.max(0, resolution / maxResolution - 1)) / ratio +\n            1;\n    if (minResolution) {\n        result = Math.max(result, minResolution);\n        result /=\n            Math.log(1 + ratio * Math.max(0, minResolution / resolution - 1)) /\n                ratio +\n                1;\n    }\n    return clamp(result, minResolution / 2, maxResolution * 2);\n}\n/**\n * @param {Array<number>} resolutions Resolutions.\n * @param {boolean} [opt_smooth] If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent} [opt_maxExtent] Maximum allowed extent.\n * @param {boolean} [opt_showFullExtent] If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createSnapToResolutions(resolutions, opt_smooth, opt_maxExtent, opt_showFullExtent) {\n    return (\n    /**\n     * @param {number|undefined} resolution Resolution.\n     * @param {number} direction Direction.\n     * @param {import(\"./size.js\").Size} size Viewport size.\n     * @param {boolean} [opt_isMoving] True if an interaction or animation is in progress.\n     * @return {number|undefined} Resolution.\n     */\n    function (resolution, direction, size, opt_isMoving) {\n        if (resolution !== undefined) {\n            var maxResolution = resolutions[0];\n            var minResolution = resolutions[resolutions.length - 1];\n            var cappedMaxRes = opt_maxExtent\n                ? getViewportClampedResolution(maxResolution, opt_maxExtent, size, opt_showFullExtent)\n                : maxResolution;\n            // during interacting or animating, allow intermediary values\n            if (opt_isMoving) {\n                var smooth = opt_smooth !== undefined ? opt_smooth : true;\n                if (!smooth) {\n                    return clamp(resolution, minResolution, cappedMaxRes);\n                }\n                return getSmoothClampedResolution(resolution, cappedMaxRes, minResolution);\n            }\n            var capped = Math.min(cappedMaxRes, resolution);\n            var z = Math.floor(linearFindNearest(resolutions, capped, direction));\n            if (resolutions[z] > cappedMaxRes && z < resolutions.length - 1) {\n                return resolutions[z + 1];\n            }\n            return resolutions[z];\n        }\n        else {\n            return undefined;\n        }\n    });\n}\n/**\n * @param {number} power Power.\n * @param {number} maxResolution Maximum resolution.\n * @param {number} [opt_minResolution] Minimum resolution.\n * @param {boolean} [opt_smooth] If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent} [opt_maxExtent] Maximum allowed extent.\n * @param {boolean} [opt_showFullExtent] If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createSnapToPower(power, maxResolution, opt_minResolution, opt_smooth, opt_maxExtent, opt_showFullExtent) {\n    return (\n    /**\n     * @param {number|undefined} resolution Resolution.\n     * @param {number} direction Direction.\n     * @param {import(\"./size.js\").Size} size Viewport size.\n     * @param {boolean} [opt_isMoving] True if an interaction or animation is in progress.\n     * @return {number|undefined} Resolution.\n     */\n    function (resolution, direction, size, opt_isMoving) {\n        if (resolution !== undefined) {\n            var cappedMaxRes = opt_maxExtent\n                ? getViewportClampedResolution(maxResolution, opt_maxExtent, size, opt_showFullExtent)\n                : maxResolution;\n            var minResolution = opt_minResolution !== undefined ? opt_minResolution : 0;\n            // during interacting or animating, allow intermediary values\n            if (opt_isMoving) {\n                var smooth = opt_smooth !== undefined ? opt_smooth : true;\n                if (!smooth) {\n                    return clamp(resolution, minResolution, cappedMaxRes);\n                }\n                return getSmoothClampedResolution(resolution, cappedMaxRes, minResolution);\n            }\n            var tolerance = 1e-9;\n            var minZoomLevel = Math.ceil(Math.log(maxResolution / cappedMaxRes) / Math.log(power) - tolerance);\n            var offset = -direction * (0.5 - tolerance) + 0.5;\n            var capped = Math.min(cappedMaxRes, resolution);\n            var cappedZoomLevel = Math.floor(Math.log(maxResolution / capped) / Math.log(power) + offset);\n            var zoomLevel = Math.max(minZoomLevel, cappedZoomLevel);\n            var newResolution = maxResolution / Math.pow(power, zoomLevel);\n            return clamp(newResolution, minResolution, cappedMaxRes);\n        }\n        else {\n            return undefined;\n        }\n    });\n}\n/**\n * @param {number} maxResolution Max resolution.\n * @param {number} minResolution Min resolution.\n * @param {boolean} [opt_smooth] If true, the view will be able to slightly exceed resolution limits. Default: true.\n * @param {import(\"./extent.js\").Extent} [opt_maxExtent] Maximum allowed extent.\n * @param {boolean} [opt_showFullExtent] If true, allows us to show the full extent. Default: false.\n * @return {Type} Zoom function.\n */\nexport function createMinMaxResolution(maxResolution, minResolution, opt_smooth, opt_maxExtent, opt_showFullExtent) {\n    return (\n    /**\n     * @param {number|undefined} resolution Resolution.\n     * @param {number} direction Direction.\n     * @param {import(\"./size.js\").Size} size Viewport size.\n     * @param {boolean} [opt_isMoving] True if an interaction or animation is in progress.\n     * @return {number|undefined} Resolution.\n     */\n    function (resolution, direction, size, opt_isMoving) {\n        if (resolution !== undefined) {\n            var cappedMaxRes = opt_maxExtent\n                ? getViewportClampedResolution(maxResolution, opt_maxExtent, size, opt_showFullExtent)\n                : maxResolution;\n            var smooth = opt_smooth !== undefined ? opt_smooth : true;\n            if (!smooth || !opt_isMoving) {\n                return clamp(resolution, minResolution, cappedMaxRes);\n            }\n            return getSmoothClampedResolution(resolution, cappedMaxRes, minResolution);\n        }\n        else {\n            return undefined;\n        }\n    });\n}\n//# sourceMappingURL=resolutionconstraint.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/View\n */\nimport BaseObject from './Object.js';\nimport GeometryType from './geom/GeometryType.js';\nimport Units from './proj/Units.js';\nimport ViewHint from './ViewHint.js';\nimport ViewProperty from './ViewProperty.js';\nimport { DEFAULT_TILE_SIZE } from './tilegrid/common.js';\nimport { METERS_PER_UNIT, createProjection, fromUserCoordinate, fromUserExtent, getUserProjection, toUserCoordinate, toUserExtent, } from './proj.js';\nimport { VOID } from './functions.js';\nimport { add as addCoordinate, equals as coordinatesEqual, rotate as rotateCoordinate, } from './coordinate.js';\nimport { assert } from './asserts.js';\nimport { assign } from './obj.js';\nimport { none as centerNone, createExtent } from './centerconstraint.js';\nimport { clamp, modulo } from './math.js';\nimport { createMinMaxResolution } from './resolutionconstraint.js';\nimport { createSnapToN, createSnapToZero, disable, none as rotationNone, } from './rotationconstraint.js';\nimport { createSnapToPower, createSnapToResolutions, } from './resolutionconstraint.js';\nimport { easeOut } from './easing.js';\nimport { equals } from './coordinate.js';\nimport { getCenter, getForViewAndSize, getHeight, getWidth, isEmpty, } from './extent.js';\nimport { inAndOut } from './easing.js';\nimport { linearFindNearest } from './array.js';\nimport { fromExtent as polygonFromExtent } from './geom/Polygon.js';\n/**\n * An animation configuration\n *\n * @typedef {Object} Animation\n * @property {import(\"./coordinate.js\").Coordinate} [sourceCenter] Source center.\n * @property {import(\"./coordinate.js\").Coordinate} [targetCenter] Target center.\n * @property {number} [sourceResolution] Source resolution.\n * @property {number} [targetResolution] Target resolution.\n * @property {number} [sourceRotation] Source rotation.\n * @property {number} [targetRotation] Target rotation.\n * @property {import(\"./coordinate.js\").Coordinate} [anchor] Anchor.\n * @property {number} start Start.\n * @property {number} duration Duration.\n * @property {boolean} complete Complete.\n * @property {function(number):number} easing Easing.\n * @property {function(boolean):void} callback Callback.\n */\n/**\n * @typedef {Object} Constraints\n * @property {import(\"./centerconstraint.js\").Type} center Center.\n * @property {import(\"./resolutionconstraint.js\").Type} resolution Resolution.\n * @property {import(\"./rotationconstraint.js\").Type} rotation Rotation.\n */\n/**\n * @typedef {Object} FitOptions\n * @property {import(\"./size.js\").Size} [size] The size in pixels of the box to fit\n * the extent into. Default is the current size of the first map in the DOM that\n * uses this view, or `[100, 100]` if no such map is found.\n * @property {!Array<number>} [padding=[0, 0, 0, 0]] Padding (in pixels) to be\n * cleared inside the view. Values in the array are top, right, bottom and left\n * padding.\n * @property {boolean} [nearest=false] If the view `constrainResolution` option is `true`,\n * get the nearest extent instead of the closest that actually fits the view.\n * @property {number} [minResolution=0] Minimum resolution that we zoom to.\n * @property {number} [maxZoom] Maximum zoom level that we zoom to. If\n * `minResolution` is given, this property is ignored.\n * @property {number} [duration] The duration of the animation in milliseconds.\n * By default, there is no animation to the target extent.\n * @property {function(number):number} [easing] The easing function used during\n * the animation (defaults to {@link module:ol/easing.inAndOut}).\n * The function will be called for each frame with a number representing a\n * fraction of the animation's duration.  The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n * @property {function(boolean):void} [callback] Function called when the view is in\n * its final position. The callback will be called with `true` if the animation\n * series completed on its own or `false` if it was cancelled.\n */\n/**\n * @typedef {Object} ViewOptions\n * @property {import(\"./coordinate.js\").Coordinate} [center] The initial center for\n * the view. If a user projection is not set, the coordinate system for the center is\n * specified with the `projection` option. Layer sources will not be fetched if this\n * is not set, but the center can be set later with {@link #setCenter}.\n * @property {boolean|number} [constrainRotation=true] Rotation constraint.\n * `false` means no constraint. `true` means no constraint, but snap to zero\n * near zero. A number constrains the rotation to that number of values. For\n * example, `4` will constrain the rotation to 0, 90, 180, and 270 degrees.\n * @property {boolean} [enableRotation=true] Enable rotation.\n * If `false`, a rotation constraint that always sets the rotation to zero is\n * used. The `constrainRotation` option has no effect if `enableRotation` is\n * `false`.\n * @property {import(\"./extent.js\").Extent} [extent] The extent that constrains the\n * view, in other words, nothing outside of this extent can be visible on the map.\n * @property {boolean} [constrainOnlyCenter=false] If true, the extent\n * constraint will only apply to the view center and not the whole extent.\n * @property {boolean} [smoothExtentConstraint=true] If true, the extent\n * constraint will be applied smoothly, i.e. allow the view to go slightly outside\n * of the given `extent`.\n * @property {number} [maxResolution] The maximum resolution used to determine\n * the resolution constraint. It is used together with `minResolution` (or\n * `maxZoom`) and `zoomFactor`. If unspecified it is calculated in such a way\n * that the projection's validity extent fits in a 256x256 px tile. If the\n * projection is Spherical Mercator (the default) then `maxResolution` defaults\n * to `40075016.68557849 / 256 = 156543.03392804097`.\n * @property {number} [minResolution] The minimum resolution used to determine\n * the resolution constraint.  It is used together with `maxResolution` (or\n * `minZoom`) and `zoomFactor`.  If unspecified it is calculated assuming 29\n * zoom levels (with a factor of 2). If the projection is Spherical Mercator\n * (the default) then `minResolution` defaults to\n * `40075016.68557849 / 256 / Math.pow(2, 28) = 0.0005831682455839253`.\n * @property {number} [maxZoom=28] The maximum zoom level used to determine the\n * resolution constraint. It is used together with `minZoom` (or\n * `maxResolution`) and `zoomFactor`.  Note that if `minResolution` is also\n * provided, it is given precedence over `maxZoom`.\n * @property {number} [minZoom=0] The minimum zoom level used to determine the\n * resolution constraint. It is used together with `maxZoom` (or\n * `minResolution`) and `zoomFactor`.  Note that if `maxResolution` is also\n * provided, it is given precedence over `minZoom`.\n * @property {boolean} [multiWorld=false] If `false` the view is constrained so\n * only one world is visible, and you cannot pan off the edge.  If `true` the map\n * may show multiple worlds at low zoom levels.  Only used if the `projection` is\n * global.  Note that if `extent` is also provided it is given precedence.\n * @property {boolean} [constrainResolution=false] If true, the view will always\n * animate to the closest zoom level after an interaction; false means\n * intermediary zoom levels are allowed.\n * @property {boolean} [smoothResolutionConstraint=true] If true, the resolution\n * min/max values will be applied smoothly, i. e. allow the view to exceed slightly\n * the given resolution or zoom bounds.\n * @property {boolean} [showFullExtent=false] Allow the view to be zoomed out to\n * show the full configured extent. By default, when a view is configured with an\n * extent, users will not be able to zoom out so the viewport exceeds the extent in\n * either dimension. This means the full extent may not be visible if the viewport\n * is taller or wider than the aspect ratio of the configured extent. If\n * showFullExtent is true, the user will be able to zoom out so that the viewport\n * exceeds the height or width of the configured extent, but not both, allowing the\n * full extent to be shown.\n * @property {import(\"./proj.js\").ProjectionLike} [projection='EPSG:3857'] The\n * projection. The default is Spherical Mercator.\n * @property {number} [resolution] The initial resolution for the view. The\n * units are `projection` units per pixel (e.g. meters per pixel). An\n * alternative to setting this is to set `zoom`. Layer sources will not be\n * fetched if neither this nor `zoom` are defined, but they can be set later\n * with {@link #setZoom} or {@link #setResolution}.\n * @property {Array<number>} [resolutions] Resolutions that determine the\n * zoom levels if specified. The index in the array corresponds to the zoom level,\n * therefore the resolution values have to be in descending order. It also constrains\n * the resolution by the minimum and maximum value. If set the `maxResolution`,\n * `minResolution`, `minZoom`, `maxZoom`, and `zoomFactor` options are ignored.\n * @property {number} [rotation=0] The initial rotation for the view in radians\n * (positive rotation clockwise, 0 means North).\n * @property {number} [zoom] Only used if `resolution` is not defined. Zoom\n * level used to calculate the initial resolution for the view.\n * @property {number} [zoomFactor=2] The zoom factor used to compute the\n * corresponding resolution.\n * @property {!Array<number>} [padding=[0, 0, 0, 0]] Padding (in css pixels).\n * If the map viewport is partially covered with other content (overlays) along\n * its edges, this setting allows to shift the center of the viewport away from\n * that content. The order of the values is top, right, bottom, left.\n */\n/**\n * @typedef {Object} AnimationOptions\n * @property {import(\"./coordinate.js\").Coordinate} [center] The center of the view at the end of\n * the animation.\n * @property {number} [zoom] The zoom level of the view at the end of the\n * animation. This takes precedence over `resolution`.\n * @property {number} [resolution] The resolution of the view at the end\n * of the animation.  If `zoom` is also provided, this option will be ignored.\n * @property {number} [rotation] The rotation of the view at the end of\n * the animation.\n * @property {import(\"./coordinate.js\").Coordinate} [anchor] Optional anchor to remain fixed\n * during a rotation or resolution animation.\n * @property {number} [duration=1000] The duration of the animation in milliseconds.\n * @property {function(number):number} [easing] The easing function used\n * during the animation (defaults to {@link module:ol/easing.inAndOut}).\n * The function will be called for each frame with a number representing a\n * fraction of the animation's duration.  The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n */\n/**\n * @typedef {Object} State\n * @property {import(\"./coordinate.js\").Coordinate} center Center.\n * @property {import(\"./proj/Projection.js\").default} projection Projection.\n * @property {number} resolution Resolution.\n * @property {number} rotation Rotation.\n * @property {number} zoom Zoom.\n */\n/**\n * Default min zoom level for the map view.\n * @type {number}\n */\nvar DEFAULT_MIN_ZOOM = 0;\n/**\n * @typedef {import(\"./ObjectEventType\").Types|'change:center'|'change:resolution'|'change:rotation'} ViewObjectEventTypes\n */\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature<import(\"./Observable\").EventTypes, import(\"./events/Event.js\").default, Return> &\n *   import(\"./Observable\").OnSignature<ViewObjectEventTypes, import(\"./Object\").ObjectEvent, Return> &\n *   import(\"./Observable\").CombinedOnSignature<import(\"./Observable\").EventTypes|ViewObjectEventTypes, Return>} ViewOnSignature\n */\n/**\n * @classdesc\n * A View object represents a simple 2D view of the map.\n *\n * This is the object to act upon to change the center, resolution,\n * and rotation of the map.\n *\n * A View has a `projection`. The projection determines the\n * coordinate system of the center, and its units determine the units of the\n * resolution (projection units per pixel). The default projection is\n * Spherical Mercator (EPSG:3857).\n *\n * ### The view states\n *\n * A View is determined by three states: `center`, `resolution`,\n * and `rotation`. Each state has a corresponding getter and setter, e.g.\n * `getCenter` and `setCenter` for the `center` state.\n *\n * The `zoom` state is actually not saved on the view: all computations\n * internally use the `resolution` state. Still, the `setZoom` and `getZoom`\n * methods are available, as well as `getResolutionForZoom` and\n * `getZoomForResolution` to switch from one system to the other.\n *\n * ### The constraints\n *\n * `setCenter`, `setResolution` and `setRotation` can be used to change the\n * states of the view, but any constraint defined in the constructor will\n * be applied along the way.\n *\n * A View object can have a *resolution constraint*, a *rotation constraint*\n * and a *center constraint*.\n *\n * The *resolution constraint* typically restricts min/max values and\n * snaps to specific resolutions. It is determined by the following\n * options: `resolutions`, `maxResolution`, `maxZoom` and `zoomFactor`.\n * If `resolutions` is set, the other three options are ignored. See\n * documentation for each option for more information. By default, the view\n * only has a min/max restriction and allow intermediary zoom levels when\n * pinch-zooming for example.\n *\n * The *rotation constraint* snaps to specific angles. It is determined\n * by the following options: `enableRotation` and `constrainRotation`.\n * By default rotation is allowed and its value is snapped to zero when approaching the\n * horizontal.\n *\n * The *center constraint* is determined by the `extent` option. By\n * default the view center is not constrained at all.\n *\n * ### Changing the view state\n *\n * It is important to note that `setZoom`, `setResolution`, `setCenter` and\n * `setRotation` are subject to the above mentioned constraints. As such, it\n * may sometimes not be possible to know in advance the resulting state of the\n * View. For example, calling `setResolution(10)` does not guarantee that\n * `getResolution()` will return `10`.\n *\n * A consequence of this is that, when applying a delta on the view state, one\n * should use `adjustCenter`, `adjustRotation`, `adjustZoom` and `adjustResolution`\n * rather than the corresponding setters. This will let view do its internal\n * computations. Besides, the `adjust*` methods also take an `opt_anchor`\n * argument which allows specifying an origin for the transformation.\n *\n * ### Interacting with the view\n *\n * View constraints are usually only applied when the view is *at rest*, meaning that\n * no interaction or animation is ongoing. As such, if the user puts the view in a\n * state that is not equivalent to a constrained one (e.g. rotating the view when\n * the snap angle is 0), an animation will be triggered at the interaction end to\n * put back the view to a stable state;\n *\n * @api\n */\nvar View = /** @class */ (function (_super) {\n    __extends(View, _super);\n    /**\n     * @param {ViewOptions} [opt_options] View options.\n     */\n    function View(opt_options) {\n        var _this = _super.call(this) || this;\n        /***\n         * @type {ViewOnSignature<import(\"./Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {ViewOnSignature<import(\"./Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {ViewOnSignature<void>}\n         */\n        _this.un;\n        var options = assign({}, opt_options);\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.hints_ = [0, 0];\n        /**\n         * @private\n         * @type {Array<Array<Animation>>}\n         */\n        _this.animations_ = [];\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.updateAnimationKey_;\n        /**\n         * @private\n         * @const\n         * @type {import(\"./proj/Projection.js\").default}\n         */\n        _this.projection_ = createProjection(options.projection, 'EPSG:3857');\n        /**\n         * @private\n         * @type {import(\"./size.js\").Size}\n         */\n        _this.viewportSize_ = [100, 100];\n        /**\n         * @private\n         * @type {import(\"./coordinate.js\").Coordinate|undefined}\n         */\n        _this.targetCenter_ = null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.targetResolution_;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.targetRotation_;\n        /**\n         * @private\n         * @type {import(\"./coordinate.js\").Coordinate|undefined}\n         */\n        _this.cancelAnchor_ = undefined;\n        if (options.center) {\n            options.center = fromUserCoordinate(options.center, _this.projection_);\n        }\n        if (options.extent) {\n            options.extent = fromUserExtent(options.extent, _this.projection_);\n        }\n        _this.applyOptions_(options);\n        return _this;\n    }\n    /**\n     * Set up the view with the given options.\n     * @param {ViewOptions} options View options.\n     */\n    View.prototype.applyOptions_ = function (options) {\n        /**\n         * @type {Object<string, *>}\n         */\n        var properties = {};\n        var resolutionConstraintInfo = createResolutionConstraint(options);\n        /**\n         * @private\n         * @type {number}\n         */\n        this.maxResolution_ = resolutionConstraintInfo.maxResolution;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.minResolution_ = resolutionConstraintInfo.minResolution;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.zoomFactor_ = resolutionConstraintInfo.zoomFactor;\n        /**\n         * @private\n         * @type {Array<number>|undefined}\n         */\n        this.resolutions_ = options.resolutions;\n        /**\n         * @type {Array<number>|undefined}\n         * @private\n         */\n        this.padding_ = options.padding;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.minZoom_ = resolutionConstraintInfo.minZoom;\n        var centerConstraint = createCenterConstraint(options);\n        var resolutionConstraint = resolutionConstraintInfo.constraint;\n        var rotationConstraint = createRotationConstraint(options);\n        /**\n         * @private\n         * @type {Constraints}\n         */\n        this.constraints_ = {\n            center: centerConstraint,\n            resolution: resolutionConstraint,\n            rotation: rotationConstraint,\n        };\n        this.setRotation(options.rotation !== undefined ? options.rotation : 0);\n        this.setCenterInternal(options.center !== undefined ? options.center : null);\n        if (options.resolution !== undefined) {\n            this.setResolution(options.resolution);\n        }\n        else if (options.zoom !== undefined) {\n            this.setZoom(options.zoom);\n        }\n        this.setProperties(properties);\n        /**\n         * @private\n         * @type {ViewOptions}\n         */\n        this.options_ = options;\n    };\n    Object.defineProperty(View.prototype, \"padding\", {\n        /**\n         * Padding (in css pixels).\n         * If the map viewport is partially covered with other content (overlays) along\n         * its edges, this setting allows to shift the center of the viewport away from that\n         * content. The order of the values in the array is top, right, bottom, left.\n         * The default is no padding, which is equivalent to `[0, 0, 0, 0]`.\n         * @type {Array<number>|undefined}\n         * @api\n         */\n        get: function () {\n            return this.padding_;\n        },\n        set: function (padding) {\n            var oldPadding = this.padding_;\n            this.padding_ = padding;\n            var center = this.getCenter();\n            if (center) {\n                var newPadding = padding || [0, 0, 0, 0];\n                oldPadding = oldPadding || [0, 0, 0, 0];\n                var resolution = this.getResolution();\n                var offsetX = (resolution / 2) *\n                    (newPadding[3] - oldPadding[3] + oldPadding[1] - newPadding[1]);\n                var offsetY = (resolution / 2) *\n                    (newPadding[0] - oldPadding[0] + oldPadding[2] - newPadding[2]);\n                this.setCenterInternal([center[0] + offsetX, center[1] - offsetY]);\n            }\n        },\n        enumerable: false,\n        configurable: true\n    });\n    /**\n     * Get an updated version of the view options used to construct the view.  The\n     * current resolution (or zoom), center, and rotation are applied to any stored\n     * options.  The provided options can be used to apply new min/max zoom or\n     * resolution limits.\n     * @param {ViewOptions} newOptions New options to be applied.\n     * @return {ViewOptions} New options updated with the current view state.\n     */\n    View.prototype.getUpdatedOptions_ = function (newOptions) {\n        var options = assign({}, this.options_);\n        // preserve resolution (or zoom)\n        if (options.resolution !== undefined) {\n            options.resolution = this.getResolution();\n        }\n        else {\n            options.zoom = this.getZoom();\n        }\n        // preserve center\n        options.center = this.getCenterInternal();\n        // preserve rotation\n        options.rotation = this.getRotation();\n        return assign({}, options, newOptions);\n    };\n    /**\n     * Animate the view.  The view's center, zoom (or resolution), and rotation\n     * can be animated for smooth transitions between view states.  For example,\n     * to animate the view to a new zoom level:\n     *\n     *     view.animate({zoom: view.getZoom() + 1});\n     *\n     * By default, the animation lasts one second and uses in-and-out easing.  You\n     * can customize this behavior by including `duration` (in milliseconds) and\n     * `easing` options (see {@link module:ol/easing}).\n     *\n     * To chain together multiple animations, call the method with multiple\n     * animation objects.  For example, to first zoom and then pan:\n     *\n     *     view.animate({zoom: 10}, {center: [0, 0]});\n     *\n     * If you provide a function as the last argument to the animate method, it\n     * will get called at the end of an animation series.  The callback will be\n     * called with `true` if the animation series completed on its own or `false`\n     * if it was cancelled.\n     *\n     * Animations are cancelled by user interactions (e.g. dragging the map) or by\n     * calling `view.setCenter()`, `view.setResolution()`, or `view.setRotation()`\n     * (or another method that calls one of these).\n     *\n     * @param {...(AnimationOptions|function(boolean): void)} var_args Animation\n     *     options.  Multiple animations can be run in series by passing multiple\n     *     options objects.  To run multiple animations in parallel, call the method\n     *     multiple times.  An optional callback can be provided as a final\n     *     argument.  The callback will be called with a boolean indicating whether\n     *     the animation completed without being cancelled.\n     * @api\n     */\n    View.prototype.animate = function (var_args) {\n        if (this.isDef() && !this.getAnimating()) {\n            this.resolveConstraints(0);\n        }\n        var args = new Array(arguments.length);\n        for (var i = 0; i < args.length; ++i) {\n            var options = arguments[i];\n            if (options.center) {\n                options = assign({}, options);\n                options.center = fromUserCoordinate(options.center, this.getProjection());\n            }\n            if (options.anchor) {\n                options = assign({}, options);\n                options.anchor = fromUserCoordinate(options.anchor, this.getProjection());\n            }\n            args[i] = options;\n        }\n        this.animateInternal.apply(this, args);\n    };\n    /**\n     * @param {...(AnimationOptions|function(boolean): void)} var_args Animation options.\n     */\n    View.prototype.animateInternal = function (var_args) {\n        var animationCount = arguments.length;\n        var callback;\n        if (animationCount > 1 &&\n            typeof arguments[animationCount - 1] === 'function') {\n            callback = arguments[animationCount - 1];\n            --animationCount;\n        }\n        if (!this.isDef()) {\n            // if view properties are not yet set, shortcut to the final state\n            var state = arguments[animationCount - 1];\n            if (state.center) {\n                this.setCenterInternal(state.center);\n            }\n            if (state.zoom !== undefined) {\n                this.setZoom(state.zoom);\n            }\n            if (state.rotation !== undefined) {\n                this.setRotation(state.rotation);\n            }\n            if (callback) {\n                animationCallback(callback, true);\n            }\n            return;\n        }\n        var start = Date.now();\n        var center = this.targetCenter_.slice();\n        var resolution = this.targetResolution_;\n        var rotation = this.targetRotation_;\n        var series = [];\n        for (var i = 0; i < animationCount; ++i) {\n            var options = /** @type {AnimationOptions} */ (arguments[i]);\n            var animation = {\n                start: start,\n                complete: false,\n                anchor: options.anchor,\n                duration: options.duration !== undefined ? options.duration : 1000,\n                easing: options.easing || inAndOut,\n                callback: callback,\n            };\n            if (options.center) {\n                animation.sourceCenter = center;\n                animation.targetCenter = options.center.slice();\n                center = animation.targetCenter;\n            }\n            if (options.zoom !== undefined) {\n                animation.sourceResolution = resolution;\n                animation.targetResolution = this.getResolutionForZoom(options.zoom);\n                resolution = animation.targetResolution;\n            }\n            else if (options.resolution) {\n                animation.sourceResolution = resolution;\n                animation.targetResolution = options.resolution;\n                resolution = animation.targetResolution;\n            }\n            if (options.rotation !== undefined) {\n                animation.sourceRotation = rotation;\n                var delta = modulo(options.rotation - rotation + Math.PI, 2 * Math.PI) - Math.PI;\n                animation.targetRotation = rotation + delta;\n                rotation = animation.targetRotation;\n            }\n            // check if animation is a no-op\n            if (isNoopAnimation(animation)) {\n                animation.complete = true;\n                // we still push it onto the series for callback handling\n            }\n            else {\n                start += animation.duration;\n            }\n            series.push(animation);\n        }\n        this.animations_.push(series);\n        this.setHint(ViewHint.ANIMATING, 1);\n        this.updateAnimations_();\n    };\n    /**\n     * Determine if the view is being animated.\n     * @return {boolean} The view is being animated.\n     * @api\n     */\n    View.prototype.getAnimating = function () {\n        return this.hints_[ViewHint.ANIMATING] > 0;\n    };\n    /**\n     * Determine if the user is interacting with the view, such as panning or zooming.\n     * @return {boolean} The view is being interacted with.\n     * @api\n     */\n    View.prototype.getInteracting = function () {\n        return this.hints_[ViewHint.INTERACTING] > 0;\n    };\n    /**\n     * Cancel any ongoing animations.\n     * @api\n     */\n    View.prototype.cancelAnimations = function () {\n        this.setHint(ViewHint.ANIMATING, -this.hints_[ViewHint.ANIMATING]);\n        var anchor;\n        for (var i = 0, ii = this.animations_.length; i < ii; ++i) {\n            var series = this.animations_[i];\n            if (series[0].callback) {\n                animationCallback(series[0].callback, false);\n            }\n            if (!anchor) {\n                for (var j = 0, jj = series.length; j < jj; ++j) {\n                    var animation = series[j];\n                    if (!animation.complete) {\n                        anchor = animation.anchor;\n                        break;\n                    }\n                }\n            }\n        }\n        this.animations_.length = 0;\n        this.cancelAnchor_ = anchor;\n    };\n    /**\n     * Update all animations.\n     */\n    View.prototype.updateAnimations_ = function () {\n        if (this.updateAnimationKey_ !== undefined) {\n            cancelAnimationFrame(this.updateAnimationKey_);\n            this.updateAnimationKey_ = undefined;\n        }\n        if (!this.getAnimating()) {\n            return;\n        }\n        var now = Date.now();\n        var more = false;\n        for (var i = this.animations_.length - 1; i >= 0; --i) {\n            var series = this.animations_[i];\n            var seriesComplete = true;\n            for (var j = 0, jj = series.length; j < jj; ++j) {\n                var animation = series[j];\n                if (animation.complete) {\n                    continue;\n                }\n                var elapsed = now - animation.start;\n                var fraction = animation.duration > 0 ? elapsed / animation.duration : 1;\n                if (fraction >= 1) {\n                    animation.complete = true;\n                    fraction = 1;\n                }\n                else {\n                    seriesComplete = false;\n                }\n                var progress = animation.easing(fraction);\n                if (animation.sourceCenter) {\n                    var x0 = animation.sourceCenter[0];\n                    var y0 = animation.sourceCenter[1];\n                    var x1 = animation.targetCenter[0];\n                    var y1 = animation.targetCenter[1];\n                    var x = x0 + progress * (x1 - x0);\n                    var y = y0 + progress * (y1 - y0);\n                    this.targetCenter_ = [x, y];\n                }\n                if (animation.sourceResolution && animation.targetResolution) {\n                    var resolution = progress === 1\n                        ? animation.targetResolution\n                        : animation.sourceResolution +\n                            progress *\n                                (animation.targetResolution - animation.sourceResolution);\n                    if (animation.anchor) {\n                        var size = this.getViewportSize_(this.getRotation());\n                        var constrainedResolution = this.constraints_.resolution(resolution, 0, size, true);\n                        this.targetCenter_ = this.calculateCenterZoom(constrainedResolution, animation.anchor);\n                    }\n                    this.targetResolution_ = resolution;\n                    this.applyTargetState_(true);\n                }\n                if (animation.sourceRotation !== undefined &&\n                    animation.targetRotation !== undefined) {\n                    var rotation = progress === 1\n                        ? modulo(animation.targetRotation + Math.PI, 2 * Math.PI) -\n                            Math.PI\n                        : animation.sourceRotation +\n                            progress *\n                                (animation.targetRotation - animation.sourceRotation);\n                    if (animation.anchor) {\n                        var constrainedRotation = this.constraints_.rotation(rotation, true);\n                        this.targetCenter_ = this.calculateCenterRotate(constrainedRotation, animation.anchor);\n                    }\n                    this.targetRotation_ = rotation;\n                }\n                this.applyTargetState_(true);\n                more = true;\n                if (!animation.complete) {\n                    break;\n                }\n            }\n            if (seriesComplete) {\n                this.animations_[i] = null;\n                this.setHint(ViewHint.ANIMATING, -1);\n                var callback = series[0].callback;\n                if (callback) {\n                    animationCallback(callback, true);\n                }\n            }\n        }\n        // prune completed series\n        this.animations_ = this.animations_.filter(Boolean);\n        if (more && this.updateAnimationKey_ === undefined) {\n            this.updateAnimationKey_ = requestAnimationFrame(this.updateAnimations_.bind(this));\n        }\n    };\n    /**\n     * @param {number} rotation Target rotation.\n     * @param {import(\"./coordinate.js\").Coordinate} anchor Rotation anchor.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} Center for rotation and anchor.\n     */\n    View.prototype.calculateCenterRotate = function (rotation, anchor) {\n        var center;\n        var currentCenter = this.getCenterInternal();\n        if (currentCenter !== undefined) {\n            center = [currentCenter[0] - anchor[0], currentCenter[1] - anchor[1]];\n            rotateCoordinate(center, rotation - this.getRotation());\n            addCoordinate(center, anchor);\n        }\n        return center;\n    };\n    /**\n     * @param {number} resolution Target resolution.\n     * @param {import(\"./coordinate.js\").Coordinate} anchor Zoom anchor.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} Center for resolution and anchor.\n     */\n    View.prototype.calculateCenterZoom = function (resolution, anchor) {\n        var center;\n        var currentCenter = this.getCenterInternal();\n        var currentResolution = this.getResolution();\n        if (currentCenter !== undefined && currentResolution !== undefined) {\n            var x = anchor[0] -\n                (resolution * (anchor[0] - currentCenter[0])) / currentResolution;\n            var y = anchor[1] -\n                (resolution * (anchor[1] - currentCenter[1])) / currentResolution;\n            center = [x, y];\n        }\n        return center;\n    };\n    /**\n     * Returns the current viewport size.\n     * @private\n     * @param {number} [opt_rotation] Take into account the rotation of the viewport when giving the size\n     * @return {import(\"./size.js\").Size} Viewport size or `[100, 100]` when no viewport is found.\n     */\n    View.prototype.getViewportSize_ = function (opt_rotation) {\n        var size = this.viewportSize_;\n        if (opt_rotation) {\n            var w = size[0];\n            var h = size[1];\n            return [\n                Math.abs(w * Math.cos(opt_rotation)) +\n                    Math.abs(h * Math.sin(opt_rotation)),\n                Math.abs(w * Math.sin(opt_rotation)) +\n                    Math.abs(h * Math.cos(opt_rotation)),\n            ];\n        }\n        else {\n            return size;\n        }\n    };\n    /**\n     * Stores the viewport size on the view. The viewport size is not read every time from the DOM\n     * to avoid performance hit and layout reflow.\n     * This should be done on map size change.\n     * Note: the constraints are not resolved during an animation to avoid stopping it\n     * @param {import(\"./size.js\").Size} [opt_size] Viewport size; if undefined, [100, 100] is assumed\n     */\n    View.prototype.setViewportSize = function (opt_size) {\n        this.viewportSize_ = Array.isArray(opt_size)\n            ? opt_size.slice()\n            : [100, 100];\n        if (!this.getAnimating()) {\n            this.resolveConstraints(0);\n        }\n    };\n    /**\n     * Get the view center.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} The center of the view.\n     * @observable\n     * @api\n     */\n    View.prototype.getCenter = function () {\n        var center = this.getCenterInternal();\n        if (!center) {\n            return center;\n        }\n        return toUserCoordinate(center, this.getProjection());\n    };\n    /**\n     * Get the view center without transforming to user projection.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} The center of the view.\n     */\n    View.prototype.getCenterInternal = function () {\n        return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (this.get(ViewProperty.CENTER));\n    };\n    /**\n     * @return {Constraints} Constraints.\n     */\n    View.prototype.getConstraints = function () {\n        return this.constraints_;\n    };\n    /**\n     * @return {boolean} Resolution constraint is set\n     */\n    View.prototype.getConstrainResolution = function () {\n        return this.options_.constrainResolution;\n    };\n    /**\n     * @param {Array<number>} [opt_hints] Destination array.\n     * @return {Array<number>} Hint.\n     */\n    View.prototype.getHints = function (opt_hints) {\n        if (opt_hints !== undefined) {\n            opt_hints[0] = this.hints_[0];\n            opt_hints[1] = this.hints_[1];\n            return opt_hints;\n        }\n        else {\n            return this.hints_.slice();\n        }\n    };\n    /**\n     * Calculate the extent for the current view state and the passed size.\n     * The size is the pixel dimensions of the box into which the calculated extent\n     * should fit. In most cases you want to get the extent of the entire map,\n     * that is `map.getSize()`.\n     * @param {import(\"./size.js\").Size} [opt_size] Box pixel size. If not provided, the size\n     * of the map that uses this view will be used.\n     * @return {import(\"./extent.js\").Extent} Extent.\n     * @api\n     */\n    View.prototype.calculateExtent = function (opt_size) {\n        var extent = this.calculateExtentInternal(opt_size);\n        return toUserExtent(extent, this.getProjection());\n    };\n    /**\n     * @param {import(\"./size.js\").Size} [opt_size] Box pixel size. If not provided,\n     * the map's last known viewport size will be used.\n     * @return {import(\"./extent.js\").Extent} Extent.\n     */\n    View.prototype.calculateExtentInternal = function (opt_size) {\n        var size = opt_size || this.getViewportSizeMinusPadding_();\n        var center = /** @type {!import(\"./coordinate.js\").Coordinate} */ (this.getCenterInternal());\n        assert(center, 1); // The view center is not defined\n        var resolution = /** @type {!number} */ (this.getResolution());\n        assert(resolution !== undefined, 2); // The view resolution is not defined\n        var rotation = /** @type {!number} */ (this.getRotation());\n        assert(rotation !== undefined, 3); // The view rotation is not defined\n        return getForViewAndSize(center, resolution, rotation, size);\n    };\n    /**\n     * Get the maximum resolution of the view.\n     * @return {number} The maximum resolution of the view.\n     * @api\n     */\n    View.prototype.getMaxResolution = function () {\n        return this.maxResolution_;\n    };\n    /**\n     * Get the minimum resolution of the view.\n     * @return {number} The minimum resolution of the view.\n     * @api\n     */\n    View.prototype.getMinResolution = function () {\n        return this.minResolution_;\n    };\n    /**\n     * Get the maximum zoom level for the view.\n     * @return {number} The maximum zoom level.\n     * @api\n     */\n    View.prototype.getMaxZoom = function () {\n        return /** @type {number} */ (this.getZoomForResolution(this.minResolution_));\n    };\n    /**\n     * Set a new maximum zoom level for the view.\n     * @param {number} zoom The maximum zoom level.\n     * @api\n     */\n    View.prototype.setMaxZoom = function (zoom) {\n        this.applyOptions_(this.getUpdatedOptions_({ maxZoom: zoom }));\n    };\n    /**\n     * Get the minimum zoom level for the view.\n     * @return {number} The minimum zoom level.\n     * @api\n     */\n    View.prototype.getMinZoom = function () {\n        return /** @type {number} */ (this.getZoomForResolution(this.maxResolution_));\n    };\n    /**\n     * Set a new minimum zoom level for the view.\n     * @param {number} zoom The minimum zoom level.\n     * @api\n     */\n    View.prototype.setMinZoom = function (zoom) {\n        this.applyOptions_(this.getUpdatedOptions_({ minZoom: zoom }));\n    };\n    /**\n     * Set whether the view should allow intermediary zoom levels.\n     * @param {boolean} enabled Whether the resolution is constrained.\n     * @api\n     */\n    View.prototype.setConstrainResolution = function (enabled) {\n        this.applyOptions_(this.getUpdatedOptions_({ constrainResolution: enabled }));\n    };\n    /**\n     * Get the view projection.\n     * @return {import(\"./proj/Projection.js\").default} The projection of the view.\n     * @api\n     */\n    View.prototype.getProjection = function () {\n        return this.projection_;\n    };\n    /**\n     * Get the view resolution.\n     * @return {number|undefined} The resolution of the view.\n     * @observable\n     * @api\n     */\n    View.prototype.getResolution = function () {\n        return /** @type {number|undefined} */ (this.get(ViewProperty.RESOLUTION));\n    };\n    /**\n     * Get the resolutions for the view. This returns the array of resolutions\n     * passed to the constructor of the View, or undefined if none were given.\n     * @return {Array<number>|undefined} The resolutions of the view.\n     * @api\n     */\n    View.prototype.getResolutions = function () {\n        return this.resolutions_;\n    };\n    /**\n     * Get the resolution for a provided extent (in map units) and size (in pixels).\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {import(\"./size.js\").Size} [opt_size] Box pixel size.\n     * @return {number} The resolution at which the provided extent will render at\n     *     the given size.\n     * @api\n     */\n    View.prototype.getResolutionForExtent = function (extent, opt_size) {\n        return this.getResolutionForExtentInternal(fromUserExtent(extent, this.getProjection()), opt_size);\n    };\n    /**\n     * Get the resolution for a provided extent (in map units) and size (in pixels).\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {import(\"./size.js\").Size} [opt_size] Box pixel size.\n     * @return {number} The resolution at which the provided extent will render at\n     *     the given size.\n     */\n    View.prototype.getResolutionForExtentInternal = function (extent, opt_size) {\n        var size = opt_size || this.getViewportSizeMinusPadding_();\n        var xResolution = getWidth(extent) / size[0];\n        var yResolution = getHeight(extent) / size[1];\n        return Math.max(xResolution, yResolution);\n    };\n    /**\n     * Return a function that returns a value between 0 and 1 for a\n     * resolution. Exponential scaling is assumed.\n     * @param {number} [opt_power] Power.\n     * @return {function(number): number} Resolution for value function.\n     */\n    View.prototype.getResolutionForValueFunction = function (opt_power) {\n        var power = opt_power || 2;\n        var maxResolution = this.getConstrainedResolution(this.maxResolution_);\n        var minResolution = this.minResolution_;\n        var max = Math.log(maxResolution / minResolution) / Math.log(power);\n        return (\n        /**\n         * @param {number} value Value.\n         * @return {number} Resolution.\n         */\n        function (value) {\n            var resolution = maxResolution / Math.pow(power, value * max);\n            return resolution;\n        });\n    };\n    /**\n     * Get the view rotation.\n     * @return {number} The rotation of the view in radians.\n     * @observable\n     * @api\n     */\n    View.prototype.getRotation = function () {\n        return /** @type {number} */ (this.get(ViewProperty.ROTATION));\n    };\n    /**\n     * Return a function that returns a resolution for a value between\n     * 0 and 1. Exponential scaling is assumed.\n     * @param {number} [opt_power] Power.\n     * @return {function(number): number} Value for resolution function.\n     */\n    View.prototype.getValueForResolutionFunction = function (opt_power) {\n        var logPower = Math.log(opt_power || 2);\n        var maxResolution = this.getConstrainedResolution(this.maxResolution_);\n        var minResolution = this.minResolution_;\n        var max = Math.log(maxResolution / minResolution) / logPower;\n        return (\n        /**\n         * @param {number} resolution Resolution.\n         * @return {number} Value.\n         */\n        function (resolution) {\n            var value = Math.log(maxResolution / resolution) / logPower / max;\n            return value;\n        });\n    };\n    /**\n     * Returns the size of the viewport minus padding.\n     * @private\n     * @param {number} [opt_rotation] Take into account the rotation of the viewport when giving the size\n     * @return {import(\"./size.js\").Size} Viewport size reduced by the padding.\n     */\n    View.prototype.getViewportSizeMinusPadding_ = function (opt_rotation) {\n        var size = this.getViewportSize_(opt_rotation);\n        var padding = this.padding_;\n        if (padding) {\n            size = [\n                size[0] - padding[1] - padding[3],\n                size[1] - padding[0] - padding[2],\n            ];\n        }\n        return size;\n    };\n    /**\n     * @return {State} View state.\n     */\n    View.prototype.getState = function () {\n        var projection = this.getProjection();\n        var resolution = /** @type {number} */ (this.getResolution());\n        var rotation = this.getRotation();\n        var center = /** @type {import(\"./coordinate.js\").Coordinate} */ (this.getCenterInternal());\n        var padding = this.padding_;\n        if (padding) {\n            var reducedSize = this.getViewportSizeMinusPadding_();\n            center = calculateCenterOn(center, this.getViewportSize_(), [reducedSize[0] / 2 + padding[3], reducedSize[1] / 2 + padding[0]], resolution, rotation);\n        }\n        return {\n            center: center.slice(0),\n            projection: projection !== undefined ? projection : null,\n            resolution: resolution,\n            rotation: rotation,\n            zoom: this.getZoom(),\n        };\n    };\n    /**\n     * Get the current zoom level. This method may return non-integer zoom levels\n     * if the view does not constrain the resolution, or if an interaction or\n     * animation is underway.\n     * @return {number|undefined} Zoom.\n     * @api\n     */\n    View.prototype.getZoom = function () {\n        var zoom;\n        var resolution = this.getResolution();\n        if (resolution !== undefined) {\n            zoom = this.getZoomForResolution(resolution);\n        }\n        return zoom;\n    };\n    /**\n     * Get the zoom level for a resolution.\n     * @param {number} resolution The resolution.\n     * @return {number|undefined} The zoom level for the provided resolution.\n     * @api\n     */\n    View.prototype.getZoomForResolution = function (resolution) {\n        var offset = this.minZoom_ || 0;\n        var max, zoomFactor;\n        if (this.resolutions_) {\n            var nearest = linearFindNearest(this.resolutions_, resolution, 1);\n            offset = nearest;\n            max = this.resolutions_[nearest];\n            if (nearest == this.resolutions_.length - 1) {\n                zoomFactor = 2;\n            }\n            else {\n                zoomFactor = max / this.resolutions_[nearest + 1];\n            }\n        }\n        else {\n            max = this.maxResolution_;\n            zoomFactor = this.zoomFactor_;\n        }\n        return offset + Math.log(max / resolution) / Math.log(zoomFactor);\n    };\n    /**\n     * Get the resolution for a zoom level.\n     * @param {number} zoom Zoom level.\n     * @return {number} The view resolution for the provided zoom level.\n     * @api\n     */\n    View.prototype.getResolutionForZoom = function (zoom) {\n        if (this.resolutions_) {\n            if (this.resolutions_.length <= 1) {\n                return 0;\n            }\n            var baseLevel = clamp(Math.floor(zoom), 0, this.resolutions_.length - 2);\n            var zoomFactor = this.resolutions_[baseLevel] / this.resolutions_[baseLevel + 1];\n            return (this.resolutions_[baseLevel] /\n                Math.pow(zoomFactor, clamp(zoom - baseLevel, 0, 1)));\n        }\n        else {\n            return (this.maxResolution_ / Math.pow(this.zoomFactor_, zoom - this.minZoom_));\n        }\n    };\n    /**\n     * Fit the given geometry or extent based on the given map size and border.\n     * The size is pixel dimensions of the box to fit the extent into.\n     * In most cases you will want to use the map size, that is `map.getSize()`.\n     * Takes care of the map angle.\n     * @param {import(\"./geom/SimpleGeometry.js\").default|import(\"./extent.js\").Extent} geometryOrExtent The geometry or\n     *     extent to fit the view to.\n     * @param {FitOptions} [opt_options] Options.\n     * @api\n     */\n    View.prototype.fit = function (geometryOrExtent, opt_options) {\n        /** @type {import(\"./geom/SimpleGeometry.js\").default} */\n        var geometry;\n        assert(Array.isArray(geometryOrExtent) ||\n            typeof ( /** @type {?} */(geometryOrExtent).getSimplifiedGeometry) ===\n                'function', 24); // Invalid extent or geometry provided as `geometry`\n        if (Array.isArray(geometryOrExtent)) {\n            assert(!isEmpty(geometryOrExtent), 25); // Cannot fit empty extent provided as `geometry`\n            var extent = fromUserExtent(geometryOrExtent, this.getProjection());\n            geometry = polygonFromExtent(extent);\n        }\n        else if (geometryOrExtent.getType() === GeometryType.CIRCLE) {\n            var extent = fromUserExtent(geometryOrExtent.getExtent(), this.getProjection());\n            geometry = polygonFromExtent(extent);\n            geometry.rotate(this.getRotation(), getCenter(extent));\n        }\n        else {\n            var userProjection = getUserProjection();\n            if (userProjection) {\n                geometry = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometryOrExtent\n                    .clone()\n                    .transform(userProjection, this.getProjection()));\n            }\n            else {\n                geometry = geometryOrExtent;\n            }\n        }\n        this.fitInternal(geometry, opt_options);\n    };\n    /**\n     * Calculate rotated extent\n     * @param {import(\"./geom/SimpleGeometry.js\").default} geometry The geometry.\n     * @return {import(\"./extent\").Extent} The rotated extent for the geometry.\n     */\n    View.prototype.rotatedExtentForGeometry = function (geometry) {\n        var rotation = this.getRotation();\n        var cosAngle = Math.cos(rotation);\n        var sinAngle = Math.sin(-rotation);\n        var coords = geometry.getFlatCoordinates();\n        var stride = geometry.getStride();\n        var minRotX = +Infinity;\n        var minRotY = +Infinity;\n        var maxRotX = -Infinity;\n        var maxRotY = -Infinity;\n        for (var i = 0, ii = coords.length; i < ii; i += stride) {\n            var rotX = coords[i] * cosAngle - coords[i + 1] * sinAngle;\n            var rotY = coords[i] * sinAngle + coords[i + 1] * cosAngle;\n            minRotX = Math.min(minRotX, rotX);\n            minRotY = Math.min(minRotY, rotY);\n            maxRotX = Math.max(maxRotX, rotX);\n            maxRotY = Math.max(maxRotY, rotY);\n        }\n        return [minRotX, minRotY, maxRotX, maxRotY];\n    };\n    /**\n     * @param {import(\"./geom/SimpleGeometry.js\").default} geometry The geometry.\n     * @param {FitOptions} [opt_options] Options.\n     */\n    View.prototype.fitInternal = function (geometry, opt_options) {\n        var options = opt_options || {};\n        var size = options.size;\n        if (!size) {\n            size = this.getViewportSizeMinusPadding_();\n        }\n        var padding = options.padding !== undefined ? options.padding : [0, 0, 0, 0];\n        var nearest = options.nearest !== undefined ? options.nearest : false;\n        var minResolution;\n        if (options.minResolution !== undefined) {\n            minResolution = options.minResolution;\n        }\n        else if (options.maxZoom !== undefined) {\n            minResolution = this.getResolutionForZoom(options.maxZoom);\n        }\n        else {\n            minResolution = 0;\n        }\n        var rotatedExtent = this.rotatedExtentForGeometry(geometry);\n        // calculate resolution\n        var resolution = this.getResolutionForExtentInternal(rotatedExtent, [\n            size[0] - padding[1] - padding[3],\n            size[1] - padding[0] - padding[2],\n        ]);\n        resolution = isNaN(resolution)\n            ? minResolution\n            : Math.max(resolution, minResolution);\n        resolution = this.getConstrainedResolution(resolution, nearest ? 0 : 1);\n        // calculate center\n        var rotation = this.getRotation();\n        var sinAngle = Math.sin(rotation);\n        var cosAngle = Math.cos(rotation);\n        var centerRot = getCenter(rotatedExtent);\n        centerRot[0] += ((padding[1] - padding[3]) / 2) * resolution;\n        centerRot[1] += ((padding[0] - padding[2]) / 2) * resolution;\n        var centerX = centerRot[0] * cosAngle - centerRot[1] * sinAngle;\n        var centerY = centerRot[1] * cosAngle + centerRot[0] * sinAngle;\n        var center = this.getConstrainedCenter([centerX, centerY], resolution);\n        var callback = options.callback ? options.callback : VOID;\n        if (options.duration !== undefined) {\n            this.animateInternal({\n                resolution: resolution,\n                center: center,\n                duration: options.duration,\n                easing: options.easing,\n            }, callback);\n        }\n        else {\n            this.targetResolution_ = resolution;\n            this.targetCenter_ = center;\n            this.applyTargetState_(false, true);\n            animationCallback(callback, true);\n        }\n    };\n    /**\n     * Center on coordinate and view position.\n     * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"./size.js\").Size} size Box pixel size.\n     * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n     * @api\n     */\n    View.prototype.centerOn = function (coordinate, size, position) {\n        this.centerOnInternal(fromUserCoordinate(coordinate, this.getProjection()), size, position);\n    };\n    /**\n     * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"./size.js\").Size} size Box pixel size.\n     * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n     */\n    View.prototype.centerOnInternal = function (coordinate, size, position) {\n        this.setCenterInternal(calculateCenterOn(coordinate, size, position, this.getResolution(), this.getRotation()));\n    };\n    /**\n     * Calculates the shift between map and viewport center.\n     * @param {import(\"./coordinate.js\").Coordinate} center Center.\n     * @param {number} resolution Resolution.\n     * @param {number} rotation Rotation.\n     * @param {import(\"./size.js\").Size} size Size.\n     * @return {Array<number>|undefined} Center shift.\n     */\n    View.prototype.calculateCenterShift = function (center, resolution, rotation, size) {\n        var centerShift;\n        var padding = this.padding_;\n        if (padding && center) {\n            var reducedSize = this.getViewportSizeMinusPadding_(-rotation);\n            var shiftedCenter = calculateCenterOn(center, size, [reducedSize[0] / 2 + padding[3], reducedSize[1] / 2 + padding[0]], resolution, rotation);\n            centerShift = [\n                center[0] - shiftedCenter[0],\n                center[1] - shiftedCenter[1],\n            ];\n        }\n        return centerShift;\n    };\n    /**\n     * @return {boolean} Is defined.\n     */\n    View.prototype.isDef = function () {\n        return !!this.getCenterInternal() && this.getResolution() !== undefined;\n    };\n    /**\n     * Adds relative coordinates to the center of the view. Any extent constraint will apply.\n     * @param {import(\"./coordinate.js\").Coordinate} deltaCoordinates Relative value to add.\n     * @api\n     */\n    View.prototype.adjustCenter = function (deltaCoordinates) {\n        var center = toUserCoordinate(this.targetCenter_, this.getProjection());\n        this.setCenter([\n            center[0] + deltaCoordinates[0],\n            center[1] + deltaCoordinates[1],\n        ]);\n    };\n    /**\n     * Adds relative coordinates to the center of the view. Any extent constraint will apply.\n     * @param {import(\"./coordinate.js\").Coordinate} deltaCoordinates Relative value to add.\n     */\n    View.prototype.adjustCenterInternal = function (deltaCoordinates) {\n        var center = this.targetCenter_;\n        this.setCenterInternal([\n            center[0] + deltaCoordinates[0],\n            center[1] + deltaCoordinates[1],\n        ]);\n    };\n    /**\n     * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution\n     * constraint will apply.\n     * @param {number} ratio The ratio to apply on the view resolution.\n     * @param {import(\"./coordinate.js\").Coordinate} [opt_anchor] The origin of the transformation.\n     * @api\n     */\n    View.prototype.adjustResolution = function (ratio, opt_anchor) {\n        var anchor = opt_anchor && fromUserCoordinate(opt_anchor, this.getProjection());\n        this.adjustResolutionInternal(ratio, anchor);\n    };\n    /**\n     * Multiply the view resolution by a ratio, optionally using an anchor. Any resolution\n     * constraint will apply.\n     * @param {number} ratio The ratio to apply on the view resolution.\n     * @param {import(\"./coordinate.js\").Coordinate} [opt_anchor] The origin of the transformation.\n     */\n    View.prototype.adjustResolutionInternal = function (ratio, opt_anchor) {\n        var isMoving = this.getAnimating() || this.getInteracting();\n        var size = this.getViewportSize_(this.getRotation());\n        var newResolution = this.constraints_.resolution(this.targetResolution_ * ratio, 0, size, isMoving);\n        if (opt_anchor) {\n            this.targetCenter_ = this.calculateCenterZoom(newResolution, opt_anchor);\n        }\n        this.targetResolution_ *= ratio;\n        this.applyTargetState_();\n    };\n    /**\n     * Adds a value to the view zoom level, optionally using an anchor. Any resolution\n     * constraint will apply.\n     * @param {number} delta Relative value to add to the zoom level.\n     * @param {import(\"./coordinate.js\").Coordinate} [opt_anchor] The origin of the transformation.\n     * @api\n     */\n    View.prototype.adjustZoom = function (delta, opt_anchor) {\n        this.adjustResolution(Math.pow(this.zoomFactor_, -delta), opt_anchor);\n    };\n    /**\n     * Adds a value to the view rotation, optionally using an anchor. Any rotation\n     * constraint will apply.\n     * @param {number} delta Relative value to add to the zoom rotation, in radians.\n     * @param {import(\"./coordinate.js\").Coordinate} [opt_anchor] The rotation center.\n     * @api\n     */\n    View.prototype.adjustRotation = function (delta, opt_anchor) {\n        if (opt_anchor) {\n            opt_anchor = fromUserCoordinate(opt_anchor, this.getProjection());\n        }\n        this.adjustRotationInternal(delta, opt_anchor);\n    };\n    /**\n     * @param {number} delta Relative value to add to the zoom rotation, in radians.\n     * @param {import(\"./coordinate.js\").Coordinate} [opt_anchor] The rotation center.\n     */\n    View.prototype.adjustRotationInternal = function (delta, opt_anchor) {\n        var isMoving = this.getAnimating() || this.getInteracting();\n        var newRotation = this.constraints_.rotation(this.targetRotation_ + delta, isMoving);\n        if (opt_anchor) {\n            this.targetCenter_ = this.calculateCenterRotate(newRotation, opt_anchor);\n        }\n        this.targetRotation_ += delta;\n        this.applyTargetState_();\n    };\n    /**\n     * Set the center of the current view. Any extent constraint will apply.\n     * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n     * @observable\n     * @api\n     */\n    View.prototype.setCenter = function (center) {\n        this.setCenterInternal(fromUserCoordinate(center, this.getProjection()));\n    };\n    /**\n     * Set the center using the view projection (not the user projection).\n     * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n     */\n    View.prototype.setCenterInternal = function (center) {\n        this.targetCenter_ = center;\n        this.applyTargetState_();\n    };\n    /**\n     * @param {import(\"./ViewHint.js\").default} hint Hint.\n     * @param {number} delta Delta.\n     * @return {number} New value.\n     */\n    View.prototype.setHint = function (hint, delta) {\n        this.hints_[hint] += delta;\n        this.changed();\n        return this.hints_[hint];\n    };\n    /**\n     * Set the resolution for this view. Any resolution constraint will apply.\n     * @param {number|undefined} resolution The resolution of the view.\n     * @observable\n     * @api\n     */\n    View.prototype.setResolution = function (resolution) {\n        this.targetResolution_ = resolution;\n        this.applyTargetState_();\n    };\n    /**\n     * Set the rotation for this view. Any rotation constraint will apply.\n     * @param {number} rotation The rotation of the view in radians.\n     * @observable\n     * @api\n     */\n    View.prototype.setRotation = function (rotation) {\n        this.targetRotation_ = rotation;\n        this.applyTargetState_();\n    };\n    /**\n     * Zoom to a specific zoom level. Any resolution constrain will apply.\n     * @param {number} zoom Zoom level.\n     * @api\n     */\n    View.prototype.setZoom = function (zoom) {\n        this.setResolution(this.getResolutionForZoom(zoom));\n    };\n    /**\n     * Recompute rotation/resolution/center based on target values.\n     * Note: we have to compute rotation first, then resolution and center considering that\n     * parameters can influence one another in case a view extent constraint is present.\n     * @param {boolean} [opt_doNotCancelAnims] Do not cancel animations.\n     * @param {boolean} [opt_forceMoving] Apply constraints as if the view is moving.\n     * @private\n     */\n    View.prototype.applyTargetState_ = function (opt_doNotCancelAnims, opt_forceMoving) {\n        var isMoving = this.getAnimating() || this.getInteracting() || opt_forceMoving;\n        // compute rotation\n        var newRotation = this.constraints_.rotation(this.targetRotation_, isMoving);\n        var size = this.getViewportSize_(newRotation);\n        var newResolution = this.constraints_.resolution(this.targetResolution_, 0, size, isMoving);\n        var newCenter = this.constraints_.center(this.targetCenter_, newResolution, size, isMoving, this.calculateCenterShift(this.targetCenter_, newResolution, newRotation, size));\n        if (this.get(ViewProperty.ROTATION) !== newRotation) {\n            this.set(ViewProperty.ROTATION, newRotation);\n        }\n        if (this.get(ViewProperty.RESOLUTION) !== newResolution) {\n            this.set(ViewProperty.RESOLUTION, newResolution);\n        }\n        if (!this.get(ViewProperty.CENTER) ||\n            !equals(this.get(ViewProperty.CENTER), newCenter)) {\n            this.set(ViewProperty.CENTER, newCenter);\n        }\n        if (this.getAnimating() && !opt_doNotCancelAnims) {\n            this.cancelAnimations();\n        }\n        this.cancelAnchor_ = undefined;\n    };\n    /**\n     * If any constraints need to be applied, an animation will be triggered.\n     * This is typically done on interaction end.\n     * Note: calling this with a duration of 0 will apply the constrained values straight away,\n     * without animation.\n     * @param {number} [opt_duration] The animation duration in ms.\n     * @param {number} [opt_resolutionDirection] Which direction to zoom.\n     * @param {import(\"./coordinate.js\").Coordinate} [opt_anchor] The origin of the transformation.\n     */\n    View.prototype.resolveConstraints = function (opt_duration, opt_resolutionDirection, opt_anchor) {\n        var duration = opt_duration !== undefined ? opt_duration : 200;\n        var direction = opt_resolutionDirection || 0;\n        var newRotation = this.constraints_.rotation(this.targetRotation_);\n        var size = this.getViewportSize_(newRotation);\n        var newResolution = this.constraints_.resolution(this.targetResolution_, direction, size);\n        var newCenter = this.constraints_.center(this.targetCenter_, newResolution, size, false, this.calculateCenterShift(this.targetCenter_, newResolution, newRotation, size));\n        if (duration === 0 && !this.cancelAnchor_) {\n            this.targetResolution_ = newResolution;\n            this.targetRotation_ = newRotation;\n            this.targetCenter_ = newCenter;\n            this.applyTargetState_();\n            return;\n        }\n        var anchor = opt_anchor || (duration === 0 ? this.cancelAnchor_ : undefined);\n        this.cancelAnchor_ = undefined;\n        if (this.getResolution() !== newResolution ||\n            this.getRotation() !== newRotation ||\n            !this.getCenterInternal() ||\n            !equals(this.getCenterInternal(), newCenter)) {\n            if (this.getAnimating()) {\n                this.cancelAnimations();\n            }\n            this.animateInternal({\n                rotation: newRotation,\n                center: newCenter,\n                resolution: newResolution,\n                duration: duration,\n                easing: easeOut,\n                anchor: anchor,\n            });\n        }\n    };\n    /**\n     * Notify the View that an interaction has started.\n     * The view state will be resolved to a stable one if needed\n     * (depending on its constraints).\n     * @api\n     */\n    View.prototype.beginInteraction = function () {\n        this.resolveConstraints(0);\n        this.setHint(ViewHint.INTERACTING, 1);\n    };\n    /**\n     * Notify the View that an interaction has ended. The view state will be resolved\n     * to a stable one if needed (depending on its constraints).\n     * @param {number} [opt_duration] Animation duration in ms.\n     * @param {number} [opt_resolutionDirection] Which direction to zoom.\n     * @param {import(\"./coordinate.js\").Coordinate} [opt_anchor] The origin of the transformation.\n     * @api\n     */\n    View.prototype.endInteraction = function (opt_duration, opt_resolutionDirection, opt_anchor) {\n        var anchor = opt_anchor && fromUserCoordinate(opt_anchor, this.getProjection());\n        this.endInteractionInternal(opt_duration, opt_resolutionDirection, anchor);\n    };\n    /**\n     * Notify the View that an interaction has ended. The view state will be resolved\n     * to a stable one if needed (depending on its constraints).\n     * @param {number} [opt_duration] Animation duration in ms.\n     * @param {number} [opt_resolutionDirection] Which direction to zoom.\n     * @param {import(\"./coordinate.js\").Coordinate} [opt_anchor] The origin of the transformation.\n     */\n    View.prototype.endInteractionInternal = function (opt_duration, opt_resolutionDirection, opt_anchor) {\n        this.setHint(ViewHint.INTERACTING, -1);\n        this.resolveConstraints(opt_duration, opt_resolutionDirection, opt_anchor);\n    };\n    /**\n     * Get a valid position for the view center according to the current constraints.\n     * @param {import(\"./coordinate.js\").Coordinate|undefined} targetCenter Target center position.\n     * @param {number} [opt_targetResolution] Target resolution. If not supplied, the current one will be used.\n     * This is useful to guess a valid center position at a different zoom level.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} Valid center position.\n     */\n    View.prototype.getConstrainedCenter = function (targetCenter, opt_targetResolution) {\n        var size = this.getViewportSize_(this.getRotation());\n        return this.constraints_.center(targetCenter, opt_targetResolution || this.getResolution(), size);\n    };\n    /**\n     * Get a valid zoom level according to the current view constraints.\n     * @param {number|undefined} targetZoom Target zoom.\n     * @param {number} [opt_direction=0] Indicate which resolution should be used\n     * by a renderer if the view resolution does not match any resolution of the tile source.\n     * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n     * will be used. If -1, the nearest higher resolution will be used.\n     * @return {number|undefined} Valid zoom level.\n     */\n    View.prototype.getConstrainedZoom = function (targetZoom, opt_direction) {\n        var targetRes = this.getResolutionForZoom(targetZoom);\n        return this.getZoomForResolution(this.getConstrainedResolution(targetRes, opt_direction));\n    };\n    /**\n     * Get a valid resolution according to the current view constraints.\n     * @param {number|undefined} targetResolution Target resolution.\n     * @param {number} [opt_direction=0] Indicate which resolution should be used\n     * by a renderer if the view resolution does not match any resolution of the tile source.\n     * If 0, the nearest resolution will be used. If 1, the nearest lower resolution\n     * will be used. If -1, the nearest higher resolution will be used.\n     * @return {number|undefined} Valid resolution.\n     */\n    View.prototype.getConstrainedResolution = function (targetResolution, opt_direction) {\n        var direction = opt_direction || 0;\n        var size = this.getViewportSize_(this.getRotation());\n        return this.constraints_.resolution(targetResolution, direction, size);\n    };\n    return View;\n}(BaseObject));\n/**\n * @param {Function} callback Callback.\n * @param {*} returnValue Return value.\n */\nfunction animationCallback(callback, returnValue) {\n    setTimeout(function () {\n        callback(returnValue);\n    }, 0);\n}\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./centerconstraint.js\").Type} The constraint.\n */\nexport function createCenterConstraint(options) {\n    if (options.extent !== undefined) {\n        var smooth = options.smoothExtentConstraint !== undefined\n            ? options.smoothExtentConstraint\n            : true;\n        return createExtent(options.extent, options.constrainOnlyCenter, smooth);\n    }\n    var projection = createProjection(options.projection, 'EPSG:3857');\n    if (options.multiWorld !== true && projection.isGlobal()) {\n        var extent = projection.getExtent().slice();\n        extent[0] = -Infinity;\n        extent[2] = Infinity;\n        return createExtent(extent, false, false);\n    }\n    return centerNone;\n}\n/**\n * @param {ViewOptions} options View options.\n * @return {{constraint: import(\"./resolutionconstraint.js\").Type, maxResolution: number,\n *     minResolution: number, minZoom: number, zoomFactor: number}} The constraint.\n */\nexport function createResolutionConstraint(options) {\n    var resolutionConstraint;\n    var maxResolution;\n    var minResolution;\n    // TODO: move these to be ol constants\n    // see https://github.com/openlayers/openlayers/issues/2076\n    var defaultMaxZoom = 28;\n    var defaultZoomFactor = 2;\n    var minZoom = options.minZoom !== undefined ? options.minZoom : DEFAULT_MIN_ZOOM;\n    var maxZoom = options.maxZoom !== undefined ? options.maxZoom : defaultMaxZoom;\n    var zoomFactor = options.zoomFactor !== undefined ? options.zoomFactor : defaultZoomFactor;\n    var multiWorld = options.multiWorld !== undefined ? options.multiWorld : false;\n    var smooth = options.smoothResolutionConstraint !== undefined\n        ? options.smoothResolutionConstraint\n        : true;\n    var showFullExtent = options.showFullExtent !== undefined ? options.showFullExtent : false;\n    var projection = createProjection(options.projection, 'EPSG:3857');\n    var projExtent = projection.getExtent();\n    var constrainOnlyCenter = options.constrainOnlyCenter;\n    var extent = options.extent;\n    if (!multiWorld && !extent && projection.isGlobal()) {\n        constrainOnlyCenter = false;\n        extent = projExtent;\n    }\n    if (options.resolutions !== undefined) {\n        var resolutions = options.resolutions;\n        maxResolution = resolutions[minZoom];\n        minResolution =\n            resolutions[maxZoom] !== undefined\n                ? resolutions[maxZoom]\n                : resolutions[resolutions.length - 1];\n        if (options.constrainResolution) {\n            resolutionConstraint = createSnapToResolutions(resolutions, smooth, !constrainOnlyCenter && extent, showFullExtent);\n        }\n        else {\n            resolutionConstraint = createMinMaxResolution(maxResolution, minResolution, smooth, !constrainOnlyCenter && extent, showFullExtent);\n        }\n    }\n    else {\n        // calculate the default min and max resolution\n        var size = !projExtent\n            ? // use an extent that can fit the whole world if need be\n                (360 * METERS_PER_UNIT[Units.DEGREES]) / projection.getMetersPerUnit()\n            : Math.max(getWidth(projExtent), getHeight(projExtent));\n        var defaultMaxResolution = size / DEFAULT_TILE_SIZE / Math.pow(defaultZoomFactor, DEFAULT_MIN_ZOOM);\n        var defaultMinResolution = defaultMaxResolution /\n            Math.pow(defaultZoomFactor, defaultMaxZoom - DEFAULT_MIN_ZOOM);\n        // user provided maxResolution takes precedence\n        maxResolution = options.maxResolution;\n        if (maxResolution !== undefined) {\n            minZoom = 0;\n        }\n        else {\n            maxResolution = defaultMaxResolution / Math.pow(zoomFactor, minZoom);\n        }\n        // user provided minResolution takes precedence\n        minResolution = options.minResolution;\n        if (minResolution === undefined) {\n            if (options.maxZoom !== undefined) {\n                if (options.maxResolution !== undefined) {\n                    minResolution = maxResolution / Math.pow(zoomFactor, maxZoom);\n                }\n                else {\n                    minResolution = defaultMaxResolution / Math.pow(zoomFactor, maxZoom);\n                }\n            }\n            else {\n                minResolution = defaultMinResolution;\n            }\n        }\n        // given discrete zoom levels, minResolution may be different than provided\n        maxZoom =\n            minZoom +\n                Math.floor(Math.log(maxResolution / minResolution) / Math.log(zoomFactor));\n        minResolution = maxResolution / Math.pow(zoomFactor, maxZoom - minZoom);\n        if (options.constrainResolution) {\n            resolutionConstraint = createSnapToPower(zoomFactor, maxResolution, minResolution, smooth, !constrainOnlyCenter && extent, showFullExtent);\n        }\n        else {\n            resolutionConstraint = createMinMaxResolution(maxResolution, minResolution, smooth, !constrainOnlyCenter && extent, showFullExtent);\n        }\n    }\n    return {\n        constraint: resolutionConstraint,\n        maxResolution: maxResolution,\n        minResolution: minResolution,\n        minZoom: minZoom,\n        zoomFactor: zoomFactor,\n    };\n}\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./rotationconstraint.js\").Type} Rotation constraint.\n */\nexport function createRotationConstraint(options) {\n    var enableRotation = options.enableRotation !== undefined ? options.enableRotation : true;\n    if (enableRotation) {\n        var constrainRotation = options.constrainRotation;\n        if (constrainRotation === undefined || constrainRotation === true) {\n            return createSnapToZero();\n        }\n        else if (constrainRotation === false) {\n            return rotationNone;\n        }\n        else if (typeof constrainRotation === 'number') {\n            return createSnapToN(constrainRotation);\n        }\n        else {\n            return rotationNone;\n        }\n    }\n    else {\n        return disable;\n    }\n}\n/**\n * Determine if an animation involves no view change.\n * @param {Animation} animation The animation.\n * @return {boolean} The animation involves no view change.\n */\nexport function isNoopAnimation(animation) {\n    if (animation.sourceCenter && animation.targetCenter) {\n        if (!coordinatesEqual(animation.sourceCenter, animation.targetCenter)) {\n            return false;\n        }\n    }\n    if (animation.sourceResolution !== animation.targetResolution) {\n        return false;\n    }\n    if (animation.sourceRotation !== animation.targetRotation) {\n        return false;\n    }\n    return true;\n}\n/**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"./size.js\").Size} size Box pixel size.\n * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @return {import(\"./coordinate.js\").Coordinate} Shifted center.\n */\nfunction calculateCenterOn(coordinate, size, position, resolution, rotation) {\n    // calculate rotated position\n    var cosAngle = Math.cos(-rotation);\n    var sinAngle = Math.sin(-rotation);\n    var rotX = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n    var rotY = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n    rotX += (size[0] / 2 - position[0]) * resolution;\n    rotY += (position[1] - size[1] / 2) * resolution;\n    // go back to original angle\n    sinAngle = -sinAngle; // go back to original rotation\n    var centerX = rotX * cosAngle - rotY * sinAngle;\n    var centerY = rotY * cosAngle + rotX * sinAngle;\n    return [centerX, centerY];\n}\nexport default View;\n//# sourceMappingURL=View.js.map","/**\n * @module ol/geom/flat/interpolate\n */\nimport { binarySearch } from '../../array.js';\nimport { lerp } from '../../math.js';\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} fraction Fraction.\n * @param {Array<number>} [opt_dest] Destination.\n * @param {number} [opt_dimension] Destination dimension (default is `2`)\n * @return {Array<number>} Destination.\n */\nexport function interpolatePoint(flatCoordinates, offset, end, stride, fraction, opt_dest, opt_dimension) {\n    var o, t;\n    var n = (end - offset) / stride;\n    if (n === 1) {\n        o = offset;\n    }\n    else if (n === 2) {\n        o = offset;\n        t = fraction;\n    }\n    else if (n !== 0) {\n        var x1 = flatCoordinates[offset];\n        var y1 = flatCoordinates[offset + 1];\n        var length_1 = 0;\n        var cumulativeLengths = [0];\n        for (var i = offset + stride; i < end; i += stride) {\n            var x2 = flatCoordinates[i];\n            var y2 = flatCoordinates[i + 1];\n            length_1 += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n            cumulativeLengths.push(length_1);\n            x1 = x2;\n            y1 = y2;\n        }\n        var target = fraction * length_1;\n        var index = binarySearch(cumulativeLengths, target);\n        if (index < 0) {\n            t =\n                (target - cumulativeLengths[-index - 2]) /\n                    (cumulativeLengths[-index - 1] - cumulativeLengths[-index - 2]);\n            o = offset + (-index - 2) * stride;\n        }\n        else {\n            o = offset + index * stride;\n        }\n    }\n    var dimension = opt_dimension > 1 ? opt_dimension : 2;\n    var dest = opt_dest ? opt_dest : new Array(dimension);\n    for (var i = 0; i < dimension; ++i) {\n        dest[i] =\n            o === undefined\n                ? NaN\n                : t === undefined\n                    ? flatCoordinates[o + i]\n                    : lerp(flatCoordinates[o + i], flatCoordinates[o + stride + i], t);\n    }\n    return dest;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n */\nexport function lineStringCoordinateAtM(flatCoordinates, offset, end, stride, m, extrapolate) {\n    if (end == offset) {\n        return null;\n    }\n    var coordinate;\n    if (m < flatCoordinates[offset + stride - 1]) {\n        if (extrapolate) {\n            coordinate = flatCoordinates.slice(offset, offset + stride);\n            coordinate[stride - 1] = m;\n            return coordinate;\n        }\n        else {\n            return null;\n        }\n    }\n    else if (flatCoordinates[end - 1] < m) {\n        if (extrapolate) {\n            coordinate = flatCoordinates.slice(end - stride, end);\n            coordinate[stride - 1] = m;\n            return coordinate;\n        }\n        else {\n            return null;\n        }\n    }\n    // FIXME use O(1) search\n    if (m == flatCoordinates[offset + stride - 1]) {\n        return flatCoordinates.slice(offset, offset + stride);\n    }\n    var lo = offset / stride;\n    var hi = end / stride;\n    while (lo < hi) {\n        var mid = (lo + hi) >> 1;\n        if (m < flatCoordinates[(mid + 1) * stride - 1]) {\n            hi = mid;\n        }\n        else {\n            lo = mid + 1;\n        }\n    }\n    var m0 = flatCoordinates[lo * stride - 1];\n    if (m == m0) {\n        return flatCoordinates.slice((lo - 1) * stride, (lo - 1) * stride + stride);\n    }\n    var m1 = flatCoordinates[(lo + 1) * stride - 1];\n    var t = (m - m0) / (m1 - m0);\n    coordinate = [];\n    for (var i = 0; i < stride - 1; ++i) {\n        coordinate.push(lerp(flatCoordinates[(lo - 1) * stride + i], flatCoordinates[lo * stride + i], t));\n    }\n    coordinate.push(m);\n    return coordinate;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @param {boolean} interpolate Interpolate.\n * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n */\nexport function lineStringsCoordinateAtM(flatCoordinates, offset, ends, stride, m, extrapolate, interpolate) {\n    if (interpolate) {\n        return lineStringCoordinateAtM(flatCoordinates, offset, ends[ends.length - 1], stride, m, extrapolate);\n    }\n    var coordinate;\n    if (m < flatCoordinates[stride - 1]) {\n        if (extrapolate) {\n            coordinate = flatCoordinates.slice(0, stride);\n            coordinate[stride - 1] = m;\n            return coordinate;\n        }\n        else {\n            return null;\n        }\n    }\n    if (flatCoordinates[flatCoordinates.length - 1] < m) {\n        if (extrapolate) {\n            coordinate = flatCoordinates.slice(flatCoordinates.length - stride);\n            coordinate[stride - 1] = m;\n            return coordinate;\n        }\n        else {\n            return null;\n        }\n    }\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        if (offset == end) {\n            continue;\n        }\n        if (m < flatCoordinates[offset + stride - 1]) {\n            return null;\n        }\n        else if (m <= flatCoordinates[end - 1]) {\n            return lineStringCoordinateAtM(flatCoordinates, offset, end, stride, m, false);\n        }\n        offset = end;\n    }\n    return null;\n}\n//# sourceMappingURL=interpolate.js.map","/**\n * @module ol/proj/Projection\n */\nimport { METERS_PER_UNIT } from './Units.js';\n/**\n * @typedef {Object} Options\n * @property {string} code The SRS identifier code, e.g. `EPSG:4326`.\n * @property {import(\"./Units.js\").default|string} [units] Units. Required unless a\n * proj4 projection is defined for `code`.\n * @property {import(\"../extent.js\").Extent} [extent] The validity extent for the SRS.\n * @property {string} [axisOrientation='enu'] The axis orientation as specified in Proj4.\n * @property {boolean} [global=false] Whether the projection is valid for the whole globe.\n * @property {number} [metersPerUnit] The meters per unit for the SRS.\n * If not provided, the `units` are used to get the meters per unit from the {@link module:ol/proj/Units~METERS_PER_UNIT}\n * lookup table.\n * @property {import(\"../extent.js\").Extent} [worldExtent] The world extent for the SRS.\n * @property {function(number, import(\"../coordinate.js\").Coordinate):number} [getPointResolution]\n * Function to determine resolution at a point. The function is called with a\n * `number` view resolution and a {@link module:ol/coordinate~Coordinate Coordinate} as arguments, and returns\n * the `number` resolution in projection units at the passed coordinate. If this is `undefined`,\n * the default {@link module:ol/proj.getPointResolution getPointResolution()} function will be used.\n */\n/**\n * @classdesc\n * Projection definition class. One of these is created for each projection\n * supported in the application and stored in the {@link module:ol/proj} namespace.\n * You can use these in applications, but this is not required, as API params\n * and options use {@link module:ol/proj~ProjectionLike} which means the simple string\n * code will suffice.\n *\n * You can use {@link module:ol/proj.get} to retrieve the object for a particular\n * projection.\n *\n * The library includes definitions for `EPSG:4326` and `EPSG:3857`, together\n * with the following aliases:\n * * `EPSG:4326`: CRS:84, urn:ogc:def:crs:EPSG:6.6:4326,\n *     urn:ogc:def:crs:OGC:1.3:CRS84, urn:ogc:def:crs:OGC:2:84,\n *     http://www.opengis.net/gml/srs/epsg.xml#4326,\n *     urn:x-ogc:def:crs:EPSG:4326\n * * `EPSG:3857`: EPSG:102100, EPSG:102113, EPSG:900913,\n *     urn:ogc:def:crs:EPSG:6.18:3:3857,\n *     http://www.opengis.net/gml/srs/epsg.xml#3857\n *\n * If you use [proj4js](https://github.com/proj4js/proj4js), aliases can\n * be added using `proj4.defs()`. After all required projection definitions are\n * added, call the {@link module:ol/proj/proj4.register} function.\n *\n * @api\n */\nvar Projection = /** @class */ (function () {\n    /**\n     * @param {Options} options Projection options.\n     */\n    function Projection(options) {\n        /**\n         * @private\n         * @type {string}\n         */\n        this.code_ = options.code;\n        /**\n         * Units of projected coordinates. When set to `TILE_PIXELS`, a\n         * `this.extent_` and `this.worldExtent_` must be configured properly for each\n         * tile.\n         * @private\n         * @type {import(\"./Units.js\").default}\n         */\n        this.units_ = /** @type {import(\"./Units.js\").default} */ (options.units);\n        /**\n         * Validity extent of the projection in projected coordinates. For projections\n         * with `TILE_PIXELS` units, this is the extent of the tile in\n         * tile pixel space.\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        this.extent_ = options.extent !== undefined ? options.extent : null;\n        /**\n         * Extent of the world in EPSG:4326. For projections with\n         * `TILE_PIXELS` units, this is the extent of the tile in\n         * projected coordinate space.\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        this.worldExtent_ =\n            options.worldExtent !== undefined ? options.worldExtent : null;\n        /**\n         * @private\n         * @type {string}\n         */\n        this.axisOrientation_ =\n            options.axisOrientation !== undefined ? options.axisOrientation : 'enu';\n        /**\n         * @private\n         * @type {boolean}\n         */\n        this.global_ = options.global !== undefined ? options.global : false;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        this.canWrapX_ = !!(this.global_ && this.extent_);\n        /**\n         * @private\n         * @type {function(number, import(\"../coordinate.js\").Coordinate):number|undefined}\n         */\n        this.getPointResolutionFunc_ = options.getPointResolution;\n        /**\n         * @private\n         * @type {import(\"../tilegrid/TileGrid.js\").default}\n         */\n        this.defaultTileGrid_ = null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.metersPerUnit_ = options.metersPerUnit;\n    }\n    /**\n     * @return {boolean} The projection is suitable for wrapping the x-axis\n     */\n    Projection.prototype.canWrapX = function () {\n        return this.canWrapX_;\n    };\n    /**\n     * Get the code for this projection, e.g. 'EPSG:4326'.\n     * @return {string} Code.\n     * @api\n     */\n    Projection.prototype.getCode = function () {\n        return this.code_;\n    };\n    /**\n     * Get the validity extent for this projection.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     * @api\n     */\n    Projection.prototype.getExtent = function () {\n        return this.extent_;\n    };\n    /**\n     * Get the units of this projection.\n     * @return {import(\"./Units.js\").default} Units.\n     * @api\n     */\n    Projection.prototype.getUnits = function () {\n        return this.units_;\n    };\n    /**\n     * Get the amount of meters per unit of this projection.  If the projection is\n     * not configured with `metersPerUnit` or a units identifier, the return is\n     * `undefined`.\n     * @return {number|undefined} Meters.\n     * @api\n     */\n    Projection.prototype.getMetersPerUnit = function () {\n        return this.metersPerUnit_ || METERS_PER_UNIT[this.units_];\n    };\n    /**\n     * Get the world extent for this projection.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     * @api\n     */\n    Projection.prototype.getWorldExtent = function () {\n        return this.worldExtent_;\n    };\n    /**\n     * Get the axis orientation of this projection.\n     * Example values are:\n     * enu - the default easting, northing, elevation.\n     * neu - northing, easting, up - useful for \"lat/long\" geographic coordinates,\n     *     or south orientated transverse mercator.\n     * wnu - westing, northing, up - some planetary coordinate systems have\n     *     \"west positive\" coordinate systems\n     * @return {string} Axis orientation.\n     * @api\n     */\n    Projection.prototype.getAxisOrientation = function () {\n        return this.axisOrientation_;\n    };\n    /**\n     * Is this projection a global projection which spans the whole world?\n     * @return {boolean} Whether the projection is global.\n     * @api\n     */\n    Projection.prototype.isGlobal = function () {\n        return this.global_;\n    };\n    /**\n     * Set if the projection is a global projection which spans the whole world\n     * @param {boolean} global Whether the projection is global.\n     * @api\n     */\n    Projection.prototype.setGlobal = function (global) {\n        this.global_ = global;\n        this.canWrapX_ = !!(global && this.extent_);\n    };\n    /**\n     * @return {import(\"../tilegrid/TileGrid.js\").default} The default tile grid.\n     */\n    Projection.prototype.getDefaultTileGrid = function () {\n        return this.defaultTileGrid_;\n    };\n    /**\n     * @param {import(\"../tilegrid/TileGrid.js\").default} tileGrid The default tile grid.\n     */\n    Projection.prototype.setDefaultTileGrid = function (tileGrid) {\n        this.defaultTileGrid_ = tileGrid;\n    };\n    /**\n     * Set the validity extent for this projection.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @api\n     */\n    Projection.prototype.setExtent = function (extent) {\n        this.extent_ = extent;\n        this.canWrapX_ = !!(this.global_ && extent);\n    };\n    /**\n     * Set the world extent for this projection.\n     * @param {import(\"../extent.js\").Extent} worldExtent World extent\n     *     [minlon, minlat, maxlon, maxlat].\n     * @api\n     */\n    Projection.prototype.setWorldExtent = function (worldExtent) {\n        this.worldExtent_ = worldExtent;\n    };\n    /**\n     * Set the getPointResolution function (see {@link module:ol/proj.getPointResolution}\n     * for this projection.\n     * @param {function(number, import(\"../coordinate.js\").Coordinate):number} func Function\n     * @api\n     */\n    Projection.prototype.setGetPointResolution = function (func) {\n        this.getPointResolutionFunc_ = func;\n    };\n    /**\n     * Get the custom point resolution function for this projection (if set).\n     * @return {function(number, import(\"../coordinate.js\").Coordinate):number|undefined} The custom point\n     * resolution function (if set).\n     */\n    Projection.prototype.getPointResolutionFunc = function () {\n        return this.getPointResolutionFunc_;\n    };\n    return Projection;\n}());\nexport default Projection;\n//# sourceMappingURL=Projection.js.map","/**\n * @module ol/style/RegularShape\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport ImageState from '../ImageState.js';\nimport ImageStyle from './Image.js';\nimport { asArray } from '../color.js';\nimport { asColorLike } from '../colorlike.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { defaultFillStyle, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, } from '../render/canvas.js';\n/**\n * Specify radius for regular polygons, or radius1 and radius2 for stars.\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} points Number of points for stars and regular polygons. In case of a polygon, the number of points\n * is the number of sides.\n * @property {number} [radius] Radius of a regular polygon.\n * @property {number} [radius1] First radius of a star. Ignored if radius is set.\n * @property {number} [radius2] Second radius of a star.\n * @property {number} [angle=0] Shape's angle in radians. A value of 0 will have one of the shape's point facing up.\n * @property {Array<number>} [displacement=[0,0]] Displacement of the shape\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view.\n * @property {number|import(\"../size.js\").Size} [scale=1] Scale. Unless two dimensional scaling is required a better\n * result may be obtained with appropriate settings for `radius`, `radius1` and `radius2`.\n */\n/**\n * @typedef {Object} RenderOptions\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle] StrokeStyle.\n * @property {number} strokeWidth StrokeWidth.\n * @property {number} size Size.\n * @property {Array<number>} lineDash LineDash.\n * @property {number} lineDashOffset LineDashOffset.\n * @property {CanvasLineJoin} lineJoin LineJoin.\n * @property {number} miterLimit MiterLimit.\n */\n/**\n * @classdesc\n * Set regular shape style for vector features. The resulting shape will be\n * a regular polygon when `radius` is provided, or a star when `radius1` and\n * `radius2` are provided.\n * @api\n */\nvar RegularShape = /** @class */ (function (_super) {\n    __extends(RegularShape, _super);\n    /**\n     * @param {Options} options Options.\n     */\n    function RegularShape(options) {\n        var _this = this;\n        /**\n         * @type {boolean}\n         */\n        var rotateWithView = options.rotateWithView !== undefined ? options.rotateWithView : false;\n        _this = _super.call(this, {\n            opacity: 1,\n            rotateWithView: rotateWithView,\n            rotation: options.rotation !== undefined ? options.rotation : 0,\n            scale: options.scale !== undefined ? options.scale : 1,\n            displacement: options.displacement !== undefined ? options.displacement : [0, 0],\n        }) || this;\n        /**\n         * @private\n         * @type {Object<number, HTMLCanvasElement>}\n         */\n        _this.canvas_ = undefined;\n        /**\n         * @private\n         * @type {HTMLCanvasElement}\n         */\n        _this.hitDetectionCanvas_ = null;\n        /**\n         * @private\n         * @type {import(\"./Fill.js\").default}\n         */\n        _this.fill_ = options.fill !== undefined ? options.fill : null;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.origin_ = [0, 0];\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.points_ = options.points;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.radius_ =\n            options.radius !== undefined ? options.radius : options.radius1;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.radius2_ = options.radius2;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.angle_ = options.angle !== undefined ? options.angle : 0;\n        /**\n         * @private\n         * @type {import(\"./Stroke.js\").default}\n         */\n        _this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.anchor_ = null;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.size_ = null;\n        /**\n         * @private\n         * @type {RenderOptions}\n         */\n        _this.renderOptions_ = null;\n        _this.render();\n        return _this;\n    }\n    /**\n     * Clones the style.\n     * @return {RegularShape} The cloned style.\n     * @api\n     */\n    RegularShape.prototype.clone = function () {\n        var scale = this.getScale();\n        var style = new RegularShape({\n            fill: this.getFill() ? this.getFill().clone() : undefined,\n            points: this.getPoints(),\n            radius: this.getRadius(),\n            radius2: this.getRadius2(),\n            angle: this.getAngle(),\n            stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n            rotation: this.getRotation(),\n            rotateWithView: this.getRotateWithView(),\n            scale: Array.isArray(scale) ? scale.slice() : scale,\n            displacement: this.getDisplacement().slice(),\n        });\n        style.setOpacity(this.getOpacity());\n        return style;\n    };\n    /**\n     * Get the anchor point in pixels. The anchor determines the center point for the\n     * symbolizer.\n     * @return {Array<number>} Anchor.\n     * @api\n     */\n    RegularShape.prototype.getAnchor = function () {\n        return this.anchor_;\n    };\n    /**\n     * Get the angle used in generating the shape.\n     * @return {number} Shape's rotation in radians.\n     * @api\n     */\n    RegularShape.prototype.getAngle = function () {\n        return this.angle_;\n    };\n    /**\n     * Get the fill style for the shape.\n     * @return {import(\"./Fill.js\").default} Fill style.\n     * @api\n     */\n    RegularShape.prototype.getFill = function () {\n        return this.fill_;\n    };\n    /**\n     * @return {HTMLCanvasElement} Image element.\n     */\n    RegularShape.prototype.getHitDetectionImage = function () {\n        if (!this.hitDetectionCanvas_) {\n            this.createHitDetectionCanvas_(this.renderOptions_);\n        }\n        return this.hitDetectionCanvas_;\n    };\n    /**\n     * Get the image icon.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {HTMLCanvasElement} Image or Canvas element.\n     * @api\n     */\n    RegularShape.prototype.getImage = function (pixelRatio) {\n        var image = this.canvas_[pixelRatio];\n        if (!image) {\n            var renderOptions = this.renderOptions_;\n            var context = createCanvasContext2D(renderOptions.size * pixelRatio, renderOptions.size * pixelRatio);\n            this.draw_(renderOptions, context, pixelRatio);\n            image = context.canvas;\n            this.canvas_[pixelRatio] = image;\n        }\n        return image;\n    };\n    /**\n     * Get the image pixel ratio.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} Pixel ratio.\n     */\n    RegularShape.prototype.getPixelRatio = function (pixelRatio) {\n        return pixelRatio;\n    };\n    /**\n     * @return {import(\"../size.js\").Size} Image size.\n     */\n    RegularShape.prototype.getImageSize = function () {\n        return this.size_;\n    };\n    /**\n     * @return {import(\"../ImageState.js\").default} Image state.\n     */\n    RegularShape.prototype.getImageState = function () {\n        return ImageState.LOADED;\n    };\n    /**\n     * Get the origin of the symbolizer.\n     * @return {Array<number>} Origin.\n     * @api\n     */\n    RegularShape.prototype.getOrigin = function () {\n        return this.origin_;\n    };\n    /**\n     * Get the number of points for generating the shape.\n     * @return {number} Number of points for stars and regular polygons.\n     * @api\n     */\n    RegularShape.prototype.getPoints = function () {\n        return this.points_;\n    };\n    /**\n     * Get the (primary) radius for the shape.\n     * @return {number} Radius.\n     * @api\n     */\n    RegularShape.prototype.getRadius = function () {\n        return this.radius_;\n    };\n    /**\n     * Get the secondary radius for the shape.\n     * @return {number|undefined} Radius2.\n     * @api\n     */\n    RegularShape.prototype.getRadius2 = function () {\n        return this.radius2_;\n    };\n    /**\n     * Get the size of the symbolizer (in pixels).\n     * @return {import(\"../size.js\").Size} Size.\n     * @api\n     */\n    RegularShape.prototype.getSize = function () {\n        return this.size_;\n    };\n    /**\n     * Get the stroke style for the shape.\n     * @return {import(\"./Stroke.js\").default} Stroke style.\n     * @api\n     */\n    RegularShape.prototype.getStroke = function () {\n        return this.stroke_;\n    };\n    /**\n     * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n     */\n    RegularShape.prototype.listenImageChange = function (listener) { };\n    /**\n     * Load not yet loaded URI.\n     */\n    RegularShape.prototype.load = function () { };\n    /**\n     * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n     */\n    RegularShape.prototype.unlistenImageChange = function (listener) { };\n    /**\n     * Calculate additional canvas size needed for the miter.\n     * @param {string} lineJoin Line join\n     * @param {number} strokeWidth Stroke width\n     * @param {number} miterLimit Miter limit\n     * @return {number} Additional canvas size needed\n     * @private\n     */\n    RegularShape.prototype.calculateLineJoinSize_ = function (lineJoin, strokeWidth, miterLimit) {\n        if (strokeWidth === 0 ||\n            this.points_ === Infinity ||\n            (lineJoin !== 'bevel' && lineJoin !== 'miter')) {\n            return strokeWidth;\n        }\n        // m  | ^\n        // i  | |\\                  .\n        // t >|  #\\\n        // e  | |\\ \\              .\n        // r      \\s\\\n        //      |  \\t\\          .                 .\n        //          \\r\\                      .   .\n        //      |    \\o\\      .          .  . . .\n        //          e \\k\\            .  .    . .\n        //      |      \\e\\  .    .  .       . .\n        //       d      \\ \\  .  .          . .\n        //      | _ _a_ _\\#  .            . .\n        //   r1          / `             . .\n        //      |                       . .\n        //       b     /               . .\n        //      |                     . .\n        //           / r2            . .\n        //      |                        .   .\n        //         /                           .   .\n        //      |α                                   .   .\n        //       /                                         .   .\n        //      ° center\n        var r1 = this.radius_;\n        var r2 = this.radius2_ === undefined ? r1 : this.radius2_;\n        if (r1 < r2) {\n            var tmp = r1;\n            r1 = r2;\n            r2 = tmp;\n        }\n        var points = this.radius2_ === undefined ? this.points_ : this.points_ * 2;\n        var alpha = (2 * Math.PI) / points;\n        var a = r2 * Math.sin(alpha);\n        var b = Math.sqrt(r2 * r2 - a * a);\n        var d = r1 - b;\n        var e = Math.sqrt(a * a + d * d);\n        var miterRatio = e / a;\n        if (lineJoin === 'miter' && miterRatio <= miterLimit) {\n            return miterRatio * strokeWidth;\n        }\n        // Calculate the distnce from center to the stroke corner where\n        // it was cut short because of the miter limit.\n        //              l\n        //        ----+---- <= distance from center to here is maxr\n        //       /####|k ##\\\n        //      /#####^#####\\\n        //     /#### /+\\# s #\\\n        //    /### h/+++\\# t #\\\n        //   /### t/+++++\\# r #\\\n        //  /### a/+++++++\\# o #\\\n        // /### p/++ fill +\\# k #\\\n        ///#### /+++++^+++++\\# e #\\\n        //#####/+++++/+\\+++++\\#####\\\n        var k = strokeWidth / 2 / miterRatio;\n        var l = (strokeWidth / 2) * (d / e);\n        var maxr = Math.sqrt((r1 + k) * (r1 + k) + l * l);\n        var bevelAdd = maxr - r1;\n        if (this.radius2_ === undefined || lineJoin === 'bevel') {\n            return bevelAdd * 2;\n        }\n        // If outer miter is over the miter limit the inner miter may reach through the\n        // center and be longer than the bevel, same calculation as above but swap r1 / r2.\n        var aa = r1 * Math.sin(alpha);\n        var bb = Math.sqrt(r1 * r1 - aa * aa);\n        var dd = r2 - bb;\n        var ee = Math.sqrt(aa * aa + dd * dd);\n        var innerMiterRatio = ee / aa;\n        if (innerMiterRatio <= miterLimit) {\n            var innerLength = (innerMiterRatio * strokeWidth) / 2 - r2 - r1;\n            return 2 * Math.max(bevelAdd, innerLength);\n        }\n        return bevelAdd * 2;\n    };\n    /**\n     * @return {RenderOptions}  The render options\n     * @protected\n     */\n    RegularShape.prototype.createRenderOptions = function () {\n        var lineJoin = defaultLineJoin;\n        var miterLimit = 0;\n        var lineDash = null;\n        var lineDashOffset = 0;\n        var strokeStyle;\n        var strokeWidth = 0;\n        if (this.stroke_) {\n            strokeStyle = this.stroke_.getColor();\n            if (strokeStyle === null) {\n                strokeStyle = defaultStrokeStyle;\n            }\n            strokeStyle = asColorLike(strokeStyle);\n            strokeWidth = this.stroke_.getWidth();\n            if (strokeWidth === undefined) {\n                strokeWidth = defaultLineWidth;\n            }\n            lineDash = this.stroke_.getLineDash();\n            lineDashOffset = this.stroke_.getLineDashOffset();\n            lineJoin = this.stroke_.getLineJoin();\n            if (lineJoin === undefined) {\n                lineJoin = defaultLineJoin;\n            }\n            miterLimit = this.stroke_.getMiterLimit();\n            if (miterLimit === undefined) {\n                miterLimit = defaultMiterLimit;\n            }\n        }\n        var add = this.calculateLineJoinSize_(lineJoin, strokeWidth, miterLimit);\n        var maxRadius = Math.max(this.radius_, this.radius2_ || 0);\n        var size = Math.ceil(2 * maxRadius + add);\n        return {\n            strokeStyle: strokeStyle,\n            strokeWidth: strokeWidth,\n            size: size,\n            lineDash: lineDash,\n            lineDashOffset: lineDashOffset,\n            lineJoin: lineJoin,\n            miterLimit: miterLimit,\n        };\n    };\n    /**\n     * @protected\n     */\n    RegularShape.prototype.render = function () {\n        this.renderOptions_ = this.createRenderOptions();\n        var size = this.renderOptions_.size;\n        var displacement = this.getDisplacement();\n        this.canvas_ = {};\n        this.anchor_ = [size / 2 - displacement[0], size / 2 + displacement[1]];\n        this.size_ = [size, size];\n    };\n    /**\n     * @private\n     * @param {RenderOptions} renderOptions Render options.\n     * @param {CanvasRenderingContext2D} context The rendering context.\n     * @param {number} pixelRatio The pixel ratio.\n     */\n    RegularShape.prototype.draw_ = function (renderOptions, context, pixelRatio) {\n        context.scale(pixelRatio, pixelRatio);\n        // set origin to canvas center\n        context.translate(renderOptions.size / 2, renderOptions.size / 2);\n        this.createPath_(context);\n        if (this.fill_) {\n            var color = this.fill_.getColor();\n            if (color === null) {\n                color = defaultFillStyle;\n            }\n            context.fillStyle = asColorLike(color);\n            context.fill();\n        }\n        if (this.stroke_) {\n            context.strokeStyle = renderOptions.strokeStyle;\n            context.lineWidth = renderOptions.strokeWidth;\n            if (context.setLineDash && renderOptions.lineDash) {\n                context.setLineDash(renderOptions.lineDash);\n                context.lineDashOffset = renderOptions.lineDashOffset;\n            }\n            context.lineJoin = renderOptions.lineJoin;\n            context.miterLimit = renderOptions.miterLimit;\n            context.stroke();\n        }\n    };\n    /**\n     * @private\n     * @param {RenderOptions} renderOptions Render options.\n     */\n    RegularShape.prototype.createHitDetectionCanvas_ = function (renderOptions) {\n        if (this.fill_) {\n            var color = this.fill_.getColor();\n            // determine if fill is transparent (or pattern or gradient)\n            var opacity = 0;\n            if (typeof color === 'string') {\n                color = asArray(color);\n            }\n            if (color === null) {\n                opacity = 1;\n            }\n            else if (Array.isArray(color)) {\n                opacity = color.length === 4 ? color[3] : 1;\n            }\n            if (opacity === 0) {\n                // if a transparent fill style is set, create an extra hit-detection image\n                // with a default fill style\n                var context = createCanvasContext2D(renderOptions.size, renderOptions.size);\n                this.hitDetectionCanvas_ = context.canvas;\n                this.drawHitDetectionCanvas_(renderOptions, context);\n            }\n        }\n        if (!this.hitDetectionCanvas_) {\n            this.hitDetectionCanvas_ = this.getImage(1);\n        }\n    };\n    /**\n     * @private\n     * @param {CanvasRenderingContext2D} context The context to draw in.\n     */\n    RegularShape.prototype.createPath_ = function (context) {\n        var points = this.points_;\n        var radius = this.radius_;\n        if (points === Infinity) {\n            context.arc(0, 0, radius, 0, 2 * Math.PI);\n        }\n        else {\n            var radius2 = this.radius2_ === undefined ? radius : this.radius2_;\n            if (this.radius2_ !== undefined) {\n                points *= 2;\n            }\n            var startAngle = this.angle_ - Math.PI / 2;\n            var step = (2 * Math.PI) / points;\n            for (var i = 0; i < points; i++) {\n                var angle0 = startAngle + i * step;\n                var radiusC = i % 2 === 0 ? radius : radius2;\n                context.lineTo(radiusC * Math.cos(angle0), radiusC * Math.sin(angle0));\n            }\n            context.closePath();\n        }\n    };\n    /**\n     * @private\n     * @param {RenderOptions} renderOptions Render options.\n     * @param {CanvasRenderingContext2D} context The context.\n     */\n    RegularShape.prototype.drawHitDetectionCanvas_ = function (renderOptions, context) {\n        // set origin to canvas center\n        context.translate(renderOptions.size / 2, renderOptions.size / 2);\n        this.createPath_(context);\n        context.fillStyle = defaultFillStyle;\n        context.fill();\n        if (this.stroke_) {\n            context.strokeStyle = renderOptions.strokeStyle;\n            context.lineWidth = renderOptions.strokeWidth;\n            if (renderOptions.lineDash) {\n                context.setLineDash(renderOptions.lineDash);\n                context.lineDashOffset = renderOptions.lineDashOffset;\n            }\n            context.lineJoin = renderOptions.lineJoin;\n            context.miterLimit = renderOptions.miterLimit;\n            context.stroke();\n        }\n    };\n    return RegularShape;\n}(ImageStyle));\nexport default RegularShape;\n//# sourceMappingURL=RegularShape.js.map","/**\n * @module ol/geom/flat/intersectsextent\n */\nimport { containsExtent, createEmpty, extendFlatCoordinates, intersects, intersectsSegment, } from '../../extent.js';\nimport { forEach as forEachSegment } from './segments.js';\nimport { linearRingContainsExtent, linearRingContainsXY } from './contains.js';\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineString(flatCoordinates, offset, end, stride, extent) {\n    var coordinatesExtent = extendFlatCoordinates(createEmpty(), flatCoordinates, offset, end, stride);\n    if (!intersects(extent, coordinatesExtent)) {\n        return false;\n    }\n    if (containsExtent(extent, coordinatesExtent)) {\n        return true;\n    }\n    if (coordinatesExtent[0] >= extent[0] && coordinatesExtent[2] <= extent[2]) {\n        return true;\n    }\n    if (coordinatesExtent[1] >= extent[1] && coordinatesExtent[3] <= extent[3]) {\n        return true;\n    }\n    return forEachSegment(flatCoordinates, offset, end, stride, \n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} point1 Start point.\n     * @param {import(\"../../coordinate.js\").Coordinate} point2 End point.\n     * @return {boolean} `true` if the segment and the extent intersect,\n     *     `false` otherwise.\n     */\n    function (point1, point2) {\n        return intersectsSegment(extent, point1, point2);\n    });\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineStringArray(flatCoordinates, offset, ends, stride, extent) {\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        if (intersectsLineString(flatCoordinates, offset, ends[i], stride, extent)) {\n            return true;\n        }\n        offset = ends[i];\n    }\n    return false;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRing(flatCoordinates, offset, end, stride, extent) {\n    if (intersectsLineString(flatCoordinates, offset, end, stride, extent)) {\n        return true;\n    }\n    if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[0], extent[1])) {\n        return true;\n    }\n    if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[0], extent[3])) {\n        return true;\n    }\n    if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[2], extent[1])) {\n        return true;\n    }\n    if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[2], extent[3])) {\n        return true;\n    }\n    return false;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent) {\n    if (!intersectsLinearRing(flatCoordinates, offset, ends[0], stride, extent)) {\n        return false;\n    }\n    if (ends.length === 1) {\n        return true;\n    }\n    for (var i = 1, ii = ends.length; i < ii; ++i) {\n        if (linearRingContainsExtent(flatCoordinates, ends[i - 1], ends[i], stride, extent)) {\n            if (!intersectsLineString(flatCoordinates, ends[i - 1], ends[i], stride, extent)) {\n                return false;\n            }\n        }\n    }\n    return true;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingMultiArray(flatCoordinates, offset, endss, stride, extent) {\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        if (intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent)) {\n            return true;\n        }\n        offset = ends[ends.length - 1];\n    }\n    return false;\n}\n//# sourceMappingURL=intersectsextent.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/BaseVector\n */\nimport Layer from './Layer.js';\nimport RBush from 'rbush';\nimport { assign } from '../obj.js';\nimport { createDefaultStyle, toFunction as toStyleFunction, } from '../style/Style.js';\n/**\n * @template {import(\"../source/Vector.js\").default|import(\"../source/VectorTile.js\").default} VectorSourceType\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the\n * renderer when getting features from the vector source for the rendering or hit-detection.\n * Recommended value: the size of the largest symbol, line width or label.\n * @property {VectorSourceType} [source] Source.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link import(\"../PluggableMap.js\").default#addLayer map.addLayer()}.\n * @property {boolean} [declutter=false] Declutter images and text. Decluttering is applied to all\n * image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority\n * is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.\n * Higher z-index means higher priority. Within the same z-index, a feature rendered before another has\n * higher priority.\n * @property {import(\"../style/Style.js\").StyleLike|null} [style] Layer style. When set to `null`, only\n * features that have their own style will be rendered. See {@link module:ol/style} for default style\n * which will be used if this is not set.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will\n * be recreated during animations. This means that no vectors will be shown clipped, but the\n * setting will have a performance impact for large amounts of vector data. When set to `false`,\n * batches will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will\n * be recreated during interactions. See also `updateWhileAnimating`.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n    RENDER_ORDER: 'renderOrder',\n};\n/**\n * @classdesc\n * Vector data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Vector.js\").default|import(\"../source/VectorTile.js\").default} VectorSourceType\n * @extends {Layer<VectorSourceType>}\n * @api\n */\nvar BaseVectorLayer = /** @class */ (function (_super) {\n    __extends(BaseVectorLayer, _super);\n    /**\n     * @param {Options<VectorSourceType>} [opt_options] Options.\n     */\n    function BaseVectorLayer(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var baseOptions = assign({}, options);\n        delete baseOptions.style;\n        delete baseOptions.renderBuffer;\n        delete baseOptions.updateWhileAnimating;\n        delete baseOptions.updateWhileInteracting;\n        _this = _super.call(this, baseOptions) || this;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.declutter_ =\n            options.declutter !== undefined ? options.declutter : false;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.renderBuffer_ =\n            options.renderBuffer !== undefined ? options.renderBuffer : 100;\n        /**\n         * User provided style.\n         * @type {import(\"../style/Style.js\").StyleLike}\n         * @private\n         */\n        _this.style_ = null;\n        /**\n         * Style function for use within the library.\n         * @type {import(\"../style/Style.js\").StyleFunction|undefined}\n         * @private\n         */\n        _this.styleFunction_ = undefined;\n        _this.setStyle(options.style);\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.updateWhileAnimating_ =\n            options.updateWhileAnimating !== undefined\n                ? options.updateWhileAnimating\n                : false;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.updateWhileInteracting_ =\n            options.updateWhileInteracting !== undefined\n                ? options.updateWhileInteracting\n                : false;\n        return _this;\n    }\n    /**\n     * @return {boolean} Declutter.\n     */\n    BaseVectorLayer.prototype.getDeclutter = function () {\n        return this.declutter_;\n    };\n    /**\n     * Get the topmost feature that intersects the given pixel on the viewport. Returns a promise\n     * that resolves with an array of features. The array will either contain the topmost feature\n     * when a hit was detected, or it will be empty.\n     *\n     * The hit detection algorithm used for this method is optimized for performance, but is less\n     * accurate than the one used in {@link import(\"../PluggableMap.js\").default#getFeaturesAtPixel}: Text\n     * is not considered, and icons are only represented by their bounding box instead of the exact\n     * image.\n     *\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with an array of features.\n     * @api\n     */\n    BaseVectorLayer.prototype.getFeatures = function (pixel) {\n        return _super.prototype.getFeatures.call(this, pixel);\n    };\n    /**\n     * @return {number|undefined} Render buffer.\n     */\n    BaseVectorLayer.prototype.getRenderBuffer = function () {\n        return this.renderBuffer_;\n    };\n    /**\n     * @return {function(import(\"../Feature.js\").default, import(\"../Feature.js\").default): number|null|undefined} Render\n     *     order.\n     */\n    BaseVectorLayer.prototype.getRenderOrder = function () {\n        return /** @type {import(\"../render.js\").OrderFunction|null|undefined} */ (this.get(Property.RENDER_ORDER));\n    };\n    /**\n     * Get the style for features.  This returns whatever was passed to the `style`\n     * option at construction or to the `setStyle` method.\n     * @return {import(\"../style/Style.js\").StyleLike|null|undefined} Layer style.\n     * @api\n     */\n    BaseVectorLayer.prototype.getStyle = function () {\n        return this.style_;\n    };\n    /**\n     * Get the style function.\n     * @return {import(\"../style/Style.js\").StyleFunction|undefined} Layer style function.\n     * @api\n     */\n    BaseVectorLayer.prototype.getStyleFunction = function () {\n        return this.styleFunction_;\n    };\n    /**\n     * @return {boolean} Whether the rendered layer should be updated while\n     *     animating.\n     */\n    BaseVectorLayer.prototype.getUpdateWhileAnimating = function () {\n        return this.updateWhileAnimating_;\n    };\n    /**\n     * @return {boolean} Whether the rendered layer should be updated while\n     *     interacting.\n     */\n    BaseVectorLayer.prototype.getUpdateWhileInteracting = function () {\n        return this.updateWhileInteracting_;\n    };\n    /**\n     * Render declutter items for this layer\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    BaseVectorLayer.prototype.renderDeclutter = function (frameState) {\n        if (!frameState.declutterTree) {\n            frameState.declutterTree = new RBush(9);\n        }\n        /** @type {*} */ (this.getRenderer()).renderDeclutter(frameState);\n    };\n    /**\n     * @param {import(\"../render.js\").OrderFunction|null|undefined} renderOrder\n     *     Render order.\n     */\n    BaseVectorLayer.prototype.setRenderOrder = function (renderOrder) {\n        this.set(Property.RENDER_ORDER, renderOrder);\n    };\n    /**\n     * Set the style for features.  This can be a single style object, an array\n     * of styles, or a function that takes a feature and resolution and returns\n     * an array of styles. If set to `null`, the layer has no style (a `null` style),\n     * so only features that have their own styles will be rendered in the layer. Call\n     * `setStyle()` without arguments to reset to the default style. See\n     * {@link module:ol/style} for information on the default style.\n     * @param {import(\"../style/Style.js\").StyleLike|null} [opt_style] Layer style.\n     * @api\n     */\n    BaseVectorLayer.prototype.setStyle = function (opt_style) {\n        this.style_ = opt_style !== undefined ? opt_style : createDefaultStyle;\n        this.styleFunction_ =\n            opt_style === null ? undefined : toStyleFunction(this.style_);\n        this.changed();\n    };\n    return BaseVectorLayer;\n}(Layer));\nexport default BaseVectorLayer;\n//# sourceMappingURL=BaseVector.js.map","/**\n * @module ol/format/IIIFInfo\n */\nvar __spreadArray = (this && this.__spreadArray) || function (to, from) {\n    for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n        to[j] = from[i];\n    return to;\n};\nimport { assert } from '../asserts.js';\nimport { includes } from '../array.js';\n/**\n * @typedef {Object} PreferredOptions\n * @property {string} [format] Preferred image format. Will be used if the image information\n * indicates support for that format.\n * @property {string} [quality] IIIF image qualitiy.  Will be used if the image information\n * indicates support for that quality.\n */\n/**\n * @typedef {Object} SupportedFeatures\n * @property {Array<string>} [supports] Supported IIIF image size and region\n * calculation features.\n * @property {Array<string>} [formats] Supported image formats.\n * @property {Array<string>} [qualities] Supported IIIF image qualities.\n */\n/**\n * @typedef {Object} TileInfo\n * @property {Array<number>} scaleFactors Supported resolution scaling factors.\n * @property {number} width Tile width in pixels.\n * @property {number} [height] Tile height in pixels. Same as tile width if height is\n * not given.\n */\n/**\n * @typedef {Object} IiifProfile\n * @property {Array<string>} [formats] Supported image formats for the image service.\n * @property {Array<string>} [qualities] Supported IIIF image qualities.\n * @property {Array<string>} [supports] Supported features.\n * @property {number} [maxArea] Maximum area (pixels) available for this image service.\n * @property {number} [maxHeight] Maximum height.\n * @property {number} [maxWidth] Maximum width.\n */\n/**\n * @typedef {Object<string,string|number|Array<number|string|IiifProfile>|Object<string, number>|TileInfo>}\n *    ImageInformationResponse\n */\n/**\n * Enum representing the major IIIF Image API versions\n * @enum {string}\n */\nexport var Versions = {\n    VERSION1: 'version1',\n    VERSION2: 'version2',\n    VERSION3: 'version3',\n};\n/**\n * Supported image formats, qualities and supported region / size calculation features\n * for different image API versions and compliance levels\n * @const\n * @type {Object<string, Object<string, SupportedFeatures>>}\n */\nvar IIIF_PROFILE_VALUES = {};\nIIIF_PROFILE_VALUES[Versions.VERSION1] = {\n    'level0': {\n        supports: [],\n        formats: [],\n        qualities: ['native'],\n    },\n    'level1': {\n        supports: ['regionByPx', 'sizeByW', 'sizeByH', 'sizeByPct'],\n        formats: ['jpg'],\n        qualities: ['native'],\n    },\n    'level2': {\n        supports: [\n            'regionByPx',\n            'regionByPct',\n            'sizeByW',\n            'sizeByH',\n            'sizeByPct',\n            'sizeByConfinedWh',\n            'sizeByWh',\n        ],\n        formats: ['jpg', 'png'],\n        qualities: ['native', 'color', 'grey', 'bitonal'],\n    },\n};\nIIIF_PROFILE_VALUES[Versions.VERSION2] = {\n    'level0': {\n        supports: [],\n        formats: ['jpg'],\n        qualities: ['default'],\n    },\n    'level1': {\n        supports: ['regionByPx', 'sizeByW', 'sizeByH', 'sizeByPct'],\n        formats: ['jpg'],\n        qualities: ['default'],\n    },\n    'level2': {\n        supports: [\n            'regionByPx',\n            'regionByPct',\n            'sizeByW',\n            'sizeByH',\n            'sizeByPct',\n            'sizeByConfinedWh',\n            'sizeByDistortedWh',\n            'sizeByWh',\n        ],\n        formats: ['jpg', 'png'],\n        qualities: ['default', 'bitonal'],\n    },\n};\nIIIF_PROFILE_VALUES[Versions.VERSION3] = {\n    'level0': {\n        supports: [],\n        formats: ['jpg'],\n        qualities: ['default'],\n    },\n    'level1': {\n        supports: ['regionByPx', 'regionSquare', 'sizeByW', 'sizeByH', 'sizeByWh'],\n        formats: ['jpg'],\n        qualities: ['default'],\n    },\n    'level2': {\n        supports: [\n            'regionByPx',\n            'regionSquare',\n            'regionByPct',\n            'sizeByW',\n            'sizeByH',\n            'sizeByPct',\n            'sizeByConfinedWh',\n            'sizeByWh',\n        ],\n        formats: ['jpg', 'png'],\n        qualities: ['default'],\n    },\n};\nIIIF_PROFILE_VALUES['none'] = {\n    'none': {\n        supports: [],\n        formats: [],\n        qualities: [],\n    },\n};\nvar COMPLIANCE_VERSION1 = /^https?:\\/\\/library\\.stanford\\.edu\\/iiif\\/image-api\\/(?:1\\.1\\/)?compliance\\.html#level[0-2]$/;\nvar COMPLIANCE_VERSION2 = /^https?:\\/\\/iiif\\.io\\/api\\/image\\/2\\/level[0-2](?:\\.json)?$/;\nvar COMPLIANCE_VERSION3 = /(^https?:\\/\\/iiif\\.io\\/api\\/image\\/3\\/level[0-2](?:\\.json)?$)|(^level[0-2]$)/;\nfunction generateVersion1Options(iiifInfo) {\n    var levelProfile = iiifInfo.getComplianceLevelSupportedFeatures();\n    // Version 1.0 and 1.1 do not require a profile.\n    if (levelProfile === undefined) {\n        levelProfile = IIIF_PROFILE_VALUES[Versions.VERSION1]['level0'];\n    }\n    return {\n        url: iiifInfo.imageInfo['@id'] === undefined\n            ? undefined\n            : iiifInfo.imageInfo['@id'].replace(/\\/?(?:info\\.json)?$/g, ''),\n        supports: levelProfile.supports,\n        formats: __spreadArray(__spreadArray([], levelProfile.formats), [\n            iiifInfo.imageInfo.formats === undefined\n                ? []\n                : iiifInfo.imageInfo.formats,\n        ]),\n        qualities: __spreadArray(__spreadArray([], levelProfile.qualities), [\n            iiifInfo.imageInfo.qualities === undefined\n                ? []\n                : iiifInfo.imageInfo.qualities,\n        ]),\n        resolutions: iiifInfo.imageInfo.scale_factors,\n        tileSize: iiifInfo.imageInfo.tile_width !== undefined\n            ? iiifInfo.imageInfo.tile_height !== undefined\n                ? [iiifInfo.imageInfo.tile_width, iiifInfo.imageInfo.tile_height]\n                : [iiifInfo.imageInfo.tile_width, iiifInfo.imageInfo.tile_width]\n            : iiifInfo.imageInfo.tile_height != undefined\n                ? [iiifInfo.imageInfo.tile_height, iiifInfo.imageInfo.tile_height]\n                : undefined,\n    };\n}\nfunction generateVersion2Options(iiifInfo) {\n    var levelProfile = iiifInfo.getComplianceLevelSupportedFeatures(), additionalProfile = Array.isArray(iiifInfo.imageInfo.profile) &&\n        iiifInfo.imageInfo.profile.length > 1, profileSupports = additionalProfile && iiifInfo.imageInfo.profile[1].supports\n        ? iiifInfo.imageInfo.profile[1].supports\n        : [], profileFormats = additionalProfile && iiifInfo.imageInfo.profile[1].formats\n        ? iiifInfo.imageInfo.profile[1].formats\n        : [], profileQualities = additionalProfile && iiifInfo.imageInfo.profile[1].qualities\n        ? iiifInfo.imageInfo.profile[1].qualities\n        : [];\n    return {\n        url: iiifInfo.imageInfo['@id'].replace(/\\/?(?:info\\.json)?$/g, ''),\n        sizes: iiifInfo.imageInfo.sizes === undefined\n            ? undefined\n            : iiifInfo.imageInfo.sizes.map(function (size) {\n                return [size.width, size.height];\n            }),\n        tileSize: iiifInfo.imageInfo.tiles === undefined\n            ? undefined\n            : [\n                iiifInfo.imageInfo.tiles.map(function (tile) {\n                    return tile.width;\n                })[0],\n                iiifInfo.imageInfo.tiles.map(function (tile) {\n                    return tile.height === undefined ? tile.width : tile.height;\n                })[0],\n            ],\n        resolutions: iiifInfo.imageInfo.tiles === undefined\n            ? undefined\n            : iiifInfo.imageInfo.tiles.map(function (tile) {\n                return tile.scaleFactors;\n            })[0],\n        supports: __spreadArray(__spreadArray([], levelProfile.supports), profileSupports),\n        formats: __spreadArray(__spreadArray([], levelProfile.formats), profileFormats),\n        qualities: __spreadArray(__spreadArray([], levelProfile.qualities), profileQualities),\n    };\n}\nfunction generateVersion3Options(iiifInfo) {\n    var levelProfile = iiifInfo.getComplianceLevelSupportedFeatures(), formats = iiifInfo.imageInfo.extraFormats === undefined\n        ? levelProfile.formats\n        : __spreadArray(__spreadArray([], levelProfile.formats), iiifInfo.imageInfo.extraFormats), preferredFormat = iiifInfo.imageInfo.preferredFormats !== undefined &&\n        Array.isArray(iiifInfo.imageInfo.preferredFormats) &&\n        iiifInfo.imageInfo.preferredFormats.length > 0\n        ? iiifInfo.imageInfo.preferredFormats\n            .filter(function (format) {\n            return includes(['jpg', 'png', 'gif'], format);\n        })\n            .reduce(function (acc, format) {\n            return acc === undefined && includes(formats, format)\n                ? format\n                : acc;\n        }, undefined)\n        : undefined;\n    return {\n        url: iiifInfo.imageInfo['id'],\n        sizes: iiifInfo.imageInfo.sizes === undefined\n            ? undefined\n            : iiifInfo.imageInfo.sizes.map(function (size) {\n                return [size.width, size.height];\n            }),\n        tileSize: iiifInfo.imageInfo.tiles === undefined\n            ? undefined\n            : [\n                iiifInfo.imageInfo.tiles.map(function (tile) {\n                    return tile.width;\n                })[0],\n                iiifInfo.imageInfo.tiles.map(function (tile) {\n                    return tile.height;\n                })[0],\n            ],\n        resolutions: iiifInfo.imageInfo.tiles === undefined\n            ? undefined\n            : iiifInfo.imageInfo.tiles.map(function (tile) {\n                return tile.scaleFactors;\n            })[0],\n        supports: iiifInfo.imageInfo.extraFeatures === undefined\n            ? levelProfile.supports\n            : __spreadArray(__spreadArray([], levelProfile.supports), iiifInfo.imageInfo.extraFeatures),\n        formats: formats,\n        qualities: iiifInfo.imageInfo.extraQualities === undefined\n            ? levelProfile.qualities\n            : __spreadArray(__spreadArray([], levelProfile.qualities), iiifInfo.imageInfo.extraQualities),\n        preferredFormat: preferredFormat,\n    };\n}\nvar versionFunctions = {};\nversionFunctions[Versions.VERSION1] = generateVersion1Options;\nversionFunctions[Versions.VERSION2] = generateVersion2Options;\nversionFunctions[Versions.VERSION3] = generateVersion3Options;\n/**\n * @classdesc\n * Format for transforming IIIF Image API image information responses into\n * IIIF tile source ready options\n *\n * @api\n */\nvar IIIFInfo = /** @class */ (function () {\n    /**\n     * @param {string|ImageInformationResponse} imageInfo\n     * Deserialized image information JSON response object or JSON response as string\n     */\n    function IIIFInfo(imageInfo) {\n        this.setImageInfo(imageInfo);\n    }\n    /**\n     * @param {string|ImageInformationResponse} imageInfo\n     * Deserialized image information JSON response object or JSON response as string\n     * @api\n     */\n    IIIFInfo.prototype.setImageInfo = function (imageInfo) {\n        if (typeof imageInfo == 'string') {\n            this.imageInfo = JSON.parse(imageInfo);\n        }\n        else {\n            this.imageInfo = imageInfo;\n        }\n    };\n    /**\n     * @return {Versions} Major IIIF version.\n     * @api\n     */\n    IIIFInfo.prototype.getImageApiVersion = function () {\n        if (this.imageInfo === undefined) {\n            return;\n        }\n        var context = this.imageInfo['@context'] || 'ol-no-context';\n        if (typeof context == 'string') {\n            context = [context];\n        }\n        for (var i = 0; i < context.length; i++) {\n            switch (context[i]) {\n                case 'http://library.stanford.edu/iiif/image-api/1.1/context.json':\n                case 'http://iiif.io/api/image/1/context.json':\n                    return Versions.VERSION1;\n                case 'http://iiif.io/api/image/2/context.json':\n                    return Versions.VERSION2;\n                case 'http://iiif.io/api/image/3/context.json':\n                    return Versions.VERSION3;\n                case 'ol-no-context':\n                    // Image API 1.0 has no '@context'\n                    if (this.getComplianceLevelEntryFromProfile(Versions.VERSION1) &&\n                        this.imageInfo.identifier) {\n                        return Versions.VERSION1;\n                    }\n                    break;\n                default:\n            }\n        }\n        assert(false, 61);\n    };\n    /**\n     * @param {Versions} version Optional IIIF image API version\n     * @return {string} Compliance level as it appears in the IIIF image information\n     * response.\n     */\n    IIIFInfo.prototype.getComplianceLevelEntryFromProfile = function (version) {\n        if (this.imageInfo === undefined || this.imageInfo.profile === undefined) {\n            return;\n        }\n        if (version === undefined) {\n            version = this.getImageApiVersion();\n        }\n        switch (version) {\n            case Versions.VERSION1:\n                if (COMPLIANCE_VERSION1.test(this.imageInfo.profile)) {\n                    return this.imageInfo.profile;\n                }\n                break;\n            case Versions.VERSION3:\n                if (COMPLIANCE_VERSION3.test(this.imageInfo.profile)) {\n                    return this.imageInfo.profile;\n                }\n                break;\n            case Versions.VERSION2:\n                if (typeof this.imageInfo.profile === 'string' &&\n                    COMPLIANCE_VERSION2.test(this.imageInfo.profile)) {\n                    return this.imageInfo.profile;\n                }\n                if (Array.isArray(this.imageInfo.profile) &&\n                    this.imageInfo.profile.length > 0 &&\n                    typeof this.imageInfo.profile[0] === 'string' &&\n                    COMPLIANCE_VERSION2.test(this.imageInfo.profile[0])) {\n                    return this.imageInfo.profile[0];\n                }\n                break;\n            default:\n        }\n    };\n    /**\n     * @param {Versions} version Optional IIIF image API version\n     * @return {string} Compliance level, on of 'level0', 'level1' or 'level2' or undefined\n     */\n    IIIFInfo.prototype.getComplianceLevelFromProfile = function (version) {\n        var complianceLevel = this.getComplianceLevelEntryFromProfile(version);\n        if (complianceLevel === undefined) {\n            return undefined;\n        }\n        var level = complianceLevel.match(/level[0-2](?:\\.json)?$/g);\n        return Array.isArray(level) ? level[0].replace('.json', '') : undefined;\n    };\n    /**\n     * @return {SupportedFeatures} Image formats, qualities and region / size calculation\n     * methods that are supported by the IIIF service.\n     */\n    IIIFInfo.prototype.getComplianceLevelSupportedFeatures = function () {\n        if (this.imageInfo === undefined) {\n            return;\n        }\n        var version = this.getImageApiVersion();\n        var level = this.getComplianceLevelFromProfile(version);\n        if (level === undefined) {\n            return IIIF_PROFILE_VALUES['none']['none'];\n        }\n        return IIIF_PROFILE_VALUES[version][level];\n    };\n    /**\n     * @param {PreferredOptions} [opt_preferredOptions] Optional options for preferred format and quality.\n     * @return {import(\"../source/IIIF.js\").Options} IIIF tile source ready constructor options.\n     * @api\n     */\n    IIIFInfo.prototype.getTileSourceOptions = function (opt_preferredOptions) {\n        var options = opt_preferredOptions || {}, version = this.getImageApiVersion();\n        if (version === undefined) {\n            return;\n        }\n        var imageOptions = version === undefined ? undefined : versionFunctions[version](this);\n        if (imageOptions === undefined) {\n            return;\n        }\n        return {\n            url: imageOptions.url,\n            version: version,\n            size: [this.imageInfo.width, this.imageInfo.height],\n            sizes: imageOptions.sizes,\n            format: options.format !== undefined &&\n                includes(imageOptions.formats, options.format)\n                ? options.format\n                : imageOptions.preferredFormat !== undefined\n                    ? imageOptions.preferredFormat\n                    : 'jpg',\n            supports: imageOptions.supports,\n            quality: options.quality && includes(imageOptions.qualities, options.quality)\n                ? options.quality\n                : includes(imageOptions.qualities, 'native')\n                    ? 'native'\n                    : 'default',\n            resolutions: Array.isArray(imageOptions.resolutions)\n                ? imageOptions.resolutions.sort(function (a, b) {\n                    return b - a;\n                })\n                : undefined,\n            tileSize: imageOptions.tileSize,\n        };\n    };\n    return IIIFInfo;\n}());\nexport default IIIFInfo;\n//# sourceMappingURL=IIIFInfo.js.map","/*\n Magic wand tool (fuzzy selection) by color\n\n @package magic-wand-tool\n @author Ryasnoy Paul <ryasnoypaul@gmail.com>\n @version 1.1.4\n @license MIT\n @copyright (c) 2014-2019, Ryasnoy Paul <ryasnoypaul@gmail.com>\n\n*/\n\nMagicWand = (function () {\r\n    var lib = {};\r\n\r\n    /** Create a binary mask on the image by color threshold\r\n      * Algorithm: Scanline flood fill (http://en.wikipedia.org/wiki/Flood_fill)\r\n      * @param {Object} image: {Uint8Array} data, {int} width, {int} height, {int} bytes\r\n      * @param {int} x of start pixel\r\n      * @param {int} y of start pixel\r\n      * @param {int} color threshold\r\n      * @param {Uint8Array} mask of visited points (optional) \r\n      * @param {boolean} [includeBorders=false] indicate whether to include borders pixels\r\n      * @return {Object} mask: {Uint8Array} data, {int} width, {int} height, {Object} bounds\r\n      */\r\n    lib.floodFill = function(image, px, py, colorThreshold, mask, includeBorders) {\r\n        return includeBorders\r\n            ? floodFillWithBorders(image, px, py, colorThreshold, mask)\r\n            : floodFillWithoutBorders(image, px, py, colorThreshold, mask);\r\n    };\r\n\r\n    function floodFillWithoutBorders(image, px, py, colorThreshold, mask) {\r\n\r\n        var c, x, newY, el, xr, xl, dy, dyl, dyr, checkY,\r\n            data = image.data,\r\n            w = image.width,\r\n            h = image.height,\r\n            bytes = image.bytes, // number of bytes in the color\r\n            maxX = -1, minX = w + 1, maxY = -1, minY = h + 1,\r\n            i = py * w + px, // start point index in the mask data\r\n            result = new Uint8Array(w * h), // result mask\r\n            visited = new Uint8Array(mask ? mask : w * h); // mask of visited points\r\n\r\n        if (visited[i] === 1) return null;\r\n\r\n        i = i * bytes; // start point index in the image data\r\n        var sampleColor = [data[i], data[i + 1], data[i + 2], data[i + 3]]; // start point color (sample)\r\n\r\n        var stack = [{ y: py, left: px - 1, right: px + 1, dir: 1 }]; // first scanning line\r\n        do {\r\n            el = stack.shift(); // get line for scanning\r\n\r\n            checkY = false;\r\n            for (x = el.left + 1; x < el.right; x++) {\r\n                dy = el.y * w;\r\n                i = (dy + x) * bytes; // point index in the image data\r\n\r\n                if (visited[dy + x] === 1) continue; // check whether the point has been visited\r\n                // compare the color of the sample\r\n                c = data[i] - sampleColor[0]; // check by red\r\n                if (c > colorThreshold || c < -colorThreshold) continue;\r\n                c = data[i + 1] - sampleColor[1]; // check by green\r\n                if (c > colorThreshold || c < -colorThreshold) continue;\r\n                c = data[i + 2] - sampleColor[2]; // check by blue\r\n                if (c > colorThreshold || c < -colorThreshold) continue;\r\n\r\n                checkY = true; // if the color of the new point(x,y) is similar to the sample color need to check minmax for Y \r\n\r\n                result[dy + x] = 1; // mark a new point in mask\r\n                visited[dy + x] = 1; // mark a new point as visited\r\n\r\n                xl = x - 1;\r\n                // walk to left side starting with the left neighbor\r\n                while (xl > -1) {\r\n                    dyl = dy + xl;\r\n                    i = dyl * bytes; // point index in the image data\r\n                    if (visited[dyl] === 1) break; // check whether the point has been visited\r\n                    // compare the color of the sample\r\n                    c = data[i] - sampleColor[0]; // check by red\r\n                    if (c > colorThreshold || c < -colorThreshold) break;\r\n                    c = data[i + 1] - sampleColor[1]; // check by green\r\n                    if (c > colorThreshold || c < -colorThreshold) break;\r\n                    c = data[i + 2] - sampleColor[2]; // check by blue\r\n                    if (c > colorThreshold || c < -colorThreshold) break;\r\n\r\n                    result[dyl] = 1;\r\n                    visited[dyl] = 1;\r\n\r\n                    xl--;\r\n                }\r\n                xr = x + 1;\r\n                // walk to right side starting with the right neighbor\r\n                while (xr < w) {\r\n                    dyr = dy + xr;\r\n                    i = dyr * bytes; // index point in the image data\r\n                    if (visited[dyr] === 1) break; // check whether the point has been visited\r\n                    // compare the color of the sample\r\n                    c = data[i] - sampleColor[0]; // check by red\r\n                    if (c > colorThreshold || c < -colorThreshold) break;\r\n                    c = data[i + 1] - sampleColor[1]; // check by green\r\n                    if (c > colorThreshold || c < -colorThreshold) break;\r\n                    c = data[i + 2] - sampleColor[2]; // check by blue\r\n                    if (c > colorThreshold || c < -colorThreshold) break;\r\n\r\n                    result[dyr] = 1;\r\n                    visited[dyr] = 1;\r\n\r\n                    xr++;\r\n                }\r\n\r\n                // check minmax for X\r\n                if (xl < minX) minX = xl + 1;\r\n                if (xr > maxX) maxX = xr - 1;\r\n\r\n                newY = el.y - el.dir;\r\n                if (newY >= 0 && newY < h) { // add two scanning lines in the opposite direction (y - dir) if necessary\r\n                    if (xl < el.left) stack.push({ y: newY, left: xl, right: el.left, dir: -el.dir }); // from \"new left\" to \"current left\"\r\n                    if (el.right < xr) stack.push({ y: newY, left: el.right, right: xr, dir: -el.dir }); // from \"current right\" to \"new right\"\r\n                }\r\n                newY = el.y + el.dir;\r\n                if (newY >= 0 && newY < h) { // add the scanning line in the direction (y + dir) if necessary\r\n                    if (xl < xr) stack.push({ y: newY, left: xl, right: xr, dir: el.dir }); // from \"new left\" to \"new right\"\r\n                }\r\n            }\r\n            // check minmax for Y if necessary\r\n            if (checkY) {\r\n                if (el.y < minY) minY = el.y;\r\n                if (el.y > maxY) maxY = el.y;\r\n            }\r\n        } while (stack.length > 0);\r\n\r\n        return {\r\n            data: result,\r\n            width: image.width,\r\n            height: image.height,\r\n            bounds: {\r\n                minX: minX,\r\n                minY: minY,\r\n                maxX: maxX,\r\n                maxY: maxY\r\n            }\r\n        };\r\n    }\r\n    function floodFillWithBorders(image, px, py, colorThreshold, mask) {\r\n\r\n        var c, x, newY, el, xr, xl, dy, dyl, dyr, checkY,\r\n            data = image.data,\r\n            w = image.width,\r\n            h = image.height,\r\n            bytes = image.bytes, // number of bytes in the color\r\n            maxX = -1, minX = w + 1, maxY = -1, minY = h + 1,\r\n            i = py * w + px, // start point index in the mask data\r\n            result = new Uint8Array(w * h), // result mask\r\n            visited = new Uint8Array(mask ? mask : w * h); // mask of visited points\r\n\r\n        if (visited[i] === 1) return null;\r\n\r\n        i = i * bytes; // start point index in the image data\r\n        var sampleColor = [data[i], data[i + 1], data[i + 2], data[i + 3]]; // start point color (sample)\r\n\r\n        var stack = [{ y: py, left: px - 1, right: px + 1, dir: 1 }]; // first scanning line\r\n        do {\r\n            el = stack.shift(); // get line for scanning\r\n\r\n            checkY = false;\r\n            for (x = el.left + 1; x < el.right; x++) {\r\n                dy = el.y * w;\r\n                i = (dy + x) * bytes; // point index in the image data\r\n\r\n                if (visited[dy + x] === 1) continue; // check whether the point has been visited\r\n\r\n                checkY = true; // if the color of the new point(x,y) is similar to the sample color need to check minmax for Y \r\n\r\n                result[dy + x] = 1; // mark a new point in mask\r\n                visited[dy + x] = 1; // mark a new point as visited\r\n\r\n                // compare the color of the sample\r\n                c = data[i] - sampleColor[0]; // check by red\r\n                if (c > colorThreshold || c < -colorThreshold) continue;\r\n                c = data[i + 1] - sampleColor[1]; // check by green\r\n                if (c > colorThreshold || c < -colorThreshold) continue;\r\n                c = data[i + 2] - sampleColor[2]; // check by blue\r\n                if (c > colorThreshold || c < -colorThreshold) continue;\r\n\r\n                xl = x - 1;\r\n                // walk to left side starting with the left neighbor\r\n                while (xl > -1) {\r\n                    dyl = dy + xl;\r\n                    i = dyl * bytes; // point index in the image data\r\n                    if (visited[dyl] === 1) break; // check whether the point has been visited\r\n\r\n                    result[dyl] = 1;\r\n                    visited[dyl] = 1;\r\n                    xl--;\r\n\r\n                    // compare the color of the sample\r\n                    c = data[i] - sampleColor[0]; // check by red\r\n                    if (c > colorThreshold || c < -colorThreshold) break;\r\n                    c = data[i + 1] - sampleColor[1]; // check by green\r\n                    if (c > colorThreshold || c < -colorThreshold) break;\r\n                    c = data[i + 2] - sampleColor[2]; // check by blue\r\n                    if (c > colorThreshold || c < -colorThreshold) break;\r\n                }\r\n                xr = x + 1;\r\n                // walk to right side starting with the right neighbor\r\n                while (xr < w) {\r\n                    dyr = dy + xr;\r\n                    i = dyr * bytes; // index point in the image data\r\n                    if (visited[dyr] === 1) break; // check whether the point has been visited\r\n\r\n                    result[dyr] = 1;\r\n                    visited[dyr] = 1;\r\n                    xr++;\r\n\r\n                    // compare the color of the sample\r\n                    c = data[i] - sampleColor[0]; // check by red\r\n                    if (c > colorThreshold || c < -colorThreshold) break;\r\n                    c = data[i + 1] - sampleColor[1]; // check by green\r\n                    if (c > colorThreshold || c < -colorThreshold) break;\r\n                    c = data[i + 2] - sampleColor[2]; // check by blue\r\n                    if (c > colorThreshold || c < -colorThreshold) break;\r\n                }\r\n\r\n                // check minmax for X\r\n                if (xl < minX) minX = xl + 1;\r\n                if (xr > maxX) maxX = xr - 1;\r\n\r\n                newY = el.y - el.dir;\r\n                if (newY >= 0 && newY < h) { // add two scanning lines in the opposite direction (y - dir) if necessary\r\n                    if (xl < el.left) stack.push({ y: newY, left: xl, right: el.left, dir: -el.dir }); // from \"new left\" to \"current left\"\r\n                    if (el.right < xr) stack.push({ y: newY, left: el.right, right: xr, dir: -el.dir }); // from \"current right\" to \"new right\"\r\n                }\r\n                newY = el.y + el.dir;\r\n                if (newY >= 0 && newY < h) { // add the scanning line in the direction (y + dir) if necessary\r\n                    if (xl < xr) stack.push({ y: newY, left: xl, right: xr, dir: el.dir }); // from \"new left\" to \"new right\"\r\n                }\r\n            }\r\n            // check minmax for Y if necessary\r\n            if (checkY) {\r\n                if (el.y < minY) minY = el.y;\r\n                if (el.y > maxY) maxY = el.y;\r\n            }\r\n        } while (stack.length > 0);\r\n\r\n        return {\r\n            data: result,\r\n            width: image.width,\r\n            height: image.height,\r\n            bounds: {\r\n                minX: minX,\r\n                minY: minY,\r\n                maxX: maxX,\r\n                maxY: maxY\r\n            }\r\n        };\r\n    }\r\n    /** Apply the gauss-blur filter to binary mask\r\n      * Algorithms: http://blog.ivank.net/fastest-gaussian-blur.html\r\n      * http://www.librow.com/articles/article-9\r\n      * http://elynxsdk.free.fr/ext-docs/Blur/Fast_box_blur.pdf\r\n      * @param {Object} mask: {Uint8Array} data, {int} width, {int} height, {Object} bounds\r\n      * @param {int} blur radius\r\n      * @return {Object} mask: {Uint8Array} data, {int} width, {int} height, {Object} bounds\r\n      */\r\n    lib.gaussBlur = function(mask, radius) {\r\n\r\n        var i, k, k1, x, y, val, start, end,\r\n            n = radius * 2 + 1, // size of the pattern for radius-neighbors (from -r to +r with the center point)\r\n            s2 = radius * radius,\r\n            wg = new Float32Array(n), // weights\r\n            total = 0, // sum of weights(used for normalization)\r\n            w = mask.width,\r\n            h = mask.height,\r\n            data = mask.data,\r\n            minX = mask.bounds.minX,\r\n            maxX = mask.bounds.maxX,\r\n            minY = mask.bounds.minY,\r\n            maxY = mask.bounds.maxY;\r\n\r\n        // calc gauss weights\r\n        for (i = 0; i < radius; i++) {\r\n            var dsq = (radius - i) * (radius - i);\r\n            var ww = Math.exp(-dsq / (2.0 * s2)) / (2 * Math.PI * s2);\r\n            wg[radius + i] = wg[radius - i] = ww;\r\n            total += 2 * ww;\r\n        }\r\n        // normalization weights\r\n        for (i = 0; i < n; i++) {\r\n            wg[i] /= total;\r\n        }\r\n\r\n        var result = new Uint8Array(w * h), // result mask\r\n            endX = radius + w,\r\n            endY = radius + h;\r\n\r\n        //walk through all source points for blur\r\n        for (y = minY; y < maxY + 1; y++)\r\n            for (x = minX; x < maxX + 1; x++) {\r\n                val = 0;\r\n                k = y * w + x; // index of the point\r\n                start = radius - x > 0 ? radius - x : 0;\r\n                end = endX - x < n ? endX - x : n; // Math.min((((w - 1) - x) + radius) + 1, n);\r\n                k1 = k - radius;\r\n                // walk through x-neighbors\r\n                for (i = start; i < end; i++) {\r\n                    val += data[k1 + i] * wg[i];\r\n                }\r\n                start = radius - y > 0 ? radius - y : 0;\r\n                end = endY - y < n ? endY - y : n; // Math.min((((h - 1) - y) + radius) + 1, n);\r\n                k1 = k - radius * w;\r\n                // walk through y-neighbors\r\n                for (i = start; i < end; i++) {\r\n                    val += data[k1 + i * w] * wg[i];\r\n                }\r\n                result[k] = val > 0.5 ? 1 : 0;\r\n            }\r\n\r\n        return {\r\n            data: result,\r\n            width: w,\r\n            height: h,\r\n            bounds: {\r\n                minX: minX,\r\n                minY: minY,\r\n                maxX: maxX,\r\n                maxY: maxY\r\n            }\r\n        };\r\n    };\r\n\r\n    /** Create a border index array of boundary points of the mask with radius-neighbors\r\n      * @param {Object} mask: {Uint8Array} data, {int} width, {int} height, {Object} bounds\r\n      * @param {int} blur radius\r\n      * @param {Uint8Array} visited: mask of visited points (optional) \r\n      * @return {Array} border index array of boundary points with radius-neighbors (only points need for blur)\r\n      */\r\n    function createBorderForBlur(mask, radius, visited) {\r\n\r\n        var x, i, j, y, k, k1, k2,\r\n            w = mask.width,\r\n            h = mask.height,\r\n            data = mask.data,\r\n            visitedData = new Uint8Array(data),\r\n            minX = mask.bounds.minX,\r\n            maxX = mask.bounds.maxX,\r\n            minY = mask.bounds.minY,\r\n            maxY = mask.bounds.maxY,\r\n            len = w * h,\r\n            temp = new Uint8Array(len), // auxiliary array to check uniqueness\r\n            border = [], // only border points\r\n            x0 = Math.max(minX, 1),\r\n            x1 = Math.min(maxX, w - 2),\r\n            y0 = Math.max(minY, 1),\r\n            y1 = Math.min(maxY, h - 2);\r\n\r\n        if (visited && visited.length > 0) {\r\n            // copy visited points (only \"black\")\r\n            for (k = 0; k < len; k++) {\r\n                if (visited[k] === 1) visitedData[k] = 1;\r\n            }\r\n        }\r\n\r\n        // walk through inner values except points on the boundary of the image\r\n        for (y = y0; y < y1 + 1; y++)\r\n            for (x = x0; x < x1 + 1; x++) {\r\n                k = y * w + x;\r\n                if (data[k] === 0) continue; // \"white\" point isn't the border\r\n                k1 = k + w; // y + 1\r\n                k2 = k - w; // y - 1\r\n                // check if any neighbor with a \"white\" color\r\n                if (visitedData[k + 1] === 0 || visitedData[k - 1] === 0 ||\r\n                    visitedData[k1] === 0 || visitedData[k1 + 1] === 0 || visitedData[k1 - 1] === 0 ||\r\n                    visitedData[k2] === 0 || visitedData[k2 + 1] === 0 || visitedData[k2 - 1] === 0) {\r\n                    //if (visitedData[k + 1] + visitedData[k - 1] + \r\n                    //    visitedData[k1] + visitedData[k1 + 1] + visitedData[k1 - 1] +\r\n                    //    visitedData[k2] + visitedData[k2 + 1] + visitedData[k2 - 1] == 8) continue;\r\n                    border.push(k);\r\n                }\r\n            }\r\n\r\n        // walk through points on the boundary of the image if necessary\r\n        // if the \"black\" point is adjacent to the boundary of the image, it is a border point\r\n        if (minX == 0)\r\n            for (y = minY; y < maxY + 1; y++)\r\n                if (data[y * w] === 1)\r\n                    border.push(y * w);\r\n\r\n        if (maxX == w - 1)\r\n            for (y = minY; y < maxY + 1; y++)\r\n                if (data[y * w + maxX] === 1)\r\n                    border.push(y * w + maxX);\r\n\r\n        if (minY == 0)\r\n            for (x = minX; x < maxX + 1; x++)\r\n                if (data[x] === 1)\r\n                    border.push(x);\r\n\r\n        if (maxY == h - 1)\r\n            for (x = minX; x < maxX + 1; x++)\r\n                if (data[maxY * w + x] === 1)\r\n                    border.push(maxY * w + x);\r\n\r\n        var result = [], // border points with radius-neighbors\r\n            start, end,\r\n            endX = radius + w,\r\n            endY = radius + h,\r\n            n = radius * 2 + 1; // size of the pattern for radius-neighbors (from -r to +r with the center point)\r\n\r\n        len = border.length;\r\n        // walk through radius-neighbors of border points and add them to the result array\r\n        for (j = 0; j < len; j++) {\r\n            k = border[j]; // index of the border point\r\n            temp[k] = 1; // mark border point\r\n            result.push(k); // save the border point\r\n            x = k % w; // calc x by index\r\n            y = (k - x) / w; // calc y by index\r\n            start = radius - x > 0 ? radius - x : 0;\r\n            end = endX - x < n ? endX - x : n; // Math.min((((w - 1) - x) + radius) + 1, n);\r\n            k1 = k - radius;\r\n            // walk through x-neighbors\r\n            for (i = start; i < end; i++) {\r\n                k2 = k1 + i;\r\n                if (temp[k2] === 0) { // check the uniqueness\r\n                    temp[k2] = 1;\r\n                    result.push(k2);\r\n                }\r\n            }\r\n            start = radius - y > 0 ? radius - y : 0;\r\n            end = endY - y < n ? endY - y : n; // Math.min((((h - 1) - y) + radius) + 1, n);\r\n            k1 = k - radius * w;\r\n            // walk through y-neighbors\r\n            for (i = start; i < end; i++) {\r\n                k2 = k1 + i * w;\r\n                if (temp[k2] === 0) { // check the uniqueness\r\n                    temp[k2] = 1;\r\n                    result.push(k2);\r\n                }\r\n            }\r\n        }\r\n\r\n        return result;\r\n    }\r\n    /** Apply the gauss-blur filter ONLY to border points with radius-neighbors\r\n      * Algorithms: http://blog.ivank.net/fastest-gaussian-blur.html\r\n      * http://www.librow.com/articles/article-9\r\n      * http://elynxsdk.free.fr/ext-docs/Blur/Fast_box_blur.pdf\r\n      * @param {Object} mask: {Uint8Array} data, {int} width, {int} height, {Object} bounds\r\n      * @param {int} blur radius\r\n      * @param {Uint8Array} visited: mask of visited points (optional) \r\n      * @return {Object} mask: {Uint8Array} data, {int} width, {int} height, {Object} bounds\r\n      */\r\n    lib.gaussBlurOnlyBorder = function(mask, radius, visited) {\r\n\r\n        var border = createBorderForBlur(mask, radius, visited), // get border points with radius-neighbors\r\n            ww, dsq, i, j, k, k1, x, y, val, start, end,\r\n            n = radius * 2 + 1, // size of the pattern for radius-neighbors (from -r to +r with center point)\r\n            s2 = 2 * radius * radius,\r\n            wg = new Float32Array(n), // weights\r\n            total = 0, // sum of weights(used for normalization)\r\n            w = mask.width,\r\n            h = mask.height,\r\n            data = mask.data,\r\n            minX = mask.bounds.minX,\r\n            maxX = mask.bounds.maxX,\r\n            minY = mask.bounds.minY,\r\n            maxY = mask.bounds.maxY,\r\n            len = border.length;\r\n\r\n        // calc gauss weights\r\n        for (i = 0; i < radius; i++) {\r\n            dsq = (radius - i) * (radius - i);\r\n            ww = Math.exp(-dsq / s2) / Math.PI;\r\n            wg[radius + i] = wg[radius - i] = ww;\r\n            total += 2 * ww;\r\n        }\r\n        // normalization weights\r\n        for (i = 0; i < n; i++) {\r\n            wg[i] /= total;\r\n        }\r\n\r\n        var result = new Uint8Array(data), // copy the source mask\r\n            endX = radius + w,\r\n            endY = radius + h;\r\n\r\n        //walk through all border points for blur\r\n        for (i = 0; i < len; i++) {\r\n            k = border[i]; // index of the border point\r\n            val = 0;\r\n            x = k % w; // calc x by index\r\n            y = (k - x) / w; // calc y by index\r\n            start = radius - x > 0 ? radius - x : 0;\r\n            end = endX - x < n ? endX - x : n; // Math.min((((w - 1) - x) + radius) + 1, n);\r\n            k1 = k - radius;\r\n            // walk through x-neighbors\r\n            for (j = start; j < end; j++) {\r\n                val += data[k1 + j] * wg[j];\r\n            }\r\n            if (val > 0.5) {\r\n                result[k] = 1;\r\n                // check minmax\r\n                if (x < minX) minX = x;\r\n                if (x > maxX) maxX = x;\r\n                if (y < minY) minY = y;\r\n                if (y > maxY) maxY = y;\r\n                continue;\r\n            }\r\n            start = radius - y > 0 ? radius - y : 0;\r\n            end = endY - y < n ? endY - y : n; // Math.min((((h - 1) - y) + radius) + 1, n);\r\n            k1 = k - radius * w;\r\n            // walk through y-neighbors\r\n            for (j = start; j < end; j++) {\r\n                val += data[k1 + j * w] * wg[j];\r\n            }\r\n            if (val > 0.5) {\r\n                result[k] = 1;\r\n                // check minmax\r\n                if (x < minX) minX = x;\r\n                if (x > maxX) maxX = x;\r\n                if (y < minY) minY = y;\r\n                if (y > maxY) maxY = y;\r\n            } else {\r\n                result[k] = 0;\r\n            }\r\n        }\r\n\r\n        return {\r\n            data: result,\r\n            width: w,\r\n            height: h,\r\n            bounds: {\r\n                minX: minX,\r\n                minY: minY,\r\n                maxX: maxX,\r\n                maxY: maxY\r\n            }\r\n        };\r\n    };\r\n\r\n    /** Create a border mask (only boundary points)\r\n      * @param {Object} mask: {Uint8Array} data, {int} width, {int} height, {Object} bounds\r\n      * @return {Object} border mask: {Uint8Array} data, {int} width, {int} height, {Object} offset\r\n      */\r\n    lib.createBorderMask = function(mask) {\r\n\r\n        var x, y, k, k1, k2,\r\n            w = mask.width,\r\n            h = mask.height,\r\n            data = mask.data,\r\n            minX = mask.bounds.minX,\r\n            maxX = mask.bounds.maxX,\r\n            minY = mask.bounds.minY,\r\n            maxY = mask.bounds.maxY,\r\n            rw = maxX - minX + 1, // bounds size\r\n            rh = maxY - minY + 1,\r\n            result = new Uint8Array(rw * rh), // reduced mask (bounds size)\r\n            x0 = Math.max(minX, 1),\r\n            x1 = Math.min(maxX, w - 2),\r\n            y0 = Math.max(minY, 1),\r\n            y1 = Math.min(maxY, h - 2);\r\n\r\n        // walk through inner values except points on the boundary of the image\r\n        for (y = y0; y < y1 + 1; y++)\r\n            for (x = x0; x < x1 + 1; x++) {\r\n                k = y * w + x;\r\n                if (data[k] === 0) continue; // \"white\" point isn't the border\r\n                k1 = k + w; // y + 1\r\n                k2 = k - w; // y - 1\r\n                // check if any neighbor with a \"white\" color\r\n                if (data[k + 1] === 0 || data[k - 1] === 0 ||\r\n                    data[k1] === 0 || data[k1 + 1] === 0 || data[k1 - 1] === 0 ||\r\n                    data[k2] === 0 || data[k2 + 1] === 0 || data[k2 - 1] === 0) {\r\n                    //if (data[k + 1] + data[k - 1] + \r\n                    //    data[k1] + data[k1 + 1] + data[k1 - 1] +\r\n                    //    data[k2] + data[k2 + 1] + data[k2 - 1] == 8) continue;\r\n                    result[(y - minY) * rw + (x - minX)] = 1;\r\n                }\r\n            }\r\n\r\n        // walk through points on the boundary of the image if necessary\r\n        // if the \"black\" point is adjacent to the boundary of the image, it is a border point\r\n        if (minX == 0)\r\n            for (y = minY; y < maxY + 1; y++)\r\n                if (data[y * w] === 1)\r\n                    result[(y - minY) * rw] = 1;\r\n\r\n        if (maxX == w - 1)\r\n            for (y = minY; y < maxY + 1; y++)\r\n                if (data[y * w + maxX] === 1)\r\n                    result[(y - minY) * rw + (maxX - minX)] = 1;\r\n\r\n        if (minY == 0)\r\n            for (x = minX; x < maxX + 1; x++)\r\n                if (data[x] === 1)\r\n                    result[x - minX] = 1;\r\n\r\n        if (maxY == h - 1)\r\n            for (x = minX; x < maxX + 1; x++)\r\n                if (data[maxY * w + x] === 1)\r\n                    result[(maxY - minY) * rw + (x - minX)] = 1;\r\n\r\n        return {\r\n            data: result,\r\n            width: rw,\r\n            height: rh,\r\n            offset: { x: minX, y: minY }\r\n        };\r\n    };\r\n    \r\n    /** Create a border index array of boundary points of the mask\r\n      * @param {Object} mask: {Uint8Array} data, {int} width, {int} height\r\n      * @return {Array} border index array boundary points of the mask\r\n      */\r\n    lib.getBorderIndices = function(mask) {\r\n\r\n        var x, y, k, k1, k2,\r\n            w = mask.width,\r\n            h = mask.height,\r\n            data = mask.data,\r\n            border = [], // only border points\r\n            x1 = w - 1,\r\n            y1 = h - 1;\r\n\r\n        // walk through inner values except points on the boundary of the image\r\n        for (y = 1; y < y1; y++)\r\n            for (x = 1; x < x1; x++) {\r\n                k = y * w + x;\r\n                if (data[k] === 0) continue; // \"white\" point isn't the border\r\n                k1 = k + w; // y + 1\r\n                k2 = k - w; // y - 1\r\n                // check if any neighbor with a \"white\" color\r\n                if (data[k + 1] === 0 || data[k - 1] === 0 ||\r\n                    data[k1] === 0 || data[k1 + 1] === 0 || data[k1 - 1] === 0 ||\r\n                    data[k2] === 0 || data[k2 + 1] === 0 || data[k2 - 1] === 0) {\r\n                    //if (data[k + 1] + data[k - 1] + \r\n                    //    data[k1] + data[k1 + 1] + data[k1 - 1] +\r\n                    //    data[k2] + data[k2 + 1] + data[k2 - 1] == 8) continue;\r\n                    border.push(k);\r\n                }\r\n            }\r\n\r\n        // walk through points on the boundary of the image if necessary\r\n        // if the \"black\" point is adjacent to the boundary of the image, it is a border point\r\n        for (y = 0; y < h; y++)\r\n            if (data[y * w] === 1)\r\n                border.push(y * w);\r\n\r\n        for (x = 0; x < w; x++)\r\n            if (data[x] === 1)\r\n                border.push(x);\r\n\r\n        k = w - 1;\r\n        for (y = 0; y < h; y++)\r\n            if (data[y * w + k] === 1)\r\n                border.push(y * w + k);\r\n\r\n        k = (h - 1) * w;\r\n        for (x = 0; x < w; x++)\r\n            if (data[k + x] === 1)\r\n                border.push(k + x);\r\n\r\n        return border;\r\n    };\r\n    \r\n    /** Create a compressed mask with a \"white\" border (1px border with zero values) for the contour tracing\r\n      * @param {Object} mask: {Uint8Array} data, {int} width, {int} height, {Object} bounds\r\n      * @return {Object} border mask: {Uint8Array} data, {int} width, {int} height, {Object} offset\r\n      */\r\n    function prepareMask(mask) {\r\n        var x, y,\r\n            w = mask.width,\r\n            data = mask.data,\r\n            minX = mask.bounds.minX,\r\n            maxX = mask.bounds.maxX,\r\n            minY = mask.bounds.minY,\r\n            maxY = mask.bounds.maxY,\r\n            rw = maxX - minX + 3, // bounds size +1 px on each side (a \"white\" border)\r\n            rh = maxY - minY + 3,\r\n            result = new Uint8Array(rw * rh); // reduced mask (bounds size)\r\n\r\n        // walk through inner values and copy only \"black\" points to the result mask\r\n        for (y = minY; y < maxY + 1; y++)\r\n            for (x = minX; x < maxX + 1; x++) {\r\n                if (data[y * w + x] === 1)\r\n                    result[(y - minY + 1) * rw + (x - minX + 1)] = 1;\r\n            }\r\n\r\n        return {\r\n            data: result,\r\n            width: rw,\r\n            height: rh,\r\n            offset: { x: minX - 1, y: minY - 1 }\r\n        };\r\n    }        \r\n    /** Create a contour array for the binary mask\r\n      * Algorithm: http://www.sciencedirect.com/science/article/pii/S1077314203001401\r\n      * @param {Object} mask: {Uint8Array} data, {int} width, {int} height, {Object} bounds\r\n      * @return {Array} contours: {Array} points, {bool} inner, {int} label\r\n      */\r\n    lib.traceContours = function(mask) {\r\n        var m = prepareMask(mask),\r\n            contours = [],\r\n            label = 0,\r\n            w = m.width,\r\n            w2 = w * 2,\r\n            h = m.height,\r\n            src = m.data,\r\n            dx = m.offset.x,\r\n            dy = m.offset.y,\r\n            dest = new Uint8Array(src), // label matrix\r\n            i, j, x, y, k, k1, c, inner, dir, first, second, current, previous, next, d;\r\n\r\n        // all [dx,dy] pairs (array index is the direction)\r\n        // 5 6 7\r\n        // 4 X 0\r\n        // 3 2 1\r\n        var directions = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]];\r\n\r\n        for (y = 1; y < h - 1; y++)\r\n            for (x = 1; x < w - 1; x++) {\r\n                k = y * w + x;\r\n                if (src[k] === 1) {\r\n                    for (i = -w; i < w2; i += w2) { // k - w: outer tracing (y - 1), k + w: inner tracing (y + 1)\r\n                        if (src[k + i] === 0 && dest[k + i] === 0) { // need contour tracing\r\n                            inner = i === w; // is inner contour tracing ?\r\n                            label++; // label for the next contour\r\n\r\n                            c = [];\r\n                            dir = inner ? 2 : 6; // start direction\r\n                            current = previous = first = { x: x, y: y };\r\n                            second = null;\r\n                            while (true) {\r\n                                dest[current.y * w + current.x] = label; // mark label for the current point \r\n                                // bypass all the neighbors around the current point in a clockwise\r\n                                for (j = 0; j < 8; j++) {\r\n                                    dir = (dir + 1) % 8;\r\n\r\n                                    // get the next point by new direction\r\n                                    d = directions[dir]; // index as direction\r\n                                    next = { x: current.x + d[0], y: current.y + d[1] };\r\n\r\n                                    k1 = next.y * w + next.x;\r\n                                    if (src[k1] === 1) // black boundary pixel\r\n                                    {\r\n                                        dest[k1] = label; // mark a label\r\n                                        break;\r\n                                    }\r\n                                    dest[k1] = -1; // mark a white boundary pixel\r\n                                    next = null;\r\n                                }\r\n                                if (next === null) break; // no neighbours (one-point contour)\r\n                                current = next;\r\n                                if (second) {\r\n                                    if (previous.x === first.x && previous.y === first.y && current.x === second.x && current.y === second.y) {\r\n                                        break; // creating the contour completed when returned to original position\r\n                                    }\r\n                                } else {\r\n                                    second = next;\r\n                                }\r\n                                c.push({ x: previous.x + dx, y: previous.y + dy });\r\n                                previous = current;\r\n                                dir = (dir + 4) % 8; // next dir (symmetrically to the current direction)\r\n                            }\r\n\r\n                            if (next != null) {\r\n                                c.push({ x: first.x + dx, y: first.y + dy }); // close the contour\r\n                                contours.push({ inner: inner, label: label, points: c }); // add contour to the list\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n\r\n        return contours;\r\n    };\r\n    \r\n    /** Simplify contours\r\n      * Algorithms: http://psimpl.sourceforge.net/douglas-peucker.html \r\n      * http://neerc.ifmo.ru/wiki/index.php?title=%D0%A3%D0%BF%D1%80%D0%BE%D1%89%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BF%D0%BE%D0%BB%D0%B8%D0%B3%D0%BE%D0%BD%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D0%B9_%D1%86%D0%B5%D0%BF%D0%B8\r\n      * @param {Array} contours: {Array} points, {bool} inner, {int} label\r\n      * @param {float} simplify tolerant\r\n      * @param {int} simplify count: min number of points when the contour is simplified\r\n      * @return {Array} contours: {Array} points, {bool} inner, {int} label, {int} initialCount\r\n      */\r\n    lib.simplifyContours = function(contours, simplifyTolerant, simplifyCount) {\r\n        var lenContours = contours.length,\r\n            result = [],\r\n            i, j, k, c, points, len, resPoints, lst, stack, ids,\r\n            maxd, maxi, dist, r1, r2, r12, dx, dy, pi, pf, pl;\r\n\r\n        // walk through all contours \r\n        for (j = 0; j < lenContours; j++) {\r\n            c = contours[j];\r\n            points = c.points;\r\n            len = c.points.length;\r\n\r\n            if (len < simplifyCount) { // contour isn't simplified\r\n                resPoints = [];\r\n                for (k = 0; k < len; k++) {\r\n                    resPoints.push({ x: points[k].x, y: points[k].y });\r\n                }\r\n                result.push({ inner: c.inner, label: c.label, points: resPoints, initialCount: len });\r\n                continue;\r\n            }\r\n\r\n            lst = [0, len - 1]; // always add first and last points\r\n            stack = [{ first: 0, last: len - 1 }]; // first processed edge\r\n\r\n            do {\r\n                ids = stack.shift();\r\n                if (ids.last <= ids.first + 1) // no intermediate points\r\n                {\r\n                    continue;\r\n                }\r\n\r\n                maxd = -1.0; // max distance from point to current edge\r\n                maxi = ids.first; // index of maximally distant point\r\n\r\n                for (i = ids.first + 1; i < ids.last; i++) // bypass intermediate points in edge\r\n                {\r\n                    // calc the distance from current point to edge\r\n                    pi = points[i];\r\n                    pf = points[ids.first];\r\n                    pl = points[ids.last];\r\n                    dx = pi.x - pf.x;\r\n                    dy = pi.y - pf.y;\r\n                    r1 = Math.sqrt(dx * dx + dy * dy);\r\n                    dx = pi.x - pl.x;\r\n                    dy = pi.y - pl.y;\r\n                    r2 = Math.sqrt(dx * dx + dy * dy);\r\n                    dx = pf.x - pl.x;\r\n                    dy = pf.y - pl.y;\r\n                    r12 = Math.sqrt(dx * dx + dy * dy);\r\n                    if (r1 >= Math.sqrt(r2 * r2 + r12 * r12)) dist = r2;\r\n                    else if (r2 >= Math.sqrt(r1 * r1 + r12 * r12)) dist = r1;\r\n                    else dist = Math.abs((dy * pi.x - dx * pi.y + pf.x * pl.y - pl.x * pf.y) / r12);\r\n\r\n                    if (dist > maxd) {\r\n                        maxi = i; // save the index of maximally distant point\r\n                        maxd = dist;\r\n                    }\r\n                }\r\n\r\n                if (maxd > simplifyTolerant) // if the max \"deviation\" is larger than allowed then...\r\n                {\r\n                    lst.push(maxi); // add index to the simplified list\r\n                    stack.push({ first: ids.first, last: maxi }); // add the left part for processing\r\n                    stack.push({ first: maxi, last: ids.last }); // add the right part for processing\r\n                }\r\n\r\n            } while (stack.length > 0);\r\n\r\n            resPoints = [];\r\n            len = lst.length;\r\n            lst.sort(function(a, b) { return a - b; }); // restore index order\r\n            for (k = 0; k < len; k++) {\r\n                resPoints.push({ x: points[lst[k]].x, y: points[lst[k]].y }); // add result points to the correct order\r\n            }\r\n            result.push({ inner: c.inner, label: c.label, points: resPoints, initialCount: c.points.length });\r\n        }\r\n\r\n        return result;\r\n    };\r\n\r\n    return lib;\r\n})();\r\n\r\nmodule.exports = MagicWand;\n//# sourceMappingURL=magic-wand.js.map\n","/**\n * @module ol/style\n */\nexport { default as Circle } from './style/Circle.js';\nexport { default as Fill } from './style/Fill.js';\nexport { default as Icon } from './style/Icon.js';\nexport { default as IconImage } from './style/IconImage.js';\nexport { default as Image } from './style/Image.js';\nexport { default as RegularShape } from './style/RegularShape.js';\nexport { default as Stroke } from './style/Stroke.js';\nexport { default as Style } from './style/Style.js';\nexport { default as Text } from './style/Text.js';\n//# sourceMappingURL=style.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/DoubleClickZoom\n */\nimport Interaction, { zoomByDelta } from './Interaction.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [delta=1] The zoom delta applied on each double click.\n */\n/**\n * @classdesc\n * Allows the user to zoom by double-clicking on the map.\n * @api\n */\nvar DoubleClickZoom = /** @class */ (function (_super) {\n    __extends(DoubleClickZoom, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function DoubleClickZoom(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.delta_ = options.delta ? options.delta : 1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 250;\n        return _this;\n    }\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} (if it was a\n     * doubleclick) and eventually zooms the map.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     */\n    DoubleClickZoom.prototype.handleEvent = function (mapBrowserEvent) {\n        var stopEvent = false;\n        if (mapBrowserEvent.type == MapBrowserEventType.DBLCLICK) {\n            var browserEvent = /** @type {MouseEvent} */ (mapBrowserEvent.originalEvent);\n            var map = mapBrowserEvent.map;\n            var anchor = mapBrowserEvent.coordinate;\n            var delta = browserEvent.shiftKey ? -this.delta_ : this.delta_;\n            var view = map.getView();\n            zoomByDelta(view, delta, anchor, this.duration_);\n            browserEvent.preventDefault();\n            stopEvent = true;\n        }\n        return !stopEvent;\n    };\n    return DoubleClickZoom;\n}(Interaction));\nexport default DoubleClickZoom;\n//# sourceMappingURL=DoubleClickZoom.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/DragRotate\n */\nimport PointerInteraction from './Pointer.js';\nimport { FALSE } from '../functions.js';\nimport { altShiftKeysOnly, mouseActionButton, mouseOnly, } from '../events/condition.js';\nimport { disable } from '../rotationconstraint.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an\n * {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition.altShiftKeysOnly}.\n * @property {number} [duration=250] Animation duration in milliseconds.\n */\n/**\n * @classdesc\n * Allows the user to rotate the map by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when the alt and shift keys are held down.\n *\n * This interaction is only supported for mouse devices.\n * @api\n */\nvar DragRotate = /** @class */ (function (_super) {\n    __extends(DragRotate, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function DragRotate(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            stopDown: FALSE,\n        }) || this;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : altShiftKeysOnly;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.lastAngle_ = undefined;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 250;\n        return _this;\n    }\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     */\n    DragRotate.prototype.handleDragEvent = function (mapBrowserEvent) {\n        if (!mouseOnly(mapBrowserEvent)) {\n            return;\n        }\n        var map = mapBrowserEvent.map;\n        var view = map.getView();\n        if (view.getConstraints().rotation === disable) {\n            return;\n        }\n        var size = map.getSize();\n        var offset = mapBrowserEvent.pixel;\n        var theta = Math.atan2(size[1] / 2 - offset[1], offset[0] - size[0] / 2);\n        if (this.lastAngle_ !== undefined) {\n            var delta = theta - this.lastAngle_;\n            view.adjustRotationInternal(-delta);\n        }\n        this.lastAngle_ = theta;\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragRotate.prototype.handleUpEvent = function (mapBrowserEvent) {\n        if (!mouseOnly(mapBrowserEvent)) {\n            return true;\n        }\n        var map = mapBrowserEvent.map;\n        var view = map.getView();\n        view.endInteraction(this.duration_);\n        return false;\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragRotate.prototype.handleDownEvent = function (mapBrowserEvent) {\n        if (!mouseOnly(mapBrowserEvent)) {\n            return false;\n        }\n        if (mouseActionButton(mapBrowserEvent) &&\n            this.condition_(mapBrowserEvent)) {\n            var map = mapBrowserEvent.map;\n            map.getView().beginInteraction();\n            this.lastAngle_ = undefined;\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    return DragRotate;\n}(PointerInteraction));\nexport default DragRotate;\n//# sourceMappingURL=DragRotate.js.map","/**\n * @module ol/render/Box\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Disposable from '../Disposable.js';\nimport Polygon from '../geom/Polygon.js';\nvar RenderBox = /** @class */ (function (_super) {\n    __extends(RenderBox, _super);\n    /**\n     * @param {string} className CSS class name.\n     */\n    function RenderBox(className) {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {import(\"../geom/Polygon.js\").default}\n         * @private\n         */\n        _this.geometry_ = null;\n        /**\n         * @type {HTMLDivElement}\n         * @private\n         */\n        _this.element_ = document.createElement('div');\n        _this.element_.style.position = 'absolute';\n        _this.element_.style.pointerEvents = 'auto';\n        _this.element_.className = 'ol-box ' + className;\n        /**\n         * @private\n         * @type {import(\"../PluggableMap.js\").default}\n         */\n        _this.map_ = null;\n        /**\n         * @private\n         * @type {import(\"../pixel.js\").Pixel}\n         */\n        _this.startPixel_ = null;\n        /**\n         * @private\n         * @type {import(\"../pixel.js\").Pixel}\n         */\n        _this.endPixel_ = null;\n        return _this;\n    }\n    /**\n     * Clean up.\n     */\n    RenderBox.prototype.disposeInternal = function () {\n        this.setMap(null);\n    };\n    /**\n     * @private\n     */\n    RenderBox.prototype.render_ = function () {\n        var startPixel = this.startPixel_;\n        var endPixel = this.endPixel_;\n        var px = 'px';\n        var style = this.element_.style;\n        style.left = Math.min(startPixel[0], endPixel[0]) + px;\n        style.top = Math.min(startPixel[1], endPixel[1]) + px;\n        style.width = Math.abs(endPixel[0] - startPixel[0]) + px;\n        style.height = Math.abs(endPixel[1] - startPixel[1]) + px;\n    };\n    /**\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    RenderBox.prototype.setMap = function (map) {\n        if (this.map_) {\n            this.map_.getOverlayContainer().removeChild(this.element_);\n            var style = this.element_.style;\n            style.left = 'inherit';\n            style.top = 'inherit';\n            style.width = 'inherit';\n            style.height = 'inherit';\n        }\n        this.map_ = map;\n        if (this.map_) {\n            this.map_.getOverlayContainer().appendChild(this.element_);\n        }\n    };\n    /**\n     * @param {import(\"../pixel.js\").Pixel} startPixel Start pixel.\n     * @param {import(\"../pixel.js\").Pixel} endPixel End pixel.\n     */\n    RenderBox.prototype.setPixels = function (startPixel, endPixel) {\n        this.startPixel_ = startPixel;\n        this.endPixel_ = endPixel;\n        this.createOrUpdateGeometry();\n        this.render_();\n    };\n    /**\n     * Creates or updates the cached geometry.\n     */\n    RenderBox.prototype.createOrUpdateGeometry = function () {\n        var startPixel = this.startPixel_;\n        var endPixel = this.endPixel_;\n        var pixels = [\n            startPixel,\n            [startPixel[0], endPixel[1]],\n            endPixel,\n            [endPixel[0], startPixel[1]],\n        ];\n        var coordinates = pixels.map(this.map_.getCoordinateFromPixelInternal, this.map_);\n        // close the polygon\n        coordinates[4] = coordinates[0].slice();\n        if (!this.geometry_) {\n            this.geometry_ = new Polygon([coordinates]);\n        }\n        else {\n            this.geometry_.setCoordinates([coordinates]);\n        }\n    };\n    /**\n     * @return {import(\"../geom/Polygon.js\").default} Geometry.\n     */\n    RenderBox.prototype.getGeometry = function () {\n        return this.geometry_;\n    };\n    return RenderBox;\n}(Disposable));\nexport default RenderBox;\n//# sourceMappingURL=Box.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/DragBox\n */\n// FIXME draw drag box\nimport Event from '../events/Event.js';\nimport PointerInteraction from './Pointer.js';\nimport RenderBox from '../render/Box.js';\nimport { mouseActionButton } from '../events/condition.js';\n/**\n * A function that takes a {@link module:ol/MapBrowserEvent} and two\n * {@link module:ol/pixel~Pixel}s and returns a `{boolean}`. If the condition is met,\n * true should be returned.\n * @typedef {function(this: ?, import(\"../MapBrowserEvent.js\").default, import(\"../pixel.js\").Pixel, import(\"../pixel.js\").Pixel):boolean} EndCondition\n */\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-dragbox'] CSS class name for styling the box.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link ol/events/condition~mouseActionButton}.\n * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the default\n * `boxEndCondition` function.\n * @property {EndCondition} [boxEndCondition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two\n * {@link module:ol/pixel~Pixel}s to indicate whether a `boxend` event should be fired.\n * Default is `true` if the area of the box is bigger than the `minArea` option.\n * @property {function(this:DragBox, import(\"../MapBrowserEvent.js\").default):void} [onBoxEnd] Code to execute just\n * before `boxend` is fired.\n */\n/**\n * @enum {string}\n */\nvar DragBoxEventType = {\n    /**\n     * Triggered upon drag box start.\n     * @event DragBoxEvent#boxstart\n     * @api\n     */\n    BOXSTART: 'boxstart',\n    /**\n     * Triggered on drag when box is active.\n     * @event DragBoxEvent#boxdrag\n     * @api\n     */\n    BOXDRAG: 'boxdrag',\n    /**\n     * Triggered upon drag box end.\n     * @event DragBoxEvent#boxend\n     * @api\n     */\n    BOXEND: 'boxend',\n    /**\n     * Triggered upon drag box canceled.\n     * @event DragBoxEvent#boxcancel\n     * @api\n     */\n    BOXCANCEL: 'boxcancel',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/DragBox~DragBox} instances are instances of\n * this type.\n */\nvar DragBoxEvent = /** @class */ (function (_super) {\n    __extends(DragBoxEvent, _super);\n    /**\n     * @param {string} type The event type.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate The event coordinate.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Originating event.\n     */\n    function DragBoxEvent(type, coordinate, mapBrowserEvent) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The coordinate of the drag event.\n         * @const\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @api\n         */\n        _this.coordinate = coordinate;\n        /**\n         * @const\n         * @type {import(\"../MapBrowserEvent.js\").default}\n         * @api\n         */\n        _this.mapBrowserEvent = mapBrowserEvent;\n        return _this;\n    }\n    return DragBoxEvent;\n}(Event));\nexport { DragBoxEvent };\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types|\n *     'change:active', import(\"../Object\").ObjectEvent, Return> &\n *   import(\"../Observable\").OnSignature<'boxcancel'|'boxdrag'|'boxend', DragBoxEvent, Return> &\n *   import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"../ObjectEventType\").Types|\n *     'change:active'|'boxcancel'|'boxdrag'|'boxend', Return>} DragBoxOnSignature\n */\n/**\n * @classdesc\n * Allows the user to draw a vector box by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when the shift or other key is held down. This is used, for example,\n * for zooming to a specific area of the map\n * (see {@link module:ol/interaction/DragZoom~DragZoom} and\n * {@link module:ol/interaction/DragRotateAndZoom}).\n *\n * @fires DragBoxEvent\n * @api\n */\nvar DragBox = /** @class */ (function (_super) {\n    __extends(DragBox, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function DragBox(opt_options) {\n        var _this = _super.call(this) || this;\n        /***\n         * @type {DragBoxOnSignature<import(\"../Observable\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {DragBoxOnSignature<import(\"../Observable\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {DragBoxOnSignature<void>}\n         */\n        _this.un;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @type {import(\"../render/Box.js\").default}\n         * @private\n         */\n        _this.box_ = new RenderBox(options.className || 'ol-dragbox');\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.minArea_ = options.minArea !== undefined ? options.minArea : 64;\n        if (options.onBoxEnd) {\n            _this.onBoxEnd = options.onBoxEnd;\n        }\n        /**\n         * @type {import(\"../pixel.js\").Pixel}\n         * @private\n         */\n        _this.startPixel_ = null;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : mouseActionButton;\n        /**\n         * @private\n         * @type {EndCondition}\n         */\n        _this.boxEndCondition_ = options.boxEndCondition\n            ? options.boxEndCondition\n            : _this.defaultBoxEndCondition;\n        return _this;\n    }\n    /**\n     * The default condition for determining whether the boxend event\n     * should fire.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent The originating MapBrowserEvent\n     *     leading to the box end.\n     * @param {import(\"../pixel.js\").Pixel} startPixel The starting pixel of the box.\n     * @param {import(\"../pixel.js\").Pixel} endPixel The end pixel of the box.\n     * @return {boolean} Whether or not the boxend condition should be fired.\n     */\n    DragBox.prototype.defaultBoxEndCondition = function (mapBrowserEvent, startPixel, endPixel) {\n        var width = endPixel[0] - startPixel[0];\n        var height = endPixel[1] - startPixel[1];\n        return width * width + height * height >= this.minArea_;\n    };\n    /**\n     * Returns geometry of last drawn box.\n     * @return {import(\"../geom/Polygon.js\").default} Geometry.\n     * @api\n     */\n    DragBox.prototype.getGeometry = function () {\n        return this.box_.getGeometry();\n    };\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     */\n    DragBox.prototype.handleDragEvent = function (mapBrowserEvent) {\n        this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel);\n        this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXDRAG, mapBrowserEvent.coordinate, mapBrowserEvent));\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragBox.prototype.handleUpEvent = function (mapBrowserEvent) {\n        this.box_.setMap(null);\n        var completeBox = this.boxEndCondition_(mapBrowserEvent, this.startPixel_, mapBrowserEvent.pixel);\n        if (completeBox) {\n            this.onBoxEnd(mapBrowserEvent);\n        }\n        this.dispatchEvent(new DragBoxEvent(completeBox ? DragBoxEventType.BOXEND : DragBoxEventType.BOXCANCEL, mapBrowserEvent.coordinate, mapBrowserEvent));\n        return false;\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragBox.prototype.handleDownEvent = function (mapBrowserEvent) {\n        if (this.condition_(mapBrowserEvent)) {\n            this.startPixel_ = mapBrowserEvent.pixel;\n            this.box_.setMap(mapBrowserEvent.map);\n            this.box_.setPixels(this.startPixel_, this.startPixel_);\n            this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXSTART, mapBrowserEvent.coordinate, mapBrowserEvent));\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    /**\n     * Function to execute just before `onboxend` is fired\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     */\n    DragBox.prototype.onBoxEnd = function (event) { };\n    return DragBox;\n}(PointerInteraction));\nexport default DragBox;\n//# sourceMappingURL=DragBox.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/DragZoom\n */\nimport DragBox from './DragBox.js';\nimport { easeOut } from '../easing.js';\nimport { shiftKeyOnly } from '../events/condition.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-dragzoom'] CSS class name for styling the\n * box.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition.shiftKeyOnly}.\n * @property {number} [duration=200] Animation duration in milliseconds.\n * @property {boolean} [out=false] Use interaction for zooming out.\n * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the parent default\n * `boxEndCondition` function.\n */\n/**\n * @classdesc\n * Allows the user to zoom the map by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when a key, shift by default, is held down.\n *\n * To change the style of the box, use CSS and the `.ol-dragzoom` selector, or\n * your custom one configured with `className`.\n * @api\n */\nvar DragZoom = /** @class */ (function (_super) {\n    __extends(DragZoom, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function DragZoom(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var condition = options.condition ? options.condition : shiftKeyOnly;\n        _this = _super.call(this, {\n            condition: condition,\n            className: options.className || 'ol-dragzoom',\n            minArea: options.minArea,\n        }) || this;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 200;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.out_ = options.out !== undefined ? options.out : false;\n        return _this;\n    }\n    /**\n     * Function to execute just before `onboxend` is fired\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     */\n    DragZoom.prototype.onBoxEnd = function (event) {\n        var map = this.getMap();\n        var view = /** @type {!import(\"../View.js\").default} */ (map.getView());\n        var geometry = this.getGeometry();\n        if (this.out_) {\n            var rotatedExtent = view.rotatedExtentForGeometry(geometry);\n            var resolution = view.getResolutionForExtentInternal(rotatedExtent);\n            var factor = view.getResolution() / resolution;\n            geometry = geometry.clone();\n            geometry.scale(factor * factor);\n        }\n        view.fitInternal(geometry, {\n            duration: this.duration_,\n            easing: easeOut,\n        });\n    };\n    return DragZoom;\n}(DragBox));\nexport default DragZoom;\n//# sourceMappingURL=DragZoom.js.map","/**\n * @module ol/events/KeyCode\n */\n/**\n * @enum {number}\n * @const\n */\nexport default {\n    LEFT: 37,\n    UP: 38,\n    RIGHT: 39,\n    DOWN: 40,\n};\n//# sourceMappingURL=KeyCode.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/KeyboardPan\n */\nimport EventType from '../events/EventType.js';\nimport Interaction, { pan } from './Interaction.js';\nimport KeyCode from '../events/KeyCode.js';\nimport { noModifierKeys, targetNotEditable } from '../events/condition.js';\nimport { rotate as rotateCoordinate } from '../coordinate.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition.noModifierKeys} and\n * {@link module:ol/events/condition.targetNotEditable}.\n * @property {number} [duration=100] Animation duration in milliseconds.\n * @property {number} [pixelDelta=128] The amount of pixels to pan on each key\n * press.\n */\n/**\n * @classdesc\n * Allows the user to pan the map using keyboard arrows.\n * Note that, although this interaction is by default included in maps,\n * the keys can only be used when browser focus is on the element to which\n * the keyboard events are attached. By default, this is the map div,\n * though you can change this with the `keyboardEventTarget` in\n * {@link module:ol/Map~Map}. `document` never loses focus but, for any other\n * element, focus will have to be on, and returned to, this element if the keys\n * are to function.\n * See also {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}.\n * @api\n */\nvar KeyboardPan = /** @class */ (function (_super) {\n    __extends(KeyboardPan, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function KeyboardPan(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options || {};\n        /**\n         * @private\n         * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Browser event.\n         * @return {boolean} Combined condition result.\n         */\n        _this.defaultCondition_ = function (mapBrowserEvent) {\n            return (noModifierKeys(mapBrowserEvent) && targetNotEditable(mapBrowserEvent));\n        };\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ =\n            options.condition !== undefined\n                ? options.condition\n                : _this.defaultCondition_;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 100;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.pixelDelta_ =\n            options.pixelDelta !== undefined ? options.pixelDelta : 128;\n        return _this;\n    }\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} if it was a\n     * `KeyEvent`, and decides the direction to pan to (if an arrow key was\n     * pressed).\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     * @this {KeyboardPan}\n     */\n    KeyboardPan.prototype.handleEvent = function (mapBrowserEvent) {\n        var stopEvent = false;\n        if (mapBrowserEvent.type == EventType.KEYDOWN) {\n            var keyEvent = /** @type {KeyboardEvent} */ (mapBrowserEvent.originalEvent);\n            var keyCode = keyEvent.keyCode;\n            if (this.condition_(mapBrowserEvent) &&\n                (keyCode == KeyCode.DOWN ||\n                    keyCode == KeyCode.LEFT ||\n                    keyCode == KeyCode.RIGHT ||\n                    keyCode == KeyCode.UP)) {\n                var map = mapBrowserEvent.map;\n                var view = map.getView();\n                var mapUnitsDelta = view.getResolution() * this.pixelDelta_;\n                var deltaX = 0, deltaY = 0;\n                if (keyCode == KeyCode.DOWN) {\n                    deltaY = -mapUnitsDelta;\n                }\n                else if (keyCode == KeyCode.LEFT) {\n                    deltaX = -mapUnitsDelta;\n                }\n                else if (keyCode == KeyCode.RIGHT) {\n                    deltaX = mapUnitsDelta;\n                }\n                else {\n                    deltaY = mapUnitsDelta;\n                }\n                var delta = [deltaX, deltaY];\n                rotateCoordinate(delta, view.getRotation());\n                pan(view, delta, this.duration_);\n                keyEvent.preventDefault();\n                stopEvent = true;\n            }\n        }\n        return !stopEvent;\n    };\n    return KeyboardPan;\n}(Interaction));\nexport default KeyboardPan;\n//# sourceMappingURL=KeyboardPan.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/KeyboardZoom\n */\nimport EventType from '../events/EventType.js';\nimport Interaction, { zoomByDelta } from './Interaction.js';\nimport { targetNotEditable } from '../events/condition.js';\n/**\n * @typedef {Object} Options\n * @property {number} [duration=100] Animation duration in milliseconds.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition.targetNotEditable}.\n * @property {number} [delta=1] The zoom level delta on each key press.\n */\n/**\n * @classdesc\n * Allows the user to zoom the map using keyboard + and -.\n * Note that, although this interaction is by default included in maps,\n * the keys can only be used when browser focus is on the element to which\n * the keyboard events are attached. By default, this is the map div,\n * though you can change this with the `keyboardEventTarget` in\n * {@link module:ol/Map~Map}. `document` never loses focus but, for any other\n * element, focus will have to be on, and returned to, this element if the keys\n * are to function.\n * See also {@link module:ol/interaction/KeyboardPan~KeyboardPan}.\n * @api\n */\nvar KeyboardZoom = /** @class */ (function (_super) {\n    __extends(KeyboardZoom, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function KeyboardZoom(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : targetNotEditable;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.delta_ = options.delta ? options.delta : 1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 100;\n        return _this;\n    }\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} if it was a\n     * `KeyEvent`, and decides whether to zoom in or out (depending on whether the\n     * key pressed was '+' or '-').\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     * @this {KeyboardZoom}\n     */\n    KeyboardZoom.prototype.handleEvent = function (mapBrowserEvent) {\n        var stopEvent = false;\n        if (mapBrowserEvent.type == EventType.KEYDOWN ||\n            mapBrowserEvent.type == EventType.KEYPRESS) {\n            var keyEvent = /** @type {KeyboardEvent} */ (mapBrowserEvent.originalEvent);\n            var charCode = keyEvent.charCode;\n            if (this.condition_(mapBrowserEvent) &&\n                (charCode == '+'.charCodeAt(0) || charCode == '-'.charCodeAt(0))) {\n                var map = mapBrowserEvent.map;\n                var delta = charCode == '+'.charCodeAt(0) ? this.delta_ : -this.delta_;\n                var view = map.getView();\n                zoomByDelta(view, delta, undefined, this.duration_);\n                keyEvent.preventDefault();\n                stopEvent = true;\n            }\n        }\n        return !stopEvent;\n    };\n    return KeyboardZoom;\n}(Interaction));\nexport default KeyboardZoom;\n//# sourceMappingURL=KeyboardZoom.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/PinchRotate\n */\nimport PointerInteraction, { centroid as centroidFromPointers, } from './Pointer.js';\nimport { FALSE } from '../functions.js';\nimport { disable } from '../rotationconstraint.js';\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] The duration of the animation in\n * milliseconds.\n * @property {number} [threshold=0.3] Minimal angle in radians to start a rotation.\n */\n/**\n * @classdesc\n * Allows the user to rotate the map by twisting with two fingers\n * on a touch screen.\n * @api\n */\nvar PinchRotate = /** @class */ (function (_super) {\n    __extends(PinchRotate, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function PinchRotate(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n        if (!pointerOptions.stopDown) {\n            pointerOptions.stopDown = FALSE;\n        }\n        _this = _super.call(this, pointerOptions) || this;\n        /**\n         * @private\n         * @type {import(\"../coordinate.js\").Coordinate}\n         */\n        _this.anchor_ = null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.lastAngle_ = undefined;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.rotating_ = false;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.rotationDelta_ = 0.0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.threshold_ = options.threshold !== undefined ? options.threshold : 0.3;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 250;\n        return _this;\n    }\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     */\n    PinchRotate.prototype.handleDragEvent = function (mapBrowserEvent) {\n        var rotationDelta = 0.0;\n        var touch0 = this.targetPointers[0];\n        var touch1 = this.targetPointers[1];\n        // angle between touches\n        var angle = Math.atan2(touch1.clientY - touch0.clientY, touch1.clientX - touch0.clientX);\n        if (this.lastAngle_ !== undefined) {\n            var delta = angle - this.lastAngle_;\n            this.rotationDelta_ += delta;\n            if (!this.rotating_ && Math.abs(this.rotationDelta_) > this.threshold_) {\n                this.rotating_ = true;\n            }\n            rotationDelta = delta;\n        }\n        this.lastAngle_ = angle;\n        var map = mapBrowserEvent.map;\n        var view = map.getView();\n        if (view.getConstraints().rotation === disable) {\n            return;\n        }\n        // rotate anchor point.\n        // FIXME: should be the intersection point between the lines:\n        //     touch0,touch1 and previousTouch0,previousTouch1\n        var viewportPosition = map.getViewport().getBoundingClientRect();\n        var centroid = centroidFromPointers(this.targetPointers);\n        centroid[0] -= viewportPosition.left;\n        centroid[1] -= viewportPosition.top;\n        this.anchor_ = map.getCoordinateFromPixelInternal(centroid);\n        // rotate\n        if (this.rotating_) {\n            map.render();\n            view.adjustRotationInternal(rotationDelta, this.anchor_);\n        }\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    PinchRotate.prototype.handleUpEvent = function (mapBrowserEvent) {\n        if (this.targetPointers.length < 2) {\n            var map = mapBrowserEvent.map;\n            var view = map.getView();\n            view.endInteraction(this.duration_);\n            return false;\n        }\n        else {\n            return true;\n        }\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    PinchRotate.prototype.handleDownEvent = function (mapBrowserEvent) {\n        if (this.targetPointers.length >= 2) {\n            var map = mapBrowserEvent.map;\n            this.anchor_ = null;\n            this.lastAngle_ = undefined;\n            this.rotating_ = false;\n            this.rotationDelta_ = 0.0;\n            if (!this.handlingDownUpSequence) {\n                map.getView().beginInteraction();\n            }\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    return PinchRotate;\n}(PointerInteraction));\nexport default PinchRotate;\n//# sourceMappingURL=PinchRotate.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/PinchZoom\n */\nimport PointerInteraction, { centroid as centroidFromPointers, } from './Pointer.js';\nimport { FALSE } from '../functions.js';\n/**\n * @typedef {Object} Options\n * @property {number} [duration=400] Animation duration in milliseconds.\n */\n/**\n * @classdesc\n * Allows the user to zoom the map by pinching with two fingers\n * on a touch screen.\n * @api\n */\nvar PinchZoom = /** @class */ (function (_super) {\n    __extends(PinchZoom, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function PinchZoom(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n        if (!pointerOptions.stopDown) {\n            pointerOptions.stopDown = FALSE;\n        }\n        _this = _super.call(this, pointerOptions) || this;\n        /**\n         * @private\n         * @type {import(\"../coordinate.js\").Coordinate}\n         */\n        _this.anchor_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 400;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.lastDistance_ = undefined;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.lastScaleDelta_ = 1;\n        return _this;\n    }\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     */\n    PinchZoom.prototype.handleDragEvent = function (mapBrowserEvent) {\n        var scaleDelta = 1.0;\n        var touch0 = this.targetPointers[0];\n        var touch1 = this.targetPointers[1];\n        var dx = touch0.clientX - touch1.clientX;\n        var dy = touch0.clientY - touch1.clientY;\n        // distance between touches\n        var distance = Math.sqrt(dx * dx + dy * dy);\n        if (this.lastDistance_ !== undefined) {\n            scaleDelta = this.lastDistance_ / distance;\n        }\n        this.lastDistance_ = distance;\n        var map = mapBrowserEvent.map;\n        var view = map.getView();\n        if (scaleDelta != 1.0) {\n            this.lastScaleDelta_ = scaleDelta;\n        }\n        // scale anchor point.\n        var viewportPosition = map.getViewport().getBoundingClientRect();\n        var centroid = centroidFromPointers(this.targetPointers);\n        centroid[0] -= viewportPosition.left;\n        centroid[1] -= viewportPosition.top;\n        this.anchor_ = map.getCoordinateFromPixelInternal(centroid);\n        // scale, bypass the resolution constraint\n        map.render();\n        view.adjustResolutionInternal(scaleDelta, this.anchor_);\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    PinchZoom.prototype.handleUpEvent = function (mapBrowserEvent) {\n        if (this.targetPointers.length < 2) {\n            var map = mapBrowserEvent.map;\n            var view = map.getView();\n            var direction = this.lastScaleDelta_ > 1 ? 1 : -1;\n            view.endInteraction(this.duration_, direction);\n            return false;\n        }\n        else {\n            return true;\n        }\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    PinchZoom.prototype.handleDownEvent = function (mapBrowserEvent) {\n        if (this.targetPointers.length >= 2) {\n            var map = mapBrowserEvent.map;\n            this.anchor_ = null;\n            this.lastDistance_ = undefined;\n            this.lastScaleDelta_ = 1;\n            if (!this.handlingDownUpSequence) {\n                map.getView().beginInteraction();\n            }\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    return PinchZoom;\n}(PointerInteraction));\nexport default PinchZoom;\n//# sourceMappingURL=PinchZoom.js.map","/**\n * @module ol/interaction/DragAndDrop\n */\n// FIXME should handle all geo-referenced data, not just vector data\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport FormatType from '../format/FormatType.js';\nimport Interaction from './Interaction.js';\nimport { TRUE } from '../functions.js';\nimport { get as getProjection } from '../proj.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @typedef {Object} Options\n * @property {Array<typeof import(\"../format/Feature.js\").default|import(\"../format/Feature.js\").default>} [formatConstructors] Format constructors\n * (and/or formats pre-constructed with options).\n * @property {import(\"../source/Vector.js\").default} [source] Optional vector source where features will be added.  If a source is provided\n * all existing features will be removed and new features will be added when\n * they are dropped on the target.  If you want to add features to a vector\n * source without removing the existing features (append only), instead of\n * providing the source option listen for the \"addfeatures\" event.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Target projection. By default, the map's view's projection is used.\n * @property {HTMLElement} [target] The element that is used as the drop target, default is the viewport element.\n */\n/**\n * @enum {string}\n */\nvar DragAndDropEventType = {\n    /**\n     * Triggered when features are added\n     * @event DragAndDropEvent#addfeatures\n     * @api\n     */\n    ADD_FEATURES: 'addfeatures',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/DragAndDrop~DragAndDrop} instances are instances\n * of this type.\n */\nvar DragAndDropEvent = /** @class */ (function (_super) {\n    __extends(DragAndDropEvent, _super);\n    /**\n     * @param {DragAndDropEventType} type Type.\n     * @param {File} file File.\n     * @param {Array<import(\"../Feature.js\").default>} [opt_features] Features.\n     * @param {import(\"../proj/Projection.js\").default} [opt_projection] Projection.\n     */\n    function DragAndDropEvent(type, file, opt_features, opt_projection) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The features parsed from dropped data.\n         * @type {Array<import(\"../Feature.js\").FeatureLike>|undefined}\n         * @api\n         */\n        _this.features = opt_features;\n        /**\n         * The dropped file.\n         * @type {File}\n         * @api\n         */\n        _this.file = file;\n        /**\n         * The feature projection.\n         * @type {import(\"../proj/Projection.js\").default|undefined}\n         * @api\n         */\n        _this.projection = opt_projection;\n        return _this;\n    }\n    return DragAndDropEvent;\n}(Event));\nexport { DragAndDropEvent };\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types|\n *     'change:active', import(\"../Object\").ObjectEvent, Return> &\n *   import(\"../Observable\").OnSignature<'addfeatures', DragAndDropEvent, Return> &\n *   import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"../ObjectEventType\").Types|\n *     'change:active'|'addfeatures', Return>} DragAndDropOnSignature\n */\n/**\n * @classdesc\n * Handles input of vector data by drag and drop.\n *\n * Note that the DragAndDrop interaction uses the TextDecoder() constructor if the supplied\n * combinnation of formats read both text string and ArrayBuffer sources. Older browsers such\n * as IE which do not support this will need a TextDecoder polyfill to be loaded before use.\n *\n * @api\n *\n * @fires DragAndDropEvent\n */\nvar DragAndDrop = /** @class */ (function (_super) {\n    __extends(DragAndDrop, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function DragAndDrop(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            handleEvent: TRUE,\n        }) || this;\n        /***\n         * @type {DragAndDropOnSignature<import(\"../Observable\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {DragAndDropOnSignature<import(\"../Observable\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {DragAndDropOnSignature<void>}\n         */\n        _this.un;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.readAsBuffer_ = false;\n        /**\n         * @private\n         * @type {Array<import(\"../format/Feature.js\").default>}\n         */\n        _this.formats_ = [];\n        var formatConstructors = options.formatConstructors\n            ? options.formatConstructors\n            : [];\n        for (var i = 0, ii = formatConstructors.length; i < ii; ++i) {\n            var format = formatConstructors[i];\n            if (typeof format === 'function') {\n                format = new format();\n            }\n            _this.formats_.push(format);\n            _this.readAsBuffer_ =\n                _this.readAsBuffer_ || format.getType() === FormatType.ARRAY_BUFFER;\n        }\n        /**\n         * @private\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.projection_ = options.projection\n            ? getProjection(options.projection)\n            : null;\n        /**\n         * @private\n         * @type {?Array<import(\"../events.js\").EventsKey>}\n         */\n        _this.dropListenKeys_ = null;\n        /**\n         * @private\n         * @type {import(\"../source/Vector.js\").default}\n         */\n        _this.source_ = options.source || null;\n        /**\n         * @private\n         * @type {HTMLElement}\n         */\n        _this.target = options.target ? options.target : null;\n        return _this;\n    }\n    /**\n     * @param {File} file File.\n     * @param {Event} event Load event.\n     * @private\n     */\n    DragAndDrop.prototype.handleResult_ = function (file, event) {\n        var result = event.target.result;\n        var map = this.getMap();\n        var projection = this.projection_;\n        if (!projection) {\n            var view = map.getView();\n            projection = view.getProjection();\n        }\n        var text;\n        var formats = this.formats_;\n        for (var i = 0, ii = formats.length; i < ii; ++i) {\n            var format = formats[i];\n            var input = result;\n            if (this.readAsBuffer_ && format.getType() !== FormatType.ARRAY_BUFFER) {\n                if (text === undefined) {\n                    text = new TextDecoder().decode(result);\n                }\n                input = text;\n            }\n            var features = this.tryReadFeatures_(format, input, {\n                featureProjection: projection,\n            });\n            if (features && features.length > 0) {\n                if (this.source_) {\n                    this.source_.clear();\n                    this.source_.addFeatures(features);\n                }\n                this.dispatchEvent(new DragAndDropEvent(DragAndDropEventType.ADD_FEATURES, file, features, projection));\n                break;\n            }\n        }\n    };\n    /**\n     * @private\n     */\n    DragAndDrop.prototype.registerListeners_ = function () {\n        var map = this.getMap();\n        if (map) {\n            var dropArea = this.target ? this.target : map.getViewport();\n            this.dropListenKeys_ = [\n                listen(dropArea, EventType.DROP, this.handleDrop, this),\n                listen(dropArea, EventType.DRAGENTER, this.handleStop, this),\n                listen(dropArea, EventType.DRAGOVER, this.handleStop, this),\n                listen(dropArea, EventType.DROP, this.handleStop, this),\n            ];\n        }\n    };\n    /**\n     * Activate or deactivate the interaction.\n     * @param {boolean} active Active.\n     * @observable\n     * @api\n     */\n    DragAndDrop.prototype.setActive = function (active) {\n        if (!this.getActive() && active) {\n            this.registerListeners_();\n        }\n        if (this.getActive() && !active) {\n            this.unregisterListeners_();\n        }\n        _super.prototype.setActive.call(this, active);\n    };\n    /**\n     * Remove the interaction from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    DragAndDrop.prototype.setMap = function (map) {\n        this.unregisterListeners_();\n        _super.prototype.setMap.call(this, map);\n        if (this.getActive()) {\n            this.registerListeners_();\n        }\n    };\n    /**\n     * @param {import(\"../format/Feature.js\").default} format Format.\n     * @param {string} text Text.\n     * @param {import(\"../format/Feature.js\").ReadOptions} options Read options.\n     * @private\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    DragAndDrop.prototype.tryReadFeatures_ = function (format, text, options) {\n        try {\n            return (\n            /** @type {Array<import(\"../Feature.js\").default>} */\n            (format.readFeatures(text, options)));\n        }\n        catch (e) {\n            return null;\n        }\n    };\n    /**\n     * @private\n     */\n    DragAndDrop.prototype.unregisterListeners_ = function () {\n        if (this.dropListenKeys_) {\n            this.dropListenKeys_.forEach(unlistenByKey);\n            this.dropListenKeys_ = null;\n        }\n    };\n    /**\n     * @param {DragEvent} event Event.\n     */\n    DragAndDrop.prototype.handleDrop = function (event) {\n        var files = event.dataTransfer.files;\n        for (var i = 0, ii = files.length; i < ii; ++i) {\n            var file = files.item(i);\n            var reader = new FileReader();\n            reader.addEventListener(EventType.LOAD, this.handleResult_.bind(this, file));\n            if (this.readAsBuffer_) {\n                reader.readAsArrayBuffer(file);\n            }\n            else {\n                reader.readAsText(file);\n            }\n        }\n    };\n    /**\n     * @param {DragEvent} event Event.\n     */\n    DragAndDrop.prototype.handleStop = function (event) {\n        event.stopPropagation();\n        event.preventDefault();\n        event.dataTransfer.dropEffect = 'copy';\n    };\n    return DragAndDrop;\n}(Interaction));\nexport default DragAndDrop;\n//# sourceMappingURL=DragAndDrop.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/DragRotateAndZoom\n */\nimport PointerInteraction from './Pointer.js';\nimport { mouseOnly, shiftKeyOnly } from '../events/condition.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition.shiftKeyOnly}.\n * @property {number} [duration=400] Animation duration in milliseconds.\n */\n/**\n * @classdesc\n * Allows the user to zoom and rotate the map by clicking and dragging\n * on the map.  By default, this interaction is limited to when the shift\n * key is held down.\n *\n * This interaction is only supported for mouse devices.\n *\n * And this interaction is not included in the default interactions.\n * @api\n */\nvar DragRotateAndZoom = /** @class */ (function (_super) {\n    __extends(DragRotateAndZoom, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function DragRotateAndZoom(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, /** @type {import(\"./Pointer.js\").Options} */ (options)) || this;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : shiftKeyOnly;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.lastAngle_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.lastMagnitude_ = undefined;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.lastScaleDelta_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 400;\n        return _this;\n    }\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     */\n    DragRotateAndZoom.prototype.handleDragEvent = function (mapBrowserEvent) {\n        if (!mouseOnly(mapBrowserEvent)) {\n            return;\n        }\n        var map = mapBrowserEvent.map;\n        var size = map.getSize();\n        var offset = mapBrowserEvent.pixel;\n        var deltaX = offset[0] - size[0] / 2;\n        var deltaY = size[1] / 2 - offset[1];\n        var theta = Math.atan2(deltaY, deltaX);\n        var magnitude = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n        var view = map.getView();\n        if (this.lastAngle_ !== undefined) {\n            var angleDelta = this.lastAngle_ - theta;\n            view.adjustRotationInternal(angleDelta);\n        }\n        this.lastAngle_ = theta;\n        if (this.lastMagnitude_ !== undefined) {\n            view.adjustResolutionInternal(this.lastMagnitude_ / magnitude);\n        }\n        if (this.lastMagnitude_ !== undefined) {\n            this.lastScaleDelta_ = this.lastMagnitude_ / magnitude;\n        }\n        this.lastMagnitude_ = magnitude;\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragRotateAndZoom.prototype.handleUpEvent = function (mapBrowserEvent) {\n        if (!mouseOnly(mapBrowserEvent)) {\n            return true;\n        }\n        var map = mapBrowserEvent.map;\n        var view = map.getView();\n        var direction = this.lastScaleDelta_ > 1 ? 1 : -1;\n        view.endInteraction(this.duration_, direction);\n        this.lastScaleDelta_ = 0;\n        return false;\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragRotateAndZoom.prototype.handleDownEvent = function (mapBrowserEvent) {\n        if (!mouseOnly(mapBrowserEvent)) {\n            return false;\n        }\n        if (this.condition_(mapBrowserEvent)) {\n            mapBrowserEvent.map.getView().beginInteraction();\n            this.lastAngle_ = undefined;\n            this.lastMagnitude_ = undefined;\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    return DragRotateAndZoom;\n}(PointerInteraction));\nexport default DragRotateAndZoom;\n//# sourceMappingURL=DragRotateAndZoom.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Extent\n */\nimport Event from '../events/Event.js';\nimport Feature from '../Feature.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport Point from '../geom/Point.js';\nimport PointerInteraction from './Pointer.js';\nimport VectorLayer from '../layer/Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport { always } from '../events/condition.js';\nimport { boundingExtent, getArea } from '../extent.js';\nimport { closestOnSegment, distance as coordinateDistance, squaredDistance as squaredCoordinateDistance, squaredDistanceToSegment, } from '../coordinate.js';\nimport { createEditingStyle } from '../style/Style.js';\nimport { fromExtent as polygonFromExtent } from '../geom/Polygon.js';\nimport { toUserExtent } from '../proj.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition.always}.\n * @property {import(\"../extent.js\").Extent} [extent] Initial extent. Defaults to no\n * initial extent.\n * @property {import(\"../style/Style.js\").StyleLike} [boxStyle]\n * Style for the drawn extent box. Defaults to\n * {@link module:ol/style/Style~createEditing()['Polygon']}\n * @property {number} [pixelTolerance=10] Pixel tolerance for considering the\n * pointer close enough to a segment or vertex for editing.\n * @property {import(\"../style/Style.js\").StyleLike} [pointerStyle]\n * Style for the cursor used to draw the extent. Defaults to\n * {@link module:ol/style/Style~createEditing()['Point']}\n * @property {boolean} [wrapX=false] Wrap the drawn extent across multiple maps\n * in the X direction? Only affects visuals, not functionality.\n */\n/**\n * @enum {string}\n */\nvar ExtentEventType = {\n    /**\n     * Triggered after the extent is changed\n     * @event ExtentEvent#extentchanged\n     * @api\n     */\n    EXTENTCHANGED: 'extentchanged',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Extent~Extent} instances are\n * instances of this type.\n */\nvar ExtentEvent = /** @class */ (function (_super) {\n    __extends(ExtentEvent, _super);\n    /**\n     * @param {import(\"../extent.js\").Extent} extent the new extent\n     */\n    function ExtentEvent(extent) {\n        var _this = _super.call(this, ExtentEventType.EXTENTCHANGED) || this;\n        /**\n         * The current extent.\n         * @type {import(\"../extent.js\").Extent}\n         * @api\n         */\n        _this.extent = extent;\n        return _this;\n    }\n    return ExtentEvent;\n}(Event));\nexport { ExtentEvent };\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types|\n *     'change:active', import(\"../Object\").ObjectEvent, Return> &\n *   import(\"../Observable\").OnSignature<'extentchanged', ExtentEvent, Return> &\n *   import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"../ObjectEventType\").Types|\n *     'change:active'|'extentchanged', Return>} ExtentOnSignature\n */\n/**\n * @classdesc\n * Allows the user to draw a vector box by clicking and dragging on the map.\n * Once drawn, the vector box can be modified by dragging its vertices or edges.\n * This interaction is only supported for mouse devices.\n *\n * @fires ExtentEvent\n * @api\n */\nvar Extent = /** @class */ (function (_super) {\n    __extends(Extent, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function Extent(opt_options) {\n        var _this = this;\n        var options = opt_options || {};\n        _this = _super.call(this, /** @type {import(\"./Pointer.js\").Options} */ (options)) || this;\n        /***\n         * @type {ExtentOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {ExtentOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {ExtentOnSignature<void>}\n         */\n        _this.un;\n        /**\n         * Condition\n         * @type {import(\"../events/condition.js\").Condition}\n         * @private\n         */\n        _this.condition_ = options.condition ? options.condition : always;\n        /**\n         * Extent of the drawn box\n         * @type {import(\"../extent.js\").Extent}\n         * @private\n         */\n        _this.extent_ = null;\n        /**\n         * Handler for pointer move events\n         * @type {function (import(\"../coordinate.js\").Coordinate): import(\"../extent.js\").Extent|null}\n         * @private\n         */\n        _this.pointerHandler_ = null;\n        /**\n         * Pixel threshold to snap to extent\n         * @type {number}\n         * @private\n         */\n        _this.pixelTolerance_ =\n            options.pixelTolerance !== undefined ? options.pixelTolerance : 10;\n        /**\n         * Is the pointer snapped to an extent vertex\n         * @type {boolean}\n         * @private\n         */\n        _this.snappedToVertex_ = false;\n        /**\n         * Feature for displaying the visible extent\n         * @type {Feature}\n         * @private\n         */\n        _this.extentFeature_ = null;\n        /**\n         * Feature for displaying the visible pointer\n         * @type {Feature<Point>}\n         * @private\n         */\n        _this.vertexFeature_ = null;\n        if (!opt_options) {\n            opt_options = {};\n        }\n        /**\n         * Layer for the extentFeature\n         * @type {VectorLayer}\n         * @private\n         */\n        _this.extentOverlay_ = new VectorLayer({\n            source: new VectorSource({\n                useSpatialIndex: false,\n                wrapX: !!opt_options.wrapX,\n            }),\n            style: opt_options.boxStyle\n                ? opt_options.boxStyle\n                : getDefaultExtentStyleFunction(),\n            updateWhileAnimating: true,\n            updateWhileInteracting: true,\n        });\n        /**\n         * Layer for the vertexFeature\n         * @type {VectorLayer}\n         * @private\n         */\n        _this.vertexOverlay_ = new VectorLayer({\n            source: new VectorSource({\n                useSpatialIndex: false,\n                wrapX: !!opt_options.wrapX,\n            }),\n            style: opt_options.pointerStyle\n                ? opt_options.pointerStyle\n                : getDefaultPointerStyleFunction(),\n            updateWhileAnimating: true,\n            updateWhileInteracting: true,\n        });\n        if (opt_options.extent) {\n            _this.setExtent(opt_options.extent);\n        }\n        return _this;\n    }\n    /**\n     * @param {import(\"../pixel.js\").Pixel} pixel cursor location\n     * @param {import(\"../PluggableMap.js\").default} map map\n     * @return {import(\"../coordinate.js\").Coordinate|null} snapped vertex on extent\n     * @private\n     */\n    Extent.prototype.snapToVertex_ = function (pixel, map) {\n        var pixelCoordinate = map.getCoordinateFromPixelInternal(pixel);\n        var sortByDistance = function (a, b) {\n            return (squaredDistanceToSegment(pixelCoordinate, a) -\n                squaredDistanceToSegment(pixelCoordinate, b));\n        };\n        var extent = this.getExtentInternal();\n        if (extent) {\n            //convert extents to line segments and find the segment closest to pixelCoordinate\n            var segments = getSegments(extent);\n            segments.sort(sortByDistance);\n            var closestSegment = segments[0];\n            var vertex = closestOnSegment(pixelCoordinate, closestSegment);\n            var vertexPixel = map.getPixelFromCoordinateInternal(vertex);\n            //if the distance is within tolerance, snap to the segment\n            if (coordinateDistance(pixel, vertexPixel) <= this.pixelTolerance_) {\n                //test if we should further snap to a vertex\n                var pixel1 = map.getPixelFromCoordinateInternal(closestSegment[0]);\n                var pixel2 = map.getPixelFromCoordinateInternal(closestSegment[1]);\n                var squaredDist1 = squaredCoordinateDistance(vertexPixel, pixel1);\n                var squaredDist2 = squaredCoordinateDistance(vertexPixel, pixel2);\n                var dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n                this.snappedToVertex_ = dist <= this.pixelTolerance_;\n                if (this.snappedToVertex_) {\n                    vertex =\n                        squaredDist1 > squaredDist2 ? closestSegment[1] : closestSegment[0];\n                }\n                return vertex;\n            }\n        }\n        return null;\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent pointer move event\n     * @private\n     */\n    Extent.prototype.handlePointerMove_ = function (mapBrowserEvent) {\n        var pixel = mapBrowserEvent.pixel;\n        var map = mapBrowserEvent.map;\n        var vertex = this.snapToVertex_(pixel, map);\n        if (!vertex) {\n            vertex = map.getCoordinateFromPixelInternal(pixel);\n        }\n        this.createOrUpdatePointerFeature_(vertex);\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent extent\n     * @return {Feature} extent as featrue\n     * @private\n     */\n    Extent.prototype.createOrUpdateExtentFeature_ = function (extent) {\n        var extentFeature = this.extentFeature_;\n        if (!extentFeature) {\n            if (!extent) {\n                extentFeature = new Feature({});\n            }\n            else {\n                extentFeature = new Feature(polygonFromExtent(extent));\n            }\n            this.extentFeature_ = extentFeature;\n            this.extentOverlay_.getSource().addFeature(extentFeature);\n        }\n        else {\n            if (!extent) {\n                extentFeature.setGeometry(undefined);\n            }\n            else {\n                extentFeature.setGeometry(polygonFromExtent(extent));\n            }\n        }\n        return extentFeature;\n    };\n    /**\n     * @param {import(\"../coordinate.js\").Coordinate} vertex location of feature\n     * @return {Feature} vertex as feature\n     * @private\n     */\n    Extent.prototype.createOrUpdatePointerFeature_ = function (vertex) {\n        var vertexFeature = this.vertexFeature_;\n        if (!vertexFeature) {\n            vertexFeature = new Feature(new Point(vertex));\n            this.vertexFeature_ = vertexFeature;\n            this.vertexOverlay_.getSource().addFeature(vertexFeature);\n        }\n        else {\n            var geometry = vertexFeature.getGeometry();\n            geometry.setCoordinates(vertex);\n        }\n        return vertexFeature;\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     */\n    Extent.prototype.handleEvent = function (mapBrowserEvent) {\n        if (!mapBrowserEvent.originalEvent || !this.condition_(mapBrowserEvent)) {\n            return true;\n        }\n        //display pointer (if not dragging)\n        if (mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE &&\n            !this.handlingDownUpSequence) {\n            this.handlePointerMove_(mapBrowserEvent);\n        }\n        //call pointer to determine up/down/drag\n        _super.prototype.handleEvent.call(this, mapBrowserEvent);\n        //return false to stop propagation\n        return false;\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Extent.prototype.handleDownEvent = function (mapBrowserEvent) {\n        var pixel = mapBrowserEvent.pixel;\n        var map = mapBrowserEvent.map;\n        var extent = this.getExtentInternal();\n        var vertex = this.snapToVertex_(pixel, map);\n        //find the extent corner opposite the passed corner\n        var getOpposingPoint = function (point) {\n            var x_ = null;\n            var y_ = null;\n            if (point[0] == extent[0]) {\n                x_ = extent[2];\n            }\n            else if (point[0] == extent[2]) {\n                x_ = extent[0];\n            }\n            if (point[1] == extent[1]) {\n                y_ = extent[3];\n            }\n            else if (point[1] == extent[3]) {\n                y_ = extent[1];\n            }\n            if (x_ !== null && y_ !== null) {\n                return [x_, y_];\n            }\n            return null;\n        };\n        if (vertex && extent) {\n            var x = vertex[0] == extent[0] || vertex[0] == extent[2] ? vertex[0] : null;\n            var y = vertex[1] == extent[1] || vertex[1] == extent[3] ? vertex[1] : null;\n            //snap to point\n            if (x !== null && y !== null) {\n                this.pointerHandler_ = getPointHandler(getOpposingPoint(vertex));\n                //snap to edge\n            }\n            else if (x !== null) {\n                this.pointerHandler_ = getEdgeHandler(getOpposingPoint([x, extent[1]]), getOpposingPoint([x, extent[3]]));\n            }\n            else if (y !== null) {\n                this.pointerHandler_ = getEdgeHandler(getOpposingPoint([extent[0], y]), getOpposingPoint([extent[2], y]));\n            }\n            //no snap - new bbox\n        }\n        else {\n            vertex = map.getCoordinateFromPixelInternal(pixel);\n            this.setExtent([vertex[0], vertex[1], vertex[0], vertex[1]]);\n            this.pointerHandler_ = getPointHandler(vertex);\n        }\n        return true; //event handled; start downup sequence\n    };\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     */\n    Extent.prototype.handleDragEvent = function (mapBrowserEvent) {\n        if (this.pointerHandler_) {\n            var pixelCoordinate = mapBrowserEvent.coordinate;\n            this.setExtent(this.pointerHandler_(pixelCoordinate));\n            this.createOrUpdatePointerFeature_(pixelCoordinate);\n        }\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Extent.prototype.handleUpEvent = function (mapBrowserEvent) {\n        this.pointerHandler_ = null;\n        //If bbox is zero area, set to null;\n        var extent = this.getExtentInternal();\n        if (!extent || getArea(extent) === 0) {\n            this.setExtent(null);\n        }\n        return false; //Stop handling downup sequence\n    };\n    /**\n     * Remove the interaction from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    Extent.prototype.setMap = function (map) {\n        this.extentOverlay_.setMap(map);\n        this.vertexOverlay_.setMap(map);\n        _super.prototype.setMap.call(this, map);\n    };\n    /**\n     * Returns the current drawn extent in the view projection (or user projection if set)\n     *\n     * @return {import(\"../extent.js\").Extent} Drawn extent in the view projection.\n     * @api\n     */\n    Extent.prototype.getExtent = function () {\n        return toUserExtent(this.getExtentInternal(), this.getMap().getView().getProjection());\n    };\n    /**\n     * Returns the current drawn extent in the view projection\n     *\n     * @return {import(\"../extent.js\").Extent} Drawn extent in the view projection.\n     * @api\n     */\n    Extent.prototype.getExtentInternal = function () {\n        return this.extent_;\n    };\n    /**\n     * Manually sets the drawn extent, using the view projection.\n     *\n     * @param {import(\"../extent.js\").Extent} extent Extent\n     * @api\n     */\n    Extent.prototype.setExtent = function (extent) {\n        //Null extent means no bbox\n        this.extent_ = extent ? extent : null;\n        this.createOrUpdateExtentFeature_(extent);\n        this.dispatchEvent(new ExtentEvent(this.extent_));\n    };\n    return Extent;\n}(PointerInteraction));\n/**\n * Returns the default style for the drawn bbox\n *\n * @return {import(\"../style/Style.js\").StyleFunction} Default Extent style\n */\nfunction getDefaultExtentStyleFunction() {\n    var style = createEditingStyle();\n    return function (feature, resolution) {\n        return style[GeometryType.POLYGON];\n    };\n}\n/**\n * Returns the default style for the pointer\n *\n * @return {import(\"../style/Style.js\").StyleFunction} Default pointer style\n */\nfunction getDefaultPointerStyleFunction() {\n    var style = createEditingStyle();\n    return function (feature, resolution) {\n        return style[GeometryType.POINT];\n    };\n}\n/**\n * @param {import(\"../coordinate.js\").Coordinate} fixedPoint corner that will be unchanged in the new extent\n * @return {function (import(\"../coordinate.js\").Coordinate): import(\"../extent.js\").Extent} event handler\n */\nfunction getPointHandler(fixedPoint) {\n    return function (point) {\n        return boundingExtent([fixedPoint, point]);\n    };\n}\n/**\n * @param {import(\"../coordinate.js\").Coordinate} fixedP1 first corner that will be unchanged in the new extent\n * @param {import(\"../coordinate.js\").Coordinate} fixedP2 second corner that will be unchanged in the new extent\n * @return {function (import(\"../coordinate.js\").Coordinate): import(\"../extent.js\").Extent|null} event handler\n */\nfunction getEdgeHandler(fixedP1, fixedP2) {\n    if (fixedP1[0] == fixedP2[0]) {\n        return function (point) {\n            return boundingExtent([fixedP1, [point[0], fixedP2[1]]]);\n        };\n    }\n    else if (fixedP1[1] == fixedP2[1]) {\n        return function (point) {\n            return boundingExtent([fixedP1, [fixedP2[0], point[1]]]);\n        };\n    }\n    else {\n        return null;\n    }\n}\n/**\n * @param {import(\"../extent.js\").Extent} extent extent\n * @return {Array<Array<import(\"../coordinate.js\").Coordinate>>} extent line segments\n */\nfunction getSegments(extent) {\n    return [\n        [\n            [extent[0], extent[1]],\n            [extent[0], extent[3]],\n        ],\n        [\n            [extent[0], extent[3]],\n            [extent[2], extent[3]],\n        ],\n        [\n            [extent[2], extent[3]],\n            [extent[2], extent[1]],\n        ],\n        [\n            [extent[2], extent[1]],\n            [extent[0], extent[1]],\n        ],\n    ];\n}\nexport default Extent;\n//# sourceMappingURL=Extent.js.map","/**\n * @module ol/interaction\n */\nimport Collection from './Collection.js';\nimport DoubleClickZoom from './interaction/DoubleClickZoom.js';\nimport DragPan from './interaction/DragPan.js';\nimport DragRotate from './interaction/DragRotate.js';\nimport DragZoom from './interaction/DragZoom.js';\nimport KeyboardPan from './interaction/KeyboardPan.js';\nimport KeyboardZoom from './interaction/KeyboardZoom.js';\nimport Kinetic from './Kinetic.js';\nimport MouseWheelZoom from './interaction/MouseWheelZoom.js';\nimport PinchRotate from './interaction/PinchRotate.js';\nimport PinchZoom from './interaction/PinchZoom.js';\nexport { default as DoubleClickZoom } from './interaction/DoubleClickZoom.js';\nexport { default as DragAndDrop } from './interaction/DragAndDrop.js';\nexport { default as DragBox } from './interaction/DragBox.js';\nexport { default as DragPan } from './interaction/DragPan.js';\nexport { default as DragRotate } from './interaction/DragRotate.js';\nexport { default as DragRotateAndZoom } from './interaction/DragRotateAndZoom.js';\nexport { default as DragZoom } from './interaction/DragZoom.js';\nexport { default as Draw } from './interaction/Draw.js';\nexport { default as Extent } from './interaction/Extent.js';\nexport { default as Interaction } from './interaction/Interaction.js';\nexport { default as KeyboardPan } from './interaction/KeyboardPan.js';\nexport { default as KeyboardZoom } from './interaction/KeyboardZoom.js';\nexport { default as Modify } from './interaction/Modify.js';\nexport { default as MouseWheelZoom } from './interaction/MouseWheelZoom.js';\nexport { default as PinchRotate } from './interaction/PinchRotate.js';\nexport { default as PinchZoom } from './interaction/PinchZoom.js';\nexport { default as Pointer } from './interaction/Pointer.js';\nexport { default as Select } from './interaction/Select.js';\nexport { default as Snap } from './interaction/Snap.js';\nexport { default as Translate } from './interaction/Translate.js';\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [altShiftDragRotate=true] Whether Alt-Shift-drag rotate is\n * desired.\n * @property {boolean} [onFocusOnly=false] Interact only when the map has the\n * focus. This affects the `MouseWheelZoom` and `DragPan` interactions and is\n * useful when page scroll is desired for maps that do not have the browser's\n * focus.\n * @property {boolean} [doubleClickZoom=true] Whether double click zoom is\n * desired.\n * @property {boolean} [keyboard=true] Whether keyboard interaction is desired.\n * @property {boolean} [mouseWheelZoom=true] Whether mousewheel zoom is desired.\n * @property {boolean} [shiftDragZoom=true] Whether Shift-drag zoom is desired.\n * @property {boolean} [dragPan=true] Whether drag pan is desired.\n * @property {boolean} [pinchRotate=true] Whether pinch rotate is desired.\n * @property {boolean} [pinchZoom=true] Whether pinch zoom is desired.\n * @property {number} [zoomDelta] Zoom level delta when using keyboard or double click zoom.\n * @property {number} [zoomDuration] Duration of the zoom animation in\n * milliseconds.\n */\n/**\n * Set of interactions included in maps by default. Specific interactions can be\n * excluded by setting the appropriate option to false in the constructor\n * options, but the order of the interactions is fixed.  If you want to specify\n * a different order for interactions, you will need to create your own\n * {@link module:ol/interaction/Interaction} instances and insert\n * them into a {@link module:ol/Collection} in the order you want\n * before creating your {@link module:ol/Map~Map} instance. Changing the order can\n * be of interest if the event propagation needs to be stopped at a point.\n * The default set of interactions, in sequence, is:\n * * {@link module:ol/interaction/DragRotate~DragRotate}\n * * {@link module:ol/interaction/DoubleClickZoom~DoubleClickZoom}\n * * {@link module:ol/interaction/DragPan~DragPan}\n * * {@link module:ol/interaction/PinchRotate~PinchRotate}\n * * {@link module:ol/interaction/PinchZoom~PinchZoom}\n * * {@link module:ol/interaction/KeyboardPan~KeyboardPan}\n * * {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}\n * * {@link module:ol/interaction/MouseWheelZoom~MouseWheelZoom}\n * * {@link module:ol/interaction/DragZoom~DragZoom}\n *\n * @param {DefaultsOptions} [opt_options] Defaults options.\n * @return {import(\"./Collection.js\").default<import(\"./interaction/Interaction.js\").default>}\n * A collection of interactions to be used with the {@link module:ol/Map~Map}\n * constructor's `interactions` option.\n * @api\n */\nexport function defaults(opt_options) {\n    var options = opt_options ? opt_options : {};\n    var interactions = new Collection();\n    var kinetic = new Kinetic(-0.005, 0.05, 100);\n    var altShiftDragRotate = options.altShiftDragRotate !== undefined\n        ? options.altShiftDragRotate\n        : true;\n    if (altShiftDragRotate) {\n        interactions.push(new DragRotate());\n    }\n    var doubleClickZoom = options.doubleClickZoom !== undefined ? options.doubleClickZoom : true;\n    if (doubleClickZoom) {\n        interactions.push(new DoubleClickZoom({\n            delta: options.zoomDelta,\n            duration: options.zoomDuration,\n        }));\n    }\n    var dragPan = options.dragPan !== undefined ? options.dragPan : true;\n    if (dragPan) {\n        interactions.push(new DragPan({\n            onFocusOnly: options.onFocusOnly,\n            kinetic: kinetic,\n        }));\n    }\n    var pinchRotate = options.pinchRotate !== undefined ? options.pinchRotate : true;\n    if (pinchRotate) {\n        interactions.push(new PinchRotate());\n    }\n    var pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true;\n    if (pinchZoom) {\n        interactions.push(new PinchZoom({\n            duration: options.zoomDuration,\n        }));\n    }\n    var keyboard = options.keyboard !== undefined ? options.keyboard : true;\n    if (keyboard) {\n        interactions.push(new KeyboardPan());\n        interactions.push(new KeyboardZoom({\n            delta: options.zoomDelta,\n            duration: options.zoomDuration,\n        }));\n    }\n    var mouseWheelZoom = options.mouseWheelZoom !== undefined ? options.mouseWheelZoom : true;\n    if (mouseWheelZoom) {\n        interactions.push(new MouseWheelZoom({\n            onFocusOnly: options.onFocusOnly,\n            duration: options.zoomDuration,\n        }));\n    }\n    var shiftDragZoom = options.shiftDragZoom !== undefined ? options.shiftDragZoom : true;\n    if (shiftDragZoom) {\n        interactions.push(new DragZoom({\n            duration: options.zoomDuration,\n        }));\n    }\n    return interactions;\n}\n//# sourceMappingURL=interaction.js.map","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nmodule.exports = _defineProperty;","/**\n * @module ol/style/Circle\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport RegularShape from './RegularShape.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} radius Circle radius.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {Array<number>} [displacement=[0,0]] displacement\n * @property {number|import(\"../size.js\").Size} [scale=1] Scale. A two dimensional scale will produce an ellipse.\n * Unless two dimensional scaling is required a better result may be obtained with an appropriate setting for `radius`.\n * @property {number} [rotation=0] Rotation in radians\n * (positive rotation clockwise, meaningful only when used in conjunction with a two dimensional scale).\n * @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view\n * (meaningful only when used in conjunction with a two dimensional scale).\n */\n/**\n * @classdesc\n * Set circle style for vector features.\n * @api\n */\nvar CircleStyle = /** @class */ (function (_super) {\n    __extends(CircleStyle, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function CircleStyle(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            points: Infinity,\n            fill: options.fill,\n            radius: options.radius,\n            stroke: options.stroke,\n            scale: options.scale !== undefined ? options.scale : 1,\n            rotation: options.rotation !== undefined ? options.rotation : 0,\n            rotateWithView: options.rotateWithView !== undefined ? options.rotateWithView : false,\n            displacement: options.displacement !== undefined ? options.displacement : [0, 0],\n        }) || this;\n        return _this;\n    }\n    /**\n     * Clones the style.\n     * @return {CircleStyle} The cloned style.\n     * @api\n     */\n    CircleStyle.prototype.clone = function () {\n        var scale = this.getScale();\n        var style = new CircleStyle({\n            fill: this.getFill() ? this.getFill().clone() : undefined,\n            stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n            radius: this.getRadius(),\n            scale: Array.isArray(scale) ? scale.slice() : scale,\n            rotation: this.getRotation(),\n            rotateWithView: this.getRotateWithView(),\n            displacement: this.getDisplacement().slice(),\n        });\n        style.setOpacity(this.getOpacity());\n        return style;\n    };\n    /**\n     * Set the circle radius.\n     *\n     * @param {number} radius Circle radius.\n     * @api\n     */\n    CircleStyle.prototype.setRadius = function (radius) {\n        this.radius_ = radius;\n        this.render();\n    };\n    return CircleStyle;\n}(RegularShape));\nexport default CircleStyle;\n//# sourceMappingURL=Circle.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Overlay\n */\nimport BaseObject from './Object.js';\nimport MapEventType from './MapEventType.js';\nimport OverlayPositioning from './OverlayPositioning.js';\nimport { CLASS_SELECTABLE } from './css.js';\nimport { containsExtent } from './extent.js';\nimport { listen, unlistenByKey } from './events.js';\nimport { outerHeight, outerWidth, removeChildren, removeNode } from './dom.js';\n/**\n * @typedef {Object} Options\n * @property {number|string} [id] Set the overlay id. The overlay id can be used\n * with the {@link module:ol/Map~Map#getOverlayById} method.\n * @property {HTMLElement} [element] The overlay element.\n * @property {Array<number>} [offset=[0, 0]] Offsets in pixels used when positioning\n * the overlay. The first element in the\n * array is the horizontal offset. A positive value shifts the overlay right.\n * The second element in the array is the vertical offset. A positive value\n * shifts the overlay down.\n * @property {import(\"./coordinate.js\").Coordinate} [position] The overlay position\n * in map projection.\n * @property {import(\"./OverlayPositioning.js\").default} [positioning='top-left'] Defines how\n * the overlay is actually positioned with respect to its `position` property.\n * Possible values are `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, and `'top-right'`.\n * @property {boolean} [stopEvent=true] Whether event propagation to the map\n * viewport should be stopped. If `true` the overlay is placed in the same\n * container as that of the controls (CSS class name\n * `ol-overlaycontainer-stopevent`); if `false` it is placed in the container\n * with CSS class name specified by the `className` property.\n * @property {boolean} [insertFirst=true] Whether the overlay is inserted first\n * in the overlay container, or appended. If the overlay is placed in the same\n * container as that of the controls (see the `stopEvent` option) you will\n * probably set `insertFirst` to `true` so the overlay is displayed below the\n * controls.\n * @property {PanIntoViewOptions|boolean} [autoPan=false] Pan the map when calling\n * `setPosition`, so that the overlay is entirely visible in the current viewport?\n * If `true` (deprecated), then `autoPanAnimation` and `autoPanMargin` will be\n * used to determine the panning parameters; if an object is supplied then other\n * parameters are ignored.\n * @property {PanOptions} [autoPanAnimation] The animation options used to pan\n * the overlay into view. This animation is only used when `autoPan` is enabled.\n * A `duration` and `easing` may be provided to customize the animation.\n * Deprecated and ignored if `autoPan` is supplied as an object.\n * @property {number} [autoPanMargin=20] The margin (in pixels) between the\n * overlay and the borders of the map when autopanning. Deprecated and ignored\n * if `autoPan` is supplied as an object.\n * @property {PanIntoViewOptions} [autoPanOptions] The options to use for the\n * autoPan. This is only used when `autoPan` is enabled and has preference over\n * the individual `autoPanMargin` and `autoPanOptions`.\n * @property {string} [className='ol-overlay-container ol-selectable'] CSS class\n * name.\n */\n/**\n * @typedef {Object} PanOptions\n * @property {number} [duration=1000] The duration of the animation in\n * milliseconds.\n * @property {function(number):number} [easing] The easing function to use. Can\n * be one from {@link module:ol/easing} or a custom function.\n * Default is {@link module:ol/easing.inAndOut}.\n */\n/**\n * @typedef {Object} PanIntoViewOptions\n * @property {PanOptions} [animation={}] The animation parameters for the pan\n * @property {number} [margin=20] The margin (in pixels) between the\n * overlay and the borders of the map when panning into view.\n */\n/**\n * @enum {string}\n * @protected\n */\nvar Property = {\n    ELEMENT: 'element',\n    MAP: 'map',\n    OFFSET: 'offset',\n    POSITION: 'position',\n    POSITIONING: 'positioning',\n};\n/**\n * @typedef {import(\"./ObjectEventType\").Types|'change:element'|'change:map'|'change:offset'|'change:position'|\n *   'change:positioning'} OverlayObjectEventTypes\n */\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature<import(\"./Observable\").EventTypes, import(\"./events/Event.js\").default, Return> &\n *   import(\"./Observable\").OnSignature<OverlayObjectEventTypes, import(\"./Object\").ObjectEvent, Return> &\n *   import(\"./Observable\").CombinedOnSignature<import(\"./Observable\").EventTypes|OverlayObjectEventTypes, Return>} OverlayOnSignature\n */\n/**\n * @classdesc\n * An element to be displayed over the map and attached to a single map\n * location.  Like {@link module:ol/control/Control~Control}, Overlays are\n * visible widgets. Unlike Controls, they are not in a fixed position on the\n * screen, but are tied to a geographical coordinate, so panning the map will\n * move an Overlay but not a Control.\n *\n * Example:\n *\n *     import Overlay from 'ol/Overlay';\n *\n *     var popup = new Overlay({\n *       element: document.getElementById('popup')\n *     });\n *     popup.setPosition(coordinate);\n *     map.addOverlay(popup);\n *\n * @api\n */\nvar Overlay = /** @class */ (function (_super) {\n    __extends(Overlay, _super);\n    /**\n     * @param {Options} options Overlay options.\n     */\n    function Overlay(options) {\n        var _this = _super.call(this) || this;\n        /***\n         * @type {OverlayOnSignature<import(\"./Observable\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {OverlayOnSignature<import(\"./Observable\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {OverlayOnSignature<void>}\n         */\n        _this.un;\n        /**\n         * @protected\n         * @type {Options}\n         */\n        _this.options = options;\n        /**\n         * @protected\n         * @type {number|string|undefined}\n         */\n        _this.id = options.id;\n        /**\n         * @protected\n         * @type {boolean}\n         */\n        _this.insertFirst =\n            options.insertFirst !== undefined ? options.insertFirst : true;\n        /**\n         * @protected\n         * @type {boolean}\n         */\n        _this.stopEvent = options.stopEvent !== undefined ? options.stopEvent : true;\n        /**\n         * @protected\n         * @type {HTMLElement}\n         */\n        _this.element = document.createElement('div');\n        _this.element.className =\n            options.className !== undefined\n                ? options.className\n                : 'ol-overlay-container ' + CLASS_SELECTABLE;\n        _this.element.style.position = 'absolute';\n        _this.element.style.pointerEvents = 'auto';\n        var autoPan = options.autoPan;\n        if (autoPan && 'object' !== typeof autoPan) {\n            autoPan = {\n                animation: options.autoPanAnimation,\n                margin: options.autoPanMargin,\n            };\n        }\n        /**\n         * @protected\n         * @type {PanIntoViewOptions|false}\n         */\n        _this.autoPan = /** @type {PanIntoViewOptions} */ (autoPan) || false;\n        /**\n         * @protected\n         * @type {{transform_: string,\n         *         visible: boolean}}\n         */\n        _this.rendered = {\n            transform_: '',\n            visible: true,\n        };\n        /**\n         * @protected\n         * @type {?import(\"./events.js\").EventsKey}\n         */\n        _this.mapPostrenderListenerKey = null;\n        _this.addChangeListener(Property.ELEMENT, _this.handleElementChanged);\n        _this.addChangeListener(Property.MAP, _this.handleMapChanged);\n        _this.addChangeListener(Property.OFFSET, _this.handleOffsetChanged);\n        _this.addChangeListener(Property.POSITION, _this.handlePositionChanged);\n        _this.addChangeListener(Property.POSITIONING, _this.handlePositioningChanged);\n        if (options.element !== undefined) {\n            _this.setElement(options.element);\n        }\n        _this.setOffset(options.offset !== undefined ? options.offset : [0, 0]);\n        _this.setPositioning(options.positioning !== undefined\n            ? /** @type {import(\"./OverlayPositioning.js\").default} */ (options.positioning)\n            : OverlayPositioning.TOP_LEFT);\n        if (options.position !== undefined) {\n            _this.setPosition(options.position);\n        }\n        return _this;\n    }\n    /**\n     * Get the DOM element of this overlay.\n     * @return {HTMLElement|undefined} The Element containing the overlay.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.getElement = function () {\n        return /** @type {HTMLElement|undefined} */ (this.get(Property.ELEMENT));\n    };\n    /**\n     * Get the overlay identifier which is set on constructor.\n     * @return {number|string|undefined} Id.\n     * @api\n     */\n    Overlay.prototype.getId = function () {\n        return this.id;\n    };\n    /**\n     * Get the map associated with this overlay.\n     * @return {import(\"./PluggableMap.js\").default|undefined} The map that the\n     * overlay is part of.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.getMap = function () {\n        return /** @type {import(\"./PluggableMap.js\").default|undefined} */ (this.get(Property.MAP));\n    };\n    /**\n     * Get the offset of this overlay.\n     * @return {Array<number>} The offset.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.getOffset = function () {\n        return /** @type {Array<number>} */ (this.get(Property.OFFSET));\n    };\n    /**\n     * Get the current position of this overlay.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} The spatial point that the overlay is\n     *     anchored at.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.getPosition = function () {\n        return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (this.get(Property.POSITION));\n    };\n    /**\n     * Get the current positioning of this overlay.\n     * @return {import(\"./OverlayPositioning.js\").default} How the overlay is positioned\n     *     relative to its point on the map.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.getPositioning = function () {\n        return /** @type {import(\"./OverlayPositioning.js\").default} */ (this.get(Property.POSITIONING));\n    };\n    /**\n     * @protected\n     */\n    Overlay.prototype.handleElementChanged = function () {\n        removeChildren(this.element);\n        var element = this.getElement();\n        if (element) {\n            this.element.appendChild(element);\n        }\n    };\n    /**\n     * @protected\n     */\n    Overlay.prototype.handleMapChanged = function () {\n        if (this.mapPostrenderListenerKey) {\n            removeNode(this.element);\n            unlistenByKey(this.mapPostrenderListenerKey);\n            this.mapPostrenderListenerKey = null;\n        }\n        var map = this.getMap();\n        if (map) {\n            this.mapPostrenderListenerKey = listen(map, MapEventType.POSTRENDER, this.render, this);\n            this.updatePixelPosition();\n            var container = this.stopEvent\n                ? map.getOverlayContainerStopEvent()\n                : map.getOverlayContainer();\n            if (this.insertFirst) {\n                container.insertBefore(this.element, container.childNodes[0] || null);\n            }\n            else {\n                container.appendChild(this.element);\n            }\n            this.performAutoPan();\n        }\n    };\n    /**\n     * @protected\n     */\n    Overlay.prototype.render = function () {\n        this.updatePixelPosition();\n    };\n    /**\n     * @protected\n     */\n    Overlay.prototype.handleOffsetChanged = function () {\n        this.updatePixelPosition();\n    };\n    /**\n     * @protected\n     */\n    Overlay.prototype.handlePositionChanged = function () {\n        this.updatePixelPosition();\n        this.performAutoPan();\n    };\n    /**\n     * @protected\n     */\n    Overlay.prototype.handlePositioningChanged = function () {\n        this.updatePixelPosition();\n    };\n    /**\n     * Set the DOM element to be associated with this overlay.\n     * @param {HTMLElement|undefined} element The Element containing the overlay.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.setElement = function (element) {\n        this.set(Property.ELEMENT, element);\n    };\n    /**\n     * Set the map to be associated with this overlay.\n     * @param {import(\"./PluggableMap.js\").default|undefined} map The map that the\n     * overlay is part of.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.setMap = function (map) {\n        this.set(Property.MAP, map);\n    };\n    /**\n     * Set the offset for this overlay.\n     * @param {Array<number>} offset Offset.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.setOffset = function (offset) {\n        this.set(Property.OFFSET, offset);\n    };\n    /**\n     * Set the position for this overlay. If the position is `undefined` the\n     * overlay is hidden.\n     * @param {import(\"./coordinate.js\").Coordinate|undefined} position The spatial point that the overlay\n     *     is anchored at.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.setPosition = function (position) {\n        this.set(Property.POSITION, position);\n    };\n    /**\n     * Pan the map so that the overlay is entirely visible in the current viewport\n     * (if necessary) using the configured autoPan parameters\n     * @protected\n     */\n    Overlay.prototype.performAutoPan = function () {\n        if (this.autoPan) {\n            this.panIntoView(this.autoPan);\n        }\n    };\n    /**\n     * Pan the map so that the overlay is entirely visible in the current viewport\n     * (if necessary).\n     * @param {PanIntoViewOptions} [opt_panIntoViewOptions] Options for the pan action\n     * @api\n     */\n    Overlay.prototype.panIntoView = function (opt_panIntoViewOptions) {\n        var map = this.getMap();\n        if (!map || !map.getTargetElement() || !this.get(Property.POSITION)) {\n            return;\n        }\n        var mapRect = this.getRect(map.getTargetElement(), map.getSize());\n        var element = this.getElement();\n        var overlayRect = this.getRect(element, [\n            outerWidth(element),\n            outerHeight(element),\n        ]);\n        var panIntoViewOptions = opt_panIntoViewOptions || {};\n        var myMargin = panIntoViewOptions.margin === undefined ? 20 : panIntoViewOptions.margin;\n        if (!containsExtent(mapRect, overlayRect)) {\n            // the overlay is not completely inside the viewport, so pan the map\n            var offsetLeft = overlayRect[0] - mapRect[0];\n            var offsetRight = mapRect[2] - overlayRect[2];\n            var offsetTop = overlayRect[1] - mapRect[1];\n            var offsetBottom = mapRect[3] - overlayRect[3];\n            var delta = [0, 0];\n            if (offsetLeft < 0) {\n                // move map to the left\n                delta[0] = offsetLeft - myMargin;\n            }\n            else if (offsetRight < 0) {\n                // move map to the right\n                delta[0] = Math.abs(offsetRight) + myMargin;\n            }\n            if (offsetTop < 0) {\n                // move map up\n                delta[1] = offsetTop - myMargin;\n            }\n            else if (offsetBottom < 0) {\n                // move map down\n                delta[1] = Math.abs(offsetBottom) + myMargin;\n            }\n            if (delta[0] !== 0 || delta[1] !== 0) {\n                var center = /** @type {import(\"./coordinate.js\").Coordinate} */ (map.getView().getCenterInternal());\n                var centerPx = map.getPixelFromCoordinateInternal(center);\n                if (!centerPx) {\n                    return;\n                }\n                var newCenterPx = [centerPx[0] + delta[0], centerPx[1] + delta[1]];\n                var panOptions = panIntoViewOptions.animation || {};\n                map.getView().animateInternal({\n                    center: map.getCoordinateFromPixelInternal(newCenterPx),\n                    duration: panOptions.duration,\n                    easing: panOptions.easing,\n                });\n            }\n        }\n    };\n    /**\n     * Get the extent of an element relative to the document\n     * @param {HTMLElement} element The element.\n     * @param {import(\"./size.js\").Size} size The size of the element.\n     * @return {import(\"./extent.js\").Extent} The extent.\n     * @protected\n     */\n    Overlay.prototype.getRect = function (element, size) {\n        var box = element.getBoundingClientRect();\n        var offsetX = box.left + window.pageXOffset;\n        var offsetY = box.top + window.pageYOffset;\n        return [offsetX, offsetY, offsetX + size[0], offsetY + size[1]];\n    };\n    /**\n     * Set the positioning for this overlay.\n     * @param {import(\"./OverlayPositioning.js\").default} positioning how the overlay is\n     *     positioned relative to its point on the map.\n     * @observable\n     * @api\n     */\n    Overlay.prototype.setPositioning = function (positioning) {\n        this.set(Property.POSITIONING, positioning);\n    };\n    /**\n     * Modify the visibility of the element.\n     * @param {boolean} visible Element visibility.\n     * @protected\n     */\n    Overlay.prototype.setVisible = function (visible) {\n        if (this.rendered.visible !== visible) {\n            this.element.style.display = visible ? '' : 'none';\n            this.rendered.visible = visible;\n        }\n    };\n    /**\n     * Update pixel position.\n     * @protected\n     */\n    Overlay.prototype.updatePixelPosition = function () {\n        var map = this.getMap();\n        var position = this.getPosition();\n        if (!map || !map.isRendered() || !position) {\n            this.setVisible(false);\n            return;\n        }\n        var pixel = map.getPixelFromCoordinate(position);\n        var mapSize = map.getSize();\n        this.updateRenderedPosition(pixel, mapSize);\n    };\n    /**\n     * @param {import(\"./pixel.js\").Pixel} pixel The pixel location.\n     * @param {import(\"./size.js\").Size|undefined} mapSize The map size.\n     * @protected\n     */\n    Overlay.prototype.updateRenderedPosition = function (pixel, mapSize) {\n        var style = this.element.style;\n        var offset = this.getOffset();\n        var positioning = this.getPositioning();\n        this.setVisible(true);\n        var x = Math.round(pixel[0] + offset[0]) + 'px';\n        var y = Math.round(pixel[1] + offset[1]) + 'px';\n        var posX = '0%';\n        var posY = '0%';\n        if (positioning == OverlayPositioning.BOTTOM_RIGHT ||\n            positioning == OverlayPositioning.CENTER_RIGHT ||\n            positioning == OverlayPositioning.TOP_RIGHT) {\n            posX = '-100%';\n        }\n        else if (positioning == OverlayPositioning.BOTTOM_CENTER ||\n            positioning == OverlayPositioning.CENTER_CENTER ||\n            positioning == OverlayPositioning.TOP_CENTER) {\n            posX = '-50%';\n        }\n        if (positioning == OverlayPositioning.BOTTOM_LEFT ||\n            positioning == OverlayPositioning.BOTTOM_CENTER ||\n            positioning == OverlayPositioning.BOTTOM_RIGHT) {\n            posY = '-100%';\n        }\n        else if (positioning == OverlayPositioning.CENTER_LEFT ||\n            positioning == OverlayPositioning.CENTER_CENTER ||\n            positioning == OverlayPositioning.CENTER_RIGHT) {\n            posY = '-50%';\n        }\n        var transform = \"translate(\" + posX + \", \" + posY + \") translate(\" + x + \", \" + y + \")\";\n        if (this.rendered.transform_ != transform) {\n            this.rendered.transform_ = transform;\n            style.transform = transform;\n            // @ts-ignore IE9\n            style.msTransform = transform;\n        }\n    };\n    /**\n     * returns the options this Overlay has been created with\n     * @return {Options} overlay options\n     */\n    Overlay.prototype.getOptions = function () {\n        return this.options;\n    };\n    return Overlay;\n}(BaseObject));\nexport default Overlay;\n//# sourceMappingURL=Overlay.js.map","import { ol } from \"./definitionsOl\";\r\nimport Overlay from \"ol/Overlay\";\r\nimport { addEvent } from \"./viewportHelpers\";\r\nimport * as olEventsCondition from 'ol/events/condition';\r\nimport { unByKey } from 'ol/Observable';\r\n\r\nexport function createMeasureTooltip() {\r\n    var el = document.createElement('div');\r\n    el.className = 'pma-ui-viewport-tooltip pma-ui-viewport-tooltip-measure';\r\n\r\n    var measureTooltip = new Overlay({\r\n        element: el,\r\n        offset: [0, -15],\r\n        positioning: 'bottom-center',\r\n        stopEvent: false,\r\n        insertFirst: false,\r\n    });\r\n\r\n    this.map.addOverlay(measureTooltip);\r\n    measureTooltip.element = el;\r\n\r\n    el.parentElement.style.display = 'block';\r\n    let self = this;\r\n    addEvent(el, 'click', function () {\r\n        self.map.removeOverlay(measureTooltip);\r\n        self.measureLayer.getSource().removeFeature(measureTooltip.sketch);\r\n        \r\n        if (el.parentNode) {\r\n            el.parentNode.removeChild(el);\r\n        }\r\n        el = null;\r\n    });\r\n\r\n    return measureTooltip;\r\n}\r\n\r\nexport function startMeasuring(type /* string (area, line) */) {\r\n    if (this.measureDraw) {\r\n        // prevent beginning measurement more than once\r\n        return;\r\n    }\r\n\r\n    type = (type === 'area' ? 'Polygon' : 'LineString');\r\n\r\n    this.measureDraw = new ol.interaction.Draw({\r\n        source: this.measureLayer.getSource(),\r\n        type: type,\r\n        geometryFunction: null,\r\n        style: new ol.style.Style({\r\n            fill: new ol.style.Fill({\r\n                color: 'rgba(255, 255, 255, 0.2)'\r\n            }),\r\n            stroke: new ol.style.Stroke({\r\n                color: 'rgba(0, 0, 0, 0.5)',\r\n                lineDash: [10, 10],\r\n                width: 2\r\n            }),\r\n            image: new ol.style.Circle({\r\n                radius: 5,\r\n                stroke: new ol.style.Stroke({\r\n                    color: 'rgba(0, 0, 0, 0.7)'\r\n                }),\r\n                fill: new ol.style.Fill({\r\n                    color: 'rgba(255, 255, 255, 0.2)'\r\n                })\r\n            })\r\n        }),\r\n        condition: olEventsCondition.noModifierKeys,\r\n        freehandCondition: olEventsCondition.never\r\n    });\r\n\r\n    this.map.addInteraction(this.measureDraw);\r\n\r\n    let self = this;\r\n    let tooltip = createMeasureTooltip.call(this);\r\n    this.measureTooltips.push(tooltip);\r\n\r\n    let listener, sketch;\r\n\r\n    this.measureDraw.on('drawstart',\r\n        function (evt) {\r\n            // set sketch\r\n            sketch = evt.feature;\r\n            tooltip.sketch = sketch;\r\n\r\n            /** @type {ol.Coordinate|undefined} */\r\n            let tooltipCoord = evt.coordinate;\r\n\r\n            listener = sketch.getGeometry().on('change', function (evt) {\r\n                const geom = evt.target;\r\n                let output;\r\n                if (geom instanceof ol.geom.Polygon) {\r\n                    output = formatArea.call(self, geom);\r\n                    tooltipCoord = geom.getInteriorPoint().getCoordinates();\r\n                }\r\n                else if (geom instanceof ol.geom.LineString) {\r\n                    output = formatLength.call(self, geom);\r\n                    tooltipCoord = geom.getLastCoordinate();\r\n                }\r\n\r\n                tooltip.element.innerHTML = output;\r\n                tooltip.setPosition(tooltipCoord);\r\n            });\r\n        }, this);\r\n\r\n    this.measureDraw.on('drawend', function () {\r\n        tooltip.element.className = 'pma-ui-viewport-tooltip pma-ui-viewport-tooltip-static';\r\n        tooltip.setOffset([0, -7]);\r\n        // unset sketch\r\n        tooltip.sketch = sketch;\r\n        sketch = null;\r\n        // unset tooltip so that a new one can be created\r\n        unByKey(listener);\r\n\r\n        // remove the interaction with a delay, otherwise the last double click\r\n        // will result in a zoom in\r\n        setTimeout(function () {\r\n            stopMeasuring.call(self);\r\n        }, 100);\r\n    }, this);\r\n};\r\n\r\nexport function stopMeasuring(clear) {\r\n    if (this.measureDraw) {\r\n        this.map.removeInteraction(this.measureDraw);\r\n        // this.measureTooltips = [];\r\n        this.measureDraw = null;\r\n    }\r\n\r\n    if (clear == true) {\r\n        while (this.measureTooltips.length > 0) {\r\n            let mt = this.measureTooltips.pop();\r\n            this.map.removeOverlay(mt);\r\n            this.measureLayer.getSource().removeFeature(mt.sketch);\r\n            if (mt.element.parentNode) {\r\n                mt.element.parentNode.removeChild(mt.element);\r\n            }\r\n        }\r\n    }\r\n};\r\n\r\n/**\r\n * Format length output.\r\n * @param {LineString} line The line.\r\n * @return {string} The formatted length.\r\n */\r\nfunction formatLength(line) {\r\n    if (this.imageInfo.MicrometresPerPixelX === 0) {\r\n        return line.getLength() + ' px';\r\n    }\r\n\r\n    var length = line.getLength() * this.imageInfo.MicrometresPerPixelX;\r\n\r\n    var output;\r\n    if (length >= 1000) {\r\n        output = Math.round(length * 10 / 1000) / 10 + ' mm';\r\n    }\r\n    else {\r\n        output = Math.round(length * 10) / 10 + ' μm';\r\n    }\r\n\r\n    return output;\r\n}\r\n\r\n/**\r\n * Format area output.\r\n * @param {Polygon} polygon The polygon.\r\n * @return {string} Formatted area.\r\n */\r\nfunction formatArea(polygon) {\r\n    if (this.imageInfo.MicrometresPerPixelX === 0) {\r\n        return polygon.getArea() + ' px<sup>2</sup>';\r\n    }\r\n\r\n    var area = polygon.getArea() * this.imageInfo.MicrometresPerPixelX * this.imageInfo.MicrometresPerPixelX;\r\n\r\n    var output;\r\n    if (area > 10000) {\r\n        output = Math.round(area * 10 / 1000000) / 10 + ' mm<sup>2</sup>';\r\n    }\r\n    else {\r\n        output = Math.round(area * 10) / 10 + ' μm<sup>2</sup>';\r\n    }\r\n\r\n    return output;\r\n}\r\n","function createPngDataTable() {\r\n    /* Table of CRCs of all 8-bit messages. */\r\n    const crcTable = new Int32Array(256);\r\n    for (let n = 0; n < 256; n++) {\r\n        let c = n;\r\n        for (let k = 0; k < 8; k++) {\r\n            c = (c & 1) ? 0xedb88320 ^ (c >>> 1) : c >>> 1;\r\n        }\r\n        crcTable[n] = c;\r\n    }\r\n    return crcTable;\r\n}\r\n\r\nfunction calcCrc(buf) {\r\n    let c = -1;\r\n    if (!pngDataTable) pngDataTable = createPngDataTable();\r\n    for (let n = 0; n < buf.length; n++) {\r\n        c = pngDataTable[(c ^ buf[n]) & 0xFF] ^ (c >>> 8);\r\n    }\r\n    return c ^ -1;\r\n}\r\n\r\nlet pngDataTable;\r\n\r\nconst PNG = 'image/png';\r\nconst JPEG = 'image/jpeg';\r\n\r\n// those are 3 possible signature of the physBlock in base64.\r\n// the pHYs signature block is preceed by the 4 bytes of lenght. The length of\r\n// the block is always 9 bytes. So a phys block has always this signature:\r\n// 0 0 0 9 p H Y s.\r\n// However the data64 encoding aligns we will always find one of those 3 strings.\r\n// this allow us to find this particular occurence of the pHYs block without\r\n// converting from b64 back to string\r\nconst b64PhysSignature1 = 'AAlwSFlz';\r\nconst b64PhysSignature2 = 'AAAJcEhZ';\r\nconst b64PhysSignature3 = 'AAAACXBI';\r\n\r\nconst _P = 'p'.charCodeAt(0);\r\nconst _H = 'H'.charCodeAt(0);\r\nconst _Y = 'Y'.charCodeAt(0);\r\nconst _S = 's'.charCodeAt(0);\r\n\r\nexport function changeDpiBlob(blob, dpi) {\r\n    // 33 bytes are ok for pngs and jpegs\r\n    // to contain the information.\r\n    const headerChunk = blob.slice(0, 33);\r\n    return new Promise((resolve, reject) => {\r\n        const fileReader = new FileReader();\r\n        fileReader.onload = function() {\r\n            const dataArray = new Uint8Array(fileReader.result);\r\n            const tail = blob.slice(33);\r\n            const changedArray = changeDpiOnArray(dataArray, dpi, blob.type);\r\n            resolve(new Blob([changedArray, tail], { type: blob.type }));\r\n        };\r\n        fileReader.readAsArrayBuffer(headerChunk);\r\n    });\r\n}\r\n\r\nexport function changeDpiDataUrl(base64Image, dpi) {\r\n    const dataSplitted = base64Image.split(',');\r\n    const format = dataSplitted[0];\r\n    const body = dataSplitted[1];\r\n    let type;\r\n    let headerLength;\r\n    let overwritepHYs = false;\r\n    if (format.indexOf(PNG) !== -1) {\r\n        type = PNG;\r\n        const b64Index = detectPhysChunkFromDataUrl(body);\r\n        // 28 bytes in dataUrl are 21bytes, length of phys chunk with everything inside.\r\n        if (b64Index >= 0) {\r\n            headerLength = Math.ceil((b64Index + 28) / 3) * 4;\r\n            overwritepHYs = true;\r\n        } else {\r\n            headerLength = 33 / 3 * 4;\r\n        }\r\n    }\r\n    if (format.indexOf(JPEG) !== -1) {\r\n        type = JPEG;\r\n        headerLength = 18 / 3 * 4;\r\n    }\r\n    // 33 bytes are ok for pngs and jpegs\r\n    // to contain the information.\r\n    const stringHeader = body.substring(0, headerLength);\r\n    const restOfData = body.substring(headerLength);\r\n    const headerBytes = atob(stringHeader);\r\n    const dataArray = new Uint8Array(headerBytes.length);\r\n    for (let i = 0; i < dataArray.length; i++) {\r\n        dataArray[i] = headerBytes.charCodeAt(i);\r\n    }\r\n    const finalArray = changeDpiOnArray(dataArray, dpi, type, overwritepHYs);\r\n    const base64Header = btoa(String.fromCharCode(...finalArray));\r\n    return [format, ',', base64Header, restOfData].join('');\r\n}\r\n\r\nfunction detectPhysChunkFromDataUrl(data) {\r\n    let b64index = data.indexOf(b64PhysSignature1);\r\n    if (b64index === -1) {\r\n        b64index = data.indexOf(b64PhysSignature2);\r\n    }\r\n    if (b64index === -1) {\r\n        b64index = data.indexOf(b64PhysSignature3);\r\n    }\r\n    // if b64index === -1 chunk is not found\r\n    return b64index;\r\n}\r\n\r\nfunction searchStartOfPhys(data) {\r\n    const length = data.length - 1;\r\n    // we check from the end since we cut the string in proximity of the header\r\n    // the header is within 21 bytes from the end.\r\n    for (let i = length; i >= 4; i--) {\r\n        if (data[i - 4] === 9 && data[i - 3] === _P &&\r\n            data[i - 2] === _H && data[i - 1] === _Y &&\r\n            data[i] === _S) {\r\n            return i - 3;\r\n        }\r\n    }\r\n}\r\n\r\nfunction changeDpiOnArray(dataArray, dpi, format, overwritepHYs) {\r\n    if (format === JPEG) {\r\n        dataArray[13] = 1; // 1 pixel per inch or 2 pixel per cm\r\n        dataArray[14] = dpi >> 8; // dpiX high byte\r\n        dataArray[15] = dpi & 0xff; // dpiX low byte\r\n        dataArray[16] = dpi >> 8; // dpiY high byte\r\n        dataArray[17] = dpi & 0xff; // dpiY low byte\r\n        return dataArray;\r\n    }\r\n    if (format === PNG) {\r\n        const physChunk = new Uint8Array(13);\r\n        // chunk header pHYs\r\n        // 9 bytes of data\r\n        // 4 bytes of crc\r\n        // this multiplication is because the standard is dpi per meter.\r\n        dpi *= 39.3701;\r\n        physChunk[0] = _P;\r\n        physChunk[1] = _H;\r\n        physChunk[2] = _Y;\r\n        physChunk[3] = _S;\r\n        physChunk[4] = dpi >>> 24; // dpiX highest byte\r\n        physChunk[5] = dpi >>> 16; // dpiX veryhigh byte\r\n        physChunk[6] = dpi >>> 8; // dpiX high byte\r\n        physChunk[7] = dpi & 0xff; // dpiX low byte\r\n        physChunk[8] = physChunk[4]; // dpiY highest byte\r\n        physChunk[9] = physChunk[5]; // dpiY veryhigh byte\r\n        physChunk[10] = physChunk[6]; // dpiY high byte\r\n        physChunk[11] = physChunk[7]; // dpiY low byte\r\n        physChunk[12] = 1; // dot per meter....\r\n\r\n        const crc = calcCrc(physChunk);\r\n\r\n        const crcChunk = new Uint8Array(4);\r\n        crcChunk[0] = crc >>> 24;\r\n        crcChunk[1] = crc >>> 16;\r\n        crcChunk[2] = crc >>> 8;\r\n        crcChunk[3] = crc & 0xff;\r\n\r\n        if (overwritepHYs) {\r\n            const startingIndex = searchStartOfPhys(dataArray);\r\n            dataArray.set(physChunk, startingIndex);\r\n            dataArray.set(crcChunk, startingIndex + 13);\r\n            return dataArray;\r\n        } else {\r\n            // i need to give back an array of data that is divisible by 3 so that\r\n            // dataurl encoding gives me integers, for luck this chunk is 17 + 4 = 21\r\n            // if it was we could add a text chunk contaning some info, untill desired\r\n            // length is met.\r\n\r\n            // chunk structur 4 bytes for length is 9\r\n            const chunkLength = new Uint8Array(4);\r\n            chunkLength[0] = 0;\r\n            chunkLength[1] = 0;\r\n            chunkLength[2] = 0;\r\n            chunkLength[3] = 9;\r\n\r\n            const finalHeader = new Uint8Array(54);\r\n            finalHeader.set(dataArray, 0);\r\n            finalHeader.set(chunkLength, 33);\r\n            finalHeader.set(physChunk, 37);\r\n            finalHeader.set(crcChunk, 50);\r\n            return finalHeader;\r\n        }\r\n    }\r\n}\r\n","import { checkBrowserCompatibility, ajax } from \"./helpers\";\r\nimport {\r\n    Events,\r\n    ButtonLocations,\r\n    Themes,\r\n    ObjectiveResolutions,\r\n    DefaultFillColor,\r\n    AnnotationState,\r\n    Controls as ControlTypes,\r\n} from \"./definitions\";\r\nimport {\r\n    initialize,\r\n    createProjection,\r\n    createMainView,\r\n    annotationTransform,\r\n    getControlVisibility,\r\n    createOverviewControl,\r\n    setControlVisibility,\r\n    setMapSizeClass,\r\n    login,\r\n    applyImageAdjustments,\r\n    printObjectivesInZoomBar,\r\n    setControlsConfiguration,\r\n    getControlsConfiguration,\r\n    parseJson,\r\n    getFingerprint,\r\n    updateProgress,\r\n    findClosestObjectiveValue,\r\n    drawScalebar,\r\n    drawTitle,\r\n    drawBarcode,\r\n    drawOverview\r\n} from \"./viewportHelpers\";\r\nimport { startMeasuring, createMeasureTooltip, stopMeasuring } from \"./measure.js\";\r\nimport { Overview } from \"./controls/overview\";\r\nimport { saveAs } from \"file-saver\";\r\nimport { ol } from \"./definitionsOl\";\r\nimport { fromCircle } from \"ol/geom/Polygon\";\r\nimport { default as olText } from \"ol/style/Text\";\r\nimport { Fill, Stroke } from \"ol/style\";\r\nimport { RotationControl } from \"./controls/rotationControl\";\r\nimport { unByKey } from \"ol/Observable\";\r\nimport { PmaMouseWheelZoom, MouseWheelZoomMode } from \"./interactions/customMouseWheelZoom\";\r\nimport { changeDpiBlob } from \"./changeDpi\";\r\n\r\n/**\r\n * Receives pixel data and applies an image transformation to it\r\n * @callback PMA.UI.View.tileTransformer\r\n * @param {ImageData} pixels - Represents the underlying pixel data of an area of a canvas element\r\n */\r\n\r\n/**\r\n * Viewport position\r\n * @typedef {Object} Viewport~position\r\n * @property {Array} center - The x and y coordinates of the center point\r\n * @property {number} zoom - The zoom level. Can be omitted if resolution is specified\r\n * @property {number} [resolution] - Can be omitted if zoom is specified\r\n * @property {number} [rotation=0]\r\n */\r\n\r\n/**\r\n * Viewport Field of view\r\n * @typedef {Object} Viewport~fov\r\n * @property {Array} extent - The extent of the viewport [minx, miny, maxx, maxy]\r\n * @property {number} rotation - The rotation of the viewport\r\n * @property {bool} [constrainResolution] - Whether to contain the resolution to allowed values when fitting to extent\r\n * @property {Array} [channels] - The selected channels\r\n * @property {number} [layer=0] - The selected layer\r\n * @property {number} [timeframe=0] - The selected timeframe\r\n */\r\n\r\n/**\r\n * Annotation display options\r\n * @typedef {Object} Viewport~annotationOptions\r\n * @property {boolean} [visible=true] - Whether or not to display the loaded annotations\r\n * @property {boolean} [labels=false] - Whether or not to render the text label of each annotation in the viewer\r\n * @property {boolean} [imageBaseUrl=\"\"] - The base URL from which to load images\r\n * @property {number} [imageScale=NaN] - Scale factor for images\r\n * @property {boolean} [alwaysDisplayInMicrons=false] - Whether or not to automatically select the appropriate units for annotations (μm(^2) or mm(^2)) depending on the value\r\n * @property {boolean} [showMeasurements=true] - Whether to show the length and area of an annotation\r\n * @property {boolean} [loadAnnotationsByFingerprint=false] - Whether to load annotations based on image's fingerprint\r\n * @property {Viewport~annotationsFilterCallback} [filter] - A function that takes a PMA.core annotation and returns true if the annotation should be loaded, otherwise false\r\n */\r\n\r\n/**\r\n * Attribution display options\r\n * @typedef {Object} Viewport~attributionOptions\r\n * @property {string} html - The HTML contents to add inside the attribution container element\r\n * @property {string} [className=\"ol-attr\"] - The CSS class to assign to the attribution container element\r\n */\r\n\r\n/**\r\n * Image flip options\r\n * @typedef {Object} Viewport~flipOptions\r\n * @property {boolean} [horizontally=false] - Whether or not to flip the image horizontally\r\n * @property {boolean} [vertically=false] - Whether or not to flip the image vertically\r\n */\r\n\r\n/**\r\n * Function that returns a file name to display in the viewer\r\n * @callback Viewport~filenameCallback\r\n * @param {Object} options\r\n * @param {string} options.serverUrl - The URL of the current PMA.core server\r\n * @param {string} options.fileName - The full path of the currently loaded image\r\n * @returns {string}\r\n */\r\n\r\n/**\r\n * Function that takes a PMA.core annotation and returns true if the annotation should be loaded, otherwise false\r\n * @callback Viewport~annotationsFilterCallback\r\n * @param {Object} annotation - The annotation object to filter\r\n * @returns {bool}\r\n */\r\n\r\n/**\r\n * A custom button to be added to the viewer\r\n * @typedef {Object} Viewport~customButton\r\n * @property {string} title - The title of the button\r\n * @property {string} content - The inner html of the button\r\n * @property {string} class - The class of the button\r\n * @property {ButtonLocations} [location=ButtonLocations.S] - The location in the viewport of the custom button\r\n * @property {function} callback - The callback to call when the button is clicked with this referring to the viewer\r\n */\r\n\r\n/**\r\n * An annotation as returned by pma.core\r\n * @typedef Viewport~annotation\r\n * @property {Number} AnnotationID - The annotation id\r\n * @property {Number} LayerID - The layer id\r\n * @property {string} Geometry - The annotation geometry in wkt format\r\n * @property {string} [Notes] - Optional notes for the annotation\r\n * @property {string} [Classification] - Optional classification string (Necrosis, tumor etc)\r\n * @property {string} [Color] - Optional color\r\n * @property {string} [CreatedBy] - Optional created by string\r\n * @property {string} [UpdateInfo] - Optional update info\r\n * @property {string} [Updatedby] - Optional updated by info\r\n * @property {string} [FillColor] - Optional fill color\r\n * @property {Number} [Dimensions] - Optional dimensionality of the annotation\r\n */\r\n\r\n/**\r\n * An object for configuring the visible and collapse state of a control\r\n * @typedef Viewport~ControlConfiguration\r\n * @property {Controls} control - The control to configure\r\n * @property {boolean} visible - The visibility of the control\r\n * @property {boolean} collapsed - Whether the control is collapsed or not\r\n */\r\n\r\n/**\r\n * An object for configuring the visible and collapse state of a control\r\n * @typedef Viewport~SnapshotCoordinates\r\n * @property {Integer} x - The x coordinate\r\n * @property {Integer} y - The y coordinate\r\n * @property {Integer} w - The width\r\n * @property {Integer} h - The height\r\n * @property {Number} scale - The scale of the current view in radians\r\n * @property {Number} rotation - The rotation of the current view in radians\r\n * @property {Viewport~flipOptions} flip - Whether the image is flipped\r\n */\r\n\r\nexport\r\n    /**\r\n     * Creates a new viewer\r\n     * @param {Object} options - Initialization properties\r\n     * @param {string} options.caller - Downstream application identifier\r\n     * @param {string|HTMLElement} options.element - The element that hosts the viewer. It can be either a valid CSS selector or an HTMLElement instance\r\n     * @param {string} options.image - The path or UID of the image to load\r\n     * @param {Array} options.serverUrls - An array of one or more PMA.core URLs to attempt to connect to. The viewer will loop through all the provided URLs until an accessible one is found.\r\n     * @param {string} [options.username] - The PMA.core username to use to authenticate, in order to obtain a sessionID. If a username and password pair is provided, then a sessionID is not required.\r\n     * @param {string} [options.password] - The PMA.core password to use to authenticate, in order to obtain a sessionID. If a username and password pair is provided, then a sessionID is not required.\r\n     * @param {string} [options.sessionID] - The PMA.core sessionID to use to interact with PMA.core. If a sessionID is provided, then a username and password pair is not required.\r\n     * @param {Number} [options.keyboardPanFactor=0.5] - A factor to calculate pan delta when pressing a keyboard arrow. The actual pan in pixels is calculated as keyboardPanFactor * viewportWidth.\r\n     * @param {Themes} [options.theme=\"default\"] - The theme to use\r\n     * @param {boolean|Object} [options.overview=true] - Whether or not to display an overview map\r\n     * @param {boolean} [options.overview.collapsed] - Whether or not to start the overview in collapsed state\r\n     * @param {boolean} [options.overview.tracking] - Whether or not to start viewport movement tracking\r\n     * @param {boolean|Object} [options.dimensions=true] - Whether or not to display the dimensions selector for images that have more than one channel, z-stack or timeframe\r\n     * @param {boolean} [options.dimensions.collapsed] - Whether or not to start the dimensions selector in collapsed state\r\n     * @param {Viewport~flipOptions} [options.flip] - Image flip options\r\n     * @param {boolean|Object} [options.barcode=false] - Whether or not to display the image's barcode if it exists\r\n     * @param {boolean} [options.barcode.collapsed=undefined] - Whether or not to start the barcode in collapsed state\r\n     * @param {Number} [options.barcode.rotation=undefined] - Rotation in steps of 90 degrees\r\n     * @param {boolean|Object} [options.loadingBar=true] - Whether or not to display a loading bar while the image is loading\r\n     * @param {Viewport~position} [options.position] - The initial position of the viewport within the image\r\n     * @param {boolean} [options.snapshot=false] - Whether or not to display a button that generates a snapshot image\r\n     * @param {boolean} [options.rotationControl=true] - Whether or not to display rotation controls\r\n     * @param {boolean} [options.rotationControl.collapsed] - Whether or not to start rotation controls in collapsed state\r\n     * @param {boolean} [options.fullscreenControl=true] - Whether or not to add a full screen toggle button\r\n     * @param {Viewport~annotationOptions} [options.annotations] - Annotation options\r\n     * @param {Number} [options.digitalZoomLevels=0] - The number of digital zoom levels to add\r\n     * @param {boolean} [options.scaleLine=true] - Whether or not to display a scale line when resolution information is available\r\n     * @param {boolean} [options.colorAdjustments=false] - Whether or not to add a control that allows color adjustments\r\n     * @param {boolean|Object} [options.annotationsLayers=true] - Whether or not to show server side annotation layers\r\n     * @param {boolean} [options.annotationsLayers.collapsed=false] - Whether or not to show the annotation layers control collapsed\r\n     * @param {boolean} [options.annotationsLayers.loadLayers=false] - Whether or not to show all the annotation layers control on slide load\r\n     * @param {Object|boolean} [options.magnifier=false] - Whether or not to show the magnifier control\r\n     * @param {Object|boolean} [options.magnifier.collapsed=undefined] - Whether or not to show the magnifier control in collapsed state\r\n     * @param {Object} [options.grid] - Options for measurement grid\r\n     * @param {Array<number>} [options.grid.size] - Grid cell width and height in micrometers\r\n     * @param {string|Viewport~filenameCallback} [options.filename] - A string to display as the file name or a callback function. If no value is supplied, no file name is displayed.\r\n     * @param {boolean|Viewport~attributionOptions}[options.attributions=undefined] - Whether or not to display Pathomation attribution in the viewer\r\n     * @param {Array<Viewport~customButton>} [options.customButtons] - An array of one or more custom buttons to add to the viewer\r\n     * @param {Viewport~fov} [options.fov] - A specified field of view to load\r\n     * @param {boolean} [options.zoomSlider] - Whether or not to show the zoomSlider control\r\n     * @param {function} [readyCallback] - Called when the slide has finished loading\r\n     * @param {function} [failCallback] - Called when loading the slide failed\r\n     * @tutorial 01-viewer-minimal\r\n     * @tutorial 02-viewer-full\r\n     * @tutorial 05-annotations\r\n     * @tutorial 07-3rd-party-annotations\r\n     */\r\n    class Viewport {\r\n    // options\r\n    // readyCallback\r\n    // failCallback\r\n    // element\r\n    // userInfo\r\n    // imageInfo\r\n    // image;\r\n    // sessionID;\r\n    // username;\r\n    // password;\r\n    // serverUrls\r\n    // overviewControl\r\n    // dimensionsControl\r\n    // barcodeControl\r\n    // colorAdjustmentsControl\r\n    // layerSwitcher\r\n    // zoomSliderControl\r\n    // scaleLineControl\r\n    // magnifierControl\r\n    // filenameControl\r\n    // snapShotControl\r\n    // rotationControl\r\n    // attributionControl\r\n    // serviceUrl\r\n    // imagesUrl\r\n    // channelsString\r\n    // imageAdjustments = { brightness: 0, contrast: 1, gamma: 1, tileTransformers: [] }\r\n    // listeners\r\n    // map\r\n    // hiddenAnnotations\r\n    // annotationsLayer\r\n    // selectedTimeFrame\r\n    // selectedLayer\r\n    // mainLayer\r\n    // measureLayer\r\n    // gridLayer\r\n    // measureDraw\r\n\r\n    constructor(options, readyCallback, failCallback) {\r\n        this.options = options;\r\n\r\n        if (!this.options.hasOwnProperty(\"magnifier\")) {\r\n            this.options.magnifier = false;\r\n        }\r\n\r\n        if (!this.options.hasOwnProperty(\"colorAdjustments\")) {\r\n            this.options.colorAdjustments = false;\r\n        }\r\n\r\n        if (!this.options.hasOwnProperty(\"annotations\")) {\r\n            this.options.annotations = false;\r\n        }\r\n\r\n        if (!this.options.hasOwnProperty(\"fullscreenControl\")) {\r\n            this.options.fullscreenControl = true;\r\n        }\r\n\r\n        this.readyCallback = readyCallback;\r\n        this.failCallback = failCallback;\r\n\r\n        if (!this.options.flip) {\r\n            this.options.flip = {\r\n                horizontally: false,\r\n                vertically: false,\r\n            };\r\n        }\r\n\r\n        if (!checkBrowserCompatibility(options.element)) {\r\n            return;\r\n        }\r\n\r\n        if (typeof options.caller !== \"string\") {\r\n            if (typeof this.failCallback === \"function\") {\r\n                this.failCallback();\r\n            }\r\n\r\n            throw \"Caller parameter not supplied\";\r\n        }\r\n\r\n        if (typeof options.theme !== \"string\") {\r\n            options.theme = \"default\";\r\n        }\r\n\r\n        if (options.element) {\r\n            if (options.element instanceof HTMLElement) {\r\n                this.element = options.element;\r\n            } else if (typeof options.element == \"string\") {\r\n                var el = document.querySelector(options.element);\r\n                if (!el) {\r\n                    throw \"Invalid selector for element\";\r\n                } else {\r\n                    this.element = el;\r\n                }\r\n            }\r\n        } else {\r\n            if (typeof this.failCallback === \"function\") {\r\n                this.failCallback();\r\n            }\r\n\r\n            throw \"No element provided\";\r\n        }\r\n\r\n        this.userInfo = null;\r\n        this.imageInfo = options.imageInfo;\r\n\r\n        if (options.image) {\r\n            this.image = options.image;\r\n        } else if (!this.imageInfo) {\r\n            if (typeof this.failCallback === \"function\") {\r\n                this.failCallback();\r\n            }\r\n\r\n            throw \"No image path or UID provided\";\r\n        } else {\r\n            this.image = this.imageInfo.Filename;\r\n        }\r\n\r\n        if (options.sessionID) {\r\n            this.sessionID = options.sessionID;\r\n        } else if (options.username || options.password) {\r\n            this.username = options.username;\r\n            this.password = options.password;\r\n\r\n            if (!options.username || !options.password) {\r\n                if (typeof this.failCallback === \"function\") {\r\n                    this.failCallback();\r\n                }\r\n\r\n                throw \"Username and/or password not povided\";\r\n            }\r\n        } else {\r\n            if (typeof this.failCallback === \"function\") {\r\n                this.failCallback();\r\n            }\r\n\r\n            throw \"SessionID or Username not provided. Cannot login.\";\r\n        }\r\n\r\n        if (\r\n            options.serverUrls &&\r\n            options.serverUrls instanceof Array &&\r\n            options.serverUrls.length > 0\r\n        ) {\r\n            this.serverUrls = options.serverUrls;\r\n        } else if (!this.imageInfo) {\r\n            if (typeof this.failCallback === \"function\") {\r\n                this.failCallback();\r\n            }\r\n\r\n            throw \"Server URLs not provided or is not an array and no image info was given.\";\r\n        }\r\n\r\n        /**\r\n         * The overview control\r\n         * @type {Overview}\r\n         * @public\r\n         */\r\n        this.overviewControl = null;\r\n\r\n        /**\r\n         * The dimension selector control\r\n         * @type {DimensionSelector}\r\n         * @public\r\n         */\r\n        this.dimensionsControl = null;\r\n\r\n        /**\r\n         * The barcode control\r\n         * @type {AssociatedImage}\r\n         * @public\r\n         */\r\n        this.barcodeControl = null;\r\n\r\n        /**\r\n         * The color adjustment control\r\n         * @type {ColorAdjustment}\r\n         * @public\r\n         */\r\n        this.colorAdjustmentsControl = null;\r\n\r\n        /**\r\n         * The rotation control\r\n         * @type {RotationControl}\r\n         * @public\r\n         */\r\n        this.rotationControl = null;\r\n\r\n        /**\r\n         * The server side annotation layers control\r\n         * @type {LayerSwitch}\r\n         * @public\r\n         */\r\n        this.layerSwitcher = null;\r\n\r\n        /**\r\n         * The mouse wheel interaction\r\n         * @type {PmaMouseWheelZoom}\r\n         * @public\r\n         */\r\n        this.mouseWheelInteraction = null\r\n\r\n        /**\r\n         * The measure draw interaction\r\n         * @type {Draw}\r\n         * @public\r\n         */\r\n        this.measureDraw = null;\r\n\r\n        this.zoomSliderControl = null;\r\n        this.scaleLineControl = null;\r\n        this.magnifierControl = null;\r\n        this.filenameControl = null;\r\n        this.snapShotControl = null;\r\n        this.attributionControl = null;\r\n        this.serviceUrl = null;\r\n        this.imagesUrl = null;\r\n        this.channelsString = null;\r\n        this.channelClippingString = null;\r\n        this.channelGammaString = null;\r\n        this.imageAdjustments = {\r\n            brightness: 0,\r\n            contrast: 1,\r\n            gamma: 1,\r\n            rgb: [1, 1, 1],\r\n            tileTransformers: [],\r\n        };\r\n        if (this.options.loadingBar === undefined) {\r\n            this.options.loadingBar = true;\r\n        }\r\n\r\n        if (this.options.annotationsLayers === undefined) {\r\n            this.options.annotationsLayers = true;\r\n        }\r\n\r\n        // holds callbacks for events\r\n        this.listeners = {};\r\n        this.listeners[Events.DimensionsChanged] = [];\r\n        this.listeners[Events.ViewChanged] = [];\r\n        this.listeners[Events.TilesError] = [];\r\n        this.listeners[Events.SlideLoadError] = [];\r\n        this.listeners[Events.FilenameClick] = [];\r\n        this.listeners[Events.AnnotationLayerChanged] = [];\r\n\r\n        /**\r\n         * The underlying {@link https://openlayers.org/en/latest/apidoc/ol.Map.html|OpenLayers map}\r\n         * @public\r\n         */\r\n        this.map = null;\r\n\r\n        initialize.call(this);\r\n    }\r\n\r\n    /**\r\n     * Calculates the area of an OpenLayers geometry\r\n     * @param {ol.geom} geom - The geometry to calculate the area of\r\n     * @returns {number} The area in squared microns or zero if resolution information is not available\r\n     */\r\n    calculateArea(geom) {\r\n        if (this.imageInfo.MicrometresPerPixelX === 0) {\r\n            return 0;\r\n        }\r\n\r\n        var pixelCoords = null;\r\n\r\n        if (geom instanceof ol.geom.Polygon) {\r\n            pixelCoords = geom.getCoordinates()[0];\r\n        } else if (geom instanceof ol.geom.LineString) {\r\n            ////pixelCoords = geom.getCoordinates();\r\n            return 0;\r\n        } else if (geom instanceof ol.geom.Circle) {\r\n            pixelCoords = fromCircle(geom).getCoordinates()[0];\r\n        } else if (geom instanceof ol.geom.GeometryCollection) {\r\n            var self = this;\r\n            var geometries = geom.getGeometries();\r\n            var area = 0;\r\n            for (var j = 0; j < geometries.length; j++) {\r\n                area += self.calculateArea.call(self, geometries[j]);\r\n            }\r\n\r\n            return area;\r\n        } else {\r\n            return 0;\r\n        }\r\n\r\n        var transformed = [];\r\n        for (var i = 0; i < pixelCoords.length; i++) {\r\n            transformed.push([\r\n                pixelCoords[i][0] * this.imageInfo.MicrometresPerPixelX,\r\n                pixelCoords[i][1] * this.imageInfo.MicrometresPerPixelY,\r\n            ]);\r\n        }\r\n\r\n        var tmpGeom = new ol.geom.Polygon([transformed]);\r\n        var v = tmpGeom.getArea();\r\n        tmpGeom = null;\r\n        return v;\r\n    }\r\n\r\n    /**\r\n     * Calculates the length of an OpenLayers geometry\r\n     * @param {ol.geom} geom - The geometry to calculate the length of\r\n     * @returns {number} The length in microns or zero if resolution information is not available\r\n     */\r\n    calculateLength(geom) {\r\n        if (this.imageInfo.MicrometresPerPixelX === 0) {\r\n            return 0;\r\n        }\r\n\r\n        var pixelCoords = null;\r\n\r\n        if (geom instanceof ol.geom.Polygon) {\r\n            pixelCoords = geom.getCoordinates()[0];\r\n        } else if (geom instanceof ol.geom.LineString) {\r\n            pixelCoords = geom.getCoordinates();\r\n        } else if (geom instanceof ol.geom.Circle) {\r\n            pixelCoords = fromCircle(geom).getCoordinates()[0];\r\n        } else if (geom instanceof ol.geom.GeometryCollection) {\r\n            var self = this;\r\n            var geometries = geom.getGeometries();\r\n            var length = 0;\r\n            for (var j = 0; j < geometries.length; j++) {\r\n                length += self.calculateLength.call(self, geometries[j]);\r\n            }\r\n\r\n            return length;\r\n        } else {\r\n            return 0;\r\n        }\r\n\r\n        var transformed = [];\r\n        for (var i = 0; i < pixelCoords.length; i++) {\r\n            transformed.push([\r\n                pixelCoords[i][0] * this.imageInfo.MicrometresPerPixelX,\r\n                pixelCoords[i][1] * this.imageInfo.MicrometresPerPixelY,\r\n            ]);\r\n        }\r\n\r\n        var tmpGeom = new ol.geom.LineString(transformed);\r\n        var v = tmpGeom.getLength();\r\n        tmpGeom = null;\r\n        return v;\r\n    }\r\n\r\n    /**\r\n     * Formats the length of an OpenLayers geometry\r\n     * @param {number} length - The length of the geometry to format\r\n     * @returns {number} The string with the formatted length and unit\r\n     */\r\n    formatLength(length) {\r\n        if (this.imageInfo.MicrometresPerPixelX === 0) {\r\n            return 0;\r\n        }\r\n\r\n        var alwaysDisplayInMicrons =\r\n            this.options.annotations &&\r\n            this.options.annotations.alwaysDisplayInMicrons === true;\r\n\r\n        var output;\r\n        if (!alwaysDisplayInMicrons && length >= 1000) {\r\n            output = Math.round((length * 10) / 1000) / 10 + \" mm\";\r\n        } else {\r\n            output = Math.round(length * 10) / 10 + \" μm\";\r\n        }\r\n\r\n        return output;\r\n    }\r\n\r\n    /**\r\n     * Formats the area of an OpenLayers geometry\r\n     * @param {number} area - The area of the geometry to format\r\n     * @returns {number} The string with the formatted area and unit\r\n     */\r\n    formatArea(area) {\r\n        if (this.imageInfo.MicrometresPerPixelX === 0) {\r\n            return 0;\r\n        }\r\n\r\n        var supscript = String.fromCharCode(\"2\".charCodeAt(0) + 128);\r\n        var alwaysDisplayInMicrons =\r\n            this.options.annotations &&\r\n            this.options.annotations.alwaysDisplayInMicrons === true;\r\n\r\n        var output;\r\n        if (!alwaysDisplayInMicrons && area >= 100000) {\r\n            output = Math.round((area * 10) / 1000000) / 10 + \" mm\" + supscript; //<sup>2</sup>';\r\n        } else {\r\n            output = Math.round(area * 10) / 10 + \" μm\" + supscript; // <sup>2</sup>';\r\n        }\r\n\r\n        return output;\r\n    }\r\n\r\n    /**\r\n     * Returns the text style to be used to render the text part (labels) of annotations. This method is not meant to be used by PMA.UI consumers.\r\n     * @param {ol.Feature} [feature] - The ol.Feature associated with the annotation\r\n     * @returns {ol.style.Text} A text style instance\r\n     */\r\n    getAnnotationTextStyle(feature, strokeColor) {\r\n        var txt = this.getAnnotationFormattedLabel(feature);\r\n\r\n        return new olText({\r\n            text: txt,\r\n            textAlign: \"center\",\r\n            textBaseline: \"bottom\",\r\n            placement: \"point\",\r\n            overflow: true,\r\n            font: \"normal 16px Tahoma\",\r\n            fill: new Fill({\r\n                color: \"#000000\",\r\n            }),\r\n            stroke: new Stroke({\r\n                color: \"#ffffff\",\r\n                width: 2,\r\n            }),\r\n        });\r\n    }\r\n\r\n    /**\r\n     * Returns the text of an annotation. This method is not meant to be used by PMA.UI consumers.\r\n     * @param {ol.Feature} [feature] - The ol.Feature associated with the annotation\r\n     * @returns {String} The annotation text\r\n     */\r\n    getAnnotationFormattedLabel(feature) {\r\n        var txt = \"\";\r\n        if (this.options.annotations && feature && feature.metaData) {\r\n            if (this.options.annotations.labels !== false && feature.metaData.Notes) {\r\n                txt = feature.metaData.Notes;\r\n            }\r\n\r\n            if (this.options.annotations.showMeasurements !== false) {\r\n                var geomType = feature.getGeometry().getType();\r\n                if (feature.metaData.hasOwnProperty(\"Dimensions\") && !isNaN(feature.metaData.Dimensions)) {\r\n                    if (feature.metaData.Dimensions > 0) {\r\n                        txt += \"\\n\" + feature.metaData.FormattedLength;\r\n                    }\r\n\r\n                    if (feature.metaData.Dimensions > 1) {\r\n                        txt += \"\\n\" + feature.metaData.FormattedArea;\r\n                    }\r\n                } else {\r\n                    if (geomType.indexOf(\"LineString\") !== -1) {\r\n                        txt += \"\\n\" + feature.metaData.FormattedLength;\r\n                    } else if (geomType.indexOf(\"Polygon\") !== -1 || geomType.indexOf(\"Circle\") !== -1) {\r\n                        txt +=\r\n                            \"\\n\" +\r\n                            feature.metaData.FormattedLength +\r\n                            \"\\n\" +\r\n                            feature.metaData.FormattedArea;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        return txt;\r\n    }\r\n\r\n    /**\r\n     * Returns a style that contatins the text of an annotation. This method is not meant to be used by PMA.UI consumers.\r\n     * @param {ol.style.Style} [style] - The ol.style.Style associated with the annotation\r\n     * @param {ol.Feature} [feature] - The ol.Feature associated with the annotation\r\n     * @returns {Function} The annotation style function\r\n     */\r\n    getAnnotationStyle(style, feature) {\r\n        style.getText().setText(this.getAnnotationFormattedLabel(feature));\r\n        return style;\r\n        // var self = this;\r\n        // return function () {\r\n        //     style.getText().setText(self.getAnnotationFormattedLabel(feature));\r\n        //     return style;\r\n        // };\r\n    }\r\n\r\n    /**\r\n     * Toggles the visibility of an annotation\r\n     * @param {number} id - The id of the annotation to hide or show\r\n     * @param {boolean} show - True to show the annotation, otherwise hide it\r\n     */\r\n    showAnnotation(id, show) {\r\n        if (id === null || isNaN(id)) {\r\n            return;\r\n        }\r\n\r\n        if (!this.hiddenAnnotations) {\r\n            this.hiddenAnnotations = [];\r\n        }\r\n\r\n        var f = null;\r\n        if (show) {\r\n            for (var k = 0; k < this.hiddenAnnotations.length; k++) {\r\n                if (this.hiddenAnnotations[k].getId() == id) {\r\n                    f = this.hiddenAnnotations.splice(k, 1);\r\n                    this.annotationsLayer.getSource().addFeatures(f);\r\n                    return;\r\n                }\r\n            }\r\n        } else {\r\n            f = this.annotationsLayer.getSource().getFeatureById(id);\r\n            if (f) {\r\n                this.annotationsLayer.getSource().removeFeature(f);\r\n                this.hiddenAnnotations.push(f);\r\n            }\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Toggles the visibility of annotations loaded by fingerprint and loads them if not already loaded\r\n     * @param {boolean} show - True to show the annotation, otherwise hide it\r\n     */\r\n    showAnnotationsByFingerprint(show) {\r\n        if (show) {\r\n            if (!this.forceLoadedAnnotationsByFingerprint) {\r\n                if (!this.options.annotations.loadAnnotationsByFingerprint) {\r\n                    getFingerprint.call(this, (fingerprint) => {\r\n                        this.reloadAnnotations(null, fingerprint);\r\n                    });\r\n                    this.forceLoadedAnnotationsByFingerprint = true;\r\n                }\r\n            }\r\n        }\r\n\r\n        if (!this.hiddenAnnotationsByFingerprint) {\r\n            this.hiddenAnnotationsByFingerprint = [];\r\n        }\r\n\r\n        var f = null;\r\n        var annotations = this.annotationsLayer.getSource().getFeatures();\r\n\r\n        if (show) {\r\n            for (var k = this.hiddenAnnotationsByFingerprint.length; k > 0; k--) {\r\n                f = this.hiddenAnnotationsByFingerprint.pop();\r\n                this.annotationsLayer.getSource().addFeature(f);\r\n            }\r\n        } else {\r\n            for (var l = 0; l < annotations.length; l++) {\r\n                f = annotations[l];\r\n                if (f.metaData.Image !== this.imageInfo.Filename) {\r\n                    this.annotationsLayer.getSource().removeFeature(f);\r\n                    this.hiddenAnnotationsByFingerprint.push(f);\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Toggles the visibility of the annotations layer in total\r\n     * @param {boolean} show - True to show the annotations, otherwise hide them\r\n     */\r\n    showAnnotations(visible) {\r\n        if (!this.annotationsLayer) {\r\n            return;\r\n        }\r\n\r\n        this.annotationsLayer.setVisible(visible);\r\n    }\r\n\r\n    /**\r\n     * Gets a value indicating whether or not the text of the annotations is rendered in the viewer\r\n     */\r\n    getAnnotationLabelsVisible() {\r\n        if (!this.annotationsLayer) {\r\n            return false;\r\n        }\r\n\r\n        return this.options.annotations.labels === true;\r\n    }\r\n\r\n    /**\r\n     * Toggles the text of the annotations visibility\r\n     * @param {boolean} visible - True to show the annotation labels, otherwise hide them\r\n     * @param {boolean} [showMeasurements] - True to show the annotation measurements, otherwise hide them\r\n     */\r\n    showAnnotationsLabels(visible, showMeasurements) {\r\n        if (!this.annotationsLayer) {\r\n            return;\r\n        }\r\n\r\n        var _this = this;\r\n\r\n        if (showMeasurements !== undefined) {\r\n            if (this.options.annotations.labels === visible && this.options.annotations.showMeasurements === showMeasurements) {\r\n                return;\r\n            }\r\n            this.options.annotations.showMeasurements = showMeasurements;\r\n        } else {\r\n            showMeasurements = this.options.annotations.showMeasurements;\r\n        }\r\n\r\n        this.options.annotations.labels = visible;\r\n        this.annotationsLayer\r\n            .getSource()\r\n            .forEachFeature(function (feature, index) {\r\n                var styles = feature.getStyle();\r\n                var style = null;\r\n\r\n                if (styles instanceof Array) {\r\n                    for (var k = 0; k < styles.length; k++) {\r\n                        if (styles[k].getText()) {\r\n                            style = styles[k];\r\n                            break;\r\n                        }\r\n                    }\r\n                } else {\r\n                    style = styles;\r\n                }\r\n\r\n                if (!style) {\r\n                    return;\r\n                }\r\n                try {\r\n                    if (!visible && !showMeasurements) {\r\n                        style.getText().setText(\"\");\r\n                    } else {\r\n                        style.getText().setText(_this.getAnnotationFormattedLabel(feature));\r\n                    }\r\n                } catch {\r\n                    return;\r\n                }\r\n\r\n                //feature.changed();\r\n            }, this);\r\n\r\n        this.annotationsLayer.changed();\r\n    }\r\n\r\n    /*        zoomToAnnotation(annotationIndex) {\r\n                this.map.getLayers().forEach(function (layer, i) {\r\n                    if (layer instanceof ol.layer.Vector) {\r\n                        var selection = layer.getSource().getFeatures()[annotationIndex];\r\n                        var extent = selection.getGeometry().getExtent();\r\n     \r\n                        var view2D = this.map.getView();\r\n                        view2D.fit(extent, this.map.getSize());\r\n                    }\r\n                }, this);\r\n            };\r\n    */\r\n\r\n    /**\r\n     * Returns all the annotations\r\n     * @returns {Array} An array of ol.Feature instances\r\n     */\r\n    getAnnotations() {\r\n        if (!this.annotationsLayer) {\r\n            return null;\r\n        }\r\n\r\n        if (this.hiddenAnnotations && this.hiddenAnnotations.length > 0) {\r\n            return this.annotationsLayer\r\n                .getSource()\r\n                .getFeatures()\r\n                .concat(this.hiddenAnnotations);\r\n        } else {\r\n            return this.annotationsLayer.getSource().getFeatures();\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Gets an array that contains the indices of the currently active channels\r\n     * @returns {Array}\r\n     */\r\n    getActiveChannels() {\r\n        var channels = [];\r\n        for (\r\n            var i = 0; i < this.imageInfo.TimeFrames[0].Layers[0].Channels.length; i++\r\n        ) {\r\n            if (this.imageInfo.TimeFrames[0].Layers[0].Channels[i].Active) {\r\n                channels.push(i);\r\n            }\r\n        }\r\n\r\n        return channels;\r\n    }\r\n\r\n    /**\r\n     * Sets the active channels\r\n     * @param {Array} channels - An array that contains the indices of the channels to display\r\n     * @fires PMA.UI.View.Events#DimensionsChanged\r\n     */\r\n    setActiveChannels(channels) {\r\n        for (var i = 0; i < this.imageInfo.TimeFrames[0].Layers[0].Channels.length; i++) {\r\n            this.imageInfo.TimeFrames[0].Layers[0].Channels[i].Active = false;\r\n        }\r\n\r\n        for (i = 0; i < channels.length; i++) {\r\n            this.imageInfo.TimeFrames[0].Layers[0].Channels[\r\n                channels[i]\r\n            ].Active = true;\r\n        }\r\n\r\n        this.channelsString = this.getActiveChannels().join(\",\");\r\n        this.channelClippingString = this.getChannelClippingString();\r\n        this.channelGammaString = this.getChannelGammaString();\r\n        this.redraw();\r\n        this.fireEvent(Events.DimensionsChanged, this);\r\n    }\r\n\r\n    /**\r\n     * Sets the rendering options for a channel\r\n     * @param {object} options - An object that determines the channel and the options to be set\r\n     * @param {number} options.index - An object that determines the channel and the options to be set\r\n     * @param {Array<Number>} options.clipping - A pair of values [0..100] to clip and scale pixel values\r\n     * @param {Number} options.gamma - A value of tha gamma correction factor for this channel\r\n     */\r\n    setChannelRenderingOptions(options) {\r\n        this.imageInfo.TimeFrames[0].Layers[0].Channels[options.index].Clipping = options.clipping;\r\n        this.imageInfo.TimeFrames[0].Layers[0].Channels[options.index].Gamma = options.gamma;\r\n        this.channelClippingString = this.getChannelClippingString();\r\n        this.channelGammaString = this.getChannelGammaString();\r\n\r\n        this.redraw();\r\n        this.fireEvent(Events.DimensionsChanged, this);\r\n    }\r\n\r\n    getChannelClippingString() {\r\n        const channels = this.imageInfo.TimeFrames[0].Layers[0].Channels;\r\n        this.channelClippingString = \"\";\r\n        for (let i = 0; i < channels.length; i++) {\r\n            if (!channels[i].Active) {\r\n                continue;\r\n            }\r\n\r\n            if (this.channelClippingString.length > 0) {\r\n                this.channelClippingString += \",\";\r\n            }\r\n\r\n            if (channels[i].Clipping) {\r\n                this.channelClippingString += channels[i].Clipping[0] + \",\" + channels[i].Clipping[1];\r\n            } else {\r\n                this.channelClippingString += \"0,100\";\r\n            }\r\n        }\r\n\r\n        return this.channelClippingString;\r\n    }\r\n\r\n    getChannelGammaString() {\r\n        const channels = this.imageInfo.TimeFrames[0].Layers[0].Channels;\r\n        this.channelGammaString = \"\";\r\n        for (let i = 0; i < channels.length; i++) {\r\n            if (!channels[i].Active) {\r\n                continue;\r\n            }\r\n\r\n            if (this.channelGammaString.length > 0) {\r\n                this.channelGammaString += \",\";\r\n            }\r\n\r\n            if (channels[i].Gamma) {\r\n                this.channelGammaString += channels[i].Gamma;\r\n            } else {\r\n                this.channelGammaString += \"1.0\";\r\n            }\r\n        }\r\n\r\n        return this.channelGammaString;\r\n    }\r\n\r\n    /**\r\n     * Gets the index of the active time frame\r\n     * @returns {number}\r\n     */\r\n    getActiveTimeFrame() {\r\n        return this.selectedTimeFrame;\r\n    }\r\n\r\n    /**\r\n     * Sets the active time frame\r\n     * @param {number} timeframe - The index of the time frame to activate\r\n     * @fires PMA.UI.View.Events#DimensionsChanged\r\n     */\r\n    setActiveTimeFrame(timeframe) {\r\n        timeframe = parseInt(timeframe);\r\n        if (timeframe >= 0 && timeframe < this.imageInfo.TimeFrames.length) {\r\n            this.selectedTimeFrame = timeframe;\r\n            this.redraw();\r\n            this.fireEvent(Events.DimensionsChanged, this);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Gets the index of the active layer (z-stack)\r\n     * @returns {number}\r\n     */\r\n    getActiveLayer() {\r\n        return this.selectedLayer;\r\n    }\r\n\r\n    /**\r\n     * Sets the active layer (z-stack)\r\n     * @param {number} layer - The index of the layer to activate\r\n     * @fires PMA.UI.View.Events#DimensionsChanged\r\n     */\r\n    setActiveLayer(layer) {\r\n        layer = parseInt(layer);\r\n        if (\r\n            layer >= 0 &&\r\n            layer <\r\n            this.imageInfo.TimeFrames[this.selectedTimeFrame].Layers.length\r\n        ) {\r\n            this.selectedLayer = layer;\r\n            this.redraw();\r\n            this.fireEvent(Events.DimensionsChanged, this);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Sets the image flip options\r\n     * @param {bool} horizontally - Whether or not to flip the image horizontally\r\n     * @param {bool} vertically - Whether or not to flip the image vertically\r\n     */\r\n    setFlip(horizontally, vertically) {\r\n        var newH = horizontally == true;\r\n        var newV = vertically == true;\r\n\r\n        var hasHorizontalChange = this.options.flip.horizontally !== newH;\r\n        var hasVerticalChange = this.options.flip.vertically !== newV;\r\n\r\n        if (!hasHorizontalChange && !hasVerticalChange) {\r\n            return;\r\n        }\r\n\r\n        // reset all annotations, before we change the transformation\r\n        var i, geom;\r\n        var oldExtent = this.map.getView().getProjection().getExtent();\r\n        var oldPos = this.getPosition();\r\n        var oldView = this.map.getView();\r\n        var extent = oldView.getProjection().getExtent();\r\n        var extentObj = { extent: extent, flip: this.options.flip };\r\n        var annotations = this.getAnnotations();\r\n        if (annotations) {\r\n            for (i = 0; i < annotations.length; i++) {\r\n                geom = annotations[i].getGeometry();\r\n                geom.applyTransform(annotationTransform.bind(extentObj));\r\n            }\r\n        }\r\n\r\n        this.options.flip.horizontally = newH;\r\n        this.options.flip.vertically = newV;\r\n\r\n        var pixelProjection = createProjection.call(this);\r\n\r\n        this.map.setView(\r\n            createMainView.call(\r\n                this,\r\n                pixelProjection,\r\n                null,\r\n                null, -oldView.getRotation()\r\n            )\r\n        );\r\n\r\n        // now apply the new transformation\r\n        extent = this.map.getView().getProjection().getExtent();\r\n        extentObj = { extent: extent, flip: this.options.flip };\r\n        if (annotations) {\r\n            for (i = 0; i < annotations.length; i++) {\r\n                geom = annotations[i].getGeometry();\r\n                geom.applyTransform(annotationTransform.bind(extentObj));\r\n            }\r\n        }\r\n\r\n        // if (this.options.grid) {\r\n        //     this.toggleGrid(this.options.grid.size);\r\n        // }\r\n\r\n        var pos = this.getPosition();\r\n        pos.zoom = oldPos.zoom;\r\n\r\n        if (hasHorizontalChange) {\r\n            pos.center[0] = extent[0] + (oldExtent[2] - oldPos.center[0]);\r\n        } else {\r\n            pos.center[0] = extent[0] + (oldPos.center[0] - oldExtent[0]);\r\n        }\r\n\r\n        if (hasVerticalChange) {\r\n            pos.center[1] = extent[1] + (oldExtent[3] - oldPos.center[1]);\r\n        } else {\r\n            pos.center[1] = extent[1] + (oldPos.center[1] - oldExtent[1]);\r\n        }\r\n\r\n        this.setPosition(pos, null);\r\n\r\n        this.redraw();\r\n\r\n        if (this.overviewControl) {\r\n            this.overviewControl.setMap(null);\r\n            var overviewVisible = getControlVisibility.call(\r\n                this,\r\n                this.element.querySelector(\".ol-overview\")\r\n            );\r\n\r\n            var overviewCollapsed = this.overviewControl && this.overviewControl.getCollapsed();\r\n\r\n            this.map.removeControl(this.overviewControl);\r\n            this.overviewControl = createOverviewControl.call(this);\r\n            this.map.addControl(this.overviewControl);\r\n\r\n            if (!overviewVisible) {\r\n                setControlVisibility.call(\r\n                    this,\r\n                    this.element.querySelector(\".ol-overview\"),\r\n                    false\r\n                );\r\n            }\r\n\r\n            this.overviewControl.setCollapsed(overviewCollapsed);\r\n            setMapSizeClass.call(this);\r\n        }\r\n\r\n        this.fireEvent(Events.ViewChanged, this);\r\n    }\r\n\r\n    /**\r\n     * Gets the image flip options\r\n     * @returns {Viewport~flipOptions}\r\n     */\r\n    getFlip() {\r\n        return {\r\n            horizontally: this.options.flip.horizontally,\r\n            vertically: this.options.flip.vertically,\r\n        };\r\n    }\r\n\r\n    /**\r\n     * Forces the viewer to refresh\r\n     */\r\n    redraw() {\r\n        var array = this.map.getLayers().getArray();\r\n        var layer;\r\n        for (var i = 0; i < array.length; i++) {\r\n            if (array[i].getSource) {\r\n                if (array[i] === this.mainLayer) {\r\n                    var maxZoom = this.imageInfo.MaxZoomLevel;\r\n\r\n                    var tilesPerBoxSide = Math.pow(2, maxZoom);\r\n\r\n                    layer = new ol.layer.Tile({\r\n                        source: new ol.source.XYZ({\r\n                            tileUrlFunction: this.mainLayer.getSource().getTileUrlFunction(),\r\n                            tileLoadFunction: this.mainLayer.getSource().getTileLoadFunction(),\r\n                            projection: this.mainLayer.getSource().getProjection(),\r\n                            wrapX: false,\r\n                            attributions: \"\",\r\n                            crossOrigin: \"PMA.UI\",\r\n                            tileGrid: ol.tilegrid.createXYZ({\r\n                                tileSize: [this.imageInfo.TileSize, this.imageInfo.TileSize],\r\n                                extent: [0, 0, tilesPerBoxSide * this.imageInfo.TileSize, tilesPerBoxSide * this.imageInfo.TileSize],\r\n                                maxZoom: maxZoom\r\n                            }),\r\n                        }),\r\n                        className: \"ol-layer main-layer\",\r\n                        extent: [0, 0, tilesPerBoxSide * this.imageInfo.TileSize, tilesPerBoxSide * this.imageInfo.TileSize],\r\n                    });\r\n\r\n                    layer.set(\"active\", true, true);\r\n                    this.mainLayer.set(\"active\", false, true);\r\n\r\n                    if (this.options.loadingBar) {\r\n                        unByKey(this.listeners.tileloadstart);\r\n                        unByKey(this.listeners.tileloadend);\r\n                        unByKey(this.listeners.tileloaderror);\r\n\r\n                        this.listeners.tileloadstart = [];\r\n                        this.listeners.tileloadend = [];\r\n                        this.listeners.tileloaderror = [];\r\n\r\n                        this.loading = 0;\r\n                        this.loaded = 0;\r\n                        updateProgress.call(this);\r\n\r\n                        var olViewer = this;\r\n\r\n                        this.listeners.tileloadstart.push(layer.getSource().on('tileloadstart', function () {\r\n                            if (olViewer.loading === 0) {\r\n                                olViewer.progressEl.style.visibility = 'visible';\r\n                            }\r\n\r\n                            ++olViewer.loading;\r\n                            updateProgress.call(olViewer);\r\n                        }));\r\n\r\n                        this.listeners.tileloadend.push(layer.getSource().on('tileloadend', function () {\r\n                            setTimeout(function () {\r\n                                ++olViewer.loaded;\r\n                                updateProgress.call(olViewer);\r\n                            }, 100);\r\n                        }));\r\n\r\n                        this.listeners.tileloaderror.push(layer.getSource().on('tileloaderror', function () {\r\n                            setTimeout(function () {\r\n                                ++olViewer.loaded;\r\n                                updateProgress.call(olViewer);\r\n                            }, 100);\r\n                        }));\r\n                    }\r\n\r\n                    setTimeout((map, mainLayer, overviewControl) => {\r\n                        overviewControl.setMap(null);\r\n                        map.removeLayer(mainLayer);\r\n                        overviewControl.setMap(map);\r\n                    }, 10000, this.map, this.mainLayer, this.overviewControl);\r\n                }\r\n                // else {\r\n                //     if (!(array[i].getSource() instanceof ol.source.XYZ)) {\r\n                //         array[i].getSource().refresh();\r\n                //     }\r\n                // }\r\n            } else if (array[i].getLayers) {\r\n                var groupLayers = array[i].getLayers().getArray();\r\n                for (var j = 0; j < groupLayers.length; j++) {\r\n                    groupLayers[j].getSource().refresh();\r\n                    groupLayers[j].setZIndex(999);\r\n                }\r\n            }\r\n        }\r\n\r\n        if (layer) {\r\n            this.mainLayer = layer;\r\n            this.map.addLayer(this.mainLayer);\r\n            this.mainLayer.setZIndex(900);\r\n            if (this.annotationsLayer) {\r\n                this.annotationsLayer.setZIndex(1000);\r\n            }\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Zooms the view to a specific objective\r\n     * @param {string} objective - 1:1, 1X, 2X, 5X, 10X etc.\r\n     */\r\n    zoomToObjective(objective) {\r\n        if (!this.imageInfo || this.imageInfo.MicrometresPerPixelX === 0) {\r\n            return;\r\n        }\r\n\r\n        var mapResolution;\r\n        if (\"1:1\" === objective) {\r\n            mapResolution = 1;\r\n        } else {\r\n            objective = parseFloat(objective);\r\n            if (isNaN(objective) || objective === 0.0) {\r\n                return;\r\n            }\r\n\r\n            // mapResolution =\r\n            //     (this.imageInfo.MicrometresPerPixelX - 0.75) /\r\n            //     -0.0125 /\r\n            //     objective;\r\n            mapResolution = 10 / this.imageInfo.MicrometresPerPixelX / objective;\r\n        }\r\n\r\n        this.map.getView().setResolution(mapResolution);\r\n    }\r\n\r\n    /**\r\n     * Gets the current viewport position\r\n     * @returns {Viewport~position} position\r\n     */\r\n    getPosition() {\r\n        if (!this.map) {\r\n            return null;\r\n        }\r\n\r\n        var v = this.map.getView();\r\n        if (!v) {\r\n            return null;\r\n        }\r\n\r\n        return {\r\n            center: v.getCenter(),\r\n            zoom: v.getZoom(),\r\n            resolution: v.getResolution(),\r\n            rotation: v.getRotation(),\r\n        };\r\n    }\r\n\r\n    /**\r\n     * sets the current viewport position\r\n     * @param {Viewport~position} position\r\n     */\r\n    setPosition(position, skipAnimation) {\r\n        if (!this.map) {\r\n            return;\r\n        }\r\n\r\n        var mainView = this.map.getView();\r\n\r\n        mainView.animate(Object.assign(position, { duration: 0 }));\r\n    }\r\n\r\n    /**\r\n     * Fits the view to supplied extent\r\n     * @param {ol.geom.SimpleGeometry|Array.<number>} extent - An array of numbers representing an extent: `[minx, miny, maxx, maxy]` or a simple geometry\r\n     * @param {bool} constrainResolution - Whether to fit at any resolution even outside the allowed range\r\n     */\r\n    fitToExtent(extent, constrainResolution) {\r\n        if (!this.map) {\r\n            return;\r\n        }\r\n\r\n        var mainView = this.map.getView();\r\n        mainView.fit(extent, {\r\n            size: this.map.getSize(),\r\n            constrainResolution: constrainResolution ?\r\n                constrainResolution : false,\r\n        });\r\n    }\r\n\r\n    /**\r\n     * Gets the currently visible extent\r\n     * @param {bool} unrotate - Whether to unrotate the extend back to axis aligned\r\n     * @returns {Array.<number>} An array of numbers representing an extent: `[minx, miny, maxx, maxy]`\r\n     */\r\n    getCurrentExtent(unrotate) {\r\n        if (!this.map) {\r\n            return;\r\n        }\r\n\r\n        var mainView = this.map.getView();\r\n        var extent = mainView.calculateExtent(this.map.getSize());\r\n\r\n        if (unrotate) {\r\n            return this.rotateExtent(extent, -mainView.getRotation());\r\n        }\r\n\r\n        return extent;\r\n    }\r\n\r\n    /**\r\n     * Overrides the current sessionID and forces the viewer to redraw\r\n     * @param {string} sessionID\r\n     */\r\n    setSessionID(sessionID) {\r\n        this.sessionID = sessionID;\r\n        this.redraw();\r\n    }\r\n\r\n    /**\r\n     * Gets the currently used sessionID\r\n     * @returns {string}\r\n     */\r\n    getSessionID() {\r\n        return this.sessionID;\r\n    }\r\n\r\n    /**\r\n     * Authenticates and forces the viewer to redraw\r\n     * @param {string} username\r\n     * @param {string} password\r\n     */\r\n    login(username, password) {\r\n        if (username) {\r\n            this.username = username;\r\n        }\r\n\r\n        if (password) {\r\n            this.password = password;\r\n        }\r\n\r\n        login.call(this, this.redraw);\r\n    }\r\n\r\n    /**\r\n     * Generates a rectangle for the current view\r\n     * @returns {Array.<number[]>} An array of the x, y coordinates of the 4 corners of viewing rectangle\r\n     */\r\n    getViewportCoordinates() {\r\n        var mapSize = this.map.getSize();\r\n        var coords = [\r\n            this.map.getCoordinateFromPixel([0, 0]),\r\n            this.map.getCoordinateFromPixel([mapSize[0], 0]),\r\n            this.map.getCoordinateFromPixel([mapSize[0], mapSize[1]]),\r\n            this.map.getCoordinateFromPixel([0, mapSize[1]]),\r\n        ];\r\n\r\n        var flip = this.getFlip();\r\n\r\n        var maxZoom = this.imageInfo.MaxZoomLevel;\r\n        var pow = Math.pow(2, maxZoom);\r\n\r\n        var xPadding = 0,\r\n            yPadding = 0;\r\n        var boxSize = pow * this.imageInfo.TileSize;\r\n\r\n        if (flip.horizontally === true) {\r\n            xPadding = boxSize - this.imageInfo.Width;\r\n        }\r\n\r\n        if (flip.vertically !== true) {\r\n            yPadding = boxSize - this.imageInfo.Height;\r\n        }\r\n\r\n        for (var i = 0; i < 4; i++) {\r\n            coords[i][0] -= xPadding;\r\n            coords[i][1] -= yPadding;\r\n            if (flip.horizontally === true) {\r\n                coords[i][0] = this.imageInfo.Width - coords[i][0];\r\n            }\r\n\r\n            if (flip.vertically !== true) {\r\n                coords[i][1] = this.imageInfo.Height - coords[i][1];\r\n            }\r\n        }\r\n\r\n        return coords;\r\n    }\r\n\r\n    /**\r\n     * Generates the parameters required for generating a snapshot url using getSnapshotUrl\r\n     * @returns {PMA.UI.Components~snapshotParameters}\r\n     */\r\n    getSnapshotParameters() {\r\n        var coords = this.getViewportCoordinates();\r\n        var size = this.map.getSize();\r\n        var scale = 1 / this.map.getView().getResolution();\r\n        var flip = this.getFlip();\r\n\r\n        var rotation =\r\n            ((-this.map.getView().getRotation() * 180.0) / Math.PI) % 360;\r\n        if (flip.horizontally ^ flip.vertically) {\r\n            rotation *= -1;\r\n        }\r\n\r\n        var x = Math.round(coords[0][0]);\r\n        var y = Math.round(coords[0][1]);\r\n        var w = Math.round(size[0] / scale);\r\n        var h = Math.round(size[1] / scale);\r\n\r\n        return {\r\n            x: x,\r\n            y: y,\r\n            width: w,\r\n            height: h,\r\n            rotation: rotation,\r\n            channels: this.getActiveChannels(),\r\n            layer: this.selectedLayer,\r\n            timeframe: this.selectedTimeFrame,\r\n            flipHorizontally: flip.horizontally,\r\n            flipVertically: flip.vertically,\r\n        };\r\n    }\r\n\r\n    /**\r\n     * An object containing the url, width and height of the final image\r\n     * @typedef {Object} PMA.UI.View~SnapshotResult\r\n     * @property {url} url - The snapshot url\r\n     * @property {Number} width - The width of the snapshot\r\n     * @property {boolean} height - The height of the snapshot\r\n     */\r\n\r\n    /**\r\n     * Generates a URL where a snapshot of the current viewport is rendered\r\n     * @param {boolean} download - True to prompt the user to save the snapshot instead of viewing it within the browser\r\n     * @param {PMA.UI.View.ObjectiveResolutions} [objectiveResolution] - The desired objective resolution. If not passed the viewport scale will be used\r\n     * @param {string} [format=jpg] - The snapshot image format\r\n     * @param {boolean} [drawScaleBar=false] - Whether or not to draw a scalebar\r\n     * @param {number} [dpi=null] - Dots per inch to set to the image\r\n     * @param {string} [filename=snapshot] - The filename of the image\r\n     * @returns {PMA.UI.View~SnapshotResult} - An object containing the url, width and height of the final image\r\n     */\r\n    getSnapshotUrl(download, objectiveResolution, format, drawScaleBar, dpi = null, filename = \"snapshot\") {\r\n        if (!format) {\r\n            format = \"jpg\";\r\n        }\r\n\r\n        if (filename === null) {\r\n            filename = \"snapshot\";\r\n        }\r\n\r\n        drawScaleBar = !!drawScaleBar;\r\n\r\n        var coords = this.getViewportCoordinates();\r\n        var size = this.map.getSize();\r\n        var flip = this.getFlip();\r\n        var scale = 1 / this.map.getView().getResolution();\r\n        if (objectiveResolution) {\r\n            if (objectiveResolution == ObjectiveResolutions.Min) {\r\n                scale = 1 / Math.pow(2, this.imageInfo.MaxZoomLevel);\r\n            } else if (objectiveResolution == ObjectiveResolutions.Max) {\r\n                if (this.options.digitalZoomLevels > 0) {\r\n                    scale = 2;\r\n                } else {\r\n                    scale = 1;\r\n                }\r\n            } else if (objectiveResolution == ObjectiveResolutions[\"1:1\"]) {\r\n                scale = 1;\r\n            } else {\r\n                var obji = parseInt(objectiveResolution);\r\n                if (obji >= 1) {\r\n                    var leveli = -Math.log2(10) + Math.log2(obji * this.imageInfo.MicrometresPerPixelX) + this.imageInfo.MaxZoomLevel;\r\n                    scale = 1 / Math.pow(2, this.imageInfo.MaxZoomLevel - leveli);\r\n                }\r\n            }\r\n        }\r\n\r\n        // if no flip is set, or both horizontal and vertical flipping is set\r\n        // we need the negative rotation angle,\r\n        // otherwise, if one fo the two flips is set but not the other, we must not negate the angle\r\n        var rotation = ((-this.map.getView().getRotation() * 180.0) / Math.PI) % 360;\r\n        if (flip.horizontally ^ flip.vertically) {\r\n            rotation *= -1;\r\n        }\r\n\r\n        var x = Math.round(coords[0][0]);\r\n        var y = Math.round(coords[0][1]);\r\n\r\n        var w = Math.round(size[0] * this.map.getView().getResolution());\r\n        var h = Math.round(size[1] * this.map.getView().getResolution());\r\n\r\n        var url =\r\n            this.imagesUrl +\r\n            \"region?pathOrUid=\" +\r\n            encodeURIComponent(this.image) +\r\n            \"&format=\" +\r\n            encodeURIComponent(format) +\r\n            \"&timeframe=\" +\r\n            this.selectedTimeFrame +\r\n            \"&layer=\" +\r\n            this.selectedLayer +\r\n            \"&channels=\" +\r\n            this.channelsString +\r\n            \"&channelClipping=\" +\r\n            this.channelClippingString +\r\n            \"&gamma=\" +\r\n            this.channelGammaString +\r\n            \"&sessionID=\" +\r\n            encodeURIComponent(this.sessionID) +\r\n            \"&drawScaleBar=\" +\r\n            drawScaleBar +\r\n            \"&x=\" +\r\n            x +\r\n            \"&y=\" +\r\n            y +\r\n            \"&width=\" +\r\n            w +\r\n            \"&height=\" +\r\n            h +\r\n            \"&scale=\" +\r\n            scale +\r\n            \"&rotation=\" +\r\n            rotation +\r\n            \"&dpi=\" +\r\n            dpi +\r\n            \"&filename=\" +\r\n            filename +\r\n            \"&flipHorizontal=\" +\r\n            flip.horizontally +\r\n            \"&flipVertical=\" +\r\n            flip.vertically +\r\n            (this.imageAdjustments.gamma && this.imageAdjustments.gamma != 1.0 ? \"&postGamma=\" + this.imageAdjustments.gamma.toFixed(2) : \"\") +\r\n            (this.imageAdjustments.brightness && this.imageAdjustments.brightness != 0 ? \"&brightness=\" + this.imageAdjustments.brightness : \"\") +\r\n            (this.imageAdjustments.contrast && this.imageAdjustments.contrast != 1.0 ? \"&contrast=\" + this.imageAdjustments.contrast.toFixed(2) : \"\");\r\n\r\n        if (download) {\r\n            url += \"&downloadInsteadOfDisplay=true\";\r\n        }\r\n\r\n        return {\r\n            url: url,\r\n            width: Math.round(w * scale),\r\n            height: Math.round(h * scale),\r\n            scale: scale,\r\n        };\r\n    }\r\n\r\n    drawViewport() {\r\n        var coords = [];\r\n        var size = this.map.getSize();\r\n        coords.push(this.map.getCoordinateFromPixel([0, 0]));\r\n        coords.push(this.map.getCoordinateFromPixel([0, size[1]]));\r\n        coords.push(this.map.getCoordinateFromPixel([size[0], size[1]]));\r\n        coords.push(this.map.getCoordinateFromPixel([size[0], 0]));\r\n        var poly = new ol.geom.Polygon([coords]);\r\n        var feat = new ol.Feature(poly);\r\n        var s = this.measureLayer.getSource();\r\n        s.clear();\r\n        s.addFeature(feat);\r\n    }\r\n\r\n    /**\r\n     * Generates an image with a snapshot of the current viewport and saves it if format is \"png\" or \"jpg\"\r\n     * @param {string} [format=png] - The snapshot image format, one of \"png\", \"jpg\", \"blob\"\r\n     * @param {Object} [extraParams] - Extra parameters to draw the snapshot\r\n     * @param {string} [extraParams.title] -  A title to draw on top middle of the snapshot\r\n     * @param {boolean} [extraParams.scalebar=true] - Whether to draw a scalebar of the slide\r\n     * @param {boolean} [extraParams.scalebarLocation=\"TopLeft\"] - When the scalebar will be positioned, one of \"TopLeft\",\"TopRight\", \"BottomLeft\", \"BottomRight\"\r\n     * @param {boolean} [extraParams.scalebarFont=\"24px serif\"] - A valid css font property to draw e.g. \"24px serif\"\r\n     * @param {boolean} [extraParams.barcode=false] - Whether to draw the barcode of the slide\r\n     * @param {boolean} [extraParams.overview=false] - Whether to draw an overview of the slide\r\n     * @param {number} [extraParams.dpi=null] - Set the dpi of the output image\r\n     * @param {string} [extraParams.filename=snapshot] - The filename of the image\r\n     * @param {string} [extraParams.action=\"download\"] - Action that will take place after snapshot created, one of \"download\",\"open-tab\"\r\n     * @returns {Promise<Blob>} A promise to the blob object\r\n     */\r\n    getSnapshot(format, extraParams) {\r\n        if (!format) {\r\n            format = \"png\";\r\n        }\r\n        var that = this;\r\n        return new Promise((resolve, reject) => {\r\n            that.map.once('rendercomplete', function (ev) {\r\n                try {\r\n                    var mapCanvas = document.createElement('canvas');\r\n                    var size = ev.target.getSize();\r\n                    mapCanvas.width = size[0];\r\n                    mapCanvas.height = size[1];\r\n                    var mapContext = mapCanvas.getContext('2d');\r\n                    var scale = 1 / that.map.getView().getResolution();\r\n                    let canvasDraw = async function () {\r\n                        let mainCanvases = Array.from(that.map.getTargetElement().querySelectorAll('.ol-layer.main-layer canvas'));\r\n                        let mainCanvas = mainCanvases[mainCanvases.length - 1];\r\n\r\n                        let canvasList = Array.from(that.map.getTargetElement().querySelectorAll('.ol-layer.annotations-layer canvas'));\r\n\r\n                        canvasList = [mainCanvas, ...canvasList];\r\n\r\n                        let firstCanvas = canvasList[0];\r\n\r\n                        if (canvasList.length === 0) {\r\n                            return;\r\n                        }\r\n\r\n                        if (firstCanvas.width > 0) {\r\n                            var opacity = firstCanvas.parentNode.style.opacity;\r\n                            mapContext.globalAlpha = opacity === '' ? 1 : Number(opacity);\r\n\r\n\r\n                            let bgColor = \"#000000\";\r\n                            if (that.imageInfo && that.imageInfo.BackgroundColor) {\r\n                                bgColor = \"#\" + that.imageInfo.BackgroundColor;\r\n                            }\r\n\r\n                            mapContext.fillStyle = bgColor;\r\n                            mapContext.fillRect(0, 0, mapContext.canvas.width, mapContext.canvas.height);\r\n                            for (let i = 0; i < canvasList.length; i++) {\r\n                                if (canvasList[i].width > 0) {\r\n                                    var transform = canvasList[i].style.transform;\r\n                                    // Get the transform parameters from the style's transform matrix\r\n                                    var matrix = transform\r\n                                        .match(/^matrix\\(([^\\(]*)\\)$/)[1]\r\n                                        .split(',')\r\n                                        .map(Number);\r\n                                    // Apply the transform to the export map context\r\n                                    CanvasRenderingContext2D.prototype.setTransform.apply(\r\n                                        mapContext,\r\n                                        matrix\r\n                                    );\r\n                                    mapContext.drawImage(canvasList[i], 0, 0);\r\n\r\n                                    mapContext.resetTransform();\r\n                                }\r\n                            }\r\n\r\n                            if (!extraParams || extraParams.scalebar !== false) {\r\n                                drawScalebar(mapContext, that.imageInfo, scale,\r\n                                    extraParams ? extraParams.scalebarLocation : null,\r\n                                    extraParams ? extraParams.scalebarFont : null);\r\n                            }\r\n\r\n                            if (extraParams && extraParams.title) {\r\n                                drawTitle(mapContext, extraParams.title);\r\n                            }\r\n\r\n                            if (extraParams && extraParams.barcode) {\r\n                                let rotation = 0;\r\n                                if (that.barcodeControl && that.barcodeControl.rotation) {\r\n                                    rotation = that.barcodeControl.rotation;\r\n                                }\r\n                                await drawBarcode(mapContext, that, rotation);\r\n                            }\r\n\r\n                            if (extraParams && extraParams.overview) {\r\n                                await drawOverview(mapContext, that);\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    canvasDraw().then(function () {\r\n                        let filename = \"snapshot\";\r\n                        if (extraParams && extraParams.filename) {\r\n                            filename = extraParams.filename;\r\n                        }\r\n                        if (navigator.msSaveBlob) {\r\n                            var blob = mapCanvas.msToBlob();\r\n                            if (format == \"jpg\") {\r\n                                console.warn(\"Cannot save jpg snapshot on internet explorer/edge. The resulting snapshot is in png format\");\r\n                            }\r\n\r\n                            if (format == \"blob\") {\r\n                                resolve(blob);\r\n                                return;\r\n                            }\r\n\r\n                            let fn = function (blb) {\r\n                                if (extraParams && extraParams.action === \"open-tab\") {\r\n                                    var a = new FileReader();\r\n                                    a.onload = function (e) {\r\n                                        var tab = window.open(e.target.result, '_blank');\r\n                                        if (tab) tab.focus();\r\n                                    }\r\n                                    a.readAsDataURL(blb);\r\n                                    return;\r\n                                }\r\n\r\n                                navigator.msSaveBlob(blb, filename + \".png\");\r\n                            };\r\n\r\n                            if (extraParams && extraParams.dpi) {\r\n                                changeDpiBlob(blob, extraParams.dpi).then(function (bl) {\r\n                                    fn(bl);\r\n                                    resolve(bl);\r\n                                });\r\n\r\n                                return;\r\n                            }\r\n\r\n                            fn(blob);\r\n                            resolve(blob);\r\n                        } else {\r\n                            mapCanvas.toBlob(\r\n                                function (blob) {\r\n                                    if (format == \"blob\") {\r\n                                        resolve(blob);\r\n                                        return;\r\n                                    }\r\n\r\n                                    let fn = function (blb) {\r\n                                        if (extraParams && extraParams.action === \"open-tab\") {\r\n                                            var a = new FileReader();\r\n                                            a.onload = function (e) {\r\n                                                var tab = window.open(e.target.result, '_blank');\r\n                                                if (tab) tab.focus();\r\n                                            }\r\n                                            a.readAsDataURL(blb);\r\n                                            return;\r\n                                        }\r\n\r\n                                        saveAs(blb, filename + \".\" + (format == \"jpg\" ? \"jpg\" : \"png\"));\r\n                                    };\r\n\r\n                                    if (extraParams && extraParams.dpi) {\r\n                                        changeDpiBlob(blob, extraParams.dpi).then(function (bl) {\r\n                                            fn(bl);\r\n                                            resolve(bl);\r\n                                        });\r\n\r\n                                        return;\r\n                                    }\r\n\r\n                                    fn(blob);\r\n                                    resolve(blob);\r\n                                },\r\n                                format == \"jpg\" ? \"image/jpeg\" : \"image/png\"\r\n                            );\r\n                        }\r\n                    });\r\n                } catch (ex) {\r\n                    reject(Error(\"Error creating snapshot\"));\r\n                }\r\n            });\r\n\r\n            that.map.renderSync();\r\n        });\r\n    }\r\n\r\n    /**\r\n     * Attaches an event listener to the viewer\r\n     * @param {PMA.UI.View.Events} eventName - The name of the event to listen to\r\n     * @param {function} callback - The function to call when the event occurs\r\n     */\r\n    listen(eventName, callback) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" is not a valid event\");\r\n        }\r\n\r\n        this.listeners[eventName].push(callback);\r\n    }\r\n\r\n    /**\r\n     * Detaches an event listener from the viewer\r\n     * @param {PMA.UI.View.Events} eventName - The name of the event to remove the callback from\r\n     * @param {function} callback - The function to remove from the event listener list\r\n     * @returns {bool} Whether or not the callback was actually found and removed\r\n     */\r\n    unlisten(eventName, callback) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" is not a valid event\");\r\n        }\r\n\r\n        var index = this.listeners[eventName].indexOf(callback);\r\n        if (index >= 0 && index < this.listeners[eventName].length) {\r\n            this.listeners[eventName].splice(index, 1);\r\n            return true;\r\n        }\r\n\r\n        return false;\r\n    }\r\n\r\n    fireEvent(eventName, eventArgs) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" does not exist\");\r\n            return;\r\n        }\r\n\r\n        for (var i = 0, max = this.listeners[eventName].length; i < max; i++) {\r\n            this.listeners[eventName][i].call(this, eventArgs);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Pans and zooms the viewer appropriately to focus around an annotation\r\n     * @param {number} annotationId - The id of the annotation to which the viewport should focus\r\n     */\r\n    focusToAnnotation(annotationId) {\r\n        var feature = this.annotationsLayer\r\n            .getSource()\r\n            .getFeatureById(annotationId);\r\n\r\n        if (feature) {\r\n            var pan = {\r\n                duration: 500,\r\n                center: this.map.getView().getCenter(),\r\n            };\r\n\r\n            var sz = this.map.getSize();\r\n            var extent = feature.getGeometry().getExtent();\r\n            var area = Math.abs(\r\n                (extent[2] - extent[0]) * (extent[3] - extent[1])\r\n            );\r\n\r\n            if (area < 0.0001) {\r\n                var factor = 32;\r\n                var worldExt = this.map.getView().getProjection().getExtent();\r\n                extent[0] -= worldExt[2] / factor;\r\n                extent[1] -= worldExt[3] / factor;\r\n                extent[2] += worldExt[2] / factor;\r\n                extent[3] += worldExt[3] / factor;\r\n            }\r\n\r\n            this.map.getView().animate(pan);\r\n            this.map.getView().fit(extent, sz);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Sets the brightness of the viewer\r\n     * @param {number} brightness\r\n     */\r\n    setBrightness(brightness) {\r\n        this.imageAdjustments.brightness = brightness;\r\n        applyImageAdjustments.call(this);\r\n    }\r\n\r\n    /**\r\n     * Sets the contrast of the viewer\r\n     * @param {number} contrast\r\n     */\r\n    setContrast(contrast) {\r\n        this.imageAdjustments.contrast = contrast;\r\n        applyImageAdjustments.call(this);\r\n    }\r\n\r\n    /**\r\n     * Sets the brightness and contrast of the viewer\r\n     * @param {number} brightness\r\n     * @param {number} contrast\r\n     * @param {number} gamma\r\n     */\r\n    setBrightnessContrastGamma(brightness, contrast, gamma) {\r\n        this.imageAdjustments.brightness = brightness;\r\n        this.imageAdjustments.contrast = contrast;\r\n        this.imageAdjustments.gamma = gamma;\r\n        applyImageAdjustments.call(this);\r\n    }\r\n\r\n    /**\r\n     * Sets the gamma of the viewer\r\n     * @param {number} gamma\r\n     */\r\n    setGamma(gamma) {\r\n        this.imageAdjustments.gamma = gamma;\r\n        applyImageAdjustments.call(this);\r\n    }\r\n\r\n    /**\r\n     * Sets the color balance for each rgb channel\r\n     * @param {number} red A value between 0 and 2 indicating the red channel balance\r\n     * @param {number} green A value between 0 and 2 indicating the green channel balance\r\n     * @param {number} blue A value between 0 and 2 indicating the blue channel balance\r\n     */\r\n    setColorBalance(red, green, blue) {\r\n        this.imageAdjustments.rgb = [red, green, blue];\r\n        applyImageAdjustments.call(this);\r\n    }\r\n\r\n    /**\r\n     * Gets the color balance values\r\n     * @returns An array containing the color balance values for [red, green, blue]\r\n     */\r\n    getColorBalance() {\r\n        return this.imageAdjustments.rgb;\r\n    }\r\n\r\n    /**\r\n     * Adding tile transformer to the list of transformers\r\n     * @param {PMA.UI.View.tileTransformer} transformer function that gets pixels as an input parameter and returns nothing, it should adjust pixels values directly in array from parameters\r\n     */\r\n    addTileTransformer(transformer) {\r\n        this.imageAdjustments.tileTransformers =\r\n            this.imageAdjustments.tileTransformers || [];\r\n        this.imageAdjustments.tileTransformers.push(transformer);\r\n    }\r\n\r\n    /**\r\n     * Setting list of tile transformers\r\n     * @param {PMA.UI.View.tileTransformer[]} transformers list of transformer function that gets pixels as an input parameter and returns nothing, it should adjust pixels values directly in array from parameters\r\n     */\r\n    setTileTransformers(transformers) {\r\n        this.imageAdjustments.tileTransformers = transformers;\r\n    }\r\n\r\n    /**\r\n     * Gets the current brightness value of the viewer\r\n     * @returns {number}\r\n     */\r\n    getBrightness() {\r\n        return this.imageAdjustments.brightness;\r\n    }\r\n\r\n    /**\r\n     * Gets the current gamma value of the viewer\r\n     * @returns {number}\r\n     */\r\n    getGamma() {\r\n        return this.imageAdjustments.gamma;\r\n    }\r\n\r\n    /**\r\n     * Gets the current contrast value of the viewer\r\n     * @returns {number}\r\n     */\r\n    getContrast() {\r\n        return this.imageAdjustments.contrast;\r\n    }\r\n\r\n    /**\r\n     * Gets the current list of tile transformers\r\n     * @returns {Array.<PMA.UI.View.tileTransformer>}\r\n     */\r\n    getTileTransformers() {\r\n        return (this.imageAdjustments.tileTransformers || []).slice();\r\n    }\r\n\r\n    /**\r\n     * Gets the URL of the PMA.core server currently connected to\r\n     * @returns {string}\r\n     */\r\n    getActiveServerUrl() {\r\n        return this.imagesUrl;\r\n    }\r\n\r\n    /**\r\n     * Forces the viewer to recalculate the viewport size\r\n     */\r\n    updateSize() {\r\n        if (this.map) {\r\n            this.map.updateSize();\r\n            var controls = this.map.getControls();\r\n            for (var i = 0; i < controls.getLength(); i++) {\r\n                var cntrl = controls.item(i);\r\n                if (cntrl instanceof Overview && cntrl.overviewMap) {\r\n                    cntrl.overviewMap.updateSize();\r\n                }\r\n            }\r\n\r\n            printObjectivesInZoomBar.call(this);\r\n            setMapSizeClass.call(this);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Converts an array of pma.core annotations to open layers features\r\n     * @param {Viewport~annotation[]} annotations - An annotation array as returned by pma.core\r\n     * @param {Object} - The projection used for diplay\r\n     */\r\n    initializeFeatures(annotations, projection) {\r\n        var format = new ol.format.WKT();\r\n        var extent = projection.getExtent();\r\n        var extentObj = { extent: extent, flip: this.getFlip() };\r\n        var features = [];\r\n\r\n        for (var i = 0; i < annotations.length; i++) {\r\n            var annot = annotations[i];\r\n            var f = format.readFeature(annot.Geometry);\r\n\r\n            if (\r\n                annot.AnnotationID === null ||\r\n                annot.AnnotationID === undefined\r\n            ) {\r\n                f.setId((Math.random() * 10000) | 0);\r\n            } else {\r\n                f.setId(annot.AnnotationID);\r\n            }\r\n\r\n            var geom = f.getGeometry();\r\n            geom.applyTransform(annotationTransform.bind(extentObj));\r\n\r\n            var dimensions = isNaN(annot.Dimensions) ? 2 : annot.Dimensions;\r\n\r\n            var area = this.calculateArea(geom);\r\n            var frmtArea = this.formatArea(area);\r\n            var length = this.calculateLength(geom);\r\n            var frmtLength = this.formatLength(length);\r\n\r\n            var updateDate = null;\r\n            if (annot.AuditLastModifiedOn) {\r\n                var updateMatches = /\\/Date\\(((\\d*)([\\+\\-]?\\d*))\\)\\//.exec(annot.AuditLastModifiedOn);\r\n                if (updateMatches && updateMatches.length > 2) {\r\n                    updateDate = new Date(parseInt(updateMatches[2]));\r\n                }\r\n            }\r\n\r\n            var createDate = null;\r\n            if (annot.AuditCreatedOn) {\r\n                var createMatches = /\\/Date\\(((\\d*)([\\+\\-]?\\d*))\\)\\//.exec(annot.AuditCreatedOn);\r\n                if (createMatches && createMatches.length > 2) {\r\n                    createDate = new Date(parseInt(createMatches[2]));\r\n                }\r\n            } else {\r\n                createDate = new Date();\r\n            }\r\n\r\n            var fillColor = annot.FillColor ?\r\n                annot.FillColor :\r\n                DefaultFillColor;\r\n            var strokeColor = annot.Color ? annot.Color : \"#3399CC\";\r\n            var imageStyle = null;\r\n\r\n            f.name = annot.Notes;\r\n            f.metaData = {\r\n                AnnotationID: annot.AnnotationID,\r\n                Classification: annot.Classification,\r\n                Color: strokeColor,\r\n                CreatedOn: createDate,\r\n                CreatedBy: annot.AuditCreatedBy,\r\n                Image: annot.Image,\r\n                LayerID: annot.LayerID,\r\n                Notes: annot.Notes,\r\n                UpdateInfo: annot.UpdateInfo,\r\n                UpdatedOn: updateDate,\r\n                UpdatedBy: annot.AuditLastModifiedBy,\r\n                Geometry: annot.Geometry,\r\n                Area: dimensions > 1 ? area : 0,\r\n                FormattedArea: dimensions > 1 ? frmtArea : \"\",\r\n                Length: dimensions > 0 ? length : 0,\r\n                FormattedLength: dimensions > 0 ? frmtLength : \"\",\r\n                FillColor: fillColor,\r\n                Dimensions: dimensions,\r\n                State: AnnotationState.Pristine,\r\n                LineThickness: annot.LineThickness ? annot.LineThickness : 2,\r\n            };\r\n\r\n            if (geom.getType() === \"MultiPoint\") {\r\n                f.metaData.PointCount = geom.getCoordinates().length;\r\n            }\r\n\r\n            var fill = new ol.style.Fill({\r\n                color: fillColor,\r\n            });\r\n\r\n            var stroke = new ol.style.Stroke({\r\n                color: strokeColor,\r\n                width: f.metaData.LineThickness ? f.metaData.LineThickness : 2,\r\n            });\r\n\r\n            if (annot.Color && annot.Color.indexOf(\"#\") !== -1) {\r\n                var colors = annot.Color.split(\"#\");\r\n\r\n                // if (colors[0] !== '' && colors[0] !== 'transparent') {\r\n                //     fillColor = '#' + colors[0];\r\n                // }\r\n\r\n                strokeColor = \"#\" + colors[1];\r\n\r\n                imageStyle = new ol.style.Circle({\r\n                    fill: fill,\r\n                    stroke: stroke,\r\n                    radius: 5,\r\n                });\r\n            } else if (annot.Geometry.indexOf(\"POINT\") !== -1) {\r\n                // it's a point and it's color doesn't start with #, so it's probably an icon - a hack convention in PMA.view 1.x\r\n                imageStyle = new ol.style.Icon({\r\n                    anchor: [0.5, 0.5],\r\n                    anchorXUnits: \"fraction\",\r\n                    anchorYUnits: \"fraction\",\r\n                    opacity: 1,\r\n                    src: this.options.annotations.imageBaseUrl + annot.Color,\r\n                    scale: isNaN(this.options.annotations.imageScale) ?\r\n                        1 : this.options.annotations.imageScale,\r\n                });\r\n            }\r\n\r\n            var currentAnnotationStyle = new ol.style.Style({\r\n                image: imageStyle,\r\n                fill: fill,\r\n                stroke: stroke,\r\n                text: this.getAnnotationTextStyle(f, strokeColor),\r\n            });\r\n\r\n            f.setStyle(this.getAnnotationStyle(currentAnnotationStyle, f));\r\n            f.originalStyle = currentAnnotationStyle;\r\n\r\n            features.push(f);\r\n        }\r\n\r\n        return features;\r\n    }\r\n\r\n    /**\r\n     * Returns the supported annotation layer names for the loaded slide\r\n     */\r\n    getAnnotationsLayersNames() {\r\n        if (!this.imageInfo || !this.imageInfo.AnnotationsLayers) {\r\n            return [];\r\n        }\r\n\r\n        return this.imageInfo.AnnotationsLayers;\r\n    }\r\n\r\n    /**\r\n     * Sets a new configuration for the controls of the viewport\r\n     * @param {Viewport~ControlConfiguration[]} configuration - The control configuration object\r\n     */\r\n    setControlsConfiguration(configuration) {\r\n        if (!Array.isArray(configuration)) {\r\n            configuration = [configuration];\r\n        }\r\n\r\n        setControlsConfiguration.call(this, configuration);\r\n    }\r\n\r\n    /**\r\n     * Gets the current configuration of the controls of the viewport\r\n     * @returns {Viewport~ControlConfiguration[]} configuration - The control configuration object\r\n     */\r\n    getControlsConfiguration() {\r\n        return getControlsConfiguration.call(this);\r\n    }\r\n\r\n    /**\r\n     * Hides the measurement grid if visible or does nothing\r\n     */\r\n    hideGrid() {\r\n        if (this.gridLayer) {\r\n            this.gridLayer.getSource().clear();\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Shows a measurement grid\r\n     * @param {Array<number>} size - The size of the grid cells in micrometers\r\n     */\r\n    showGrid(size) {\r\n        if (!size || size.length < 2 || size[0] <= 0 || size[1] <= 0) {\r\n            throw \"Invalid size specified\";\r\n        }\r\n\r\n        this.options.grid = { size: size };\r\n\r\n        this.gridLayer.getSource().clear();\r\n\r\n        var sizeX = size[0] / this.imageInfo.MicrometresPerPixelX;\r\n        var sizeY = size[1] / this.imageInfo.MicrometresPerPixelY;\r\n        var proj = this.map.getView().getProjection();\r\n        var extent = proj.getExtent();\r\n\r\n        var startX = Math.min(extent[0], extent[2]);\r\n        var endX = Math.max(extent[0], extent[2]);\r\n        var startY = Math.min(extent[1], extent[3]);\r\n        var endY = Math.max(extent[1], extent[3]);\r\n        var xSteps = Math.ceil((endX - startX) / sizeX);\r\n        var ySteps = Math.ceil((endY - startY) / sizeY);\r\n\r\n        endX = startX + xSteps * sizeX;\r\n        startY = endY - ySteps * sizeY;\r\n\r\n        for (var x = 0; x <= xSteps; x++) {\r\n            this.gridLayer.getSource().addFeature(\r\n                new ol.Feature({\r\n                    geometry: new ol.geom.LineString([\r\n                        [startX + x * sizeX, startY],\r\n                        [startX + x * sizeX, endY],\r\n                    ]),\r\n                })\r\n            );\r\n        }\r\n\r\n        for (var y = 0; y <= ySteps; y++) {\r\n            this.gridLayer.getSource().addFeature(\r\n                new ol.Feature({\r\n                    geometry: new ol.geom.LineString([\r\n                        [startX, endY - y * sizeY],\r\n                        [endX, endY - y * sizeY],\r\n                    ]),\r\n                })\r\n            );\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Reloads annotations from the server\r\n     * @param {function} [readyCallback] - Called when the annotations have finished loading\r\n     * @param {string} [fingerprint] - If exists, will reload annotations by fingerprint\r\n     */\r\n    reloadAnnotations(readyCallback, fingerprint) {\r\n        if (!this.annotationsLayer ||\r\n            !this.mainLayer ||\r\n            !this.sessionID ||\r\n            !this.image\r\n        ) {\r\n            console.error(\"Reload annotations: No image loaded in viewer\");\r\n            if (typeof readyCallback === \"function\") {\r\n                readyCallback.call(this);\r\n            }\r\n\r\n            return;\r\n        }\r\n\r\n        var vectorSource = this.annotationsLayer.getSource();\r\n        vectorSource.clear();\r\n\r\n        if (this.hiddenAnnotations) {\r\n            this.hiddenAnnotations = [];\r\n        }\r\n\r\n        if (this.hiddenAnnotationsByFingerprint) {\r\n            this.hiddenAnnotationsByFingerprint = [];\r\n        }\r\n\r\n        var pixelProjection = this.mainLayer.getSource().getProjection();\r\n        var _this = this;\r\n\r\n        ajax.call(\r\n            this,\r\n            this.serviceUrl + \"GetAnnotations\",\r\n            \"GET\", {\r\n            sessionID: this.sessionID,\r\n            pathOrUid: this.image,\r\n            currentUserOnly: false,\r\n            refresh: Math.random(),\r\n            ...(fingerprint ? { fingerprint: fingerprint } : {}),\r\n        },\r\n            function (http) {\r\n                if (http.status == 200) {\r\n                    var response = parseJson(http.responseText);\r\n                    if (response) {\r\n                        var annotations = response;\r\n                        var features = _this.initializeFeatures(\r\n                            annotations,\r\n                            pixelProjection\r\n                        );\r\n                        vectorSource.addFeatures(features);\r\n                    }\r\n                }\r\n\r\n                if (typeof readyCallback === \"function\") {\r\n                    readyCallback.call(this);\r\n                }\r\n            }\r\n        );\r\n    }\r\n\r\n    rotateExtent(extent, rotation) {\r\n        var geom = ol.geom.Polygon.fromExtent(extent);\r\n        var center = ol.extent.getCenter(extent);\r\n        geom.rotate(rotation, center);\r\n        return geom.getExtent();\r\n    }\r\n\r\n    /**\r\n     * Returns the current objective magnification\r\n     * @returns {string} - A string representing the current objective magnification ie. \"1X\", \"2X\" etc\r\n     */\r\n    getCurrentObjective() {\r\n        if (!this.imageInfo || this.imageInfo.MicrometresPerPixelX == 0) {\r\n            return \"\";\r\n        }\r\n\r\n        if (!this.map) {\r\n            console.warn(\"PMA.UI.Viewport map is not initialized\");\r\n            return \"\";\r\n        }\r\n\r\n        var objective = 10 / this.imageInfo.MicrometresPerPixelX / this.map.getView().getResolution();\r\n        if (objective > 1) {\r\n            objective |= 0;\r\n            return objective + \"X\";\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Returns the max objective magnification\r\n     * @returns {string} - A string representing the max objective magnification ie. \"1X\", \"2X\" etc\r\n     */\r\n    getMaxObjective() {\r\n        var objective = 10 / this.imageInfo.MicrometresPerPixelX;\r\n        if (objective > 1) {\r\n            objective |= 0;\r\n            return findClosestObjectiveValue(objective) + \"X\";\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Gets the visibility of the third party annotation layers\r\n     * @returns {Object[]} options - An array of options\r\n     * @returns {string} options.name - The name of the layer to change the visibility\r\n     * @returns {boolean} options.visible - Whether to show or hide the specified layer\r\n     */\r\n    getAnnotationLayersVisibility() {\r\n        if (!this.layerSwitcher) {\r\n            return [];\r\n        }\r\n\r\n        return this.layerSwitcher.getLayersVisibility();\r\n    }\r\n\r\n    /**\r\n     * Sets the visibility of the third party annotation layers\r\n     * @param {Object[]} options - An array of options\r\n     * @param {string} options.name - The name of the layer to change the visibility\r\n     * @param {boolean} options.visible - Whether to show or hide the specified layer\r\n     * @param {number} [options.opacity] - A number between 0 and 1 that sets the opacity of the layer\r\n     */\r\n    setAnnotationLayersVisibility(options) {\r\n        if (!this.layerSwitcher) {\r\n            return;\r\n        }\r\n\r\n        this.layerSwitcher.setLayersVisibility(options);\r\n    }\r\n\r\n    /**\r\n    * Gets the wheel zoom mode to one of \"Normal\", \"Objectives\". The normal mode zooms through all the available resolution,\r\n    * while the \"Objectives\" mode zoom only on the round objective resolutions 1X,2X,5X,10X, 20X, 40X, 80X, 160X\r\n    * @returns {MouseWheelZoomMode} mode \r\n    */\r\n    getMouseWheelZoomMode() {\r\n        if (!this.mouseWheelInteraction) {\r\n            return MouseWheelMode.Normal;\r\n        }\r\n\r\n        return this.mouseWheelInteraction.mode;\r\n    }\r\n    /**\r\n     * Sets the wheel zoom mode to one of \"Normal\", \"Objectives\". The normal mode zooms through all the available resolutions,\r\n     * while the \"Objectives\" mode zooms only to the rounded objective resolutions 1X, 2X, 5X, 10X, 20X, 40X, 80X and 160X\r\n     * @param {MouseWheelZoomMode} mode \r\n     */\r\n    setMouseWheelZoomMode(mode) {\r\n        if (!this.mouseWheelInteraction) {\r\n            return;\r\n        }\r\n\r\n        this.mouseWheelInteraction.setMode(mode);\r\n    }\r\n\r\n    /**\r\n     * Start the realtime measuring tool\r\n     * @param {\"area\" | \"line\"} type - Whether to start measuring length or area\r\n     */\r\n    startMeasuring(type) {\r\n        startMeasuring.call(this, type);\r\n    }\r\n\r\n    /**\r\n     * Stops and clears all realtime measurements\r\n     */\r\n    stopMeasuring() {\r\n        stopMeasuring.call(this, true);\r\n    }\r\n}","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/VectorTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nvar VectorTile = /** @class */ (function (_super) {\n    __extends(VectorTile, _super);\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"./TileState.js\").default} state State.\n     * @param {string} src Data source url.\n     * @param {import(\"./format/Feature.js\").default} format Feature format.\n     * @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n     * @param {import(\"./Tile.js\").Options} [opt_options] Tile options.\n     */\n    function VectorTile(tileCoord, state, src, format, tileLoadFunction, opt_options) {\n        var _this = _super.call(this, tileCoord, state, opt_options) || this;\n        /**\n         * Extent of this tile; set by the source.\n         * @type {import(\"./extent.js\").Extent}\n         */\n        _this.extent = null;\n        /**\n         * @private\n         * @type {import(\"./format/Feature.js\").default}\n         */\n        _this.format_ = format;\n        /**\n         * @private\n         * @type {Array<import(\"./Feature.js\").default>}\n         */\n        _this.features_ = null;\n        /**\n         * @private\n         * @type {import(\"./featureloader.js\").FeatureLoader}\n         */\n        _this.loader_;\n        /**\n         * Feature projection of this tile; set by the source.\n         * @type {import(\"./proj/Projection.js\").default}\n         */\n        _this.projection = null;\n        /**\n         * Resolution of this tile; set by the source.\n         * @type {number}\n         */\n        _this.resolution;\n        /**\n         * @private\n         * @type {import(\"./Tile.js\").LoadFunction}\n         */\n        _this.tileLoadFunction_ = tileLoadFunction;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.url_ = src;\n        _this.key = src;\n        return _this;\n    }\n    /**\n     * Get the feature format assigned for reading this tile's features.\n     * @return {import(\"./format/Feature.js\").default} Feature format.\n     * @api\n     */\n    VectorTile.prototype.getFormat = function () {\n        return this.format_;\n    };\n    /**\n     * Get the features for this tile. Geometries will be in the view projection.\n     * @return {Array<import(\"./Feature.js\").FeatureLike>} Features.\n     * @api\n     */\n    VectorTile.prototype.getFeatures = function () {\n        return this.features_;\n    };\n    /**\n     * Load not yet loaded URI.\n     */\n    VectorTile.prototype.load = function () {\n        if (this.state == TileState.IDLE) {\n            this.setState(TileState.LOADING);\n            this.tileLoadFunction_(this, this.url_);\n            if (this.loader_) {\n                this.loader_(this.extent, this.resolution, this.projection);\n            }\n        }\n    };\n    /**\n     * Handler for successful tile load.\n     * @param {Array<import(\"./Feature.js\").default>} features The loaded features.\n     * @param {import(\"./proj/Projection.js\").default} dataProjection Data projection.\n     */\n    VectorTile.prototype.onLoad = function (features, dataProjection) {\n        this.setFeatures(features);\n    };\n    /**\n     * Handler for tile load errors.\n     */\n    VectorTile.prototype.onError = function () {\n        this.setState(TileState.ERROR);\n    };\n    /**\n     * Function for use in an {@link module:ol/source/VectorTile~VectorTile}'s `tileLoadFunction`.\n     * Sets the features for the tile.\n     * @param {Array<import(\"./Feature.js\").default>} features Features.\n     * @api\n     */\n    VectorTile.prototype.setFeatures = function (features) {\n        this.features_ = features;\n        this.setState(TileState.LOADED);\n    };\n    /**\n     * Set the feature loader for reading this tile's features.\n     * @param {import(\"./featureloader.js\").FeatureLoader} loader Feature loader.\n     * @api\n     */\n    VectorTile.prototype.setLoader = function (loader) {\n        this.loader_ = loader;\n    };\n    return VectorTile;\n}(Tile));\nexport default VectorTile;\n//# sourceMappingURL=VectorTile.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/VectorRenderTile\n */\nimport Tile from './Tile.js';\nimport { createCanvasContext2D } from './dom.js';\nimport { getUid } from './util.js';\n/**\n * @typedef {Object} ReplayState\n * @property {boolean} dirty Dirty.\n * @property {null|import(\"./render.js\").OrderFunction} renderedRenderOrder RenderedRenderOrder.\n * @property {number} renderedTileRevision RenderedTileRevision.\n * @property {number} renderedResolution RenderedResolution.\n * @property {number} renderedRevision RenderedRevision.\n * @property {number} renderedTileResolution RenderedTileResolution.\n * @property {number} renderedTileZ RenderedTileZ.\n */\n/**\n * @type {Array<HTMLCanvasElement>}\n */\nvar canvasPool = [];\nvar VectorRenderTile = /** @class */ (function (_super) {\n    __extends(VectorRenderTile, _super);\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"./TileState.js\").default} state State.\n     * @param {import(\"./tilecoord.js\").TileCoord} urlTileCoord Wrapped tile coordinate for source urls.\n     * @param {function(VectorRenderTile):Array<import(\"./VectorTile\").default>} getSourceTiles Function\n     * to get source tiles for this tile.\n     */\n    function VectorRenderTile(tileCoord, state, urlTileCoord, getSourceTiles) {\n        var _this = _super.call(this, tileCoord, state, { transition: 0 }) || this;\n        /**\n         * @private\n         * @type {!Object<string, CanvasRenderingContext2D>}\n         */\n        _this.context_ = {};\n        /**\n         * Executor groups by layer uid. Entries are read/written by the renderer.\n         * @type {Object<string, Array<import(\"./render/canvas/ExecutorGroup.js\").default>>}\n         */\n        _this.executorGroups = {};\n        /**\n         * Executor groups for decluttering, by layer uid. Entries are read/written by the renderer.\n         * @type {Object<string, Array<import(\"./render/canvas/ExecutorGroup.js\").default>>}\n         */\n        _this.declutterExecutorGroups = {};\n        /**\n         * Number of loading source tiles. Read/written by the source.\n         * @type {number}\n         */\n        _this.loadingSourceTiles = 0;\n        /**\n         * @type {Object<number, ImageData>}\n         */\n        _this.hitDetectionImageData = {};\n        /**\n         * @private\n         * @type {!Object<string, ReplayState>}\n         */\n        _this.replayState_ = {};\n        /**\n         * @type {Array<import(\"./VectorTile.js\").default>}\n         */\n        _this.sourceTiles = [];\n        /**\n         * @type {Object<string, boolean>}\n         */\n        _this.errorTileKeys = {};\n        /**\n         * @type {number}\n         */\n        _this.wantedResolution;\n        /**\n         * @type {!function():Array<import(\"./VectorTile.js\").default>}\n         */\n        _this.getSourceTiles = getSourceTiles.bind(undefined, _this);\n        /**\n         * @type {import(\"./tilecoord.js\").TileCoord}\n         */\n        _this.wrappedTileCoord = urlTileCoord;\n        return _this;\n    }\n    /**\n     * @param {import(\"./layer/Layer.js\").default} layer Layer.\n     * @return {CanvasRenderingContext2D} The rendering context.\n     */\n    VectorRenderTile.prototype.getContext = function (layer) {\n        var key = getUid(layer);\n        if (!(key in this.context_)) {\n            this.context_[key] = createCanvasContext2D(1, 1, canvasPool);\n        }\n        return this.context_[key];\n    };\n    /**\n     * @param {import(\"./layer/Layer.js\").default} layer Layer.\n     * @return {boolean} Tile has a rendering context for the given layer.\n     */\n    VectorRenderTile.prototype.hasContext = function (layer) {\n        return getUid(layer) in this.context_;\n    };\n    /**\n     * Get the Canvas for this tile.\n     * @param {import(\"./layer/Layer.js\").default} layer Layer.\n     * @return {HTMLCanvasElement} Canvas.\n     */\n    VectorRenderTile.prototype.getImage = function (layer) {\n        return this.hasContext(layer) ? this.getContext(layer).canvas : null;\n    };\n    /**\n     * @param {import(\"./layer/Layer.js\").default} layer Layer.\n     * @return {ReplayState} The replay state.\n     */\n    VectorRenderTile.prototype.getReplayState = function (layer) {\n        var key = getUid(layer);\n        if (!(key in this.replayState_)) {\n            this.replayState_[key] = {\n                dirty: false,\n                renderedRenderOrder: null,\n                renderedResolution: NaN,\n                renderedRevision: -1,\n                renderedTileResolution: NaN,\n                renderedTileRevision: -1,\n                renderedTileZ: -1,\n            };\n        }\n        return this.replayState_[key];\n    };\n    /**\n     * Load the tile.\n     */\n    VectorRenderTile.prototype.load = function () {\n        this.getSourceTiles();\n    };\n    /**\n     * Remove from the cache due to expiry\n     */\n    VectorRenderTile.prototype.release = function () {\n        for (var key in this.context_) {\n            canvasPool.push(this.context_[key].canvas);\n            delete this.context_[key];\n        }\n        _super.prototype.release.call(this);\n    };\n    return VectorRenderTile;\n}(Tile));\nexport default VectorRenderTile;\n//# sourceMappingURL=VectorRenderTile.js.map","/**\n * @module ol/source/VectorTile\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventType from '../events/EventType.js';\nimport Tile from '../VectorTile.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport UrlTile from './UrlTile.js';\nimport VectorRenderTile from '../VectorRenderTile.js';\nimport { buffer as bufferExtent, getIntersection, intersects, } from '../extent.js';\nimport { createForProjection, createXYZ, extentFromProjection, } from '../tilegrid.js';\nimport { fromKey, getCacheKeyForTileKey, getKeyZXY } from '../tilecoord.js';\nimport { isEmpty } from '../obj.js';\nimport { loadFeaturesXhr } from '../featureloader.js';\nimport { toSize } from '../size.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least twice the number of tiles in the viewport.\n * @property {import(\"../extent.js\").Extent} [extent] Extent.\n * @property {import(\"../format/Feature.js\").default} [format] Feature format for tiles. Used and required by the default.\n * @property {boolean} [overlaps=true] This source may have overlapping geometries. Setting this\n * to `false` (e.g. for sources with polygons that represent administrative\n * boundaries or TopoJSON sources) allows the renderer to optimise fill and\n * stroke operations.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Projection of the tile grid.\n * @property {import(\"./State.js\").default} [state] Source state.\n * @property {typeof import(\"../VectorTile.js\").default} [tileClass] Class used to instantiate image tiles.\n * Default is {@link module:ol/VectorTile}.\n * @property {number} [maxZoom=22] Optional max zoom level. Not used if `tileGrid` is provided.\n * @property {number} [minZoom] Optional min zoom level. Not used if `tileGrid` is provided.\n * @property {number|import(\"../size.js\").Size} [tileSize=512] Optional tile size. Not used if `tileGrid` is provided.\n * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction]\n * Optional function to load a tile given a URL. Could look like this for pbf tiles:\n * ```js\n * function(tile, url) {\n *   tile.setLoader(function(extent, resolution, projection) {\n *     fetch(url).then(function(response) {\n *       response.arrayBuffer().then(function(data) {\n *         const format = tile.getFormat() // ol/format/MVT configured as source format\n *         const features = format.readFeatures(data, {\n *           extent: extent,\n *           featureProjection: projection\n *         });\n *         tile.setFeatures(features);\n *       });\n *     });\n *   });\n * }\n * ```\n * If you do not need extent, resolution and projection to get the features for a tile (e.g.\n * for GeoJSON tiles), your `tileLoadFunction` does not need a `setLoader()` call. Only make sure\n * to call `setFeatures()` on the tile:\n * ```js\n * const format = new GeoJSON({featureProjection: map.getView().getProjection()});\n * async function tileLoadFunction(tile, url) {\n *   const response = await fetch(url);\n *   const data = await response.json();\n *   tile.setFeatures(format.readFeatures(data));\n * }\n * ```\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be\n * used instead of defining each one separately in the `urls` option.\n * @property {number} [transition] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @property {Array<string>} [urls] An array of URL templates.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * When set to `false`, only one world\n * will be rendered. When set to `true`, tiles will be wrapped horizontally to\n * render multiple worlds.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=1]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n/**\n * @classdesc\n * Class for layer sources providing vector data divided into a tile grid, to be\n * used with {@link module:ol/layer/VectorTile~VectorTile}. Although this source receives tiles\n * with vector features from the server, it is not meant for feature editing.\n * Features are optimized for rendering, their geometries are clipped at or near\n * tile boundaries and simplified for a view resolution. See\n * {@link module:ol/source/Vector} for vector sources that are suitable for feature\n * editing.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n * @api\n */\nvar VectorTile = /** @class */ (function (_super) {\n    __extends(VectorTile, _super);\n    /**\n     * @param {!Options} options Vector tile options.\n     */\n    function VectorTile(options) {\n        var _this = this;\n        var projection = options.projection || 'EPSG:3857';\n        var extent = options.extent || extentFromProjection(projection);\n        var tileGrid = options.tileGrid ||\n            createXYZ({\n                extent: extent,\n                maxResolution: options.maxResolution,\n                maxZoom: options.maxZoom !== undefined ? options.maxZoom : 22,\n                minZoom: options.minZoom,\n                tileSize: options.tileSize || 512,\n            });\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            attributionsCollapsible: options.attributionsCollapsible,\n            cacheSize: options.cacheSize,\n            opaque: false,\n            projection: projection,\n            state: options.state,\n            tileGrid: tileGrid,\n            tileLoadFunction: options.tileLoadFunction\n                ? options.tileLoadFunction\n                : defaultLoadFunction,\n            tileUrlFunction: options.tileUrlFunction,\n            url: options.url,\n            urls: options.urls,\n            wrapX: options.wrapX === undefined ? true : options.wrapX,\n            transition: options.transition,\n            zDirection: options.zDirection === undefined ? 1 : options.zDirection,\n        }) || this;\n        /**\n         * @private\n         * @type {import(\"../format/Feature.js\").default}\n         */\n        _this.format_ = options.format ? options.format : null;\n        /**\n         * @private\n         * @type {TileCache}\n         */\n        _this.sourceTileCache = new TileCache(_this.tileCache.highWaterMark);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.overlaps_ = options.overlaps == undefined ? true : options.overlaps;\n        /**\n         * @protected\n         * @type {typeof import(\"../VectorTile.js\").default}\n         */\n        _this.tileClass = options.tileClass ? options.tileClass : Tile;\n        /**\n         * @private\n         * @type {Object<string, import(\"../tilegrid/TileGrid.js\").default>}\n         */\n        _this.tileGrids_ = {};\n        return _this;\n    }\n    /**\n     * Get features whose bounding box intersects the provided extent. Only features for cached\n     * tiles for the last rendered zoom level are available in the source. So this method is only\n     * suitable for requesting tiles for extents that are currently rendered.\n     *\n     * Features are returned in random tile order and as they are included in the tiles. This means\n     * they can be clipped, duplicated across tiles, and simplified to the render resolution.\n     *\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {Array<import(\"../Feature.js\").FeatureLike>} Features.\n     * @api\n     */\n    VectorTile.prototype.getFeaturesInExtent = function (extent) {\n        var features = [];\n        var tileCache = this.tileCache;\n        if (tileCache.getCount() === 0) {\n            return features;\n        }\n        var z = fromKey(tileCache.peekFirstKey())[0];\n        var tileGrid = this.tileGrid;\n        tileCache.forEach(function (tile) {\n            if (tile.tileCoord[0] !== z || tile.getState() !== TileState.LOADED) {\n                return;\n            }\n            var sourceTiles = tile.getSourceTiles();\n            for (var i = 0, ii = sourceTiles.length; i < ii; ++i) {\n                var sourceTile = sourceTiles[i];\n                var tileCoord = sourceTile.tileCoord;\n                if (intersects(extent, tileGrid.getTileCoordExtent(tileCoord))) {\n                    var tileFeatures = sourceTile.getFeatures();\n                    if (tileFeatures) {\n                        for (var j = 0, jj = tileFeatures.length; j < jj; ++j) {\n                            var candidate = tileFeatures[j];\n                            var geometry = candidate.getGeometry();\n                            if (intersects(extent, geometry.getExtent())) {\n                                features.push(candidate);\n                            }\n                        }\n                    }\n                }\n            }\n        });\n        return features;\n    };\n    /**\n     * @return {boolean} The source can have overlapping geometries.\n     */\n    VectorTile.prototype.getOverlaps = function () {\n        return this.overlaps_;\n    };\n    /**\n     * clear {@link module:ol/TileCache~TileCache} and delete all source tiles\n     * @api\n     */\n    VectorTile.prototype.clear = function () {\n        this.tileCache.clear();\n        this.sourceTileCache.clear();\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {!Object<string, boolean>} usedTiles Used tiles.\n     */\n    VectorTile.prototype.expireCache = function (projection, usedTiles) {\n        var tileCache = this.getTileCacheForProjection(projection);\n        var usedSourceTiles = Object.keys(usedTiles).reduce(function (acc, key) {\n            var cacheKey = getCacheKeyForTileKey(key);\n            if (tileCache.containsKey(cacheKey)) {\n                var sourceTiles = tileCache.get(cacheKey).sourceTiles;\n                for (var i = 0, ii = sourceTiles.length; i < ii; ++i) {\n                    acc[sourceTiles[i].getKey()] = true;\n                }\n            }\n            return acc;\n        }, {});\n        _super.prototype.expireCache.call(this, projection, usedTiles);\n        this.sourceTileCache.expireCache(usedSourceTiles);\n    };\n    /**\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection\").default} projection Projection.\n     * @param {VectorRenderTile} tile Vector image tile.\n     * @return {Array<import(\"../VectorTile\").default>} Tile keys.\n     */\n    VectorTile.prototype.getSourceTiles = function (pixelRatio, projection, tile) {\n        var _this = this;\n        if (tile.getState() === TileState.IDLE) {\n            tile.setState(TileState.LOADING);\n            var urlTileCoord = tile.wrappedTileCoord;\n            var tileGrid = this.getTileGridForProjection(projection);\n            var extent = tileGrid.getTileCoordExtent(urlTileCoord);\n            var z = urlTileCoord[0];\n            var resolution = tileGrid.getResolution(z);\n            // make extent 1 pixel smaller so we don't load tiles for < 0.5 pixel render space\n            bufferExtent(extent, -resolution, extent);\n            var sourceTileGrid_1 = this.tileGrid;\n            var sourceExtent = sourceTileGrid_1.getExtent();\n            if (sourceExtent) {\n                getIntersection(extent, sourceExtent, extent);\n            }\n            var sourceZ = sourceTileGrid_1.getZForResolution(resolution, 1);\n            sourceTileGrid_1.forEachTileCoord(extent, sourceZ, function (sourceTileCoord) {\n                var tileUrl = _this.tileUrlFunction(sourceTileCoord, pixelRatio, projection);\n                var sourceTile = _this.sourceTileCache.containsKey(tileUrl)\n                    ? _this.sourceTileCache.get(tileUrl)\n                    : new _this.tileClass(sourceTileCoord, tileUrl ? TileState.IDLE : TileState.EMPTY, tileUrl, _this.format_, _this.tileLoadFunction);\n                tile.sourceTiles.push(sourceTile);\n                var sourceTileState = sourceTile.getState();\n                if (sourceTileState < TileState.LOADED) {\n                    var listenChange_1 = function (event) {\n                        _this.handleTileChange(event);\n                        var state = sourceTile.getState();\n                        if (state === TileState.LOADED || state === TileState.ERROR) {\n                            var sourceTileKey = sourceTile.getKey();\n                            if (sourceTileKey in tile.errorTileKeys) {\n                                if (sourceTile.getState() === TileState.LOADED) {\n                                    delete tile.errorTileKeys[sourceTileKey];\n                                }\n                            }\n                            else {\n                                tile.loadingSourceTiles--;\n                            }\n                            if (state === TileState.ERROR) {\n                                tile.errorTileKeys[sourceTileKey] = true;\n                            }\n                            else {\n                                sourceTile.removeEventListener(EventType.CHANGE, listenChange_1);\n                            }\n                            if (tile.loadingSourceTiles === 0) {\n                                tile.setState(isEmpty(tile.errorTileKeys)\n                                    ? TileState.LOADED\n                                    : TileState.ERROR);\n                            }\n                        }\n                    };\n                    sourceTile.addEventListener(EventType.CHANGE, listenChange_1);\n                    tile.loadingSourceTiles++;\n                }\n                if (sourceTileState === TileState.IDLE) {\n                    sourceTile.extent =\n                        sourceTileGrid_1.getTileCoordExtent(sourceTileCoord);\n                    sourceTile.projection = projection;\n                    sourceTile.resolution = sourceTileGrid_1.getResolution(sourceTileCoord[0]);\n                    _this.sourceTileCache.set(tileUrl, sourceTile);\n                    sourceTile.load();\n                }\n            });\n            if (!tile.loadingSourceTiles) {\n                tile.setState(tile.sourceTiles.some(function (sourceTile) { return sourceTile.getState() === TileState.ERROR; })\n                    ? TileState.ERROR\n                    : TileState.LOADED);\n            }\n        }\n        return tile.sourceTiles;\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!VectorRenderTile} Tile.\n     */\n    VectorTile.prototype.getTile = function (z, x, y, pixelRatio, projection) {\n        var coordKey = getKeyZXY(z, x, y);\n        var key = this.getKey();\n        var tile;\n        if (this.tileCache.containsKey(coordKey)) {\n            tile = this.tileCache.get(coordKey);\n            if (tile.key === key) {\n                return tile;\n            }\n        }\n        var tileCoord = [z, x, y];\n        var urlTileCoord = this.getTileCoordForTileUrlFunction(tileCoord, projection);\n        var sourceExtent = this.getTileGrid().getExtent();\n        var tileGrid = this.getTileGridForProjection(projection);\n        if (urlTileCoord && sourceExtent) {\n            var tileExtent = tileGrid.getTileCoordExtent(urlTileCoord);\n            // make extent 1 pixel smaller so we don't load tiles for < 0.5 pixel render space\n            bufferExtent(tileExtent, -tileGrid.getResolution(z), tileExtent);\n            if (!intersects(sourceExtent, tileExtent)) {\n                urlTileCoord = null;\n            }\n        }\n        var empty = true;\n        if (urlTileCoord !== null) {\n            var sourceTileGrid = this.tileGrid;\n            var resolution = tileGrid.getResolution(z);\n            var sourceZ = sourceTileGrid.getZForResolution(resolution, 1);\n            // make extent 1 pixel smaller so we don't load tiles for < 0.5 pixel render space\n            var extent = tileGrid.getTileCoordExtent(urlTileCoord);\n            bufferExtent(extent, -resolution, extent);\n            sourceTileGrid.forEachTileCoord(extent, sourceZ, function (sourceTileCoord) {\n                empty =\n                    empty &&\n                        !this.tileUrlFunction(sourceTileCoord, pixelRatio, projection);\n            }.bind(this));\n        }\n        var newTile = new VectorRenderTile(tileCoord, empty ? TileState.EMPTY : TileState.IDLE, urlTileCoord, this.getSourceTiles.bind(this, pixelRatio, projection));\n        newTile.key = key;\n        if (tile) {\n            newTile.interimTile = tile;\n            newTile.refreshInterimChain();\n            this.tileCache.replace(coordKey, newTile);\n        }\n        else {\n            this.tileCache.set(coordKey, newTile);\n        }\n        return newTile;\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n     */\n    VectorTile.prototype.getTileGridForProjection = function (projection) {\n        var code = projection.getCode();\n        var tileGrid = this.tileGrids_[code];\n        if (!tileGrid) {\n            // A tile grid that matches the tile size of the source tile grid is more\n            // likely to have 1:1 relationships between source tiles and rendered tiles.\n            var sourceTileGrid = this.tileGrid;\n            tileGrid = createForProjection(projection, undefined, sourceTileGrid\n                ? sourceTileGrid.getTileSize(sourceTileGrid.getMinZoom())\n                : undefined);\n            this.tileGrids_[code] = tileGrid;\n        }\n        return tileGrid;\n    };\n    /**\n     * Get the tile pixel ratio for this source.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} Tile pixel ratio.\n     */\n    VectorTile.prototype.getTilePixelRatio = function (pixelRatio) {\n        return pixelRatio;\n    };\n    /**\n     * @param {number} z Z.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../size.js\").Size} Tile size.\n     */\n    VectorTile.prototype.getTilePixelSize = function (z, pixelRatio, projection) {\n        var tileGrid = this.getTileGridForProjection(projection);\n        var tileSize = toSize(tileGrid.getTileSize(z), this.tmpSize);\n        return [\n            Math.round(tileSize[0] * pixelRatio),\n            Math.round(tileSize[1] * pixelRatio),\n        ];\n    };\n    /**\n     * Increases the cache size if needed\n     * @param {number} tileCount Minimum number of tiles needed.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     */\n    VectorTile.prototype.updateCacheSize = function (tileCount, projection) {\n        _super.prototype.updateCacheSize.call(this, tileCount * 2, projection);\n        this.sourceTileCache.highWaterMark =\n            this.getTileCacheForProjection(projection).highWaterMark;\n    };\n    return VectorTile;\n}(UrlTile));\nexport default VectorTile;\n/**\n * Sets the loader for a tile.\n * @param {import(\"../VectorTile.js\").default} tile Vector tile.\n * @param {string} url URL.\n */\nexport function defaultLoadFunction(tile, url) {\n    tile.setLoader(\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     */\n    function (extent, resolution, projection) {\n        loadFeaturesXhr(url, tile.getFormat(), extent, resolution, projection, tile.onLoad.bind(tile), tile.onError.bind(tile));\n    });\n}\n//# sourceMappingURL=VectorTile.js.map","/**\n * @module ol/structs/RBush\n */\nimport RBush_ from 'rbush';\nimport { createOrUpdate, equals } from '../extent.js';\nimport { getUid } from '../util.js';\nimport { isEmpty } from '../obj.js';\n/**\n * @typedef {Object} Entry\n * @property {number} minX MinX.\n * @property {number} minY MinY.\n * @property {number} maxX MaxX.\n * @property {number} maxY MaxY.\n * @property {Object} [value] Value.\n */\n/**\n * @classdesc\n * Wrapper around the RBush by Vladimir Agafonkin.\n * See https://github.com/mourner/rbush.\n *\n * @template T\n */\nvar RBush = /** @class */ (function () {\n    /**\n     * @param {number} [opt_maxEntries] Max entries.\n     */\n    function RBush(opt_maxEntries) {\n        /**\n         * @private\n         */\n        this.rbush_ = new RBush_(opt_maxEntries);\n        /**\n         * A mapping between the objects added to this rbush wrapper\n         * and the objects that are actually added to the internal rbush.\n         * @private\n         * @type {Object<string, Entry>}\n         */\n        this.items_ = {};\n    }\n    /**\n     * Insert a value into the RBush.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {T} value Value.\n     */\n    RBush.prototype.insert = function (extent, value) {\n        /** @type {Entry} */\n        var item = {\n            minX: extent[0],\n            minY: extent[1],\n            maxX: extent[2],\n            maxY: extent[3],\n            value: value,\n        };\n        this.rbush_.insert(item);\n        this.items_[getUid(value)] = item;\n    };\n    /**\n     * Bulk-insert values into the RBush.\n     * @param {Array<import(\"../extent.js\").Extent>} extents Extents.\n     * @param {Array<T>} values Values.\n     */\n    RBush.prototype.load = function (extents, values) {\n        var items = new Array(values.length);\n        for (var i = 0, l = values.length; i < l; i++) {\n            var extent = extents[i];\n            var value = values[i];\n            /** @type {Entry} */\n            var item = {\n                minX: extent[0],\n                minY: extent[1],\n                maxX: extent[2],\n                maxY: extent[3],\n                value: value,\n            };\n            items[i] = item;\n            this.items_[getUid(value)] = item;\n        }\n        this.rbush_.load(items);\n    };\n    /**\n     * Remove a value from the RBush.\n     * @param {T} value Value.\n     * @return {boolean} Removed.\n     */\n    RBush.prototype.remove = function (value) {\n        var uid = getUid(value);\n        // get the object in which the value was wrapped when adding to the\n        // internal rbush. then use that object to do the removal.\n        var item = this.items_[uid];\n        delete this.items_[uid];\n        return this.rbush_.remove(item) !== null;\n    };\n    /**\n     * Update the extent of a value in the RBush.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {T} value Value.\n     */\n    RBush.prototype.update = function (extent, value) {\n        var item = this.items_[getUid(value)];\n        var bbox = [item.minX, item.minY, item.maxX, item.maxY];\n        if (!equals(bbox, extent)) {\n            this.remove(value);\n            this.insert(extent, value);\n        }\n    };\n    /**\n     * Return all values in the RBush.\n     * @return {Array<T>} All.\n     */\n    RBush.prototype.getAll = function () {\n        var items = this.rbush_.all();\n        return items.map(function (item) {\n            return item.value;\n        });\n    };\n    /**\n     * Return all values in the given extent.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {Array<T>} All in extent.\n     */\n    RBush.prototype.getInExtent = function (extent) {\n        /** @type {Entry} */\n        var bbox = {\n            minX: extent[0],\n            minY: extent[1],\n            maxX: extent[2],\n            maxY: extent[3],\n        };\n        var items = this.rbush_.search(bbox);\n        return items.map(function (item) {\n            return item.value;\n        });\n    };\n    /**\n     * Calls a callback function with each value in the tree.\n     * If the callback returns a truthy value, this value is returned without\n     * checking the rest of the tree.\n     * @param {function(T): *} callback Callback.\n     * @return {*} Callback return value.\n     */\n    RBush.prototype.forEach = function (callback) {\n        return this.forEach_(this.getAll(), callback);\n    };\n    /**\n     * Calls a callback function with each value in the provided extent.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {function(T): *} callback Callback.\n     * @return {*} Callback return value.\n     */\n    RBush.prototype.forEachInExtent = function (extent, callback) {\n        return this.forEach_(this.getInExtent(extent), callback);\n    };\n    /**\n     * @param {Array<T>} values Values.\n     * @param {function(T): *} callback Callback.\n     * @private\n     * @return {*} Callback return value.\n     */\n    RBush.prototype.forEach_ = function (values, callback) {\n        var result;\n        for (var i = 0, l = values.length; i < l; i++) {\n            result = callback(values[i]);\n            if (result) {\n                return result;\n            }\n        }\n        return result;\n    };\n    /**\n     * @return {boolean} Is empty.\n     */\n    RBush.prototype.isEmpty = function () {\n        return isEmpty(this.items_);\n    };\n    /**\n     * Remove all values from the RBush.\n     */\n    RBush.prototype.clear = function () {\n        this.rbush_.clear();\n        this.items_ = {};\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} [opt_extent] Extent.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     */\n    RBush.prototype.getExtent = function (opt_extent) {\n        var data = this.rbush_.toJSON();\n        return createOrUpdate(data.minX, data.minY, data.maxX, data.maxY, opt_extent);\n    };\n    /**\n     * @param {RBush} rbush R-Tree.\n     */\n    RBush.prototype.concat = function (rbush) {\n        this.rbush_.load(rbush.rbush_.all());\n        for (var i in rbush.items_) {\n            this.items_[i] = rbush.items_[i];\n        }\n    };\n    return RBush;\n}());\nexport default RBush;\n//# sourceMappingURL=RBush.js.map","/**\n * @module ol/geom/flat/interiorpoint\n */\nimport { linearRingsContainsXY } from './contains.js';\nimport { numberSafeCompareFunction } from '../../array.js';\n/**\n * Calculates a point that is likely to lie in the interior of the linear rings.\n * Inspired by JTS's com.vividsolutions.jts.geom.Geometry#getInteriorPoint.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<number>} flatCenters Flat centers.\n * @param {number} flatCentersOffset Flat center offset.\n * @param {Array<number>} [opt_dest] Destination.\n * @return {Array<number>} Destination point as XYM coordinate, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointOfArray(flatCoordinates, offset, ends, stride, flatCenters, flatCentersOffset, opt_dest) {\n    var i, ii, x, x1, x2, y1, y2;\n    var y = flatCenters[flatCentersOffset + 1];\n    /** @type {Array<number>} */\n    var intersections = [];\n    // Calculate intersections with the horizontal line\n    for (var r = 0, rr = ends.length; r < rr; ++r) {\n        var end = ends[r];\n        x1 = flatCoordinates[end - stride];\n        y1 = flatCoordinates[end - stride + 1];\n        for (i = offset; i < end; i += stride) {\n            x2 = flatCoordinates[i];\n            y2 = flatCoordinates[i + 1];\n            if ((y <= y1 && y2 <= y) || (y1 <= y && y <= y2)) {\n                x = ((y - y1) / (y2 - y1)) * (x2 - x1) + x1;\n                intersections.push(x);\n            }\n            x1 = x2;\n            y1 = y2;\n        }\n    }\n    // Find the longest segment of the horizontal line that has its center point\n    // inside the linear ring.\n    var pointX = NaN;\n    var maxSegmentLength = -Infinity;\n    intersections.sort(numberSafeCompareFunction);\n    x1 = intersections[0];\n    for (i = 1, ii = intersections.length; i < ii; ++i) {\n        x2 = intersections[i];\n        var segmentLength = Math.abs(x2 - x1);\n        if (segmentLength > maxSegmentLength) {\n            x = (x1 + x2) / 2;\n            if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n                pointX = x;\n                maxSegmentLength = segmentLength;\n            }\n        }\n        x1 = x2;\n    }\n    if (isNaN(pointX)) {\n        // There is no horizontal line that has its center point inside the linear\n        // ring.  Use the center of the the linear ring's extent.\n        pointX = flatCenters[flatCentersOffset];\n    }\n    if (opt_dest) {\n        opt_dest.push(pointX, y, maxSegmentLength);\n        return opt_dest;\n    }\n    else {\n        return [pointX, y, maxSegmentLength];\n    }\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array<number>} flatCenters Flat centers.\n * @return {Array<number>} Interior points as XYM coordinates, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointsOfMultiArray(flatCoordinates, offset, endss, stride, flatCenters) {\n    var interiorPoints = [];\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        interiorPoints = getInteriorPointOfArray(flatCoordinates, offset, ends, stride, flatCenters, 2 * i, interiorPoints);\n        offset = ends[ends.length - 1];\n    }\n    return interiorPoints;\n}\n//# sourceMappingURL=interiorpoint.js.map","/**\n * @module ol/net\n */\nimport { getUid } from './util.js';\n/**\n * Simple JSONP helper. Supports error callbacks and a custom callback param.\n * The error callback will be called when no JSONP is executed after 10 seconds.\n *\n * @param {string} url Request url. A 'callback' query parameter will be\n *     appended.\n * @param {Function} callback Callback on success.\n * @param {Function} [opt_errback] Callback on error.\n * @param {string} [opt_callbackParam] Custom query parameter for the JSONP\n *     callback. Default is 'callback'.\n */\nexport function jsonp(url, callback, opt_errback, opt_callbackParam) {\n    var script = document.createElement('script');\n    var key = 'olc_' + getUid(callback);\n    function cleanup() {\n        delete window[key];\n        script.parentNode.removeChild(script);\n    }\n    script.async = true;\n    script.src =\n        url +\n            (url.indexOf('?') == -1 ? '?' : '&') +\n            (opt_callbackParam || 'callback') +\n            '=' +\n            key;\n    var timer = setTimeout(function () {\n        cleanup();\n        if (opt_errback) {\n            opt_errback();\n        }\n    }, 10000);\n    window[key] = function (data) {\n        clearTimeout(timer);\n        cleanup();\n        callback(data);\n    };\n    document.getElementsByTagName('head')[0].appendChild(script);\n}\n//# sourceMappingURL=net.js.map","/**\n * @module ol/interaction/Property\n */\n/**\n * @enum {string}\n */\nexport default {\n    ACTIVE: 'active',\n};\n//# sourceMappingURL=Property.js.map","import { geomReduce } from '@turf/meta';\n\n/**\n * Takes one or more features and returns their area in square meters.\n *\n * @name area\n * @param {GeoJSON} geojson input GeoJSON feature(s)\n * @returns {number} area in square meters\n * @example\n * var polygon = turf.polygon([[[125, -15], [113, -22], [154, -27], [144, -15], [125, -15]]]);\n *\n * var area = turf.area(polygon);\n *\n * //addToMap\n * var addToMap = [polygon]\n * polygon.properties.area = area\n */\nfunction area(geojson) {\n    return geomReduce(geojson, function (value, geom) {\n        return value + calculateArea(geom);\n    }, 0);\n}\n\nvar RADIUS = 6378137;\n// var FLATTENING_DENOM = 298.257223563;\n// var FLATTENING = 1 / FLATTENING_DENOM;\n// var POLAR_RADIUS = RADIUS * (1 - FLATTENING);\n\n/**\n * Calculate Area\n *\n * @private\n * @param {GeoJSON} geojson GeoJSON\n * @returns {number} area\n */\nfunction calculateArea(geojson) {\n    var area = 0, i;\n    switch (geojson.type) {\n    case 'Polygon':\n        return polygonArea(geojson.coordinates);\n    case 'MultiPolygon':\n        for (i = 0; i < geojson.coordinates.length; i++) {\n            area += polygonArea(geojson.coordinates[i]);\n        }\n        return area;\n    case 'Point':\n    case 'MultiPoint':\n    case 'LineString':\n    case 'MultiLineString':\n        return 0;\n    case 'GeometryCollection':\n        for (i = 0; i < geojson.geometries.length; i++) {\n            area += calculateArea(geojson.geometries[i]);\n        }\n        return area;\n    }\n}\n\nfunction polygonArea(coords) {\n    var area = 0;\n    if (coords && coords.length > 0) {\n        area += Math.abs(ringArea(coords[0]));\n        for (var i = 1; i < coords.length; i++) {\n            area -= Math.abs(ringArea(coords[i]));\n        }\n    }\n    return area;\n}\n\n/**\n * @private\n * Calculate the approximate area of the polygon were it projected onto the earth.\n * Note that this area will be positive if ring is oriented clockwise, otherwise it will be negative.\n *\n * Reference:\n * Robert. G. Chamberlain and William H. Duquette, \"Some Algorithms for Polygons on a Sphere\", JPL Publication 07-03, Jet Propulsion\n * Laboratory, Pasadena, CA, June 2007 http://trs-new.jpl.nasa.gov/dspace/handle/2014/40409\n *\n * @param {Array<Array<number>>} coords Ring Coordinates\n * @returns {number} The approximate signed geodesic area of the polygon in square meters.\n */\nfunction ringArea(coords) {\n    var p1;\n    var p2;\n    var p3;\n    var lowerIndex;\n    var middleIndex;\n    var upperIndex;\n    var i;\n    var area = 0;\n    var coordsLength = coords.length;\n\n    if (coordsLength > 2) {\n        for (i = 0; i < coordsLength; i++) {\n            if (i === coordsLength - 2) { // i = N-2\n                lowerIndex = coordsLength - 2;\n                middleIndex = coordsLength - 1;\n                upperIndex = 0;\n            } else if (i === coordsLength - 1) { // i = N-1\n                lowerIndex = coordsLength - 1;\n                middleIndex = 0;\n                upperIndex = 1;\n            } else { // i = 0 to N-3\n                lowerIndex = i;\n                middleIndex = i + 1;\n                upperIndex = i + 2;\n            }\n            p1 = coords[lowerIndex];\n            p2 = coords[middleIndex];\n            p3 = coords[upperIndex];\n            area += (rad(p3[0]) - rad(p1[0])) * Math.sin(rad(p2[1]));\n        }\n\n        area = area * RADIUS * RADIUS / 2;\n    }\n\n    return area;\n}\n\nfunction rad(_) {\n    return _ * Math.PI / 180;\n}\n\nexport default area;\n","import { GeoJSONReader, GeoJSONWriter, OverlayOp } from 'turf-jsts';\nimport area from '@turf/area';\nimport { feature } from '@turf/helpers';\nimport { getGeom } from '@turf/invariant';\nimport { flattenEach } from '@turf/meta';\n\n/**\n * Finds the difference between two {@link Polygon|polygons} by clipping the second polygon from the first.\n *\n * @name difference\n * @param {Feature<Polygon|MultiPolygon>} polygon1 input Polygon feature\n * @param {Feature<Polygon|MultiPolygon>} polygon2 Polygon feature to difference from polygon1\n * @returns {Feature<Polygon|MultiPolygon>|null} a Polygon or MultiPolygon feature showing the area of `polygon1` excluding the area of `polygon2` (if empty returns `null`)\n * @example\n * var polygon1 = turf.polygon([[\n *   [128, -26],\n *   [141, -26],\n *   [141, -21],\n *   [128, -21],\n *   [128, -26]\n * ]], {\n *   \"fill\": \"#F00\",\n *   \"fill-opacity\": 0.1\n * });\n * var polygon2 = turf.polygon([[\n *   [126, -28],\n *   [140, -28],\n *   [140, -20],\n *   [126, -20],\n *   [126, -28]\n * ]], {\n *   \"fill\": \"#00F\",\n *   \"fill-opacity\": 0.1\n * });\n *\n * var difference = turf.difference(polygon1, polygon2);\n *\n * //addToMap\n * var addToMap = [polygon1, polygon2, difference];\n */\nfunction difference(polygon1, polygon2) {\n    var geom1 = getGeom(polygon1);\n    var geom2 = getGeom(polygon2);\n    var properties = polygon1.properties || {};\n\n    // Issue #721 - JSTS can't handle empty polygons\n    geom1 = removeEmptyPolygon(geom1);\n    geom2 = removeEmptyPolygon(geom2);\n    if (!geom1) return null;\n    if (!geom2) return feature(geom1, properties);\n\n    // JSTS difference operation\n    var reader = new GeoJSONReader();\n    var a = reader.read(geom1);\n    var b = reader.read(geom2);\n    var differenced = OverlayOp.difference(a, b);\n    if (differenced.isEmpty()) return null;\n    var writer = new GeoJSONWriter();\n    var geom = writer.write(differenced);\n\n    return feature(geom, properties);\n}\n\n/**\n * Detect Empty Polygon\n *\n * @private\n * @param {Geometry<Polygon|MultiPolygon>} geom Geometry Object\n * @returns {Geometry<Polygon|MultiPolygon>|null} removed any polygons with no areas\n */\nfunction removeEmptyPolygon(geom) {\n    switch (geom.type) {\n    case 'Polygon':\n        if (area(geom) > 1) return geom;\n        return null;\n    case 'MultiPolygon':\n        var coordinates = [];\n        flattenEach(geom, function (feature$$1) {\n            if (area(feature$$1) > 1) coordinates.push(feature$$1.geometry.coordinates);\n        });\n        if (coordinates.length) return {type: 'MultiPolygon', coordinates: coordinates};\n    }\n}\n\nexport default difference;\n","/**\n * @module ol/extent/Corner\n */\n/**\n * Extent corner.\n * @enum {string}\n */\nexport default {\n    BOTTOM_LEFT: 'bottom-left',\n    BOTTOM_RIGHT: 'bottom-right',\n    TOP_LEFT: 'top-left',\n    TOP_RIGHT: 'top-right',\n};\n//# sourceMappingURL=Corner.js.map","/**\n * @module ol/geom\n */\nexport { default as Circle } from './geom/Circle.js';\nexport { default as Geometry } from './geom/Geometry.js';\nexport { default as GeometryCollection } from './geom/GeometryCollection.js';\nexport { default as LinearRing } from './geom/LinearRing.js';\nexport { default as LineString } from './geom/LineString.js';\nexport { default as MultiLineString } from './geom/MultiLineString.js';\nexport { default as MultiPoint } from './geom/MultiPoint.js';\nexport { default as MultiPolygon } from './geom/MultiPolygon.js';\nexport { default as Point } from './geom/Point.js';\nexport { default as Polygon } from './geom/Polygon.js';\nexport { default as SimpleGeometry } from './geom/SimpleGeometry.js';\n//# sourceMappingURL=geom.js.map","/**\n * @module ol/style/Image\n */\nimport { abstract } from '../util.js';\nimport { toSize } from '../size.js';\n/**\n * @typedef {Object} Options\n * @property {number} opacity Opacity.\n * @property {boolean} rotateWithView If the image should get rotated with the view.\n * @property {number} rotation Rotation.\n * @property {number|import(\"../size.js\").Size} scale Scale.\n * @property {Array<number>} displacement Displacement.\n */\n/**\n * @classdesc\n * A base class used for creating subclasses and not instantiated in\n * apps. Base class for {@link module:ol/style/Icon~Icon}, {@link module:ol/style/Circle~CircleStyle} and\n * {@link module:ol/style/RegularShape~RegularShape}.\n * @abstract\n * @api\n */\nvar ImageStyle = /** @class */ (function () {\n    /**\n     * @param {Options} options Options.\n     */\n    function ImageStyle(options) {\n        /**\n         * @private\n         * @type {number}\n         */\n        this.opacity_ = options.opacity;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        this.rotateWithView_ = options.rotateWithView;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.rotation_ = options.rotation;\n        /**\n         * @private\n         * @type {number|import(\"../size.js\").Size}\n         */\n        this.scale_ = options.scale;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        this.scaleArray_ = toSize(options.scale);\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.displacement_ = options.displacement;\n    }\n    /**\n     * Clones the style.\n     * @return {ImageStyle} The cloned style.\n     * @api\n     */\n    ImageStyle.prototype.clone = function () {\n        var scale = this.getScale();\n        return new ImageStyle({\n            opacity: this.getOpacity(),\n            scale: Array.isArray(scale) ? scale.slice() : scale,\n            rotation: this.getRotation(),\n            rotateWithView: this.getRotateWithView(),\n            displacement: this.getDisplacement().slice(),\n        });\n    };\n    /**\n     * Get the symbolizer opacity.\n     * @return {number} Opacity.\n     * @api\n     */\n    ImageStyle.prototype.getOpacity = function () {\n        return this.opacity_;\n    };\n    /**\n     * Determine whether the symbolizer rotates with the map.\n     * @return {boolean} Rotate with map.\n     * @api\n     */\n    ImageStyle.prototype.getRotateWithView = function () {\n        return this.rotateWithView_;\n    };\n    /**\n     * Get the symoblizer rotation.\n     * @return {number} Rotation.\n     * @api\n     */\n    ImageStyle.prototype.getRotation = function () {\n        return this.rotation_;\n    };\n    /**\n     * Get the symbolizer scale.\n     * @return {number|import(\"../size.js\").Size} Scale.\n     * @api\n     */\n    ImageStyle.prototype.getScale = function () {\n        return this.scale_;\n    };\n    /**\n     * Get the symbolizer scale array.\n     * @return {import(\"../size.js\").Size} Scale array.\n     */\n    ImageStyle.prototype.getScaleArray = function () {\n        return this.scaleArray_;\n    };\n    /**\n     * Get the displacement of the shape\n     * @return {Array<number>} Shape's center displacement\n     * @api\n     */\n    ImageStyle.prototype.getDisplacement = function () {\n        return this.displacement_;\n    };\n    /**\n     * Get the anchor point in pixels. The anchor determines the center point for the\n     * symbolizer.\n     * @abstract\n     * @return {Array<number>} Anchor.\n     */\n    ImageStyle.prototype.getAnchor = function () {\n        return abstract();\n    };\n    /**\n     * Get the image element for the symbolizer.\n     * @abstract\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Image element.\n     */\n    ImageStyle.prototype.getImage = function (pixelRatio) {\n        return abstract();\n    };\n    /**\n     * @abstract\n     * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Image element.\n     */\n    ImageStyle.prototype.getHitDetectionImage = function () {\n        return abstract();\n    };\n    /**\n     * Get the image pixel ratio.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} Pixel ratio.\n     */\n    ImageStyle.prototype.getPixelRatio = function (pixelRatio) {\n        return 1;\n    };\n    /**\n     * @abstract\n     * @return {import(\"../ImageState.js\").default} Image state.\n     */\n    ImageStyle.prototype.getImageState = function () {\n        return abstract();\n    };\n    /**\n     * @abstract\n     * @return {import(\"../size.js\").Size} Image size.\n     */\n    ImageStyle.prototype.getImageSize = function () {\n        return abstract();\n    };\n    /**\n     * Get the origin of the symbolizer.\n     * @abstract\n     * @return {Array<number>} Origin.\n     */\n    ImageStyle.prototype.getOrigin = function () {\n        return abstract();\n    };\n    /**\n     * Get the size of the symbolizer (in pixels).\n     * @abstract\n     * @return {import(\"../size.js\").Size} Size.\n     */\n    ImageStyle.prototype.getSize = function () {\n        return abstract();\n    };\n    /**\n     * Set the opacity.\n     *\n     * @param {number} opacity Opacity.\n     * @api\n     */\n    ImageStyle.prototype.setOpacity = function (opacity) {\n        this.opacity_ = opacity;\n    };\n    /**\n     * Set whether to rotate the style with the view.\n     *\n     * @param {boolean} rotateWithView Rotate with map.\n     * @api\n     */\n    ImageStyle.prototype.setRotateWithView = function (rotateWithView) {\n        this.rotateWithView_ = rotateWithView;\n    };\n    /**\n     * Set the rotation.\n     *\n     * @param {number} rotation Rotation.\n     * @api\n     */\n    ImageStyle.prototype.setRotation = function (rotation) {\n        this.rotation_ = rotation;\n    };\n    /**\n     * Set the scale.\n     *\n     * @param {number|import(\"../size.js\").Size} scale Scale.\n     * @api\n     */\n    ImageStyle.prototype.setScale = function (scale) {\n        this.scale_ = scale;\n        this.scaleArray_ = toSize(scale);\n    };\n    /**\n     * @abstract\n     * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n     */\n    ImageStyle.prototype.listenImageChange = function (listener) {\n        abstract();\n    };\n    /**\n     * Load not yet loaded URI.\n     * @abstract\n     */\n    ImageStyle.prototype.load = function () {\n        abstract();\n    };\n    /**\n     * @abstract\n     * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n     */\n    ImageStyle.prototype.unlistenImageChange = function (listener) {\n        abstract();\n    };\n    return ImageStyle;\n}());\nexport default ImageStyle;\n//# sourceMappingURL=Image.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/Geometry\n */\nimport BaseObject from '../Object.js';\nimport Units from '../proj/Units.js';\nimport { abstract } from '../util.js';\nimport { compose as composeTransform, create as createTransform, } from '../transform.js';\nimport { createEmpty, createOrUpdateEmpty, getHeight, returnOrUpdate, } from '../extent.js';\nimport { get as getProjection, getTransform } from '../proj.js';\nimport { memoizeOne } from '../functions.js';\nimport { transform2D } from './flat/transform.js';\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nvar tmpTransform = createTransform();\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for vector geometries.\n *\n * To get notified of changes to the geometry, register a listener for the\n * generic `change` event on your geometry instance.\n *\n * @abstract\n * @api\n */\nvar Geometry = /** @class */ (function (_super) {\n    __extends(Geometry, _super);\n    function Geometry() {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        _this.extent_ = createEmpty();\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.extentRevision_ = -1;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.simplifiedGeometryRevision = 0;\n        /**\n         * Get a transformed and simplified version of the geometry.\n         * @abstract\n         * @param {number} revision The geometry revision.\n         * @param {number} squaredTolerance Squared tolerance.\n         * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Optional transform function.\n         * @return {Geometry} Simplified geometry.\n         */\n        _this.simplifyTransformedInternal = memoizeOne(function (revision, squaredTolerance, opt_transform) {\n            if (!opt_transform) {\n                return this.getSimplifiedGeometry(squaredTolerance);\n            }\n            var clone = this.clone();\n            clone.applyTransform(opt_transform);\n            return clone.getSimplifiedGeometry(squaredTolerance);\n        });\n        return _this;\n    }\n    /**\n     * Get a transformed and simplified version of the geometry.\n     * @abstract\n     * @param {number} squaredTolerance Squared tolerance.\n     * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Optional transform function.\n     * @return {Geometry} Simplified geometry.\n     */\n    Geometry.prototype.simplifyTransformed = function (squaredTolerance, opt_transform) {\n        return this.simplifyTransformedInternal(this.getRevision(), squaredTolerance, opt_transform);\n    };\n    /**\n     * Make a complete copy of the geometry.\n     * @abstract\n     * @return {!Geometry} Clone.\n     */\n    Geometry.prototype.clone = function () {\n        return abstract();\n    };\n    /**\n     * @abstract\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    Geometry.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        return abstract();\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @return {boolean} Contains (x, y).\n     */\n    Geometry.prototype.containsXY = function (x, y) {\n        var coord = this.getClosestPoint([x, y]);\n        return coord[0] === x && coord[1] === y;\n    };\n    /**\n     * Return the closest point of the geometry to the passed point as\n     * {@link module:ol/coordinate~Coordinate coordinate}.\n     * @param {import(\"../coordinate.js\").Coordinate} point Point.\n     * @param {import(\"../coordinate.js\").Coordinate} [opt_closestPoint] Closest point.\n     * @return {import(\"../coordinate.js\").Coordinate} Closest point.\n     * @api\n     */\n    Geometry.prototype.getClosestPoint = function (point, opt_closestPoint) {\n        var closestPoint = opt_closestPoint ? opt_closestPoint : [NaN, NaN];\n        this.closestPointXY(point[0], point[1], closestPoint, Infinity);\n        return closestPoint;\n    };\n    /**\n     * Returns true if this geometry includes the specified coordinate. If the\n     * coordinate is on the boundary of the geometry, returns false.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @return {boolean} Contains coordinate.\n     * @api\n     */\n    Geometry.prototype.intersectsCoordinate = function (coordinate) {\n        return this.containsXY(coordinate[0], coordinate[1]);\n    };\n    /**\n     * @abstract\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @protected\n     * @return {import(\"../extent.js\").Extent} extent Extent.\n     */\n    Geometry.prototype.computeExtent = function (extent) {\n        return abstract();\n    };\n    /**\n     * Get the extent of the geometry.\n     * @param {import(\"../extent.js\").Extent} [opt_extent] Extent.\n     * @return {import(\"../extent.js\").Extent} extent Extent.\n     * @api\n     */\n    Geometry.prototype.getExtent = function (opt_extent) {\n        if (this.extentRevision_ != this.getRevision()) {\n            var extent = this.computeExtent(this.extent_);\n            if (isNaN(extent[0]) || isNaN(extent[1])) {\n                createOrUpdateEmpty(extent);\n            }\n            this.extentRevision_ = this.getRevision();\n        }\n        return returnOrUpdate(this.extent_, opt_extent);\n    };\n    /**\n     * Rotate the geometry around a given coordinate. This modifies the geometry\n     * coordinates in place.\n     * @abstract\n     * @param {number} angle Rotation angle in radians.\n     * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n     * @api\n     */\n    Geometry.prototype.rotate = function (angle, anchor) {\n        abstract();\n    };\n    /**\n     * Scale the geometry (with an optional origin).  This modifies the geometry\n     * coordinates in place.\n     * @abstract\n     * @param {number} sx The scaling factor in the x-direction.\n     * @param {number} [opt_sy] The scaling factor in the y-direction (defaults to sx).\n     * @param {import(\"../coordinate.js\").Coordinate} [opt_anchor] The scale origin (defaults to the center\n     *     of the geometry extent).\n     * @api\n     */\n    Geometry.prototype.scale = function (sx, opt_sy, opt_anchor) {\n        abstract();\n    };\n    /**\n     * Create a simplified version of this geometry.  For linestrings, this uses\n     * the [Douglas Peucker](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm)\n     * algorithm.  For polygons, a quantization-based\n     * simplification is used to preserve topology.\n     * @param {number} tolerance The tolerance distance for simplification.\n     * @return {Geometry} A new, simplified version of the original geometry.\n     * @api\n     */\n    Geometry.prototype.simplify = function (tolerance) {\n        return this.getSimplifiedGeometry(tolerance * tolerance);\n    };\n    /**\n     * Create a simplified version of this geometry using the Douglas Peucker\n     * algorithm.\n     * See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm.\n     * @abstract\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {Geometry} Simplified geometry.\n     */\n    Geometry.prototype.getSimplifiedGeometry = function (squaredTolerance) {\n        return abstract();\n    };\n    /**\n     * Get the type of this geometry.\n     * @abstract\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     */\n    Geometry.prototype.getType = function () {\n        return abstract();\n    };\n    /**\n     * Apply a transform function to the coordinates of the geometry.\n     * The geometry is modified in place.\n     * If you do not want the geometry modified in place, first `clone()` it and\n     * then use this function on the clone.\n     * @abstract\n     * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n     * Called with a flat array of geometry coordinates.\n     */\n    Geometry.prototype.applyTransform = function (transformFn) {\n        abstract();\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @abstract\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     */\n    Geometry.prototype.intersectsExtent = function (extent) {\n        return abstract();\n    };\n    /**\n     * Translate the geometry.  This modifies the geometry coordinates in place.  If\n     * instead you want a new geometry, first `clone()` this geometry.\n     * @abstract\n     * @param {number} deltaX Delta X.\n     * @param {number} deltaY Delta Y.\n     * @api\n     */\n    Geometry.prototype.translate = function (deltaX, deltaY) {\n        abstract();\n    };\n    /**\n     * Transform each coordinate of the geometry from one coordinate reference\n     * system to another. The geometry is modified in place.\n     * For example, a line will be transformed to a line and a circle to a circle.\n     * If you do not want the geometry modified in place, first `clone()` it and\n     * then use this function on the clone.\n     *\n     * @param {import(\"../proj.js\").ProjectionLike} source The current projection.  Can be a\n     *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n     * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection.  Can be a\n     *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n     * @return {Geometry} This geometry.  Note that original geometry is\n     *     modified in place.\n     * @api\n     */\n    Geometry.prototype.transform = function (source, destination) {\n        /** @type {import(\"../proj/Projection.js\").default} */\n        var sourceProj = getProjection(source);\n        var transformFn = sourceProj.getUnits() == Units.TILE_PIXELS\n            ? function (inCoordinates, outCoordinates, stride) {\n                var pixelExtent = sourceProj.getExtent();\n                var projectedExtent = sourceProj.getWorldExtent();\n                var scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n                composeTransform(tmpTransform, projectedExtent[0], projectedExtent[3], scale, -scale, 0, 0, 0);\n                transform2D(inCoordinates, 0, inCoordinates.length, stride, tmpTransform, outCoordinates);\n                return getTransform(sourceProj, destination)(inCoordinates, outCoordinates, stride);\n            }\n            : getTransform(sourceProj, destination);\n        this.applyTransform(transformFn);\n        return this;\n    };\n    return Geometry;\n}(BaseObject));\nexport default Geometry;\n//# sourceMappingURL=Geometry.js.map","/**\n * @module ol/format/MVT\n */\n//FIXME Implement projection handling\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport FeatureFormat, { transformGeometryWithOptions } from './Feature.js';\nimport FormatType from './FormatType.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport PBF from 'pbf';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport Projection from '../proj/Projection.js';\nimport RenderFeature from '../render/Feature.js';\nimport Units from '../proj/Units.js';\nimport { assert } from '../asserts.js';\nimport { get } from '../proj.js';\nimport { linearRingIsClockwise } from '../geom/flat/orient.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../Feature.js\").FeatureClass} [featureClass] Class for features returned by\n * {@link module:ol/format/MVT~MVT#readFeatures}. Set to {@link module:ol/Feature~Feature} to get full editing and geometry\n * support at the cost of decreased rendering performance. The default is\n * {@link module:ol/render/Feature~RenderFeature}, which is optimized for rendering and hit detection.\n * @property {string} [geometryName='geometry'] Geometry name to use when creating features.\n * @property {string} [layerName='layer'] Name of the feature attribute that holds the layer name.\n * @property {Array<string>} [layers] Layers to read features from. If not provided, features will be read from all\n * @property {string} [idProperty] Optional property that will be assigned as the feature id and removed from the properties.\n * layers.\n */\n/**\n * @classdesc\n * Feature format for reading data in the Mapbox MVT format.\n *\n * @param {Options} [opt_options] Options.\n * @api\n */\nvar MVT = /** @class */ (function (_super) {\n    __extends(MVT, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function MVT(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @type {Projection}\n         */\n        _this.dataProjection = new Projection({\n            code: '',\n            units: Units.TILE_PIXELS,\n        });\n        /**\n         * @private\n         * @type {import(\"../Feature.js\").FeatureClass}\n         */\n        _this.featureClass_ = options.featureClass\n            ? options.featureClass\n            : RenderFeature;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.geometryName_ = options.geometryName;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.layerName_ = options.layerName ? options.layerName : 'layer';\n        /**\n         * @private\n         * @type {Array<string>}\n         */\n        _this.layers_ = options.layers ? options.layers : null;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.idProperty_ = options.idProperty;\n        return _this;\n    }\n    /**\n     * Read the raw geometry from the pbf offset stored in a raw feature's geometry\n     * property.\n     * @param {PBF} pbf PBF.\n     * @param {Object} feature Raw feature.\n     * @param {Array<number>} flatCoordinates Array to store flat coordinates in.\n     * @param {Array<number>} ends Array to store ends in.\n     * @private\n     */\n    MVT.prototype.readRawGeometry_ = function (pbf, feature, flatCoordinates, ends) {\n        pbf.pos = feature.geometry;\n        var end = pbf.readVarint() + pbf.pos;\n        var cmd = 1;\n        var length = 0;\n        var x = 0;\n        var y = 0;\n        var coordsLen = 0;\n        var currentEnd = 0;\n        while (pbf.pos < end) {\n            if (!length) {\n                var cmdLen = pbf.readVarint();\n                cmd = cmdLen & 0x7;\n                length = cmdLen >> 3;\n            }\n            length--;\n            if (cmd === 1 || cmd === 2) {\n                x += pbf.readSVarint();\n                y += pbf.readSVarint();\n                if (cmd === 1) {\n                    // moveTo\n                    if (coordsLen > currentEnd) {\n                        ends.push(coordsLen);\n                        currentEnd = coordsLen;\n                    }\n                }\n                flatCoordinates.push(x, y);\n                coordsLen += 2;\n            }\n            else if (cmd === 7) {\n                if (coordsLen > currentEnd) {\n                    // close polygon\n                    flatCoordinates.push(flatCoordinates[currentEnd], flatCoordinates[currentEnd + 1]);\n                    coordsLen += 2;\n                }\n            }\n            else {\n                assert(false, 59); // Invalid command found in the PBF\n            }\n        }\n        if (coordsLen > currentEnd) {\n            ends.push(coordsLen);\n            currentEnd = coordsLen;\n        }\n    };\n    /**\n     * @private\n     * @param {PBF} pbf PBF\n     * @param {Object} rawFeature Raw Mapbox feature.\n     * @param {import(\"./Feature.js\").ReadOptions} options Read options.\n     * @return {import(\"../Feature.js\").FeatureLike} Feature.\n     */\n    MVT.prototype.createFeature_ = function (pbf, rawFeature, options) {\n        var type = rawFeature.type;\n        if (type === 0) {\n            return null;\n        }\n        var feature;\n        var values = rawFeature.properties;\n        var id;\n        if (!this.idProperty_) {\n            id = rawFeature.id;\n        }\n        else {\n            id = values[this.idProperty_];\n            delete values[this.idProperty_];\n        }\n        values[this.layerName_] = rawFeature.layer.name;\n        var flatCoordinates = [];\n        var ends = [];\n        this.readRawGeometry_(pbf, rawFeature, flatCoordinates, ends);\n        var geometryType = getGeometryType(type, ends.length);\n        if (this.featureClass_ === RenderFeature) {\n            feature = new this.featureClass_(geometryType, flatCoordinates, ends, values, id);\n            feature.transform(options.dataProjection);\n        }\n        else {\n            var geom = void 0;\n            if (geometryType == GeometryType.POLYGON) {\n                var endss = [];\n                var offset = 0;\n                var prevEndIndex = 0;\n                for (var i = 0, ii = ends.length; i < ii; ++i) {\n                    var end = ends[i];\n                    // classifies an array of rings into polygons with outer rings and holes\n                    if (!linearRingIsClockwise(flatCoordinates, offset, end, 2)) {\n                        endss.push(ends.slice(prevEndIndex, i + 1));\n                    }\n                    else {\n                        if (endss.length === 0) {\n                            continue;\n                        }\n                        endss[endss.length - 1].push(ends[prevEndIndex]);\n                    }\n                    prevEndIndex = i + 1;\n                    offset = end;\n                }\n                if (endss.length > 1) {\n                    geom = new MultiPolygon(flatCoordinates, GeometryLayout.XY, endss);\n                }\n                else {\n                    geom = new Polygon(flatCoordinates, GeometryLayout.XY, ends);\n                }\n            }\n            else {\n                geom =\n                    geometryType === GeometryType.POINT\n                        ? new Point(flatCoordinates, GeometryLayout.XY)\n                        : geometryType === GeometryType.LINE_STRING\n                            ? new LineString(flatCoordinates, GeometryLayout.XY)\n                            : geometryType === GeometryType.POLYGON\n                                ? new Polygon(flatCoordinates, GeometryLayout.XY, ends)\n                                : geometryType === GeometryType.MULTI_POINT\n                                    ? new MultiPoint(flatCoordinates, GeometryLayout.XY)\n                                    : geometryType === GeometryType.MULTI_LINE_STRING\n                                        ? new MultiLineString(flatCoordinates, GeometryLayout.XY, ends)\n                                        : null;\n            }\n            var ctor = /** @type {typeof import(\"../Feature.js\").default} */ (this.featureClass_);\n            feature = new ctor();\n            if (this.geometryName_) {\n                feature.setGeometryName(this.geometryName_);\n            }\n            var geometry = transformGeometryWithOptions(geom, false, options);\n            feature.setGeometry(geometry);\n            feature.setId(id);\n            feature.setProperties(values, true);\n        }\n        return feature;\n    };\n    /**\n     * @return {import(\"./FormatType.js\").default} Format.\n     */\n    MVT.prototype.getType = function () {\n        return FormatType.ARRAY_BUFFER;\n    };\n    /**\n     * Read all features.\n     *\n     * @param {ArrayBuffer} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @return {Array<import(\"../Feature.js\").FeatureLike>} Features.\n     * @api\n     */\n    MVT.prototype.readFeatures = function (source, opt_options) {\n        var layers = this.layers_;\n        var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (this.adaptOptions(opt_options));\n        var dataProjection = get(options.dataProjection);\n        dataProjection.setWorldExtent(options.extent);\n        options.dataProjection = dataProjection;\n        var pbf = new PBF(/** @type {ArrayBuffer} */ (source));\n        var pbfLayers = pbf.readFields(layersPBFReader, {});\n        var features = [];\n        for (var name_1 in pbfLayers) {\n            if (layers && layers.indexOf(name_1) == -1) {\n                continue;\n            }\n            var pbfLayer = pbfLayers[name_1];\n            var extent = pbfLayer ? [0, 0, pbfLayer.extent, pbfLayer.extent] : null;\n            dataProjection.setExtent(extent);\n            for (var i = 0, ii = pbfLayer.length; i < ii; ++i) {\n                var rawFeature = readRawFeature(pbf, pbfLayer, i);\n                features.push(this.createFeature_(pbf, rawFeature, options));\n            }\n        }\n        return features;\n    };\n    /**\n     * Read the projection from the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     * @api\n     */\n    MVT.prototype.readProjection = function (source) {\n        return this.dataProjection;\n    };\n    /**\n     * Sets the layers that features will be read from.\n     * @param {Array<string>} layers Layers.\n     * @api\n     */\n    MVT.prototype.setLayers = function (layers) {\n        this.layers_ = layers;\n    };\n    return MVT;\n}(FeatureFormat));\n/**\n * Reader callback for parsing layers.\n * @param {number} tag The tag.\n * @param {Object} layers The layers object.\n * @param {PBF} pbf The PBF.\n */\nfunction layersPBFReader(tag, layers, pbf) {\n    if (tag === 3) {\n        var layer = {\n            keys: [],\n            values: [],\n            features: [],\n        };\n        var end = pbf.readVarint() + pbf.pos;\n        pbf.readFields(layerPBFReader, layer, end);\n        layer.length = layer.features.length;\n        if (layer.length) {\n            layers[layer.name] = layer;\n        }\n    }\n}\n/**\n * Reader callback for parsing layer.\n * @param {number} tag The tag.\n * @param {Object} layer The layer object.\n * @param {PBF} pbf The PBF.\n */\nfunction layerPBFReader(tag, layer, pbf) {\n    if (tag === 15) {\n        layer.version = pbf.readVarint();\n    }\n    else if (tag === 1) {\n        layer.name = pbf.readString();\n    }\n    else if (tag === 5) {\n        layer.extent = pbf.readVarint();\n    }\n    else if (tag === 2) {\n        layer.features.push(pbf.pos);\n    }\n    else if (tag === 3) {\n        layer.keys.push(pbf.readString());\n    }\n    else if (tag === 4) {\n        var value = null;\n        var end = pbf.readVarint() + pbf.pos;\n        while (pbf.pos < end) {\n            tag = pbf.readVarint() >> 3;\n            value =\n                tag === 1\n                    ? pbf.readString()\n                    : tag === 2\n                        ? pbf.readFloat()\n                        : tag === 3\n                            ? pbf.readDouble()\n                            : tag === 4\n                                ? pbf.readVarint64()\n                                : tag === 5\n                                    ? pbf.readVarint()\n                                    : tag === 6\n                                        ? pbf.readSVarint()\n                                        : tag === 7\n                                            ? pbf.readBoolean()\n                                            : null;\n        }\n        layer.values.push(value);\n    }\n}\n/**\n * Reader callback for parsing feature.\n * @param {number} tag The tag.\n * @param {Object} feature The feature object.\n * @param {PBF} pbf The PBF.\n */\nfunction featurePBFReader(tag, feature, pbf) {\n    if (tag == 1) {\n        feature.id = pbf.readVarint();\n    }\n    else if (tag == 2) {\n        var end = pbf.readVarint() + pbf.pos;\n        while (pbf.pos < end) {\n            var key = feature.layer.keys[pbf.readVarint()];\n            var value = feature.layer.values[pbf.readVarint()];\n            feature.properties[key] = value;\n        }\n    }\n    else if (tag == 3) {\n        feature.type = pbf.readVarint();\n    }\n    else if (tag == 4) {\n        feature.geometry = pbf.pos;\n    }\n}\n/**\n * Read a raw feature from the pbf offset stored at index `i` in the raw layer.\n * @param {PBF} pbf PBF.\n * @param {Object} layer Raw layer.\n * @param {number} i Index of the feature in the raw layer's `features` array.\n * @return {Object} Raw feature.\n */\nfunction readRawFeature(pbf, layer, i) {\n    pbf.pos = layer.features[i];\n    var end = pbf.readVarint() + pbf.pos;\n    var feature = {\n        layer: layer,\n        type: 0,\n        properties: {},\n    };\n    pbf.readFields(featurePBFReader, feature, end);\n    return feature;\n}\n/**\n * @param {number} type The raw feature's geometry type\n * @param {number} numEnds Number of ends of the flat coordinates of the\n * geometry.\n * @return {import(\"../geom/GeometryType.js\").default} The geometry type.\n */\nfunction getGeometryType(type, numEnds) {\n    /** @type {import(\"../geom/GeometryType.js\").default} */\n    var geometryType;\n    if (type === 1) {\n        geometryType =\n            numEnds === 1 ? GeometryType.POINT : GeometryType.MULTI_POINT;\n    }\n    else if (type === 2) {\n        geometryType =\n            numEnds === 1 ? GeometryType.LINE_STRING : GeometryType.MULTI_LINE_STRING;\n    }\n    else if (type === 3) {\n        geometryType = GeometryType.POLYGON;\n        // MultiPolygon not relevant for rendering - winding order determines\n        // outer rings of polygons.\n    }\n    return geometryType;\n}\nexport default MVT;\n//# sourceMappingURL=MVT.js.map","/**\n * @module ol/format/GeoJSON\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Feature from '../Feature.js';\nimport GeometryCollection from '../geom/GeometryCollection.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport JSONFeature from './JSONFeature.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport { assert } from '../asserts.js';\nimport { assign, isEmpty } from '../obj.js';\nimport { get as getProjection } from '../proj.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * @typedef {import(\"geojson\").GeoJSON} GeoJSONObject\n * @typedef {import(\"geojson\").Feature} GeoJSONFeature\n * @typedef {import(\"geojson\").FeatureCollection} GeoJSONFeatureCollection\n * @typedef {import(\"geojson\").Geometry} GeoJSONGeometry\n * @typedef {import(\"geojson\").Point} GeoJSONPoint\n * @typedef {import(\"geojson\").LineString} GeoJSONLineString\n * @typedef {import(\"geojson\").Polygon} GeoJSONPolygon\n * @typedef {import(\"geojson\").MultiPoint} GeoJSONMultiPoint\n * @typedef {import(\"geojson\").MultiLineString} GeoJSONMultiLineString\n * @typedef {import(\"geojson\").MultiPolygon} GeoJSONMultiPolygon\n * @typedef {import(\"geojson\").GeometryCollection} GeoJSONGeometryCollection\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection='EPSG:4326'] Default data projection.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection for features read or\n * written by the format.  Options passed to read or write methods will take precedence.\n * @property {string} [geometryName] Geometry name to use when creating features.\n * @property {boolean} [extractGeometryName=false] Certain GeoJSON providers include\n * the geometry_name field in the feature GeoJSON. If set to `true` the GeoJSON reader\n * will look for that field to set the geometry name. If both this field is set to `true`\n * and a `geometryName` is provided, the `geometryName` will take precedence.\n */\n/**\n * @classdesc\n * Feature format for reading and writing data in the GeoJSON format.\n *\n * @api\n */\nvar GeoJSON = /** @class */ (function (_super) {\n    __extends(GeoJSON, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function GeoJSON(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this) || this;\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection(options.dataProjection ? options.dataProjection : 'EPSG:4326');\n        if (options.featureProjection) {\n            _this.defaultFeatureProjection = getProjection(options.featureProjection);\n        }\n        /**\n         * Name of the geometry attribute for features.\n         * @type {string|undefined}\n         * @private\n         */\n        _this.geometryName_ = options.geometryName;\n        /**\n         * Look for the geometry name in the feature GeoJSON\n         * @type {boolean|undefined}\n         * @private\n         */\n        _this.extractGeometryName_ = options.extractGeometryName;\n        return _this;\n    }\n    /**\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @protected\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    GeoJSON.prototype.readFeatureFromObject = function (object, opt_options) {\n        /**\n         * @type {GeoJSONFeature}\n         */\n        var geoJSONFeature = null;\n        if (object['type'] === 'Feature') {\n            geoJSONFeature = /** @type {GeoJSONFeature} */ (object);\n        }\n        else {\n            geoJSONFeature = {\n                'type': 'Feature',\n                'geometry': /** @type {GeoJSONGeometry} */ (object),\n                'properties': null,\n            };\n        }\n        var geometry = readGeometry(geoJSONFeature['geometry'], opt_options);\n        var feature = new Feature();\n        if (this.geometryName_) {\n            feature.setGeometryName(this.geometryName_);\n        }\n        else if (this.extractGeometryName_ &&\n            'geometry_name' in geoJSONFeature !== undefined) {\n            feature.setGeometryName(geoJSONFeature['geometry_name']);\n        }\n        feature.setGeometry(geometry);\n        if ('id' in geoJSONFeature) {\n            feature.setId(geoJSONFeature['id']);\n        }\n        if (geoJSONFeature['properties']) {\n            feature.setProperties(geoJSONFeature['properties'], true);\n        }\n        return feature;\n    };\n    /**\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @protected\n     * @return {Array<Feature>} Features.\n     */\n    GeoJSON.prototype.readFeaturesFromObject = function (object, opt_options) {\n        var geoJSONObject = /** @type {GeoJSONObject} */ (object);\n        /** @type {Array<import(\"../Feature.js\").default>} */\n        var features = null;\n        if (geoJSONObject['type'] === 'FeatureCollection') {\n            var geoJSONFeatureCollection = /** @type {GeoJSONFeatureCollection} */ (object);\n            features = [];\n            var geoJSONFeatures = geoJSONFeatureCollection['features'];\n            for (var i = 0, ii = geoJSONFeatures.length; i < ii; ++i) {\n                features.push(this.readFeatureFromObject(geoJSONFeatures[i], opt_options));\n            }\n        }\n        else {\n            features = [this.readFeatureFromObject(object, opt_options)];\n        }\n        return features;\n    };\n    /**\n     * @param {GeoJSONGeometry} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    GeoJSON.prototype.readGeometryFromObject = function (object, opt_options) {\n        return readGeometry(object, opt_options);\n    };\n    /**\n     * @param {Object} object Object.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    GeoJSON.prototype.readProjectionFromObject = function (object) {\n        var crs = object['crs'];\n        var projection;\n        if (crs) {\n            if (crs['type'] == 'name') {\n                projection = getProjection(crs['properties']['name']);\n            }\n            else if (crs['type'] === 'EPSG') {\n                projection = getProjection('EPSG:' + crs['properties']['code']);\n            }\n            else {\n                assert(false, 36); // Unknown SRS type\n            }\n        }\n        else {\n            projection = this.dataProjection;\n        }\n        return /** @type {import(\"../proj/Projection.js\").default} */ (projection);\n    };\n    /**\n     * Encode a feature as a GeoJSON Feature object.\n     *\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @return {GeoJSONFeature} Object.\n     * @api\n     */\n    GeoJSON.prototype.writeFeatureObject = function (feature, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        /** @type {GeoJSONFeature} */\n        var object = {\n            'type': 'Feature',\n            geometry: null,\n            properties: null,\n        };\n        var id = feature.getId();\n        if (id !== undefined) {\n            object.id = id;\n        }\n        if (!feature.hasProperties()) {\n            return object;\n        }\n        var properties = feature.getProperties();\n        var geometry = feature.getGeometry();\n        if (geometry) {\n            object.geometry = writeGeometry(geometry, opt_options);\n            delete properties[feature.getGeometryName()];\n        }\n        if (!isEmpty(properties)) {\n            object.properties = properties;\n        }\n        return object;\n    };\n    /**\n     * Encode an array of features as a GeoJSON object.\n     *\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @return {GeoJSONFeatureCollection} GeoJSON Object.\n     * @api\n     */\n    GeoJSON.prototype.writeFeaturesObject = function (features, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        var objects = [];\n        for (var i = 0, ii = features.length; i < ii; ++i) {\n            objects.push(this.writeFeatureObject(features[i], opt_options));\n        }\n        return {\n            type: 'FeatureCollection',\n            features: objects,\n        };\n    };\n    /**\n     * Encode a geometry as a GeoJSON object.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @return {GeoJSONGeometry|GeoJSONGeometryCollection} Object.\n     * @api\n     */\n    GeoJSON.prototype.writeGeometryObject = function (geometry, opt_options) {\n        return writeGeometry(geometry, this.adaptOptions(opt_options));\n    };\n    return GeoJSON;\n}(JSONFeature));\n/**\n * @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\nfunction readGeometry(object, opt_options) {\n    if (!object) {\n        return null;\n    }\n    /**\n     * @type {import(\"../geom/Geometry.js\").default}\n     */\n    var geometry;\n    switch (object['type']) {\n        case GeometryType.POINT: {\n            geometry = readPointGeometry(/** @type {GeoJSONPoint} */ (object));\n            break;\n        }\n        case GeometryType.LINE_STRING: {\n            geometry = readLineStringGeometry(\n            /** @type {GeoJSONLineString} */ (object));\n            break;\n        }\n        case GeometryType.POLYGON: {\n            geometry = readPolygonGeometry(/** @type {GeoJSONPolygon} */ (object));\n            break;\n        }\n        case GeometryType.MULTI_POINT: {\n            geometry = readMultiPointGeometry(\n            /** @type {GeoJSONMultiPoint} */ (object));\n            break;\n        }\n        case GeometryType.MULTI_LINE_STRING: {\n            geometry = readMultiLineStringGeometry(\n            /** @type {GeoJSONMultiLineString} */ (object));\n            break;\n        }\n        case GeometryType.MULTI_POLYGON: {\n            geometry = readMultiPolygonGeometry(\n            /** @type {GeoJSONMultiPolygon} */ (object));\n            break;\n        }\n        case GeometryType.GEOMETRY_COLLECTION: {\n            geometry = readGeometryCollectionGeometry(\n            /** @type {GeoJSONGeometryCollection} */ (object));\n            break;\n        }\n        default: {\n            throw new Error('Unsupported GeoJSON type: ' + object.type);\n        }\n    }\n    return transformGeometryWithOptions(geometry, false, opt_options);\n}\n/**\n * @param {GeoJSONGeometryCollection} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n * @return {GeometryCollection} Geometry collection.\n */\nfunction readGeometryCollectionGeometry(object, opt_options) {\n    var geometries = object['geometries'].map(\n    /**\n     * @param {GeoJSONGeometry} geometry Geometry.\n     * @return {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     */\n    function (geometry) {\n        return readGeometry(geometry, opt_options);\n    });\n    return new GeometryCollection(geometries);\n}\n/**\n * @param {GeoJSONPoint} object Object.\n * @return {Point} Point.\n */\nfunction readPointGeometry(object) {\n    return new Point(object['coordinates']);\n}\n/**\n * @param {GeoJSONLineString} object Object.\n * @return {LineString} LineString.\n */\nfunction readLineStringGeometry(object) {\n    return new LineString(object['coordinates']);\n}\n/**\n * @param {GeoJSONMultiLineString} object Object.\n * @return {MultiLineString} MultiLineString.\n */\nfunction readMultiLineStringGeometry(object) {\n    return new MultiLineString(object['coordinates']);\n}\n/**\n * @param {GeoJSONMultiPoint} object Object.\n * @return {MultiPoint} MultiPoint.\n */\nfunction readMultiPointGeometry(object) {\n    return new MultiPoint(object['coordinates']);\n}\n/**\n * @param {GeoJSONMultiPolygon} object Object.\n * @return {MultiPolygon} MultiPolygon.\n */\nfunction readMultiPolygonGeometry(object) {\n    return new MultiPolygon(object['coordinates']);\n}\n/**\n * @param {GeoJSONPolygon} object Object.\n * @return {Polygon} Polygon.\n */\nfunction readPolygonGeometry(object) {\n    return new Polygon(object['coordinates']);\n}\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeGeometry(geometry, opt_options) {\n    geometry = transformGeometryWithOptions(geometry, true, opt_options);\n    var type = geometry.getType();\n    /** @type {GeoJSONGeometry} */\n    var geoJSON;\n    switch (type) {\n        case GeometryType.POINT: {\n            geoJSON = writePointGeometry(\n            /** @type {Point} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.LINE_STRING: {\n            geoJSON = writeLineStringGeometry(\n            /** @type {LineString} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.POLYGON: {\n            geoJSON = writePolygonGeometry(\n            /** @type {Polygon} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.MULTI_POINT: {\n            geoJSON = writeMultiPointGeometry(\n            /** @type {MultiPoint} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.MULTI_LINE_STRING: {\n            geoJSON = writeMultiLineStringGeometry(\n            /** @type {MultiLineString} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.MULTI_POLYGON: {\n            geoJSON = writeMultiPolygonGeometry(\n            /** @type {MultiPolygon} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.GEOMETRY_COLLECTION: {\n            geoJSON = writeGeometryCollectionGeometry(\n            /** @type {GeometryCollection} */ (geometry), opt_options);\n            break;\n        }\n        case GeometryType.CIRCLE: {\n            geoJSON = {\n                type: 'GeometryCollection',\n                geometries: [],\n            };\n            break;\n        }\n        default: {\n            throw new Error('Unsupported geometry type: ' + type);\n        }\n    }\n    return geoJSON;\n}\n/**\n * @param {GeometryCollection} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n * @return {GeoJSONGeometryCollection} GeoJSON geometry collection.\n */\nfunction writeGeometryCollectionGeometry(geometry, opt_options) {\n    var geometries = geometry.getGeometriesArray().map(function (geometry) {\n        var options = assign({}, opt_options);\n        delete options.featureProjection;\n        return writeGeometry(geometry, options);\n    });\n    return {\n        type: 'GeometryCollection',\n        geometries: geometries,\n    };\n}\n/**\n * @param {LineString} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeLineStringGeometry(geometry, opt_options) {\n    return {\n        type: 'LineString',\n        coordinates: geometry.getCoordinates(),\n    };\n}\n/**\n * @param {MultiLineString} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiLineStringGeometry(geometry, opt_options) {\n    return {\n        type: 'MultiLineString',\n        coordinates: geometry.getCoordinates(),\n    };\n}\n/**\n * @param {MultiPoint} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiPointGeometry(geometry, opt_options) {\n    return {\n        type: 'MultiPoint',\n        coordinates: geometry.getCoordinates(),\n    };\n}\n/**\n * @param {MultiPolygon} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiPolygonGeometry(geometry, opt_options) {\n    var right;\n    if (opt_options) {\n        right = opt_options.rightHanded;\n    }\n    return {\n        type: 'MultiPolygon',\n        coordinates: geometry.getCoordinates(right),\n    };\n}\n/**\n * @param {Point} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writePointGeometry(geometry, opt_options) {\n    return {\n        type: 'Point',\n        coordinates: geometry.getCoordinates(),\n    };\n}\n/**\n * @param {Polygon} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writePolygonGeometry(geometry, opt_options) {\n    var right;\n    if (opt_options) {\n        right = opt_options.rightHanded;\n    }\n    return {\n        type: 'Polygon',\n        coordinates: geometry.getCoordinates(right),\n    };\n}\nexport default GeoJSON;\n//# sourceMappingURL=GeoJSON.js.map","/**\n * @module ol/source/TileEventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    /**\n     * Triggered when a tile starts loading.\n     * @event module:ol/source/Tile.TileSourceEvent#tileloadstart\n     * @api\n     */\n    TILELOADSTART: 'tileloadstart',\n    /**\n     * Triggered when a tile finishes loading, either when its data is loaded,\n     * or when loading was aborted because the tile is no longer needed.\n     * @event module:ol/source/Tile.TileSourceEvent#tileloadend\n     * @api\n     */\n    TILELOADEND: 'tileloadend',\n    /**\n     * Triggered if tile loading results in an error.\n     * @event module:ol/source/Tile.TileSourceEvent#tileloaderror\n     * @api\n     */\n    TILELOADERROR: 'tileloaderror',\n};\n/**\n * @typedef {'tileloadstart'|'tileloadend'|'tileloaderror'} TileSourceEventTypes\n */\n//# sourceMappingURL=TileEventType.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/source/UrlTile\n */\nimport TileEventType from './TileEventType.js';\nimport TileSource, { TileSourceEvent } from './Tile.js';\nimport TileState from '../TileState.js';\nimport { createFromTemplates, expandUrl } from '../tileurlfunction.js';\nimport { getKeyZXY } from '../tilecoord.js';\nimport { getUid } from '../util.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Cache size.\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {import(\"./State.js\").default} [state] State.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] TileGrid.\n * @property {import(\"../Tile.js\").LoadFunction} tileLoadFunction TileLoadFunction.\n * @property {number} [tilePixelRatio] TilePixelRatio.\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] TileUrlFunction.\n * @property {string} [url] Url.\n * @property {Array<string>} [urls] Urls.\n * @property {boolean} [wrapX=true] WrapX.\n * @property {number} [transition] Transition.\n * @property {string} [key] Key.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0] ZDirection.\n */\n/**\n * @classdesc\n * Base class for sources providing tiles divided into a tile grid over http.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n */\nvar UrlTile = /** @class */ (function (_super) {\n    __extends(UrlTile, _super);\n    /**\n     * @param {Options} options Image tile options.\n     */\n    function UrlTile(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            opaque: options.opaque,\n            projection: options.projection,\n            state: options.state,\n            tileGrid: options.tileGrid,\n            tilePixelRatio: options.tilePixelRatio,\n            wrapX: options.wrapX,\n            transition: options.transition,\n            key: options.key,\n            attributionsCollapsible: options.attributionsCollapsible,\n            zDirection: options.zDirection,\n        }) || this;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.generateTileUrlFunction_ =\n            _this.tileUrlFunction === UrlTile.prototype.tileUrlFunction;\n        /**\n         * @protected\n         * @type {import(\"../Tile.js\").LoadFunction}\n         */\n        _this.tileLoadFunction = options.tileLoadFunction;\n        if (options.tileUrlFunction) {\n            _this.tileUrlFunction = options.tileUrlFunction;\n        }\n        /**\n         * @protected\n         * @type {!Array<string>|null}\n         */\n        _this.urls = null;\n        if (options.urls) {\n            _this.setUrls(options.urls);\n        }\n        else if (options.url) {\n            _this.setUrl(options.url);\n        }\n        /**\n         * @private\n         * @type {!Object<string, boolean>}\n         */\n        _this.tileLoadingKeys_ = {};\n        return _this;\n    }\n    /**\n     * Return the tile load function of the source.\n     * @return {import(\"../Tile.js\").LoadFunction} TileLoadFunction\n     * @api\n     */\n    UrlTile.prototype.getTileLoadFunction = function () {\n        return this.tileLoadFunction;\n    };\n    /**\n     * Return the tile URL function of the source.\n     * @return {import(\"../Tile.js\").UrlFunction} TileUrlFunction\n     * @api\n     */\n    UrlTile.prototype.getTileUrlFunction = function () {\n        return Object.getPrototypeOf(this).tileUrlFunction === this.tileUrlFunction\n            ? this.tileUrlFunction.bind(this)\n            : this.tileUrlFunction;\n    };\n    /**\n     * Return the URLs used for this source.\n     * When a tileUrlFunction is used instead of url or urls,\n     * null will be returned.\n     * @return {!Array<string>|null} URLs.\n     * @api\n     */\n    UrlTile.prototype.getUrls = function () {\n        return this.urls;\n    };\n    /**\n     * Handle tile change events.\n     * @param {import(\"../events/Event.js\").default} event Event.\n     * @protected\n     */\n    UrlTile.prototype.handleTileChange = function (event) {\n        var tile = /** @type {import(\"../Tile.js\").default} */ (event.target);\n        var uid = getUid(tile);\n        var tileState = tile.getState();\n        var type;\n        if (tileState == TileState.LOADING) {\n            this.tileLoadingKeys_[uid] = true;\n            type = TileEventType.TILELOADSTART;\n        }\n        else if (uid in this.tileLoadingKeys_) {\n            delete this.tileLoadingKeys_[uid];\n            type =\n                tileState == TileState.ERROR\n                    ? TileEventType.TILELOADERROR\n                    : tileState == TileState.LOADED\n                        ? TileEventType.TILELOADEND\n                        : undefined;\n        }\n        if (type != undefined) {\n            this.dispatchEvent(new TileSourceEvent(type, tile));\n        }\n    };\n    /**\n     * Set the tile load function of the source.\n     * @param {import(\"../Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n     * @api\n     */\n    UrlTile.prototype.setTileLoadFunction = function (tileLoadFunction) {\n        this.tileCache.clear();\n        this.tileLoadFunction = tileLoadFunction;\n        this.changed();\n    };\n    /**\n     * Set the tile URL function of the source.\n     * @param {import(\"../Tile.js\").UrlFunction} tileUrlFunction Tile URL function.\n     * @param {string} [key] Optional new tile key for the source.\n     * @api\n     */\n    UrlTile.prototype.setTileUrlFunction = function (tileUrlFunction, key) {\n        this.tileUrlFunction = tileUrlFunction;\n        this.tileCache.pruneExceptNewestZ();\n        if (typeof key !== 'undefined') {\n            this.setKey(key);\n        }\n        else {\n            this.changed();\n        }\n    };\n    /**\n     * Set the URL to use for requests.\n     * @param {string} url URL.\n     * @api\n     */\n    UrlTile.prototype.setUrl = function (url) {\n        var urls = expandUrl(url);\n        this.urls = urls;\n        this.setUrls(urls);\n    };\n    /**\n     * Set the URLs to use for requests.\n     * @param {Array<string>} urls URLs.\n     * @api\n     */\n    UrlTile.prototype.setUrls = function (urls) {\n        this.urls = urls;\n        var key = urls.join('\\n');\n        if (this.generateTileUrlFunction_) {\n            this.setTileUrlFunction(createFromTemplates(urls, this.tileGrid), key);\n        }\n        else {\n            this.setKey(key);\n        }\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {string|undefined} Tile URL.\n     */\n    UrlTile.prototype.tileUrlFunction = function (tileCoord, pixelRatio, projection) {\n        return undefined;\n    };\n    /**\n     * Marks a tile coord as being used, without triggering a load.\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     */\n    UrlTile.prototype.useTile = function (z, x, y) {\n        var tileCoordKey = getKeyZXY(z, x, y);\n        if (this.tileCache.containsKey(tileCoordKey)) {\n            this.tileCache.get(tileCoordKey);\n        }\n    };\n    return UrlTile;\n}(TileSource));\nexport default UrlTile;\n//# sourceMappingURL=UrlTile.js.map","import json from \"../../package.json\";\r\nconst version = json.version;\r\n\r\nexport const getVersion = function () { return version; };\r\n\r\nexport const loginSupportsPost = function (pmaCoreVersion) {\r\n    let usePost = false;\r\n    if (pmaCoreVersion && pmaCoreVersion !== undefined && pmaCoreVersion !== null && pmaCoreVersion !== \"\") {\r\n        const version = pmaCoreVersion.split(\".\").map(x => parseInt(x));\r\n        if (version.length === 4 && (version[0] > 2 || (version[0] === 2 && version[3] >= 1836))) {\r\n            usePost = true;\r\n        }\r\n    }\r\n\r\n    return usePost;\r\n};\r\n","!function(t,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(t=t||self).RBush=i()}(this,function(){\"use strict\";function t(t,r,e,a,h){!function t(n,r,e,a,h){for(;a>e;){if(a-e>600){var o=a-e+1,s=r-e+1,l=Math.log(o),f=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*f*(o-f)/o)*(s-o/2<0?-1:1),m=Math.max(e,Math.floor(r-s*f/o+u)),c=Math.min(a,Math.floor(r+(o-s)*f/o+u));t(n,r,m,c,h)}var p=n[r],d=e,x=a;for(i(n,e,r),h(n[a],p)>0&&i(n,e,a);d<x;){for(i(n,d,x),d++,x--;h(n[d],p)<0;)d++;for(;h(n[x],p)>0;)x--}0===h(n[e],p)?i(n,e,x):i(n,++x,a),x<=r&&(e=x+1),r<=x&&(a=x-1)}}(t,r,e||0,a||t.length-1,h||n)}function i(t,i,n){var r=t[i];t[i]=t[n],t[n]=r}function n(t,i){return t<i?-1:t>i?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function e(t,i,n){if(!n)return i.indexOf(t);for(var r=0;r<i.length;r++)if(n(t,i[r]))return r;return-1}function a(t,i){h(t,0,t.children.length,i,t)}function h(t,i,n,r,e){e||(e=p(null)),e.minX=1/0,e.minY=1/0,e.maxX=-1/0,e.maxY=-1/0;for(var a=i;a<n;a++){var h=t.children[a];o(e,t.leaf?r(h):h)}return e}function o(t,i){return t.minX=Math.min(t.minX,i.minX),t.minY=Math.min(t.minY,i.minY),t.maxX=Math.max(t.maxX,i.maxX),t.maxY=Math.max(t.maxY,i.maxY),t}function s(t,i){return t.minX-i.minX}function l(t,i){return t.minY-i.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,i){return t.minX<=i.minX&&t.minY<=i.minY&&i.maxX<=t.maxX&&i.maxY<=t.maxY}function c(t,i){return i.minX<=t.maxX&&i.minY<=t.maxY&&i.maxX>=t.minX&&i.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(i,n,r,e,a){for(var h=[n,r];h.length;)if(!((r=h.pop())-(n=h.pop())<=e)){var o=n+Math.ceil((r-n)/e/2)*e;t(i,o,n,r,a),h.push(n,o,o,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var i=this.data,n=[];if(!c(t,i))return n;for(var r=this.toBBox,e=[];i;){for(var a=0;a<i.children.length;a++){var h=i.children[a],o=i.leaf?r(h):h;c(t,o)&&(i.leaf?n.push(h):m(t,o)?this._all(h,n):e.push(h))}i=e.pop()}return n},r.prototype.collides=function(t){var i=this.data;if(!c(t,i))return!1;for(var n=[];i;){for(var r=0;r<i.children.length;r++){var e=i.children[r],a=i.leaf?this.toBBox(e):e;if(c(t,a)){if(i.leaf||m(t,a))return!0;n.push(e)}}i=n.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var i=0;i<t.length;i++)this.insert(t[i]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=p([]),this},r.prototype.remove=function(t,i){if(!t)return this;for(var n,r,a,h=this.data,o=this.toBBox(t),s=[],l=[];h||s.length;){if(h||(h=s.pop(),r=s[s.length-1],n=l.pop(),a=!0),h.leaf){var f=e(t,h.children,i);if(-1!==f)return h.children.splice(f,1),s.push(h),this._condense(s),this}a||h.leaf||!m(h,o)?r?(n++,h=r.children[n],a=!1):h=null:(s.push(h),l.push(n),n=0,r=h,h=h.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,i){return t.minX-i.minX},r.prototype.compareMinY=function(t,i){return t.minY-i.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,i){for(var n=[];t;)t.leaf?i.push.apply(i,t.children):n.push.apply(n,t.children),t=n.pop();return i},r.prototype._build=function(t,i,n,r){var e,h=n-i+1,o=this._maxEntries;if(h<=o)return a(e=p(t.slice(i,n+1)),this.toBBox),e;r||(r=Math.ceil(Math.log(h)/Math.log(o)),o=Math.ceil(h/Math.pow(o,r-1))),(e=p([])).leaf=!1,e.height=r;var s=Math.ceil(h/o),l=s*Math.ceil(Math.sqrt(o));d(t,i,n,l,this.compareMinX);for(var f=i;f<=n;f+=l){var u=Math.min(f+l-1,n);d(t,f,u,s,this.compareMinY);for(var m=f;m<=u;m+=s){var c=Math.min(m+s-1,u);e.children.push(this._build(t,m,c,r-1))}}return a(e,this.toBBox),e},r.prototype._chooseSubtree=function(t,i,n,r){for(;r.push(i),!i.leaf&&r.length-1!==n;){for(var e=1/0,a=1/0,h=void 0,o=0;o<i.children.length;o++){var s=i.children[o],l=f(s),u=(m=t,c=s,(Math.max(c.maxX,m.maxX)-Math.min(c.minX,m.minX))*(Math.max(c.maxY,m.maxY)-Math.min(c.minY,m.minY))-l);u<a?(a=u,e=l<e?l:e,h=s):u===a&&l<e&&(e=l,h=s)}i=h||i.children[0]}var m,c;return i},r.prototype._insert=function(t,i,n){var r=n?t:this.toBBox(t),e=[],a=this._chooseSubtree(r,this.data,i,e);for(a.children.push(t),o(a,r);i>=0&&e[i].children.length>this._maxEntries;)this._split(e,i),i--;this._adjustParentBBoxes(r,e,i)},r.prototype._split=function(t,i){var n=t[i],r=n.children.length,e=this._minEntries;this._chooseSplitAxis(n,e,r);var h=this._chooseSplitIndex(n,e,r),o=p(n.children.splice(h,n.children.length-h));o.height=n.height,o.leaf=n.leaf,a(n,this.toBBox),a(o,this.toBBox),i?t[i-1].children.push(o):this._splitRoot(n,o)},r.prototype._splitRoot=function(t,i){this.data=p([t,i]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,i,n){for(var r,e,a,o,s,l,u,m=1/0,c=1/0,p=i;p<=n-i;p++){var d=h(t,0,p,this.toBBox),x=h(t,p,n,this.toBBox),v=(e=d,a=x,o=void 0,s=void 0,l=void 0,u=void 0,o=Math.max(e.minX,a.minX),s=Math.max(e.minY,a.minY),l=Math.min(e.maxX,a.maxX),u=Math.min(e.maxY,a.maxY),Math.max(0,l-o)*Math.max(0,u-s)),M=f(d)+f(x);v<m?(m=v,r=p,c=M<c?M:c):v===m&&M<c&&(c=M,r=p)}return r||n-i},r.prototype._chooseSplitAxis=function(t,i,n){var r=t.leaf?this.compareMinX:s,e=t.leaf?this.compareMinY:l;this._allDistMargin(t,i,n,r)<this._allDistMargin(t,i,n,e)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,i,n,r){t.children.sort(r);for(var e=this.toBBox,a=h(t,0,i,e),s=h(t,n-i,n,e),l=u(a)+u(s),f=i;f<n-i;f++){var m=t.children[f];o(a,t.leaf?e(m):m),l+=u(a)}for(var c=n-i-1;c>=i;c--){var p=t.children[c];o(s,t.leaf?e(p):p),l+=u(s)}return l},r.prototype._adjustParentBBoxes=function(t,i,n){for(var r=n;r>=0;r--)o(i[r],t)},r.prototype._condense=function(t){for(var i=t.length-1,n=void 0;i>=0;i--)0===t[i].children.length?i>0?(n=t[i-1].children).splice(n.indexOf(t[i]),1):this.clear():a(t[i],this.toBBox)},r});\n","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/ImageBase\n */\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\nimport { abstract } from './util.js';\n/**\n * @abstract\n */\nvar ImageBase = /** @class */ (function (_super) {\n    __extends(ImageBase, _super);\n    /**\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {number|undefined} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"./ImageState.js\").default} state State.\n     */\n    function ImageBase(extent, resolution, pixelRatio, state) {\n        var _this = _super.call(this) || this;\n        /**\n         * @protected\n         * @type {import(\"./extent.js\").Extent}\n         */\n        _this.extent = extent;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.pixelRatio_ = pixelRatio;\n        /**\n         * @protected\n         * @type {number|undefined}\n         */\n        _this.resolution = resolution;\n        /**\n         * @protected\n         * @type {import(\"./ImageState.js\").default}\n         */\n        _this.state = state;\n        return _this;\n    }\n    /**\n     * @protected\n     */\n    ImageBase.prototype.changed = function () {\n        this.dispatchEvent(EventType.CHANGE);\n    };\n    /**\n     * @return {import(\"./extent.js\").Extent} Extent.\n     */\n    ImageBase.prototype.getExtent = function () {\n        return this.extent;\n    };\n    /**\n     * @abstract\n     * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n     */\n    ImageBase.prototype.getImage = function () {\n        return abstract();\n    };\n    /**\n     * @return {number} PixelRatio.\n     */\n    ImageBase.prototype.getPixelRatio = function () {\n        return this.pixelRatio_;\n    };\n    /**\n     * @return {number} Resolution.\n     */\n    ImageBase.prototype.getResolution = function () {\n        return /** @type {number} */ (this.resolution);\n    };\n    /**\n     * @return {import(\"./ImageState.js\").default} State.\n     */\n    ImageBase.prototype.getState = function () {\n        return this.state;\n    };\n    /**\n     * Load not yet loaded URI.\n     * @abstract\n     */\n    ImageBase.prototype.load = function () {\n        abstract();\n    };\n    return ImageBase;\n}(EventTarget));\nexport default ImageBase;\n//# sourceMappingURL=ImageBase.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/Layer\n */\nimport LayerRenderer from '../Layer.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport { apply as applyTransform, compose as composeTransform, create as createTransform, } from '../../transform.js';\nimport { containsCoordinate, getBottomLeft, getBottomRight, getTopLeft, getTopRight, } from '../../extent.js';\nimport { createCanvasContext2D } from '../../dom.js';\n/**\n * @abstract\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n * @extends {LayerRenderer<LayerType>}\n */\nvar CanvasLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasLayerRenderer, _super);\n    /**\n     * @param {LayerType} layer Layer.\n     */\n    function CanvasLayerRenderer(layer) {\n        var _this = _super.call(this, layer) || this;\n        /**\n         * @protected\n         * @type {HTMLElement}\n         */\n        _this.container = null;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.renderedResolution;\n        /**\n         * A temporary transform.  The values in this transform should only be used in a\n         * function that sets the values.\n         * @protected\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.tempTransform = createTransform();\n        /**\n         * The transform for rendered pixels to viewport CSS pixels.  This transform must\n         * be set when rendering a frame and may be used by other functions after rendering.\n         * @protected\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.pixelTransform = createTransform();\n        /**\n         * The transform for viewport CSS pixels to rendered pixels.  This transform must\n         * be set when rendering a frame and may be used by other functions after rendering.\n         * @protected\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.inversePixelTransform = createTransform();\n        /**\n         * @type {CanvasRenderingContext2D}\n         */\n        _this.context = null;\n        /**\n         * @type {boolean}\n         */\n        _this.containerReused = false;\n        return _this;\n    }\n    /**\n     * Get a rendering container from an existing target, if compatible.\n     * @param {HTMLElement} target Potential render target.\n     * @param {string} transform CSS Transform.\n     * @param {number} opacity Opacity.\n     */\n    CanvasLayerRenderer.prototype.useContainer = function (target, transform, opacity) {\n        var layerClassName = this.getLayer().getClassName();\n        var container, context;\n        if (target &&\n            target.style.opacity === '' &&\n            target.className === layerClassName) {\n            var canvas = target.firstElementChild;\n            if (canvas instanceof HTMLCanvasElement) {\n                context = canvas.getContext('2d');\n            }\n        }\n        if (context &&\n            (context.canvas.width === 0 ||\n                context.canvas.style.transform === transform)) {\n            // Container of the previous layer renderer can be used.\n            this.container = target;\n            this.context = context;\n            this.containerReused = true;\n        }\n        else if (this.containerReused) {\n            // Previously reused container cannot be used any more.\n            this.container = null;\n            this.context = null;\n            this.containerReused = false;\n        }\n        if (!this.container) {\n            container = document.createElement('div');\n            container.className = layerClassName;\n            var style = container.style;\n            style.position = 'absolute';\n            style.width = '100%';\n            style.height = '100%';\n            context = createCanvasContext2D();\n            var canvas = context.canvas;\n            container.appendChild(canvas);\n            style = canvas.style;\n            style.position = 'absolute';\n            style.left = '0';\n            style.transformOrigin = 'top left';\n            this.container = container;\n            this.context = context;\n        }\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {import(\"../../extent.js\").Extent} extent Clip extent.\n     * @protected\n     */\n    CanvasLayerRenderer.prototype.clipUnrotated = function (context, frameState, extent) {\n        var topLeft = getTopLeft(extent);\n        var topRight = getTopRight(extent);\n        var bottomRight = getBottomRight(extent);\n        var bottomLeft = getBottomLeft(extent);\n        applyTransform(frameState.coordinateToPixelTransform, topLeft);\n        applyTransform(frameState.coordinateToPixelTransform, topRight);\n        applyTransform(frameState.coordinateToPixelTransform, bottomRight);\n        applyTransform(frameState.coordinateToPixelTransform, bottomLeft);\n        var inverted = this.inversePixelTransform;\n        applyTransform(inverted, topLeft);\n        applyTransform(inverted, topRight);\n        applyTransform(inverted, bottomRight);\n        applyTransform(inverted, bottomLeft);\n        context.save();\n        context.beginPath();\n        context.moveTo(Math.round(topLeft[0]), Math.round(topLeft[1]));\n        context.lineTo(Math.round(topRight[0]), Math.round(topRight[1]));\n        context.lineTo(Math.round(bottomRight[0]), Math.round(bottomRight[1]));\n        context.lineTo(Math.round(bottomLeft[0]), Math.round(bottomLeft[1]));\n        context.clip();\n    };\n    /**\n     * @param {import(\"../../render/EventType.js\").default} type Event type.\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @private\n     */\n    CanvasLayerRenderer.prototype.dispatchRenderEvent_ = function (type, context, frameState) {\n        var layer = this.getLayer();\n        if (layer.hasListener(type)) {\n            var event_1 = new RenderEvent(type, this.inversePixelTransform, frameState, context);\n            layer.dispatchEvent(event_1);\n        }\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @protected\n     */\n    CanvasLayerRenderer.prototype.preRender = function (context, frameState) {\n        this.dispatchRenderEvent_(RenderEventType.PRERENDER, context, frameState);\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @protected\n     */\n    CanvasLayerRenderer.prototype.postRender = function (context, frameState) {\n        this.dispatchRenderEvent_(RenderEventType.POSTRENDER, context, frameState);\n    };\n    /**\n     * Creates a transform for rendering to an element that will be rotated after rendering.\n     * @param {import(\"../../coordinate.js\").Coordinate} center Center.\n     * @param {number} resolution Resolution.\n     * @param {number} rotation Rotation.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {number} width Width of the rendered element (in pixels).\n     * @param {number} height Height of the rendered element (in pixels).\n     * @param {number} offsetX Offset on the x-axis in view coordinates.\n     * @protected\n     * @return {!import(\"../../transform.js\").Transform} Transform.\n     */\n    CanvasLayerRenderer.prototype.getRenderTransform = function (center, resolution, rotation, pixelRatio, width, height, offsetX) {\n        var dx1 = width / 2;\n        var dy1 = height / 2;\n        var sx = pixelRatio / resolution;\n        var sy = -sx;\n        var dx2 = -center[0] + offsetX;\n        var dy2 = -center[1];\n        return composeTransform(this.tempTransform, dx1, dy1, sx, sy, -rotation, dx2, dy2);\n    };\n    /**\n     * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @return {Uint8ClampedArray|Uint8Array} The result.  If there is no data at the pixel\n     *    location, null will be returned.  If there is data, but pixel values cannot be\n     *    returned, and empty array will be returned.\n     */\n    CanvasLayerRenderer.prototype.getDataAtPixel = function (pixel, frameState, hitTolerance) {\n        var renderPixel = applyTransform(this.inversePixelTransform, pixel.slice());\n        var context = this.context;\n        var layer = this.getLayer();\n        var layerExtent = layer.getExtent();\n        if (layerExtent) {\n            var renderCoordinate = applyTransform(frameState.pixelToCoordinateTransform, pixel.slice());\n            /** get only data inside of the layer extent */\n            if (!containsCoordinate(layerExtent, renderCoordinate)) {\n                return null;\n            }\n        }\n        var data;\n        try {\n            var x = Math.round(renderPixel[0]);\n            var y = Math.round(renderPixel[1]);\n            var newCanvas = document.createElement('canvas');\n            var newContext = newCanvas.getContext('2d');\n            newCanvas.width = 1;\n            newCanvas.height = 1;\n            newContext.clearRect(0, 0, 1, 1);\n            newContext.drawImage(context.canvas, x, y, 1, 1, 0, 0, 1, 1);\n            data = newContext.getImageData(0, 0, 1, 1).data;\n        }\n        catch (err) {\n            if (err.name === 'SecurityError') {\n                // tainted canvas, we assume there is data at the given pixel (although there might not be)\n                return new Uint8Array();\n            }\n            return data;\n        }\n        if (data[3] === 0) {\n            return null;\n        }\n        return data;\n    };\n    return CanvasLayerRenderer;\n}(LayerRenderer));\nexport default CanvasLayerRenderer;\n//# sourceMappingURL=Layer.js.map","/**\n * @module ol/render/Event\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport Event from '../events/Event.js';\nvar RenderEvent = /** @class */ (function (_super) {\n    __extends(RenderEvent, _super);\n    /**\n     * @param {import(\"./EventType.js\").default} type Type.\n     * @param {import(\"../transform.js\").Transform} [opt_inversePixelTransform] Transform for\n     *     CSS pixels to rendered pixels.\n     * @param {import(\"../PluggableMap.js\").FrameState} [opt_frameState] Frame state.\n     * @param {?CanvasRenderingContext2D} [opt_context] Context.\n     */\n    function RenderEvent(type, opt_inversePixelTransform, opt_frameState, opt_context) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * Transform from CSS pixels (relative to the top-left corner of the map viewport)\n         * to rendered pixels on this event's `context`. Only available when a Canvas renderer is used, null otherwise.\n         * @type {import(\"../transform.js\").Transform|undefined}\n         * @api\n         */\n        _this.inversePixelTransform = opt_inversePixelTransform;\n        /**\n         * An object representing the current render frame state.\n         * @type {import(\"../PluggableMap.js\").FrameState|undefined}\n         * @api\n         */\n        _this.frameState = opt_frameState;\n        /**\n         * Canvas context. Not available when the event is dispatched by the map. Only available\n         * when a Canvas renderer is used, null otherwise.\n         * @type {CanvasRenderingContext2D|null|undefined}\n         * @api\n         */\n        _this.context = opt_context;\n        return _this;\n    }\n    return RenderEvent;\n}(Event));\nexport default RenderEvent;\n//# sourceMappingURL=Event.js.map","/**\n * @module ol/geom/flat/area\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRing(flatCoordinates, offset, end, stride) {\n    var twiceArea = 0;\n    var x1 = flatCoordinates[end - stride];\n    var y1 = flatCoordinates[end - stride + 1];\n    for (; offset < end; offset += stride) {\n        var x2 = flatCoordinates[offset];\n        var y2 = flatCoordinates[offset + 1];\n        twiceArea += y1 * x2 - x1 * y2;\n        x1 = x2;\n        y1 = y2;\n    }\n    return twiceArea / 2;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRings(flatCoordinates, offset, ends, stride) {\n    var area = 0;\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n        var end = ends[i];\n        area += linearRing(flatCoordinates, offset, end, stride);\n        offset = end;\n    }\n    return area;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n    var area = 0;\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        area += linearRings(flatCoordinates, offset, ends, stride);\n        offset = ends[ends.length - 1];\n    }\n    return area;\n}\n//# sourceMappingURL=area.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/JSONFeature\n */\nimport FeatureFormat from './Feature.js';\nimport FormatType from './FormatType.js';\nimport { abstract } from '../util.js';\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for JSON feature formats.\n *\n * @abstract\n */\nvar JSONFeature = /** @class */ (function (_super) {\n    __extends(JSONFeature, _super);\n    function JSONFeature() {\n        return _super.call(this) || this;\n    }\n    /**\n     * @return {import(\"./FormatType.js\").default} Format.\n     */\n    JSONFeature.prototype.getType = function () {\n        return FormatType.JSON;\n    };\n    /**\n     * Read a feature.  Only works for a single feature. Use `readFeatures` to\n     * read a feature collection.\n     *\n     * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     * @api\n     */\n    JSONFeature.prototype.readFeature = function (source, opt_options) {\n        return this.readFeatureFromObject(getObject(source), this.getReadOptions(source, opt_options));\n    };\n    /**\n     * Read all features.  Works with both a single feature and a feature\n     * collection.\n     *\n     * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     * @api\n     */\n    JSONFeature.prototype.readFeatures = function (source, opt_options) {\n        return this.readFeaturesFromObject(getObject(source), this.getReadOptions(source, opt_options));\n    };\n    /**\n     * @abstract\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @protected\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    JSONFeature.prototype.readFeatureFromObject = function (object, opt_options) {\n        return abstract();\n    };\n    /**\n     * @abstract\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @protected\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    JSONFeature.prototype.readFeaturesFromObject = function (object, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read a geometry.\n     *\n     * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     * @api\n     */\n    JSONFeature.prototype.readGeometry = function (source, opt_options) {\n        return this.readGeometryFromObject(getObject(source), this.getReadOptions(source, opt_options));\n    };\n    /**\n     * @abstract\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    JSONFeature.prototype.readGeometryFromObject = function (object, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read the projection.\n     *\n     * @param {ArrayBuffer|Document|Element|Object|string} source Source.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     * @api\n     */\n    JSONFeature.prototype.readProjection = function (source) {\n        return this.readProjectionFromObject(getObject(source));\n    };\n    /**\n     * @abstract\n     * @param {Object} object Object.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    JSONFeature.prototype.readProjectionFromObject = function (object) {\n        return abstract();\n    };\n    /**\n     * Encode a feature as string.\n     *\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @return {string} Encoded feature.\n     * @api\n     */\n    JSONFeature.prototype.writeFeature = function (feature, opt_options) {\n        return JSON.stringify(this.writeFeatureObject(feature, opt_options));\n    };\n    /**\n     * @abstract\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @return {Object} Object.\n     */\n    JSONFeature.prototype.writeFeatureObject = function (feature, opt_options) {\n        return abstract();\n    };\n    /**\n     * Encode an array of features as string.\n     *\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @return {string} Encoded features.\n     * @api\n     */\n    JSONFeature.prototype.writeFeatures = function (features, opt_options) {\n        return JSON.stringify(this.writeFeaturesObject(features, opt_options));\n    };\n    /**\n     * @abstract\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @return {Object} Object.\n     */\n    JSONFeature.prototype.writeFeaturesObject = function (features, opt_options) {\n        return abstract();\n    };\n    /**\n     * Encode a geometry as string.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @return {string} Encoded geometry.\n     * @api\n     */\n    JSONFeature.prototype.writeGeometry = function (geometry, opt_options) {\n        return JSON.stringify(this.writeGeometryObject(geometry, opt_options));\n    };\n    /**\n     * @abstract\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @return {Object} Object.\n     */\n    JSONFeature.prototype.writeGeometryObject = function (geometry, opt_options) {\n        return abstract();\n    };\n    return JSONFeature;\n}(FeatureFormat));\n/**\n * @param {Document|Element|Object|string} source Source.\n * @return {Object} Object.\n */\nfunction getObject(source) {\n    if (typeof source === 'string') {\n        var object = JSON.parse(source);\n        return object ? /** @type {Object} */ (object) : null;\n    }\n    else if (source !== null) {\n        return source;\n    }\n    else {\n        return null;\n    }\n}\nexport default JSONFeature;\n//# sourceMappingURL=JSONFeature.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/ImageCanvas\n */\nimport ImageBase from './ImageBase.js';\nimport ImageState from './ImageState.js';\n/**\n * A function that is called to trigger asynchronous canvas drawing.  It is\n * called with a \"done\" callback that should be called when drawing is done.\n * If any error occurs during drawing, the \"done\" callback should be called with\n * that error.\n *\n * @typedef {function(function(Error=): void): void} Loader\n */\nvar ImageCanvas = /** @class */ (function (_super) {\n    __extends(ImageCanvas, _super);\n    /**\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {HTMLCanvasElement} canvas Canvas.\n     * @param {Loader} [opt_loader] Optional loader function to\n     *     support asynchronous canvas drawing.\n     */\n    function ImageCanvas(extent, resolution, pixelRatio, canvas, opt_loader) {\n        var _this = this;\n        var state = opt_loader !== undefined ? ImageState.IDLE : ImageState.LOADED;\n        _this = _super.call(this, extent, resolution, pixelRatio, state) || this;\n        /**\n         * Optional canvas loader function.\n         * @type {?Loader}\n         * @private\n         */\n        _this.loader_ = opt_loader !== undefined ? opt_loader : null;\n        /**\n         * @private\n         * @type {HTMLCanvasElement}\n         */\n        _this.canvas_ = canvas;\n        /**\n         * @private\n         * @type {?Error}\n         */\n        _this.error_ = null;\n        return _this;\n    }\n    /**\n     * Get any error associated with asynchronous rendering.\n     * @return {?Error} Any error that occurred during rendering.\n     */\n    ImageCanvas.prototype.getError = function () {\n        return this.error_;\n    };\n    /**\n     * Handle async drawing complete.\n     * @param {Error} [err] Any error during drawing.\n     * @private\n     */\n    ImageCanvas.prototype.handleLoad_ = function (err) {\n        if (err) {\n            this.error_ = err;\n            this.state = ImageState.ERROR;\n        }\n        else {\n            this.state = ImageState.LOADED;\n        }\n        this.changed();\n    };\n    /**\n     * Load not yet loaded URI.\n     */\n    ImageCanvas.prototype.load = function () {\n        if (this.state == ImageState.IDLE) {\n            this.state = ImageState.LOADING;\n            this.changed();\n            this.loader_(this.handleLoad_.bind(this));\n        }\n    };\n    /**\n     * @return {HTMLCanvasElement} Canvas element.\n     */\n    ImageCanvas.prototype.getImage = function () {\n        return this.canvas_;\n    };\n    return ImageCanvas;\n}(ImageBase));\nexport default ImageCanvas;\n//# sourceMappingURL=ImageCanvas.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/TextFeature\n */\nimport FeatureFormat from '../format/Feature.js';\nimport FormatType from '../format/FormatType.js';\nimport { abstract } from '../util.js';\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for text feature formats.\n *\n * @abstract\n */\nvar TextFeature = /** @class */ (function (_super) {\n    __extends(TextFeature, _super);\n    function TextFeature() {\n        return _super.call(this) || this;\n    }\n    /**\n     * @return {import(\"./FormatType.js\").default} Format.\n     */\n    TextFeature.prototype.getType = function () {\n        return FormatType.TEXT;\n    };\n    /**\n     * Read the feature from the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     * @api\n     */\n    TextFeature.prototype.readFeature = function (source, opt_options) {\n        return this.readFeatureFromText(getText(source), this.adaptOptions(opt_options));\n    };\n    /**\n     * @abstract\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @protected\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    TextFeature.prototype.readFeatureFromText = function (text, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read the features from the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     * @api\n     */\n    TextFeature.prototype.readFeatures = function (source, opt_options) {\n        return this.readFeaturesFromText(getText(source), this.adaptOptions(opt_options));\n    };\n    /**\n     * @abstract\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @protected\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    TextFeature.prototype.readFeaturesFromText = function (text, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read the geometry from the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     * @api\n     */\n    TextFeature.prototype.readGeometry = function (source, opt_options) {\n        return this.readGeometryFromText(getText(source), this.adaptOptions(opt_options));\n    };\n    /**\n     * @abstract\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    TextFeature.prototype.readGeometryFromText = function (text, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read the projection from the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @return {import(\"../proj/Projection.js\").default|undefined} Projection.\n     * @api\n     */\n    TextFeature.prototype.readProjection = function (source) {\n        return this.readProjectionFromText(getText(source));\n    };\n    /**\n     * @param {string} text Text.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default|undefined} Projection.\n     */\n    TextFeature.prototype.readProjectionFromText = function (text) {\n        return this.dataProjection;\n    };\n    /**\n     * Encode a feature as a string.\n     *\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @return {string} Encoded feature.\n     * @api\n     */\n    TextFeature.prototype.writeFeature = function (feature, opt_options) {\n        return this.writeFeatureText(feature, this.adaptOptions(opt_options));\n    };\n    /**\n     * @abstract\n     * @param {import(\"../Feature.js\").default} feature Features.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    TextFeature.prototype.writeFeatureText = function (feature, opt_options) {\n        return abstract();\n    };\n    /**\n     * Encode an array of features as string.\n     *\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @return {string} Encoded features.\n     * @api\n     */\n    TextFeature.prototype.writeFeatures = function (features, opt_options) {\n        return this.writeFeaturesText(features, this.adaptOptions(opt_options));\n    };\n    /**\n     * @abstract\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    TextFeature.prototype.writeFeaturesText = function (features, opt_options) {\n        return abstract();\n    };\n    /**\n     * Write a single geometry.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @return {string} Geometry.\n     * @api\n     */\n    TextFeature.prototype.writeGeometry = function (geometry, opt_options) {\n        return this.writeGeometryText(geometry, this.adaptOptions(opt_options));\n    };\n    /**\n     * @abstract\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    TextFeature.prototype.writeGeometryText = function (geometry, opt_options) {\n        return abstract();\n    };\n    return TextFeature;\n}(FeatureFormat));\n/**\n * @param {Document|Element|Object|string} source Source.\n * @return {string} Text.\n */\nfunction getText(source) {\n    if (typeof source === 'string') {\n        return source;\n    }\n    else {\n        return '';\n    }\n}\nexport default TextFeature;\n//# sourceMappingURL=TextFeature.js.map","import { GeoJSONReader, GeoJSONWriter, UnionOp } from 'turf-jsts';\n\n/**\n * Takes two or more {@link Polygon|polygons} and returns a combined polygon. If the input polygons are not contiguous, this function returns a {@link MultiPolygon} feature.\n *\n * @name union\n * @param {...Feature<Polygon>} A polygon to combine\n * @returns {Feature<(Polygon|MultiPolygon)>} a combined {@link Polygon} or {@link MultiPolygon} feature\n * @example\n * var poly1 = turf.polygon([[\n *     [-82.574787, 35.594087],\n *     [-82.574787, 35.615581],\n *     [-82.545261, 35.615581],\n *     [-82.545261, 35.594087],\n *     [-82.574787, 35.594087]\n * ]], {\"fill\": \"#0f0\"});\n * var poly2 = turf.polygon([[\n *     [-82.560024, 35.585153],\n *     [-82.560024, 35.602602],\n *     [-82.52964, 35.602602],\n *     [-82.52964, 35.585153],\n *     [-82.560024, 35.585153]\n * ]], {\"fill\": \"#00f\"});\n *\n * var union = turf.union(poly1, poly2);\n *\n * //addToMap\n * var addToMap = [poly1, poly2, union];\n */\nfunction union() {\n    var reader = new GeoJSONReader();\n    var result = reader.read(JSON.stringify(arguments[0].geometry));\n\n    for (var i = 1; i < arguments.length; i++) {\n        result = UnionOp.union(result, reader.read(JSON.stringify(arguments[i].geometry)));\n    }\n\n    var writer = new GeoJSONWriter();\n    result = writer.write(result);\n\n    return {\n        type: 'Feature',\n        geometry: result,\n        properties: arguments[0].properties\n    };\n}\n\nexport default union;\n","/**\n * Returns a cloned copy of the passed GeoJSON Object, including possible 'Foreign Members'.\n * ~3-5x faster than the common JSON.parse + JSON.stringify combo method.\n *\n * @name clone\n * @param {GeoJSON} geojson GeoJSON Object\n * @returns {GeoJSON} cloned GeoJSON Object\n * @example\n * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]], {color: 'red'});\n *\n * var lineCloned = turf.clone(line);\n */\nfunction clone(geojson) {\n    if (!geojson) throw new Error('geojson is required');\n\n    switch (geojson.type) {\n    case 'Feature':\n        return cloneFeature(geojson);\n    case 'FeatureCollection':\n        return cloneFeatureCollection(geojson);\n    case 'Point':\n    case 'LineString':\n    case 'Polygon':\n    case 'MultiPoint':\n    case 'MultiLineString':\n    case 'MultiPolygon':\n    case 'GeometryCollection':\n        return cloneGeometry(geojson);\n    default:\n        throw new Error('unknown GeoJSON type');\n    }\n}\n\n/**\n * Clone Feature\n *\n * @private\n * @param {Feature<any>} geojson GeoJSON Feature\n * @returns {Feature<any>} cloned Feature\n */\nfunction cloneFeature(geojson) {\n    var cloned = {type: 'Feature'};\n    // Preserve Foreign Members\n    Object.keys(geojson).forEach(function (key) {\n        switch (key) {\n        case 'type':\n        case 'properties':\n        case 'geometry':\n            return;\n        default:\n            cloned[key] = geojson[key];\n        }\n    });\n    // Add properties & geometry last\n    cloned.properties = cloneProperties(geojson.properties);\n    cloned.geometry = cloneGeometry(geojson.geometry);\n    return cloned;\n}\n\n/**\n * Clone Properties\n *\n * @private\n * @param {Object} properties GeoJSON Properties\n * @returns {Object} cloned Properties\n */\nfunction cloneProperties(properties) {\n    var cloned = {};\n    if (!properties) return cloned;\n    Object.keys(properties).forEach(function (key) {\n        var value = properties[key];\n        if (typeof value === 'object') {\n            if (value === null) {\n                // handle null\n                cloned[key] = null;\n            } else if (value.length) {\n                // handle Array\n                cloned[key] = value.map(function (item) {\n                    return item;\n                });\n            } else {\n                // handle generic Object\n                cloned[key] = cloneProperties(value);\n            }\n        } else cloned[key] = value;\n    });\n    return cloned;\n}\n\n/**\n * Clone Feature Collection\n *\n * @private\n * @param {FeatureCollection<any>} geojson GeoJSON Feature Collection\n * @returns {FeatureCollection<any>} cloned Feature Collection\n */\nfunction cloneFeatureCollection(geojson) {\n    var cloned = {type: 'FeatureCollection'};\n\n    // Preserve Foreign Members\n    Object.keys(geojson).forEach(function (key) {\n        switch (key) {\n        case 'type':\n        case 'features':\n            return;\n        default:\n            cloned[key] = geojson[key];\n        }\n    });\n    // Add features\n    cloned.features = geojson.features.map(function (feature) {\n        return cloneFeature(feature);\n    });\n    return cloned;\n}\n\n/**\n * Clone Geometry\n *\n * @private\n * @param {Geometry<any>} geometry GeoJSON Geometry\n * @returns {Geometry<any>} cloned Geometry\n */\nfunction cloneGeometry(geometry) {\n    var geom = {type: geometry.type};\n    if (geometry.bbox) geom.bbox = geometry.bbox;\n\n    if (geometry.type === 'GeometryCollection') {\n        geom.geometries = geometry.geometries.map(function (geom) {\n            return cloneGeometry(geom);\n        });\n        return geom;\n    }\n    geom.coordinates = deepSlice(geometry.coordinates);\n    return geom;\n}\n\n/**\n * Deep Slice coordinates\n *\n * @private\n * @param {Coordinates} coords Coordinates\n * @returns {Coordinates} all coordinates sliced\n */\nfunction deepSlice(coords) {\n    if (typeof coords[0] !== 'object') { return coords.slice(); }\n    return coords.map(function (coord) {\n        return deepSlice(coord);\n    });\n}\n\nexport default clone;\n","import cleanCoords from '@turf/clean-coords';\nimport clone from '@turf/clone';\nimport { geomEach } from '@turf/meta';\nimport { isObject } from '@turf/helpers';\n\n/*\n (c) 2013, Vladimir Agafonkin\n Simplify.js, a high-performance JS polyline simplification library\n mourner.github.io/simplify-js\n*/\n\n// to suit your point format, run search/replace for '.x' and '.y';\n// for 3D version, see 3d branch (configurability would draw significant performance overhead)\n\n// square distance between 2 points\nfunction getSqDist(p1, p2) {\n\n    var dx = p1.x - p2.x,\n        dy = p1.y - p2.y;\n\n    return dx * dx + dy * dy;\n}\n\n// square distance from a point to a segment\nfunction getSqSegDist(p, p1, p2) {\n\n    var x = p1.x,\n        y = p1.y,\n        dx = p2.x - x,\n        dy = p2.y - y;\n\n    if (dx !== 0 || dy !== 0) {\n\n        var t = ((p.x - x) * dx + (p.y - y) * dy) / (dx * dx + dy * dy);\n\n        if (t > 1) {\n            x = p2.x;\n            y = p2.y;\n\n        } else if (t > 0) {\n            x += dx * t;\n            y += dy * t;\n        }\n    }\n\n    dx = p.x - x;\n    dy = p.y - y;\n\n    return dx * dx + dy * dy;\n}\n// rest of the code doesn't care about point format\n\n// basic distance-based simplification\nfunction simplifyRadialDist(points, sqTolerance) {\n\n    var prevPoint = points[0],\n        newPoints = [prevPoint],\n        point;\n\n    for (var i = 1, len = points.length; i < len; i++) {\n        point = points[i];\n\n        if (getSqDist(point, prevPoint) > sqTolerance) {\n            newPoints.push(point);\n            prevPoint = point;\n        }\n    }\n\n    if (prevPoint !== point) newPoints.push(point);\n\n    return newPoints;\n}\n\nfunction simplifyDPStep(points, first, last, sqTolerance, simplified) {\n    var maxSqDist = sqTolerance,\n        index;\n\n    for (var i = first + 1; i < last; i++) {\n        var sqDist = getSqSegDist(points[i], points[first], points[last]);\n\n        if (sqDist > maxSqDist) {\n            index = i;\n            maxSqDist = sqDist;\n        }\n    }\n\n    if (maxSqDist > sqTolerance) {\n        if (index - first > 1) simplifyDPStep(points, first, index, sqTolerance, simplified);\n        simplified.push(points[index]);\n        if (last - index > 1) simplifyDPStep(points, index, last, sqTolerance, simplified);\n    }\n}\n\n// simplification using Ramer-Douglas-Peucker algorithm\nfunction simplifyDouglasPeucker(points, sqTolerance) {\n    var last = points.length - 1;\n\n    var simplified = [points[0]];\n    simplifyDPStep(points, 0, last, sqTolerance, simplified);\n    simplified.push(points[last]);\n\n    return simplified;\n}\n\n// both algorithms combined for awesome performance\nfunction simplify$2(points, tolerance, highestQuality) {\n\n    if (points.length <= 2) return points;\n\n    var sqTolerance = tolerance !== undefined ? tolerance * tolerance : 1;\n\n    points = highestQuality ? points : simplifyRadialDist(points, sqTolerance);\n    points = simplifyDouglasPeucker(points, sqTolerance);\n\n    return points;\n}\n\n/**\n * Takes a {@link GeoJSON} object and returns a simplified version. Internally uses\n * [simplify-js](http://mourner.github.io/simplify-js/) to perform simplification using the Ramer-Douglas-Peucker algorithm.\n *\n * @name simplify\n * @param {GeoJSON} geojson object to be simplified\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.tolerance=1] simplification tolerance\n * @param {boolean} [options.highQuality=false] whether or not to spend more time to create a higher-quality simplification with a different algorithm\n * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)\n * @returns {GeoJSON} a simplified GeoJSON\n * @example\n * var geojson = turf.polygon([[\n *   [-70.603637, -33.399918],\n *   [-70.614624, -33.395332],\n *   [-70.639343, -33.392466],\n *   [-70.659942, -33.394759],\n *   [-70.683975, -33.404504],\n *   [-70.697021, -33.419406],\n *   [-70.701141, -33.434306],\n *   [-70.700454, -33.446339],\n *   [-70.694274, -33.458369],\n *   [-70.682601, -33.465816],\n *   [-70.668869, -33.472117],\n *   [-70.646209, -33.473835],\n *   [-70.624923, -33.472117],\n *   [-70.609817, -33.468107],\n *   [-70.595397, -33.458369],\n *   [-70.587158, -33.442901],\n *   [-70.587158, -33.426283],\n *   [-70.590591, -33.414248],\n *   [-70.594711, -33.406224],\n *   [-70.603637, -33.399918]\n * ]]);\n * var options = {tolerance: 0.01, highQuality: false};\n * var simplified = turf.simplify(geojson, options);\n *\n * //addToMap\n * var addToMap = [geojson, simplified]\n */\nfunction simplify(geojson, options) {\n    // Optional parameters\n    options = options || {};\n    if (!isObject(options)) throw new Error('options is invalid');\n    var tolerance = options.tolerance !== undefined ? options.tolerance : 1;\n    var highQuality = options.highQuality || false;\n    var mutate = options.mutate || false;\n\n    if (!geojson) throw new Error('geojson is required');\n    if (tolerance && tolerance < 0) throw new Error('invalid tolerance');\n\n    // Clone geojson to avoid side effects\n    if (mutate !== true) geojson = clone(geojson);\n\n    geomEach(geojson, function (geom) {\n        simplifyGeom(geom, tolerance, highQuality);\n    });\n    return geojson;\n}\n\n/**\n * Simplifies a feature's coordinates\n *\n * @private\n * @param {Geometry} geometry to be simplified\n * @param {number} [tolerance=1] simplification tolerance\n * @param {boolean} [highQuality=false] whether or not to spend more time to create a higher-quality simplification with a different algorithm\n * @returns {Geometry} output\n */\nfunction simplifyGeom(geometry, tolerance, highQuality) {\n    var type = geometry.type;\n\n    // \"unsimplyfiable\" geometry types\n    if (type === 'Point' || type === 'MultiPoint') return geometry;\n\n    // Remove any extra coordinates\n    cleanCoords(geometry, true);\n\n    var coordinates = geometry.coordinates;\n    switch (type) {\n    case 'LineString':\n        geometry['coordinates'] = simplifyLine(coordinates, tolerance, highQuality);\n        break;\n    case 'MultiLineString':\n        geometry['coordinates'] = coordinates.map(function (lines) {\n            return simplifyLine(lines, tolerance, highQuality);\n        });\n        break;\n    case 'Polygon':\n        geometry['coordinates'] = simplifyPolygon(coordinates, tolerance, highQuality);\n        break;\n    case 'MultiPolygon':\n        geometry['coordinates'] = coordinates.map(function (rings) {\n            return simplifyPolygon(rings, tolerance, highQuality);\n        });\n    }\n    return geometry;\n}\n\n\n/**\n * Simplifies the coordinates of a LineString with simplify-js\n *\n * @private\n * @param {Array<number>} coordinates to be processed\n * @param {number} tolerance simplification tolerance\n * @param {boolean} highQuality whether or not to spend more time to create a higher-quality\n * @returns {Array<Array<number>>} simplified coords\n */\nfunction simplifyLine(coordinates, tolerance, highQuality) {\n    return simplify$2(coordinates.map(function (coord) {\n        return {x: coord[0], y: coord[1], z: coord[2]};\n    }), tolerance, highQuality).map(function (coords) {\n        return (coords.z) ? [coords.x, coords.y, coords.z] : [coords.x, coords.y];\n    });\n}\n\n\n/**\n * Simplifies the coordinates of a Polygon with simplify-js\n *\n * @private\n * @param {Array<number>} coordinates to be processed\n * @param {number} tolerance simplification tolerance\n * @param {boolean} highQuality whether or not to spend more time to create a higher-quality\n * @returns {Array<Array<Array<number>>>} simplified coords\n */\nfunction simplifyPolygon(coordinates, tolerance, highQuality) {\n    return coordinates.map(function (ring) {\n        var pts = ring.map(function (coord) {\n            return {x: coord[0], y: coord[1]};\n        });\n        if (pts.length < 4) {\n            throw new Error('invalid polygon');\n        }\n        var simpleRing = simplify$2(pts, tolerance, highQuality).map(function (coords) {\n            return [coords.x, coords.y];\n        });\n        //remove 1 percent of tolerance until enough points to make a triangle\n        while (!checkValidity(simpleRing)) {\n            tolerance -= tolerance * 0.01;\n            simpleRing = simplify$2(pts, tolerance, highQuality).map(function (coords) {\n                return [coords.x, coords.y];\n            });\n        }\n        if (\n            (simpleRing[simpleRing.length - 1][0] !== simpleRing[0][0]) ||\n            (simpleRing[simpleRing.length - 1][1] !== simpleRing[0][1])) {\n            simpleRing.push(simpleRing[0]);\n        }\n        return simpleRing;\n    });\n}\n\n\n/**\n * Returns true if ring has at least 3 coordinates and its first coordinate is the same as its last\n *\n * @private\n * @param {Array<number>} ring coordinates to be checked\n * @returns {boolean} true if valid\n */\nfunction checkValidity(ring) {\n    if (ring.length < 3) return false;\n    //if the last point is the same as the first, it's not a triangle\n    return !(ring.length === 3 && ((ring[2][0] === ring[0][0]) && (ring[2][1] === ring[0][1])));\n}\n\nexport default simplify;\n","import { Control } from \"ol/control\";\r\nimport { View, Map } from \"ol\";\r\nimport * as olExtent from \"ol/extent\";\r\nimport VectorLayer from \"ol/layer/Vector\";\r\nimport TileLayer from \"ol/layer/Tile\";\r\nimport VectorSource from \"ol/source/Vector\";\r\nimport Feature from \"ol/Feature\";\r\nimport Collection from \"ol/Collection\";\r\nimport { Polygon } from \"ol/geom\";\r\nimport { fromExtent } from \"ol/geom/Polygon\";\r\nimport { Style, Stroke, Fill } from \"ol/style\";\r\nimport GeoJSON from \"ol/format/GeoJSON\";\r\nimport union from \"@turf/union\";\r\nimport difference from \"@turf/difference\";\r\nimport simplify from \"@turf/simplify\";\r\nimport { unByKey } from \"ol/Observable\";\r\n\r\n/**\r\n * Displays an interface that shows an overview and current view of slide\r\n * @param {object} opt_options Options to initialize the overview control\r\n * @param {string} opt_options.target Target DOM element to add overview control\r\n * @param {number} opt_options.maxResolution Maximum resolution overview control can show\r\n * @param {string} [opt_options.tipLabel] Label for tracking button\r\n * @param {boolean} [opt_options.collapsed] Whether the control starts collapsed\r\n * @param {boolean} [opt_options.tracking] Whether the control has tracking capability\r\n * @param {object} [opt_options.stateManager] The state manager to keep settings in sync\r\n */\r\nexport class Overview extends Control {\r\n    constructor(opt_options) {\r\n        let options = opt_options || {};\r\n        let element = document.createElement(\"div\");\r\n\r\n        super({\r\n            element: element,\r\n            target: options.target,\r\n        });\r\n\r\n        super.render = this.updateBox.bind(this);\r\n\r\n        this.trackingFlag = options.tracking === true;\r\n        this.stateManager = options.stateManager ? options.stateManager : null;\r\n\r\n        if (this.stateManager) {\r\n            if (!this.stateManager.overview) {\r\n                this.stateManager.overview = {};\r\n                this.stateManager.overview.collapsed = options.collapsed\r\n                    ? options.collapsed\r\n                    : false;\r\n            }\r\n\r\n            this.collapsed_ = this.stateManager.overview.collapsed === true;\r\n        } else {\r\n            this.collapsed_ = options.collapsed ? options.collapsed : false;\r\n        }\r\n\r\n        this.collapsible_ = options.collapsible ? options.collapsible : true;\r\n\r\n        if (!this.collapsible_) {\r\n            this.collapsed_ = false;\r\n        }\r\n\r\n        var className = options.className ? options.className : \"ol-overview\";\r\n\r\n        var tipLabel = options.tipLabel ? options.tipLabel : \"Overview map\";\r\n\r\n        var collapseLabel = options.collapseLabel\r\n            ? options.collapseLabel\r\n            : \"\\u00BB\";\r\n\r\n        this.collapseLabel_ = document.createElement(\"span\");\r\n        this.collapseLabel_.innerHTML = collapseLabel;\r\n\r\n        var label = options.label ? options.label : \"\\u00AB\";\r\n\r\n        this.label_ = document.createElement(\"span\");\r\n        this.label_.innerHTML = label;\r\n\r\n        var activeLabel =\r\n            this.collapsible_ && !this.collapsed_\r\n                ? this.collapseLabel_\r\n                : this.label_;\r\n\r\n        var button = document.createElement(\"button\");\r\n        button.type = \"button\";\r\n        button.title = tipLabel;\r\n        button.appendChild(activeLabel);\r\n        if (\"ontouchstart\" in document.documentElement) {\r\n            button.addEventListener(\r\n                \"touchstart\",\r\n                this.buttonClk.bind(this),\r\n                false\r\n            );\r\n        } else {\r\n            button.addEventListener(\"click\", this.buttonClk.bind(this), false);\r\n        }\r\n\r\n        this.ovmapDiv = document.createElement(\"div\");\r\n        this.ovmapDiv.className = \"ol-overview-map\";\r\n\r\n        var cssClasses =\r\n            className +\r\n            \" \" +\r\n            \"ol-unselectable ol-control\" +\r\n            (this.collapsed_ && this.collapsible_ ? \" ol-collapsed\" : \"\") +\r\n            (this.collapsible_ ? \"\" : \" ol-uncollapsible\");\r\n\r\n        element.className = cssClasses;\r\n        element.appendChild(this.ovmapDiv);\r\n        element.appendChild(button);\r\n\r\n        var enlargeButton = document.createElement(\"button\");\r\n        enlargeButton.type = \"button\";\r\n        enlargeButton.title = \"Enlarge\";\r\n        enlargeButton.className = \"size\";\r\n        enlargeButton.innerHTML = \"+\";\r\n        if (\"ontouchstart\" in document.documentElement) {\r\n            enlargeButton.addEventListener(\r\n                \"touchstart\",\r\n                this.enlargeButtonClick.bind(this),\r\n                false\r\n            );\r\n        } else {\r\n            enlargeButton.addEventListener(\r\n                \"click\",\r\n                this.enlargeButtonClick.bind(this),\r\n                false\r\n            );\r\n        }\r\n\r\n        element.appendChild(enlargeButton);\r\n\r\n        var shrinkButton = document.createElement(\"button\");\r\n        shrinkButton.type = \"button\";\r\n        shrinkButton.title = \"Shrink\";\r\n        shrinkButton.className = \"size\";\r\n        shrinkButton.innerHTML = \"-\";\r\n        if (\"ontouchstart\" in document.documentElement) {\r\n            shrinkButton.addEventListener(\r\n                \"touchstart\",\r\n                this.shrinkButtonClick.bind(this),\r\n                false\r\n            );\r\n        } else {\r\n            shrinkButton.addEventListener(\r\n                \"click\",\r\n                this.shrinkButtonClick.bind(this),\r\n                false\r\n            );\r\n        }\r\n\r\n        element.appendChild(shrinkButton);\r\n\r\n        var trackingButton = document.createElement(\"button\");\r\n        trackingButton.type = \"button\";\r\n        trackingButton.title = \"Enable tracking\";\r\n        trackingButton.className = \"size\";\r\n        trackingButton.innerHTML = \"⌕\";\r\n        if (\"ontouchstart\" in document.documentElement) {\r\n            trackingButton.addEventListener(\r\n                \"touchstart\",\r\n                this.trackingButtonClick.bind(this),\r\n                false\r\n            );\r\n        } else {\r\n            trackingButton.addEventListener(\r\n                \"click\",\r\n                this.trackingButtonClick.bind(this),\r\n                false\r\n            );\r\n        }\r\n\r\n        element.appendChild(trackingButton);\r\n\r\n        this.trackingButton = trackingButton;\r\n\r\n        this.featureSelect = null;\r\n        this.eventKeys = [];\r\n    }\r\n\r\n\r\n    getBoxSize() {\r\n        if (this.masterMap) {\r\n            var bottomLeft = olExtent.getBottomLeft(\r\n                this.masterMap.getView().getProjection().getExtent()\r\n            );\r\n            var topRight = olExtent.getTopRight(\r\n                this.masterMap.getView().getProjection().getExtent()\r\n            );\r\n            var boxWidth = Math.abs(\r\n                (bottomLeft[0] - topRight[0]) /\r\n                this.masterMap.getView().getMaxResolution()\r\n            );\r\n            var boxHeight = Math.abs(\r\n                (topRight[1] - bottomLeft[1]) /\r\n                this.masterMap.getView().getMaxResolution()\r\n            );\r\n            return [boxWidth, boxHeight];\r\n        }\r\n\r\n        return [0, 0];\r\n    }\r\n\r\n    createOverviewView() {\r\n        let proj = this.masterMap.getView().getProjection();\r\n        let extent = proj.getExtent();\r\n        return new View({\r\n            projection: proj,\r\n            center: olExtent.getCenter(extent),\r\n            showFullExtent: true,\r\n            maxResolution: 1250,\r\n            minResolution: 1,\r\n        });\r\n    }\r\n\r\n    /**\r\n    * Sets the OpenLayers map this control handles. This is automatically called by OpenLayers\r\n    * @param {ol.Map} map \r\n    */\r\n    setMap(map) {\r\n        if (!map) {\r\n            unByKey(this.eventKeys);\r\n            return;\r\n        }\r\n\r\n        var oldMap = this.getMap();\r\n        if (map === oldMap) {\r\n            return;\r\n        }\r\n\r\n        if (oldMap) {\r\n            this.overviewMap.setTarget(null);\r\n        }\r\n\r\n        super.setMap(map);\r\n        this.masterMap = map;\r\n        var boxSize = this.getBoxSize();\r\n\r\n        var resolutionFactor = 1;\r\n\r\n        var mainMapSize = map.getSize();\r\n        if (\r\n            boxSize[0] > mainMapSize[0] / 5 ||\r\n            boxSize[1] > mainMapSize[1] / 5\r\n        ) {\r\n            resolutionFactor = 2;\r\n        }\r\n\r\n        boxSize[0] /= resolutionFactor;\r\n        boxSize[1] /= resolutionFactor;\r\n\r\n        var mainView = this.createOverviewView();\r\n\r\n        var vectorLayer = new VectorLayer({\r\n            source: new VectorSource({\r\n                features: [\r\n                    new Feature({\r\n                        geometry: fromExtent(\r\n                            map.getView().calculateExtent(map.getSize())\r\n                        ),\r\n                    }),\r\n                ],\r\n            }),\r\n            style: new Style({\r\n                stroke: new Stroke({\r\n                    width: 2,\r\n                    color: \"rgba(0, 60, 136, 1.0)\",\r\n                }),\r\n                fill: new Fill({\r\n                    color: \"rgba(0, 0, 0, 0.0)\",\r\n                }),\r\n            }),\r\n        });\r\n\r\n        const currentOverlayFeature = new Feature({\r\n            geometry: fromExtent(map.getView().calculateExtent(map.getSize())),\r\n        });\r\n        currentOverlayFeature.setStyle(\r\n            new Style({\r\n                fill: new Fill({\r\n                    color: \"rgba(0, 0, 0, 0.4)\",\r\n                }),\r\n            })\r\n        );\r\n        var fogLayer = new VectorLayer({\r\n            source: new VectorSource({\r\n                features: [currentOverlayFeature],\r\n            }),\r\n            visible: false,\r\n        });\r\n\r\n        let mainLayer = map.getLayers().item(0);\r\n        let mainLayers = map.getLayers().getArray().filter((l) => {\r\n            return l.get(\"active\") === true;\r\n        });\r\n        if (mainLayers.length > 0) {\r\n            mainLayer = mainLayers[0];\r\n        }\r\n        var layerList = [new TileLayer({ source: mainLayer.getSource() })];\r\n\r\n        layerList.push(fogLayer);\r\n        layerList.push(vectorLayer);\r\n\r\n        this.currentOverlayFeature = currentOverlayFeature;\r\n\r\n        var viewboxFeatures = [null, null, null, null];\r\n        this.viewboxFeatures = viewboxFeatures;\r\n\r\n        var diagonal = Math.round(\r\n            Math.sqrt(boxSize[0] * boxSize[0] + boxSize[1] * boxSize[1])\r\n        );\r\n        this.ovmapDiv.style.width = diagonal + \"px\";\r\n        this.ovmapDiv.style.height = diagonal + \"px\";\r\n\r\n        // Overview map\r\n        this.overviewMap = new Map({\r\n            controls: new Collection(),\r\n            interactions: new Collection(),\r\n            target: this.ovmapDiv,\r\n            view: mainView,\r\n            layers: layerList,\r\n        });\r\n\r\n        var format = new GeoJSON();\r\n        this.format = format;\r\n        var simplifyOptions = { tolerance: 0.01, highQuality: false };\r\n        this.simplifyOptions = simplifyOptions;\r\n        var formatOptions = {\r\n            featureProjection: this.overviewMap.getView().getProjection(),\r\n        };\r\n        this.formatOptions = formatOptions;\r\n        var currentOverlayFeatureJson = format.writeFeatureObject(\r\n            this.currentOverlayFeature,\r\n            formatOptions\r\n        );\r\n        this.currentOverlayFeatureJson = currentOverlayFeatureJson;\r\n        var featureStyle = [];\r\n        featureStyle.push(\r\n            new Style({\r\n                stroke: new Stroke({\r\n                    width: 1,\r\n                    color: \"rgba(255, 0, 0, 1.0)\",\r\n                }),\r\n                fill: new Fill({\r\n                    color: \"rgba(0, 0, 0, 0.3)\",\r\n                }),\r\n            })\r\n        );\r\n        featureStyle.push(\r\n            new Style({\r\n                stroke: new Stroke({\r\n                    width: 1,\r\n                    color: \"rgba(0, 255, 255, 1.0)\",\r\n                }),\r\n                fill: new Fill({\r\n                    color: \"rgba(0, 0, 0, 0.2)\",\r\n                }),\r\n            })\r\n        );\r\n        featureStyle.push(\r\n            new Style({\r\n                stroke: new Stroke({\r\n                    width: 1,\r\n                    color: \"rgba(255, 215, 0, 1.0)\",\r\n                }),\r\n                fill: new Fill({\r\n                    color: \"rgba(0, 0, 0, 0.1)\",\r\n                }),\r\n            })\r\n        );\r\n        featureStyle.push(\r\n            new Style({\r\n                stroke: new Stroke({\r\n                    width: 1,\r\n                    color: \"rgba(0, 255, 0, 1.0)\",\r\n                }),\r\n                fill: new Fill({\r\n                    color: \"rgba(0, 0, 0, 0.0)\",\r\n                }),\r\n            })\r\n        );\r\n        this.featureStyle = featureStyle;\r\n\r\n        this.vectorLayer = vectorLayer;\r\n        this.fogLayer = fogLayer;\r\n\r\n        var polling = 0;\r\n        this.polling = polling;\r\n        var pollingRate = 10;\r\n        this.pollingRate = pollingRate;\r\n        var lastZoomValue = map.getView().getZoom();\r\n        this.lastZoomValue = lastZoomValue;\r\n\r\n        var that = this;\r\n        let k = this.overviewMap.on(\r\n            \"singleclick\",\r\n            function (evt) {\r\n                evt.preventDefault();\r\n                map.getView().setCenter(evt.coordinate);\r\n            },\r\n            this\r\n        );\r\n        this.eventKeys.push(k);\r\n\r\n        k = this.overviewMap.on(\r\n            \"pointermove\",\r\n            function (evt) {\r\n                evt.preventDefault();\r\n                var hit = false;\r\n\r\n                if (evt.dragging) {\r\n                    if (!that.featureSelect) {\r\n                        that.featureSelect = that.overviewMap.forEachFeatureAtPixel(\r\n                            evt.pixel,\r\n                            function (feature, layer) {\r\n                                hit = true;\r\n                                return feature;\r\n                            }\r\n                        );\r\n                    }\r\n\r\n                    if (that.featureSelect) {\r\n                        map.getView().setCenter(evt.coordinate);\r\n                    }\r\n                } else {\r\n                    if (that.featureSelect) {\r\n                        that.featureSelect = null;\r\n                    }\r\n                }\r\n\r\n                // detect feature at mouse coords\r\n                if (!hit) {\r\n                    hit = that.overviewMap.forEachFeatureAtPixel(\r\n                        evt.pixel,\r\n                        function (feature, layer) {\r\n                            return true;\r\n                        }\r\n                    );\r\n                }\r\n\r\n                var element = evt.map.getTargetElement();\r\n                if (hit) {\r\n                    element.style.cursor = \"move\";\r\n                } else {\r\n                    element.style.cursor = \"\";\r\n                }\r\n            },\r\n            this\r\n        );\r\n\r\n\r\n        this.eventKeys.push(k);\r\n\r\n        k = map.getView().on(\"change:center\", this.updateBox.bind(this), this);\r\n        this.eventKeys.push(k);\r\n        k = map.getView().on(\"change:resolution\", this.updateBox.bind(this), this);\r\n        this.eventKeys.push(k);\r\n        k = map.getView().on(\"change:rotation\", this.updateBox.bind(this), this);\r\n        this.eventKeys.push(k);\r\n\r\n        this.overviewMap.updateSize();\r\n        let extent = map.getView().getProjection().getExtent();\r\n        this.overviewMap.getView().fit(extent, this.overviewMap.getSize());\r\n        this.overviewMap.getView().setCenter(olExtent.getCenter(extent));\r\n        this.updateBox();\r\n        this.setTrackingEnabled(this.trackingFlag);\r\n        this.masterView = this.masterMap.getView();\r\n    }\r\n\r\n    updateBox() {\r\n        if (!this.masterMap) {\r\n            return;\r\n        }\r\n\r\n        if (!this.masterMap.isRendered() || !this.overviewMap.isRendered()) {\r\n            return;\r\n        }\r\n\r\n        // if(this.masterView !== this.masterMap.getView()){\r\n        //     return;\r\n        // }\r\n\r\n        var masterView = this.masterMap.getView();\r\n        var overviewView = this.overviewMap.getView();\r\n\r\n        var rotation = masterView.getRotation();\r\n        overviewView.setRotation(rotation);\r\n\r\n        var masterMapSize = this.masterMap.getSize();\r\n        var resolution = masterView.getResolution();\r\n\r\n        var halfWidth = masterMapSize[0] * resolution * 0.5;\r\n        var halfHeight = masterMapSize[1] * resolution * 0.5;\r\n\r\n        var center = masterView.getCenter();\r\n        var x1 = center[0] - halfWidth;\r\n        var x2 = center[0] + halfWidth;\r\n        var y1 = center[1] - halfHeight;\r\n        var y2 = center[1] + halfHeight;\r\n\r\n        var viewportExtent = [x1, y1, x2, y2];\r\n\r\n        // constrain the viewport box to the overview window box\r\n        var masterMapExtent = masterView.getProjection().getExtent();\r\n        var bottomLeft = olExtent.getBottomLeft(masterMapExtent);\r\n        var topRight = olExtent.getTopRight(masterMapExtent);\r\n        var projCenter = olExtent.getCenter(masterMapExtent);\r\n        var boxWidth = Math.abs(bottomLeft[0] - topRight[0]);\r\n        var boxHeight = Math.abs(topRight[1] - bottomLeft[1]);\r\n        var halfDiagonal =\r\n            Math.sqrt(boxWidth * boxWidth + boxHeight * boxHeight) * 0.5;\r\n        var overviewExtent = [\r\n            projCenter[0] - halfDiagonal,\r\n            projCenter[1] - halfDiagonal,\r\n            projCenter[0] + halfDiagonal,\r\n            projCenter[1] + halfDiagonal,\r\n        ];\r\n\r\n        var finalExtent = olExtent.getIntersection(\r\n            viewportExtent,\r\n            overviewExtent\r\n        );\r\n\r\n        var poly = new Polygon([\r\n            [\r\n                [finalExtent[0], finalExtent[1]],\r\n                [finalExtent[2], finalExtent[1]],\r\n                [finalExtent[2], finalExtent[3]],\r\n                [finalExtent[0], finalExtent[3]],\r\n                [finalExtent[0], finalExtent[1]],\r\n            ],\r\n        ]);\r\n        poly.rotate(rotation, poly.getInteriorPoint().getFirstCoordinate());\r\n        this.vectorLayer.getSource().getFeatures()[0].setGeometry(poly);\r\n\r\n        if (this.trackingFlag) {\r\n            //Available different zoom levels\r\n            var zoomIndex;\r\n            switch (true) {\r\n                case Math.floor(masterView.getZoom()) < 3:\r\n                    return;\r\n                case Math.floor(masterView.getZoom()) < 4:\r\n                    zoomIndex = 1;\r\n                    break;\r\n                case Math.floor(masterView.getZoom()) < 6:\r\n                    zoomIndex = 2;\r\n                    break;\r\n                case Math.floor(masterView.getZoom()) < 7:\r\n                    zoomIndex = 3;\r\n                    break;\r\n                default:\r\n                    zoomIndex = 4;\r\n                    break;\r\n            }\r\n\r\n            //Current view polygon\r\n            var currentViewboxFeature = new Feature({\r\n                geometry: poly,\r\n            });\r\n            var currentViewboxFeatureJson = this.format.writeFeatureObject(\r\n                currentViewboxFeature,\r\n                this.formatOptions\r\n            );\r\n\r\n            if (\r\n                this.polling !== 0 &&\r\n                this.polling < this.pollingRate &&\r\n                this.lastZoomValue === masterView.getZoom()\r\n            ) {\r\n                this.polling++;\r\n                return;\r\n            }\r\n\r\n            this.polling = 1;\r\n            this.lastZoomValue = masterView.getZoom();\r\n\r\n            //Add current poly to all zoom levels\r\n            for (var i = 0; i < zoomIndex; i++) {\r\n                if (this.viewboxFeatures[i] !== null) {\r\n                    var previousViewboxFeatureJson = this.viewboxFeatures[i];\r\n                    var currentToPreviousFeatureUnionJson = union(\r\n                        previousViewboxFeatureJson,\r\n                        currentViewboxFeatureJson\r\n                    );\r\n                    this.viewboxFeatures[i] = currentToPreviousFeatureUnionJson;\r\n                } else {\r\n                    this.viewboxFeatures[i] = currentViewboxFeatureJson;\r\n                }\r\n            }\r\n\r\n            //Substract previous layer\r\n            var viewboxFeaturesDiff = Array.from(this.viewboxFeatures);\r\n            for (var k = 0; k < viewboxFeaturesDiff.length - 1; k++) {\r\n                if (\r\n                    viewboxFeaturesDiff[k + 1] === null ||\r\n                    viewboxFeaturesDiff[k] === null\r\n                ) {\r\n                    continue;\r\n                }\r\n                var previousLayerViewboxFeatureJson =\r\n                    viewboxFeaturesDiff[k + 1];\r\n                var previousSimplifiedJson = simplify(\r\n                    previousLayerViewboxFeatureJson,\r\n                    this.simplifyOptions\r\n                );\r\n                var currentLayerViewboxFeatureJson = viewboxFeaturesDiff[k];\r\n                var currentSimplifiedJson = simplify(\r\n                    currentLayerViewboxFeatureJson,\r\n                    this.simplifyOptions\r\n                );\r\n                var currentToPreviousFeatureDiffJson = difference(\r\n                    currentSimplifiedJson,\r\n                    previousSimplifiedJson\r\n                );\r\n                viewboxFeaturesDiff[k] = currentToPreviousFeatureDiffJson;\r\n            }\r\n\r\n            //Calculate and apply overlay mask to overlay\r\n            var overlayViewboxDiffJson;\r\n            var overlayMaskJson = this.viewboxFeatures[0];\r\n            var simplifiedOverlayMaskJson = simplify(\r\n                overlayMaskJson,\r\n                this.simplifyOptions\r\n            );\r\n            overlayViewboxDiffJson = difference(\r\n                this.currentOverlayFeatureJson,\r\n                simplifiedOverlayMaskJson\r\n            );\r\n            var overlayViewboxDiff = this.format.readFeature(\r\n                overlayViewboxDiffJson,\r\n                this.formatOptions\r\n            );\r\n            overlayViewboxDiff.setStyle(\r\n                new Style({\r\n                    fill: new Fill({\r\n                        color: \"rgba(0, 0, 0, 0.4)\",\r\n                    }),\r\n                })\r\n            );\r\n\r\n            //Remove all features and add new\r\n            var currentFeatures = Array.from(\r\n                this.fogLayer.getSource().getFeatures()\r\n            );\r\n            this.fogLayer.getSource().clear();\r\n            this.fogLayer.getSource().addFeature(overlayViewboxDiff);\r\n            for (var j = 0; j < viewboxFeaturesDiff.length; j++) {\r\n                var featureJson = viewboxFeaturesDiff[j];\r\n                if (featureJson !== null) {\r\n                    var feature = this.format.readFeature(\r\n                        featureJson,\r\n                        this.formatOptions\r\n                    );\r\n                    feature.setStyle(this.featureStyle[j]);\r\n                    this.fogLayer.getSource().addFeature(feature);\r\n                } else {\r\n                    if (currentFeatures[j + 1]) {\r\n                        this.fogLayer\r\n                            .getSource()\r\n                            .addFeature(currentFeatures[j + 1]);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    buttonClk(event) {\r\n        if (event) {\r\n            event.preventDefault();\r\n            event.stopPropagation();\r\n        }\r\n\r\n        if (\r\n            (\" \" + this.element.className + \" \").indexOf(\" ol-collapsed \") > -1\r\n        ) {\r\n            this.element.className = this.element.className.replace(\r\n                /ol-collapsed/g,\r\n                \"\"\r\n            );\r\n        } else {\r\n            this.element.className += \" ol-collapsed\";\r\n        }\r\n\r\n        if (this.collapsed_) {\r\n            this.label_.parentNode.replaceChild(\r\n                this.collapseLabel_,\r\n                this.label_\r\n            );\r\n        } else {\r\n            this.collapseLabel_.parentNode.replaceChild(\r\n                this.label_,\r\n                this.collapseLabel_\r\n            );\r\n        }\r\n\r\n        this.collapsed_ = !this.collapsed_;\r\n        if (this.stateManager) {\r\n            this.stateManager.overview.collapsed = this.collapsed_;\r\n        }\r\n\r\n        this.overviewMap.updateSize();\r\n    }\r\n\r\n    /**\r\n     * Changes overview control size by factor\r\n     * @param {number} factor Factor to change overview's size\r\n     */\r\n    changeOverviewSize(factor) {\r\n        var boxSize = [this.ovmapDiv.clientWidth, this.ovmapDiv.clientHeight];\r\n        boxSize[0] /= factor;\r\n        boxSize[1] /= factor;\r\n\r\n        var diagonal = Math.round(\r\n            Math.sqrt(boxSize[0] * boxSize[0] + boxSize[1] * boxSize[1])\r\n        );\r\n        if (diagonal < 60 || diagonal > 600) {\r\n            return;\r\n        }\r\n\r\n        this.ovmapDiv.style.width = boxSize[0] + \"px\";\r\n        this.ovmapDiv.style.height = boxSize[1] + \"px\";\r\n\r\n        this.overviewMap.updateSize();\r\n        this.overviewMap\r\n            .getView()\r\n            .fit(\r\n                this.overviewMap.getView().getProjection().getExtent(),\r\n                this.overviewMap.getSize()\r\n            );\r\n    }\r\n\r\n    /**\r\n     * Changes overview control size by pixel size\r\n     * @param {number} sizePx Pixel size to change overview's size\r\n     */\r\n    changeOverviewSizePx(sizePx) {\r\n        if (sizePx < 60 || sizePx > 600) {\r\n            return;\r\n        }\r\n\r\n        var boxSize = this.getBoxSize();\r\n        var diagonal = Math.round(\r\n            Math.sqrt(boxSize[0] * boxSize[0] + boxSize[1] * boxSize[1])\r\n        );\r\n\r\n        var newFactor = diagonal / sizePx;\r\n        this.ovmapDiv.style.width = sizePx + \"px\";\r\n        this.ovmapDiv.style.height = sizePx + \"px\";\r\n\r\n        if (this.overviewMap) {\r\n            // this.overviewMap.setView(this.createOverviewView(newFactor));\r\n            this.overviewMap.updateSize();\r\n            this.overviewMap\r\n                .getView()\r\n                .fit(this.masterMap.getView().getProjection().getExtent());\r\n        }\r\n    }\r\n\r\n    enlargeButtonClick(event) {\r\n        if (event) {\r\n            event.preventDefault();\r\n            event.stopPropagation();\r\n        }\r\n\r\n        this.changeOverviewSize(0.75);\r\n    }\r\n\r\n    shrinkButtonClick(event) {\r\n        if (event) {\r\n            event.preventDefault();\r\n            event.stopPropagation();\r\n        }\r\n\r\n        this.changeOverviewSize(1.25);\r\n    }\r\n\r\n    trackingButtonClick(event) {\r\n        if (event) {\r\n            event.preventDefault();\r\n            event.stopPropagation();\r\n        }\r\n\r\n        this.setTrackingEnabled(!this.trackingFlag);\r\n    }\r\n\r\n    /**\r\n     * Enables or disables tracking\r\n     * @param {boolean} enabled True to enable tracking, otherwise false\r\n     */\r\n    setTrackingEnabled(enabled) {\r\n        this.trackingFlag = enabled;\r\n\r\n        if (this.trackingFlag) {\r\n            this.trackingButton.classList.add(\"selected\");\r\n            this.polling = 0;\r\n            this.fogLayer.setVisible(true);\r\n            this.updateBox();\r\n        } else {\r\n            this.trackingButton.classList.remove(\"selected\");\r\n            this.fogLayer.setVisible(false);\r\n        }\r\n\r\n        this.trackingButton.blur();\r\n        this.trackingButton.hideFocus = true;\r\n        this.trackingButton.style.outline = \"none\";\r\n    }\r\n\r\n    /**\r\n     * Gets the tracking state of the control\r\n     * @return {boolean} True if the control is currently tracking\r\n     */\r\n    getTrackingEnabled() {\r\n        return this.trackingFlag;\r\n    }\r\n\r\n    /**\r\n     * Gets the collapsed state of the control\r\n     * @return {boolean} True if the control is currently collapsed\r\n     */\r\n    getCollapsed() {\r\n        return (\r\n            (\" \" + this.element.className + \" \").indexOf(\" ol-collapsed \") > -1\r\n        );\r\n    }\r\n\r\n    /**\r\n     * Sets the collapsed state of the control\r\n     * @param {boolean} collapsed True to collapse the control, otherwise false\r\n     */\r\n    setCollapsed(collapsed) {\r\n        if (this.getCollapsed() != collapsed) {\r\n            this.buttonClk();\r\n        }\r\n    }\r\n}\r\n","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/TileCache\n */\nimport LRUCache from './structs/LRUCache.js';\nimport { fromKey, getKey } from './tilecoord.js';\nvar TileCache = /** @class */ (function (_super) {\n    __extends(TileCache, _super);\n    function TileCache() {\n        return _super !== null && _super.apply(this, arguments) || this;\n    }\n    /**\n     * @param {!Object<string, boolean>} usedTiles Used tiles.\n     */\n    TileCache.prototype.expireCache = function (usedTiles) {\n        while (this.canExpireCache()) {\n            var tile = this.peekLast();\n            if (tile.getKey() in usedTiles) {\n                break;\n            }\n            else {\n                this.pop().release();\n            }\n        }\n    };\n    /**\n     * Prune all tiles from the cache that don't have the same z as the newest tile.\n     */\n    TileCache.prototype.pruneExceptNewestZ = function () {\n        if (this.getCount() === 0) {\n            return;\n        }\n        var key = this.peekFirstKey();\n        var tileCoord = fromKey(key);\n        var z = tileCoord[0];\n        this.forEach(function (tile) {\n            if (tile.tileCoord[0] !== z) {\n                this.remove(getKey(tile.tileCoord));\n                tile.release();\n            }\n        }.bind(this));\n    };\n    return TileCache;\n}(LRUCache));\nexport default TileCache;\n//# sourceMappingURL=TileCache.js.map","/**\n * @module ol/structs/LRUCache\n */\nimport { assert } from '../asserts.js';\n/**\n * @typedef {Object} Entry\n * @property {string} key_ Key.\n * @property {Object} newer Newer.\n * @property {Object} older Older.\n * @property {*} value_ Value.\n */\n/**\n * @classdesc\n * Implements a Least-Recently-Used cache where the keys do not conflict with\n * Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring\n * items from the cache is the responsibility of the user.\n *\n * @fires import(\"../events/Event.js\").default\n * @template T\n */\nvar LRUCache = /** @class */ (function () {\n    /**\n     * @param {number} [opt_highWaterMark] High water mark.\n     */\n    function LRUCache(opt_highWaterMark) {\n        /**\n         * Desired max cache size after expireCache(). If set to 0, no cache entries\n         * will be pruned at all.\n         * @type {number}\n         */\n        this.highWaterMark =\n            opt_highWaterMark !== undefined ? opt_highWaterMark : 2048;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.count_ = 0;\n        /**\n         * @private\n         * @type {!Object<string, Entry>}\n         */\n        this.entries_ = {};\n        /**\n         * @private\n         * @type {?Entry}\n         */\n        this.oldest_ = null;\n        /**\n         * @private\n         * @type {?Entry}\n         */\n        this.newest_ = null;\n    }\n    /**\n     * @return {boolean} Can expire cache.\n     */\n    LRUCache.prototype.canExpireCache = function () {\n        return this.highWaterMark > 0 && this.getCount() > this.highWaterMark;\n    };\n    /**\n     * FIXME empty description for jsdoc\n     */\n    LRUCache.prototype.clear = function () {\n        this.count_ = 0;\n        this.entries_ = {};\n        this.oldest_ = null;\n        this.newest_ = null;\n    };\n    /**\n     * @param {string} key Key.\n     * @return {boolean} Contains key.\n     */\n    LRUCache.prototype.containsKey = function (key) {\n        return this.entries_.hasOwnProperty(key);\n    };\n    /**\n     * @param {function(T, string, LRUCache<T>): ?} f The function\n     *     to call for every entry from the oldest to the newer. This function takes\n     *     3 arguments (the entry value, the entry key and the LRUCache object).\n     *     The return value is ignored.\n     */\n    LRUCache.prototype.forEach = function (f) {\n        var entry = this.oldest_;\n        while (entry) {\n            f(entry.value_, entry.key_, this);\n            entry = entry.newer;\n        }\n    };\n    /**\n     * @param {string} key Key.\n     * @param {*} [opt_options] Options (reserved for subclasses).\n     * @return {T} Value.\n     */\n    LRUCache.prototype.get = function (key, opt_options) {\n        var entry = this.entries_[key];\n        assert(entry !== undefined, 15); // Tried to get a value for a key that does not exist in the cache\n        if (entry === this.newest_) {\n            return entry.value_;\n        }\n        else if (entry === this.oldest_) {\n            this.oldest_ = /** @type {Entry} */ (this.oldest_.newer);\n            this.oldest_.older = null;\n        }\n        else {\n            entry.newer.older = entry.older;\n            entry.older.newer = entry.newer;\n        }\n        entry.newer = null;\n        entry.older = this.newest_;\n        this.newest_.newer = entry;\n        this.newest_ = entry;\n        return entry.value_;\n    };\n    /**\n     * Remove an entry from the cache.\n     * @param {string} key The entry key.\n     * @return {T} The removed entry.\n     */\n    LRUCache.prototype.remove = function (key) {\n        var entry = this.entries_[key];\n        assert(entry !== undefined, 15); // Tried to get a value for a key that does not exist in the cache\n        if (entry === this.newest_) {\n            this.newest_ = /** @type {Entry} */ (entry.older);\n            if (this.newest_) {\n                this.newest_.newer = null;\n            }\n        }\n        else if (entry === this.oldest_) {\n            this.oldest_ = /** @type {Entry} */ (entry.newer);\n            if (this.oldest_) {\n                this.oldest_.older = null;\n            }\n        }\n        else {\n            entry.newer.older = entry.older;\n            entry.older.newer = entry.newer;\n        }\n        delete this.entries_[key];\n        --this.count_;\n        return entry.value_;\n    };\n    /**\n     * @return {number} Count.\n     */\n    LRUCache.prototype.getCount = function () {\n        return this.count_;\n    };\n    /**\n     * @return {Array<string>} Keys.\n     */\n    LRUCache.prototype.getKeys = function () {\n        var keys = new Array(this.count_);\n        var i = 0;\n        var entry;\n        for (entry = this.newest_; entry; entry = entry.older) {\n            keys[i++] = entry.key_;\n        }\n        return keys;\n    };\n    /**\n     * @return {Array<T>} Values.\n     */\n    LRUCache.prototype.getValues = function () {\n        var values = new Array(this.count_);\n        var i = 0;\n        var entry;\n        for (entry = this.newest_; entry; entry = entry.older) {\n            values[i++] = entry.value_;\n        }\n        return values;\n    };\n    /**\n     * @return {T} Last value.\n     */\n    LRUCache.prototype.peekLast = function () {\n        return this.oldest_.value_;\n    };\n    /**\n     * @return {string} Last key.\n     */\n    LRUCache.prototype.peekLastKey = function () {\n        return this.oldest_.key_;\n    };\n    /**\n     * Get the key of the newest item in the cache.  Throws if the cache is empty.\n     * @return {string} The newest key.\n     */\n    LRUCache.prototype.peekFirstKey = function () {\n        return this.newest_.key_;\n    };\n    /**\n     * @return {T} value Value.\n     */\n    LRUCache.prototype.pop = function () {\n        var entry = this.oldest_;\n        delete this.entries_[entry.key_];\n        if (entry.newer) {\n            entry.newer.older = null;\n        }\n        this.oldest_ = /** @type {Entry} */ (entry.newer);\n        if (!this.oldest_) {\n            this.newest_ = null;\n        }\n        --this.count_;\n        return entry.value_;\n    };\n    /**\n     * @param {string} key Key.\n     * @param {T} value Value.\n     */\n    LRUCache.prototype.replace = function (key, value) {\n        this.get(key); // update `newest_`\n        this.entries_[key].value_ = value;\n    };\n    /**\n     * @param {string} key Key.\n     * @param {T} value Value.\n     */\n    LRUCache.prototype.set = function (key, value) {\n        assert(!(key in this.entries_), 16); // Tried to set a value for a key that is used already\n        var entry = {\n            key_: key,\n            newer: null,\n            older: this.newest_,\n            value_: value,\n        };\n        if (!this.newest_) {\n            this.oldest_ = entry;\n        }\n        else {\n            this.newest_.newer = entry;\n        }\n        this.newest_ = entry;\n        this.entries_[key] = entry;\n        ++this.count_;\n    };\n    /**\n     * Set a maximum number of entries for the cache.\n     * @param {number} size Cache size.\n     * @api\n     */\n    LRUCache.prototype.setSize = function (size) {\n        this.highWaterMark = size;\n    };\n    return LRUCache;\n}());\nexport default LRUCache;\n//# sourceMappingURL=LRUCache.js.map","/**\n * @module ol/style/IconImageCache\n */\nimport { asString } from '../color.js';\n/**\n * @classdesc\n * Singleton class. Available through {@link module:ol/style/IconImageCache~shared}.\n */\nvar IconImageCache = /** @class */ (function () {\n    function IconImageCache() {\n        /**\n         * @type {!Object<string, import(\"./IconImage.js\").default>}\n         * @private\n         */\n        this.cache_ = {};\n        /**\n         * @type {number}\n         * @private\n         */\n        this.cacheSize_ = 0;\n        /**\n         * @type {number}\n         * @private\n         */\n        this.maxCacheSize_ = 32;\n    }\n    /**\n     * FIXME empty description for jsdoc\n     */\n    IconImageCache.prototype.clear = function () {\n        this.cache_ = {};\n        this.cacheSize_ = 0;\n    };\n    /**\n     * @return {boolean} Can expire cache.\n     */\n    IconImageCache.prototype.canExpireCache = function () {\n        return this.cacheSize_ > this.maxCacheSize_;\n    };\n    /**\n     * FIXME empty description for jsdoc\n     */\n    IconImageCache.prototype.expire = function () {\n        if (this.canExpireCache()) {\n            var i = 0;\n            for (var key in this.cache_) {\n                var iconImage = this.cache_[key];\n                if ((i++ & 3) === 0 && !iconImage.hasListener()) {\n                    delete this.cache_[key];\n                    --this.cacheSize_;\n                }\n            }\n        }\n    };\n    /**\n     * @param {string} src Src.\n     * @param {?string} crossOrigin Cross origin.\n     * @param {import(\"../color.js\").Color} color Color.\n     * @return {import(\"./IconImage.js\").default} Icon image.\n     */\n    IconImageCache.prototype.get = function (src, crossOrigin, color) {\n        var key = getKey(src, crossOrigin, color);\n        return key in this.cache_ ? this.cache_[key] : null;\n    };\n    /**\n     * @param {string} src Src.\n     * @param {?string} crossOrigin Cross origin.\n     * @param {import(\"../color.js\").Color} color Color.\n     * @param {import(\"./IconImage.js\").default} iconImage Icon image.\n     */\n    IconImageCache.prototype.set = function (src, crossOrigin, color, iconImage) {\n        var key = getKey(src, crossOrigin, color);\n        this.cache_[key] = iconImage;\n        ++this.cacheSize_;\n    };\n    /**\n     * Set the cache size of the icon cache. Default is `32`. Change this value when\n     * your map uses more than 32 different icon images and you are not caching icon\n     * styles on the application level.\n     * @param {number} maxCacheSize Cache max size.\n     * @api\n     */\n    IconImageCache.prototype.setSize = function (maxCacheSize) {\n        this.maxCacheSize_ = maxCacheSize;\n        this.expire();\n    };\n    return IconImageCache;\n}());\n/**\n * @param {string} src Src.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../color.js\").Color} color Color.\n * @return {string} Cache key.\n */\nfunction getKey(src, crossOrigin, color) {\n    var colorString = color ? asString(color) : 'null';\n    return crossOrigin + ':' + src + ':' + colorString;\n}\nexport default IconImageCache;\n/**\n * The {@link module:ol/style/IconImageCache~IconImageCache} for\n * {@link module:ol/style/Icon~Icon} images.\n * @api\n */\nexport var shared = new IconImageCache();\n//# sourceMappingURL=IconImageCache.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/Map\n */\nimport CompositeMapRenderer from './renderer/Composite.js';\nimport PluggableMap from './PluggableMap.js';\nimport { assign } from './obj.js';\nimport { defaults as defaultControls } from './control.js';\nimport { defaults as defaultInteractions } from './interaction.js';\n/**\n * @classdesc\n * The map is the core component of OpenLayers. For a map to render, a view,\n * one or more layers, and a target container are needed:\n *\n *     import Map from 'ol/Map';\n *     import View from 'ol/View';\n *     import TileLayer from 'ol/layer/Tile';\n *     import OSM from 'ol/source/OSM';\n *\n *     var map = new Map({\n *       view: new View({\n *         center: [0, 0],\n *         zoom: 1\n *       }),\n *       layers: [\n *         new TileLayer({\n *           source: new OSM()\n *         })\n *       ],\n *       target: 'map'\n *     });\n *\n * The above snippet creates a map using a {@link module:ol/layer/Tile} to\n * display {@link module:ol/source/OSM~OSM} OSM data and render it to a DOM\n * element with the id `map`.\n *\n * The constructor places a viewport container (with CSS class name\n * `ol-viewport`) in the target element (see `getViewport()`), and then two\n * further elements within the viewport: one with CSS class name\n * `ol-overlaycontainer-stopevent` for controls and some overlays, and one with\n * CSS class name `ol-overlaycontainer` for other overlays (see the `stopEvent`\n * option of {@link module:ol/Overlay~Overlay} for the difference). The map\n * itself is placed in a further element within the viewport.\n *\n * Layers are stored as a {@link module:ol/Collection~Collection} in\n * layerGroups. A top-level group is provided by the library. This is what is\n * accessed by `getLayerGroup` and `setLayerGroup`. Layers entered in the\n * options are added to this group, and `addLayer` and `removeLayer` change the\n * layer collection in the group. `getLayers` is a convenience function for\n * `getLayerGroup().getLayers()`. Note that {@link module:ol/layer/Group~Group}\n * is a subclass of {@link module:ol/layer/Base}, so layers entered in the\n * options or added with `addLayer` can be groups, which can contain further\n * groups, and so on.\n *\n * @api\n */\nvar Map = /** @class */ (function (_super) {\n    __extends(Map, _super);\n    /**\n     * @param {import(\"./PluggableMap.js\").MapOptions} options Map options.\n     */\n    function Map(options) {\n        var _this = this;\n        options = assign({}, options);\n        if (!options.controls) {\n            options.controls = defaultControls();\n        }\n        if (!options.interactions) {\n            options.interactions = defaultInteractions({\n                onFocusOnly: true,\n            });\n        }\n        _this = _super.call(this, options) || this;\n        return _this;\n    }\n    Map.prototype.createRenderer = function () {\n        return new CompositeMapRenderer(this);\n    };\n    return Map;\n}(PluggableMap));\nexport default Map;\n//# sourceMappingURL=Map.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/MapEvent\n */\nimport Event from './events/Event.js';\n/**\n * @classdesc\n * Events emitted as map events are instances of this type.\n * See {@link module:ol/PluggableMap~PluggableMap} for which events trigger a map event.\n */\nvar MapEvent = /** @class */ (function (_super) {\n    __extends(MapEvent, _super);\n    /**\n     * @param {string} type Event type.\n     * @param {import(\"./PluggableMap.js\").default} map Map.\n     * @param {?import(\"./PluggableMap.js\").FrameState} [opt_frameState] Frame state.\n     */\n    function MapEvent(type, map, opt_frameState) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The map where the event occurred.\n         * @type {import(\"./PluggableMap.js\").default}\n         * @api\n         */\n        _this.map = map;\n        /**\n         * The frame state at the time of the event.\n         * @type {?import(\"./PluggableMap.js\").FrameState}\n         * @api\n         */\n        _this.frameState = opt_frameState !== undefined ? opt_frameState : null;\n        return _this;\n    }\n    return MapEvent;\n}(Event));\nexport default MapEvent;\n//# sourceMappingURL=MapEvent.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/render/canvas/ImageBuilder\n */\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction from './Instruction.js';\nvar CanvasImageBuilder = /** @class */ (function (_super) {\n    __extends(CanvasImageBuilder, _super);\n    /**\n     * @param {number} tolerance Tolerance.\n     * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     */\n    function CanvasImageBuilder(tolerance, maxExtent, resolution, pixelRatio) {\n        var _this = _super.call(this, tolerance, maxExtent, resolution, pixelRatio) || this;\n        /**\n         * @private\n         * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n         */\n        _this.hitDetectionImage_ = null;\n        /**\n         * @private\n         * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n         */\n        _this.image_ = null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.imagePixelRatio_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.anchorX_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.anchorY_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.height_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.opacity_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.originX_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.originY_ = undefined;\n        /**\n         * @private\n         * @type {boolean|undefined}\n         */\n        _this.rotateWithView_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.rotation_ = undefined;\n        /**\n         * @private\n         * @type {import(\"../../size.js\").Size|undefined}\n         */\n        _this.scale_ = undefined;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.width_ = undefined;\n        /**\n         * Data shared with a text builder for combined decluttering.\n         * @private\n         * @type {import(\"../canvas.js\").DeclutterImageWithText}\n         */\n        _this.declutterImageWithText_ = undefined;\n        return _this;\n    }\n    /**\n     * @param {import(\"../../geom/Point.js\").default|import(\"../Feature.js\").default} pointGeometry Point geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasImageBuilder.prototype.drawPoint = function (pointGeometry, feature) {\n        if (!this.image_) {\n            return;\n        }\n        this.beginGeometry(pointGeometry, feature);\n        var flatCoordinates = pointGeometry.getFlatCoordinates();\n        var stride = pointGeometry.getStride();\n        var myBegin = this.coordinates.length;\n        var myEnd = this.appendFlatPointCoordinates(flatCoordinates, stride);\n        this.instructions.push([\n            CanvasInstruction.DRAW_IMAGE,\n            myBegin,\n            myEnd,\n            this.image_,\n            // Remaining arguments to DRAW_IMAGE are in alphabetical order\n            this.anchorX_ * this.imagePixelRatio_,\n            this.anchorY_ * this.imagePixelRatio_,\n            Math.ceil(this.height_ * this.imagePixelRatio_),\n            this.opacity_,\n            this.originX_,\n            this.originY_,\n            this.rotateWithView_,\n            this.rotation_,\n            [\n                (this.scale_[0] * this.pixelRatio) / this.imagePixelRatio_,\n                (this.scale_[1] * this.pixelRatio) / this.imagePixelRatio_,\n            ],\n            Math.ceil(this.width_ * this.imagePixelRatio_),\n            this.declutterImageWithText_,\n        ]);\n        this.hitDetectionInstructions.push([\n            CanvasInstruction.DRAW_IMAGE,\n            myBegin,\n            myEnd,\n            this.hitDetectionImage_,\n            // Remaining arguments to DRAW_IMAGE are in alphabetical order\n            this.anchorX_,\n            this.anchorY_,\n            this.height_,\n            this.opacity_,\n            this.originX_,\n            this.originY_,\n            this.rotateWithView_,\n            this.rotation_,\n            this.scale_,\n            this.width_,\n            this.declutterImageWithText_,\n        ]);\n        this.endGeometry(feature);\n    };\n    /**\n     * @param {import(\"../../geom/MultiPoint.js\").default|import(\"../Feature.js\").default} multiPointGeometry MultiPoint geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasImageBuilder.prototype.drawMultiPoint = function (multiPointGeometry, feature) {\n        if (!this.image_) {\n            return;\n        }\n        this.beginGeometry(multiPointGeometry, feature);\n        var flatCoordinates = multiPointGeometry.getFlatCoordinates();\n        var stride = multiPointGeometry.getStride();\n        var myBegin = this.coordinates.length;\n        var myEnd = this.appendFlatPointCoordinates(flatCoordinates, stride);\n        this.instructions.push([\n            CanvasInstruction.DRAW_IMAGE,\n            myBegin,\n            myEnd,\n            this.image_,\n            // Remaining arguments to DRAW_IMAGE are in alphabetical order\n            this.anchorX_ * this.imagePixelRatio_,\n            this.anchorY_ * this.imagePixelRatio_,\n            Math.ceil(this.height_ * this.imagePixelRatio_),\n            this.opacity_,\n            this.originX_,\n            this.originY_,\n            this.rotateWithView_,\n            this.rotation_,\n            [\n                (this.scale_[0] * this.pixelRatio) / this.imagePixelRatio_,\n                (this.scale_[1] * this.pixelRatio) / this.imagePixelRatio_,\n            ],\n            Math.ceil(this.width_ * this.imagePixelRatio_),\n            this.declutterImageWithText_,\n        ]);\n        this.hitDetectionInstructions.push([\n            CanvasInstruction.DRAW_IMAGE,\n            myBegin,\n            myEnd,\n            this.hitDetectionImage_,\n            // Remaining arguments to DRAW_IMAGE are in alphabetical order\n            this.anchorX_,\n            this.anchorY_,\n            this.height_,\n            this.opacity_,\n            this.originX_,\n            this.originY_,\n            this.rotateWithView_,\n            this.rotation_,\n            this.scale_,\n            this.width_,\n            this.declutterImageWithText_,\n        ]);\n        this.endGeometry(feature);\n    };\n    /**\n     * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n     */\n    CanvasImageBuilder.prototype.finish = function () {\n        this.reverseHitDetectionInstructions();\n        // FIXME this doesn't really protect us against further calls to draw*Geometry\n        this.anchorX_ = undefined;\n        this.anchorY_ = undefined;\n        this.hitDetectionImage_ = null;\n        this.image_ = null;\n        this.imagePixelRatio_ = undefined;\n        this.height_ = undefined;\n        this.scale_ = undefined;\n        this.opacity_ = undefined;\n        this.originX_ = undefined;\n        this.originY_ = undefined;\n        this.rotateWithView_ = undefined;\n        this.rotation_ = undefined;\n        this.width_ = undefined;\n        return _super.prototype.finish.call(this);\n    };\n    /**\n     * @param {import(\"../../style/Image.js\").default} imageStyle Image style.\n     * @param {Object} [opt_sharedData] Shared data.\n     */\n    CanvasImageBuilder.prototype.setImageStyle = function (imageStyle, opt_sharedData) {\n        var anchor = imageStyle.getAnchor();\n        var size = imageStyle.getSize();\n        var hitDetectionImage = imageStyle.getHitDetectionImage();\n        var image = imageStyle.getImage(this.pixelRatio);\n        var origin = imageStyle.getOrigin();\n        this.imagePixelRatio_ = imageStyle.getPixelRatio(this.pixelRatio);\n        this.anchorX_ = anchor[0];\n        this.anchorY_ = anchor[1];\n        this.hitDetectionImage_ = hitDetectionImage;\n        this.image_ = image;\n        this.height_ = size[1];\n        this.opacity_ = imageStyle.getOpacity();\n        this.originX_ = origin[0];\n        this.originY_ = origin[1];\n        this.rotateWithView_ = imageStyle.getRotateWithView();\n        this.rotation_ = imageStyle.getRotation();\n        this.scale_ = imageStyle.getScaleArray();\n        this.width_ = size[0];\n        this.declutterImageWithText_ = opt_sharedData;\n    };\n    return CanvasImageBuilder;\n}(CanvasBuilder));\nexport default CanvasImageBuilder;\n//# sourceMappingURL=ImageBuilder.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/render/canvas/LineStringBuilder\n */\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction, { beginPathInstruction, strokeInstruction, } from './Instruction.js';\nimport { defaultLineDash, defaultLineDashOffset } from '../canvas.js';\nvar CanvasLineStringBuilder = /** @class */ (function (_super) {\n    __extends(CanvasLineStringBuilder, _super);\n    /**\n     * @param {number} tolerance Tolerance.\n     * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     */\n    function CanvasLineStringBuilder(tolerance, maxExtent, resolution, pixelRatio) {\n        return _super.call(this, tolerance, maxExtent, resolution, pixelRatio) || this;\n    }\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {number} end End.\n     * @param {number} stride Stride.\n     * @private\n     * @return {number} end.\n     */\n    CanvasLineStringBuilder.prototype.drawFlatCoordinates_ = function (flatCoordinates, offset, end, stride) {\n        var myBegin = this.coordinates.length;\n        var myEnd = this.appendFlatLineCoordinates(flatCoordinates, offset, end, stride, false, false);\n        var moveToLineToInstruction = [\n            CanvasInstruction.MOVE_TO_LINE_TO,\n            myBegin,\n            myEnd,\n        ];\n        this.instructions.push(moveToLineToInstruction);\n        this.hitDetectionInstructions.push(moveToLineToInstruction);\n        return end;\n    };\n    /**\n     * @param {import(\"../../geom/LineString.js\").default|import(\"../Feature.js\").default} lineStringGeometry Line string geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasLineStringBuilder.prototype.drawLineString = function (lineStringGeometry, feature) {\n        var state = this.state;\n        var strokeStyle = state.strokeStyle;\n        var lineWidth = state.lineWidth;\n        if (strokeStyle === undefined || lineWidth === undefined) {\n            return;\n        }\n        this.updateStrokeStyle(state, this.applyStroke);\n        this.beginGeometry(lineStringGeometry, feature);\n        this.hitDetectionInstructions.push([\n            CanvasInstruction.SET_STROKE_STYLE,\n            state.strokeStyle,\n            state.lineWidth,\n            state.lineCap,\n            state.lineJoin,\n            state.miterLimit,\n            defaultLineDash,\n            defaultLineDashOffset,\n        ], beginPathInstruction);\n        var flatCoordinates = lineStringGeometry.getFlatCoordinates();\n        var stride = lineStringGeometry.getStride();\n        this.drawFlatCoordinates_(flatCoordinates, 0, flatCoordinates.length, stride);\n        this.hitDetectionInstructions.push(strokeInstruction);\n        this.endGeometry(feature);\n    };\n    /**\n     * @param {import(\"../../geom/MultiLineString.js\").default|import(\"../Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasLineStringBuilder.prototype.drawMultiLineString = function (multiLineStringGeometry, feature) {\n        var state = this.state;\n        var strokeStyle = state.strokeStyle;\n        var lineWidth = state.lineWidth;\n        if (strokeStyle === undefined || lineWidth === undefined) {\n            return;\n        }\n        this.updateStrokeStyle(state, this.applyStroke);\n        this.beginGeometry(multiLineStringGeometry, feature);\n        this.hitDetectionInstructions.push([\n            CanvasInstruction.SET_STROKE_STYLE,\n            state.strokeStyle,\n            state.lineWidth,\n            state.lineCap,\n            state.lineJoin,\n            state.miterLimit,\n            state.lineDash,\n            state.lineDashOffset,\n        ], beginPathInstruction);\n        var ends = multiLineStringGeometry.getEnds();\n        var flatCoordinates = multiLineStringGeometry.getFlatCoordinates();\n        var stride = multiLineStringGeometry.getStride();\n        var offset = 0;\n        for (var i = 0, ii = ends.length; i < ii; ++i) {\n            offset = this.drawFlatCoordinates_(flatCoordinates, offset, \n            /** @type {number} */ (ends[i]), stride);\n        }\n        this.hitDetectionInstructions.push(strokeInstruction);\n        this.endGeometry(feature);\n    };\n    /**\n     * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n     */\n    CanvasLineStringBuilder.prototype.finish = function () {\n        var state = this.state;\n        if (state.lastStroke != undefined &&\n            state.lastStroke != this.coordinates.length) {\n            this.instructions.push(strokeInstruction);\n        }\n        this.reverseHitDetectionInstructions();\n        this.state = null;\n        return _super.prototype.finish.call(this);\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillStrokeState} state State.\n     */\n    CanvasLineStringBuilder.prototype.applyStroke = function (state) {\n        if (state.lastStroke != undefined &&\n            state.lastStroke != this.coordinates.length) {\n            this.instructions.push(strokeInstruction);\n            state.lastStroke = this.coordinates.length;\n        }\n        state.lastStroke = 0;\n        _super.prototype.applyStroke.call(this, state);\n        this.instructions.push(beginPathInstruction);\n    };\n    return CanvasLineStringBuilder;\n}(CanvasBuilder));\nexport default CanvasLineStringBuilder;\n//# sourceMappingURL=LineStringBuilder.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/render/canvas/PolygonBuilder\n */\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction, { beginPathInstruction, closePathInstruction, fillInstruction, strokeInstruction, } from './Instruction.js';\nimport { defaultFillStyle } from '../canvas.js';\nimport { snap } from '../../geom/flat/simplify.js';\nvar CanvasPolygonBuilder = /** @class */ (function (_super) {\n    __extends(CanvasPolygonBuilder, _super);\n    /**\n     * @param {number} tolerance Tolerance.\n     * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     */\n    function CanvasPolygonBuilder(tolerance, maxExtent, resolution, pixelRatio) {\n        return _super.call(this, tolerance, maxExtent, resolution, pixelRatio) || this;\n    }\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {Array<number>} ends Ends.\n     * @param {number} stride Stride.\n     * @private\n     * @return {number} End.\n     */\n    CanvasPolygonBuilder.prototype.drawFlatCoordinatess_ = function (flatCoordinates, offset, ends, stride) {\n        var state = this.state;\n        var fill = state.fillStyle !== undefined;\n        var stroke = state.strokeStyle !== undefined;\n        var numEnds = ends.length;\n        this.instructions.push(beginPathInstruction);\n        this.hitDetectionInstructions.push(beginPathInstruction);\n        for (var i = 0; i < numEnds; ++i) {\n            var end = ends[i];\n            var myBegin = this.coordinates.length;\n            var myEnd = this.appendFlatLineCoordinates(flatCoordinates, offset, end, stride, true, !stroke);\n            var moveToLineToInstruction = [\n                CanvasInstruction.MOVE_TO_LINE_TO,\n                myBegin,\n                myEnd,\n            ];\n            this.instructions.push(moveToLineToInstruction);\n            this.hitDetectionInstructions.push(moveToLineToInstruction);\n            if (stroke) {\n                // Performance optimization: only call closePath() when we have a stroke.\n                // Otherwise the ring is closed already (see appendFlatLineCoordinates above).\n                this.instructions.push(closePathInstruction);\n                this.hitDetectionInstructions.push(closePathInstruction);\n            }\n            offset = end;\n        }\n        if (fill) {\n            this.instructions.push(fillInstruction);\n            this.hitDetectionInstructions.push(fillInstruction);\n        }\n        if (stroke) {\n            this.instructions.push(strokeInstruction);\n            this.hitDetectionInstructions.push(strokeInstruction);\n        }\n        return offset;\n    };\n    /**\n     * @param {import(\"../../geom/Circle.js\").default} circleGeometry Circle geometry.\n     * @param {import(\"../../Feature.js\").default} feature Feature.\n     */\n    CanvasPolygonBuilder.prototype.drawCircle = function (circleGeometry, feature) {\n        var state = this.state;\n        var fillStyle = state.fillStyle;\n        var strokeStyle = state.strokeStyle;\n        if (fillStyle === undefined && strokeStyle === undefined) {\n            return;\n        }\n        this.setFillStrokeStyles_();\n        this.beginGeometry(circleGeometry, feature);\n        if (state.fillStyle !== undefined) {\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.SET_FILL_STYLE,\n                defaultFillStyle,\n            ]);\n        }\n        if (state.strokeStyle !== undefined) {\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.SET_STROKE_STYLE,\n                state.strokeStyle,\n                state.lineWidth,\n                state.lineCap,\n                state.lineJoin,\n                state.miterLimit,\n                state.lineDash,\n                state.lineDashOffset,\n            ]);\n        }\n        var flatCoordinates = circleGeometry.getFlatCoordinates();\n        var stride = circleGeometry.getStride();\n        var myBegin = this.coordinates.length;\n        this.appendFlatLineCoordinates(flatCoordinates, 0, flatCoordinates.length, stride, false, false);\n        var circleInstruction = [CanvasInstruction.CIRCLE, myBegin];\n        this.instructions.push(beginPathInstruction, circleInstruction);\n        this.hitDetectionInstructions.push(beginPathInstruction, circleInstruction);\n        if (state.fillStyle !== undefined) {\n            this.instructions.push(fillInstruction);\n            this.hitDetectionInstructions.push(fillInstruction);\n        }\n        if (state.strokeStyle !== undefined) {\n            this.instructions.push(strokeInstruction);\n            this.hitDetectionInstructions.push(strokeInstruction);\n        }\n        this.endGeometry(feature);\n    };\n    /**\n     * @param {import(\"../../geom/Polygon.js\").default|import(\"../Feature.js\").default} polygonGeometry Polygon geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasPolygonBuilder.prototype.drawPolygon = function (polygonGeometry, feature) {\n        var state = this.state;\n        var fillStyle = state.fillStyle;\n        var strokeStyle = state.strokeStyle;\n        if (fillStyle === undefined && strokeStyle === undefined) {\n            return;\n        }\n        this.setFillStrokeStyles_();\n        this.beginGeometry(polygonGeometry, feature);\n        if (state.fillStyle !== undefined) {\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.SET_FILL_STYLE,\n                defaultFillStyle,\n            ]);\n        }\n        if (state.strokeStyle !== undefined) {\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.SET_STROKE_STYLE,\n                state.strokeStyle,\n                state.lineWidth,\n                state.lineCap,\n                state.lineJoin,\n                state.miterLimit,\n                state.lineDash,\n                state.lineDashOffset,\n            ]);\n        }\n        var ends = polygonGeometry.getEnds();\n        var flatCoordinates = polygonGeometry.getOrientedFlatCoordinates();\n        var stride = polygonGeometry.getStride();\n        this.drawFlatCoordinatess_(flatCoordinates, 0, \n        /** @type {Array<number>} */ (ends), stride);\n        this.endGeometry(feature);\n    };\n    /**\n     * @param {import(\"../../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasPolygonBuilder.prototype.drawMultiPolygon = function (multiPolygonGeometry, feature) {\n        var state = this.state;\n        var fillStyle = state.fillStyle;\n        var strokeStyle = state.strokeStyle;\n        if (fillStyle === undefined && strokeStyle === undefined) {\n            return;\n        }\n        this.setFillStrokeStyles_();\n        this.beginGeometry(multiPolygonGeometry, feature);\n        if (state.fillStyle !== undefined) {\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.SET_FILL_STYLE,\n                defaultFillStyle,\n            ]);\n        }\n        if (state.strokeStyle !== undefined) {\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.SET_STROKE_STYLE,\n                state.strokeStyle,\n                state.lineWidth,\n                state.lineCap,\n                state.lineJoin,\n                state.miterLimit,\n                state.lineDash,\n                state.lineDashOffset,\n            ]);\n        }\n        var endss = multiPolygonGeometry.getEndss();\n        var flatCoordinates = multiPolygonGeometry.getOrientedFlatCoordinates();\n        var stride = multiPolygonGeometry.getStride();\n        var offset = 0;\n        for (var i = 0, ii = endss.length; i < ii; ++i) {\n            offset = this.drawFlatCoordinatess_(flatCoordinates, offset, endss[i], stride);\n        }\n        this.endGeometry(feature);\n    };\n    /**\n     * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n     */\n    CanvasPolygonBuilder.prototype.finish = function () {\n        this.reverseHitDetectionInstructions();\n        this.state = null;\n        // We want to preserve topology when drawing polygons.  Polygons are\n        // simplified using quantization and point elimination. However, we might\n        // have received a mix of quantized and non-quantized geometries, so ensure\n        // that all are quantized by quantizing all coordinates in the batch.\n        var tolerance = this.tolerance;\n        if (tolerance !== 0) {\n            var coordinates = this.coordinates;\n            for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n                coordinates[i] = snap(coordinates[i], tolerance);\n            }\n        }\n        return _super.prototype.finish.call(this);\n    };\n    /**\n     * @private\n     */\n    CanvasPolygonBuilder.prototype.setFillStrokeStyles_ = function () {\n        var state = this.state;\n        var fillStyle = state.fillStyle;\n        if (fillStyle !== undefined) {\n            this.updateFillStyle(state, this.createFill);\n        }\n        if (state.strokeStyle !== undefined) {\n            this.updateStrokeStyle(state, this.applyStroke);\n        }\n    };\n    return CanvasPolygonBuilder;\n}(CanvasBuilder));\nexport default CanvasPolygonBuilder;\n//# sourceMappingURL=PolygonBuilder.js.map","/**\n * @module ol/render/canvas/BuilderGroup\n */\nimport Builder from './Builder.js';\nimport ImageBuilder from './ImageBuilder.js';\nimport LineStringBuilder from './LineStringBuilder.js';\nimport PolygonBuilder from './PolygonBuilder.js';\nimport TextBuilder from './TextBuilder.js';\n/**\n * @type {Object<import(\"./BuilderType\").default, typeof Builder>}\n */\nvar BATCH_CONSTRUCTORS = {\n    'Circle': PolygonBuilder,\n    'Default': Builder,\n    'Image': ImageBuilder,\n    'LineString': LineStringBuilder,\n    'Polygon': PolygonBuilder,\n    'Text': TextBuilder,\n};\nvar BuilderGroup = /** @class */ (function () {\n    /**\n     * @param {number} tolerance Tolerance.\n     * @param {import(\"../../extent.js\").Extent} maxExtent Max extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     */\n    function BuilderGroup(tolerance, maxExtent, resolution, pixelRatio) {\n        /**\n         * @private\n         * @type {number}\n         */\n        this.tolerance_ = tolerance;\n        /**\n         * @private\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        this.maxExtent_ = maxExtent;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.pixelRatio_ = pixelRatio;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.resolution_ = resolution;\n        /**\n         * @private\n         * @type {!Object<string, !Object<import(\"./BuilderType\").default, Builder>>}\n         */\n        this.buildersByZIndex_ = {};\n    }\n    /**\n     * @return {!Object<string, !Object<import(\"./BuilderType\").default, import(\"./Builder.js\").SerializableInstructions>>} The serializable instructions\n     */\n    BuilderGroup.prototype.finish = function () {\n        var builderInstructions = {};\n        for (var zKey in this.buildersByZIndex_) {\n            builderInstructions[zKey] = builderInstructions[zKey] || {};\n            var builders = this.buildersByZIndex_[zKey];\n            for (var builderKey in builders) {\n                var builderInstruction = builders[builderKey].finish();\n                builderInstructions[zKey][builderKey] = builderInstruction;\n            }\n        }\n        return builderInstructions;\n    };\n    /**\n     * @param {number|undefined} zIndex Z index.\n     * @param {import(\"./BuilderType.js\").default} builderType Replay type.\n     * @return {import(\"../VectorContext.js\").default} Replay.\n     */\n    BuilderGroup.prototype.getBuilder = function (zIndex, builderType) {\n        var zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';\n        var replays = this.buildersByZIndex_[zIndexKey];\n        if (replays === undefined) {\n            replays = {};\n            this.buildersByZIndex_[zIndexKey] = replays;\n        }\n        var replay = replays[builderType];\n        if (replay === undefined) {\n            var Constructor = BATCH_CONSTRUCTORS[builderType];\n            replay = new Constructor(this.tolerance_, this.maxExtent_, this.resolution_, this.pixelRatio_);\n            replays[builderType] = replay;\n        }\n        return replay;\n    };\n    return BuilderGroup;\n}());\nexport default BuilderGroup;\n//# sourceMappingURL=BuilderGroup.js.map","/**\n * @module ol/geom/flat/textpath\n */\nimport { lerp } from '../../math.js';\nimport { rotate } from './transform.js';\n/**\n * @param {Array<number>} flatCoordinates Path to put text on.\n * @param {number} offset Start offset of the `flatCoordinates`.\n * @param {number} end End offset of the `flatCoordinates`.\n * @param {number} stride Stride.\n * @param {string} text Text to place on the path.\n * @param {number} startM m along the path where the text starts.\n * @param {number} maxAngle Max angle between adjacent chars in radians.\n * @param {number} scale The product of the text scale and the device pixel ratio.\n * @param {function(string, string, Object<string, number>):number} measureAndCacheTextWidth Measure and cache text width.\n * @param {string} font The font.\n * @param {Object<string, number>} cache A cache of measured widths.\n * @param {number} rotation Rotation to apply to the flatCoordinates to determine whether text needs to be reversed.\n * @return {Array<Array<*>>} The result array (or null if `maxAngle` was\n * exceeded). Entries of the array are x, y, anchorX, angle, chunk.\n */\nexport function drawTextOnPath(flatCoordinates, offset, end, stride, text, startM, maxAngle, scale, measureAndCacheTextWidth, font, cache, rotation) {\n    var x2 = flatCoordinates[offset];\n    var y2 = flatCoordinates[offset + 1];\n    var x1 = 0;\n    var y1 = 0;\n    var segmentLength = 0;\n    var segmentM = 0;\n    function advance() {\n        x1 = x2;\n        y1 = y2;\n        offset += stride;\n        x2 = flatCoordinates[offset];\n        y2 = flatCoordinates[offset + 1];\n        segmentM += segmentLength;\n        segmentLength = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n    }\n    do {\n        advance();\n    } while (offset < end - stride && segmentM + segmentLength < startM);\n    var interpolate = (startM - segmentM) / segmentLength;\n    var beginX = lerp(x1, x2, interpolate);\n    var beginY = lerp(y1, y2, interpolate);\n    var startOffset = offset - stride;\n    var startLength = segmentM;\n    var endM = startM + scale * measureAndCacheTextWidth(font, text, cache);\n    while (offset < end - stride && segmentM + segmentLength < endM) {\n        advance();\n    }\n    interpolate = (endM - segmentM) / segmentLength;\n    var endX = lerp(x1, x2, interpolate);\n    var endY = lerp(y1, y2, interpolate);\n    // Keep text upright\n    var reverse;\n    if (rotation) {\n        var flat = [beginX, beginY, endX, endY];\n        rotate(flat, 0, 4, 2, rotation, flat, flat);\n        reverse = flat[0] > flat[2];\n    }\n    else {\n        reverse = beginX > endX;\n    }\n    var PI = Math.PI;\n    var result = [];\n    var singleSegment = startOffset + stride === offset;\n    offset = startOffset;\n    segmentLength = 0;\n    segmentM = startLength;\n    x2 = flatCoordinates[offset];\n    y2 = flatCoordinates[offset + 1];\n    // All on the same segment\n    if (singleSegment) {\n        advance();\n        var previousAngle_1 = Math.atan2(y2 - y1, x2 - x1);\n        if (reverse) {\n            previousAngle_1 += previousAngle_1 > 0 ? -PI : PI;\n        }\n        var x = (endX + beginX) / 2;\n        var y = (endY + beginY) / 2;\n        result[0] = [x, y, (endM - startM) / 2, previousAngle_1, text];\n        return result;\n    }\n    var previousAngle;\n    for (var i = 0, ii = text.length; i < ii;) {\n        advance();\n        var angle = Math.atan2(y2 - y1, x2 - x1);\n        if (reverse) {\n            angle += angle > 0 ? -PI : PI;\n        }\n        if (previousAngle !== undefined) {\n            var delta = angle - previousAngle;\n            delta += delta > PI ? -2 * PI : delta < -PI ? 2 * PI : 0;\n            if (Math.abs(delta) > maxAngle) {\n                return null;\n            }\n        }\n        previousAngle = angle;\n        var iStart = i;\n        var charLength = 0;\n        for (; i < ii; ++i) {\n            var index = reverse ? ii - i - 1 : i;\n            var len = scale * measureAndCacheTextWidth(font, text[index], cache);\n            if (offset + stride < end &&\n                segmentM + segmentLength < startM + charLength + len / 2) {\n                break;\n            }\n            charLength += len;\n        }\n        if (i === iStart) {\n            continue;\n        }\n        var chars = reverse\n            ? text.substring(ii - iStart, ii - i)\n            : text.substring(iStart, i);\n        interpolate = (startM + charLength / 2 - segmentM) / segmentLength;\n        var x = lerp(x1, x2, interpolate);\n        var y = lerp(y1, y2, interpolate);\n        result.push([x, y, charLength / 2, angle, chars]);\n        startM += charLength;\n    }\n    return result;\n}\n//# sourceMappingURL=textpath.js.map","/**\n * @module ol/render/canvas/Executor\n */\nimport CanvasInstruction from './Instruction.js';\nimport { TEXT_ALIGN } from './TextBuilder.js';\nimport { WORKER_OFFSCREEN_CANVAS } from '../../has.js';\nimport { apply as applyTransform, compose as composeTransform, create as createTransform, setFromArray as transformSetFromArray, } from '../../transform.js';\nimport { createEmpty, createOrUpdate, intersects } from '../../extent.js';\nimport { defaultPadding, defaultTextBaseline, drawImageOrLabel, } from '../canvas.js';\nimport { defaultTextAlign, measureAndCacheTextWidth, measureTextHeight, measureTextWidths, } from '../canvas.js';\nimport { drawTextOnPath } from '../../geom/flat/textpath.js';\nimport { equals } from '../../array.js';\nimport { lineStringLength } from '../../geom/flat/length.js';\nimport { transform2D } from '../../geom/flat/transform.js';\n/**\n * @typedef {Object} BBox\n * @property {number} minX Minimal x.\n * @property {number} minY Minimal y.\n * @property {number} maxX Maximal x.\n * @property {number} maxY Maximal y\n * @property {*} value Value.\n */\n/**\n * @typedef {Object} ImageOrLabelDimensions\n * @property {number} drawImageX DrawImageX.\n * @property {number} drawImageY DrawImageY.\n * @property {number} drawImageW DrawImageW.\n * @property {number} drawImageH DrawImageH.\n * @property {number} originX OriginX.\n * @property {number} originY OriginY.\n * @property {Array<number>} scale Scale.\n * @property {BBox} declutterBox DeclutterBox.\n * @property {import(\"../../transform.js\").Transform} canvasTransform CanvasTransform.\n */\n/**\n * @typedef {{0: CanvasRenderingContext2D, 1: number, 2: import(\"../canvas.js\").Label|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement, 3: ImageOrLabelDimensions, 4: number, 5: Array<*>, 6: Array<*>}} ReplayImageOrLabelArgs\n */\n/**\n * @template T\n * @typedef {function(import(\"../../Feature.js\").FeatureLike, import(\"../../geom/SimpleGeometry.js\").default): T} FeatureCallback\n */\n/**\n * @type {import(\"../../extent.js\").Extent}\n */\nvar tmpExtent = createEmpty();\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nvar p1 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nvar p2 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nvar p3 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nvar p4 = [];\n/**\n * @param {ReplayImageOrLabelArgs} replayImageOrLabelArgs Arguments to replayImageOrLabel\n * @return {BBox} Declutter bbox.\n */\nfunction getDeclutterBox(replayImageOrLabelArgs) {\n    return replayImageOrLabelArgs[3].declutterBox;\n}\nvar rtlRegEx = new RegExp(\n/* eslint-disable prettier/prettier */\n'[' +\n    String.fromCharCode(0x00591) + '-' + String.fromCharCode(0x008ff) +\n    String.fromCharCode(0x0fb1d) + '-' + String.fromCharCode(0x0fdff) +\n    String.fromCharCode(0x0fe70) + '-' + String.fromCharCode(0x0fefc) +\n    String.fromCharCode(0x10800) + '-' + String.fromCharCode(0x10fff) +\n    String.fromCharCode(0x1e800) + '-' + String.fromCharCode(0x1efff) +\n    ']'\n/* eslint-enable prettier/prettier */\n);\n/**\n * @param {string} text Text.\n * @param {string} align Alignment.\n * @return {number} Text alignment.\n */\nfunction horizontalTextAlign(text, align) {\n    if ((align === 'start' || align === 'end') && !rtlRegEx.test(text)) {\n        align = align === 'start' ? 'left' : 'right';\n    }\n    return TEXT_ALIGN[align];\n}\nvar Executor = /** @class */ (function () {\n    /**\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {boolean} overlaps The replay can have overlapping geometries.\n     * @param {import(\"../canvas.js\").SerializableInstructions} instructions The serializable instructions\n     */\n    function Executor(resolution, pixelRatio, overlaps, instructions) {\n        /**\n         * @protected\n         * @type {boolean}\n         */\n        this.overlaps = overlaps;\n        /**\n         * @protected\n         * @type {number}\n         */\n        this.pixelRatio = pixelRatio;\n        /**\n         * @protected\n         * @const\n         * @type {number}\n         */\n        this.resolution = resolution;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        this.alignFill_;\n        /**\n         * @protected\n         * @type {Array<*>}\n         */\n        this.instructions = instructions.instructions;\n        /**\n         * @protected\n         * @type {Array<number>}\n         */\n        this.coordinates = instructions.coordinates;\n        /**\n         * @private\n         * @type {!Object<number,import(\"../../coordinate.js\").Coordinate|Array<import(\"../../coordinate.js\").Coordinate>|Array<Array<import(\"../../coordinate.js\").Coordinate>>>}\n         */\n        this.coordinateCache_ = {};\n        /**\n         * @private\n         * @type {!import(\"../../transform.js\").Transform}\n         */\n        this.renderedTransform_ = createTransform();\n        /**\n         * @protected\n         * @type {Array<*>}\n         */\n        this.hitDetectionInstructions = instructions.hitDetectionInstructions;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.pixelCoordinates_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.viewRotation_ = 0;\n        /**\n         * @type {!Object<string, import(\"../canvas.js\").FillState>}\n         */\n        this.fillStates = instructions.fillStates || {};\n        /**\n         * @type {!Object<string, import(\"../canvas.js\").StrokeState>}\n         */\n        this.strokeStates = instructions.strokeStates || {};\n        /**\n         * @type {!Object<string, import(\"../canvas.js\").TextState>}\n         */\n        this.textStates = instructions.textStates || {};\n        /**\n         * @private\n         * @type {Object<string, Object<string, number>>}\n         */\n        this.widths_ = {};\n        /**\n         * @private\n         * @type {Object<string, import(\"../canvas.js\").Label>}\n         */\n        this.labels_ = {};\n    }\n    /**\n     * @param {string} text Text.\n     * @param {string} textKey Text style key.\n     * @param {string} fillKey Fill style key.\n     * @param {string} strokeKey Stroke style key.\n     * @return {import(\"../canvas.js\").Label} Label.\n     */\n    Executor.prototype.createLabel = function (text, textKey, fillKey, strokeKey) {\n        var key = text + textKey + fillKey + strokeKey;\n        if (this.labels_[key]) {\n            return this.labels_[key];\n        }\n        var strokeState = strokeKey ? this.strokeStates[strokeKey] : null;\n        var fillState = fillKey ? this.fillStates[fillKey] : null;\n        var textState = this.textStates[textKey];\n        var pixelRatio = this.pixelRatio;\n        var scale = [\n            textState.scale[0] * pixelRatio,\n            textState.scale[1] * pixelRatio,\n        ];\n        var align = horizontalTextAlign(text, textState.textAlign || defaultTextAlign);\n        var strokeWidth = strokeKey && strokeState.lineWidth ? strokeState.lineWidth : 0;\n        var lines = text.split('\\n');\n        var numLines = lines.length;\n        var widths = [];\n        var width = measureTextWidths(textState.font, lines, widths);\n        var lineHeight = measureTextHeight(textState.font);\n        var height = lineHeight * numLines;\n        var renderWidth = width + strokeWidth;\n        var contextInstructions = [];\n        // make canvas 2 pixels wider to account for italic text width measurement errors\n        var w = (renderWidth + 2) * scale[0];\n        var h = (height + strokeWidth) * scale[1];\n        /** @type {import(\"../canvas.js\").Label} */\n        var label = {\n            width: w < 0 ? Math.floor(w) : Math.ceil(w),\n            height: h < 0 ? Math.floor(h) : Math.ceil(h),\n            contextInstructions: contextInstructions,\n        };\n        if (scale[0] != 1 || scale[1] != 1) {\n            contextInstructions.push('scale', scale);\n        }\n        contextInstructions.push('font', textState.font);\n        if (strokeKey) {\n            contextInstructions.push('strokeStyle', strokeState.strokeStyle);\n            contextInstructions.push('lineWidth', strokeWidth);\n            contextInstructions.push('lineCap', strokeState.lineCap);\n            contextInstructions.push('lineJoin', strokeState.lineJoin);\n            contextInstructions.push('miterLimit', strokeState.miterLimit);\n            // eslint-disable-next-line\n            var Context = WORKER_OFFSCREEN_CANVAS ? OffscreenCanvasRenderingContext2D : CanvasRenderingContext2D;\n            if (Context.prototype.setLineDash) {\n                contextInstructions.push('setLineDash', [strokeState.lineDash]);\n                contextInstructions.push('lineDashOffset', strokeState.lineDashOffset);\n            }\n        }\n        if (fillKey) {\n            contextInstructions.push('fillStyle', fillState.fillStyle);\n        }\n        contextInstructions.push('textBaseline', 'middle');\n        contextInstructions.push('textAlign', 'center');\n        var leftRight = 0.5 - align;\n        var x = align * renderWidth + leftRight * strokeWidth;\n        var i;\n        if (strokeKey) {\n            for (i = 0; i < numLines; ++i) {\n                contextInstructions.push('strokeText', [\n                    lines[i],\n                    x + leftRight * widths[i],\n                    0.5 * (strokeWidth + lineHeight) + i * lineHeight,\n                ]);\n            }\n        }\n        if (fillKey) {\n            for (i = 0; i < numLines; ++i) {\n                contextInstructions.push('fillText', [\n                    lines[i],\n                    x + leftRight * widths[i],\n                    0.5 * (strokeWidth + lineHeight) + i * lineHeight,\n                ]);\n            }\n        }\n        this.labels_[key] = label;\n        return label;\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../coordinate.js\").Coordinate} p1 1st point of the background box.\n     * @param {import(\"../../coordinate.js\").Coordinate} p2 2nd point of the background box.\n     * @param {import(\"../../coordinate.js\").Coordinate} p3 3rd point of the background box.\n     * @param {import(\"../../coordinate.js\").Coordinate} p4 4th point of the background box.\n     * @param {Array<*>} fillInstruction Fill instruction.\n     * @param {Array<*>} strokeInstruction Stroke instruction.\n     */\n    Executor.prototype.replayTextBackground_ = function (context, p1, p2, p3, p4, fillInstruction, strokeInstruction) {\n        context.beginPath();\n        context.moveTo.apply(context, p1);\n        context.lineTo.apply(context, p2);\n        context.lineTo.apply(context, p3);\n        context.lineTo.apply(context, p4);\n        context.lineTo.apply(context, p1);\n        if (fillInstruction) {\n            this.alignFill_ = /** @type {boolean} */ (fillInstruction[2]);\n            this.fill_(context);\n        }\n        if (strokeInstruction) {\n            this.setStrokeStyle_(context, \n            /** @type {Array<*>} */ (strokeInstruction));\n            context.stroke();\n        }\n    };\n    /**\n     * @private\n     * @param {number} sheetWidth Width of the sprite sheet.\n     * @param {number} sheetHeight Height of the sprite sheet.\n     * @param {number} centerX X.\n     * @param {number} centerY Y.\n     * @param {number} width Width.\n     * @param {number} height Height.\n     * @param {number} anchorX Anchor X.\n     * @param {number} anchorY Anchor Y.\n     * @param {number} originX Origin X.\n     * @param {number} originY Origin Y.\n     * @param {number} rotation Rotation.\n     * @param {import(\"../../size.js\").Size} scale Scale.\n     * @param {boolean} snapToPixel Snap to pixel.\n     * @param {Array<number>} padding Padding.\n     * @param {boolean} fillStroke Background fill or stroke.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     * @return {ImageOrLabelDimensions} Dimensions for positioning and decluttering the image or label.\n     */\n    Executor.prototype.calculateImageOrLabelDimensions_ = function (sheetWidth, sheetHeight, centerX, centerY, width, height, anchorX, anchorY, originX, originY, rotation, scale, snapToPixel, padding, fillStroke, feature) {\n        anchorX *= scale[0];\n        anchorY *= scale[1];\n        var x = centerX - anchorX;\n        var y = centerY - anchorY;\n        var w = width + originX > sheetWidth ? sheetWidth - originX : width;\n        var h = height + originY > sheetHeight ? sheetHeight - originY : height;\n        var boxW = padding[3] + w * scale[0] + padding[1];\n        var boxH = padding[0] + h * scale[1] + padding[2];\n        var boxX = x - padding[3];\n        var boxY = y - padding[0];\n        if (fillStroke || rotation !== 0) {\n            p1[0] = boxX;\n            p4[0] = boxX;\n            p1[1] = boxY;\n            p2[1] = boxY;\n            p2[0] = boxX + boxW;\n            p3[0] = p2[0];\n            p3[1] = boxY + boxH;\n            p4[1] = p3[1];\n        }\n        var transform;\n        if (rotation !== 0) {\n            transform = composeTransform(createTransform(), centerX, centerY, 1, 1, rotation, -centerX, -centerY);\n            applyTransform(transform, p1);\n            applyTransform(transform, p2);\n            applyTransform(transform, p3);\n            applyTransform(transform, p4);\n            createOrUpdate(Math.min(p1[0], p2[0], p3[0], p4[0]), Math.min(p1[1], p2[1], p3[1], p4[1]), Math.max(p1[0], p2[0], p3[0], p4[0]), Math.max(p1[1], p2[1], p3[1], p4[1]), tmpExtent);\n        }\n        else {\n            createOrUpdate(Math.min(boxX, boxX + boxW), Math.min(boxY, boxY + boxH), Math.max(boxX, boxX + boxW), Math.max(boxY, boxY + boxH), tmpExtent);\n        }\n        if (snapToPixel) {\n            x = Math.round(x);\n            y = Math.round(y);\n        }\n        return {\n            drawImageX: x,\n            drawImageY: y,\n            drawImageW: w,\n            drawImageH: h,\n            originX: originX,\n            originY: originY,\n            declutterBox: {\n                minX: tmpExtent[0],\n                minY: tmpExtent[1],\n                maxX: tmpExtent[2],\n                maxY: tmpExtent[3],\n                value: feature,\n            },\n            canvasTransform: transform,\n            scale: scale,\n        };\n    };\n    /**\n     * @private\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {number} contextScale Scale of the context.\n     * @param {import(\"../canvas.js\").Label|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} imageOrLabel Image.\n     * @param {ImageOrLabelDimensions} dimensions Dimensions.\n     * @param {number} opacity Opacity.\n     * @param {Array<*>} fillInstruction Fill instruction.\n     * @param {Array<*>} strokeInstruction Stroke instruction.\n     * @return {boolean} The image or label was rendered.\n     */\n    Executor.prototype.replayImageOrLabel_ = function (context, contextScale, imageOrLabel, dimensions, opacity, fillInstruction, strokeInstruction) {\n        var fillStroke = !!(fillInstruction || strokeInstruction);\n        var box = dimensions.declutterBox;\n        var canvas = context.canvas;\n        var strokePadding = strokeInstruction\n            ? (strokeInstruction[2] * dimensions.scale[0]) / 2\n            : 0;\n        var intersects = box.minX - strokePadding <= canvas.width / contextScale &&\n            box.maxX + strokePadding >= 0 &&\n            box.minY - strokePadding <= canvas.height / contextScale &&\n            box.maxY + strokePadding >= 0;\n        if (intersects) {\n            if (fillStroke) {\n                this.replayTextBackground_(context, p1, p2, p3, p4, \n                /** @type {Array<*>} */ (fillInstruction), \n                /** @type {Array<*>} */ (strokeInstruction));\n            }\n            drawImageOrLabel(context, dimensions.canvasTransform, opacity, imageOrLabel, dimensions.originX, dimensions.originY, dimensions.drawImageW, dimensions.drawImageH, dimensions.drawImageX, dimensions.drawImageY, dimensions.scale);\n        }\n        return true;\n    };\n    /**\n     * @private\n     * @param {CanvasRenderingContext2D} context Context.\n     */\n    Executor.prototype.fill_ = function (context) {\n        if (this.alignFill_) {\n            var origin_1 = applyTransform(this.renderedTransform_, [0, 0]);\n            var repeatSize = 512 * this.pixelRatio;\n            context.save();\n            context.translate(origin_1[0] % repeatSize, origin_1[1] % repeatSize);\n            context.rotate(this.viewRotation_);\n        }\n        context.fill();\n        if (this.alignFill_) {\n            context.restore();\n        }\n    };\n    /**\n     * @private\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {Array<*>} instruction Instruction.\n     */\n    Executor.prototype.setStrokeStyle_ = function (context, instruction) {\n        context['strokeStyle'] =\n            /** @type {import(\"../../colorlike.js\").ColorLike} */ (instruction[1]);\n        context.lineWidth = /** @type {number} */ (instruction[2]);\n        context.lineCap = /** @type {CanvasLineCap} */ (instruction[3]);\n        context.lineJoin = /** @type {CanvasLineJoin} */ (instruction[4]);\n        context.miterLimit = /** @type {number} */ (instruction[5]);\n        if (context.setLineDash) {\n            context.lineDashOffset = /** @type {number} */ (instruction[7]);\n            context.setLineDash(/** @type {Array<number>} */ (instruction[6]));\n        }\n    };\n    /**\n     * @private\n     * @param {string} text The text to draw.\n     * @param {string} textKey The key of the text state.\n     * @param {string} strokeKey The key for the stroke state.\n     * @param {string} fillKey The key for the fill state.\n     * @return {{label: import(\"../canvas.js\").Label, anchorX: number, anchorY: number}} The text image and its anchor.\n     */\n    Executor.prototype.drawLabelWithPointPlacement_ = function (text, textKey, strokeKey, fillKey) {\n        var textState = this.textStates[textKey];\n        var label = this.createLabel(text, textKey, fillKey, strokeKey);\n        var strokeState = this.strokeStates[strokeKey];\n        var pixelRatio = this.pixelRatio;\n        var align = horizontalTextAlign(text, textState.textAlign || defaultTextAlign);\n        var baseline = TEXT_ALIGN[textState.textBaseline || defaultTextBaseline];\n        var strokeWidth = strokeState && strokeState.lineWidth ? strokeState.lineWidth : 0;\n        // Remove the 2 pixels we added in createLabel() for the anchor\n        var width = label.width / pixelRatio - 2 * textState.scale[0];\n        var anchorX = align * width + 2 * (0.5 - align) * strokeWidth;\n        var anchorY = (baseline * label.height) / pixelRatio +\n            2 * (0.5 - baseline) * strokeWidth;\n        return {\n            label: label,\n            anchorX: anchorX,\n            anchorY: anchorY,\n        };\n    };\n    /**\n     * @private\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {number} contextScale Scale of the context.\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     * @param {Array<*>} instructions Instructions array.\n     * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n     * @param {FeatureCallback<T>} [opt_featureCallback] Feature callback.\n     * @param {import(\"../../extent.js\").Extent} [opt_hitExtent] Only check\n     *     features that intersect this extent.\n     * @param {import(\"rbush\").default} [opt_declutterTree] Declutter tree.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    Executor.prototype.execute_ = function (context, contextScale, transform, instructions, snapToPixel, opt_featureCallback, opt_hitExtent, opt_declutterTree) {\n        /** @type {Array<number>} */\n        var pixelCoordinates;\n        if (this.pixelCoordinates_ && equals(transform, this.renderedTransform_)) {\n            pixelCoordinates = this.pixelCoordinates_;\n        }\n        else {\n            if (!this.pixelCoordinates_) {\n                this.pixelCoordinates_ = [];\n            }\n            pixelCoordinates = transform2D(this.coordinates, 0, this.coordinates.length, 2, transform, this.pixelCoordinates_);\n            transformSetFromArray(this.renderedTransform_, transform);\n        }\n        var i = 0; // instruction index\n        var ii = instructions.length; // end of instructions\n        var d = 0; // data index\n        var dd; // end of per-instruction data\n        var anchorX, anchorY, prevX, prevY, roundX, roundY, image, text, textKey, strokeKey, fillKey;\n        var pendingFill = 0;\n        var pendingStroke = 0;\n        var lastFillInstruction = null;\n        var lastStrokeInstruction = null;\n        var coordinateCache = this.coordinateCache_;\n        var viewRotation = this.viewRotation_;\n        var viewRotationFromTransform = Math.round(Math.atan2(-transform[1], transform[0]) * 1e12) / 1e12;\n        var state = /** @type {import(\"../../render.js\").State} */ ({\n            context: context,\n            pixelRatio: this.pixelRatio,\n            resolution: this.resolution,\n            rotation: viewRotation,\n        });\n        // When the batch size gets too big, performance decreases. 200 is a good\n        // balance between batch size and number of fill/stroke instructions.\n        var batchSize = this.instructions != instructions || this.overlaps ? 0 : 200;\n        var /** @type {import(\"../../Feature.js\").FeatureLike} */ feature;\n        var x, y, currentGeometry;\n        while (i < ii) {\n            var instruction = instructions[i];\n            var type = /** @type {import(\"./Instruction.js\").default} */ (instruction[0]);\n            switch (type) {\n                case CanvasInstruction.BEGIN_GEOMETRY:\n                    feature = /** @type {import(\"../../Feature.js\").FeatureLike} */ (instruction[1]);\n                    currentGeometry = instruction[3];\n                    if (!feature.getGeometry()) {\n                        i = /** @type {number} */ (instruction[2]);\n                    }\n                    else if (opt_hitExtent !== undefined &&\n                        !intersects(opt_hitExtent, currentGeometry.getExtent())) {\n                        i = /** @type {number} */ (instruction[2]) + 1;\n                    }\n                    else {\n                        ++i;\n                    }\n                    break;\n                case CanvasInstruction.BEGIN_PATH:\n                    if (pendingFill > batchSize) {\n                        this.fill_(context);\n                        pendingFill = 0;\n                    }\n                    if (pendingStroke > batchSize) {\n                        context.stroke();\n                        pendingStroke = 0;\n                    }\n                    if (!pendingFill && !pendingStroke) {\n                        context.beginPath();\n                        prevX = NaN;\n                        prevY = NaN;\n                    }\n                    ++i;\n                    break;\n                case CanvasInstruction.CIRCLE:\n                    d = /** @type {number} */ (instruction[1]);\n                    var x1 = pixelCoordinates[d];\n                    var y1 = pixelCoordinates[d + 1];\n                    var x2 = pixelCoordinates[d + 2];\n                    var y2 = pixelCoordinates[d + 3];\n                    var dx = x2 - x1;\n                    var dy = y2 - y1;\n                    var r = Math.sqrt(dx * dx + dy * dy);\n                    context.moveTo(x1 + r, y1);\n                    context.arc(x1, y1, r, 0, 2 * Math.PI, true);\n                    ++i;\n                    break;\n                case CanvasInstruction.CLOSE_PATH:\n                    context.closePath();\n                    ++i;\n                    break;\n                case CanvasInstruction.CUSTOM:\n                    d = /** @type {number} */ (instruction[1]);\n                    dd = instruction[2];\n                    var geometry = \n                    /** @type {import(\"../../geom/SimpleGeometry.js\").default} */ (instruction[3]);\n                    var renderer = instruction[4];\n                    var fn = instruction.length == 6 ? instruction[5] : undefined;\n                    state.geometry = geometry;\n                    state.feature = feature;\n                    if (!(i in coordinateCache)) {\n                        coordinateCache[i] = [];\n                    }\n                    var coords = coordinateCache[i];\n                    if (fn) {\n                        fn(pixelCoordinates, d, dd, 2, coords);\n                    }\n                    else {\n                        coords[0] = pixelCoordinates[d];\n                        coords[1] = pixelCoordinates[d + 1];\n                        coords.length = 2;\n                    }\n                    renderer(coords, state);\n                    ++i;\n                    break;\n                case CanvasInstruction.DRAW_IMAGE:\n                    d = /** @type {number} */ (instruction[1]);\n                    dd = /** @type {number} */ (instruction[2]);\n                    image =\n                        /** @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} */ (instruction[3]);\n                    // Remaining arguments in DRAW_IMAGE are in alphabetical order\n                    anchorX = /** @type {number} */ (instruction[4]);\n                    anchorY = /** @type {number} */ (instruction[5]);\n                    var height = /** @type {number} */ (instruction[6]);\n                    var opacity = /** @type {number} */ (instruction[7]);\n                    var originX = /** @type {number} */ (instruction[8]);\n                    var originY = /** @type {number} */ (instruction[9]);\n                    var rotateWithView = /** @type {boolean} */ (instruction[10]);\n                    var rotation = /** @type {number} */ (instruction[11]);\n                    var scale = /** @type {import(\"../../size.js\").Size} */ (instruction[12]);\n                    var width = /** @type {number} */ (instruction[13]);\n                    var declutterImageWithText = \n                    /** @type {import(\"../canvas.js\").DeclutterImageWithText} */ (instruction[14]);\n                    if (!image && instruction.length >= 19) {\n                        // create label images\n                        text = /** @type {string} */ (instruction[18]);\n                        textKey = /** @type {string} */ (instruction[19]);\n                        strokeKey = /** @type {string} */ (instruction[20]);\n                        fillKey = /** @type {string} */ (instruction[21]);\n                        var labelWithAnchor = this.drawLabelWithPointPlacement_(text, textKey, strokeKey, fillKey);\n                        image = labelWithAnchor.label;\n                        instruction[3] = image;\n                        var textOffsetX = /** @type {number} */ (instruction[22]);\n                        anchorX = (labelWithAnchor.anchorX - textOffsetX) * this.pixelRatio;\n                        instruction[4] = anchorX;\n                        var textOffsetY = /** @type {number} */ (instruction[23]);\n                        anchorY = (labelWithAnchor.anchorY - textOffsetY) * this.pixelRatio;\n                        instruction[5] = anchorY;\n                        height = image.height;\n                        instruction[6] = height;\n                        width = image.width;\n                        instruction[13] = width;\n                    }\n                    var geometryWidths = void 0;\n                    if (instruction.length > 24) {\n                        geometryWidths = /** @type {number} */ (instruction[24]);\n                    }\n                    var padding = void 0, backgroundFill = void 0, backgroundStroke = void 0;\n                    if (instruction.length > 16) {\n                        padding = /** @type {Array<number>} */ (instruction[15]);\n                        backgroundFill = /** @type {boolean} */ (instruction[16]);\n                        backgroundStroke = /** @type {boolean} */ (instruction[17]);\n                    }\n                    else {\n                        padding = defaultPadding;\n                        backgroundFill = false;\n                        backgroundStroke = false;\n                    }\n                    if (rotateWithView && viewRotationFromTransform) {\n                        // Canvas is expected to be rotated to reverse view rotation.\n                        rotation += viewRotation;\n                    }\n                    else if (!rotateWithView && !viewRotationFromTransform) {\n                        // Canvas is not rotated, images need to be rotated back to be north-up.\n                        rotation -= viewRotation;\n                    }\n                    var widthIndex = 0;\n                    for (; d < dd; d += 2) {\n                        if (geometryWidths &&\n                            geometryWidths[widthIndex++] < width / this.pixelRatio) {\n                            continue;\n                        }\n                        var dimensions = this.calculateImageOrLabelDimensions_(image.width, image.height, pixelCoordinates[d], pixelCoordinates[d + 1], width, height, anchorX, anchorY, originX, originY, rotation, scale, snapToPixel, padding, backgroundFill || backgroundStroke, feature);\n                        /** @type {ReplayImageOrLabelArgs} */\n                        var args = [\n                            context,\n                            contextScale,\n                            image,\n                            dimensions,\n                            opacity,\n                            backgroundFill\n                                ? /** @type {Array<*>} */ (lastFillInstruction)\n                                : null,\n                            backgroundStroke\n                                ? /** @type {Array<*>} */ (lastStrokeInstruction)\n                                : null,\n                        ];\n                        var imageArgs = void 0;\n                        var imageDeclutterBox = void 0;\n                        if (opt_declutterTree && declutterImageWithText) {\n                            var index = dd - d;\n                            if (!declutterImageWithText[index]) {\n                                // We now have the image for an image+text combination.\n                                declutterImageWithText[index] = args;\n                                // Don't render anything for now, wait for the text.\n                                continue;\n                            }\n                            imageArgs = declutterImageWithText[index];\n                            delete declutterImageWithText[index];\n                            imageDeclutterBox = getDeclutterBox(imageArgs);\n                            if (opt_declutterTree.collides(imageDeclutterBox)) {\n                                continue;\n                            }\n                        }\n                        if (opt_declutterTree &&\n                            opt_declutterTree.collides(dimensions.declutterBox)) {\n                            continue;\n                        }\n                        if (imageArgs) {\n                            // We now have image and text for an image+text combination.\n                            if (opt_declutterTree) {\n                                opt_declutterTree.insert(imageDeclutterBox);\n                            }\n                            // Render the image before we render the text.\n                            this.replayImageOrLabel_.apply(this, imageArgs);\n                        }\n                        if (opt_declutterTree) {\n                            opt_declutterTree.insert(dimensions.declutterBox);\n                        }\n                        this.replayImageOrLabel_.apply(this, args);\n                    }\n                    ++i;\n                    break;\n                case CanvasInstruction.DRAW_CHARS:\n                    var begin = /** @type {number} */ (instruction[1]);\n                    var end = /** @type {number} */ (instruction[2]);\n                    var baseline = /** @type {number} */ (instruction[3]);\n                    var overflow = /** @type {number} */ (instruction[4]);\n                    fillKey = /** @type {string} */ (instruction[5]);\n                    var maxAngle = /** @type {number} */ (instruction[6]);\n                    var measurePixelRatio = /** @type {number} */ (instruction[7]);\n                    var offsetY = /** @type {number} */ (instruction[8]);\n                    strokeKey = /** @type {string} */ (instruction[9]);\n                    var strokeWidth = /** @type {number} */ (instruction[10]);\n                    text = /** @type {string} */ (instruction[11]);\n                    textKey = /** @type {string} */ (instruction[12]);\n                    var pixelRatioScale = [\n                        /** @type {number} */ (instruction[13]),\n                        /** @type {number} */ (instruction[13]),\n                    ];\n                    var textState = this.textStates[textKey];\n                    var font = textState.font;\n                    var textScale = [\n                        textState.scale[0] * measurePixelRatio,\n                        textState.scale[1] * measurePixelRatio,\n                    ];\n                    var cachedWidths = void 0;\n                    if (font in this.widths_) {\n                        cachedWidths = this.widths_[font];\n                    }\n                    else {\n                        cachedWidths = {};\n                        this.widths_[font] = cachedWidths;\n                    }\n                    var pathLength = lineStringLength(pixelCoordinates, begin, end, 2);\n                    var textLength = Math.abs(textScale[0]) *\n                        measureAndCacheTextWidth(font, text, cachedWidths);\n                    if (overflow || textLength <= pathLength) {\n                        var textAlign = this.textStates[textKey].textAlign;\n                        var startM = (pathLength - textLength) * TEXT_ALIGN[textAlign];\n                        var parts = drawTextOnPath(pixelCoordinates, begin, end, 2, text, startM, maxAngle, Math.abs(textScale[0]), measureAndCacheTextWidth, font, cachedWidths, viewRotationFromTransform ? 0 : this.viewRotation_);\n                        drawChars: if (parts) {\n                            /** @type {Array<ReplayImageOrLabelArgs>} */\n                            var replayImageOrLabelArgs = [];\n                            var c = void 0, cc = void 0, chars = void 0, label = void 0, part = void 0;\n                            if (strokeKey) {\n                                for (c = 0, cc = parts.length; c < cc; ++c) {\n                                    part = parts[c]; // x, y, anchorX, rotation, chunk\n                                    chars = /** @type {string} */ (part[4]);\n                                    label = this.createLabel(chars, textKey, '', strokeKey);\n                                    anchorX =\n                                        /** @type {number} */ (part[2]) +\n                                            (textScale[0] < 0 ? -strokeWidth : strokeWidth);\n                                    anchorY =\n                                        baseline * label.height +\n                                            ((0.5 - baseline) * 2 * strokeWidth * textScale[1]) /\n                                                textScale[0] -\n                                            offsetY;\n                                    var dimensions = this.calculateImageOrLabelDimensions_(label.width, label.height, part[0], part[1], label.width, label.height, anchorX, anchorY, 0, 0, part[3], pixelRatioScale, false, defaultPadding, false, feature);\n                                    if (opt_declutterTree &&\n                                        opt_declutterTree.collides(dimensions.declutterBox)) {\n                                        break drawChars;\n                                    }\n                                    replayImageOrLabelArgs.push([\n                                        context,\n                                        contextScale,\n                                        label,\n                                        dimensions,\n                                        1,\n                                        null,\n                                        null,\n                                    ]);\n                                }\n                            }\n                            if (fillKey) {\n                                for (c = 0, cc = parts.length; c < cc; ++c) {\n                                    part = parts[c]; // x, y, anchorX, rotation, chunk\n                                    chars = /** @type {string} */ (part[4]);\n                                    label = this.createLabel(chars, textKey, fillKey, '');\n                                    anchorX = /** @type {number} */ (part[2]);\n                                    anchorY = baseline * label.height - offsetY;\n                                    var dimensions = this.calculateImageOrLabelDimensions_(label.width, label.height, part[0], part[1], label.width, label.height, anchorX, anchorY, 0, 0, part[3], pixelRatioScale, false, defaultPadding, false, feature);\n                                    if (opt_declutterTree &&\n                                        opt_declutterTree.collides(dimensions.declutterBox)) {\n                                        break drawChars;\n                                    }\n                                    replayImageOrLabelArgs.push([\n                                        context,\n                                        contextScale,\n                                        label,\n                                        dimensions,\n                                        1,\n                                        null,\n                                        null,\n                                    ]);\n                                }\n                            }\n                            if (opt_declutterTree) {\n                                opt_declutterTree.load(replayImageOrLabelArgs.map(getDeclutterBox));\n                            }\n                            for (var i_1 = 0, ii_1 = replayImageOrLabelArgs.length; i_1 < ii_1; ++i_1) {\n                                this.replayImageOrLabel_.apply(this, replayImageOrLabelArgs[i_1]);\n                            }\n                        }\n                    }\n                    ++i;\n                    break;\n                case CanvasInstruction.END_GEOMETRY:\n                    if (opt_featureCallback !== undefined) {\n                        feature = /** @type {import(\"../../Feature.js\").FeatureLike} */ (instruction[1]);\n                        var result = opt_featureCallback(feature, currentGeometry);\n                        if (result) {\n                            return result;\n                        }\n                    }\n                    ++i;\n                    break;\n                case CanvasInstruction.FILL:\n                    if (batchSize) {\n                        pendingFill++;\n                    }\n                    else {\n                        this.fill_(context);\n                    }\n                    ++i;\n                    break;\n                case CanvasInstruction.MOVE_TO_LINE_TO:\n                    d = /** @type {number} */ (instruction[1]);\n                    dd = /** @type {number} */ (instruction[2]);\n                    x = pixelCoordinates[d];\n                    y = pixelCoordinates[d + 1];\n                    roundX = (x + 0.5) | 0;\n                    roundY = (y + 0.5) | 0;\n                    if (roundX !== prevX || roundY !== prevY) {\n                        context.moveTo(x, y);\n                        prevX = roundX;\n                        prevY = roundY;\n                    }\n                    for (d += 2; d < dd; d += 2) {\n                        x = pixelCoordinates[d];\n                        y = pixelCoordinates[d + 1];\n                        roundX = (x + 0.5) | 0;\n                        roundY = (y + 0.5) | 0;\n                        if (d == dd - 2 || roundX !== prevX || roundY !== prevY) {\n                            context.lineTo(x, y);\n                            prevX = roundX;\n                            prevY = roundY;\n                        }\n                    }\n                    ++i;\n                    break;\n                case CanvasInstruction.SET_FILL_STYLE:\n                    lastFillInstruction = instruction;\n                    this.alignFill_ = instruction[2];\n                    if (pendingFill) {\n                        this.fill_(context);\n                        pendingFill = 0;\n                        if (pendingStroke) {\n                            context.stroke();\n                            pendingStroke = 0;\n                        }\n                    }\n                    context.fillStyle =\n                        /** @type {import(\"../../colorlike.js\").ColorLike} */ (instruction[1]);\n                    ++i;\n                    break;\n                case CanvasInstruction.SET_STROKE_STYLE:\n                    lastStrokeInstruction = instruction;\n                    if (pendingStroke) {\n                        context.stroke();\n                        pendingStroke = 0;\n                    }\n                    this.setStrokeStyle_(context, /** @type {Array<*>} */ (instruction));\n                    ++i;\n                    break;\n                case CanvasInstruction.STROKE:\n                    if (batchSize) {\n                        pendingStroke++;\n                    }\n                    else {\n                        context.stroke();\n                    }\n                    ++i;\n                    break;\n                default:\n                    ++i; // consume the instruction anyway, to avoid an infinite loop\n                    break;\n            }\n        }\n        if (pendingFill) {\n            this.fill_(context);\n        }\n        if (pendingStroke) {\n            context.stroke();\n        }\n        return undefined;\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {number} contextScale Scale of the context.\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     * @param {number} viewRotation View rotation.\n     * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n     * @param {import(\"rbush\").default} [opt_declutterTree] Declutter tree.\n     */\n    Executor.prototype.execute = function (context, contextScale, transform, viewRotation, snapToPixel, opt_declutterTree) {\n        this.viewRotation_ = viewRotation;\n        this.execute_(context, contextScale, transform, this.instructions, snapToPixel, undefined, undefined, opt_declutterTree);\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     * @param {number} viewRotation View rotation.\n     * @param {FeatureCallback<T>} [opt_featureCallback] Feature callback.\n     * @param {import(\"../../extent.js\").Extent} [opt_hitExtent] Only check\n     *     features that intersect this extent.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    Executor.prototype.executeHitDetection = function (context, transform, viewRotation, opt_featureCallback, opt_hitExtent) {\n        this.viewRotation_ = viewRotation;\n        return this.execute_(context, 1, transform, this.hitDetectionInstructions, true, opt_featureCallback, opt_hitExtent);\n    };\n    return Executor;\n}());\nexport default Executor;\n//# sourceMappingURL=Executor.js.map","/**\n * @module ol/render/canvas/ExecutorGroup\n */\nimport BuilderType from './BuilderType.js';\nimport Executor from './Executor.js';\nimport { buffer, createEmpty, extendCoordinate } from '../../extent.js';\nimport { compose as composeTransform, create as createTransform, } from '../../transform.js';\nimport { createCanvasContext2D } from '../../dom.js';\nimport { isEmpty } from '../../obj.js';\nimport { numberSafeCompareFunction } from '../../array.js';\nimport { transform2D } from '../../geom/flat/transform.js';\n/**\n * @const\n * @type {Array<import(\"./BuilderType.js\").default>}\n */\nvar ORDER = [\n    BuilderType.POLYGON,\n    BuilderType.CIRCLE,\n    BuilderType.LINE_STRING,\n    BuilderType.IMAGE,\n    BuilderType.TEXT,\n    BuilderType.DEFAULT,\n];\nvar ExecutorGroup = /** @class */ (function () {\n    /**\n     * @param {import(\"../../extent.js\").Extent} maxExtent Max extent for clipping. When a\n     * `maxExtent` was set on the Builder for this executor group, the same `maxExtent`\n     * should be set here, unless the target context does not exceed that extent (which\n     * can be the case when rendering to tiles).\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {boolean} overlaps The executor group can have overlapping geometries.\n     * @param {!Object<string, !Object<import(\"./BuilderType.js\").default, import(\"../canvas.js\").SerializableInstructions>>} allInstructions\n     * The serializable instructions.\n     * @param {number} [opt_renderBuffer] Optional rendering buffer.\n     */\n    function ExecutorGroup(maxExtent, resolution, pixelRatio, overlaps, allInstructions, opt_renderBuffer) {\n        /**\n         * @private\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        this.maxExtent_ = maxExtent;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        this.overlaps_ = overlaps;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.pixelRatio_ = pixelRatio;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.resolution_ = resolution;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        this.renderBuffer_ = opt_renderBuffer;\n        /**\n         * @private\n         * @type {!Object<string, !Object<import(\"./BuilderType.js\").default, import(\"./Executor\").default>>}\n         */\n        this.executorsByZIndex_ = {};\n        /**\n         * @private\n         * @type {CanvasRenderingContext2D}\n         */\n        this.hitDetectionContext_ = null;\n        /**\n         * @private\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        this.hitDetectionTransform_ = createTransform();\n        this.createExecutors_(allInstructions);\n    }\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     */\n    ExecutorGroup.prototype.clip = function (context, transform) {\n        var flatClipCoords = this.getClipCoords(transform);\n        context.beginPath();\n        context.moveTo(flatClipCoords[0], flatClipCoords[1]);\n        context.lineTo(flatClipCoords[2], flatClipCoords[3]);\n        context.lineTo(flatClipCoords[4], flatClipCoords[5]);\n        context.lineTo(flatClipCoords[6], flatClipCoords[7]);\n        context.clip();\n    };\n    /**\n     * Create executors and populate them using the provided instructions.\n     * @private\n     * @param {!Object<string, !Object<import(\"./BuilderType.js\").default, import(\"../canvas.js\").SerializableInstructions>>} allInstructions The serializable instructions\n     */\n    ExecutorGroup.prototype.createExecutors_ = function (allInstructions) {\n        for (var zIndex in allInstructions) {\n            var executors = this.executorsByZIndex_[zIndex];\n            if (executors === undefined) {\n                executors = {};\n                this.executorsByZIndex_[zIndex] = executors;\n            }\n            var instructionByZindex = allInstructions[zIndex];\n            for (var builderType in instructionByZindex) {\n                var instructions = instructionByZindex[builderType];\n                executors[builderType] = new Executor(this.resolution_, this.pixelRatio_, this.overlaps_, instructions);\n            }\n        }\n    };\n    /**\n     * @param {Array<import(\"./BuilderType.js\").default>} executors Executors.\n     * @return {boolean} Has executors of the provided types.\n     */\n    ExecutorGroup.prototype.hasExecutors = function (executors) {\n        for (var zIndex in this.executorsByZIndex_) {\n            var candidates = this.executorsByZIndex_[zIndex];\n            for (var i = 0, ii = executors.length; i < ii; ++i) {\n                if (executors[i] in candidates) {\n                    return true;\n                }\n            }\n        }\n        return false;\n    };\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {number} resolution Resolution.\n     * @param {number} rotation Rotation.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../../Feature.js\").FeatureLike, import(\"../../geom/SimpleGeometry.js\").default, number): T} callback Feature callback.\n     * @param {Array<import(\"../../Feature.js\").FeatureLike>} declutteredFeatures Decluttered features.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    ExecutorGroup.prototype.forEachFeatureAtCoordinate = function (coordinate, resolution, rotation, hitTolerance, callback, declutteredFeatures) {\n        hitTolerance = Math.round(hitTolerance);\n        var contextSize = hitTolerance * 2 + 1;\n        var transform = composeTransform(this.hitDetectionTransform_, hitTolerance + 0.5, hitTolerance + 0.5, 1 / resolution, -1 / resolution, -rotation, -coordinate[0], -coordinate[1]);\n        var newContext = !this.hitDetectionContext_;\n        if (newContext) {\n            this.hitDetectionContext_ = createCanvasContext2D(contextSize, contextSize);\n        }\n        var context = this.hitDetectionContext_;\n        if (context.canvas.width !== contextSize ||\n            context.canvas.height !== contextSize) {\n            context.canvas.width = contextSize;\n            context.canvas.height = contextSize;\n        }\n        else if (!newContext) {\n            context.clearRect(0, 0, contextSize, contextSize);\n        }\n        /**\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        var hitExtent;\n        if (this.renderBuffer_ !== undefined) {\n            hitExtent = createEmpty();\n            extendCoordinate(hitExtent, coordinate);\n            buffer(hitExtent, resolution * (this.renderBuffer_ + hitTolerance), hitExtent);\n        }\n        var indexes = getPixelIndexArray(hitTolerance);\n        var builderType;\n        /**\n         * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n         * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n         * @return {T|undefined} Callback result.\n         */\n        function featureCallback(feature, geometry) {\n            var imageData = context.getImageData(0, 0, contextSize, contextSize).data;\n            for (var i_1 = 0, ii = indexes.length; i_1 < ii; i_1++) {\n                if (imageData[indexes[i_1]] > 0) {\n                    if (!declutteredFeatures ||\n                        (builderType !== BuilderType.IMAGE &&\n                            builderType !== BuilderType.TEXT) ||\n                        declutteredFeatures.indexOf(feature) !== -1) {\n                        var idx = (indexes[i_1] - 3) / 4;\n                        var x = hitTolerance - (idx % contextSize);\n                        var y = hitTolerance - ((idx / contextSize) | 0);\n                        var result_1 = callback(feature, geometry, x * x + y * y);\n                        if (result_1) {\n                            return result_1;\n                        }\n                    }\n                    context.clearRect(0, 0, contextSize, contextSize);\n                    break;\n                }\n            }\n            return undefined;\n        }\n        /** @type {Array<number>} */\n        var zs = Object.keys(this.executorsByZIndex_).map(Number);\n        zs.sort(numberSafeCompareFunction);\n        var i, j, executors, executor, result;\n        for (i = zs.length - 1; i >= 0; --i) {\n            var zIndexKey = zs[i].toString();\n            executors = this.executorsByZIndex_[zIndexKey];\n            for (j = ORDER.length - 1; j >= 0; --j) {\n                builderType = ORDER[j];\n                executor = executors[builderType];\n                if (executor !== undefined) {\n                    result = executor.executeHitDetection(context, transform, rotation, featureCallback, hitExtent);\n                    if (result) {\n                        return result;\n                    }\n                }\n            }\n        }\n        return undefined;\n    };\n    /**\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     * @return {Array<number>} Clip coordinates.\n     */\n    ExecutorGroup.prototype.getClipCoords = function (transform) {\n        var maxExtent = this.maxExtent_;\n        if (!maxExtent) {\n            return null;\n        }\n        var minX = maxExtent[0];\n        var minY = maxExtent[1];\n        var maxX = maxExtent[2];\n        var maxY = maxExtent[3];\n        var flatClipCoords = [minX, minY, minX, maxY, maxX, maxY, maxX, minY];\n        transform2D(flatClipCoords, 0, 8, 2, transform, flatClipCoords);\n        return flatClipCoords;\n    };\n    /**\n     * @return {boolean} Is empty.\n     */\n    ExecutorGroup.prototype.isEmpty = function () {\n        return isEmpty(this.executorsByZIndex_);\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {number} contextScale Scale of the context.\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     * @param {number} viewRotation View rotation.\n     * @param {boolean} snapToPixel Snap point symbols and test to integer pixel.\n     * @param {Array<import(\"./BuilderType.js\").default>} [opt_builderTypes] Ordered replay types to replay.\n     *     Default is {@link module:ol/render/replay~ORDER}\n     * @param {import(\"rbush\").default} [opt_declutterTree] Declutter tree.\n     */\n    ExecutorGroup.prototype.execute = function (context, contextScale, transform, viewRotation, snapToPixel, opt_builderTypes, opt_declutterTree) {\n        /** @type {Array<number>} */\n        var zs = Object.keys(this.executorsByZIndex_).map(Number);\n        zs.sort(numberSafeCompareFunction);\n        // setup clipping so that the parts of over-simplified geometries are not\n        // visible outside the current extent when panning\n        if (this.maxExtent_) {\n            context.save();\n            this.clip(context, transform);\n        }\n        var builderTypes = opt_builderTypes ? opt_builderTypes : ORDER;\n        var i, ii, j, jj, replays, replay;\n        if (opt_declutterTree) {\n            zs.reverse();\n        }\n        for (i = 0, ii = zs.length; i < ii; ++i) {\n            var zIndexKey = zs[i].toString();\n            replays = this.executorsByZIndex_[zIndexKey];\n            for (j = 0, jj = builderTypes.length; j < jj; ++j) {\n                var builderType = builderTypes[j];\n                replay = replays[builderType];\n                if (replay !== undefined) {\n                    replay.execute(context, contextScale, transform, viewRotation, snapToPixel, opt_declutterTree);\n                }\n            }\n        }\n        if (this.maxExtent_) {\n            context.restore();\n        }\n    };\n    return ExecutorGroup;\n}());\n/**\n * This cache is used to store arrays of indexes for calculated pixel circles\n * to increase performance.\n * It is a static property to allow each Replaygroup to access it.\n * @type {Object<number, Array<number>>}\n */\nvar circlePixelIndexArrayCache = {};\n/**\n * This methods creates an array with indexes of all pixels within a circle,\n * ordered by how close they are to the center.\n * A cache is used to increase performance.\n * @param {number} radius Radius.\n * @return {Array<number>} An array with indexes within a circle.\n */\nexport function getPixelIndexArray(radius) {\n    if (circlePixelIndexArrayCache[radius] !== undefined) {\n        return circlePixelIndexArrayCache[radius];\n    }\n    var size = radius * 2 + 1;\n    var maxDistanceSq = radius * radius;\n    var distances = new Array(maxDistanceSq + 1);\n    for (var i = 0; i <= radius; ++i) {\n        for (var j = 0; j <= radius; ++j) {\n            var distanceSq = i * i + j * j;\n            if (distanceSq > maxDistanceSq) {\n                break;\n            }\n            var distance = distances[distanceSq];\n            if (!distance) {\n                distance = [];\n                distances[distanceSq] = distance;\n            }\n            distance.push(((radius + i) * size + (radius + j)) * 4 + 3);\n            if (i > 0) {\n                distance.push(((radius - i) * size + (radius + j)) * 4 + 3);\n            }\n            if (j > 0) {\n                distance.push(((radius + i) * size + (radius - j)) * 4 + 3);\n                if (i > 0) {\n                    distance.push(((radius - i) * size + (radius - j)) * 4 + 3);\n                }\n            }\n        }\n    }\n    var pixelIndex = [];\n    for (var i = 0, ii = distances.length; i < ii; ++i) {\n        if (distances[i]) {\n            pixelIndex.push.apply(pixelIndex, distances[i]);\n        }\n    }\n    circlePixelIndexArrayCache[radius] = pixelIndex;\n    return pixelIndex;\n}\nexport default ExecutorGroup;\n//# sourceMappingURL=ExecutorGroup.js.map","/**\n * @module ol/geom/flat/straightchunk\n */\n/**\n * @param {number} maxAngle Maximum acceptable angle delta between segments.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Array<number>} Start and end of the first suitable chunk of the\n * given `flatCoordinates`.\n */\nexport function matchingChunk(maxAngle, flatCoordinates, offset, end, stride) {\n    var chunkStart = offset;\n    var chunkEnd = offset;\n    var chunkM = 0;\n    var m = 0;\n    var start = offset;\n    var acos, i, m12, m23, x1, y1, x12, y12, x23, y23;\n    for (i = offset; i < end; i += stride) {\n        var x2 = flatCoordinates[i];\n        var y2 = flatCoordinates[i + 1];\n        if (x1 !== undefined) {\n            x23 = x2 - x1;\n            y23 = y2 - y1;\n            m23 = Math.sqrt(x23 * x23 + y23 * y23);\n            if (x12 !== undefined) {\n                m += m12;\n                acos = Math.acos((x12 * x23 + y12 * y23) / (m12 * m23));\n                if (acos > maxAngle) {\n                    if (m > chunkM) {\n                        chunkM = m;\n                        chunkStart = start;\n                        chunkEnd = i;\n                    }\n                    m = 0;\n                    start = i - stride;\n                }\n            }\n            m12 = m23;\n            x12 = x23;\n            y12 = y23;\n        }\n        x1 = x2;\n        y1 = y2;\n    }\n    m += m23;\n    return m > chunkM ? [start, i] : [chunkStart, chunkEnd];\n}\n//# sourceMappingURL=straightchunk.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/render/canvas/TextBuilder\n */\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction from './Instruction.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport TextPlacement from '../../style/TextPlacement.js';\nimport { asColorLike } from '../../colorlike.js';\nimport { defaultFillStyle, defaultFont, defaultLineCap, defaultLineDash, defaultLineDashOffset, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultPadding, defaultStrokeStyle, defaultTextAlign, defaultTextBaseline, registerFont, } from '../canvas.js';\nimport { getUid } from '../../util.js';\nimport { intersects } from '../../extent.js';\nimport { matchingChunk } from '../../geom/flat/straightchunk.js';\n/**\n * @const\n * @enum {number}\n */\nexport var TEXT_ALIGN = {\n    'left': 0,\n    'end': 0,\n    'center': 0.5,\n    'right': 1,\n    'start': 1,\n    'top': 0,\n    'middle': 0.5,\n    'hanging': 0.2,\n    'alphabetic': 0.8,\n    'ideographic': 0.8,\n    'bottom': 1,\n};\nvar CanvasTextBuilder = /** @class */ (function (_super) {\n    __extends(CanvasTextBuilder, _super);\n    /**\n     * @param {number} tolerance Tolerance.\n     * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     */\n    function CanvasTextBuilder(tolerance, maxExtent, resolution, pixelRatio) {\n        var _this = _super.call(this, tolerance, maxExtent, resolution, pixelRatio) || this;\n        /**\n         * @private\n         * @type {Array<HTMLCanvasElement>}\n         */\n        _this.labels_ = null;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.text_ = '';\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.textOffsetX_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.textOffsetY_ = 0;\n        /**\n         * @private\n         * @type {boolean|undefined}\n         */\n        _this.textRotateWithView_ = undefined;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.textRotation_ = 0;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").FillState}\n         */\n        _this.textFillState_ = null;\n        /**\n         * @type {!Object<string, import(\"../canvas.js\").FillState>}\n         */\n        _this.fillStates = {};\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").StrokeState}\n         */\n        _this.textStrokeState_ = null;\n        /**\n         * @type {!Object<string, import(\"../canvas.js\").StrokeState>}\n         */\n        _this.strokeStates = {};\n        /**\n         * @private\n         * @type {import(\"../canvas.js\").TextState}\n         */\n        _this.textState_ = /** @type {import(\"../canvas.js\").TextState} */ ({});\n        /**\n         * @type {!Object<string, import(\"../canvas.js\").TextState>}\n         */\n        _this.textStates = {};\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.textKey_ = '';\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.fillKey_ = '';\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.strokeKey_ = '';\n        /**\n         * Data shared with an image builder for combined decluttering.\n         * @private\n         * @type {import(\"../canvas.js\").DeclutterImageWithText}\n         */\n        _this.declutterImageWithText_ = undefined;\n        return _this;\n    }\n    /**\n     * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n     */\n    CanvasTextBuilder.prototype.finish = function () {\n        var instructions = _super.prototype.finish.call(this);\n        instructions.textStates = this.textStates;\n        instructions.fillStates = this.fillStates;\n        instructions.strokeStates = this.strokeStates;\n        return instructions;\n    };\n    /**\n     * @param {import(\"../../geom/SimpleGeometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     */\n    CanvasTextBuilder.prototype.drawText = function (geometry, feature) {\n        var fillState = this.textFillState_;\n        var strokeState = this.textStrokeState_;\n        var textState = this.textState_;\n        if (this.text_ === '' || !textState || (!fillState && !strokeState)) {\n            return;\n        }\n        var coordinates = this.coordinates;\n        var begin = coordinates.length;\n        var geometryType = geometry.getType();\n        var flatCoordinates = null;\n        var stride = geometry.getStride();\n        if (textState.placement === TextPlacement.LINE &&\n            (geometryType == GeometryType.LINE_STRING ||\n                geometryType == GeometryType.MULTI_LINE_STRING ||\n                geometryType == GeometryType.POLYGON ||\n                geometryType == GeometryType.MULTI_POLYGON)) {\n            if (!intersects(this.getBufferedMaxExtent(), geometry.getExtent())) {\n                return;\n            }\n            var ends = void 0;\n            flatCoordinates = geometry.getFlatCoordinates();\n            if (geometryType == GeometryType.LINE_STRING) {\n                ends = [flatCoordinates.length];\n            }\n            else if (geometryType == GeometryType.MULTI_LINE_STRING) {\n                ends = /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry).getEnds();\n            }\n            else if (geometryType == GeometryType.POLYGON) {\n                ends = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry)\n                    .getEnds()\n                    .slice(0, 1);\n            }\n            else if (geometryType == GeometryType.MULTI_POLYGON) {\n                var endss = \n                /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getEndss();\n                ends = [];\n                for (var i = 0, ii = endss.length; i < ii; ++i) {\n                    ends.push(endss[i][0]);\n                }\n            }\n            this.beginGeometry(geometry, feature);\n            var textAlign = textState.textAlign;\n            var flatOffset = 0;\n            var flatEnd = void 0;\n            for (var o = 0, oo = ends.length; o < oo; ++o) {\n                if (textAlign == undefined) {\n                    var range = matchingChunk(textState.maxAngle, flatCoordinates, flatOffset, ends[o], stride);\n                    flatOffset = range[0];\n                    flatEnd = range[1];\n                }\n                else {\n                    flatEnd = ends[o];\n                }\n                for (var i = flatOffset; i < flatEnd; i += stride) {\n                    coordinates.push(flatCoordinates[i], flatCoordinates[i + 1]);\n                }\n                var end = coordinates.length;\n                flatOffset = ends[o];\n                this.drawChars_(begin, end);\n                begin = end;\n            }\n            this.endGeometry(feature);\n        }\n        else {\n            var geometryWidths = textState.overflow ? null : [];\n            switch (geometryType) {\n                case GeometryType.POINT:\n                case GeometryType.MULTI_POINT:\n                    flatCoordinates =\n                        /** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry).getFlatCoordinates();\n                    break;\n                case GeometryType.LINE_STRING:\n                    flatCoordinates =\n                        /** @type {import(\"../../geom/LineString.js\").default} */ (geometry).getFlatMidpoint();\n                    break;\n                case GeometryType.CIRCLE:\n                    flatCoordinates =\n                        /** @type {import(\"../../geom/Circle.js\").default} */ (geometry).getCenter();\n                    break;\n                case GeometryType.MULTI_LINE_STRING:\n                    flatCoordinates =\n                        /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry).getFlatMidpoints();\n                    stride = 2;\n                    break;\n                case GeometryType.POLYGON:\n                    flatCoordinates =\n                        /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry).getFlatInteriorPoint();\n                    if (!textState.overflow) {\n                        geometryWidths.push(flatCoordinates[2] / this.resolution);\n                    }\n                    stride = 3;\n                    break;\n                case GeometryType.MULTI_POLYGON:\n                    var interiorPoints = \n                    /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getFlatInteriorPoints();\n                    flatCoordinates = [];\n                    for (var i = 0, ii = interiorPoints.length; i < ii; i += 3) {\n                        if (!textState.overflow) {\n                            geometryWidths.push(interiorPoints[i + 2] / this.resolution);\n                        }\n                        flatCoordinates.push(interiorPoints[i], interiorPoints[i + 1]);\n                    }\n                    if (flatCoordinates.length === 0) {\n                        return;\n                    }\n                    stride = 2;\n                    break;\n                default:\n            }\n            var end = this.appendFlatPointCoordinates(flatCoordinates, stride);\n            if (end === begin) {\n                return;\n            }\n            if (geometryWidths &&\n                (end - begin) / 2 !== flatCoordinates.length / stride) {\n                var beg_1 = begin / 2;\n                geometryWidths = geometryWidths.filter(function (w, i) {\n                    var keep = coordinates[(beg_1 + i) * 2] === flatCoordinates[i * stride] &&\n                        coordinates[(beg_1 + i) * 2 + 1] === flatCoordinates[i * stride + 1];\n                    if (!keep) {\n                        --beg_1;\n                    }\n                    return keep;\n                });\n            }\n            this.saveTextStates_();\n            if (textState.backgroundFill || textState.backgroundStroke) {\n                this.setFillStrokeStyle(textState.backgroundFill, textState.backgroundStroke);\n                if (textState.backgroundFill) {\n                    this.updateFillStyle(this.state, this.createFill);\n                    this.hitDetectionInstructions.push(this.createFill(this.state));\n                }\n                if (textState.backgroundStroke) {\n                    this.updateStrokeStyle(this.state, this.applyStroke);\n                    this.hitDetectionInstructions.push(this.createStroke(this.state));\n                }\n            }\n            this.beginGeometry(geometry, feature);\n            // adjust padding for negative scale\n            var padding = textState.padding;\n            if (padding != defaultPadding &&\n                (textState.scale[0] < 0 || textState.scale[1] < 0)) {\n                var p0 = textState.padding[0];\n                var p1 = textState.padding[1];\n                var p2 = textState.padding[2];\n                var p3 = textState.padding[3];\n                if (textState.scale[0] < 0) {\n                    p1 = -p1;\n                    p3 = -p3;\n                }\n                if (textState.scale[1] < 0) {\n                    p0 = -p0;\n                    p2 = -p2;\n                }\n                padding = [p0, p1, p2, p3];\n            }\n            // The image is unknown at this stage so we pass null; it will be computed at render time.\n            // For clarity, we pass NaN for offsetX, offsetY, width and height, which will be computed at\n            // render time.\n            var pixelRatio_1 = this.pixelRatio;\n            this.instructions.push([\n                CanvasInstruction.DRAW_IMAGE,\n                begin,\n                end,\n                null,\n                NaN,\n                NaN,\n                NaN,\n                1,\n                0,\n                0,\n                this.textRotateWithView_,\n                this.textRotation_,\n                [1, 1],\n                NaN,\n                this.declutterImageWithText_,\n                padding == defaultPadding\n                    ? defaultPadding\n                    : padding.map(function (p) {\n                        return p * pixelRatio_1;\n                    }),\n                !!textState.backgroundFill,\n                !!textState.backgroundStroke,\n                this.text_,\n                this.textKey_,\n                this.strokeKey_,\n                this.fillKey_,\n                this.textOffsetX_,\n                this.textOffsetY_,\n                geometryWidths,\n            ]);\n            var scale = 1 / pixelRatio_1;\n            this.hitDetectionInstructions.push([\n                CanvasInstruction.DRAW_IMAGE,\n                begin,\n                end,\n                null,\n                NaN,\n                NaN,\n                NaN,\n                1,\n                0,\n                0,\n                this.textRotateWithView_,\n                this.textRotation_,\n                [scale, scale],\n                NaN,\n                this.declutterImageWithText_,\n                padding,\n                !!textState.backgroundFill,\n                !!textState.backgroundStroke,\n                this.text_,\n                this.textKey_,\n                this.strokeKey_,\n                this.fillKey_,\n                this.textOffsetX_,\n                this.textOffsetY_,\n                geometryWidths,\n            ]);\n            this.endGeometry(feature);\n        }\n    };\n    /**\n     * @private\n     */\n    CanvasTextBuilder.prototype.saveTextStates_ = function () {\n        var strokeState = this.textStrokeState_;\n        var textState = this.textState_;\n        var fillState = this.textFillState_;\n        var strokeKey = this.strokeKey_;\n        if (strokeState) {\n            if (!(strokeKey in this.strokeStates)) {\n                this.strokeStates[strokeKey] = {\n                    strokeStyle: strokeState.strokeStyle,\n                    lineCap: strokeState.lineCap,\n                    lineDashOffset: strokeState.lineDashOffset,\n                    lineWidth: strokeState.lineWidth,\n                    lineJoin: strokeState.lineJoin,\n                    miterLimit: strokeState.miterLimit,\n                    lineDash: strokeState.lineDash,\n                };\n            }\n        }\n        var textKey = this.textKey_;\n        if (!(textKey in this.textStates)) {\n            this.textStates[textKey] = {\n                font: textState.font,\n                textAlign: textState.textAlign || defaultTextAlign,\n                textBaseline: textState.textBaseline || defaultTextBaseline,\n                scale: textState.scale,\n            };\n        }\n        var fillKey = this.fillKey_;\n        if (fillState) {\n            if (!(fillKey in this.fillStates)) {\n                this.fillStates[fillKey] = {\n                    fillStyle: fillState.fillStyle,\n                };\n            }\n        }\n    };\n    /**\n     * @private\n     * @param {number} begin Begin.\n     * @param {number} end End.\n     */\n    CanvasTextBuilder.prototype.drawChars_ = function (begin, end) {\n        var strokeState = this.textStrokeState_;\n        var textState = this.textState_;\n        var strokeKey = this.strokeKey_;\n        var textKey = this.textKey_;\n        var fillKey = this.fillKey_;\n        this.saveTextStates_();\n        var pixelRatio = this.pixelRatio;\n        var baseline = TEXT_ALIGN[textState.textBaseline];\n        var offsetY = this.textOffsetY_ * pixelRatio;\n        var text = this.text_;\n        var strokeWidth = strokeState\n            ? (strokeState.lineWidth * Math.abs(textState.scale[0])) / 2\n            : 0;\n        this.instructions.push([\n            CanvasInstruction.DRAW_CHARS,\n            begin,\n            end,\n            baseline,\n            textState.overflow,\n            fillKey,\n            textState.maxAngle,\n            pixelRatio,\n            offsetY,\n            strokeKey,\n            strokeWidth * pixelRatio,\n            text,\n            textKey,\n            1,\n        ]);\n        this.hitDetectionInstructions.push([\n            CanvasInstruction.DRAW_CHARS,\n            begin,\n            end,\n            baseline,\n            textState.overflow,\n            fillKey,\n            textState.maxAngle,\n            1,\n            offsetY,\n            strokeKey,\n            strokeWidth,\n            text,\n            textKey,\n            1 / pixelRatio,\n        ]);\n    };\n    /**\n     * @param {import(\"../../style/Text.js\").default} textStyle Text style.\n     * @param {Object} [opt_sharedData] Shared data.\n     */\n    CanvasTextBuilder.prototype.setTextStyle = function (textStyle, opt_sharedData) {\n        var textState, fillState, strokeState;\n        if (!textStyle) {\n            this.text_ = '';\n        }\n        else {\n            var textFillStyle = textStyle.getFill();\n            if (!textFillStyle) {\n                fillState = null;\n                this.textFillState_ = fillState;\n            }\n            else {\n                fillState = this.textFillState_;\n                if (!fillState) {\n                    fillState = /** @type {import(\"../canvas.js\").FillState} */ ({});\n                    this.textFillState_ = fillState;\n                }\n                fillState.fillStyle = asColorLike(textFillStyle.getColor() || defaultFillStyle);\n            }\n            var textStrokeStyle = textStyle.getStroke();\n            if (!textStrokeStyle) {\n                strokeState = null;\n                this.textStrokeState_ = strokeState;\n            }\n            else {\n                strokeState = this.textStrokeState_;\n                if (!strokeState) {\n                    strokeState = /** @type {import(\"../canvas.js\").StrokeState} */ ({});\n                    this.textStrokeState_ = strokeState;\n                }\n                var lineDash = textStrokeStyle.getLineDash();\n                var lineDashOffset = textStrokeStyle.getLineDashOffset();\n                var lineWidth = textStrokeStyle.getWidth();\n                var miterLimit = textStrokeStyle.getMiterLimit();\n                strokeState.lineCap = textStrokeStyle.getLineCap() || defaultLineCap;\n                strokeState.lineDash = lineDash ? lineDash.slice() : defaultLineDash;\n                strokeState.lineDashOffset =\n                    lineDashOffset === undefined ? defaultLineDashOffset : lineDashOffset;\n                strokeState.lineJoin = textStrokeStyle.getLineJoin() || defaultLineJoin;\n                strokeState.lineWidth =\n                    lineWidth === undefined ? defaultLineWidth : lineWidth;\n                strokeState.miterLimit =\n                    miterLimit === undefined ? defaultMiterLimit : miterLimit;\n                strokeState.strokeStyle = asColorLike(textStrokeStyle.getColor() || defaultStrokeStyle);\n            }\n            textState = this.textState_;\n            var font = textStyle.getFont() || defaultFont;\n            registerFont(font);\n            var textScale = textStyle.getScaleArray();\n            textState.overflow = textStyle.getOverflow();\n            textState.font = font;\n            textState.maxAngle = textStyle.getMaxAngle();\n            textState.placement = textStyle.getPlacement();\n            textState.textAlign = textStyle.getTextAlign();\n            textState.textBaseline =\n                textStyle.getTextBaseline() || defaultTextBaseline;\n            textState.backgroundFill = textStyle.getBackgroundFill();\n            textState.backgroundStroke = textStyle.getBackgroundStroke();\n            textState.padding = textStyle.getPadding() || defaultPadding;\n            textState.scale = textScale === undefined ? [1, 1] : textScale;\n            var textOffsetX = textStyle.getOffsetX();\n            var textOffsetY = textStyle.getOffsetY();\n            var textRotateWithView = textStyle.getRotateWithView();\n            var textRotation = textStyle.getRotation();\n            this.text_ = textStyle.getText() || '';\n            this.textOffsetX_ = textOffsetX === undefined ? 0 : textOffsetX;\n            this.textOffsetY_ = textOffsetY === undefined ? 0 : textOffsetY;\n            this.textRotateWithView_ =\n                textRotateWithView === undefined ? false : textRotateWithView;\n            this.textRotation_ = textRotation === undefined ? 0 : textRotation;\n            this.strokeKey_ = strokeState\n                ? (typeof strokeState.strokeStyle == 'string'\n                    ? strokeState.strokeStyle\n                    : getUid(strokeState.strokeStyle)) +\n                    strokeState.lineCap +\n                    strokeState.lineDashOffset +\n                    '|' +\n                    strokeState.lineWidth +\n                    strokeState.lineJoin +\n                    strokeState.miterLimit +\n                    '[' +\n                    strokeState.lineDash.join() +\n                    ']'\n                : '';\n            this.textKey_ =\n                textState.font +\n                    textState.scale +\n                    (textState.textAlign || '?') +\n                    (textState.textBaseline || '?');\n            this.fillKey_ = fillState\n                ? typeof fillState.fillStyle == 'string'\n                    ? fillState.fillStyle\n                    : '|' + getUid(fillState.fillStyle)\n                : '';\n        }\n        this.declutterImageWithText_ = opt_sharedData;\n    };\n    return CanvasTextBuilder;\n}(CanvasBuilder));\nexport default CanvasTextBuilder;\n//# sourceMappingURL=TextBuilder.js.map","/**\n * @module ol/source/TileJSON\n */\n// FIXME check order of async callbacks\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * See https://mapbox.com/developers/api/.\n */\nimport SourceState from './State.js';\nimport TileImage from './TileImage.js';\nimport { applyTransform, intersects } from '../extent.js';\nimport { assert } from '../asserts.js';\nimport { createFromTemplates } from '../tileurlfunction.js';\nimport { createXYZ, extentFromProjection } from '../tilegrid.js';\nimport { get as getProjection, getTransformFromProjections } from '../proj.js';\nimport { jsonp as requestJSONP } from '../net.js';\n/**\n * @typedef {Object} Config\n * @property {string} [name] The name.\n * @property {string} [description] The description.\n * @property {string} [version] The version.\n * @property {string} [attribution] The attribution.\n * @property {string} [template] The template.\n * @property {string} [legend] The legend.\n * @property {string} [scheme] The scheme.\n * @property {Array<string>} tiles The tile URL templates.\n * @property {Array<string>} [grids] Optional grids.\n * @property {number} [minzoom] Minimum zoom level.\n * @property {number} [maxzoom] Maximum zoom level.\n * @property {Array<number>} [bounds] Optional bounds.\n * @property {Array<number>} [center] Optional center.\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {boolean} [jsonp=false] Use JSONP with callback to load the TileJSON.\n * Useful when the server does not support CORS..\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {Config} [tileJSON] TileJSON configuration for this source.\n * If not provided, `url` must be configured.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {number|import(\"../size.js\").Size} [tileSize=[256, 256]] The tile size used by the tile service.\n * Note: `tileSize` and other non-standard TileJSON properties are currently ignored.\n * @property {string} [url] URL to the TileJSON file. If not provided, `tileJSON` must be configured.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n/**\n * @classdesc\n * Layer source for tile data in TileJSON format.\n * @api\n */\nvar TileJSON = /** @class */ (function (_super) {\n    __extends(TileJSON, _super);\n    /**\n     * @param {Options} options TileJSON options.\n     */\n    function TileJSON(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            projection: getProjection('EPSG:3857'),\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            state: SourceState.LOADING,\n            tileLoadFunction: options.tileLoadFunction,\n            wrapX: options.wrapX !== undefined ? options.wrapX : true,\n            transition: options.transition,\n            zDirection: options.zDirection,\n        }) || this;\n        /**\n         * @type {Config}\n         * @private\n         */\n        _this.tileJSON_ = null;\n        /**\n         * @type {number|import(\"../size.js\").Size}\n         * @private\n         */\n        _this.tileSize_ = options.tileSize;\n        if (options.url) {\n            if (options.jsonp) {\n                requestJSONP(options.url, _this.handleTileJSONResponse.bind(_this), _this.handleTileJSONError.bind(_this));\n            }\n            else {\n                var client = new XMLHttpRequest();\n                client.addEventListener('load', _this.onXHRLoad_.bind(_this));\n                client.addEventListener('error', _this.onXHRError_.bind(_this));\n                client.open('GET', options.url);\n                client.send();\n            }\n        }\n        else if (options.tileJSON) {\n            _this.handleTileJSONResponse(options.tileJSON);\n        }\n        else {\n            assert(false, 51); // Either `url` or `tileJSON` options must be provided\n        }\n        return _this;\n    }\n    /**\n     * @private\n     * @param {Event} event The load event.\n     */\n    TileJSON.prototype.onXHRLoad_ = function (event) {\n        var client = /** @type {XMLHttpRequest} */ (event.target);\n        // status will be 0 for file:// urls\n        if (!client.status || (client.status >= 200 && client.status < 300)) {\n            var response = void 0;\n            try {\n                response = /** @type {TileJSON} */ (JSON.parse(client.responseText));\n            }\n            catch (err) {\n                this.handleTileJSONError();\n                return;\n            }\n            this.handleTileJSONResponse(response);\n        }\n        else {\n            this.handleTileJSONError();\n        }\n    };\n    /**\n     * @private\n     * @param {Event} event The error event.\n     */\n    TileJSON.prototype.onXHRError_ = function (event) {\n        this.handleTileJSONError();\n    };\n    /**\n     * @return {Config} The tilejson object.\n     * @api\n     */\n    TileJSON.prototype.getTileJSON = function () {\n        return this.tileJSON_;\n    };\n    /**\n     * @protected\n     * @param {Config} tileJSON Tile JSON.\n     */\n    TileJSON.prototype.handleTileJSONResponse = function (tileJSON) {\n        var epsg4326Projection = getProjection('EPSG:4326');\n        var sourceProjection = this.getProjection();\n        var extent;\n        if (tileJSON['bounds'] !== undefined) {\n            var transform = getTransformFromProjections(epsg4326Projection, sourceProjection);\n            extent = applyTransform(tileJSON['bounds'], transform);\n        }\n        var gridExtent = extentFromProjection(sourceProjection);\n        var minZoom = tileJSON['minzoom'] || 0;\n        var maxZoom = tileJSON['maxzoom'] || 22;\n        var tileGrid = createXYZ({\n            extent: gridExtent,\n            maxZoom: maxZoom,\n            minZoom: minZoom,\n            tileSize: this.tileSize_,\n        });\n        this.tileGrid = tileGrid;\n        this.tileUrlFunction = createFromTemplates(tileJSON['tiles'], tileGrid);\n        if (tileJSON['attribution'] !== undefined && !this.getAttributions()) {\n            var attributionExtent_1 = extent !== undefined ? extent : gridExtent;\n            this.setAttributions(function (frameState) {\n                if (intersects(attributionExtent_1, frameState.extent)) {\n                    return [tileJSON['attribution']];\n                }\n                return null;\n            });\n        }\n        this.tileJSON_ = tileJSON;\n        this.setState(SourceState.READY);\n    };\n    /**\n     * @protected\n     */\n    TileJSON.prototype.handleTileJSONError = function () {\n        this.setState(SourceState.ERROR);\n    };\n    return TileJSON;\n}(TileImage));\nexport default TileJSON;\n//# sourceMappingURL=TileJSON.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/geom/Circle\n */\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { createOrUpdate, forEachCorner, intersects } from '../extent.js';\nimport { deflateCoordinate } from './flat/deflate.js';\nimport { rotate, translate } from './flat/transform.js';\n/**\n * @classdesc\n * Circle geometry.\n *\n * @api\n */\nvar Circle = /** @class */ (function (_super) {\n    __extends(Circle, _super);\n    /**\n     * @param {!import(\"../coordinate.js\").Coordinate} center Center.\n     *     For internal use, flat coordinates in combination with `opt_layout` and no\n     *     `opt_radius` are also accepted.\n     * @param {number} [opt_radius] Radius.\n     * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n     */\n    function Circle(center, opt_radius, opt_layout) {\n        var _this = _super.call(this) || this;\n        if (opt_layout !== undefined && opt_radius === undefined) {\n            _this.setFlatCoordinates(opt_layout, center);\n        }\n        else {\n            var radius = opt_radius ? opt_radius : 0;\n            _this.setCenterAndRadius(center, radius, opt_layout);\n        }\n        return _this;\n    }\n    /**\n     * Make a complete copy of the geometry.\n     * @return {!Circle} Clone.\n     * @api\n     */\n    Circle.prototype.clone = function () {\n        var circle = new Circle(this.flatCoordinates.slice(), undefined, this.layout);\n        circle.applyProperties(this);\n        return circle;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n     * @param {number} minSquaredDistance Minimum squared distance.\n     * @return {number} Minimum squared distance.\n     */\n    Circle.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n        var flatCoordinates = this.flatCoordinates;\n        var dx = x - flatCoordinates[0];\n        var dy = y - flatCoordinates[1];\n        var squaredDistance = dx * dx + dy * dy;\n        if (squaredDistance < minSquaredDistance) {\n            if (squaredDistance === 0) {\n                for (var i = 0; i < this.stride; ++i) {\n                    closestPoint[i] = flatCoordinates[i];\n                }\n            }\n            else {\n                var delta = this.getRadius() / Math.sqrt(squaredDistance);\n                closestPoint[0] = flatCoordinates[0] + delta * dx;\n                closestPoint[1] = flatCoordinates[1] + delta * dy;\n                for (var i = 2; i < this.stride; ++i) {\n                    closestPoint[i] = flatCoordinates[i];\n                }\n            }\n            closestPoint.length = this.stride;\n            return squaredDistance;\n        }\n        else {\n            return minSquaredDistance;\n        }\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     * @return {boolean} Contains (x, y).\n     */\n    Circle.prototype.containsXY = function (x, y) {\n        var flatCoordinates = this.flatCoordinates;\n        var dx = x - flatCoordinates[0];\n        var dy = y - flatCoordinates[1];\n        return dx * dx + dy * dy <= this.getRadiusSquared_();\n    };\n    /**\n     * Return the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.\n     * @return {import(\"../coordinate.js\").Coordinate} Center.\n     * @api\n     */\n    Circle.prototype.getCenter = function () {\n        return this.flatCoordinates.slice(0, this.stride);\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @protected\n     * @return {import(\"../extent.js\").Extent} extent Extent.\n     */\n    Circle.prototype.computeExtent = function (extent) {\n        var flatCoordinates = this.flatCoordinates;\n        var radius = flatCoordinates[this.stride] - flatCoordinates[0];\n        return createOrUpdate(flatCoordinates[0] - radius, flatCoordinates[1] - radius, flatCoordinates[0] + radius, flatCoordinates[1] + radius, extent);\n    };\n    /**\n     * Return the radius of the circle.\n     * @return {number} Radius.\n     * @api\n     */\n    Circle.prototype.getRadius = function () {\n        return Math.sqrt(this.getRadiusSquared_());\n    };\n    /**\n     * @private\n     * @return {number} Radius squared.\n     */\n    Circle.prototype.getRadiusSquared_ = function () {\n        var dx = this.flatCoordinates[this.stride] - this.flatCoordinates[0];\n        var dy = this.flatCoordinates[this.stride + 1] - this.flatCoordinates[1];\n        return dx * dx + dy * dy;\n    };\n    /**\n     * Get the type of this geometry.\n     * @return {import(\"./GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    Circle.prototype.getType = function () {\n        return GeometryType.CIRCLE;\n    };\n    /**\n     * Test if the geometry and the passed extent intersect.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @return {boolean} `true` if the geometry and the extent intersect.\n     * @api\n     */\n    Circle.prototype.intersectsExtent = function (extent) {\n        var circleExtent = this.getExtent();\n        if (intersects(extent, circleExtent)) {\n            var center = this.getCenter();\n            if (extent[0] <= center[0] && extent[2] >= center[0]) {\n                return true;\n            }\n            if (extent[1] <= center[1] && extent[3] >= center[1]) {\n                return true;\n            }\n            return forEachCorner(extent, this.intersectsCoordinate.bind(this));\n        }\n        return false;\n    };\n    /**\n     * Set the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.\n     * @param {import(\"../coordinate.js\").Coordinate} center Center.\n     * @api\n     */\n    Circle.prototype.setCenter = function (center) {\n        var stride = this.stride;\n        var radius = this.flatCoordinates[stride] - this.flatCoordinates[0];\n        var flatCoordinates = center.slice();\n        flatCoordinates[stride] = flatCoordinates[0] + radius;\n        for (var i = 1; i < stride; ++i) {\n            flatCoordinates[stride + i] = center[i];\n        }\n        this.setFlatCoordinates(this.layout, flatCoordinates);\n        this.changed();\n    };\n    /**\n     * Set the center (as {@link module:ol/coordinate~Coordinate coordinate}) and the radius (as\n     * number) of the circle.\n     * @param {!import(\"../coordinate.js\").Coordinate} center Center.\n     * @param {number} radius Radius.\n     * @param {import(\"./GeometryLayout.js\").default} [opt_layout] Layout.\n     * @api\n     */\n    Circle.prototype.setCenterAndRadius = function (center, radius, opt_layout) {\n        this.setLayout(opt_layout, center, 0);\n        if (!this.flatCoordinates) {\n            this.flatCoordinates = [];\n        }\n        /** @type {Array<number>} */\n        var flatCoordinates = this.flatCoordinates;\n        var offset = deflateCoordinate(flatCoordinates, 0, center, this.stride);\n        flatCoordinates[offset++] = flatCoordinates[0] + radius;\n        for (var i = 1, ii = this.stride; i < ii; ++i) {\n            flatCoordinates[offset++] = flatCoordinates[i];\n        }\n        flatCoordinates.length = offset;\n        this.changed();\n    };\n    Circle.prototype.getCoordinates = function () {\n        return null;\n    };\n    Circle.prototype.setCoordinates = function (coordinates, opt_layout) { };\n    /**\n     * Set the radius of the circle. The radius is in the units of the projection.\n     * @param {number} radius Radius.\n     * @api\n     */\n    Circle.prototype.setRadius = function (radius) {\n        this.flatCoordinates[this.stride] = this.flatCoordinates[0] + radius;\n        this.changed();\n    };\n    /**\n     * Rotate the geometry around a given coordinate. This modifies the geometry\n     * coordinates in place.\n     * @param {number} angle Rotation angle in counter-clockwise radians.\n     * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n     * @api\n     */\n    Circle.prototype.rotate = function (angle, anchor) {\n        var center = this.getCenter();\n        var stride = this.getStride();\n        this.setCenter(rotate(center, 0, center.length, stride, angle, anchor, center));\n        this.changed();\n    };\n    /**\n     * Translate the geometry.  This modifies the geometry coordinates in place.  If\n     * instead you want a new geometry, first `clone()` this geometry.\n     * @param {number} deltaX Delta X.\n     * @param {number} deltaY Delta Y.\n     * @api\n     */\n    Circle.prototype.translate = function (deltaX, deltaY) {\n        var center = this.getCenter();\n        var stride = this.getStride();\n        this.setCenter(translate(center, 0, center.length, stride, deltaX, deltaY, center));\n        this.changed();\n    };\n    return Circle;\n}(SimpleGeometry));\n/**\n * Transform each coordinate of the circle from one coordinate reference system\n * to another. The geometry is modified in place.\n * If you do not want the geometry modified in place, first clone() it and\n * then use this function on the clone.\n *\n * Internally a circle is currently represented by two points: the center of\n * the circle `[cx, cy]`, and the point to the right of the circle\n * `[cx + r, cy]`. This `transform` function just transforms these two points.\n * So the resulting geometry is also a circle, and that circle does not\n * correspond to the shape that would be obtained by transforming every point\n * of the original circle.\n *\n * @param {import(\"../proj.js\").ProjectionLike} source The current projection.  Can be a\n *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection.  Can be a\n *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @return {Circle} This geometry.  Note that original geometry is\n *     modified in place.\n * @function\n * @api\n */\nCircle.prototype.transform;\nexport default Circle;\n//# sourceMappingURL=Circle.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/MouseWheelZoom\n */\nimport EventType from '../events/EventType.js';\nimport Interaction, { zoomByDelta } from './Interaction.js';\nimport { DEVICE_PIXEL_RATIO, FIREFOX } from '../has.js';\nimport { all, always, focusWithTabindex } from '../events/condition.js';\nimport { clamp } from '../math.js';\n/**\n * @enum {string}\n */\nexport var Mode = {\n    TRACKPAD: 'trackpad',\n    WHEEL: 'wheel',\n};\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition.always}.\n * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,\n * the interaction will only handle events when the map has the focus.\n * @property {number} [maxDelta=1] Maximum mouse wheel delta.\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [timeout=80] Mouse wheel timeout duration in milliseconds.\n * @property {boolean} [useAnchor=true] Enable zooming using the mouse's\n * location as the anchor. When set to `false`, zooming in and out will zoom to\n * the center of the screen instead of zooming on the mouse's location.\n * @property {boolean} [constrainResolution=false] If true, the mouse wheel zoom\n * event will always animate to the closest zoom level after an interaction;\n * false means intermediary zoom levels are allowed.\n */\n/**\n * @classdesc\n * Allows the user to zoom the map by scrolling the mouse wheel.\n * @api\n */\nvar MouseWheelZoom = /** @class */ (function (_super) {\n    __extends(MouseWheelZoom, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function MouseWheelZoom(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, \n        /** @type {import(\"./Interaction.js\").InteractionOptions} */ (options)) || this;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.totalDelta_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.lastDelta_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxDelta_ = options.maxDelta !== undefined ? options.maxDelta : 1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.duration_ = options.duration !== undefined ? options.duration : 250;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.timeout_ = options.timeout !== undefined ? options.timeout : 80;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.useAnchor_ =\n            options.useAnchor !== undefined ? options.useAnchor : true;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.constrainResolution_ =\n            options.constrainResolution !== undefined\n                ? options.constrainResolution\n                : false;\n        var condition = options.condition ? options.condition : always;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.onFocusOnly\n            ? all(focusWithTabindex, condition)\n            : condition;\n        /**\n         * @private\n         * @type {?import(\"../coordinate.js\").Coordinate}\n         */\n        _this.lastAnchor_ = null;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.startTime_ = undefined;\n        /**\n         * @private\n         * @type {?}\n         */\n        _this.timeoutId_;\n        /**\n         * @private\n         * @type {Mode|undefined}\n         */\n        _this.mode_ = undefined;\n        /**\n         * Trackpad events separated by this delay will be considered separate\n         * interactions.\n         * @type {number}\n         */\n        _this.trackpadEventGap_ = 400;\n        /**\n         * @type {?}\n         */\n        _this.trackpadTimeoutId_;\n        /**\n         * The number of delta values per zoom level\n         * @private\n         * @type {number}\n         */\n        _this.deltaPerZoom_ = 300;\n        return _this;\n    }\n    /**\n     * @private\n     */\n    MouseWheelZoom.prototype.endInteraction_ = function () {\n        this.trackpadTimeoutId_ = undefined;\n        var view = this.getMap().getView();\n        view.endInteraction(undefined, this.lastDelta_ ? (this.lastDelta_ > 0 ? 1 : -1) : 0, this.lastAnchor_);\n    };\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} (if it was a mousewheel-event) and eventually\n     * zooms the map.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     */\n    MouseWheelZoom.prototype.handleEvent = function (mapBrowserEvent) {\n        if (!this.condition_(mapBrowserEvent)) {\n            return true;\n        }\n        var type = mapBrowserEvent.type;\n        if (type !== EventType.WHEEL) {\n            return true;\n        }\n        var map = mapBrowserEvent.map;\n        var wheelEvent = /** @type {WheelEvent} */ (mapBrowserEvent.originalEvent);\n        wheelEvent.preventDefault();\n        if (this.useAnchor_) {\n            this.lastAnchor_ = mapBrowserEvent.coordinate;\n        }\n        // Delta normalisation inspired by\n        // https://github.com/mapbox/mapbox-gl-js/blob/001c7b9/js/ui/handler/scroll_zoom.js\n        var delta;\n        if (mapBrowserEvent.type == EventType.WHEEL) {\n            delta = wheelEvent.deltaY;\n            if (FIREFOX && wheelEvent.deltaMode === WheelEvent.DOM_DELTA_PIXEL) {\n                delta /= DEVICE_PIXEL_RATIO;\n            }\n            if (wheelEvent.deltaMode === WheelEvent.DOM_DELTA_LINE) {\n                delta *= 40;\n            }\n        }\n        if (delta === 0) {\n            return false;\n        }\n        else {\n            this.lastDelta_ = delta;\n        }\n        var now = Date.now();\n        if (this.startTime_ === undefined) {\n            this.startTime_ = now;\n        }\n        if (!this.mode_ || now - this.startTime_ > this.trackpadEventGap_) {\n            this.mode_ = Math.abs(delta) < 4 ? Mode.TRACKPAD : Mode.WHEEL;\n        }\n        var view = map.getView();\n        if (this.mode_ === Mode.TRACKPAD &&\n            !(view.getConstrainResolution() || this.constrainResolution_)) {\n            if (this.trackpadTimeoutId_) {\n                clearTimeout(this.trackpadTimeoutId_);\n            }\n            else {\n                if (view.getAnimating()) {\n                    view.cancelAnimations();\n                }\n                view.beginInteraction();\n            }\n            this.trackpadTimeoutId_ = setTimeout(this.endInteraction_.bind(this), this.timeout_);\n            view.adjustZoom(-delta / this.deltaPerZoom_, this.lastAnchor_);\n            this.startTime_ = now;\n            return false;\n        }\n        this.totalDelta_ += delta;\n        var timeLeft = Math.max(this.timeout_ - (now - this.startTime_), 0);\n        clearTimeout(this.timeoutId_);\n        this.timeoutId_ = setTimeout(this.handleWheelZoom_.bind(this, map), timeLeft);\n        return false;\n    };\n    /**\n     * @private\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    MouseWheelZoom.prototype.handleWheelZoom_ = function (map) {\n        var view = map.getView();\n        if (view.getAnimating()) {\n            view.cancelAnimations();\n        }\n        var delta = -clamp(this.totalDelta_, -this.maxDelta_ * this.deltaPerZoom_, this.maxDelta_ * this.deltaPerZoom_) / this.deltaPerZoom_;\n        if (view.getConstrainResolution() || this.constrainResolution_) {\n            // view has a zoom constraint, zoom by 1\n            delta = delta ? (delta > 0 ? 1 : -1) : 0;\n        }\n        zoomByDelta(view, delta, this.lastAnchor_, this.duration_);\n        this.mode_ = undefined;\n        this.totalDelta_ = 0;\n        this.lastAnchor_ = null;\n        this.startTime_ = undefined;\n        this.timeoutId_ = undefined;\n    };\n    /**\n     * Enable or disable using the mouse's location as an anchor when zooming\n     * @param {boolean} useAnchor true to zoom to the mouse's location, false\n     * to zoom to the center of the map\n     * @api\n     */\n    MouseWheelZoom.prototype.setMouseAnchor = function (useAnchor) {\n        this.useAnchor_ = useAnchor;\n        if (!useAnchor) {\n            this.lastAnchor_ = null;\n        }\n    };\n    return MouseWheelZoom;\n}(Interaction));\nexport default MouseWheelZoom;\n//# sourceMappingURL=MouseWheelZoom.js.map","import { Control } from \"ol/control\";\r\nimport { Viewport } from \"../viewport\";\r\n\r\n/**\r\n * Displays an interface that allows the user to rotate the viewport\r\n * @param {object} opt_options Options to initialize the rotation control\r\n * @param {Viewport} opt_options.pmaViewport Viewport instance this control belongs to\r\n * @param {string} [opt_options.resetTipLabel] Label for reset rotation button\r\n * @param {string} [opt_options.flipHorizontallyTipLabel] Label for horizontal flip button\r\n * @param {string} [opt_options.flipVerticallyTipLabel] Label for vertical flip button\r\n * @param {boolean} [opt_options.collapsed] Whether the control starts collapsed\r\n */\r\nexport class RotationControl extends Control {\r\n    constructor(opt_options) {\r\n        let options = opt_options || {};\r\n        options.collapsed = options.collapsed === true;\r\n\r\n        let tipLabel;\r\n        let label;\r\n        let label_;\r\n\r\n        label_ = document.createElement(\"span\");\r\n        if (options.collapsed) {\r\n            label_.innerHTML = \"»\";\r\n        }\r\n        else {\r\n            label_.innerHTML = \"«\";\r\n        }\r\n\r\n        let collapseButton = document.createElement(\"button\");\r\n        collapseButton.type = \"button\";\r\n        collapseButton.title = \"Compass\";\r\n        collapseButton.appendChild(label_);\r\n\r\n        let element = document.createElement(\"div\");\r\n        element.className = \"ol-rotation ol-control ol-unselectable\";\r\n\r\n        let degree = document.createElement(\"span\");\r\n        degree.innerHTML = \"&#176\";\r\n        degree.className = \"ol-degree\";\r\n\r\n        let rotationText = document.createElement(\"input\");\r\n        rotationText.id = \"rotationText\";\r\n        rotationText.type = \"text\";\r\n        rotationText.value = 0;\r\n        rotationText.maxLength = 5;\r\n        rotationText.size = 1;\r\n\r\n        let rotationSlider = document.createElement(\"input\");\r\n        rotationSlider.id = \"rotation\";\r\n        rotationSlider.type = \"range\";\r\n        rotationSlider.min = -180;\r\n        rotationSlider.max = 180;\r\n        rotationSlider.value = 0;\r\n        rotationSlider.step = 1;\r\n\r\n        tipLabel = options.resetTipLabel\r\n            ? options.resetTipLabel\r\n            : \"Reset rotation\";\r\n        label = '<i class=\"fa fa-repeat\" aria-hidden=\"true\"></i>';\r\n        label_ = document.createElement(\"span\");\r\n        label_.innerHTML = label;\r\n\r\n        let resetButton = document.createElement(\"button\");\r\n        resetButton.type = \"button\";\r\n        resetButton.title = tipLabel;\r\n        resetButton.appendChild(label_);\r\n\r\n        tipLabel = options.flipHorizontallyTipLabel\r\n            ? options.flipHorizontallyTipLabel\r\n            : \"Flip horizontally\";\r\n        label = '<i class=\"fa fa-code\" aria-hidden=\"true\"></i>';\r\n        label_ = document.createElement(\"span\");\r\n        label_.innerHTML = label;\r\n\r\n        let flipHorizontalButton = document.createElement(\"button\");\r\n        flipHorizontalButton.type = \"button\";\r\n        flipHorizontalButton.title = tipLabel;\r\n        flipHorizontalButton.appendChild(label_);\r\n\r\n        tipLabel = options.flipVerticallyTipLabel\r\n            ? options.flipVerticallyTipLabel\r\n            : \"Flip vertically\";\r\n        label = '<i class=\"fa fa-code fa-rotate-90\" aria-hidden=\"true\"></i>';\r\n        label_ = document.createElement(\"span\");\r\n        label_.innerHTML = label;\r\n\r\n        let flipVerticalButton = document.createElement(\"button\");\r\n        flipVerticalButton.type = \"button\";\r\n        flipVerticalButton.title = tipLabel;\r\n        flipVerticalButton.appendChild(label_);\r\n\r\n        if (!options.collapsed) {\r\n            element.appendChild(rotationText);\r\n            element.appendChild(degree);\r\n            element.appendChild(rotationSlider);\r\n            element.appendChild(resetButton);\r\n            element.appendChild(flipHorizontalButton);\r\n            element.appendChild(flipVerticalButton);\r\n        }\r\n\r\n        element.appendChild(collapseButton);\r\n\r\n        super({\r\n            element: element,\r\n            target: options.target,\r\n        });\r\n\r\n        this.collapsed = options.collapsed;\r\n        let localChange = false;\r\n\r\n        const handleInput = function (e) {\r\n            localChange = true;\r\n            e.preventDefault();\r\n            e.stopPropagation();\r\n\r\n            let t = rotationText.value.replace(/[^\\d-]/g, \"\");\r\n            if (t == \"-\") {\r\n                return;\r\n            }\r\n            if (t == \"\") {\r\n                t = 0;\r\n            }\r\n            let v = parseInt(t);\r\n            var da = v % 360;\r\n            v = ((2 * da) % 360) - da;\r\n\r\n            rotationText.value = v;\r\n            rotationSlider.value = v;\r\n            this.pmaViewport.setPosition({ rotation: v * 0.0174532925 });\r\n            localChange = false;\r\n        };\r\n\r\n        const handleRotation = function (e) {\r\n            if (localChange) {\r\n                return;\r\n            }\r\n            let v = Math.floor(\r\n                this.pmaViewport.getPosition().rotation / 0.0174532925\r\n            );\r\n            var da = v % 360;\r\n            v = ((2 * da) % 360) - da;\r\n\r\n            rotationText.value = v;\r\n            rotationSlider.value = v;\r\n            if (this.pmaViewport.getFlip().horizontally) {\r\n                flipHorizontalButton.classList.add(\"selected\");\r\n            } else {\r\n                flipHorizontalButton.classList.remove(\"selected\");\r\n            }\r\n            if (this.pmaViewport.getFlip().vertically) {\r\n                flipVerticalButton.classList.add(\"selected\");\r\n            }\r\n            else {\r\n                flipVerticalButton.classList.remove(\"selected\");\r\n            }\r\n        };\r\n\r\n        const handleReset = function (e) {\r\n            e.preventDefault();\r\n            e.stopPropagation();\r\n\r\n            rotationText.value = 0;\r\n            rotationSlider.value = 0;\r\n            this.pmaViewport.setPosition({ rotation: 0 });\r\n            resetButton.blur();\r\n            resetButton.hideFocus = true;\r\n            resetButton.style.outline = \"none\";\r\n        };\r\n\r\n        const handleFlipHorizontally = function (e) {\r\n            e.preventDefault();\r\n            e.stopPropagation();\r\n\r\n            this.pmaViewport.setFlip(\r\n                !this.pmaViewport.getFlip().horizontally,\r\n                this.pmaViewport.getFlip().vertically\r\n            );\r\n            if (this.pmaViewport.getFlip().horizontally) {\r\n                flipHorizontalButton.classList.add(\"selected\");\r\n            } else {\r\n                flipHorizontalButton.classList.remove(\"selected\");\r\n            }\r\n            flipHorizontalButton.blur();\r\n            flipHorizontalButton.hideFocus = true;\r\n            flipHorizontalButton.style.outline = \"none\";\r\n        };\r\n\r\n        const handleFlipVertically = function (e) {\r\n            e.preventDefault();\r\n            e.stopPropagation();\r\n\r\n            this.pmaViewport.setFlip(\r\n                this.pmaViewport.getFlip().horizontally,\r\n                !this.pmaViewport.getFlip().vertically\r\n            );\r\n\r\n            if (this.pmaViewport.getFlip().vertically) {\r\n                flipVerticalButton.classList.add(\"selected\");\r\n            }\r\n            else {\r\n                flipVerticalButton.classList.remove(\"selected\");\r\n            }\r\n\r\n            flipVerticalButton.blur();\r\n            flipVerticalButton.hideFocus = true;\r\n            flipVerticalButton.style.outline = \"none\";\r\n        };\r\n\r\n        this.collapseControl = function (e) {\r\n            if (e) {\r\n                e.preventDefault();\r\n                e.stopPropagation();\r\n            }\r\n\r\n            this.collapsed = !this.collapsed;\r\n            if (this.collapsed) {\r\n                element.removeChild(flipVerticalButton);\r\n                element.removeChild(flipHorizontalButton);\r\n                element.removeChild(resetButton);\r\n                element.removeChild(rotationSlider);\r\n                element.removeChild(degree);\r\n                element.removeChild(rotationText);\r\n                collapseButton.firstChild.innerHTML = \"»\";\r\n            }\r\n            else {\r\n                element.insertBefore(flipVerticalButton, element.firstChild);\r\n                element.insertBefore(flipHorizontalButton, element.firstChild);\r\n                element.insertBefore(resetButton, element.firstChild);\r\n                element.insertBefore(rotationSlider, element.firstChild);\r\n                element.insertBefore(degree, element.firstChild);\r\n                element.insertBefore(rotationText, element.firstChild);\r\n                collapseButton.firstChild.innerHTML = \"«\";\r\n            }\r\n        };\r\n\r\n        let handleChange = function (e) {\r\n            localChange = true;\r\n            e.preventDefault();\r\n            e.stopPropagation();\r\n\r\n            rotationText.value = rotationSlider.value;\r\n            this.pmaViewport.setPosition({\r\n                rotation: rotationSlider.value * 0.0174532925,\r\n            });\r\n\r\n            localChange = false;\r\n        };\r\n\r\n        this.pmaViewport = options.pmaViewport;\r\n\r\n        rotationSlider.addEventListener(\r\n            \"input\",\r\n            handleChange.bind(this),\r\n            false\r\n        );\r\n\r\n        resetButton.addEventListener(\"click\", handleReset.bind(this), false);\r\n        collapseButton.addEventListener(\"click\", this.collapseControl.bind(this), false);\r\n        flipHorizontalButton.addEventListener(\r\n            \"click\",\r\n            handleFlipHorizontally.bind(this),\r\n            false\r\n        );\r\n\r\n        flipVerticalButton.addEventListener(\r\n            \"click\",\r\n            handleFlipVertically.bind(this),\r\n            false\r\n        );\r\n\r\n        rotationText.addEventListener(\"input\", handleInput.bind(this), false);\r\n        this.pmaViewport.listen(\"viewchanged\", handleRotation.bind(this));\r\n    }\r\n\r\n    /**\r\n     * Sets the OpenLayers map this control handles. This is automatically called by OpenLayers\r\n     * @param {ol.Map} map \r\n     */\r\n    setMap(map) {\r\n        super.setMap(map);\r\n    }\r\n\r\n    /**\r\n     * Gets the collapsed state of the control\r\n     * @return {boolean} True if the control is currently collapsed\r\n     */\r\n    getCollapsed() {\r\n        return this.collapsed;\r\n    }\r\n\r\n    /**\r\n     * Sets the collapsed state of the control\r\n     * @param {boolean} collapsed - True to collapse the control, otherwise false\r\n     */\r\n    setCollapsed(collapsed) {\r\n        if (this.getCollapsed() != collapsed) {\r\n            this.collapseControl();\r\n        }\r\n    }\r\n}\r\n","import { MouseWheelZoom } from 'ol/interaction';\r\n\r\nexport const MouseWheelZoomMode = {\r\n    normal: \"Normal\",\r\n    objectives: \"Objectives\",\r\n}\r\n\r\nexport class PmaMouseWheelZoom extends MouseWheelZoom {\r\n\r\n    constructor(options) {\r\n        super(options);\r\n        if (!this.hasOwnProperty(\"deltaPerZoom_\")) {\r\n            throw \"deltaPerZoom_ not found\";\r\n        }\r\n\r\n        this.deltaPerZoom_ = options.deltaPerZoom;\r\n\r\n        this.mode = MouseWheelZoomMode.normal;\r\n    }\r\n\r\n    setMode(mode) {\r\n        let view = this.getMap().getView();\r\n        // if (view.getResolutions() == null || view.getResolutions().length == 0) {\r\n        //     return;\r\n        // }\r\n\r\n        if (mode == MouseWheelZoomMode.normal) {\r\n            view.setConstrainResolution(false);\r\n            this.constrainResolution_ = false;\r\n            this.mode = mode;\r\n        } else {\r\n            view.setConstrainResolution(true);\r\n            this.constrainResolution_ = true;\r\n            this.mode = mode;\r\n        }\r\n    }\r\n}","/*!\n * jquery.fancytree.js\n * Tree view control with support for lazy loading and much more.\n * https://github.com/mar10/fancytree/\n *\n * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de)\n * Released under the MIT license\n * https://github.com/mar10/fancytree/wiki/LicenseInfo\n *\n * @version 2.36.1\n * @date 2020-07-25T09:03:47Z\n */\n\n/** Core Fancytree module.\n */\n\n// UMD wrapper for the Fancytree core module\n(function(factory) {\n\tif (typeof define === \"function\" && define.amd) {\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine([\"jquery\", \"./jquery.fancytree.ui-deps\"], factory);\n\t} else if (typeof module === \"object\" && module.exports) {\n\t\t// Node/CommonJS\n\t\trequire(\"./jquery.fancytree.ui-deps\");\n\t\tmodule.exports = factory(require(\"jquery\"));\n\t} else {\n\t\t// Browser globals\n\t\tfactory(jQuery);\n\t}\n})(function($) {\n\t\"use strict\";\n\n\t// prevent duplicate loading\n\tif ($.ui && $.ui.fancytree) {\n\t\t$.ui.fancytree.warn(\"Fancytree: ignored duplicate include\");\n\t\treturn;\n\t}\n\n\t/******************************************************************************\n\t * Private functions and variables\n\t */\n\n\tvar i,\n\t\tattr,\n\t\tFT = null, // initialized below\n\t\tTEST_IMG = new RegExp(/\\.|\\//), // strings are considered image urls if they contain '.' or '/'\n\t\tREX_HTML = /[&<>\"'/]/g, // Escape those characters\n\t\tREX_TOOLTIP = /[<>\"'/]/g, // Don't escape `&` in tooltips\n\t\tRECURSIVE_REQUEST_ERROR = \"$recursive_request\",\n\t\tINVALID_REQUEST_TARGET_ERROR = \"$request_target_invalid\",\n\t\tENTITY_MAP = {\n\t\t\t\"&\": \"&amp;\",\n\t\t\t\"<\": \"&lt;\",\n\t\t\t\">\": \"&gt;\",\n\t\t\t'\"': \"&quot;\",\n\t\t\t\"'\": \"&#39;\",\n\t\t\t\"/\": \"&#x2F;\",\n\t\t},\n\t\tIGNORE_KEYCODES = { 16: true, 17: true, 18: true },\n\t\tSPECIAL_KEYCODES = {\n\t\t\t8: \"backspace\",\n\t\t\t9: \"tab\",\n\t\t\t10: \"return\",\n\t\t\t13: \"return\",\n\t\t\t// 16: null, 17: null, 18: null,  // ignore shift, ctrl, alt\n\t\t\t19: \"pause\",\n\t\t\t20: \"capslock\",\n\t\t\t27: \"esc\",\n\t\t\t32: \"space\",\n\t\t\t33: \"pageup\",\n\t\t\t34: \"pagedown\",\n\t\t\t35: \"end\",\n\t\t\t36: \"home\",\n\t\t\t37: \"left\",\n\t\t\t38: \"up\",\n\t\t\t39: \"right\",\n\t\t\t40: \"down\",\n\t\t\t45: \"insert\",\n\t\t\t46: \"del\",\n\t\t\t59: \";\",\n\t\t\t61: \"=\",\n\t\t\t// 91: null, 93: null,  // ignore left and right meta\n\t\t\t96: \"0\",\n\t\t\t97: \"1\",\n\t\t\t98: \"2\",\n\t\t\t99: \"3\",\n\t\t\t100: \"4\",\n\t\t\t101: \"5\",\n\t\t\t102: \"6\",\n\t\t\t103: \"7\",\n\t\t\t104: \"8\",\n\t\t\t105: \"9\",\n\t\t\t106: \"*\",\n\t\t\t107: \"+\",\n\t\t\t109: \"-\",\n\t\t\t110: \".\",\n\t\t\t111: \"/\",\n\t\t\t112: \"f1\",\n\t\t\t113: \"f2\",\n\t\t\t114: \"f3\",\n\t\t\t115: \"f4\",\n\t\t\t116: \"f5\",\n\t\t\t117: \"f6\",\n\t\t\t118: \"f7\",\n\t\t\t119: \"f8\",\n\t\t\t120: \"f9\",\n\t\t\t121: \"f10\",\n\t\t\t122: \"f11\",\n\t\t\t123: \"f12\",\n\t\t\t144: \"numlock\",\n\t\t\t145: \"scroll\",\n\t\t\t173: \"-\",\n\t\t\t186: \";\",\n\t\t\t187: \"=\",\n\t\t\t188: \",\",\n\t\t\t189: \"-\",\n\t\t\t190: \".\",\n\t\t\t191: \"/\",\n\t\t\t192: \"`\",\n\t\t\t219: \"[\",\n\t\t\t220: \"\\\\\",\n\t\t\t221: \"]\",\n\t\t\t222: \"'\",\n\t\t},\n\t\tMODIFIERS = {\n\t\t\t16: \"shift\",\n\t\t\t17: \"ctrl\",\n\t\t\t18: \"alt\",\n\t\t\t91: \"meta\",\n\t\t\t93: \"meta\",\n\t\t},\n\t\tMOUSE_BUTTONS = { 0: \"\", 1: \"left\", 2: \"middle\", 3: \"right\" },\n\t\t// Boolean attributes that can be set with equivalent class names in the LI tags\n\t\t// Note: v2.23: checkbox and hideCheckbox are *not* in this list\n\t\tCLASS_ATTRS = \"active expanded focus folder lazy radiogroup selected unselectable unselectableIgnore\".split(\n\t\t\t\" \"\n\t\t),\n\t\tCLASS_ATTR_MAP = {},\n\t\t// Top-level Fancytree attributes, that can be set by dict\n\t\tTREE_ATTRS = \"columns types\".split(\" \"),\n\t\t// TREE_ATTR_MAP = {},\n\t\t// Top-level FancytreeNode attributes, that can be set by dict\n\t\tNODE_ATTRS = \"checkbox expanded extraClasses folder icon iconTooltip key lazy partsel radiogroup refKey selected statusNodeType title tooltip type unselectable unselectableIgnore unselectableStatus\".split(\n\t\t\t\" \"\n\t\t),\n\t\tNODE_ATTR_MAP = {},\n\t\t// Mapping of lowercase -> real name (because HTML5 data-... attribute only supports lowercase)\n\t\tNODE_ATTR_LOWERCASE_MAP = {},\n\t\t// Attribute names that should NOT be added to node.data\n\t\tNONE_NODE_DATA_MAP = {\n\t\t\tactive: true,\n\t\t\tchildren: true,\n\t\t\tdata: true,\n\t\t\tfocus: true,\n\t\t};\n\n\tfor (i = 0; i < CLASS_ATTRS.length; i++) {\n\t\tCLASS_ATTR_MAP[CLASS_ATTRS[i]] = true;\n\t}\n\tfor (i = 0; i < NODE_ATTRS.length; i++) {\n\t\tattr = NODE_ATTRS[i];\n\t\tNODE_ATTR_MAP[attr] = true;\n\t\tif (attr !== attr.toLowerCase()) {\n\t\t\tNODE_ATTR_LOWERCASE_MAP[attr.toLowerCase()] = attr;\n\t\t}\n\t}\n\t// for(i=0; i<TREE_ATTRS.length; i++) {\n\t// \tTREE_ATTR_MAP[TREE_ATTRS[i]] = true;\n\t// }\n\n\tfunction _assert(cond, msg) {\n\t\t// TODO: see qunit.js extractStacktrace()\n\t\tif (!cond) {\n\t\t\tmsg = msg ? \": \" + msg : \"\";\n\t\t\t// consoleApply(\"assert\", [!!cond, msg]);\n\t\t\t$.error(\"Fancytree assertion failed\" + msg);\n\t\t}\n\t}\n\n\t_assert($.ui, \"Fancytree requires jQuery UI (http://jqueryui.com)\");\n\n\tfunction consoleApply(method, args) {\n\t\tvar i,\n\t\t\ts,\n\t\t\tfn = window.console ? window.console[method] : null;\n\n\t\tif (fn) {\n\t\t\ttry {\n\t\t\t\tfn.apply(window.console, args);\n\t\t\t} catch (e) {\n\t\t\t\t// IE 8?\n\t\t\t\ts = \"\";\n\t\t\t\tfor (i = 0; i < args.length; i++) {\n\t\t\t\t\ts += args[i];\n\t\t\t\t}\n\t\t\t\tfn(s);\n\t\t\t}\n\t\t}\n\t}\n\n\t/* support: IE8 Polyfil for Date.now() */\n\tif (!Date.now) {\n\t\tDate.now = function now() {\n\t\t\treturn new Date().getTime();\n\t\t};\n\t}\n\n\t/*Return true if x is a FancytreeNode.*/\n\tfunction _isNode(x) {\n\t\treturn !!(x.tree && x.statusNodeType !== undefined);\n\t}\n\n\t/** Return true if dotted version string is equal or higher than requested version.\n\t *\n\t * See http://jsfiddle.net/mar10/FjSAN/\n\t */\n\tfunction isVersionAtLeast(dottedVersion, major, minor, patch) {\n\t\tvar i,\n\t\t\tv,\n\t\t\tt,\n\t\t\tverParts = $.map($.trim(dottedVersion).split(\".\"), function(e) {\n\t\t\t\treturn parseInt(e, 10);\n\t\t\t}),\n\t\t\ttestParts = $.map(\n\t\t\t\tArray.prototype.slice.call(arguments, 1),\n\t\t\t\tfunction(e) {\n\t\t\t\t\treturn parseInt(e, 10);\n\t\t\t\t}\n\t\t\t);\n\n\t\tfor (i = 0; i < testParts.length; i++) {\n\t\t\tv = verParts[i] || 0;\n\t\t\tt = testParts[i] || 0;\n\t\t\tif (v !== t) {\n\t\t\t\treturn v > t;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Deep-merge a list of objects (but replace array-type options).\n\t *\n\t * jQuery's $.extend(true, ...) method does a deep merge, that also merges Arrays.\n\t * This variant is used to merge extension defaults with user options, and should\n\t * merge objects, but override arrays (for example the `triggerStart: [...]` option\n\t * of ext-edit). Also `null` values are copied over and not skipped.\n\t *\n\t * See issue #876\n\t *\n\t * Example:\n\t * _simpleDeepMerge({}, o1, o2);\n\t */\n\tfunction _simpleDeepMerge() {\n\t\tvar options,\n\t\t\tname,\n\t\t\tsrc,\n\t\t\tcopy,\n\t\t\tclone,\n\t\t\ttarget = arguments[0] || {},\n\t\t\ti = 1,\n\t\t\tlength = arguments.length;\n\n\t\t// Handle case when target is a string or something (possible in deep copy)\n\t\tif (typeof target !== \"object\" && !$.isFunction(target)) {\n\t\t\ttarget = {};\n\t\t}\n\t\tif (i === length) {\n\t\t\tthrow Error(\"need at least two args\");\n\t\t}\n\t\tfor (; i < length; i++) {\n\t\t\t// Only deal with non-null/undefined values\n\t\t\tif ((options = arguments[i]) != null) {\n\t\t\t\t// Extend the base object\n\t\t\t\tfor (name in options) {\n\t\t\t\t\tif (options.hasOwnProperty(name)) {\n\t\t\t\t\t\tsrc = target[name];\n\t\t\t\t\t\tcopy = options[name];\n\t\t\t\t\t\t// Prevent never-ending loop\n\t\t\t\t\t\tif (target === copy) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Recurse if we're merging plain objects\n\t\t\t\t\t\t// (NOTE: unlike $.extend, we don't merge arrays, but replace them)\n\t\t\t\t\t\tif (copy && $.isPlainObject(copy)) {\n\t\t\t\t\t\t\tclone = src && $.isPlainObject(src) ? src : {};\n\t\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\t\ttarget[name] = _simpleDeepMerge(clone, copy);\n\t\t\t\t\t\t\t// Don't bring in undefined values\n\t\t\t\t\t\t} else if (copy !== undefined) {\n\t\t\t\t\t\t\ttarget[name] = copy;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return the modified object\n\t\treturn target;\n\t}\n\n\t/** Return a wrapper that calls sub.methodName() and exposes\n\t *  this             : tree\n\t *  this._local      : tree.ext.EXTNAME\n\t *  this._super      : base.methodName.call()\n\t *  this._superApply : base.methodName.apply()\n\t */\n\tfunction _makeVirtualFunction(methodName, tree, base, extension, extName) {\n\t\t// $.ui.fancytree.debug(\"_makeVirtualFunction\", methodName, tree, base, extension, extName);\n\t\t// if(rexTestSuper && !rexTestSuper.test(func)){\n\t\t//     // extension.methodName() doesn't call _super(), so no wrapper required\n\t\t//     return func;\n\t\t// }\n\t\t// Use an immediate function as closure\n\t\tvar proxy = (function() {\n\t\t\tvar prevFunc = tree[methodName], // org. tree method or prev. proxy\n\t\t\t\tbaseFunc = extension[methodName], //\n\t\t\t\t_local = tree.ext[extName],\n\t\t\t\t_super = function() {\n\t\t\t\t\treturn prevFunc.apply(tree, arguments);\n\t\t\t\t},\n\t\t\t\t_superApply = function(args) {\n\t\t\t\t\treturn prevFunc.apply(tree, args);\n\t\t\t\t};\n\n\t\t\t// Return the wrapper function\n\t\t\treturn function() {\n\t\t\t\tvar prevLocal = tree._local,\n\t\t\t\t\tprevSuper = tree._super,\n\t\t\t\t\tprevSuperApply = tree._superApply;\n\n\t\t\t\ttry {\n\t\t\t\t\ttree._local = _local;\n\t\t\t\t\ttree._super = _super;\n\t\t\t\t\ttree._superApply = _superApply;\n\t\t\t\t\treturn baseFunc.apply(tree, arguments);\n\t\t\t\t} finally {\n\t\t\t\t\ttree._local = prevLocal;\n\t\t\t\t\ttree._super = prevSuper;\n\t\t\t\t\ttree._superApply = prevSuperApply;\n\t\t\t\t}\n\t\t\t};\n\t\t})(); // end of Immediate Function\n\t\treturn proxy;\n\t}\n\n\t/**\n\t * Subclass `base` by creating proxy functions\n\t */\n\tfunction _subclassObject(tree, base, extension, extName) {\n\t\t// $.ui.fancytree.debug(\"_subclassObject\", tree, base, extension, extName);\n\t\tfor (var attrName in extension) {\n\t\t\tif (typeof extension[attrName] === \"function\") {\n\t\t\t\tif (typeof tree[attrName] === \"function\") {\n\t\t\t\t\t// override existing method\n\t\t\t\t\ttree[attrName] = _makeVirtualFunction(\n\t\t\t\t\t\tattrName,\n\t\t\t\t\t\ttree,\n\t\t\t\t\t\tbase,\n\t\t\t\t\t\textension,\n\t\t\t\t\t\textName\n\t\t\t\t\t);\n\t\t\t\t} else if (attrName.charAt(0) === \"_\") {\n\t\t\t\t\t// Create private methods in tree.ext.EXTENSION namespace\n\t\t\t\t\ttree.ext[extName][attrName] = _makeVirtualFunction(\n\t\t\t\t\t\tattrName,\n\t\t\t\t\t\ttree,\n\t\t\t\t\t\tbase,\n\t\t\t\t\t\textension,\n\t\t\t\t\t\textName\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$.error(\n\t\t\t\t\t\t\"Could not override tree.\" +\n\t\t\t\t\t\t\tattrName +\n\t\t\t\t\t\t\t\". Use prefix '_' to create tree.\" +\n\t\t\t\t\t\t\textName +\n\t\t\t\t\t\t\t\"._\" +\n\t\t\t\t\t\t\tattrName\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Create member variables in tree.ext.EXTENSION namespace\n\t\t\t\tif (attrName !== \"options\") {\n\t\t\t\t\ttree.ext[extName][attrName] = extension[attrName];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction _getResolvedPromise(context, argArray) {\n\t\tif (context === undefined) {\n\t\t\treturn $.Deferred(function() {\n\t\t\t\tthis.resolve();\n\t\t\t}).promise();\n\t\t}\n\t\treturn $.Deferred(function() {\n\t\t\tthis.resolveWith(context, argArray);\n\t\t}).promise();\n\t}\n\n\tfunction _getRejectedPromise(context, argArray) {\n\t\tif (context === undefined) {\n\t\t\treturn $.Deferred(function() {\n\t\t\t\tthis.reject();\n\t\t\t}).promise();\n\t\t}\n\t\treturn $.Deferred(function() {\n\t\t\tthis.rejectWith(context, argArray);\n\t\t}).promise();\n\t}\n\n\tfunction _makeResolveFunc(deferred, context) {\n\t\treturn function() {\n\t\t\tdeferred.resolveWith(context);\n\t\t};\n\t}\n\n\tfunction _getElementDataAsDict($el) {\n\t\t// Evaluate 'data-NAME' attributes with special treatment for 'data-json'.\n\t\tvar d = $.extend({}, $el.data()),\n\t\t\tjson = d.json;\n\n\t\tdelete d.fancytree; // added to container by widget factory (old jQuery UI)\n\t\tdelete d.uiFancytree; // added to container by widget factory\n\n\t\tif (json) {\n\t\t\tdelete d.json;\n\t\t\t// <li data-json='...'> is already returned as object (http://api.jquery.com/data/#data-html5)\n\t\t\td = $.extend(d, json);\n\t\t}\n\t\treturn d;\n\t}\n\n\tfunction _escapeTooltip(s) {\n\t\treturn (\"\" + s).replace(REX_TOOLTIP, function(s) {\n\t\t\treturn ENTITY_MAP[s];\n\t\t});\n\t}\n\n\t// TODO: use currying\n\tfunction _makeNodeTitleMatcher(s) {\n\t\ts = s.toLowerCase();\n\t\treturn function(node) {\n\t\t\treturn node.title.toLowerCase().indexOf(s) >= 0;\n\t\t};\n\t}\n\n\tfunction _makeNodeTitleStartMatcher(s) {\n\t\tvar reMatch = new RegExp(\"^\" + s, \"i\");\n\t\treturn function(node) {\n\t\t\treturn reMatch.test(node.title);\n\t\t};\n\t}\n\n\t/******************************************************************************\n\t * FancytreeNode\n\t */\n\n\t/**\n\t * Creates a new FancytreeNode\n\t *\n\t * @class FancytreeNode\n\t * @classdesc A FancytreeNode represents the hierarchical data model and operations.\n\t *\n\t * @param {FancytreeNode} parent\n\t * @param {NodeData} obj\n\t *\n\t * @property {Fancytree} tree The tree instance\n\t * @property {FancytreeNode} parent The parent node\n\t * @property {string} key Node id (must be unique inside the tree)\n\t * @property {string} title Display name (may contain HTML)\n\t * @property {object} data Contains all extra data that was passed on node creation\n\t * @property {FancytreeNode[] | null | undefined} children Array of child nodes.<br>\n\t *     For lazy nodes, null or undefined means 'not yet loaded'. Use an empty array\n\t *     to define a node that has no children.\n\t * @property {boolean} expanded Use isExpanded(), setExpanded() to access this property.\n\t * @property {string} extraClasses Additional CSS classes, added to the node's `<span>`.<br>\n\t *     Note: use `node.add/remove/toggleClass()` to modify.\n\t * @property {boolean} folder Folder nodes have different default icons and click behavior.<br>\n\t *     Note: Also non-folders may have children.\n\t * @property {string} statusNodeType null for standard nodes. Otherwise type of special system node: 'error', 'loading', 'nodata', or 'paging'.\n\t * @property {boolean} lazy True if this node is loaded on demand, i.e. on first expansion.\n\t * @property {boolean} selected Use isSelected(), setSelected() to access this property.\n\t * @property {string} tooltip Alternative description used as hover popup\n\t * @property {string} iconTooltip Description used as hover popup for icon. @since 2.27\n\t * @property {string} type Node type, used with tree.types map. @since 2.27\n\t */\n\tfunction FancytreeNode(parent, obj) {\n\t\tvar i, l, name, cl;\n\n\t\tthis.parent = parent;\n\t\tthis.tree = parent.tree;\n\t\tthis.ul = null;\n\t\tthis.li = null; // <li id='key' ftnode=this> tag\n\t\tthis.statusNodeType = null; // if this is a temp. node to display the status of its parent\n\t\tthis._isLoading = false; // if this node itself is loading\n\t\tthis._error = null; // {message: '...'} if a load error occurred\n\t\tthis.data = {};\n\n\t\t// TODO: merge this code with node.toDict()\n\t\t// copy attributes from obj object\n\t\tfor (i = 0, l = NODE_ATTRS.length; i < l; i++) {\n\t\t\tname = NODE_ATTRS[i];\n\t\t\tthis[name] = obj[name];\n\t\t}\n\t\t// unselectableIgnore and unselectableStatus imply unselectable\n\t\tif (\n\t\t\tthis.unselectableIgnore != null ||\n\t\t\tthis.unselectableStatus != null\n\t\t) {\n\t\t\tthis.unselectable = true;\n\t\t}\n\t\tif (obj.hideCheckbox) {\n\t\t\t$.error(\n\t\t\t\t\"'hideCheckbox' node option was removed in v2.23.0: use 'checkbox: false'\"\n\t\t\t);\n\t\t}\n\t\t// node.data += obj.data\n\t\tif (obj.data) {\n\t\t\t$.extend(this.data, obj.data);\n\t\t}\n\t\t// Copy all other attributes to this.data.NAME\n\t\tfor (name in obj) {\n\t\t\tif (\n\t\t\t\t!NODE_ATTR_MAP[name] &&\n\t\t\t\t(this.tree.options.copyFunctionsToData ||\n\t\t\t\t\t!$.isFunction(obj[name])) &&\n\t\t\t\t!NONE_NODE_DATA_MAP[name]\n\t\t\t) {\n\t\t\t\t// node.data.NAME = obj.NAME\n\t\t\t\tthis.data[name] = obj[name];\n\t\t\t}\n\t\t}\n\n\t\t// Fix missing key\n\t\tif (this.key == null) {\n\t\t\t// test for null OR undefined\n\t\t\tif (this.tree.options.defaultKey) {\n\t\t\t\tthis.key = \"\" + this.tree.options.defaultKey(this);\n\t\t\t\t_assert(this.key, \"defaultKey() must return a unique key\");\n\t\t\t} else {\n\t\t\t\tthis.key = \"_\" + FT._nextNodeKey++;\n\t\t\t}\n\t\t} else {\n\t\t\tthis.key = \"\" + this.key; // Convert to string (#217)\n\t\t}\n\n\t\t// Fix tree.activeNode\n\t\t// TODO: not elegant: we use obj.active as marker to set tree.activeNode\n\t\t// when loading from a dictionary.\n\t\tif (obj.active) {\n\t\t\t_assert(\n\t\t\t\tthis.tree.activeNode === null,\n\t\t\t\t\"only one active node allowed\"\n\t\t\t);\n\t\t\tthis.tree.activeNode = this;\n\t\t}\n\t\tif (obj.selected) {\n\t\t\t// #186\n\t\t\tthis.tree.lastSelectedNode = this;\n\t\t}\n\t\t// TODO: handle obj.focus = true\n\n\t\t// Create child nodes\n\t\tcl = obj.children;\n\t\tif (cl) {\n\t\t\tif (cl.length) {\n\t\t\t\tthis._setChildren(cl);\n\t\t\t} else {\n\t\t\t\t// if an empty array was passed for a lazy node, keep it, in order to mark it 'loaded'\n\t\t\t\tthis.children = this.lazy ? [] : null;\n\t\t\t}\n\t\t} else {\n\t\t\tthis.children = null;\n\t\t}\n\t\t// Add to key/ref map (except for root node)\n\t\t//\tif( parent ) {\n\t\tthis.tree._callHook(\"treeRegisterNode\", this.tree, true, this);\n\t\t//\t}\n\t}\n\n\tFancytreeNode.prototype = /** @lends FancytreeNode# */ {\n\t\t/* Return the direct child FancytreeNode with a given key, index. */\n\t\t_findDirectChild: function(ptr) {\n\t\t\tvar i,\n\t\t\t\tl,\n\t\t\t\tcl = this.children;\n\n\t\t\tif (cl) {\n\t\t\t\tif (typeof ptr === \"string\") {\n\t\t\t\t\tfor (i = 0, l = cl.length; i < l; i++) {\n\t\t\t\t\t\tif (cl[i].key === ptr) {\n\t\t\t\t\t\t\treturn cl[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof ptr === \"number\") {\n\t\t\t\t\treturn this.children[ptr];\n\t\t\t\t} else if (ptr.parent === this) {\n\t\t\t\t\treturn ptr;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\t// TODO: activate()\n\t\t// TODO: activateSilently()\n\t\t/* Internal helper called in recursive addChildren sequence.*/\n\t\t_setChildren: function(children) {\n\t\t\t_assert(\n\t\t\t\tchildren && (!this.children || this.children.length === 0),\n\t\t\t\t\"only init supported\"\n\t\t\t);\n\t\t\tthis.children = [];\n\t\t\tfor (var i = 0, l = children.length; i < l; i++) {\n\t\t\t\tthis.children.push(new FancytreeNode(this, children[i]));\n\t\t\t}\n\t\t\tthis.tree._callHook(\n\t\t\t\t\"treeStructureChanged\",\n\t\t\t\tthis.tree,\n\t\t\t\t\"setChildren\"\n\t\t\t);\n\t\t},\n\t\t/**\n\t\t * Append (or insert) a list of child nodes.\n\t\t *\n\t\t * @param {NodeData[]} children array of child node definitions (also single child accepted)\n\t\t * @param {FancytreeNode | string | Integer} [insertBefore] child node (or key or index of such).\n\t\t *     If omitted, the new children are appended.\n\t\t * @returns {FancytreeNode} first child added\n\t\t *\n\t\t * @see FancytreeNode#applyPatch\n\t\t */\n\t\taddChildren: function(children, insertBefore) {\n\t\t\tvar i,\n\t\t\t\tl,\n\t\t\t\tpos,\n\t\t\t\torigFirstChild = this.getFirstChild(),\n\t\t\t\torigLastChild = this.getLastChild(),\n\t\t\t\tfirstNode = null,\n\t\t\t\tnodeList = [];\n\n\t\t\tif ($.isPlainObject(children)) {\n\t\t\t\tchildren = [children];\n\t\t\t}\n\t\t\tif (!this.children) {\n\t\t\t\tthis.children = [];\n\t\t\t}\n\t\t\tfor (i = 0, l = children.length; i < l; i++) {\n\t\t\t\tnodeList.push(new FancytreeNode(this, children[i]));\n\t\t\t}\n\t\t\tfirstNode = nodeList[0];\n\t\t\tif (insertBefore == null) {\n\t\t\t\tthis.children = this.children.concat(nodeList);\n\t\t\t} else {\n\t\t\t\t// Returns null if insertBefore is not a direct child:\n\t\t\t\tinsertBefore = this._findDirectChild(insertBefore);\n\t\t\t\tpos = $.inArray(insertBefore, this.children);\n\t\t\t\t_assert(pos >= 0, \"insertBefore must be an existing child\");\n\t\t\t\t// insert nodeList after children[pos]\n\t\t\t\tthis.children.splice.apply(\n\t\t\t\t\tthis.children,\n\t\t\t\t\t[pos, 0].concat(nodeList)\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (origFirstChild && !insertBefore) {\n\t\t\t\t// #708: Fast path -- don't render every child of root, just the new ones!\n\t\t\t\t// #723, #729: but only if it's appended to an existing child list\n\t\t\t\tfor (i = 0, l = nodeList.length; i < l; i++) {\n\t\t\t\t\tnodeList[i].render(); // New nodes were never rendered before\n\t\t\t\t}\n\t\t\t\t// Adjust classes where status may have changed\n\t\t\t\t// Has a first child\n\t\t\t\tif (origFirstChild !== this.getFirstChild()) {\n\t\t\t\t\t// Different first child -- recompute classes\n\t\t\t\t\torigFirstChild.renderStatus();\n\t\t\t\t}\n\t\t\t\tif (origLastChild !== this.getLastChild()) {\n\t\t\t\t\t// Different last child -- recompute classes\n\t\t\t\t\torigLastChild.renderStatus();\n\t\t\t\t}\n\t\t\t} else if (!this.parent || this.parent.ul || this.tr) {\n\t\t\t\t// render if the parent was rendered (or this is a root node)\n\t\t\t\tthis.render();\n\t\t\t}\n\t\t\tif (this.tree.options.selectMode === 3) {\n\t\t\t\tthis.fixSelection3FromEndNodes();\n\t\t\t}\n\t\t\tthis.triggerModifyChild(\n\t\t\t\t\"add\",\n\t\t\t\tnodeList.length === 1 ? nodeList[0] : null\n\t\t\t);\n\t\t\treturn firstNode;\n\t\t},\n\t\t/**\n\t\t * Add class to node's span tag and to .extraClasses.\n\t\t *\n\t\t * @param {string} className class name\n\t\t *\n\t\t * @since 2.17\n\t\t */\n\t\taddClass: function(className) {\n\t\t\treturn this.toggleClass(className, true);\n\t\t},\n\t\t/**\n\t\t * Append or prepend a node, or append a child node.\n\t\t *\n\t\t * This a convenience function that calls addChildren()\n\t\t *\n\t\t * @param {NodeData} node node definition\n\t\t * @param {string} [mode=child] 'before', 'after', 'firstChild', or 'child' ('over' is a synonym for 'child')\n\t\t * @returns {FancytreeNode} new node\n\t\t */\n\t\taddNode: function(node, mode) {\n\t\t\tif (mode === undefined || mode === \"over\") {\n\t\t\t\tmode = \"child\";\n\t\t\t}\n\t\t\tswitch (mode) {\n\t\t\t\tcase \"after\":\n\t\t\t\t\treturn this.getParent().addChildren(\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\tthis.getNextSibling()\n\t\t\t\t\t);\n\t\t\t\tcase \"before\":\n\t\t\t\t\treturn this.getParent().addChildren(node, this);\n\t\t\t\tcase \"firstChild\":\n\t\t\t\t\t// Insert before the first child if any\n\t\t\t\t\tvar insertBefore = this.children ? this.children[0] : null;\n\t\t\t\t\treturn this.addChildren(node, insertBefore);\n\t\t\t\tcase \"child\":\n\t\t\t\tcase \"over\":\n\t\t\t\t\treturn this.addChildren(node);\n\t\t\t}\n\t\t\t_assert(false, \"Invalid mode: \" + mode);\n\t\t},\n\t\t/**Add child status nodes that indicate 'More...', etc.\n\t\t *\n\t\t * This also maintains the node's `partload` property.\n\t\t * @param {boolean|object} node optional node definition. Pass `false` to remove all paging nodes.\n\t\t * @param {string} [mode='child'] 'child'|firstChild'\n\t\t * @since 2.15\n\t\t */\n\t\taddPagingNode: function(node, mode) {\n\t\t\tvar i, n;\n\n\t\t\tmode = mode || \"child\";\n\t\t\tif (node === false) {\n\t\t\t\tfor (i = this.children.length - 1; i >= 0; i--) {\n\t\t\t\t\tn = this.children[i];\n\t\t\t\t\tif (n.statusNodeType === \"paging\") {\n\t\t\t\t\t\tthis.removeChild(n);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.partload = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tnode = $.extend(\n\t\t\t\t{\n\t\t\t\t\ttitle: this.tree.options.strings.moreData,\n\t\t\t\t\tstatusNodeType: \"paging\",\n\t\t\t\t\ticon: false,\n\t\t\t\t},\n\t\t\t\tnode\n\t\t\t);\n\t\t\tthis.partload = true;\n\t\t\treturn this.addNode(node, mode);\n\t\t},\n\t\t/**\n\t\t * Append new node after this.\n\t\t *\n\t\t * This a convenience function that calls addNode(node, 'after')\n\t\t *\n\t\t * @param {NodeData} node node definition\n\t\t * @returns {FancytreeNode} new node\n\t\t */\n\t\tappendSibling: function(node) {\n\t\t\treturn this.addNode(node, \"after\");\n\t\t},\n\t\t/**\n\t\t * (experimental) Apply a modification (or navigation) operation.\n\t\t *\n\t\t * @param {string} cmd\n\t\t * @param {object} [opts]\n\t\t * @see Fancytree#applyCommand\n\t\t * @since 2.32\n\t\t */\n\t\tapplyCommand: function(cmd, opts) {\n\t\t\treturn this.tree.applyCommand(cmd, this, opts);\n\t\t},\n\t\t/**\n\t\t * Modify existing child nodes.\n\t\t *\n\t\t * @param {NodePatch} patch\n\t\t * @returns {$.Promise}\n\t\t * @see FancytreeNode#addChildren\n\t\t */\n\t\tapplyPatch: function(patch) {\n\t\t\t// patch [key, null] means 'remove'\n\t\t\tif (patch === null) {\n\t\t\t\tthis.remove();\n\t\t\t\treturn _getResolvedPromise(this);\n\t\t\t}\n\t\t\t// TODO: make sure that root node is not collapsed or modified\n\t\t\t// copy (most) attributes to node.ATTR or node.data.ATTR\n\t\t\tvar name,\n\t\t\t\tpromise,\n\t\t\t\tv,\n\t\t\t\tIGNORE_MAP = { children: true, expanded: true, parent: true }; // TODO: should be global\n\n\t\t\tfor (name in patch) {\n\t\t\t\tif (patch.hasOwnProperty(name)) {\n\t\t\t\t\tv = patch[name];\n\t\t\t\t\tif (!IGNORE_MAP[name] && !$.isFunction(v)) {\n\t\t\t\t\t\tif (NODE_ATTR_MAP[name]) {\n\t\t\t\t\t\t\tthis[name] = v;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.data[name] = v;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Remove and/or create children\n\t\t\tif (patch.hasOwnProperty(\"children\")) {\n\t\t\t\tthis.removeChildren();\n\t\t\t\tif (patch.children) {\n\t\t\t\t\t// only if not null and not empty list\n\t\t\t\t\t// TODO: addChildren instead?\n\t\t\t\t\tthis._setChildren(patch.children);\n\t\t\t\t}\n\t\t\t\t// TODO: how can we APPEND or INSERT child nodes?\n\t\t\t}\n\t\t\tif (this.isVisible()) {\n\t\t\t\tthis.renderTitle();\n\t\t\t\tthis.renderStatus();\n\t\t\t}\n\t\t\t// Expand collapse (final step, since this may be async)\n\t\t\tif (patch.hasOwnProperty(\"expanded\")) {\n\t\t\t\tpromise = this.setExpanded(patch.expanded);\n\t\t\t} else {\n\t\t\t\tpromise = _getResolvedPromise(this);\n\t\t\t}\n\t\t\treturn promise;\n\t\t},\n\t\t/** Collapse all sibling nodes.\n\t\t * @returns {$.Promise}\n\t\t */\n\t\tcollapseSiblings: function() {\n\t\t\treturn this.tree._callHook(\"nodeCollapseSiblings\", this);\n\t\t},\n\t\t/** Copy this node as sibling or child of `node`.\n\t\t *\n\t\t * @param {FancytreeNode} node source node\n\t\t * @param {string} [mode=child] 'before' | 'after' | 'child'\n\t\t * @param {Function} [map] callback function(NodeData, FancytreeNode) that could modify the new node\n\t\t * @returns {FancytreeNode} new\n\t\t */\n\t\tcopyTo: function(node, mode, map) {\n\t\t\treturn node.addNode(this.toDict(true, map), mode);\n\t\t},\n\t\t/** Count direct and indirect children.\n\t\t *\n\t\t * @param {boolean} [deep=true] pass 'false' to only count direct children\n\t\t * @returns {int} number of child nodes\n\t\t */\n\t\tcountChildren: function(deep) {\n\t\t\tvar cl = this.children,\n\t\t\t\ti,\n\t\t\t\tl,\n\t\t\t\tn;\n\t\t\tif (!cl) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tn = cl.length;\n\t\t\tif (deep !== false) {\n\t\t\t\tfor (i = 0, l = n; i < l; i++) {\n\t\t\t\t\tn += cl[i].countChildren();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn n;\n\t\t},\n\t\t// TODO: deactivate()\n\t\t/** Write to browser console if debugLevel >= 4 (prepending node info)\n\t\t *\n\t\t * @param {*} msg string or object or array of such\n\t\t */\n\t\tdebug: function(msg) {\n\t\t\tif (this.tree.options.debugLevel >= 4) {\n\t\t\t\tArray.prototype.unshift.call(arguments, this.toString());\n\t\t\t\tconsoleApply(\"log\", arguments);\n\t\t\t}\n\t\t},\n\t\t/** Deprecated.\n\t\t * @deprecated since 2014-02-16. Use resetLazy() instead.\n\t\t */\n\t\tdiscard: function() {\n\t\t\tthis.warn(\n\t\t\t\t\"FancytreeNode.discard() is deprecated since 2014-02-16. Use .resetLazy() instead.\"\n\t\t\t);\n\t\t\treturn this.resetLazy();\n\t\t},\n\t\t/** Remove DOM elements for all descendents. May be called on .collapse event\n\t\t * to keep the DOM small.\n\t\t * @param {boolean} [includeSelf=false]\n\t\t */\n\t\tdiscardMarkup: function(includeSelf) {\n\t\t\tvar fn = includeSelf ? \"nodeRemoveMarkup\" : \"nodeRemoveChildMarkup\";\n\t\t\tthis.tree._callHook(fn, this);\n\t\t},\n\t\t/** Write error to browser console if debugLevel >= 1 (prepending tree info)\n\t\t *\n\t\t * @param {*} msg string or object or array of such\n\t\t */\n\t\terror: function(msg) {\n\t\t\tif (this.tree.options.debugLevel >= 1) {\n\t\t\t\tArray.prototype.unshift.call(arguments, this.toString());\n\t\t\t\tconsoleApply(\"error\", arguments);\n\t\t\t}\n\t\t},\n\t\t/**Find all nodes that match condition (excluding self).\n\t\t *\n\t\t * @param {string | function(node)} match title string to search for, or a\n\t\t *     callback function that returns `true` if a node is matched.\n\t\t * @returns {FancytreeNode[]} array of nodes (may be empty)\n\t\t */\n\t\tfindAll: function(match) {\n\t\t\tmatch = $.isFunction(match) ? match : _makeNodeTitleMatcher(match);\n\t\t\tvar res = [];\n\t\t\tthis.visit(function(n) {\n\t\t\t\tif (match(n)) {\n\t\t\t\t\tres.push(n);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn res;\n\t\t},\n\t\t/**Find first node that matches condition (excluding self).\n\t\t *\n\t\t * @param {string | function(node)} match title string to search for, or a\n\t\t *     callback function that returns `true` if a node is matched.\n\t\t * @returns {FancytreeNode} matching node or null\n\t\t * @see FancytreeNode#findAll\n\t\t */\n\t\tfindFirst: function(match) {\n\t\t\tmatch = $.isFunction(match) ? match : _makeNodeTitleMatcher(match);\n\t\t\tvar res = null;\n\t\t\tthis.visit(function(n) {\n\t\t\t\tif (match(n)) {\n\t\t\t\t\tres = n;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn res;\n\t\t},\n\t\t/** Find a node relative to self.\n\t\t *\n\t\t * @param {number|string} where The keyCode that would normally trigger this move,\n\t\t *\t\tor a keyword ('down', 'first', 'last', 'left', 'parent', 'right', 'up').\n\t\t * @returns {FancytreeNode}\n\t\t * @since v2.31\n\t\t */\n\t\tfindRelatedNode: function(where, includeHidden) {\n\t\t\treturn this.tree.findRelatedNode(this, where, includeHidden);\n\t\t},\n\t\t/* Apply selection state (internal use only) */\n\t\t_changeSelectStatusAttrs: function(state) {\n\t\t\tvar changed = false,\n\t\t\t\topts = this.tree.options,\n\t\t\t\tunselectable = FT.evalOption(\n\t\t\t\t\t\"unselectable\",\n\t\t\t\t\tthis,\n\t\t\t\t\tthis,\n\t\t\t\t\topts,\n\t\t\t\t\tfalse\n\t\t\t\t),\n\t\t\t\tunselectableStatus = FT.evalOption(\n\t\t\t\t\t\"unselectableStatus\",\n\t\t\t\t\tthis,\n\t\t\t\t\tthis,\n\t\t\t\t\topts,\n\t\t\t\t\tundefined\n\t\t\t\t);\n\n\t\t\tif (unselectable && unselectableStatus != null) {\n\t\t\t\tstate = unselectableStatus;\n\t\t\t}\n\t\t\tswitch (state) {\n\t\t\t\tcase false:\n\t\t\t\t\tchanged = this.selected || this.partsel;\n\t\t\t\t\tthis.selected = false;\n\t\t\t\t\tthis.partsel = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase true:\n\t\t\t\t\tchanged = !this.selected || !this.partsel;\n\t\t\t\t\tthis.selected = true;\n\t\t\t\t\tthis.partsel = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase undefined:\n\t\t\t\t\tchanged = this.selected || !this.partsel;\n\t\t\t\t\tthis.selected = false;\n\t\t\t\t\tthis.partsel = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t_assert(false, \"invalid state: \" + state);\n\t\t\t}\n\t\t\t// this.debug(\"fixSelection3AfterLoad() _changeSelectStatusAttrs()\", state, changed);\n\t\t\tif (changed) {\n\t\t\t\tthis.renderStatus();\n\t\t\t}\n\t\t\treturn changed;\n\t\t},\n\t\t/**\n\t\t * Fix selection status, after this node was (de)selected in multi-hier mode.\n\t\t * This includes (de)selecting all children.\n\t\t */\n\t\tfixSelection3AfterClick: function(callOpts) {\n\t\t\tvar flag = this.isSelected();\n\n\t\t\t// this.debug(\"fixSelection3AfterClick()\");\n\n\t\t\tthis.visit(function(node) {\n\t\t\t\tnode._changeSelectStatusAttrs(flag);\n\t\t\t\tif (node.radiogroup) {\n\t\t\t\t\t// #931: don't (de)select this branch\n\t\t\t\t\treturn \"skip\";\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.fixSelection3FromEndNodes(callOpts);\n\t\t},\n\t\t/**\n\t\t * Fix selection status for multi-hier mode.\n\t\t * Only end-nodes are considered to update the descendants branch and parents.\n\t\t * Should be called after this node has loaded new children or after\n\t\t * children have been modified using the API.\n\t\t */\n\t\tfixSelection3FromEndNodes: function(callOpts) {\n\t\t\tvar opts = this.tree.options;\n\n\t\t\t// this.debug(\"fixSelection3FromEndNodes()\");\n\t\t\t_assert(opts.selectMode === 3, \"expected selectMode 3\");\n\n\t\t\t// Visit all end nodes and adjust their parent's `selected` and `partsel`\n\t\t\t// attributes. Return selection state true, false, or undefined.\n\t\t\tfunction _walk(node) {\n\t\t\t\tvar i,\n\t\t\t\t\tl,\n\t\t\t\t\tchild,\n\t\t\t\t\ts,\n\t\t\t\t\tstate,\n\t\t\t\t\tallSelected,\n\t\t\t\t\tsomeSelected,\n\t\t\t\t\tunselIgnore,\n\t\t\t\t\tunselState,\n\t\t\t\t\tchildren = node.children;\n\n\t\t\t\tif (children && children.length) {\n\t\t\t\t\t// check all children recursively\n\t\t\t\t\tallSelected = true;\n\t\t\t\t\tsomeSelected = false;\n\n\t\t\t\t\tfor (i = 0, l = children.length; i < l; i++) {\n\t\t\t\t\t\tchild = children[i];\n\t\t\t\t\t\t// the selection state of a node is not relevant; we need the end-nodes\n\t\t\t\t\t\ts = _walk(child);\n\t\t\t\t\t\t// if( !child.unselectableIgnore ) {\n\t\t\t\t\t\tunselIgnore = FT.evalOption(\n\t\t\t\t\t\t\t\"unselectableIgnore\",\n\t\t\t\t\t\t\tchild,\n\t\t\t\t\t\t\tchild,\n\t\t\t\t\t\t\topts,\n\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (!unselIgnore) {\n\t\t\t\t\t\t\tif (s !== false) {\n\t\t\t\t\t\t\t\tsomeSelected = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (s !== true) {\n\t\t\t\t\t\t\t\tallSelected = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// eslint-disable-next-line no-nested-ternary\n\t\t\t\t\tstate = allSelected\n\t\t\t\t\t\t? true\n\t\t\t\t\t\t: someSelected\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: false;\n\t\t\t\t} else {\n\t\t\t\t\t// This is an end-node: simply report the status\n\t\t\t\t\tunselState = FT.evalOption(\n\t\t\t\t\t\t\"unselectableStatus\",\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\topts,\n\t\t\t\t\t\tundefined\n\t\t\t\t\t);\n\t\t\t\t\tstate = unselState == null ? !!node.selected : !!unselState;\n\t\t\t\t}\n\t\t\t\t// #939: Keep a `partsel` flag that was explicitly set on a lazy node\n\t\t\t\tif (\n\t\t\t\t\tnode.partsel &&\n\t\t\t\t\t!node.selected &&\n\t\t\t\t\tnode.lazy &&\n\t\t\t\t\tnode.children == null\n\t\t\t\t) {\n\t\t\t\t\tstate = undefined;\n\t\t\t\t}\n\t\t\t\tnode._changeSelectStatusAttrs(state);\n\t\t\t\treturn state;\n\t\t\t}\n\t\t\t_walk(this);\n\n\t\t\t// Update parent's state\n\t\t\tthis.visitParents(function(node) {\n\t\t\t\tvar i,\n\t\t\t\t\tl,\n\t\t\t\t\tchild,\n\t\t\t\t\tstate,\n\t\t\t\t\tunselIgnore,\n\t\t\t\t\tunselState,\n\t\t\t\t\tchildren = node.children,\n\t\t\t\t\tallSelected = true,\n\t\t\t\t\tsomeSelected = false;\n\n\t\t\t\tfor (i = 0, l = children.length; i < l; i++) {\n\t\t\t\t\tchild = children[i];\n\t\t\t\t\tunselIgnore = FT.evalOption(\n\t\t\t\t\t\t\"unselectableIgnore\",\n\t\t\t\t\t\tchild,\n\t\t\t\t\t\tchild,\n\t\t\t\t\t\topts,\n\t\t\t\t\t\tfalse\n\t\t\t\t\t);\n\t\t\t\t\tif (!unselIgnore) {\n\t\t\t\t\t\tunselState = FT.evalOption(\n\t\t\t\t\t\t\t\"unselectableStatus\",\n\t\t\t\t\t\t\tchild,\n\t\t\t\t\t\t\tchild,\n\t\t\t\t\t\t\topts,\n\t\t\t\t\t\t\tundefined\n\t\t\t\t\t\t);\n\t\t\t\t\t\tstate =\n\t\t\t\t\t\t\tunselState == null\n\t\t\t\t\t\t\t\t? !!child.selected\n\t\t\t\t\t\t\t\t: !!unselState;\n\t\t\t\t\t\t// When fixing the parents, we trust the sibling status (i.e.\n\t\t\t\t\t\t// we don't recurse)\n\t\t\t\t\t\tif (state || child.partsel) {\n\t\t\t\t\t\t\tsomeSelected = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!state) {\n\t\t\t\t\t\t\tallSelected = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-nested-ternary\n\t\t\t\tstate = allSelected ? true : someSelected ? undefined : false;\n\t\t\t\tnode._changeSelectStatusAttrs(state);\n\t\t\t});\n\t\t},\n\t\t// TODO: focus()\n\t\t/**\n\t\t * Update node data. If dict contains 'children', then also replace\n\t\t * the hole sub tree.\n\t\t * @param {NodeData} dict\n\t\t *\n\t\t * @see FancytreeNode#addChildren\n\t\t * @see FancytreeNode#applyPatch\n\t\t */\n\t\tfromDict: function(dict) {\n\t\t\t// copy all other attributes to this.data.xxx\n\t\t\tfor (var name in dict) {\n\t\t\t\tif (NODE_ATTR_MAP[name]) {\n\t\t\t\t\t// node.NAME = dict.NAME\n\t\t\t\t\tthis[name] = dict[name];\n\t\t\t\t} else if (name === \"data\") {\n\t\t\t\t\t// node.data += dict.data\n\t\t\t\t\t$.extend(this.data, dict.data);\n\t\t\t\t} else if (\n\t\t\t\t\t!$.isFunction(dict[name]) &&\n\t\t\t\t\t!NONE_NODE_DATA_MAP[name]\n\t\t\t\t) {\n\t\t\t\t\t// node.data.NAME = dict.NAME\n\t\t\t\t\tthis.data[name] = dict[name];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (dict.children) {\n\t\t\t\t// recursively set children and render\n\t\t\t\tthis.removeChildren();\n\t\t\t\tthis.addChildren(dict.children);\n\t\t\t}\n\t\t\tthis.renderTitle();\n\t\t\t/*\n\t\t\tvar children = dict.children;\n\t\t\tif(children === undefined){\n\t\t\t\tthis.data = $.extend(this.data, dict);\n\t\t\t\tthis.render();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdict = $.extend({}, dict);\n\t\t\tdict.children = undefined;\n\t\t\tthis.data = $.extend(this.data, dict);\n\t\t\tthis.removeChildren();\n\t\t\tthis.addChild(children);\n\t\t\t*/\n\t\t},\n\t\t/** Return the list of child nodes (undefined for unexpanded lazy nodes).\n\t\t * @returns {FancytreeNode[] | undefined}\n\t\t */\n\t\tgetChildren: function() {\n\t\t\tif (this.hasChildren() === undefined) {\n\t\t\t\t// TODO: only required for lazy nodes?\n\t\t\t\treturn undefined; // Lazy node: unloaded, currently loading, or load error\n\t\t\t}\n\t\t\treturn this.children;\n\t\t},\n\t\t/** Return the first child node or null.\n\t\t * @returns {FancytreeNode | null}\n\t\t */\n\t\tgetFirstChild: function() {\n\t\t\treturn this.children ? this.children[0] : null;\n\t\t},\n\t\t/** Return the 0-based child index.\n\t\t * @returns {int}\n\t\t */\n\t\tgetIndex: function() {\n\t\t\t// return this.parent.children.indexOf(this);\n\t\t\treturn $.inArray(this, this.parent.children); // indexOf doesn't work in IE7\n\t\t},\n\t\t/** Return the hierarchical child index (1-based, e.g. '3.2.4').\n\t\t * @param {string} [separator=\".\"]\n\t\t * @param {int} [digits=1]\n\t\t * @returns {string}\n\t\t */\n\t\tgetIndexHier: function(separator, digits) {\n\t\t\tseparator = separator || \".\";\n\t\t\tvar s,\n\t\t\t\tres = [];\n\t\t\t$.each(this.getParentList(false, true), function(i, o) {\n\t\t\t\ts = \"\" + (o.getIndex() + 1);\n\t\t\t\tif (digits) {\n\t\t\t\t\t// prepend leading zeroes\n\t\t\t\t\ts = (\"0000000\" + s).substr(-digits);\n\t\t\t\t}\n\t\t\t\tres.push(s);\n\t\t\t});\n\t\t\treturn res.join(separator);\n\t\t},\n\t\t/** Return the parent keys separated by options.keyPathSeparator, e.g. \"/id_1/id_17/id_32\".\n\t\t *\n\t\t * (Unlike `node.getPath()`, this method prepends a \"/\" and inverts the first argument.)\n\t\t *\n\t\t * @see FancytreeNode#getPath\n\t\t * @param {boolean} [excludeSelf=false]\n\t\t * @returns {string}\n\t\t */\n\t\tgetKeyPath: function(excludeSelf) {\n\t\t\tvar sep = this.tree.options.keyPathSeparator;\n\n\t\t\treturn sep + this.getPath(!excludeSelf, \"key\", sep);\n\t\t},\n\t\t/** Return the last child of this node or null.\n\t\t * @returns {FancytreeNode | null}\n\t\t */\n\t\tgetLastChild: function() {\n\t\t\treturn this.children\n\t\t\t\t? this.children[this.children.length - 1]\n\t\t\t\t: null;\n\t\t},\n\t\t/** Return node depth. 0: System root node, 1: visible top-level node, 2: first sub-level, ... .\n\t\t * @returns {int}\n\t\t */\n\t\tgetLevel: function() {\n\t\t\tvar level = 0,\n\t\t\t\tdtn = this.parent;\n\t\t\twhile (dtn) {\n\t\t\t\tlevel++;\n\t\t\t\tdtn = dtn.parent;\n\t\t\t}\n\t\t\treturn level;\n\t\t},\n\t\t/** Return the successor node (under the same parent) or null.\n\t\t * @returns {FancytreeNode | null}\n\t\t */\n\t\tgetNextSibling: function() {\n\t\t\t// TODO: use indexOf, if available: (not in IE6)\n\t\t\tif (this.parent) {\n\t\t\t\tvar i,\n\t\t\t\t\tl,\n\t\t\t\t\tac = this.parent.children;\n\n\t\t\t\tfor (i = 0, l = ac.length - 1; i < l; i++) {\n\t\t\t\t\t// up to length-2, so next(last) = null\n\t\t\t\t\tif (ac[i] === this) {\n\t\t\t\t\t\treturn ac[i + 1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\t/** Return the parent node (null for the system root node).\n\t\t * @returns {FancytreeNode | null}\n\t\t */\n\t\tgetParent: function() {\n\t\t\t// TODO: return null for top-level nodes?\n\t\t\treturn this.parent;\n\t\t},\n\t\t/** Return an array of all parent nodes (top-down).\n\t\t * @param {boolean} [includeRoot=false] Include the invisible system root node.\n\t\t * @param {boolean} [includeSelf=false] Include the node itself.\n\t\t * @returns {FancytreeNode[]}\n\t\t */\n\t\tgetParentList: function(includeRoot, includeSelf) {\n\t\t\tvar l = [],\n\t\t\t\tdtn = includeSelf ? this : this.parent;\n\t\t\twhile (dtn) {\n\t\t\t\tif (includeRoot || dtn.parent) {\n\t\t\t\t\tl.unshift(dtn);\n\t\t\t\t}\n\t\t\t\tdtn = dtn.parent;\n\t\t\t}\n\t\t\treturn l;\n\t\t},\n\t\t/** Return a string representing the hierachical node path, e.g. \"a/b/c\".\n\t\t * @param {boolean} [includeSelf=true]\n\t\t * @param {string | function} [part=\"title\"] node property name or callback\n\t\t * @param {string} [separator=\"/\"]\n\t\t * @returns {string}\n\t\t * @since v2.31\n\t\t */\n\t\tgetPath: function(includeSelf, part, separator) {\n\t\t\tincludeSelf = includeSelf !== false;\n\t\t\tpart = part || \"title\";\n\t\t\tseparator = separator || \"/\";\n\n\t\t\tvar val,\n\t\t\t\tpath = [],\n\t\t\t\tisFunc = $.isFunction(part);\n\n\t\t\tthis.visitParents(function(n) {\n\t\t\t\tif (n.parent) {\n\t\t\t\t\tval = isFunc ? part(n) : n[part];\n\t\t\t\t\tpath.unshift(val);\n\t\t\t\t}\n\t\t\t}, includeSelf);\n\t\t\treturn path.join(separator);\n\t\t},\n\t\t/** Return the predecessor node (under the same parent) or null.\n\t\t * @returns {FancytreeNode | null}\n\t\t */\n\t\tgetPrevSibling: function() {\n\t\t\tif (this.parent) {\n\t\t\t\tvar i,\n\t\t\t\t\tl,\n\t\t\t\t\tac = this.parent.children;\n\n\t\t\t\tfor (i = 1, l = ac.length; i < l; i++) {\n\t\t\t\t\t// start with 1, so prev(first) = null\n\t\t\t\t\tif (ac[i] === this) {\n\t\t\t\t\t\treturn ac[i - 1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\t/**\n\t\t * Return an array of selected descendant nodes.\n\t\t * @param {boolean} [stopOnParents=false] only return the topmost selected\n\t\t *     node (useful with selectMode 3)\n\t\t * @returns {FancytreeNode[]}\n\t\t */\n\t\tgetSelectedNodes: function(stopOnParents) {\n\t\t\tvar nodeList = [];\n\t\t\tthis.visit(function(node) {\n\t\t\t\tif (node.selected) {\n\t\t\t\t\tnodeList.push(node);\n\t\t\t\t\tif (stopOnParents === true) {\n\t\t\t\t\t\treturn \"skip\"; // stop processing this branch\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn nodeList;\n\t\t},\n\t\t/** Return true if node has children. Return undefined if not sure, i.e. the node is lazy and not yet loaded).\n\t\t * @returns {boolean | undefined}\n\t\t */\n\t\thasChildren: function() {\n\t\t\tif (this.lazy) {\n\t\t\t\tif (this.children == null) {\n\t\t\t\t\t// null or undefined: Not yet loaded\n\t\t\t\t\treturn undefined;\n\t\t\t\t} else if (this.children.length === 0) {\n\t\t\t\t\t// Loaded, but response was empty\n\t\t\t\t\treturn false;\n\t\t\t\t} else if (\n\t\t\t\t\tthis.children.length === 1 &&\n\t\t\t\t\tthis.children[0].isStatusNode()\n\t\t\t\t) {\n\t\t\t\t\t// Currently loading or load error\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn !!(this.children && this.children.length);\n\t\t},\n\t\t/**\n\t\t * Return true if node has `className` defined in .extraClasses.\n\t\t *\n\t\t * @param {string} className class name (separate multiple classes by space)\n\t\t * @returns {boolean}\n\t\t *\n\t\t * @since 2.32\n\t\t */\n\t\thasClass: function(className) {\n\t\t\treturn (\n\t\t\t\t(\" \" + (this.extraClasses || \"\") + \" \").indexOf(\n\t\t\t\t\t\" \" + className + \" \"\n\t\t\t\t) >= 0\n\t\t\t);\n\t\t},\n\t\t/** Return true if node has keyboard focus.\n\t\t * @returns {boolean}\n\t\t */\n\t\thasFocus: function() {\n\t\t\treturn this.tree.hasFocus() && this.tree.focusNode === this;\n\t\t},\n\t\t/** Write to browser console if debugLevel >= 3 (prepending node info)\n\t\t *\n\t\t * @param {*} msg string or object or array of such\n\t\t */\n\t\tinfo: function(msg) {\n\t\t\tif (this.tree.options.debugLevel >= 3) {\n\t\t\t\tArray.prototype.unshift.call(arguments, this.toString());\n\t\t\t\tconsoleApply(\"info\", arguments);\n\t\t\t}\n\t\t},\n\t\t/** Return true if node is active (see also FancytreeNode#isSelected).\n\t\t * @returns {boolean}\n\t\t */\n\t\tisActive: function() {\n\t\t\treturn this.tree.activeNode === this;\n\t\t},\n\t\t/** Return true if node is vertically below `otherNode`, i.e. rendered in a subsequent row.\n\t\t * @param {FancytreeNode} otherNode\n\t\t * @returns {boolean}\n\t\t * @since 2.28\n\t\t */\n\t\tisBelowOf: function(otherNode) {\n\t\t\treturn this.getIndexHier(\".\", 5) > otherNode.getIndexHier(\".\", 5);\n\t\t},\n\t\t/** Return true if node is a direct child of otherNode.\n\t\t * @param {FancytreeNode} otherNode\n\t\t * @returns {boolean}\n\t\t */\n\t\tisChildOf: function(otherNode) {\n\t\t\treturn this.parent && this.parent === otherNode;\n\t\t},\n\t\t/** Return true, if node is a direct or indirect sub node of otherNode.\n\t\t * @param {FancytreeNode} otherNode\n\t\t * @returns {boolean}\n\t\t */\n\t\tisDescendantOf: function(otherNode) {\n\t\t\tif (!otherNode || otherNode.tree !== this.tree) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar p = this.parent;\n\t\t\twhile (p) {\n\t\t\t\tif (p === otherNode) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tif (p === p.parent) {\n\t\t\t\t\t$.error(\"Recursive parent link: \" + p);\n\t\t\t\t}\n\t\t\t\tp = p.parent;\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\t/** Return true if node is expanded.\n\t\t * @returns {boolean}\n\t\t */\n\t\tisExpanded: function() {\n\t\t\treturn !!this.expanded;\n\t\t},\n\t\t/** Return true if node is the first node of its parent's children.\n\t\t * @returns {boolean}\n\t\t */\n\t\tisFirstSibling: function() {\n\t\t\tvar p = this.parent;\n\t\t\treturn !p || p.children[0] === this;\n\t\t},\n\t\t/** Return true if node is a folder, i.e. has the node.folder attribute set.\n\t\t * @returns {boolean}\n\t\t */\n\t\tisFolder: function() {\n\t\t\treturn !!this.folder;\n\t\t},\n\t\t/** Return true if node is the last node of its parent's children.\n\t\t * @returns {boolean}\n\t\t */\n\t\tisLastSibling: function() {\n\t\t\tvar p = this.parent;\n\t\t\treturn !p || p.children[p.children.length - 1] === this;\n\t\t},\n\t\t/** Return true if node is lazy (even if data was already loaded)\n\t\t * @returns {boolean}\n\t\t */\n\t\tisLazy: function() {\n\t\t\treturn !!this.lazy;\n\t\t},\n\t\t/** Return true if node is lazy and loaded. For non-lazy nodes always return true.\n\t\t * @returns {boolean}\n\t\t */\n\t\tisLoaded: function() {\n\t\t\treturn !this.lazy || this.hasChildren() !== undefined; // Also checks if the only child is a status node\n\t\t},\n\t\t/** Return true if children are currently beeing loaded, i.e. a Ajax request is pending.\n\t\t * @returns {boolean}\n\t\t */\n\t\tisLoading: function() {\n\t\t\treturn !!this._isLoading;\n\t\t},\n\t\t/*\n\t\t * @deprecated since v2.4.0:  Use isRootNode() instead\n\t\t */\n\t\tisRoot: function() {\n\t\t\treturn this.isRootNode();\n\t\t},\n\t\t/** Return true if node is partially selected (tri-state).\n\t\t * @returns {boolean}\n\t\t * @since 2.23\n\t\t */\n\t\tisPartsel: function() {\n\t\t\treturn !this.selected && !!this.partsel;\n\t\t},\n\t\t/** (experimental) Return true if this is partially loaded.\n\t\t * @returns {boolean}\n\t\t * @since 2.15\n\t\t */\n\t\tisPartload: function() {\n\t\t\treturn !!this.partload;\n\t\t},\n\t\t/** Return true if this is the (invisible) system root node.\n\t\t * @returns {boolean}\n\t\t * @since 2.4\n\t\t */\n\t\tisRootNode: function() {\n\t\t\treturn this.tree.rootNode === this;\n\t\t},\n\t\t/** Return true if node is selected, i.e. has a checkmark set (see also FancytreeNode#isActive).\n\t\t * @returns {boolean}\n\t\t */\n\t\tisSelected: function() {\n\t\t\treturn !!this.selected;\n\t\t},\n\t\t/** Return true if this node is a temporarily generated system node like\n\t\t * 'loading', 'paging', or 'error' (node.statusNodeType contains the type).\n\t\t * @returns {boolean}\n\t\t */\n\t\tisStatusNode: function() {\n\t\t\treturn !!this.statusNodeType;\n\t\t},\n\t\t/** Return true if this node is a status node of type 'paging'.\n\t\t * @returns {boolean}\n\t\t * @since 2.15\n\t\t */\n\t\tisPagingNode: function() {\n\t\t\treturn this.statusNodeType === \"paging\";\n\t\t},\n\t\t/** Return true if this a top level node, i.e. a direct child of the (invisible) system root node.\n\t\t * @returns {boolean}\n\t\t * @since 2.4\n\t\t */\n\t\tisTopLevel: function() {\n\t\t\treturn this.tree.rootNode === this.parent;\n\t\t},\n\t\t/** Return true if node is lazy and not yet loaded. For non-lazy nodes always return false.\n\t\t * @returns {boolean}\n\t\t */\n\t\tisUndefined: function() {\n\t\t\treturn this.hasChildren() === undefined; // also checks if the only child is a status node\n\t\t},\n\t\t/** Return true if all parent nodes are expanded. Note: this does not check\n\t\t * whether the node is scrolled into the visible part of the screen.\n\t\t * @returns {boolean}\n\t\t */\n\t\tisVisible: function() {\n\t\t\tvar i,\n\t\t\t\tl,\n\t\t\t\tn,\n\t\t\t\thasFilter = this.tree.enableFilter,\n\t\t\t\tparents = this.getParentList(false, false);\n\n\t\t\t// TODO: check $(n.span).is(\":visible\")\n\t\t\t// i.e. return false for nodes (but not parents) that are hidden\n\t\t\t// by a filter\n\t\t\tif (hasFilter && !this.match && !this.subMatchCount) {\n\t\t\t\t// this.debug( \"isVisible: HIDDEN (\" + hasFilter + \", \" + this.match + \", \" + this.match + \")\" );\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfor (i = 0, l = parents.length; i < l; i++) {\n\t\t\t\tn = parents[i];\n\n\t\t\t\tif (!n.expanded) {\n\t\t\t\t\t// this.debug(\"isVisible: HIDDEN (parent collapsed)\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// if (hasFilter && !n.match && !n.subMatchCount) {\n\t\t\t\t// \tthis.debug(\"isVisible: HIDDEN (\" + hasFilter + \", \" + this.match + \", \" + this.match + \")\");\n\t\t\t\t// \treturn false;\n\t\t\t\t// }\n\t\t\t}\n\t\t\t// this.debug(\"isVisible: VISIBLE\");\n\t\t\treturn true;\n\t\t},\n\t\t/** Deprecated.\n\t\t * @deprecated since 2014-02-16: use load() instead.\n\t\t */\n\t\tlazyLoad: function(discard) {\n\t\t\t$.error(\n\t\t\t\t\"FancytreeNode.lazyLoad() is deprecated since 2014-02-16. Use .load() instead.\"\n\t\t\t);\n\t\t},\n\t\t/**\n\t\t * Load all children of a lazy node if neccessary. The <i>expanded</i> state is maintained.\n\t\t * @param {boolean} [forceReload=false] Pass true to discard any existing nodes before. Otherwise this method does nothing if the node was already loaded.\n\t\t * @returns {$.Promise}\n\t\t */\n\t\tload: function(forceReload) {\n\t\t\tvar res,\n\t\t\t\tsource,\n\t\t\t\tself = this,\n\t\t\t\twasExpanded = this.isExpanded();\n\n\t\t\t_assert(this.isLazy(), \"load() requires a lazy node\");\n\t\t\t// _assert( forceReload || this.isUndefined(), \"Pass forceReload=true to re-load a lazy node\" );\n\t\t\tif (!forceReload && !this.isUndefined()) {\n\t\t\t\treturn _getResolvedPromise(this);\n\t\t\t}\n\t\t\tif (this.isLoaded()) {\n\t\t\t\tthis.resetLazy(); // also collapses\n\t\t\t}\n\t\t\t// This method is also called by setExpanded() and loadKeyPath(), so we\n\t\t\t// have to avoid recursion.\n\t\t\tsource = this.tree._triggerNodeEvent(\"lazyLoad\", this);\n\t\t\tif (source === false) {\n\t\t\t\t// #69\n\t\t\t\treturn _getResolvedPromise(this);\n\t\t\t}\n\t\t\t_assert(\n\t\t\t\ttypeof source !== \"boolean\",\n\t\t\t\t\"lazyLoad event must return source in data.result\"\n\t\t\t);\n\t\t\tres = this.tree._callHook(\"nodeLoadChildren\", this, source);\n\t\t\tif (wasExpanded) {\n\t\t\t\tthis.expanded = true;\n\t\t\t\tres.always(function() {\n\t\t\t\t\tself.render();\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tres.always(function() {\n\t\t\t\t\tself.renderStatus(); // fix expander icon to 'loaded'\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn res;\n\t\t},\n\t\t/** Expand all parents and optionally scroll into visible area as neccessary.\n\t\t * Promise is resolved, when lazy loading and animations are done.\n\t\t * @param {object} [opts] passed to `setExpanded()`.\n\t\t *     Defaults to {noAnimation: false, noEvents: false, scrollIntoView: true}\n\t\t * @returns {$.Promise}\n\t\t */\n\t\tmakeVisible: function(opts) {\n\t\t\tvar i,\n\t\t\t\tself = this,\n\t\t\t\tdeferreds = [],\n\t\t\t\tdfd = new $.Deferred(),\n\t\t\t\tparents = this.getParentList(false, false),\n\t\t\t\tlen = parents.length,\n\t\t\t\teffects = !(opts && opts.noAnimation === true),\n\t\t\t\tscroll = !(opts && opts.scrollIntoView === false);\n\n\t\t\t// Expand bottom-up, so only the top node is animated\n\t\t\tfor (i = len - 1; i >= 0; i--) {\n\t\t\t\t// self.debug(\"pushexpand\" + parents[i]);\n\t\t\t\tdeferreds.push(parents[i].setExpanded(true, opts));\n\t\t\t}\n\t\t\t$.when.apply($, deferreds).done(function() {\n\t\t\t\t// All expands have finished\n\t\t\t\t// self.debug(\"expand DONE\", scroll);\n\t\t\t\tif (scroll) {\n\t\t\t\t\tself.scrollIntoView(effects).done(function() {\n\t\t\t\t\t\t// self.debug(\"scroll DONE\");\n\t\t\t\t\t\tdfd.resolve();\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tdfd.resolve();\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn dfd.promise();\n\t\t},\n\t\t/** Move this node to targetNode.\n\t\t *  @param {FancytreeNode} targetNode\n\t\t *  @param {string} mode <pre>\n\t\t *      'child': append this node as last child of targetNode.\n\t\t *               This is the default. To be compatble with the D'n'd\n\t\t *               hitMode, we also accept 'over'.\n\t\t *      'firstChild': add this node as first child of targetNode.\n\t\t *      'before': add this node as sibling before targetNode.\n\t\t *      'after': add this node as sibling after targetNode.</pre>\n\t\t *  @param {function} [map] optional callback(FancytreeNode) to allow modifcations\n\t\t */\n\t\tmoveTo: function(targetNode, mode, map) {\n\t\t\tif (mode === undefined || mode === \"over\") {\n\t\t\t\tmode = \"child\";\n\t\t\t} else if (mode === \"firstChild\") {\n\t\t\t\tif (targetNode.children && targetNode.children.length) {\n\t\t\t\t\tmode = \"before\";\n\t\t\t\t\ttargetNode = targetNode.children[0];\n\t\t\t\t} else {\n\t\t\t\t\tmode = \"child\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar pos,\n\t\t\t\ttree = this.tree,\n\t\t\t\tprevParent = this.parent,\n\t\t\t\ttargetParent =\n\t\t\t\t\tmode === \"child\" ? targetNode : targetNode.parent;\n\n\t\t\tif (this === targetNode) {\n\t\t\t\treturn;\n\t\t\t} else if (!this.parent) {\n\t\t\t\t$.error(\"Cannot move system root\");\n\t\t\t} else if (targetParent.isDescendantOf(this)) {\n\t\t\t\t$.error(\"Cannot move a node to its own descendant\");\n\t\t\t}\n\t\t\tif (targetParent !== prevParent) {\n\t\t\t\tprevParent.triggerModifyChild(\"remove\", this);\n\t\t\t}\n\t\t\t// Unlink this node from current parent\n\t\t\tif (this.parent.children.length === 1) {\n\t\t\t\tif (this.parent === targetParent) {\n\t\t\t\t\treturn; // #258\n\t\t\t\t}\n\t\t\t\tthis.parent.children = this.parent.lazy ? [] : null;\n\t\t\t\tthis.parent.expanded = false;\n\t\t\t} else {\n\t\t\t\tpos = $.inArray(this, this.parent.children);\n\t\t\t\t_assert(pos >= 0, \"invalid source parent\");\n\t\t\t\tthis.parent.children.splice(pos, 1);\n\t\t\t}\n\t\t\t// Remove from source DOM parent\n\t\t\t// if(this.parent.ul){\n\t\t\t// \tthis.parent.ul.removeChild(this.li);\n\t\t\t// }\n\n\t\t\t// Insert this node to target parent's child list\n\t\t\tthis.parent = targetParent;\n\t\t\tif (targetParent.hasChildren()) {\n\t\t\t\tswitch (mode) {\n\t\t\t\t\tcase \"child\":\n\t\t\t\t\t\t// Append to existing target children\n\t\t\t\t\t\ttargetParent.children.push(this);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"before\":\n\t\t\t\t\t\t// Insert this node before target node\n\t\t\t\t\t\tpos = $.inArray(targetNode, targetParent.children);\n\t\t\t\t\t\t_assert(pos >= 0, \"invalid target parent\");\n\t\t\t\t\t\ttargetParent.children.splice(pos, 0, this);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"after\":\n\t\t\t\t\t\t// Insert this node after target node\n\t\t\t\t\t\tpos = $.inArray(targetNode, targetParent.children);\n\t\t\t\t\t\t_assert(pos >= 0, \"invalid target parent\");\n\t\t\t\t\t\ttargetParent.children.splice(pos + 1, 0, this);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$.error(\"Invalid mode \" + mode);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttargetParent.children = [this];\n\t\t\t}\n\t\t\t// Parent has no <ul> tag yet:\n\t\t\t// if( !targetParent.ul ) {\n\t\t\t// \t// This is the parent's first child: create UL tag\n\t\t\t// \t// (Hidden, because it will be\n\t\t\t// \ttargetParent.ul = document.createElement(\"ul\");\n\t\t\t// \ttargetParent.ul.style.display = \"none\";\n\t\t\t// \ttargetParent.li.appendChild(targetParent.ul);\n\t\t\t// }\n\t\t\t// // Issue 319: Add to target DOM parent (only if node was already rendered(expanded))\n\t\t\t// if(this.li){\n\t\t\t// \ttargetParent.ul.appendChild(this.li);\n\t\t\t// }\n\n\t\t\t// Let caller modify the nodes\n\t\t\tif (map) {\n\t\t\t\ttargetNode.visit(map, true);\n\t\t\t}\n\t\t\tif (targetParent === prevParent) {\n\t\t\t\ttargetParent.triggerModifyChild(\"move\", this);\n\t\t\t} else {\n\t\t\t\t// prevParent.triggerModifyChild(\"remove\", this);\n\t\t\t\ttargetParent.triggerModifyChild(\"add\", this);\n\t\t\t}\n\t\t\t// Handle cross-tree moves\n\t\t\tif (tree !== targetNode.tree) {\n\t\t\t\t// Fix node.tree for all source nodes\n\t\t\t\t// \t_assert(false, \"Cross-tree move is not yet implemented.\");\n\t\t\t\tthis.warn(\"Cross-tree moveTo is experimental!\");\n\t\t\t\tthis.visit(function(n) {\n\t\t\t\t\t// TODO: fix selection state and activation, ...\n\t\t\t\t\tn.tree = targetNode.tree;\n\t\t\t\t}, true);\n\t\t\t}\n\n\t\t\t// A collaposed node won't re-render children, so we have to remove it manually\n\t\t\t// if( !targetParent.expanded ){\n\t\t\t//   prevParent.ul.removeChild(this.li);\n\t\t\t// }\n\t\t\ttree._callHook(\"treeStructureChanged\", tree, \"moveTo\");\n\n\t\t\t// Update HTML markup\n\t\t\tif (!prevParent.isDescendantOf(targetParent)) {\n\t\t\t\tprevParent.render();\n\t\t\t}\n\t\t\tif (\n\t\t\t\t!targetParent.isDescendantOf(prevParent) &&\n\t\t\t\ttargetParent !== prevParent\n\t\t\t) {\n\t\t\t\ttargetParent.render();\n\t\t\t}\n\t\t\t// TODO: fix selection state\n\t\t\t// TODO: fix active state\n\n\t\t\t/*\n\t\t\tvar tree = this.tree;\n\t\t\tvar opts = tree.options;\n\t\t\tvar pers = tree.persistence;\n\n\t\t\t// Always expand, if it's below minExpandLevel\n\t\t\t// tree.logDebug (\"%s._addChildNode(%o), l=%o\", this, ftnode, ftnode.getLevel());\n\t\t\tif ( opts.minExpandLevel >= ftnode.getLevel() ) {\n\t\t\t\t// tree.logDebug (\"Force expand for %o\", ftnode);\n\t\t\t\tthis.bExpanded = true;\n\t\t\t}\n\n\t\t\t// In multi-hier mode, update the parents selection state\n\t\t\t// DT issue #82: only if not initializing, because the children may not exist yet\n\t\t\t// if( !ftnode.data.isStatusNode() && opts.selectMode==3 && !isInitializing )\n\t\t\t// \tftnode._fixSelectionState();\n\n\t\t\t// In multi-hier mode, update the parents selection state\n\t\t\tif( ftnode.bSelected && opts.selectMode==3 ) {\n\t\t\t\tvar p = this;\n\t\t\t\twhile( p ) {\n\t\t\t\t\tif( !p.hasSubSel )\n\t\t\t\t\t\tp._setSubSel(true);\n\t\t\t\t\tp = p.parent;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// render this node and the new child\n\t\t\tif ( tree.bEnableUpdate )\n\t\t\t\tthis.render();\n\t\t\treturn ftnode;\n\t\t\t*/\n\t\t},\n\t\t/** Set focus relative to this node and optionally activate.\n\t\t *\n\t\t * 'left' collapses the node if it is expanded, or move to the parent\n\t\t * otherwise.\n\t\t * 'right' expands the node if it is collapsed, or move to the first\n\t\t * child otherwise.\n\t\t *\n\t\t * @param {string|number} where 'down', 'first', 'last', 'left', 'parent', 'right', or 'up'.\n\t\t *   (Alternatively the keyCode that would normally trigger this move,\n\t\t *   e.g. `$.ui.keyCode.LEFT` = 'left'.\n\t\t * @param {boolean} [activate=true]\n\t\t * @returns {$.Promise}\n\t\t */\n\t\tnavigate: function(where, activate) {\n\t\t\tvar node,\n\t\t\t\tKC = $.ui.keyCode;\n\n\t\t\t// Handle optional expand/collapse action for LEFT/RIGHT\n\t\t\tswitch (where) {\n\t\t\t\tcase \"left\":\n\t\t\t\tcase KC.LEFT:\n\t\t\t\t\tif (this.expanded) {\n\t\t\t\t\t\treturn this.setExpanded(false);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"right\":\n\t\t\t\tcase KC.RIGHT:\n\t\t\t\t\tif (!this.expanded && (this.children || this.lazy)) {\n\t\t\t\t\t\treturn this.setExpanded();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Otherwise activate or focus the related node\n\t\t\tnode = this.findRelatedNode(where);\n\t\t\tif (node) {\n\t\t\t\t// setFocus/setActive will scroll later (if autoScroll is specified)\n\t\t\t\ttry {\n\t\t\t\t\tnode.makeVisible({ scrollIntoView: false });\n\t\t\t\t} catch (e) {} // #272\n\t\t\t\tif (activate === false) {\n\t\t\t\t\tnode.setFocus();\n\t\t\t\t\treturn _getResolvedPromise();\n\t\t\t\t}\n\t\t\t\treturn node.setActive();\n\t\t\t}\n\t\t\tthis.warn(\"Could not find related node '\" + where + \"'.\");\n\t\t\treturn _getResolvedPromise();\n\t\t},\n\t\t/**\n\t\t * Remove this node (not allowed for system root).\n\t\t */\n\t\tremove: function() {\n\t\t\treturn this.parent.removeChild(this);\n\t\t},\n\t\t/**\n\t\t * Remove childNode from list of direct children.\n\t\t * @param {FancytreeNode} childNode\n\t\t */\n\t\tremoveChild: function(childNode) {\n\t\t\treturn this.tree._callHook(\"nodeRemoveChild\", this, childNode);\n\t\t},\n\t\t/**\n\t\t * Remove all child nodes and descendents. This converts the node into a leaf.<br>\n\t\t * If this was a lazy node, it is still considered 'loaded'; call node.resetLazy()\n\t\t * in order to trigger lazyLoad on next expand.\n\t\t */\n\t\tremoveChildren: function() {\n\t\t\treturn this.tree._callHook(\"nodeRemoveChildren\", this);\n\t\t},\n\t\t/**\n\t\t * Remove class from node's span tag and .extraClasses.\n\t\t *\n\t\t * @param {string} className class name\n\t\t *\n\t\t * @since 2.17\n\t\t */\n\t\tremoveClass: function(className) {\n\t\t\treturn this.toggleClass(className, false);\n\t\t},\n\t\t/**\n\t\t * This method renders and updates all HTML markup that is required\n\t\t * to display this node in its current state.<br>\n\t\t * Note:\n\t\t * <ul>\n\t\t * <li>It should only be neccessary to call this method after the node object\n\t\t *     was modified by direct access to its properties, because the common\n\t\t *     API methods (node.setTitle(), moveTo(), addChildren(), remove(), ...)\n\t\t *     already handle this.\n\t\t * <li> {@link FancytreeNode#renderTitle} and {@link FancytreeNode#renderStatus}\n\t\t *     are implied. If changes are more local, calling only renderTitle() or\n\t\t *     renderStatus() may be sufficient and faster.\n\t\t * </ul>\n\t\t *\n\t\t * @param {boolean} [force=false] re-render, even if html markup was already created\n\t\t * @param {boolean} [deep=false] also render all descendants, even if parent is collapsed\n\t\t */\n\t\trender: function(force, deep) {\n\t\t\treturn this.tree._callHook(\"nodeRender\", this, force, deep);\n\t\t},\n\t\t/** Create HTML markup for the node's outer `<span>` (expander, checkbox, icon, and title).\n\t\t * Implies {@link FancytreeNode#renderStatus}.\n\t\t * @see Fancytree_Hooks#nodeRenderTitle\n\t\t */\n\t\trenderTitle: function() {\n\t\t\treturn this.tree._callHook(\"nodeRenderTitle\", this);\n\t\t},\n\t\t/** Update element's CSS classes according to node state.\n\t\t * @see Fancytree_Hooks#nodeRenderStatus\n\t\t */\n\t\trenderStatus: function() {\n\t\t\treturn this.tree._callHook(\"nodeRenderStatus\", this);\n\t\t},\n\t\t/**\n\t\t * (experimental) Replace this node with `source`.\n\t\t * (Currently only available for paging nodes.)\n\t\t * @param {NodeData[]} source List of child node definitions\n\t\t * @since 2.15\n\t\t */\n\t\treplaceWith: function(source) {\n\t\t\tvar res,\n\t\t\t\tparent = this.parent,\n\t\t\t\tpos = $.inArray(this, parent.children),\n\t\t\t\tself = this;\n\n\t\t\t_assert(\n\t\t\t\tthis.isPagingNode(),\n\t\t\t\t\"replaceWith() currently requires a paging status node\"\n\t\t\t);\n\n\t\t\tres = this.tree._callHook(\"nodeLoadChildren\", this, source);\n\t\t\tres.done(function(data) {\n\t\t\t\t// New nodes are currently children of `this`.\n\t\t\t\tvar children = self.children;\n\t\t\t\t// Prepend newly loaded child nodes to `this`\n\t\t\t\t// Move new children after self\n\t\t\t\tfor (i = 0; i < children.length; i++) {\n\t\t\t\t\tchildren[i].parent = parent;\n\t\t\t\t}\n\t\t\t\tparent.children.splice.apply(\n\t\t\t\t\tparent.children,\n\t\t\t\t\t[pos + 1, 0].concat(children)\n\t\t\t\t);\n\n\t\t\t\t// Remove self\n\t\t\t\tself.children = null;\n\t\t\t\tself.remove();\n\t\t\t\t// Redraw new nodes\n\t\t\t\tparent.render();\n\t\t\t\t// TODO: set node.partload = false if this was tha last paging node?\n\t\t\t\t// parent.addPagingNode(false);\n\t\t\t}).fail(function() {\n\t\t\t\tself.setExpanded();\n\t\t\t});\n\t\t\treturn res;\n\t\t\t// $.error(\"Not implemented: replaceWith()\");\n\t\t},\n\t\t/**\n\t\t * Remove all children, collapse, and set the lazy-flag, so that the lazyLoad\n\t\t * event is triggered on next expand.\n\t\t */\n\t\tresetLazy: function() {\n\t\t\tthis.removeChildren();\n\t\t\tthis.expanded = false;\n\t\t\tthis.lazy = true;\n\t\t\tthis.children = undefined;\n\t\t\tthis.renderStatus();\n\t\t},\n\t\t/** Schedule activity for delayed execution (cancel any pending request).\n\t\t *  scheduleAction('cancel') will only cancel a pending request (if any).\n\t\t * @param {string} mode\n\t\t * @param {number} ms\n\t\t */\n\t\tscheduleAction: function(mode, ms) {\n\t\t\tif (this.tree.timer) {\n\t\t\t\tclearTimeout(this.tree.timer);\n\t\t\t\tthis.tree.debug(\"clearTimeout(%o)\", this.tree.timer);\n\t\t\t}\n\t\t\tthis.tree.timer = null;\n\t\t\tvar self = this; // required for closures\n\t\t\tswitch (mode) {\n\t\t\t\tcase \"cancel\":\n\t\t\t\t\t// Simply made sure that timer was cleared\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"expand\":\n\t\t\t\t\tthis.tree.timer = setTimeout(function() {\n\t\t\t\t\t\tself.tree.debug(\"setTimeout: trigger expand\");\n\t\t\t\t\t\tself.setExpanded(true);\n\t\t\t\t\t}, ms);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"activate\":\n\t\t\t\t\tthis.tree.timer = setTimeout(function() {\n\t\t\t\t\t\tself.tree.debug(\"setTimeout: trigger activate\");\n\t\t\t\t\t\tself.setActive(true);\n\t\t\t\t\t}, ms);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$.error(\"Invalid mode \" + mode);\n\t\t\t}\n\t\t\t// this.tree.debug(\"setTimeout(%s, %s): %s\", mode, ms, this.tree.timer);\n\t\t},\n\t\t/**\n\t\t *\n\t\t * @param {boolean | PlainObject} [effects=false] animation options.\n\t\t * @param {object} [options=null] {topNode: null, effects: ..., parent: ...} this node will remain visible in\n\t\t *     any case, even if `this` is outside the scroll pane.\n\t\t * @returns {$.Promise}\n\t\t */\n\t\tscrollIntoView: function(effects, options) {\n\t\t\tif (options !== undefined && _isNode(options)) {\n\t\t\t\tthrow Error(\n\t\t\t\t\t\"scrollIntoView() with 'topNode' option is deprecated since 2014-05-08. Use 'options.topNode' instead.\"\n\t\t\t\t);\n\t\t\t}\n\t\t\t// The scroll parent is typically the plain tree's <UL> container.\n\t\t\t// For ext-table, we choose the nearest parent that has `position: relative`\n\t\t\t// and `overflow` set.\n\t\t\t// (This default can be overridden by the local or global `scrollParent` option.)\n\t\t\tvar opts = $.extend(\n\t\t\t\t\t{\n\t\t\t\t\t\teffects:\n\t\t\t\t\t\t\teffects === true\n\t\t\t\t\t\t\t\t? { duration: 200, queue: false }\n\t\t\t\t\t\t\t\t: effects,\n\t\t\t\t\t\tscrollOfs: this.tree.options.scrollOfs,\n\t\t\t\t\t\tscrollParent: this.tree.options.scrollParent,\n\t\t\t\t\t\ttopNode: null,\n\t\t\t\t\t},\n\t\t\t\t\toptions\n\t\t\t\t),\n\t\t\t\t$scrollParent = opts.scrollParent,\n\t\t\t\t$container = this.tree.$container,\n\t\t\t\toverflowY = $container.css(\"overflow-y\");\n\n\t\t\tif (!$scrollParent) {\n\t\t\t\tif (this.tree.tbody) {\n\t\t\t\t\t$scrollParent = $container.scrollParent();\n\t\t\t\t} else if (overflowY === \"scroll\" || overflowY === \"auto\") {\n\t\t\t\t\t$scrollParent = $container;\n\t\t\t\t} else {\n\t\t\t\t\t// #922 plain tree in a non-fixed-sized UL scrolls inside its parent\n\t\t\t\t\t$scrollParent = $container.scrollParent();\n\t\t\t\t}\n\t\t\t} else if (!$scrollParent.jquery) {\n\t\t\t\t// Make sure we have a jQuery object\n\t\t\t\t$scrollParent = $($scrollParent);\n\t\t\t}\n\t\t\tif (\n\t\t\t\t$scrollParent[0] === document ||\n\t\t\t\t$scrollParent[0] === document.body\n\t\t\t) {\n\t\t\t\t// `document` may be returned by $().scrollParent(), if nothing is found,\n\t\t\t\t// but would not work: (see #894)\n\t\t\t\tthis.debug(\n\t\t\t\t\t\"scrollIntoView(): normalizing scrollParent to 'window':\",\n\t\t\t\t\t$scrollParent[0]\n\t\t\t\t);\n\t\t\t\t$scrollParent = $(window);\n\t\t\t}\n\t\t\t// eslint-disable-next-line one-var\n\t\t\tvar topNodeY,\n\t\t\t\tnodeY,\n\t\t\t\thorzScrollbarHeight,\n\t\t\t\tcontainerOffsetTop,\n\t\t\t\tdfd = new $.Deferred(),\n\t\t\t\tself = this,\n\t\t\t\tnodeHeight = $(this.span).height(),\n\t\t\t\ttopOfs = opts.scrollOfs.top || 0,\n\t\t\t\tbottomOfs = opts.scrollOfs.bottom || 0,\n\t\t\t\tcontainerHeight = $scrollParent.height(),\n\t\t\t\tscrollTop = $scrollParent.scrollTop(),\n\t\t\t\t$animateTarget = $scrollParent,\n\t\t\t\tisParentWindow = $scrollParent[0] === window,\n\t\t\t\ttopNode = opts.topNode || null,\n\t\t\t\tnewScrollTop = null;\n\n\t\t\t// this.debug(\"scrollIntoView(), scrollTop=\" + scrollTop, opts.scrollOfs);\n\t\t\t// _assert($(this.span).is(\":visible\"), \"scrollIntoView node is invisible\"); // otherwise we cannot calc offsets\n\t\t\tif (this.isRootNode() || !this.isVisible()) {\n\t\t\t\t// We cannot calc offsets for hidden elements\n\t\t\t\tthis.info(\"scrollIntoView(): node is invisible.\");\n\t\t\t\treturn _getResolvedPromise();\n\t\t\t}\n\t\t\tif (isParentWindow) {\n\t\t\t\tnodeY = $(this.span).offset().top;\n\t\t\t\ttopNodeY =\n\t\t\t\t\ttopNode && topNode.span ? $(topNode.span).offset().top : 0;\n\t\t\t\t$animateTarget = $(\"html,body\");\n\t\t\t} else {\n\t\t\t\t_assert(\n\t\t\t\t\t$scrollParent[0] !== document &&\n\t\t\t\t\t\t$scrollParent[0] !== document.body,\n\t\t\t\t\t\"scrollParent should be a simple element or `window`, not document or body.\"\n\t\t\t\t);\n\n\t\t\t\tcontainerOffsetTop = $scrollParent.offset().top;\n\t\t\t\tnodeY =\n\t\t\t\t\t$(this.span).offset().top - containerOffsetTop + scrollTop; // relative to scroll parent\n\t\t\t\ttopNodeY = topNode\n\t\t\t\t\t? $(topNode.span).offset().top -\n\t\t\t\t\t  containerOffsetTop +\n\t\t\t\t\t  scrollTop\n\t\t\t\t\t: 0;\n\t\t\t\thorzScrollbarHeight = Math.max(\n\t\t\t\t\t0,\n\t\t\t\t\t$scrollParent.innerHeight() - $scrollParent[0].clientHeight\n\t\t\t\t);\n\t\t\t\tcontainerHeight -= horzScrollbarHeight;\n\t\t\t}\n\n\t\t\t// this.debug(\"    scrollIntoView(), nodeY=\" + nodeY + \", containerHeight=\" + containerHeight);\n\t\t\tif (nodeY < scrollTop + topOfs) {\n\t\t\t\t// Node is above visible container area\n\t\t\t\tnewScrollTop = nodeY - topOfs;\n\t\t\t\t// this.debug(\"    scrollIntoView(), UPPER newScrollTop=\" + newScrollTop);\n\t\t\t} else if (\n\t\t\t\tnodeY + nodeHeight >\n\t\t\t\tscrollTop + containerHeight - bottomOfs\n\t\t\t) {\n\t\t\t\tnewScrollTop = nodeY + nodeHeight - containerHeight + bottomOfs;\n\t\t\t\t// this.debug(\"    scrollIntoView(), LOWER newScrollTop=\" + newScrollTop);\n\t\t\t\t// If a topNode was passed, make sure that it is never scrolled\n\t\t\t\t// outside the upper border\n\t\t\t\tif (topNode) {\n\t\t\t\t\t_assert(\n\t\t\t\t\t\ttopNode.isRootNode() || topNode.isVisible(),\n\t\t\t\t\t\t\"topNode must be visible\"\n\t\t\t\t\t);\n\t\t\t\t\tif (topNodeY < newScrollTop) {\n\t\t\t\t\t\tnewScrollTop = topNodeY - topOfs;\n\t\t\t\t\t\t// this.debug(\"    scrollIntoView(), TOP newScrollTop=\" + newScrollTop);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (newScrollTop === null) {\n\t\t\t\tdfd.resolveWith(this);\n\t\t\t} else {\n\t\t\t\t// this.debug(\"    scrollIntoView(), SET newScrollTop=\" + newScrollTop);\n\t\t\t\tif (opts.effects) {\n\t\t\t\t\topts.effects.complete = function() {\n\t\t\t\t\t\tdfd.resolveWith(self);\n\t\t\t\t\t};\n\t\t\t\t\t$animateTarget.stop(true).animate(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tscrollTop: newScrollTop,\n\t\t\t\t\t\t},\n\t\t\t\t\t\topts.effects\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$animateTarget[0].scrollTop = newScrollTop;\n\t\t\t\t\tdfd.resolveWith(this);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn dfd.promise();\n\t\t},\n\n\t\t/**Activate this node.\n\t\t *\n\t\t * The `cell` option requires the ext-table and ext-ariagrid extensions.\n\t\t *\n\t\t * @param {boolean} [flag=true] pass false to deactivate\n\t\t * @param {object} [opts] additional options. Defaults to {noEvents: false, noFocus: false, cell: null}\n\t\t * @returns {$.Promise}\n\t\t */\n\t\tsetActive: function(flag, opts) {\n\t\t\treturn this.tree._callHook(\"nodeSetActive\", this, flag, opts);\n\t\t},\n\t\t/**Expand or collapse this node. Promise is resolved, when lazy loading and animations are done.\n\t\t * @param {boolean} [flag=true] pass false to collapse\n\t\t * @param {object} [opts] additional options. Defaults to {noAnimation: false, noEvents: false}\n\t\t * @returns {$.Promise}\n\t\t */\n\t\tsetExpanded: function(flag, opts) {\n\t\t\treturn this.tree._callHook(\"nodeSetExpanded\", this, flag, opts);\n\t\t},\n\t\t/**Set keyboard focus to this node.\n\t\t * @param {boolean} [flag=true] pass false to blur\n\t\t * @see Fancytree#setFocus\n\t\t */\n\t\tsetFocus: function(flag) {\n\t\t\treturn this.tree._callHook(\"nodeSetFocus\", this, flag);\n\t\t},\n\t\t/**Select this node, i.e. check the checkbox.\n\t\t * @param {boolean} [flag=true] pass false to deselect\n\t\t * @param {object} [opts] additional options. Defaults to {noEvents: false, p\n\t\t *     propagateDown: null, propagateUp: null, callback: null }\n\t\t */\n\t\tsetSelected: function(flag, opts) {\n\t\t\treturn this.tree._callHook(\"nodeSetSelected\", this, flag, opts);\n\t\t},\n\t\t/**Mark a lazy node as 'error', 'loading', 'nodata', or 'ok'.\n\t\t * @param {string} status 'error'|'loading'|'nodata'|'ok'\n\t\t * @param {string} [message]\n\t\t * @param {string} [details]\n\t\t */\n\t\tsetStatus: function(status, message, details) {\n\t\t\treturn this.tree._callHook(\n\t\t\t\t\"nodeSetStatus\",\n\t\t\t\tthis,\n\t\t\t\tstatus,\n\t\t\t\tmessage,\n\t\t\t\tdetails\n\t\t\t);\n\t\t},\n\t\t/**Rename this node.\n\t\t * @param {string} title\n\t\t */\n\t\tsetTitle: function(title) {\n\t\t\tthis.title = title;\n\t\t\tthis.renderTitle();\n\t\t\tthis.triggerModify(\"rename\");\n\t\t},\n\t\t/**Sort child list by title.\n\t\t * @param {function} [cmp] custom compare function(a, b) that returns -1, 0, or 1 (defaults to sort by title).\n\t\t * @param {boolean} [deep=false] pass true to sort all descendant nodes\n\t\t */\n\t\tsortChildren: function(cmp, deep) {\n\t\t\tvar i,\n\t\t\t\tl,\n\t\t\t\tcl = this.children;\n\n\t\t\tif (!cl) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcmp =\n\t\t\t\tcmp ||\n\t\t\t\tfunction(a, b) {\n\t\t\t\t\tvar x = a.title.toLowerCase(),\n\t\t\t\t\t\ty = b.title.toLowerCase();\n\n\t\t\t\t\t// eslint-disable-next-line no-nested-ternary\n\t\t\t\t\treturn x === y ? 0 : x > y ? 1 : -1;\n\t\t\t\t};\n\t\t\tcl.sort(cmp);\n\t\t\tif (deep) {\n\t\t\t\tfor (i = 0, l = cl.length; i < l; i++) {\n\t\t\t\t\tif (cl[i].children) {\n\t\t\t\t\t\tcl[i].sortChildren(cmp, \"$norender$\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (deep !== \"$norender$\") {\n\t\t\t\tthis.render();\n\t\t\t}\n\t\t\tthis.triggerModifyChild(\"sort\");\n\t\t},\n\t\t/** Convert node (or whole branch) into a plain object.\n\t\t *\n\t\t * The result is compatible with node.addChildren().\n\t\t *\n\t\t * @param {boolean} [recursive=false] include child nodes\n\t\t * @param {function} [callback] callback(dict, node) is called for every node, in order to allow modifications.\n\t\t *     Return `false` to ignore this node or `\"skip\"` to include this node without its children.\n\t\t * @returns {NodeData}\n\t\t */\n\t\ttoDict: function(recursive, callback) {\n\t\t\tvar i,\n\t\t\t\tl,\n\t\t\t\tnode,\n\t\t\t\tres,\n\t\t\t\tdict = {},\n\t\t\t\tself = this;\n\n\t\t\t$.each(NODE_ATTRS, function(i, a) {\n\t\t\t\tif (self[a] || self[a] === false) {\n\t\t\t\t\tdict[a] = self[a];\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (!$.isEmptyObject(this.data)) {\n\t\t\t\tdict.data = $.extend({}, this.data);\n\t\t\t\tif ($.isEmptyObject(dict.data)) {\n\t\t\t\t\tdelete dict.data;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (callback) {\n\t\t\t\tres = callback(dict, self);\n\t\t\t\tif (res === false) {\n\t\t\t\t\treturn false; // Don't include this node nor its children\n\t\t\t\t}\n\t\t\t\tif (res === \"skip\") {\n\t\t\t\t\trecursive = false; // Include this node, but not the children\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (recursive) {\n\t\t\t\tif ($.isArray(this.children)) {\n\t\t\t\t\tdict.children = [];\n\t\t\t\t\tfor (i = 0, l = this.children.length; i < l; i++) {\n\t\t\t\t\t\tnode = this.children[i];\n\t\t\t\t\t\tif (!node.isStatusNode()) {\n\t\t\t\t\t\t\tres = node.toDict(true, callback);\n\t\t\t\t\t\t\tif (res !== false) {\n\t\t\t\t\t\t\t\tdict.children.push(res);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn dict;\n\t\t},\n\t\t/**\n\t\t * Set, clear, or toggle class of node's span tag and .extraClasses.\n\t\t *\n\t\t * @param {string} className class name (separate multiple classes by space)\n\t\t * @param {boolean} [flag] true/false to add/remove class. If omitted, class is toggled.\n\t\t * @returns {boolean} true if a class was added\n\t\t *\n\t\t * @since 2.17\n\t\t */\n\t\ttoggleClass: function(value, flag) {\n\t\t\tvar className,\n\t\t\t\thasClass,\n\t\t\t\trnotwhite = /\\S+/g,\n\t\t\t\tclassNames = value.match(rnotwhite) || [],\n\t\t\t\ti = 0,\n\t\t\t\twasAdded = false,\n\t\t\t\tstatusElem = this[this.tree.statusClassPropName],\n\t\t\t\tcurClasses = \" \" + (this.extraClasses || \"\") + \" \";\n\n\t\t\t// this.info(\"toggleClass('\" + value + \"', \" + flag + \")\", curClasses);\n\t\t\t// Modify DOM element directly if it already exists\n\t\t\tif (statusElem) {\n\t\t\t\t$(statusElem).toggleClass(value, flag);\n\t\t\t}\n\t\t\t// Modify node.extraClasses to make this change persistent\n\t\t\t// Toggle if flag was not passed\n\t\t\twhile ((className = classNames[i++])) {\n\t\t\t\thasClass = curClasses.indexOf(\" \" + className + \" \") >= 0;\n\t\t\t\tflag = flag === undefined ? !hasClass : !!flag;\n\t\t\t\tif (flag) {\n\t\t\t\t\tif (!hasClass) {\n\t\t\t\t\t\tcurClasses += className + \" \";\n\t\t\t\t\t\twasAdded = true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\twhile (curClasses.indexOf(\" \" + className + \" \") > -1) {\n\t\t\t\t\t\tcurClasses = curClasses.replace(\n\t\t\t\t\t\t\t\" \" + className + \" \",\n\t\t\t\t\t\t\t\" \"\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.extraClasses = $.trim(curClasses);\n\t\t\t// this.info(\"-> toggleClass('\" + value + \"', \" + flag + \"): '\" + this.extraClasses + \"'\");\n\t\t\treturn wasAdded;\n\t\t},\n\t\t/** Flip expanded status. */\n\t\ttoggleExpanded: function() {\n\t\t\treturn this.tree._callHook(\"nodeToggleExpanded\", this);\n\t\t},\n\t\t/** Flip selection status. */\n\t\ttoggleSelected: function() {\n\t\t\treturn this.tree._callHook(\"nodeToggleSelected\", this);\n\t\t},\n\t\ttoString: function() {\n\t\t\treturn \"FancytreeNode@\" + this.key + \"[title='\" + this.title + \"']\";\n\t\t\t// return \"<FancytreeNode(#\" + this.key + \", '\" + this.title + \"')>\";\n\t\t},\n\t\t/**\n\t\t * Trigger `modifyChild` event on a parent to signal that a child was modified.\n\t\t * @param {string} operation Type of change: 'add', 'remove', 'rename', 'move', 'data', ...\n\t\t * @param {FancytreeNode} [childNode]\n\t\t * @param {object} [extra]\n\t\t */\n\t\ttriggerModifyChild: function(operation, childNode, extra) {\n\t\t\tvar data,\n\t\t\t\tmodifyChild = this.tree.options.modifyChild;\n\n\t\t\tif (modifyChild) {\n\t\t\t\tif (childNode && childNode.parent !== this) {\n\t\t\t\t\t$.error(\n\t\t\t\t\t\t\"childNode \" + childNode + \" is not a child of \" + this\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tdata = {\n\t\t\t\t\tnode: this,\n\t\t\t\t\ttree: this.tree,\n\t\t\t\t\toperation: operation,\n\t\t\t\t\tchildNode: childNode || null,\n\t\t\t\t};\n\t\t\t\tif (extra) {\n\t\t\t\t\t$.extend(data, extra);\n\t\t\t\t}\n\t\t\t\tmodifyChild({ type: \"modifyChild\" }, data);\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Trigger `modifyChild` event on node.parent(!).\n\t\t * @param {string} operation Type of change: 'add', 'remove', 'rename', 'move', 'data', ...\n\t\t * @param {object} [extra]\n\t\t */\n\t\ttriggerModify: function(operation, extra) {\n\t\t\tthis.parent.triggerModifyChild(operation, this, extra);\n\t\t},\n\t\t/** Call fn(node) for all child nodes in hierarchical order (depth-first).<br>\n\t\t * Stop iteration, if fn() returns false. Skip current branch, if fn() returns \"skip\".<br>\n\t\t * Return false if iteration was stopped.\n\t\t *\n\t\t * @param {function} fn the callback function.\n\t\t *     Return false to stop iteration, return \"skip\" to skip this node and\n\t\t *     its children only.\n\t\t * @param {boolean} [includeSelf=false]\n\t\t * @returns {boolean}\n\t\t */\n\t\tvisit: function(fn, includeSelf) {\n\t\t\tvar i,\n\t\t\t\tl,\n\t\t\t\tres = true,\n\t\t\t\tchildren = this.children;\n\n\t\t\tif (includeSelf === true) {\n\t\t\t\tres = fn(this);\n\t\t\t\tif (res === false || res === \"skip\") {\n\t\t\t\t\treturn res;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (children) {\n\t\t\t\tfor (i = 0, l = children.length; i < l; i++) {\n\t\t\t\t\tres = children[i].visit(fn, true);\n\t\t\t\t\tif (res === false) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn res;\n\t\t},\n\t\t/** Call fn(node) for all child nodes and recursively load lazy children.<br>\n\t\t * <b>Note:</b> If you need this method, you probably should consider to review\n\t\t * your architecture! Recursivley loading nodes is a perfect way for lazy\n\t\t * programmers to flood the server with requests ;-)\n\t\t *\n\t\t * @param {function} [fn] optional callback function.\n\t\t *     Return false to stop iteration, return \"skip\" to skip this node and\n\t\t *     its children only.\n\t\t * @param {boolean} [includeSelf=false]\n\t\t * @returns {$.Promise}\n\t\t * @since 2.4\n\t\t */\n\t\tvisitAndLoad: function(fn, includeSelf, _recursion) {\n\t\t\tvar dfd,\n\t\t\t\tres,\n\t\t\t\tloaders,\n\t\t\t\tnode = this;\n\n\t\t\t// node.debug(\"visitAndLoad\");\n\t\t\tif (fn && includeSelf === true) {\n\t\t\t\tres = fn(node);\n\t\t\t\tif (res === false || res === \"skip\") {\n\t\t\t\t\treturn _recursion ? res : _getResolvedPromise();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!node.children && !node.lazy) {\n\t\t\t\treturn _getResolvedPromise();\n\t\t\t}\n\t\t\tdfd = new $.Deferred();\n\t\t\tloaders = [];\n\t\t\t// node.debug(\"load()...\");\n\t\t\tnode.load().done(function() {\n\t\t\t\t// node.debug(\"load()... done.\");\n\t\t\t\tfor (var i = 0, l = node.children.length; i < l; i++) {\n\t\t\t\t\tres = node.children[i].visitAndLoad(fn, true, true);\n\t\t\t\t\tif (res === false) {\n\t\t\t\t\t\tdfd.reject();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (res !== \"skip\") {\n\t\t\t\t\t\tloaders.push(res); // Add promise to the list\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$.when.apply(this, loaders).then(function() {\n\t\t\t\t\tdfd.resolve();\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn dfd.promise();\n\t\t},\n\t\t/** Call fn(node) for all parent nodes, bottom-up, including invisible system root.<br>\n\t\t * Stop iteration, if fn() returns false.<br>\n\t\t * Return false if iteration was stopped.\n\t\t *\n\t\t * @param {function} fn the callback function.\n\t\t *     Return false to stop iteration, return \"skip\" to skip this node and children only.\n\t\t * @param {boolean} [includeSelf=false]\n\t\t * @returns {boolean}\n\t\t */\n\t\tvisitParents: function(fn, includeSelf) {\n\t\t\t// Visit parent nodes (bottom up)\n\t\t\tif (includeSelf && fn(this) === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar p = this.parent;\n\t\t\twhile (p) {\n\t\t\t\tif (fn(p) === false) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tp = p.parent;\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\t/** Call fn(node) for all sibling nodes.<br>\n\t\t * Stop iteration, if fn() returns false.<br>\n\t\t * Return false if iteration was stopped.\n\t\t *\n\t\t * @param {function} fn the callback function.\n\t\t *     Return false to stop iteration.\n\t\t * @param {boolean} [includeSelf=false]\n\t\t * @returns {boolean}\n\t\t */\n\t\tvisitSiblings: function(fn, includeSelf) {\n\t\t\tvar i,\n\t\t\t\tl,\n\t\t\t\tn,\n\t\t\t\tac = this.parent.children;\n\n\t\t\tfor (i = 0, l = ac.length; i < l; i++) {\n\t\t\t\tn = ac[i];\n\t\t\t\tif (includeSelf || n !== this) {\n\t\t\t\t\tif (fn(n) === false) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\t/** Write warning to browser console if debugLevel >= 2 (prepending node info)\n\t\t *\n\t\t * @param {*} msg string or object or array of such\n\t\t */\n\t\twarn: function(msg) {\n\t\t\tif (this.tree.options.debugLevel >= 2) {\n\t\t\t\tArray.prototype.unshift.call(arguments, this.toString());\n\t\t\t\tconsoleApply(\"warn\", arguments);\n\t\t\t}\n\t\t},\n\t};\n\n\t/******************************************************************************\n\t * Fancytree\n\t */\n\t/**\n\t * Construct a new tree object.\n\t *\n\t * @class Fancytree\n\t * @classdesc The controller behind a fancytree.\n\t * This class also contains 'hook methods': see {@link Fancytree_Hooks}.\n\t *\n\t * @param {Widget} widget\n\t *\n\t * @property {string} _id Automatically generated unique tree instance ID, e.g. \"1\".\n\t * @property {string} _ns Automatically generated unique tree namespace, e.g. \".fancytree-1\".\n\t * @property {FancytreeNode} activeNode Currently active node or null.\n\t * @property {string} ariaPropName Property name of FancytreeNode that contains the element which will receive the aria attributes.\n\t *     Typically \"li\", but \"tr\" for table extension.\n\t * @property {jQueryObject} $container Outer `<ul>` element (or `<table>` element for ext-table).\n\t * @property {jQueryObject} $div A jQuery object containing the element used to instantiate the tree widget (`widget.element`)\n\t * @property {object|array} columns Recommended place to store shared column meta data. @since 2.27\n\t * @property {object} data Metadata, i.e. properties that may be passed to `source` in addition to a children array.\n\t * @property {object} ext Hash of all active plugin instances.\n\t * @property {FancytreeNode} focusNode Currently focused node or null.\n\t * @property {FancytreeNode} lastSelectedNode Used to implement selectMode 1 (single select)\n\t * @property {string} nodeContainerAttrName Property name of FancytreeNode that contains the outer element of single nodes.\n\t *     Typically \"li\", but \"tr\" for table extension.\n\t * @property {FancytreeOptions} options Current options, i.e. default options + options passed to constructor.\n\t * @property {FancytreeNode} rootNode Invisible system root node.\n\t * @property {string} statusClassPropName Property name of FancytreeNode that contains the element which will receive the status classes.\n\t *     Typically \"span\", but \"tr\" for table extension.\n\t * @property {object} types Map for shared type specific meta data, used with node.type attribute. @since 2.27\n\t * @property {object} viewport See ext-vieport. @since v2.31\n\t * @property {object} widget Base widget instance.\n\t */\n\tfunction Fancytree(widget) {\n\t\tthis.widget = widget;\n\t\tthis.$div = widget.element;\n\t\tthis.options = widget.options;\n\t\tif (this.options) {\n\t\t\tif (this.options.lazyload !== undefined) {\n\t\t\t\t$.error(\n\t\t\t\t\t\"The 'lazyload' event is deprecated since 2014-02-25. Use 'lazyLoad' (with uppercase L) instead.\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (this.options.loaderror !== undefined) {\n\t\t\t\t$.error(\n\t\t\t\t\t\"The 'loaderror' event was renamed since 2014-07-03. Use 'loadError' (with uppercase E) instead.\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (this.options.fx !== undefined) {\n\t\t\t\t$.error(\n\t\t\t\t\t\"The 'fx' option was replaced by 'toggleEffect' since 2014-11-30.\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (this.options.removeNode !== undefined) {\n\t\t\t\t$.error(\n\t\t\t\t\t\"The 'removeNode' event was replaced by 'modifyChild' since 2.20 (2016-09-10).\"\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tthis.ext = {}; // Active extension instances\n\t\tthis.types = {};\n\t\tthis.columns = {};\n\t\t// allow to init tree.data.foo from <div data-foo=''>\n\t\tthis.data = _getElementDataAsDict(this.$div);\n\t\t// TODO: use widget.uuid instead?\n\t\tthis._id = \"\" + (this.options.treeId || $.ui.fancytree._nextId++);\n\t\t// TODO: use widget.eventNamespace instead?\n\t\tthis._ns = \".fancytree-\" + this._id; // append for namespaced events\n\t\tthis.activeNode = null;\n\t\tthis.focusNode = null;\n\t\tthis._hasFocus = null;\n\t\tthis._tempCache = {};\n\t\tthis._lastMousedownNode = null;\n\t\tthis._enableUpdate = true;\n\t\tthis.lastSelectedNode = null;\n\t\tthis.systemFocusElement = null;\n\t\tthis.lastQuicksearchTerm = \"\";\n\t\tthis.lastQuicksearchTime = 0;\n\t\tthis.viewport = null; // ext-grid\n\n\t\tthis.statusClassPropName = \"span\";\n\t\tthis.ariaPropName = \"li\";\n\t\tthis.nodeContainerAttrName = \"li\";\n\n\t\t// Remove previous markup if any\n\t\tthis.$div.find(\">ul.fancytree-container\").remove();\n\n\t\t// Create a node without parent.\n\t\tvar fakeParent = { tree: this },\n\t\t\t$ul;\n\t\tthis.rootNode = new FancytreeNode(fakeParent, {\n\t\t\ttitle: \"root\",\n\t\t\tkey: \"root_\" + this._id,\n\t\t\tchildren: null,\n\t\t\texpanded: true,\n\t\t});\n\t\tthis.rootNode.parent = null;\n\n\t\t// Create root markup\n\t\t$ul = $(\"<ul>\", {\n\t\t\tid: \"ft-id-\" + this._id,\n\t\t\tclass: \"ui-fancytree fancytree-container fancytree-plain\",\n\t\t}).appendTo(this.$div);\n\t\tthis.$container = $ul;\n\t\tthis.rootNode.ul = $ul[0];\n\n\t\tif (this.options.debugLevel == null) {\n\t\t\tthis.options.debugLevel = FT.debugLevel;\n\t\t}\n\t\t// // Add container to the TAB chain\n\t\t// // See http://www.w3.org/TR/wai-aria-practices/#focus_activedescendant\n\t\t// // #577: Allow to set tabindex to \"0\", \"-1\" and \"\"\n\t\t// this.$container.attr(\"tabindex\", this.options.tabindex);\n\n\t\t// if( this.options.rtl ) {\n\t\t// \tthis.$container.attr(\"DIR\", \"RTL\").addClass(\"fancytree-rtl\");\n\t\t// // }else{\n\t\t// //\tthis.$container.attr(\"DIR\", null).removeClass(\"fancytree-rtl\");\n\t\t// }\n\t\t// if(this.options.aria){\n\t\t// \tthis.$container.attr(\"role\", \"tree\");\n\t\t// \tif( this.options.selectMode !== 1 ) {\n\t\t// \t\tthis.$container.attr(\"aria-multiselectable\", true);\n\t\t// \t}\n\t\t// }\n\t}\n\n\tFancytree.prototype = /** @lends Fancytree# */ {\n\t\t/* Return a context object that can be re-used for _callHook().\n\t\t * @param {Fancytree | FancytreeNode | EventData} obj\n\t\t * @param {Event} originalEvent\n\t\t * @param {Object} extra\n\t\t * @returns {EventData}\n\t\t */\n\t\t_makeHookContext: function(obj, originalEvent, extra) {\n\t\t\tvar ctx, tree;\n\t\t\tif (obj.node !== undefined) {\n\t\t\t\t// obj is already a context object\n\t\t\t\tif (originalEvent && obj.originalEvent !== originalEvent) {\n\t\t\t\t\t$.error(\"invalid args\");\n\t\t\t\t}\n\t\t\t\tctx = obj;\n\t\t\t} else if (obj.tree) {\n\t\t\t\t// obj is a FancytreeNode\n\t\t\t\ttree = obj.tree;\n\t\t\t\tctx = {\n\t\t\t\t\tnode: obj,\n\t\t\t\t\ttree: tree,\n\t\t\t\t\twidget: tree.widget,\n\t\t\t\t\toptions: tree.widget.options,\n\t\t\t\t\toriginalEvent: originalEvent,\n\t\t\t\t\ttypeInfo: tree.types[obj.type] || {},\n\t\t\t\t};\n\t\t\t} else if (obj.widget) {\n\t\t\t\t// obj is a Fancytree\n\t\t\t\tctx = {\n\t\t\t\t\tnode: null,\n\t\t\t\t\ttree: obj,\n\t\t\t\t\twidget: obj.widget,\n\t\t\t\t\toptions: obj.widget.options,\n\t\t\t\t\toriginalEvent: originalEvent,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t$.error(\"invalid args\");\n\t\t\t}\n\t\t\tif (extra) {\n\t\t\t\t$.extend(ctx, extra);\n\t\t\t}\n\t\t\treturn ctx;\n\t\t},\n\t\t/* Trigger a hook function: funcName(ctx, [...]).\n\t\t *\n\t\t * @param {string} funcName\n\t\t * @param {Fancytree|FancytreeNode|EventData} contextObject\n\t\t * @param {any}  [_extraArgs] optional additional arguments\n\t\t * @returns {any}\n\t\t */\n\t\t_callHook: function(funcName, contextObject, _extraArgs) {\n\t\t\tvar ctx = this._makeHookContext(contextObject),\n\t\t\t\tfn = this[funcName],\n\t\t\t\targs = Array.prototype.slice.call(arguments, 2);\n\t\t\tif (!$.isFunction(fn)) {\n\t\t\t\t$.error(\"_callHook('\" + funcName + \"') is not a function\");\n\t\t\t}\n\t\t\targs.unshift(ctx);\n\t\t\t// this.debug(\"_hook\", funcName, ctx.node && ctx.node.toString() || ctx.tree.toString(), args);\n\t\t\treturn fn.apply(this, args);\n\t\t},\n\t\t_setExpiringValue: function(key, value, ms) {\n\t\t\tthis._tempCache[key] = {\n\t\t\t\tvalue: value,\n\t\t\t\texpire: Date.now() + (+ms || 50),\n\t\t\t};\n\t\t},\n\t\t_getExpiringValue: function(key) {\n\t\t\tvar entry = this._tempCache[key];\n\t\t\tif (entry && entry.expire > Date.now()) {\n\t\t\t\treturn entry.value;\n\t\t\t}\n\t\t\tdelete this._tempCache[key];\n\t\t\treturn null;\n\t\t},\n\t\t/* Check if this tree has extension `name` enabled.\n\t\t *\n\t\t * @param {string} name name of the required extension\n\t\t */\n\t\t_usesExtension: function(name) {\n\t\t\treturn $.inArray(name, this.options.extensions) >= 0;\n\t\t},\n\t\t/* Check if current extensions dependencies are met and throw an error if not.\n\t\t *\n\t\t * This method may be called inside the `treeInit` hook for custom extensions.\n\t\t *\n\t\t * @param {string} name name of the required extension\n\t\t * @param {boolean} [required=true] pass `false` if the extension is optional, but we want to check for order if it is present\n\t\t * @param {boolean} [before] `true` if `name` must be included before this, `false` otherwise (use `null` if order doesn't matter)\n\t\t * @param {string} [message] optional error message (defaults to a descriptve error message)\n\t\t */\n\t\t_requireExtension: function(name, required, before, message) {\n\t\t\tif (before != null) {\n\t\t\t\tbefore = !!before;\n\t\t\t}\n\t\t\tvar thisName = this._local.name,\n\t\t\t\textList = this.options.extensions,\n\t\t\t\tisBefore =\n\t\t\t\t\t$.inArray(name, extList) < $.inArray(thisName, extList),\n\t\t\t\tisMissing = required && this.ext[name] == null,\n\t\t\t\tbadOrder = !isMissing && before != null && before !== isBefore;\n\n\t\t\t_assert(\n\t\t\t\tthisName && thisName !== name,\n\t\t\t\t\"invalid or same name '\" + thisName + \"' (require yourself?)\"\n\t\t\t);\n\n\t\t\tif (isMissing || badOrder) {\n\t\t\t\tif (!message) {\n\t\t\t\t\tif (isMissing || required) {\n\t\t\t\t\t\tmessage =\n\t\t\t\t\t\t\t\"'\" +\n\t\t\t\t\t\t\tthisName +\n\t\t\t\t\t\t\t\"' extension requires '\" +\n\t\t\t\t\t\t\tname +\n\t\t\t\t\t\t\t\"'\";\n\t\t\t\t\t\tif (badOrder) {\n\t\t\t\t\t\t\tmessage +=\n\t\t\t\t\t\t\t\t\" to be registered \" +\n\t\t\t\t\t\t\t\t(before ? \"before\" : \"after\") +\n\t\t\t\t\t\t\t\t\" itself\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmessage =\n\t\t\t\t\t\t\t\"If used together, `\" +\n\t\t\t\t\t\t\tname +\n\t\t\t\t\t\t\t\"` must be registered \" +\n\t\t\t\t\t\t\t(before ? \"before\" : \"after\") +\n\t\t\t\t\t\t\t\" `\" +\n\t\t\t\t\t\t\tthisName +\n\t\t\t\t\t\t\t\"`\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$.error(message);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\t/** Activate node with a given key and fire focus and activate events.\n\t\t *\n\t\t * A previously activated node will be deactivated.\n\t\t * If activeVisible option is set, all parents will be expanded as necessary.\n\t\t * Pass key = false, to deactivate the current node only.\n\t\t * @param {string} key\n\t\t * @param {object} [opts] additional options. Defaults to {noEvents: false, noFocus: false}\n\t\t * @returns {FancytreeNode} activated node (null, if not found)\n\t\t */\n\t\tactivateKey: function(key, opts) {\n\t\t\tvar node = this.getNodeByKey(key);\n\t\t\tif (node) {\n\t\t\t\tnode.setActive(true, opts);\n\t\t\t} else if (this.activeNode) {\n\t\t\t\tthis.activeNode.setActive(false, opts);\n\t\t\t}\n\t\t\treturn node;\n\t\t},\n\t\t/** (experimental) Add child status nodes that indicate 'More...', ....\n\t\t * @param {boolean|object} node optional node definition. Pass `false` to remove all paging nodes.\n\t\t * @param {string} [mode='append'] 'child'|firstChild'\n\t\t * @since 2.15\n\t\t */\n\t\taddPagingNode: function(node, mode) {\n\t\t\treturn this.rootNode.addPagingNode(node, mode);\n\t\t},\n\t\t/**\n\t\t * (experimental) Apply a modification (or navigation) operation.\n\t\t *\n\t\t * Valid commands:\n\t\t *   - 'moveUp', 'moveDown'\n\t\t *   - 'indent', 'outdent'\n\t\t *   - 'remove'\n\t\t *   - 'edit', 'addChild', 'addSibling': (reqires ext-edit extension)\n\t\t *   - 'cut', 'copy', 'paste': (use an internal singleton 'clipboard')\n\t\t *   - 'down', 'first', 'last', 'left', 'parent', 'right', 'up': navigate\n\t\t *\n\t\t * @param {string} cmd\n\t\t * @param {FancytreeNode} [node=active_node]\n\t\t * @param {object} [opts] Currently unused\n\t\t *\n\t\t * @since 2.32\n\t\t */\n\t\tapplyCommand: function(cmd, node, opts_) {\n\t\t\tvar // clipboard,\n\t\t\t\trefNode;\n\t\t\t// opts = $.extend(\n\t\t\t// \t{ setActive: true, clipboard: CLIPBOARD },\n\t\t\t// \topts_\n\t\t\t// );\n\n\t\t\tnode = node || this.getActiveNode();\n\t\t\t// clipboard = opts.clipboard;\n\n\t\t\tswitch (cmd) {\n\t\t\t\t// Sorting and indentation:\n\t\t\t\tcase \"moveUp\":\n\t\t\t\t\trefNode = node.getPrevSibling();\n\t\t\t\t\tif (refNode) {\n\t\t\t\t\t\tnode.moveTo(refNode, \"before\");\n\t\t\t\t\t\tnode.setActive();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"moveDown\":\n\t\t\t\t\trefNode = node.getNextSibling();\n\t\t\t\t\tif (refNode) {\n\t\t\t\t\t\tnode.moveTo(refNode, \"after\");\n\t\t\t\t\t\tnode.setActive();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"indent\":\n\t\t\t\t\trefNode = node.getPrevSibling();\n\t\t\t\t\tif (refNode) {\n\t\t\t\t\t\tnode.moveTo(refNode, \"child\");\n\t\t\t\t\t\trefNode.setExpanded();\n\t\t\t\t\t\tnode.setActive();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"outdent\":\n\t\t\t\t\tif (!node.isTopLevel()) {\n\t\t\t\t\t\tnode.moveTo(node.getParent(), \"after\");\n\t\t\t\t\t\tnode.setActive();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Remove:\n\t\t\t\tcase \"remove\":\n\t\t\t\t\trefNode = node.getPrevSibling() || node.getParent();\n\t\t\t\t\tnode.remove();\n\t\t\t\t\tif (refNode) {\n\t\t\t\t\t\trefNode.setActive();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Add, edit (requires ext-edit):\n\t\t\t\tcase \"addChild\":\n\t\t\t\t\tnode.editCreateNode(\"child\", \"\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"addSibling\":\n\t\t\t\t\tnode.editCreateNode(\"after\", \"\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"rename\":\n\t\t\t\t\tnode.editStart();\n\t\t\t\t\tbreak;\n\t\t\t\t// Simple clipboard simulation:\n\t\t\t\t// case \"cut\":\n\t\t\t\t// \tclipboard = { mode: cmd, data: node };\n\t\t\t\t// \tbreak;\n\t\t\t\t// case \"copy\":\n\t\t\t\t// \tclipboard = {\n\t\t\t\t// \t\tmode: cmd,\n\t\t\t\t// \t\tdata: node.toDict(function(d, n) {\n\t\t\t\t// \t\t\tdelete d.key;\n\t\t\t\t// \t\t}),\n\t\t\t\t// \t};\n\t\t\t\t// \tbreak;\n\t\t\t\t// case \"clear\":\n\t\t\t\t// \tclipboard = null;\n\t\t\t\t// \tbreak;\n\t\t\t\t// case \"paste\":\n\t\t\t\t// \tif (clipboard.mode === \"cut\") {\n\t\t\t\t// \t\t// refNode = node.getPrevSibling();\n\t\t\t\t// \t\tclipboard.data.moveTo(node, \"child\");\n\t\t\t\t// \t\tclipboard.data.setActive();\n\t\t\t\t// \t} else if (clipboard.mode === \"copy\") {\n\t\t\t\t// \t\tnode.addChildren(clipboard.data).setActive();\n\t\t\t\t// \t}\n\t\t\t\t// \tbreak;\n\t\t\t\t// Navigation commands:\n\t\t\t\tcase \"down\":\n\t\t\t\tcase \"first\":\n\t\t\t\tcase \"last\":\n\t\t\t\tcase \"left\":\n\t\t\t\tcase \"parent\":\n\t\t\t\tcase \"right\":\n\t\t\t\tcase \"up\":\n\t\t\t\t\treturn node.navigate(cmd);\n\t\t\t\tdefault:\n\t\t\t\t\t$.error(\"Unhandled command: '\" + cmd + \"'\");\n\t\t\t}\n\t\t},\n\t\t/** (experimental) Modify existing data model.\n\t\t *\n\t\t * @param {Array} patchList array of [key, NodePatch] arrays\n\t\t * @returns {$.Promise} resolved, when all patches have been applied\n\t\t * @see TreePatch\n\t\t */\n\t\tapplyPatch: function(patchList) {\n\t\t\tvar dfd,\n\t\t\t\ti,\n\t\t\t\tp2,\n\t\t\t\tkey,\n\t\t\t\tpatch,\n\t\t\t\tnode,\n\t\t\t\tpatchCount = patchList.length,\n\t\t\t\tdeferredList = [];\n\n\t\t\tfor (i = 0; i < patchCount; i++) {\n\t\t\t\tp2 = patchList[i];\n\t\t\t\t_assert(\n\t\t\t\t\tp2.length === 2,\n\t\t\t\t\t\"patchList must be an array of length-2-arrays\"\n\t\t\t\t);\n\t\t\t\tkey = p2[0];\n\t\t\t\tpatch = p2[1];\n\t\t\t\tnode = key === null ? this.rootNode : this.getNodeByKey(key);\n\t\t\t\tif (node) {\n\t\t\t\t\tdfd = new $.Deferred();\n\t\t\t\t\tdeferredList.push(dfd);\n\t\t\t\t\tnode.applyPatch(patch).always(_makeResolveFunc(dfd, node));\n\t\t\t\t} else {\n\t\t\t\t\tthis.warn(\"could not find node with key '\" + key + \"'\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Return a promise that is resolved, when ALL patches were applied\n\t\t\treturn $.when.apply($, deferredList).promise();\n\t\t},\n\t\t/* TODO: implement in dnd extension\n\t\tcancelDrag: function() {\n\t\t\t\tvar dd = $.ui.ddmanager.current;\n\t\t\t\tif(dd){\n\t\t\t\t\tdd.cancel();\n\t\t\t\t}\n\t\t\t},\n\t\t*/\n\t\t/** Remove all nodes.\n\t\t * @since 2.14\n\t\t */\n\t\tclear: function(source) {\n\t\t\tthis._callHook(\"treeClear\", this);\n\t\t},\n\t\t/** Return the number of nodes.\n\t\t * @returns {integer}\n\t\t */\n\t\tcount: function() {\n\t\t\treturn this.rootNode.countChildren();\n\t\t},\n\t\t/** Write to browser console if debugLevel >= 4 (prepending tree name)\n\t\t *\n\t\t * @param {*} msg string or object or array of such\n\t\t */\n\t\tdebug: function(msg) {\n\t\t\tif (this.options.debugLevel >= 4) {\n\t\t\t\tArray.prototype.unshift.call(arguments, this.toString());\n\t\t\t\tconsoleApply(\"log\", arguments);\n\t\t\t}\n\t\t},\n\t\t/** Destroy this widget, restore previous markup and cleanup resources.\n\t\t *\n\t\t * @since 2.34\n\t\t */\n\t\tdestroy: function() {\n\t\t\tthis.widget.destroy();\n\t\t},\n\t\t/** Enable (or disable) the tree control.\n\t\t *\n\t\t * @param {boolean} [flag=true] pass false to disable\n\t\t * @since 2.30\n\t\t */\n\t\tenable: function(flag) {\n\t\t\tif (flag === false) {\n\t\t\t\tthis.widget.disable();\n\t\t\t} else {\n\t\t\t\tthis.widget.enable();\n\t\t\t}\n\t\t},\n\t\t/** Temporarily suppress rendering to improve performance on bulk-updates.\n\t\t *\n\t\t * @param {boolean} flag\n\t\t * @returns {boolean} previous status\n\t\t * @since 2.19\n\t\t */\n\t\tenableUpdate: function(flag) {\n\t\t\tflag = flag !== false;\n\t\t\tif (!!this._enableUpdate === !!flag) {\n\t\t\t\treturn flag;\n\t\t\t}\n\t\t\tthis._enableUpdate = flag;\n\t\t\tif (flag) {\n\t\t\t\tthis.debug(\"enableUpdate(true): redraw \"); //, this._dirtyRoots);\n\t\t\t\tthis._callHook(\"treeStructureChanged\", this, \"enableUpdate\");\n\t\t\t\tthis.render();\n\t\t\t} else {\n\t\t\t\t// \tthis._dirtyRoots = null;\n\t\t\t\tthis.debug(\"enableUpdate(false)...\");\n\t\t\t}\n\t\t\treturn !flag; // return previous value\n\t\t},\n\t\t/** Write error to browser console if debugLevel >= 1 (prepending tree info)\n\t\t *\n\t\t * @param {*} msg string or object or array of such\n\t\t */\n\t\terror: function(msg) {\n\t\t\tif (this.options.debugLevel >= 1) {\n\t\t\t\tArray.prototype.unshift.call(arguments, this.toString());\n\t\t\t\tconsoleApply(\"error\", arguments);\n\t\t\t}\n\t\t},\n\t\t/** Expand (or collapse) all parent nodes.\n\t\t *\n\t\t * This convenience method uses `tree.visit()` and `tree.setExpanded()`\n\t\t * internally.\n\t\t *\n\t\t * @param {boolean} [flag=true] pass false to collapse\n\t\t * @param {object} [opts] passed to setExpanded()\n\t\t * @since 2.30\n\t\t */\n\t\texpandAll: function(flag, opts) {\n\t\t\tvar prev = this.enableUpdate(false);\n\n\t\t\tflag = flag !== false;\n\t\t\tthis.visit(function(node) {\n\t\t\t\tif (\n\t\t\t\t\tnode.hasChildren() !== false &&\n\t\t\t\t\tnode.isExpanded() !== flag\n\t\t\t\t) {\n\t\t\t\t\tnode.setExpanded(flag, opts);\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.enableUpdate(prev);\n\t\t},\n\t\t/**Find all nodes that matches condition.\n\t\t *\n\t\t * @param {string | function(node)} match title string to search for, or a\n\t\t *     callback function that returns `true` if a node is matched.\n\t\t * @returns {FancytreeNode[]} array of nodes (may be empty)\n\t\t * @see FancytreeNode#findAll\n\t\t * @since 2.12\n\t\t */\n\t\tfindAll: function(match) {\n\t\t\treturn this.rootNode.findAll(match);\n\t\t},\n\t\t/**Find first node that matches condition.\n\t\t *\n\t\t * @param {string | function(node)} match title string to search for, or a\n\t\t *     callback function that returns `true` if a node is matched.\n\t\t * @returns {FancytreeNode} matching node or null\n\t\t * @see FancytreeNode#findFirst\n\t\t * @since 2.12\n\t\t */\n\t\tfindFirst: function(match) {\n\t\t\treturn this.rootNode.findFirst(match);\n\t\t},\n\t\t/** Find the next visible node that starts with `match`, starting at `startNode`\n\t\t * and wrap-around at the end.\n\t\t *\n\t\t * @param {string|function} match\n\t\t * @param {FancytreeNode} [startNode] defaults to first node\n\t\t * @returns {FancytreeNode} matching node or null\n\t\t */\n\t\tfindNextNode: function(match, startNode) {\n\t\t\t//, visibleOnly) {\n\t\t\tvar res = null,\n\t\t\t\tfirstNode = this.getFirstChild();\n\n\t\t\tmatch =\n\t\t\t\ttypeof match === \"string\"\n\t\t\t\t\t? _makeNodeTitleStartMatcher(match)\n\t\t\t\t\t: match;\n\t\t\tstartNode = startNode || firstNode;\n\n\t\t\tfunction _checkNode(n) {\n\t\t\t\t// console.log(\"_check \" + n)\n\t\t\t\tif (match(n)) {\n\t\t\t\t\tres = n;\n\t\t\t\t}\n\t\t\t\tif (res || n === startNode) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.visitRows(_checkNode, {\n\t\t\t\tstart: startNode,\n\t\t\t\tincludeSelf: false,\n\t\t\t});\n\t\t\t// Wrap around search\n\t\t\tif (!res && startNode !== firstNode) {\n\t\t\t\tthis.visitRows(_checkNode, {\n\t\t\t\t\tstart: firstNode,\n\t\t\t\t\tincludeSelf: true,\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn res;\n\t\t},\n\t\t/** Find a node relative to another node.\n\t\t *\n\t\t * @param {FancytreeNode} node\n\t\t * @param {string|number} where 'down', 'first', 'last', 'left', 'parent', 'right', or 'up'.\n\t\t *   (Alternatively the keyCode that would normally trigger this move,\n\t\t *   e.g. `$.ui.keyCode.LEFT` = 'left'.\n\t\t * @param {boolean} [includeHidden=false] Not yet implemented\n\t\t * @returns {FancytreeNode|null}\n\t\t * @since v2.31\n\t\t */\n\t\tfindRelatedNode: function(node, where, includeHidden) {\n\t\t\tvar res = null,\n\t\t\t\tKC = $.ui.keyCode;\n\n\t\t\tswitch (where) {\n\t\t\t\tcase \"parent\":\n\t\t\t\tcase KC.BACKSPACE:\n\t\t\t\t\tif (node.parent && node.parent.parent) {\n\t\t\t\t\t\tres = node.parent;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"first\":\n\t\t\t\tcase KC.HOME:\n\t\t\t\t\t// First visible node\n\t\t\t\t\tthis.visit(function(n) {\n\t\t\t\t\t\tif (n.isVisible()) {\n\t\t\t\t\t\t\tres = n;\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"last\":\n\t\t\t\tcase KC.END:\n\t\t\t\t\tthis.visit(function(n) {\n\t\t\t\t\t\t// last visible node\n\t\t\t\t\t\tif (n.isVisible()) {\n\t\t\t\t\t\t\tres = n;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"left\":\n\t\t\t\tcase KC.LEFT:\n\t\t\t\t\tif (node.expanded) {\n\t\t\t\t\t\tnode.setExpanded(false);\n\t\t\t\t\t} else if (node.parent && node.parent.parent) {\n\t\t\t\t\t\tres = node.parent;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"right\":\n\t\t\t\tcase KC.RIGHT:\n\t\t\t\t\tif (!node.expanded && (node.children || node.lazy)) {\n\t\t\t\t\t\tnode.setExpanded();\n\t\t\t\t\t\tres = node;\n\t\t\t\t\t} else if (node.children && node.children.length) {\n\t\t\t\t\t\tres = node.children[0];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"up\":\n\t\t\t\tcase KC.UP:\n\t\t\t\t\tthis.visitRows(\n\t\t\t\t\t\tfunction(n) {\n\t\t\t\t\t\t\tres = n;\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{ start: node, reverse: true, includeSelf: false }\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"down\":\n\t\t\t\tcase KC.DOWN:\n\t\t\t\t\tthis.visitRows(\n\t\t\t\t\t\tfunction(n) {\n\t\t\t\t\t\t\tres = n;\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{ start: node, includeSelf: false }\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthis.tree.warn(\"Unknown relation '\" + where + \"'.\");\n\t\t\t}\n\t\t\treturn res;\n\t\t},\n\t\t// TODO: fromDict\n\t\t/**\n\t\t * Generate INPUT elements that can be submitted with html forms.\n\t\t *\n\t\t * In selectMode 3 only the topmost selected nodes are considered, unless\n\t\t * `opts.stopOnParents: false` is passed.\n\t\t *\n\t\t * @example\n\t\t * // Generate input elements for active and selected nodes\n\t\t * tree.generateFormElements();\n\t\t * // Generate input elements selected nodes, using a custom `name` attribute\n\t\t * tree.generateFormElements(\"cust_sel\", false);\n\t\t * // Generate input elements using a custom filter\n\t\t * tree.generateFormElements(true, true, { filter: function(node) {\n\t\t *     return node.isSelected() && node.data.yes;\n\t\t * }});\n\t\t *\n\t\t * @param {boolean | string} [selected=true] Pass false to disable, pass a string to override the field name (default: 'ft_ID[]')\n\t\t * @param {boolean | string} [active=true] Pass false to disable, pass a string to override the field name (default: 'ft_ID_active')\n\t\t * @param {object} [opts] default { filter: null, stopOnParents: true }\n\t\t */\n\t\tgenerateFormElements: function(selected, active, opts) {\n\t\t\topts = opts || {};\n\n\t\t\tvar nodeList,\n\t\t\t\tselectedName =\n\t\t\t\t\ttypeof selected === \"string\"\n\t\t\t\t\t\t? selected\n\t\t\t\t\t\t: \"ft_\" + this._id + \"[]\",\n\t\t\t\tactiveName =\n\t\t\t\t\ttypeof active === \"string\"\n\t\t\t\t\t\t? active\n\t\t\t\t\t\t: \"ft_\" + this._id + \"_active\",\n\t\t\t\tid = \"fancytree_result_\" + this._id,\n\t\t\t\t$result = $(\"#\" + id),\n\t\t\t\tstopOnParents =\n\t\t\t\t\tthis.options.selectMode === 3 &&\n\t\t\t\t\topts.stopOnParents !== false;\n\n\t\t\tif ($result.length) {\n\t\t\t\t$result.empty();\n\t\t\t} else {\n\t\t\t\t$result = $(\"<div>\", {\n\t\t\t\t\tid: id,\n\t\t\t\t})\n\t\t\t\t\t.hide()\n\t\t\t\t\t.insertAfter(this.$container);\n\t\t\t}\n\t\t\tif (active !== false && this.activeNode) {\n\t\t\t\t$result.append(\n\t\t\t\t\t$(\"<input>\", {\n\t\t\t\t\t\ttype: \"radio\",\n\t\t\t\t\t\tname: activeName,\n\t\t\t\t\t\tvalue: this.activeNode.key,\n\t\t\t\t\t\tchecked: true,\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t}\n\t\t\tfunction _appender(node) {\n\t\t\t\t$result.append(\n\t\t\t\t\t$(\"<input>\", {\n\t\t\t\t\t\ttype: \"checkbox\",\n\t\t\t\t\t\tname: selectedName,\n\t\t\t\t\t\tvalue: node.key,\n\t\t\t\t\t\tchecked: true,\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (opts.filter) {\n\t\t\t\tthis.visit(function(node) {\n\t\t\t\t\tvar res = opts.filter(node);\n\t\t\t\t\tif (res === \"skip\") {\n\t\t\t\t\t\treturn res;\n\t\t\t\t\t}\n\t\t\t\t\tif (res !== false) {\n\t\t\t\t\t\t_appender(node);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else if (selected !== false) {\n\t\t\t\tnodeList = this.getSelectedNodes(stopOnParents);\n\t\t\t\t$.each(nodeList, function(idx, node) {\n\t\t\t\t\t_appender(node);\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Return the currently active node or null.\n\t\t * @returns {FancytreeNode}\n\t\t */\n\t\tgetActiveNode: function() {\n\t\t\treturn this.activeNode;\n\t\t},\n\t\t/** Return the first top level node if any (not the invisible root node).\n\t\t * @returns {FancytreeNode | null}\n\t\t */\n\t\tgetFirstChild: function() {\n\t\t\treturn this.rootNode.getFirstChild();\n\t\t},\n\t\t/**\n\t\t * Return node that has keyboard focus or null.\n\t\t * @returns {FancytreeNode}\n\t\t */\n\t\tgetFocusNode: function() {\n\t\t\treturn this.focusNode;\n\t\t},\n\t\t/**\n\t\t * Return current option value.\n\t\t * (Note: this is the preferred variant of `$().fancytree(\"option\", \"KEY\")`)\n\t\t *\n\t\t * @param {string} name option name (may contain '.')\n\t\t * @returns {any}\n\t\t */\n\t\tgetOption: function(optionName) {\n\t\t\treturn this.widget.option(optionName);\n\t\t},\n\t\t/**\n\t\t * Return node with a given key or null if not found.\n\t\t *\n\t\t * @param {string} key\n\t\t * @param {FancytreeNode} [searchRoot] only search below this node\n\t\t * @returns {FancytreeNode | null}\n\t\t */\n\t\tgetNodeByKey: function(key, searchRoot) {\n\t\t\t// Search the DOM by element ID (assuming this is faster than traversing all nodes).\n\t\t\tvar el, match;\n\t\t\t// TODO: use tree.keyMap if available\n\t\t\t// TODO: check opts.generateIds === true\n\t\t\tif (!searchRoot) {\n\t\t\t\tel = document.getElementById(this.options.idPrefix + key);\n\t\t\t\tif (el) {\n\t\t\t\t\treturn el.ftnode ? el.ftnode : null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Not found in the DOM, but still may be in an unrendered part of tree\n\t\t\tsearchRoot = searchRoot || this.rootNode;\n\t\t\tmatch = null;\n\t\t\tkey = \"\" + key; // Convert to string (#1005)\n\t\t\tsearchRoot.visit(function(node) {\n\t\t\t\tif (node.key === key) {\n\t\t\t\t\tmatch = node;\n\t\t\t\t\treturn false; // Stop iteration\n\t\t\t\t}\n\t\t\t}, true);\n\t\t\treturn match;\n\t\t},\n\t\t/** Return the invisible system root node.\n\t\t * @returns {FancytreeNode}\n\t\t */\n\t\tgetRootNode: function() {\n\t\t\treturn this.rootNode;\n\t\t},\n\t\t/**\n\t\t * Return an array of selected nodes.\n\t\t *\n\t\t * Note: you cannot send this result via Ajax directly. Instead the\n\t\t * node object need to be converted to plain objects, for example\n\t\t * by using `$.map()` and `node.toDict()`.\n\t\t * @param {boolean} [stopOnParents=false] only return the topmost selected\n\t\t *     node (useful with selectMode 3)\n\t\t * @returns {FancytreeNode[]}\n\t\t */\n\t\tgetSelectedNodes: function(stopOnParents) {\n\t\t\treturn this.rootNode.getSelectedNodes(stopOnParents);\n\t\t},\n\t\t/** Return true if the tree control has keyboard focus\n\t\t * @returns {boolean}\n\t\t */\n\t\thasFocus: function() {\n\t\t\t// var ae = document.activeElement,\n\t\t\t// \thasFocus = !!(\n\t\t\t// \t\tae && $(ae).closest(\".fancytree-container\").length\n\t\t\t// \t);\n\n\t\t\t// if (hasFocus !== !!this._hasFocus) {\n\t\t\t// \tthis.warn(\n\t\t\t// \t\t\"hasFocus(): fix inconsistent container state, now: \" +\n\t\t\t// \t\t\thasFocus\n\t\t\t// \t);\n\t\t\t// \tthis._hasFocus = hasFocus;\n\t\t\t// \tthis.$container.toggleClass(\"fancytree-treefocus\", hasFocus);\n\t\t\t// }\n\t\t\t// return hasFocus;\n\t\t\treturn !!this._hasFocus;\n\t\t},\n\t\t/** Write to browser console if debugLevel >= 3 (prepending tree name)\n\t\t * @param {*} msg string or object or array of such\n\t\t */\n\t\tinfo: function(msg) {\n\t\t\tif (this.options.debugLevel >= 3) {\n\t\t\t\tArray.prototype.unshift.call(arguments, this.toString());\n\t\t\t\tconsoleApply(\"info\", arguments);\n\t\t\t}\n\t\t},\n\t\t/** Return true if any node is currently beeing loaded, i.e. a Ajax request is pending.\n\t\t * @returns {boolean}\n\t\t * @since 2.32\n\t\t */\n\t\tisLoading: function() {\n\t\t\tvar res = false;\n\n\t\t\tthis.rootNode.visit(function(n) {\n\t\t\t\t// also visit rootNode\n\t\t\t\tif (n._isLoading || n._requestId) {\n\t\t\t\t\tres = true;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}, true);\n\t\t\treturn res;\n\t\t},\n\t\t/*\n\t\tTODO: isInitializing: function() {\n\t\t\treturn ( this.phase==\"init\" || this.phase==\"postInit\" );\n\t\t},\n\t\tTODO: isReloading: function() {\n\t\t\treturn ( this.phase==\"init\" || this.phase==\"postInit\" ) && this.options.persist && this.persistence.cookiesFound;\n\t\t},\n\t\tTODO: isUserEvent: function() {\n\t\t\treturn ( this.phase==\"userEvent\" );\n\t\t},\n\t\t*/\n\n\t\t/**\n\t\t * Make sure that a node with a given ID is loaded, by traversing - and\n\t\t * loading - its parents. This method is meant for lazy hierarchies.\n\t\t * A callback is executed for every node as we go.\n\t\t * @example\n\t\t * // Resolve using node.key:\n\t\t * tree.loadKeyPath(\"/_3/_23/_26/_27\", function(node, status){\n\t\t *   if(status === \"loaded\") {\n\t\t *     console.log(\"loaded intermediate node \" + node);\n\t\t *   }else if(status === \"ok\") {\n\t\t *     node.activate();\n\t\t *   }\n\t\t * });\n\t\t * // Use deferred promise:\n\t\t * tree.loadKeyPath(\"/_3/_23/_26/_27\").progress(function(data){\n\t\t *   if(data.status === \"loaded\") {\n\t\t *     console.log(\"loaded intermediate node \" + data.node);\n\t\t *   }else if(data.status === \"ok\") {\n\t\t *     node.activate();\n\t\t *   }\n\t\t * }).done(function(){\n\t\t *    ...\n\t\t * });\n\t\t * // Custom path segment resolver:\n\t\t * tree.loadKeyPath(\"/321/431/21/2\", {\n\t\t *   matchKey: function(node, key){\n\t\t *     return node.data.refKey === key;\n\t\t *   },\n\t\t *   callback: function(node, status){\n\t\t *     if(status === \"loaded\") {\n\t\t *       console.log(\"loaded intermediate node \" + node);\n\t\t *     }else if(status === \"ok\") {\n\t\t *       node.activate();\n\t\t *     }\n\t\t *   }\n\t\t * });\n\t\t * @param {string | string[]} keyPathList one or more key paths (e.g. '/3/2_1/7')\n\t\t * @param {function | object} optsOrCallback callback(node, status) is called for every visited node ('loading', 'loaded', 'ok', 'error').\n\t\t *     Pass an object to define custom key matchers for the path segments: {callback: function, matchKey: function}.\n\t\t * @returns {$.Promise}\n\t\t */\n\t\tloadKeyPath: function(keyPathList, optsOrCallback) {\n\t\t\tvar callback,\n\t\t\t\ti,\n\t\t\t\tpath,\n\t\t\t\tself = this,\n\t\t\t\tdfd = new $.Deferred(),\n\t\t\t\tparent = this.getRootNode(),\n\t\t\t\tsep = this.options.keyPathSeparator,\n\t\t\t\tpathSegList = [],\n\t\t\t\topts = $.extend({}, optsOrCallback);\n\n\t\t\t// Prepare options\n\t\t\tif (typeof optsOrCallback === \"function\") {\n\t\t\t\tcallback = optsOrCallback;\n\t\t\t} else if (optsOrCallback && optsOrCallback.callback) {\n\t\t\t\tcallback = optsOrCallback.callback;\n\t\t\t}\n\t\t\topts.callback = function(ctx, node, status) {\n\t\t\t\tif (callback) {\n\t\t\t\t\tcallback.call(ctx, node, status);\n\t\t\t\t}\n\t\t\t\tdfd.notifyWith(ctx, [{ node: node, status: status }]);\n\t\t\t};\n\t\t\tif (opts.matchKey == null) {\n\t\t\t\topts.matchKey = function(node, key) {\n\t\t\t\t\treturn node.key === key;\n\t\t\t\t};\n\t\t\t}\n\t\t\t// Convert array of path strings to array of segment arrays\n\t\t\tif (!$.isArray(keyPathList)) {\n\t\t\t\tkeyPathList = [keyPathList];\n\t\t\t}\n\t\t\tfor (i = 0; i < keyPathList.length; i++) {\n\t\t\t\tpath = keyPathList[i];\n\t\t\t\t// strip leading slash\n\t\t\t\tif (path.charAt(0) === sep) {\n\t\t\t\t\tpath = path.substr(1);\n\t\t\t\t}\n\t\t\t\t// segListMap[path] = { parent: parent, segList: path.split(sep) };\n\t\t\t\tpathSegList.push(path.split(sep));\n\t\t\t\t// targetList.push({ parent: parent, segList: path.split(sep)/* , path: path*/});\n\t\t\t}\n\t\t\t// The timeout forces async behavior always (even if nodes are all loaded)\n\t\t\t// This way a potential progress() event will fire.\n\t\t\tsetTimeout(function() {\n\t\t\t\tself._loadKeyPathImpl(dfd, opts, parent, pathSegList).done(\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tdfd.resolve();\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}, 0);\n\t\t\treturn dfd.promise();\n\t\t},\n\t\t/*\n\t\t * Resolve a list of paths, relative to one parent node.\n\t\t */\n\t\t_loadKeyPathImpl: function(dfd, opts, parent, pathSegList) {\n\t\t\tvar deferredList,\n\t\t\t\ti,\n\t\t\t\tkey,\n\t\t\t\tnode,\n\t\t\t\tnodeKey,\n\t\t\t\tremain,\n\t\t\t\tremainMap,\n\t\t\t\ttmpParent,\n\t\t\t\tsegList,\n\t\t\t\tsubDfd,\n\t\t\t\tself = this;\n\n\t\t\tfunction __findChild(parent, key) {\n\t\t\t\t// console.log(\"__findChild\", key, parent);\n\t\t\t\tvar i,\n\t\t\t\t\tl,\n\t\t\t\t\tcl = parent.children;\n\n\t\t\t\tif (cl) {\n\t\t\t\t\tfor (i = 0, l = cl.length; i < l; i++) {\n\t\t\t\t\t\tif (opts.matchKey(cl[i], key)) {\n\t\t\t\t\t\t\treturn cl[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// console.log(\"_loadKeyPathImpl, parent=\", parent, \", pathSegList=\", pathSegList);\n\n\t\t\t// Pass 1:\n\t\t\t// Handle all path segments for nodes that are already loaded.\n\t\t\t// Collect distinct top-most lazy nodes in a map.\n\t\t\t// Note that we can use node.key to de-dupe entries, even if a custom matcher would\n\t\t\t// look for other node attributes.\n\t\t\t// map[node.key] => {node: node, pathList: [list of remaining rest-paths]}\n\t\t\tremainMap = {};\n\n\t\t\tfor (i = 0; i < pathSegList.length; i++) {\n\t\t\t\tsegList = pathSegList[i];\n\t\t\t\t// target = targetList[i];\n\n\t\t\t\t// Traverse and pop path segments (i.e. keys), until we hit a lazy, unloaded node\n\t\t\t\ttmpParent = parent;\n\t\t\t\twhile (segList.length) {\n\t\t\t\t\tkey = segList.shift();\n\t\t\t\t\tnode = __findChild(tmpParent, key);\n\t\t\t\t\tif (!node) {\n\t\t\t\t\t\tthis.warn(\n\t\t\t\t\t\t\t\"loadKeyPath: key not found: \" +\n\t\t\t\t\t\t\t\tkey +\n\t\t\t\t\t\t\t\t\" (parent: \" +\n\t\t\t\t\t\t\t\ttmpParent +\n\t\t\t\t\t\t\t\t\")\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\topts.callback(this, key, \"error\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (segList.length === 0) {\n\t\t\t\t\t\topts.callback(this, node, \"ok\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else if (!node.lazy || node.hasChildren() !== undefined) {\n\t\t\t\t\t\topts.callback(this, node, \"loaded\");\n\t\t\t\t\t\ttmpParent = node;\n\t\t\t\t\t} else {\n\t\t\t\t\t\topts.callback(this, node, \"loaded\");\n\t\t\t\t\t\tkey = node.key; //target.segList.join(sep);\n\t\t\t\t\t\tif (remainMap[key]) {\n\t\t\t\t\t\t\tremainMap[key].pathSegList.push(segList);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tremainMap[key] = {\n\t\t\t\t\t\t\t\tparent: node,\n\t\t\t\t\t\t\t\tpathSegList: [segList],\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// console.log(\"_loadKeyPathImpl AFTER pass 1, remainMap=\", remainMap);\n\n\t\t\t// Now load all lazy nodes and continue iteration for remaining paths\n\t\t\tdeferredList = [];\n\n\t\t\t// Avoid jshint warning 'Don't make functions within a loop.':\n\t\t\tfunction __lazyload(dfd, parent, pathSegList) {\n\t\t\t\t// console.log(\"__lazyload\", parent, \"pathSegList=\", pathSegList);\n\t\t\t\topts.callback(self, parent, \"loading\");\n\t\t\t\tparent\n\t\t\t\t\t.load()\n\t\t\t\t\t.done(function() {\n\t\t\t\t\t\tself._loadKeyPathImpl\n\t\t\t\t\t\t\t.call(self, dfd, opts, parent, pathSegList)\n\t\t\t\t\t\t\t.always(_makeResolveFunc(dfd, self));\n\t\t\t\t\t})\n\t\t\t\t\t.fail(function(errMsg) {\n\t\t\t\t\t\tself.warn(\"loadKeyPath: error loading lazy \" + parent);\n\t\t\t\t\t\topts.callback(self, node, \"error\");\n\t\t\t\t\t\tdfd.rejectWith(self);\n\t\t\t\t\t});\n\t\t\t}\n\t\t\t// remainMap contains parent nodes, each with a list of relative sub-paths.\n\t\t\t// We start loading all of them now, and pass the the list to each loader.\n\t\t\tfor (nodeKey in remainMap) {\n\t\t\t\tif (remainMap.hasOwnProperty(nodeKey)) {\n\t\t\t\t\tremain = remainMap[nodeKey];\n\t\t\t\t\t// console.log(\"for(): remain=\", remain, \"remainMap=\", remainMap);\n\t\t\t\t\t// key = remain.segList.shift();\n\t\t\t\t\t// node = __findChild(remain.parent, key);\n\t\t\t\t\t// if (node == null) {  // #576\n\t\t\t\t\t// \t// Issue #576, refactored for v2.27:\n\t\t\t\t\t// \t// The root cause was, that sometimes the wrong parent was used here\n\t\t\t\t\t// \t// to find the next segment.\n\t\t\t\t\t// \t// Falling back to getNodeByKey() was a hack that no longer works if a custom\n\t\t\t\t\t// \t// matcher is used, because we cannot assume that a single segment-key is unique\n\t\t\t\t\t// \t// throughout the tree.\n\t\t\t\t\t// \tself.error(\"loadKeyPath: error loading child by key '\" + key + \"' (parent: \" + target.parent + \")\", target);\n\t\t\t\t\t// \t// \tnode = self.getNodeByKey(key);\n\t\t\t\t\t// \tcontinue;\n\t\t\t\t\t// }\n\t\t\t\t\tsubDfd = new $.Deferred();\n\t\t\t\t\tdeferredList.push(subDfd);\n\t\t\t\t\t__lazyload(subDfd, remain.parent, remain.pathSegList);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Return a promise that is resolved, when ALL paths were loaded\n\t\t\treturn $.when.apply($, deferredList).promise();\n\t\t},\n\t\t/** Re-fire beforeActivate, activate, and (optional) focus events.\n\t\t * Calling this method in the `init` event, will activate the node that\n\t\t * was marked 'active' in the source data, and optionally set the keyboard\n\t\t * focus.\n\t\t * @param [setFocus=false]\n\t\t */\n\t\treactivate: function(setFocus) {\n\t\t\tvar res,\n\t\t\t\tnode = this.activeNode;\n\n\t\t\tif (!node) {\n\t\t\t\treturn _getResolvedPromise();\n\t\t\t}\n\t\t\tthis.activeNode = null; // Force re-activating\n\t\t\tres = node.setActive(true, { noFocus: true });\n\t\t\tif (setFocus) {\n\t\t\t\tnode.setFocus();\n\t\t\t}\n\t\t\treturn res;\n\t\t},\n\t\t/** Reload tree from source and return a promise.\n\t\t * @param [source] optional new source (defaults to initial source data)\n\t\t * @returns {$.Promise}\n\t\t */\n\t\treload: function(source) {\n\t\t\tthis._callHook(\"treeClear\", this);\n\t\t\treturn this._callHook(\"treeLoad\", this, source);\n\t\t},\n\t\t/**Render tree (i.e. create DOM elements for all top-level nodes).\n\t\t * @param {boolean} [force=false] create DOM elemnts, even if parent is collapsed\n\t\t * @param {boolean} [deep=false]\n\t\t */\n\t\trender: function(force, deep) {\n\t\t\treturn this.rootNode.render(force, deep);\n\t\t},\n\t\t/**(De)select all nodes.\n\t\t * @param {boolean} [flag=true]\n\t\t * @since 2.28\n\t\t */\n\t\tselectAll: function(flag) {\n\t\t\tthis.visit(function(node) {\n\t\t\t\tnode.setSelected(flag);\n\t\t\t});\n\t\t},\n\t\t// TODO: selectKey: function(key, select)\n\t\t// TODO: serializeArray: function(stopOnParents)\n\t\t/**\n\t\t * @param {boolean} [flag=true]\n\t\t */\n\t\tsetFocus: function(flag) {\n\t\t\treturn this._callHook(\"treeSetFocus\", this, flag);\n\t\t},\n\t\t/**\n\t\t * Set current option value.\n\t\t * (Note: this is the preferred variant of `$().fancytree(\"option\", \"KEY\", VALUE)`)\n\t\t * @param {string} name option name (may contain '.')\n\t\t * @param {any} new value\n\t\t */\n\t\tsetOption: function(optionName, value) {\n\t\t\treturn this.widget.option(optionName, value);\n\t\t},\n\t\t/**\n\t\t * Call console.time() when in debug mode (verbose >= 4).\n\t\t *\n\t\t * @param {string} label\n\t\t */\n\t\tdebugTime: function(label) {\n\t\t\tif (this.options.debugLevel >= 4) {\n\t\t\t\twindow.console.time(this + \" - \" + label);\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Call console.timeEnd() when in debug mode (verbose >= 4).\n\t\t *\n\t\t * @param {string} label\n\t\t */\n\t\tdebugTimeEnd: function(label) {\n\t\t\tif (this.options.debugLevel >= 4) {\n\t\t\t\twindow.console.timeEnd(this + \" - \" + label);\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Return all nodes as nested list of {@link NodeData}.\n\t\t *\n\t\t * @param {boolean} [includeRoot=false] Returns the hidden system root node (and its children)\n\t\t * @param {function} [callback] callback(dict, node) is called for every node, in order to allow modifications.\n\t\t *     Return `false` to ignore this node or \"skip\" to include this node without its children.\n\t\t * @returns {Array | object}\n\t\t * @see FancytreeNode#toDict\n\t\t */\n\t\ttoDict: function(includeRoot, callback) {\n\t\t\tvar res = this.rootNode.toDict(true, callback);\n\t\t\treturn includeRoot ? res : res.children;\n\t\t},\n\t\t/* Implicitly called for string conversions.\n\t\t * @returns {string}\n\t\t */\n\t\ttoString: function() {\n\t\t\treturn \"Fancytree@\" + this._id;\n\t\t\t// return \"<Fancytree(#\" + this._id + \")>\";\n\t\t},\n\t\t/* _trigger a widget event with additional node ctx.\n\t\t * @see EventData\n\t\t */\n\t\t_triggerNodeEvent: function(type, node, originalEvent, extra) {\n\t\t\t// this.debug(\"_trigger(\" + type + \"): '\" + ctx.node.title + \"'\", ctx);\n\t\t\tvar ctx = this._makeHookContext(node, originalEvent, extra),\n\t\t\t\tres = this.widget._trigger(type, originalEvent, ctx);\n\t\t\tif (res !== false && ctx.result !== undefined) {\n\t\t\t\treturn ctx.result;\n\t\t\t}\n\t\t\treturn res;\n\t\t},\n\t\t/* _trigger a widget event with additional tree data. */\n\t\t_triggerTreeEvent: function(type, originalEvent, extra) {\n\t\t\t// this.debug(\"_trigger(\" + type + \")\", ctx);\n\t\t\tvar ctx = this._makeHookContext(this, originalEvent, extra),\n\t\t\t\tres = this.widget._trigger(type, originalEvent, ctx);\n\n\t\t\tif (res !== false && ctx.result !== undefined) {\n\t\t\t\treturn ctx.result;\n\t\t\t}\n\t\t\treturn res;\n\t\t},\n\t\t/** Call fn(node) for all nodes in hierarchical order (depth-first).\n\t\t *\n\t\t * @param {function} fn the callback function.\n\t\t *     Return false to stop iteration, return \"skip\" to skip this node and children only.\n\t\t * @returns {boolean} false, if the iterator was stopped.\n\t\t */\n\t\tvisit: function(fn) {\n\t\t\treturn this.rootNode.visit(fn, false);\n\t\t},\n\t\t/** Call fn(node) for all nodes in vertical order, top down (or bottom up).<br>\n\t\t * Stop iteration, if fn() returns false.<br>\n\t\t * Return false if iteration was stopped.\n\t\t *\n\t\t * @param {function} fn the callback function.\n\t\t *     Return false to stop iteration, return \"skip\" to skip this node and children only.\n\t\t * @param {object} [options]\n\t\t *     Defaults:\n\t\t *     {start: First top node, reverse: false, includeSelf: true, includeHidden: false}\n\t\t * @returns {boolean} false if iteration was cancelled\n\t\t * @since 2.28\n\t\t */\n\t\tvisitRows: function(fn, opts) {\n\t\t\tif (!this.rootNode.hasChildren()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (opts && opts.reverse) {\n\t\t\t\tdelete opts.reverse;\n\t\t\t\treturn this._visitRowsUp(fn, opts);\n\t\t\t}\n\t\t\topts = opts || {};\n\n\t\t\tvar i,\n\t\t\t\tnextIdx,\n\t\t\t\tparent,\n\t\t\t\tres,\n\t\t\t\tsiblings,\n\t\t\t\tsiblingOfs = 0,\n\t\t\t\tskipFirstNode = opts.includeSelf === false,\n\t\t\t\tincludeHidden = !!opts.includeHidden,\n\t\t\t\tcheckFilter = !includeHidden && this.enableFilter,\n\t\t\t\tnode = opts.start || this.rootNode.children[0];\n\n\t\t\tparent = node.parent;\n\t\t\twhile (parent) {\n\t\t\t\t// visit siblings\n\t\t\t\tsiblings = parent.children;\n\t\t\t\tnextIdx = siblings.indexOf(node) + siblingOfs;\n\n\t\t\t\tfor (i = nextIdx; i < siblings.length; i++) {\n\t\t\t\t\tnode = siblings[i];\n\t\t\t\t\tif (checkFilter && !node.match && !node.subMatchCount) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (!skipFirstNode && fn(node) === false) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tskipFirstNode = false;\n\t\t\t\t\t// Dive into node's child nodes\n\t\t\t\t\tif (\n\t\t\t\t\t\tnode.children &&\n\t\t\t\t\t\tnode.children.length &&\n\t\t\t\t\t\t(includeHidden || node.expanded)\n\t\t\t\t\t) {\n\t\t\t\t\t\t// Disable warning: Functions declared within loops referencing an outer\n\t\t\t\t\t\t// scoped variable may lead to confusing semantics:\n\t\t\t\t\t\t/*jshint -W083 */\n\t\t\t\t\t\tres = node.visit(function(n) {\n\t\t\t\t\t\t\tif (checkFilter && !n.match && !n.subMatchCount) {\n\t\t\t\t\t\t\t\treturn \"skip\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (fn(n) === false) {\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!includeHidden && n.children && !n.expanded) {\n\t\t\t\t\t\t\t\treturn \"skip\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, false);\n\t\t\t\t\t\t/*jshint +W083 */\n\t\t\t\t\t\tif (res === false) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Visit parent nodes (bottom up)\n\t\t\t\tnode = parent;\n\t\t\t\tparent = parent.parent;\n\t\t\t\tsiblingOfs = 1; //\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\t/* Call fn(node) for all nodes in vertical order, bottom up.\n\t\t */\n\t\t_visitRowsUp: function(fn, opts) {\n\t\t\tvar children,\n\t\t\t\tidx,\n\t\t\t\tparent,\n\t\t\t\tincludeHidden = !!opts.includeHidden,\n\t\t\t\tnode = opts.start || this.rootNode.children[0];\n\n\t\t\twhile (true) {\n\t\t\t\tparent = node.parent;\n\t\t\t\tchildren = parent.children;\n\n\t\t\t\tif (children[0] === node) {\n\t\t\t\t\t// If this is already the first sibling, goto parent\n\t\t\t\t\tnode = parent;\n\t\t\t\t\tif (!node.parent) {\n\t\t\t\t\t\tbreak; // first node of the tree\n\t\t\t\t\t}\n\t\t\t\t\tchildren = parent.children;\n\t\t\t\t} else {\n\t\t\t\t\t// Otherwise, goto prev. sibling\n\t\t\t\t\tidx = children.indexOf(node);\n\t\t\t\t\tnode = children[idx - 1];\n\t\t\t\t\t// If the prev. sibling has children, follow down to last descendant\n\t\t\t\t\twhile (\n\t\t\t\t\t\t// See: https://github.com/eslint/eslint/issues/11302\n\t\t\t\t\t\t// eslint-disable-next-line no-unmodified-loop-condition\n\t\t\t\t\t\t(includeHidden || node.expanded) &&\n\t\t\t\t\t\tnode.children &&\n\t\t\t\t\t\tnode.children.length\n\t\t\t\t\t) {\n\t\t\t\t\t\tchildren = node.children;\n\t\t\t\t\t\tparent = node;\n\t\t\t\t\t\tnode = children[children.length - 1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Skip invisible\n\t\t\t\tif (!includeHidden && !node.isVisible()) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (fn(node) === false) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t/** Write warning to browser console if debugLevel >= 2 (prepending tree info)\n\t\t *\n\t\t * @param {*} msg string or object or array of such\n\t\t */\n\t\twarn: function(msg) {\n\t\t\tif (this.options.debugLevel >= 2) {\n\t\t\t\tArray.prototype.unshift.call(arguments, this.toString());\n\t\t\t\tconsoleApply(\"warn\", arguments);\n\t\t\t}\n\t\t},\n\t};\n\n\t/**\n\t * These additional methods of the {@link Fancytree} class are 'hook functions'\n\t * that can be used and overloaded by extensions.\n\t *\n\t * @see [writing extensions](https://github.com/mar10/fancytree/wiki/TutorialExtensions)\n\t * @mixin Fancytree_Hooks\n\t */\n\t$.extend(\n\t\tFancytree.prototype,\n\t\t/** @lends Fancytree_Hooks# */\n\t\t{\n\t\t\t/** Default handling for mouse click events.\n\t\t\t *\n\t\t\t * @param {EventData} ctx\n\t\t\t */\n\t\t\tnodeClick: function(ctx) {\n\t\t\t\tvar activate,\n\t\t\t\t\texpand,\n\t\t\t\t\t// event = ctx.originalEvent,\n\t\t\t\t\ttargetType = ctx.targetType,\n\t\t\t\t\tnode = ctx.node;\n\n\t\t\t\t// this.debug(\"ftnode.onClick(\" + event.type + \"): ftnode:\" + this + \", button:\" + event.button + \", which: \" + event.which, ctx);\n\t\t\t\t// TODO: use switch\n\t\t\t\t// TODO: make sure clicks on embedded <input> doesn't steal focus (see table sample)\n\t\t\t\tif (targetType === \"expander\") {\n\t\t\t\t\tif (node.isLoading()) {\n\t\t\t\t\t\t// #495: we probably got a click event while a lazy load is pending.\n\t\t\t\t\t\t// The 'expanded' state is not yet set, so 'toggle' would expand\n\t\t\t\t\t\t// and trigger lazyLoad again.\n\t\t\t\t\t\t// It would be better to allow to collapse/expand the status node\n\t\t\t\t\t\t// while loading (instead of ignoring), but that would require some\n\t\t\t\t\t\t// more work.\n\t\t\t\t\t\tnode.debug(\"Got 2nd click while loading: ignored\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// Clicking the expander icon always expands/collapses\n\t\t\t\t\tthis._callHook(\"nodeToggleExpanded\", ctx);\n\t\t\t\t} else if (targetType === \"checkbox\") {\n\t\t\t\t\t// Clicking the checkbox always (de)selects\n\t\t\t\t\tthis._callHook(\"nodeToggleSelected\", ctx);\n\t\t\t\t\tif (ctx.options.focusOnSelect) {\n\t\t\t\t\t\t// #358\n\t\t\t\t\t\tthis._callHook(\"nodeSetFocus\", ctx, true);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Honor `clickFolderMode` for\n\t\t\t\t\texpand = false;\n\t\t\t\t\tactivate = true;\n\t\t\t\t\tif (node.folder) {\n\t\t\t\t\t\tswitch (ctx.options.clickFolderMode) {\n\t\t\t\t\t\t\tcase 2: // expand only\n\t\t\t\t\t\t\t\texpand = true;\n\t\t\t\t\t\t\t\tactivate = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3: // expand and activate\n\t\t\t\t\t\t\t\tactivate = true;\n\t\t\t\t\t\t\t\texpand = true; //!node.isExpanded();\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t// else 1 or 4: just activate\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (activate) {\n\t\t\t\t\t\tthis.nodeSetFocus(ctx);\n\t\t\t\t\t\tthis._callHook(\"nodeSetActive\", ctx, true);\n\t\t\t\t\t}\n\t\t\t\t\tif (expand) {\n\t\t\t\t\t\tif (!activate) {\n\t\t\t\t\t\t\t// this._callHook(\"nodeSetFocus\", ctx);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// this._callHook(\"nodeSetExpanded\", ctx, true);\n\t\t\t\t\t\tthis._callHook(\"nodeToggleExpanded\", ctx);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Make sure that clicks stop, otherwise <a href='#'> jumps to the top\n\t\t\t\t// if(event.target.localName === \"a\" && event.target.className === \"fancytree-title\"){\n\t\t\t\t// \tevent.preventDefault();\n\t\t\t\t// }\n\t\t\t\t// TODO: return promise?\n\t\t\t},\n\t\t\t/** Collapse all other  children of same parent.\n\t\t\t *\n\t\t\t * @param {EventData} ctx\n\t\t\t * @param {object} callOpts\n\t\t\t */\n\t\t\tnodeCollapseSiblings: function(ctx, callOpts) {\n\t\t\t\t// TODO: return promise?\n\t\t\t\tvar ac,\n\t\t\t\t\ti,\n\t\t\t\t\tl,\n\t\t\t\t\tnode = ctx.node;\n\n\t\t\t\tif (node.parent) {\n\t\t\t\t\tac = node.parent.children;\n\t\t\t\t\tfor (i = 0, l = ac.length; i < l; i++) {\n\t\t\t\t\t\tif (ac[i] !== node && ac[i].expanded) {\n\t\t\t\t\t\t\tthis._callHook(\n\t\t\t\t\t\t\t\t\"nodeSetExpanded\",\n\t\t\t\t\t\t\t\tac[i],\n\t\t\t\t\t\t\t\tfalse,\n\t\t\t\t\t\t\t\tcallOpts\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t/** Default handling for mouse douleclick events.\n\t\t\t * @param {EventData} ctx\n\t\t\t */\n\t\t\tnodeDblclick: function(ctx) {\n\t\t\t\t// TODO: return promise?\n\t\t\t\tif (\n\t\t\t\t\tctx.targetType === \"title\" &&\n\t\t\t\t\tctx.options.clickFolderMode === 4\n\t\t\t\t) {\n\t\t\t\t\t// this.nodeSetFocus(ctx);\n\t\t\t\t\t// this._callHook(\"nodeSetActive\", ctx, true);\n\t\t\t\t\tthis._callHook(\"nodeToggleExpanded\", ctx);\n\t\t\t\t}\n\t\t\t\t// TODO: prevent text selection on dblclicks\n\t\t\t\tif (ctx.targetType === \"title\") {\n\t\t\t\t\tctx.originalEvent.preventDefault();\n\t\t\t\t}\n\t\t\t},\n\t\t\t/** Default handling for mouse keydown events.\n\t\t\t *\n\t\t\t * NOTE: this may be called with node == null if tree (but no node) has focus.\n\t\t\t * @param {EventData} ctx\n\t\t\t */\n\t\t\tnodeKeydown: function(ctx) {\n\t\t\t\t// TODO: return promise?\n\t\t\t\tvar matchNode,\n\t\t\t\t\tstamp,\n\t\t\t\t\t_res,\n\t\t\t\t\tfocusNode,\n\t\t\t\t\tevent = ctx.originalEvent,\n\t\t\t\t\tnode = ctx.node,\n\t\t\t\t\ttree = ctx.tree,\n\t\t\t\t\topts = ctx.options,\n\t\t\t\t\twhich = event.which,\n\t\t\t\t\t// #909: Use event.key, to get unicode characters.\n\t\t\t\t\t// We can't use `/\\w/.test(key)`, because that would\n\t\t\t\t\t// only detect plain ascii alpha-numerics. But we still need\n\t\t\t\t\t// to ignore modifier-only, whitespace, cursor-keys, etc.\n\t\t\t\t\tkey = event.key || String.fromCharCode(which),\n\t\t\t\t\tspecialModifiers = !!(\n\t\t\t\t\t\tevent.altKey ||\n\t\t\t\t\t\tevent.ctrlKey ||\n\t\t\t\t\t\tevent.metaKey\n\t\t\t\t\t),\n\t\t\t\t\tisAlnum =\n\t\t\t\t\t\t!MODIFIERS[which] &&\n\t\t\t\t\t\t!SPECIAL_KEYCODES[which] &&\n\t\t\t\t\t\t!specialModifiers,\n\t\t\t\t\t$target = $(event.target),\n\t\t\t\t\thandled = true,\n\t\t\t\t\tactivate = !(event.ctrlKey || !opts.autoActivate);\n\n\t\t\t\t// (node || FT).debug(\"ftnode.nodeKeydown(\" + event.type + \"): ftnode:\" + this + \", charCode:\" + event.charCode + \", keyCode: \" + event.keyCode + \", which: \" + event.which);\n\t\t\t\t// FT.debug( \"eventToString(): \" + FT.eventToString(event) + \", key='\" + key + \"', isAlnum: \" + isAlnum );\n\n\t\t\t\t// Set focus to active (or first node) if no other node has the focus yet\n\t\t\t\tif (!node) {\n\t\t\t\t\tfocusNode = this.getActiveNode() || this.getFirstChild();\n\t\t\t\t\tif (focusNode) {\n\t\t\t\t\t\tfocusNode.setFocus();\n\t\t\t\t\t\tnode = ctx.node = this.focusNode;\n\t\t\t\t\t\tnode.debug(\"Keydown force focus on active node\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\topts.quicksearch &&\n\t\t\t\t\tisAlnum &&\n\t\t\t\t\t!$target.is(\":input:enabled\")\n\t\t\t\t) {\n\t\t\t\t\t// Allow to search for longer streaks if typed in quickly\n\t\t\t\t\tstamp = Date.now();\n\t\t\t\t\tif (stamp - tree.lastQuicksearchTime > 500) {\n\t\t\t\t\t\ttree.lastQuicksearchTerm = \"\";\n\t\t\t\t\t}\n\t\t\t\t\ttree.lastQuicksearchTime = stamp;\n\t\t\t\t\ttree.lastQuicksearchTerm += key;\n\t\t\t\t\t// tree.debug(\"quicksearch find\", tree.lastQuicksearchTerm);\n\t\t\t\t\tmatchNode = tree.findNextNode(\n\t\t\t\t\t\ttree.lastQuicksearchTerm,\n\t\t\t\t\t\ttree.getActiveNode()\n\t\t\t\t\t);\n\t\t\t\t\tif (matchNode) {\n\t\t\t\t\t\tmatchNode.setActive();\n\t\t\t\t\t}\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tswitch (FT.eventToString(event)) {\n\t\t\t\t\tcase \"+\":\n\t\t\t\t\tcase \"=\": // 187: '+' @ Chrome, Safari\n\t\t\t\t\t\ttree.nodeSetExpanded(ctx, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"-\":\n\t\t\t\t\t\ttree.nodeSetExpanded(ctx, false);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"space\":\n\t\t\t\t\t\tif (node.isPagingNode()) {\n\t\t\t\t\t\t\ttree._triggerNodeEvent(\"clickPaging\", ctx, event);\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\tFT.evalOption(\"checkbox\", node, node, opts, false)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t// #768\n\t\t\t\t\t\t\ttree.nodeToggleSelected(ctx);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttree.nodeSetActive(ctx, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"return\":\n\t\t\t\t\t\ttree.nodeSetActive(ctx, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"home\":\n\t\t\t\t\tcase \"end\":\n\t\t\t\t\tcase \"backspace\":\n\t\t\t\t\tcase \"left\":\n\t\t\t\t\tcase \"right\":\n\t\t\t\t\tcase \"up\":\n\t\t\t\t\tcase \"down\":\n\t\t\t\t\t\t_res = node.navigate(event.which, activate);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\thandled = false;\n\t\t\t\t}\n\t\t\t\tif (handled) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// /** Default handling for mouse keypress events. */\n\t\t\t// nodeKeypress: function(ctx) {\n\t\t\t//     var event = ctx.originalEvent;\n\t\t\t// },\n\n\t\t\t// /** Trigger lazyLoad event (async). */\n\t\t\t// nodeLazyLoad: function(ctx) {\n\t\t\t//     var node = ctx.node;\n\t\t\t//     if(this._triggerNodeEvent())\n\t\t\t// },\n\t\t\t/** Load child nodes (async).\n\t\t\t *\n\t\t\t * @param {EventData} ctx\n\t\t\t * @param {object[]|object|string|$.Promise|function} source\n\t\t\t * @returns {$.Promise} The deferred will be resolved as soon as the (ajax)\n\t\t\t *     data was rendered.\n\t\t\t */\n\t\t\tnodeLoadChildren: function(ctx, source) {\n\t\t\t\tvar ajax,\n\t\t\t\t\tdelay,\n\t\t\t\t\tajaxDfd = null,\n\t\t\t\t\tresultDfd,\n\t\t\t\t\tisAsync = true,\n\t\t\t\t\ttree = ctx.tree,\n\t\t\t\t\tnode = ctx.node,\n\t\t\t\t\tnodePrevParent = node.parent,\n\t\t\t\t\ttag = \"nodeLoadChildren\",\n\t\t\t\t\trequestId = Date.now();\n\n\t\t\t\t// `source` is a callback: use the returned result instead:\n\t\t\t\tif ($.isFunction(source)) {\n\t\t\t\t\tsource = source.call(tree, { type: \"source\" }, ctx);\n\t\t\t\t\t_assert(\n\t\t\t\t\t\t!$.isFunction(source),\n\t\t\t\t\t\t\"source callback must not return another function\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// `source` is already a promise:\n\t\t\t\tif ($.isFunction(source.then)) {\n\t\t\t\t\t// _assert($.isFunction(source.always), \"Expected jQuery?\");\n\t\t\t\t\tajaxDfd = source;\n\t\t\t\t} else if (source.url) {\n\t\t\t\t\t// `source` is an Ajax options object\n\t\t\t\t\tajax = $.extend({}, ctx.options.ajax, source);\n\t\t\t\t\tif (ajax.debugDelay) {\n\t\t\t\t\t\t// Simulate a slow server\n\t\t\t\t\t\tdelay = ajax.debugDelay;\n\t\t\t\t\t\tdelete ajax.debugDelay; // remove debug option\n\t\t\t\t\t\tif ($.isArray(delay)) {\n\t\t\t\t\t\t\t// random delay range [min..max]\n\t\t\t\t\t\t\tdelay =\n\t\t\t\t\t\t\t\tdelay[0] +\n\t\t\t\t\t\t\t\tMath.random() * (delay[1] - delay[0]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnode.warn(\n\t\t\t\t\t\t\t\"nodeLoadChildren waiting debugDelay \" +\n\t\t\t\t\t\t\t\tMath.round(delay) +\n\t\t\t\t\t\t\t\t\" ms ...\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\tajaxDfd = $.Deferred(function(ajaxDfd) {\n\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\t$.ajax(ajax)\n\t\t\t\t\t\t\t\t\t.done(function() {\n\t\t\t\t\t\t\t\t\t\tajaxDfd.resolveWith(this, arguments);\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t.fail(function() {\n\t\t\t\t\t\t\t\t\t\tajaxDfd.rejectWith(this, arguments);\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}, delay);\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tajaxDfd = $.ajax(ajax);\n\t\t\t\t\t}\n\t\t\t\t} else if ($.isPlainObject(source) || $.isArray(source)) {\n\t\t\t\t\t// `source` is already a constant dict or list, but we convert\n\t\t\t\t\t// to a thenable for unified processing.\n\t\t\t\t\t// 2020-01-03: refactored.\n\t\t\t\t\t// `ajaxDfd = $.when(source)` would do the trick, but the returned\n\t\t\t\t\t// promise will resolve async, which broke some tests and\n\t\t\t\t\t// would probably also break current implementations out there.\n\t\t\t\t\t// So we mock-up a thenable that resolves synchronously:\n\t\t\t\t\tajaxDfd = {\n\t\t\t\t\t\tthen: function(resolve, reject) {\n\t\t\t\t\t\t\tresolve(source, null, null);\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t\tisAsync = false;\n\t\t\t\t} else {\n\t\t\t\t\t$.error(\"Invalid source type: \" + source);\n\t\t\t\t}\n\n\t\t\t\t// Check for overlapping requests\n\t\t\t\tif (node._requestId) {\n\t\t\t\t\tnode.warn(\n\t\t\t\t\t\t\"Recursive load request #\" +\n\t\t\t\t\t\t\trequestId +\n\t\t\t\t\t\t\t\" while #\" +\n\t\t\t\t\t\t\tnode._requestId +\n\t\t\t\t\t\t\t\" is pending.\"\n\t\t\t\t\t);\n\t\t\t\t\tnode._requestId = requestId;\n\t\t\t\t\t// \tnode.debug(\"Send load request #\" + requestId);\n\t\t\t\t}\n\n\t\t\t\tif (isAsync) {\n\t\t\t\t\ttree.debugTime(tag);\n\t\t\t\t\ttree.nodeSetStatus(ctx, \"loading\");\n\t\t\t\t}\n\n\t\t\t\t// The async Ajax request has now started...\n\t\t\t\t// Defer the deferred:\n\t\t\t\t// we want to be able to reject invalid responses, even if\n\t\t\t\t// the raw HTTP Ajax XHR resolved as Ok.\n\t\t\t\t// We use the ajaxDfd.then() syntax here, which is compatible with\n\t\t\t\t// jQuery and ECMA6.\n\t\t\t\t// However resultDfd is a jQuery deferred, which is currently the\n\t\t\t\t// expected result type of nodeLoadChildren()\n\t\t\t\tresultDfd = new $.Deferred();\n\t\t\t\tajaxDfd.then(\n\t\t\t\t\tfunction(data, textStatus, jqXHR) {\n\t\t\t\t\t\t// ajaxDfd was resolved, but we reject or resolve resultDfd\n\t\t\t\t\t\t// depending on the response data\n\t\t\t\t\t\tvar errorObj, res;\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t(source.dataType === \"json\" ||\n\t\t\t\t\t\t\t\tsource.dataType === \"jsonp\") &&\n\t\t\t\t\t\t\ttypeof data === \"string\"\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t$.error(\n\t\t\t\t\t\t\t\t\"Ajax request returned a string (did you get the JSON dataType wrong?).\"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (node._requestId && node._requestId > requestId) {\n\t\t\t\t\t\t\t// The expected request time stamp is later than `requestId`\n\t\t\t\t\t\t\t// (which was kept as as closure variable to this handler function)\n\t\t\t\t\t\t\t// node.warn(\"Ignored load response for obsolete request #\" + requestId + \" (expected #\" + node._requestId + \")\");\n\t\t\t\t\t\t\tresultDfd.rejectWith(this, [\n\t\t\t\t\t\t\t\tRECURSIVE_REQUEST_ERROR,\n\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t// } else {\n\t\t\t\t\t\t\t// \tnode.debug(\"Response returned for load request #\" + requestId);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (node.parent === null && nodePrevParent !== null) {\n\t\t\t\t\t\t\tresultDfd.rejectWith(this, [\n\t\t\t\t\t\t\t\tINVALID_REQUEST_TARGET_ERROR,\n\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Allow to adjust the received response data in the `postProcess` event.\n\t\t\t\t\t\tif (ctx.options.postProcess) {\n\t\t\t\t\t\t\t// The handler may either\n\t\t\t\t\t\t\t//   - modify `ctx.response` in-place (and leave `ctx.result` undefined)\n\t\t\t\t\t\t\t//     => res = undefined\n\t\t\t\t\t\t\t//   - return a replacement in `ctx.result`\n\t\t\t\t\t\t\t//     => res = <new data>\n\t\t\t\t\t\t\t//   If res contains an `error` property, an error status is displayed\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tres = tree._triggerNodeEvent(\n\t\t\t\t\t\t\t\t\t\"postProcess\",\n\t\t\t\t\t\t\t\t\tctx,\n\t\t\t\t\t\t\t\t\tctx.originalEvent,\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tresponse: data,\n\t\t\t\t\t\t\t\t\t\terror: null,\n\t\t\t\t\t\t\t\t\t\tdataType: source.dataType,\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tif (res.error) {\n\t\t\t\t\t\t\t\t\ttree.warn(\n\t\t\t\t\t\t\t\t\t\t\"postProcess returned error:\",\n\t\t\t\t\t\t\t\t\t\tres\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\tres = {\n\t\t\t\t\t\t\t\t\terror: e,\n\t\t\t\t\t\t\t\t\tmessage: \"\" + e,\n\t\t\t\t\t\t\t\t\tdetails: \"postProcess failed\",\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (res.error) {\n\t\t\t\t\t\t\t\t// Either postProcess failed with an exception, or the returned\n\t\t\t\t\t\t\t\t// result object has an 'error' property attached:\n\t\t\t\t\t\t\t\terrorObj = $.isPlainObject(res.error)\n\t\t\t\t\t\t\t\t\t? res.error\n\t\t\t\t\t\t\t\t\t: { message: res.error };\n\t\t\t\t\t\t\t\terrorObj = tree._makeHookContext(\n\t\t\t\t\t\t\t\t\tnode,\n\t\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\terrorObj\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tresultDfd.rejectWith(this, [errorObj]);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t$.isArray(res) ||\n\t\t\t\t\t\t\t\t($.isPlainObject(res) &&\n\t\t\t\t\t\t\t\t\t$.isArray(res.children))\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t// Use `ctx.result` if valid\n\t\t\t\t\t\t\t\t// (otherwise use existing data, which may have been modified in-place)\n\t\t\t\t\t\t\t\tdata = res;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\tdata &&\n\t\t\t\t\t\t\tdata.hasOwnProperty(\"d\") &&\n\t\t\t\t\t\t\tctx.options.enableAspx\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t// Process ASPX WebMethod JSON object inside \"d\" property\n\t\t\t\t\t\t\t// (only if no postProcess event was defined)\n\t\t\t\t\t\t\tif (ctx.options.enableAspx === 42) {\n\t\t\t\t\t\t\t\ttree.warn(\n\t\t\t\t\t\t\t\t\t\"The default for enableAspx will change to `false` in the fututure. \" +\n\t\t\t\t\t\t\t\t\t\t\"Pass `enableAspx: true` or implement postProcess to silence this warning.\"\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdata =\n\t\t\t\t\t\t\t\ttypeof data.d === \"string\"\n\t\t\t\t\t\t\t\t\t? $.parseJSON(data.d)\n\t\t\t\t\t\t\t\t\t: data.d;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresultDfd.resolveWith(this, [data]);\n\t\t\t\t\t},\n\t\t\t\t\tfunction(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\t\t// ajaxDfd was rejected, so we reject resultDfd as well\n\t\t\t\t\t\tvar errorObj = tree._makeHookContext(node, null, {\n\t\t\t\t\t\t\terror: jqXHR,\n\t\t\t\t\t\t\targs: Array.prototype.slice.call(arguments),\n\t\t\t\t\t\t\tmessage: errorThrown,\n\t\t\t\t\t\t\tdetails: jqXHR.status + \": \" + errorThrown,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tresultDfd.rejectWith(this, [errorObj]);\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// The async Ajax request has now started.\n\t\t\t\t// resultDfd will be resolved/rejected after the response arrived,\n\t\t\t\t// was postProcessed, and checked.\n\t\t\t\t// Now we implement the UI update and add the data to the tree.\n\t\t\t\t// We also return this promise to the caller.\n\t\t\t\tresultDfd\n\t\t\t\t\t.done(function(data) {\n\t\t\t\t\t\ttree.nodeSetStatus(ctx, \"ok\");\n\t\t\t\t\t\tvar children, metaData, noDataRes;\n\n\t\t\t\t\t\tif ($.isPlainObject(data)) {\n\t\t\t\t\t\t\t// We got {foo: 'abc', children: [...]}\n\t\t\t\t\t\t\t// Copy extra properties to tree.data.foo\n\t\t\t\t\t\t\t_assert(\n\t\t\t\t\t\t\t\tnode.isRootNode(),\n\t\t\t\t\t\t\t\t\"source may only be an object for root nodes (expecting an array of child objects otherwise)\"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t_assert(\n\t\t\t\t\t\t\t\t$.isArray(data.children),\n\t\t\t\t\t\t\t\t\"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')\"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tmetaData = data;\n\t\t\t\t\t\t\tchildren = data.children;\n\t\t\t\t\t\t\tdelete metaData.children;\n\t\t\t\t\t\t\t// Copy some attributes to tree.data\n\t\t\t\t\t\t\t$.each(TREE_ATTRS, function(i, attr) {\n\t\t\t\t\t\t\t\tif (metaData[attr] !== undefined) {\n\t\t\t\t\t\t\t\t\ttree[attr] = metaData[attr];\n\t\t\t\t\t\t\t\t\tdelete metaData[attr];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t// Copy all other attributes to tree.data.NAME\n\t\t\t\t\t\t\t$.extend(tree.data, metaData);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchildren = data;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t_assert(\n\t\t\t\t\t\t\t$.isArray(children),\n\t\t\t\t\t\t\t\"expected array of children\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\tnode._setChildren(children);\n\n\t\t\t\t\t\tif (tree.options.nodata && children.length === 0) {\n\t\t\t\t\t\t\tif ($.isFunction(tree.options.nodata)) {\n\t\t\t\t\t\t\t\tnoDataRes = tree.options.nodata.call(\n\t\t\t\t\t\t\t\t\ttree,\n\t\t\t\t\t\t\t\t\t{ type: \"nodata\" },\n\t\t\t\t\t\t\t\t\tctx\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\t\ttree.options.nodata === true &&\n\t\t\t\t\t\t\t\tnode.isRootNode()\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tnoDataRes = tree.options.strings.noData;\n\t\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\t\ttypeof tree.options.nodata === \"string\" &&\n\t\t\t\t\t\t\t\tnode.isRootNode()\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tnoDataRes = tree.options.nodata;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (noDataRes) {\n\t\t\t\t\t\t\t\tnode.setStatus(\"nodata\", noDataRes);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// trigger fancytreeloadchildren\n\t\t\t\t\t\ttree._triggerNodeEvent(\"loadChildren\", node);\n\t\t\t\t\t})\n\t\t\t\t\t.fail(function(error) {\n\t\t\t\t\t\tvar ctxErr;\n\n\t\t\t\t\t\tif (error === RECURSIVE_REQUEST_ERROR) {\n\t\t\t\t\t\t\tnode.warn(\n\t\t\t\t\t\t\t\t\"Ignored response for obsolete load request #\" +\n\t\t\t\t\t\t\t\t\trequestId +\n\t\t\t\t\t\t\t\t\t\" (expected #\" +\n\t\t\t\t\t\t\t\t\tnode._requestId +\n\t\t\t\t\t\t\t\t\t\")\"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t} else if (error === INVALID_REQUEST_TARGET_ERROR) {\n\t\t\t\t\t\t\tnode.warn(\n\t\t\t\t\t\t\t\t\"Lazy parent node was removed while loading: discarding response.\"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t} else if (error.node && error.error && error.message) {\n\t\t\t\t\t\t\t// error is already a context object\n\t\t\t\t\t\t\tctxErr = error;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tctxErr = tree._makeHookContext(node, null, {\n\t\t\t\t\t\t\t\terror: error, // it can be jqXHR or any custom error\n\t\t\t\t\t\t\t\targs: Array.prototype.slice.call(arguments),\n\t\t\t\t\t\t\t\tmessage: error\n\t\t\t\t\t\t\t\t\t? error.message || error.toString()\n\t\t\t\t\t\t\t\t\t: \"\",\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tif (ctxErr.message === \"[object Object]\") {\n\t\t\t\t\t\t\t\tctxErr.message = \"\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnode.warn(\n\t\t\t\t\t\t\t\"Load children failed (\" + ctxErr.message + \")\",\n\t\t\t\t\t\t\tctxErr\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\ttree._triggerNodeEvent(\n\t\t\t\t\t\t\t\t\"loadError\",\n\t\t\t\t\t\t\t\tctxErr,\n\t\t\t\t\t\t\t\tnull\n\t\t\t\t\t\t\t) !== false\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\ttree.nodeSetStatus(\n\t\t\t\t\t\t\t\tctx,\n\t\t\t\t\t\t\t\t\"error\",\n\t\t\t\t\t\t\t\tctxErr.message,\n\t\t\t\t\t\t\t\tctxErr.details\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.always(function() {\n\t\t\t\t\t\tnode._requestId = null;\n\t\t\t\t\t\tif (isAsync) {\n\t\t\t\t\t\t\ttree.debugTimeEnd(tag);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\treturn resultDfd.promise();\n\t\t\t},\n\t\t\t/** [Not Implemented]  */\n\t\t\tnodeLoadKeyPath: function(ctx, keyPathList) {\n\t\t\t\t// TODO: implement and improve\n\t\t\t\t// http://code.google.com/p/dynatree/issues/detail?id=222\n\t\t\t},\n\t\t\t/**\n\t\t\t * Remove a single direct child of ctx.node.\n\t\t\t * @param {EventData} ctx\n\t\t\t * @param {FancytreeNode} childNode dircect child of ctx.node\n\t\t\t */\n\t\t\tnodeRemoveChild: function(ctx, childNode) {\n\t\t\t\tvar idx,\n\t\t\t\t\tnode = ctx.node,\n\t\t\t\t\t// opts = ctx.options,\n\t\t\t\t\tsubCtx = $.extend({}, ctx, { node: childNode }),\n\t\t\t\t\tchildren = node.children;\n\n\t\t\t\t// FT.debug(\"nodeRemoveChild()\", node.toString(), childNode.toString());\n\n\t\t\t\tif (children.length === 1) {\n\t\t\t\t\t_assert(childNode === children[0], \"invalid single child\");\n\t\t\t\t\treturn this.nodeRemoveChildren(ctx);\n\t\t\t\t}\n\t\t\t\tif (\n\t\t\t\t\tthis.activeNode &&\n\t\t\t\t\t(childNode === this.activeNode ||\n\t\t\t\t\t\tthis.activeNode.isDescendantOf(childNode))\n\t\t\t\t) {\n\t\t\t\t\tthis.activeNode.setActive(false); // TODO: don't fire events\n\t\t\t\t}\n\t\t\t\tif (\n\t\t\t\t\tthis.focusNode &&\n\t\t\t\t\t(childNode === this.focusNode ||\n\t\t\t\t\t\tthis.focusNode.isDescendantOf(childNode))\n\t\t\t\t) {\n\t\t\t\t\tthis.focusNode = null;\n\t\t\t\t}\n\t\t\t\t// TODO: persist must take care to clear select and expand cookies\n\t\t\t\tthis.nodeRemoveMarkup(subCtx);\n\t\t\t\tthis.nodeRemoveChildren(subCtx);\n\t\t\t\tidx = $.inArray(childNode, children);\n\t\t\t\t_assert(idx >= 0, \"invalid child\");\n\t\t\t\t// Notify listeners\n\t\t\t\tnode.triggerModifyChild(\"remove\", childNode);\n\t\t\t\t// Unlink to support GC\n\t\t\t\tchildNode.visit(function(n) {\n\t\t\t\t\tn.parent = null;\n\t\t\t\t}, true);\n\t\t\t\tthis._callHook(\"treeRegisterNode\", this, false, childNode);\n\t\t\t\t// remove from child list\n\t\t\t\tchildren.splice(idx, 1);\n\t\t\t},\n\t\t\t/**Remove HTML markup for all descendents of ctx.node.\n\t\t\t * @param {EventData} ctx\n\t\t\t */\n\t\t\tnodeRemoveChildMarkup: function(ctx) {\n\t\t\t\tvar node = ctx.node;\n\n\t\t\t\t// FT.debug(\"nodeRemoveChildMarkup()\", node.toString());\n\t\t\t\t// TODO: Unlink attr.ftnode to support GC\n\t\t\t\tif (node.ul) {\n\t\t\t\t\tif (node.isRootNode()) {\n\t\t\t\t\t\t$(node.ul).empty();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$(node.ul).remove();\n\t\t\t\t\t\tnode.ul = null;\n\t\t\t\t\t}\n\t\t\t\t\tnode.visit(function(n) {\n\t\t\t\t\t\tn.li = n.ul = null;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t\t/**Remove all descendants of ctx.node.\n\t\t\t * @param {EventData} ctx\n\t\t\t */\n\t\t\tnodeRemoveChildren: function(ctx) {\n\t\t\t\tvar //subCtx,\n\t\t\t\t\ttree = ctx.tree,\n\t\t\t\t\tnode = ctx.node,\n\t\t\t\t\tchildren = node.children;\n\t\t\t\t// opts = ctx.options;\n\n\t\t\t\t// FT.debug(\"nodeRemoveChildren()\", node.toString());\n\t\t\t\tif (!children) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (this.activeNode && this.activeNode.isDescendantOf(node)) {\n\t\t\t\t\tthis.activeNode.setActive(false); // TODO: don't fire events\n\t\t\t\t}\n\t\t\t\tif (this.focusNode && this.focusNode.isDescendantOf(node)) {\n\t\t\t\t\tthis.focusNode = null;\n\t\t\t\t}\n\t\t\t\t// TODO: persist must take care to clear select and expand cookies\n\t\t\t\tthis.nodeRemoveChildMarkup(ctx);\n\t\t\t\t// Unlink children to support GC\n\t\t\t\t// TODO: also delete this.children (not possible using visit())\n\t\t\t\t// subCtx = $.extend({}, ctx);\n\t\t\t\tnode.triggerModifyChild(\"remove\", null);\n\t\t\t\tnode.visit(function(n) {\n\t\t\t\t\tn.parent = null;\n\t\t\t\t\ttree._callHook(\"treeRegisterNode\", tree, false, n);\n\t\t\t\t});\n\t\t\t\tif (node.lazy) {\n\t\t\t\t\t// 'undefined' would be interpreted as 'not yet loaded' for lazy nodes\n\t\t\t\t\tnode.children = [];\n\t\t\t\t} else {\n\t\t\t\t\tnode.children = null;\n\t\t\t\t}\n\t\t\t\tif (!node.isRootNode()) {\n\t\t\t\t\tnode.expanded = false; // #449, #459\n\t\t\t\t}\n\t\t\t\tthis.nodeRenderStatus(ctx);\n\t\t\t},\n\t\t\t/**Remove HTML markup for ctx.node and all its descendents.\n\t\t\t * @param {EventData} ctx\n\t\t\t */\n\t\t\tnodeRemoveMarkup: function(ctx) {\n\t\t\t\tvar node = ctx.node;\n\t\t\t\t// FT.debug(\"nodeRemoveMarkup()\", node.toString());\n\t\t\t\t// TODO: Unlink attr.ftnode to support GC\n\t\t\t\tif (node.li) {\n\t\t\t\t\t$(node.li).remove();\n\t\t\t\t\tnode.li = null;\n\t\t\t\t}\n\t\t\t\tthis.nodeRemoveChildMarkup(ctx);\n\t\t\t},\n\t\t\t/**\n\t\t\t * Create `<li><span>..</span> .. </li>` tags for this node.\n\t\t\t *\n\t\t\t * This method takes care that all HTML markup is created that is required\n\t\t\t * to display this node in its current state.\n\t\t\t *\n\t\t\t * Call this method to create new nodes, or after the strucuture\n\t\t\t * was changed (e.g. after moving this node or adding/removing children)\n\t\t\t * nodeRenderTitle() and nodeRenderStatus() are implied.\n\t\t\t *\n\t\t\t * ```html\n\t\t\t * <li id='KEY' ftnode=NODE>\n\t\t\t *     <span class='fancytree-node fancytree-expanded fancytree-has-children fancytree-lastsib fancytree-exp-el fancytree-ico-e'>\n\t\t\t *         <span class=\"fancytree-expander\"></span>\n\t\t\t *         <span class=\"fancytree-checkbox\"></span> // only present in checkbox mode\n\t\t\t *         <span class=\"fancytree-icon\"></span>\n\t\t\t *         <a href=\"#\" class=\"fancytree-title\"> Node 1 </a>\n\t\t\t *     </span>\n\t\t\t *     <ul> // only present if node has children\n\t\t\t *         <li id='KEY' ftnode=NODE> child1 ... </li>\n\t\t\t *         <li id='KEY' ftnode=NODE> child2 ... </li>\n\t\t\t *     </ul>\n\t\t\t * </li>\n\t\t\t * ```\n\t\t\t *\n\t\t\t * @param {EventData} ctx\n\t\t\t * @param {boolean} [force=false] re-render, even if html markup was already created\n\t\t\t * @param {boolean} [deep=false] also render all descendants, even if parent is collapsed\n\t\t\t * @param {boolean} [collapsed=false] force root node to be collapsed, so we can apply animated expand later\n\t\t\t */\n\t\t\tnodeRender: function(ctx, force, deep, collapsed, _recursive) {\n\t\t\t\t/* This method must take care of all cases where the current data mode\n\t\t\t\t * (i.e. node hierarchy) does not match the current markup.\n\t\t\t\t *\n\t\t\t\t * - node was not yet rendered:\n\t\t\t\t *   create markup\n\t\t\t\t * - node was rendered: exit fast\n\t\t\t\t * - children have been added\n\t\t\t\t * - children have been removed\n\t\t\t\t */\n\t\t\t\tvar childLI,\n\t\t\t\t\tchildNode1,\n\t\t\t\t\tchildNode2,\n\t\t\t\t\ti,\n\t\t\t\t\tl,\n\t\t\t\t\tnext,\n\t\t\t\t\tsubCtx,\n\t\t\t\t\tnode = ctx.node,\n\t\t\t\t\ttree = ctx.tree,\n\t\t\t\t\topts = ctx.options,\n\t\t\t\t\taria = opts.aria,\n\t\t\t\t\tfirstTime = false,\n\t\t\t\t\tparent = node.parent,\n\t\t\t\t\tisRootNode = !parent,\n\t\t\t\t\tchildren = node.children,\n\t\t\t\t\tsuccessorLi = null;\n\t\t\t\t// FT.debug(\"nodeRender(\" + !!force + \", \" + !!deep + \")\", node.toString());\n\n\t\t\t\tif (tree._enableUpdate === false) {\n\t\t\t\t\t// tree.debug(\"no render\", tree._enableUpdate);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (!isRootNode && !parent.ul) {\n\t\t\t\t\t// Calling node.collapse on a deep, unrendered node\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t_assert(isRootNode || parent.ul, \"parent UL must exist\");\n\n\t\t\t\t// Render the node\n\t\t\t\tif (!isRootNode) {\n\t\t\t\t\t// Discard markup on force-mode, or if it is not linked to parent <ul>\n\t\t\t\t\tif (\n\t\t\t\t\t\tnode.li &&\n\t\t\t\t\t\t(force || node.li.parentNode !== node.parent.ul)\n\t\t\t\t\t) {\n\t\t\t\t\t\tif (node.li.parentNode === node.parent.ul) {\n\t\t\t\t\t\t\t// #486: store following node, so we can insert the new markup there later\n\t\t\t\t\t\t\tsuccessorLi = node.li.nextSibling;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// May happen, when a top-level node was dropped over another\n\t\t\t\t\t\t\tthis.debug(\n\t\t\t\t\t\t\t\t\"Unlinking \" +\n\t\t\t\t\t\t\t\t\tnode +\n\t\t\t\t\t\t\t\t\t\" (must be child of \" +\n\t\t\t\t\t\t\t\t\tnode.parent +\n\t\t\t\t\t\t\t\t\t\")\"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//\t            this.debug(\"nodeRemoveMarkup...\");\n\t\t\t\t\t\tthis.nodeRemoveMarkup(ctx);\n\t\t\t\t\t}\n\t\t\t\t\t// Create <li><span /> </li>\n\t\t\t\t\t// node.debug(\"render...\");\n\t\t\t\t\tif (node.li) {\n\t\t\t\t\t\t// this.nodeRenderTitle(ctx);\n\t\t\t\t\t\tthis.nodeRenderStatus(ctx);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// node.debug(\"render... really\");\n\t\t\t\t\t\tfirstTime = true;\n\t\t\t\t\t\tnode.li = document.createElement(\"li\");\n\t\t\t\t\t\tnode.li.ftnode = node;\n\n\t\t\t\t\t\tif (node.key && opts.generateIds) {\n\t\t\t\t\t\t\tnode.li.id = opts.idPrefix + node.key;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnode.span = document.createElement(\"span\");\n\t\t\t\t\t\tnode.span.className = \"fancytree-node\";\n\t\t\t\t\t\tif (aria && !node.tr) {\n\t\t\t\t\t\t\t$(node.li).attr(\"role\", \"treeitem\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnode.li.appendChild(node.span);\n\n\t\t\t\t\t\t// Create inner HTML for the <span> (expander, checkbox, icon, and title)\n\t\t\t\t\t\tthis.nodeRenderTitle(ctx);\n\n\t\t\t\t\t\t// Allow tweaking and binding, after node was created for the first time\n\t\t\t\t\t\tif (opts.createNode) {\n\t\t\t\t\t\t\topts.createNode.call(\n\t\t\t\t\t\t\t\ttree,\n\t\t\t\t\t\t\t\t{ type: \"createNode\" },\n\t\t\t\t\t\t\t\tctx\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Allow tweaking after node state was rendered\n\t\t\t\t\tif (opts.renderNode) {\n\t\t\t\t\t\topts.renderNode.call(tree, { type: \"renderNode\" }, ctx);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Visit child nodes\n\t\t\t\tif (children) {\n\t\t\t\t\tif (isRootNode || node.expanded || deep === true) {\n\t\t\t\t\t\t// Create a UL to hold the children\n\t\t\t\t\t\tif (!node.ul) {\n\t\t\t\t\t\t\tnode.ul = document.createElement(\"ul\");\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t(collapsed === true && !_recursive) ||\n\t\t\t\t\t\t\t\t!node.expanded\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t// hide top UL, so we can use an animation to show it later\n\t\t\t\t\t\t\t\tnode.ul.style.display = \"none\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (aria) {\n\t\t\t\t\t\t\t\t$(node.ul).attr(\"role\", \"group\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (node.li) {\n\t\t\t\t\t\t\t\t// issue #67\n\t\t\t\t\t\t\t\tnode.li.appendChild(node.ul);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tnode.tree.$div.append(node.ul);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Add child markup\n\t\t\t\t\t\tfor (i = 0, l = children.length; i < l; i++) {\n\t\t\t\t\t\t\tsubCtx = $.extend({}, ctx, { node: children[i] });\n\t\t\t\t\t\t\tthis.nodeRender(subCtx, force, deep, false, true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Remove <li> if nodes have moved to another parent\n\t\t\t\t\t\tchildLI = node.ul.firstChild;\n\t\t\t\t\t\twhile (childLI) {\n\t\t\t\t\t\t\tchildNode2 = childLI.ftnode;\n\t\t\t\t\t\t\tif (childNode2 && childNode2.parent !== node) {\n\t\t\t\t\t\t\t\tnode.debug(\n\t\t\t\t\t\t\t\t\t\"_fixParent: remove missing \" + childNode2,\n\t\t\t\t\t\t\t\t\tchildLI\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tnext = childLI.nextSibling;\n\t\t\t\t\t\t\t\tchildLI.parentNode.removeChild(childLI);\n\t\t\t\t\t\t\t\tchildLI = next;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tchildLI = childLI.nextSibling;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Make sure, that <li> order matches node.children order.\n\t\t\t\t\t\tchildLI = node.ul.firstChild;\n\t\t\t\t\t\tfor (i = 0, l = children.length - 1; i < l; i++) {\n\t\t\t\t\t\t\tchildNode1 = children[i];\n\t\t\t\t\t\t\tchildNode2 = childLI.ftnode;\n\t\t\t\t\t\t\tif (childNode1 === childNode2) {\n\t\t\t\t\t\t\t\tchildLI = childLI.nextSibling;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// node.debug(\"_fixOrder: mismatch at index \" + i + \": \" + childNode1 + \" != \" + childNode2);\n\t\t\t\t\t\t\t\tnode.ul.insertBefore(\n\t\t\t\t\t\t\t\t\tchildNode1.li,\n\t\t\t\t\t\t\t\t\tchildNode2.li\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// No children: remove markup if any\n\t\t\t\t\tif (node.ul) {\n\t\t\t\t\t\t// alert(\"remove child markup for \" + node);\n\t\t\t\t\t\tthis.warn(\"remove child markup for \" + node);\n\t\t\t\t\t\tthis.nodeRemoveChildMarkup(ctx);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!isRootNode) {\n\t\t\t\t\t// Update element classes according to node state\n\t\t\t\t\t// this.nodeRenderStatus(ctx);\n\t\t\t\t\t// Finally add the whole structure to the DOM, so the browser can render\n\t\t\t\t\tif (firstTime) {\n\t\t\t\t\t\t// #486: successorLi is set, if we re-rendered (i.e. discarded)\n\t\t\t\t\t\t// existing markup, which  we want to insert at the same position.\n\t\t\t\t\t\t// (null is equivalent to append)\n\t\t\t\t\t\t// \t\tparent.ul.appendChild(node.li);\n\t\t\t\t\t\tparent.ul.insertBefore(node.li, successorLi);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t/** Create HTML inside the node's outer `<span>` (i.e. expander, checkbox,\n\t\t\t * icon, and title).\n\t\t\t *\n\t\t\t * nodeRenderStatus() is implied.\n\t\t\t * @param {EventData} ctx\n\t\t\t * @param {string} [title] optinal new title\n\t\t\t */\n\t\t\tnodeRenderTitle: function(ctx, title) {\n\t\t\t\t// set node connector images, links and text\n\t\t\t\tvar checkbox,\n\t\t\t\t\tclassName,\n\t\t\t\t\ticon,\n\t\t\t\t\tnodeTitle,\n\t\t\t\t\trole,\n\t\t\t\t\ttabindex,\n\t\t\t\t\ttooltip,\n\t\t\t\t\ticonTooltip,\n\t\t\t\t\tnode = ctx.node,\n\t\t\t\t\ttree = ctx.tree,\n\t\t\t\t\topts = ctx.options,\n\t\t\t\t\taria = opts.aria,\n\t\t\t\t\tlevel = node.getLevel(),\n\t\t\t\t\tares = [];\n\n\t\t\t\tif (title !== undefined) {\n\t\t\t\t\tnode.title = title;\n\t\t\t\t}\n\t\t\t\tif (!node.span || tree._enableUpdate === false) {\n\t\t\t\t\t// Silently bail out if node was not rendered yet, assuming\n\t\t\t\t\t// node.render() will be called as the node becomes visible\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// Connector (expanded, expandable or simple)\n\t\t\t\trole =\n\t\t\t\t\taria && node.hasChildren() !== false\n\t\t\t\t\t\t? \" role='button'\"\n\t\t\t\t\t\t: \"\";\n\t\t\t\tif (level < opts.minExpandLevel) {\n\t\t\t\t\tif (!node.lazy) {\n\t\t\t\t\t\tnode.expanded = true;\n\t\t\t\t\t}\n\t\t\t\t\tif (level > 1) {\n\t\t\t\t\t\tares.push(\n\t\t\t\t\t\t\t\"<span \" +\n\t\t\t\t\t\t\t\trole +\n\t\t\t\t\t\t\t\t\" class='fancytree-expander fancytree-expander-fixed'></span>\"\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t// .. else (i.e. for root level) skip expander/connector alltogether\n\t\t\t\t} else {\n\t\t\t\t\tares.push(\n\t\t\t\t\t\t\"<span \" + role + \" class='fancytree-expander'></span>\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// Checkbox mode\n\t\t\t\tcheckbox = FT.evalOption(\"checkbox\", node, node, opts, false);\n\n\t\t\t\tif (checkbox && !node.isStatusNode()) {\n\t\t\t\t\trole = aria ? \" role='checkbox'\" : \"\";\n\t\t\t\t\tclassName = \"fancytree-checkbox\";\n\t\t\t\t\tif (\n\t\t\t\t\t\tcheckbox === \"radio\" ||\n\t\t\t\t\t\t(node.parent && node.parent.radiogroup)\n\t\t\t\t\t) {\n\t\t\t\t\t\tclassName += \" fancytree-radio\";\n\t\t\t\t\t}\n\t\t\t\t\tares.push(\n\t\t\t\t\t\t\"<span \" + role + \" class='\" + className + \"'></span>\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// Folder or doctype icon\n\t\t\t\tif (node.data.iconClass !== undefined) {\n\t\t\t\t\t// 2015-11-16\n\t\t\t\t\t// Handle / warn about backward compatibility\n\t\t\t\t\tif (node.icon) {\n\t\t\t\t\t\t$.error(\n\t\t\t\t\t\t\t\"'iconClass' node option is deprecated since v2.14.0: use 'icon' only instead\"\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnode.warn(\n\t\t\t\t\t\t\t\"'iconClass' node option is deprecated since v2.14.0: use 'icon' instead\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\tnode.icon = node.data.iconClass;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If opts.icon is a callback and returns something other than undefined, use that\n\t\t\t\t// else if node.icon is a boolean or string, use that\n\t\t\t\t// else if opts.icon is a boolean or string, use that\n\t\t\t\t// else show standard icon (which may be different for folders or documents)\n\t\t\t\ticon = FT.evalOption(\"icon\", node, node, opts, true);\n\t\t\t\t// if( typeof icon !== \"boolean\" ) {\n\t\t\t\t// \t// icon is defined, but not true/false: must be a string\n\t\t\t\t// \ticon = \"\" + icon;\n\t\t\t\t// }\n\t\t\t\tif (icon !== false) {\n\t\t\t\t\trole = aria ? \" role='presentation'\" : \"\";\n\n\t\t\t\t\ticonTooltip = FT.evalOption(\n\t\t\t\t\t\t\"iconTooltip\",\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\topts,\n\t\t\t\t\t\tnull\n\t\t\t\t\t);\n\t\t\t\t\ticonTooltip = iconTooltip\n\t\t\t\t\t\t? \" title='\" + _escapeTooltip(iconTooltip) + \"'\"\n\t\t\t\t\t\t: \"\";\n\n\t\t\t\t\tif (typeof icon === \"string\") {\n\t\t\t\t\t\tif (TEST_IMG.test(icon)) {\n\t\t\t\t\t\t\t// node.icon is an image url. Prepend imagePath\n\t\t\t\t\t\t\ticon =\n\t\t\t\t\t\t\t\ticon.charAt(0) === \"/\"\n\t\t\t\t\t\t\t\t\t? icon\n\t\t\t\t\t\t\t\t\t: (opts.imagePath || \"\") + icon;\n\t\t\t\t\t\t\tares.push(\n\t\t\t\t\t\t\t\t\"<img src='\" +\n\t\t\t\t\t\t\t\t\ticon +\n\t\t\t\t\t\t\t\t\t\"' class='fancytree-icon'\" +\n\t\t\t\t\t\t\t\t\ticonTooltip +\n\t\t\t\t\t\t\t\t\t\" alt='' />\"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tares.push(\n\t\t\t\t\t\t\t\t\"<span \" +\n\t\t\t\t\t\t\t\t\trole +\n\t\t\t\t\t\t\t\t\t\" class='fancytree-custom-icon \" +\n\t\t\t\t\t\t\t\t\ticon +\n\t\t\t\t\t\t\t\t\t\"'\" +\n\t\t\t\t\t\t\t\t\ticonTooltip +\n\t\t\t\t\t\t\t\t\t\"></span>\"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (icon.text) {\n\t\t\t\t\t\tares.push(\n\t\t\t\t\t\t\t\"<span \" +\n\t\t\t\t\t\t\t\trole +\n\t\t\t\t\t\t\t\t\" class='fancytree-custom-icon \" +\n\t\t\t\t\t\t\t\t(icon.addClass || \"\") +\n\t\t\t\t\t\t\t\t\"'\" +\n\t\t\t\t\t\t\t\ticonTooltip +\n\t\t\t\t\t\t\t\t\">\" +\n\t\t\t\t\t\t\t\tFT.escapeHtml(icon.text) +\n\t\t\t\t\t\t\t\t\"</span>\"\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if (icon.html) {\n\t\t\t\t\t\tares.push(\n\t\t\t\t\t\t\t\"<span \" +\n\t\t\t\t\t\t\t\trole +\n\t\t\t\t\t\t\t\t\" class='fancytree-custom-icon \" +\n\t\t\t\t\t\t\t\t(icon.addClass || \"\") +\n\t\t\t\t\t\t\t\t\"'\" +\n\t\t\t\t\t\t\t\ticonTooltip +\n\t\t\t\t\t\t\t\t\">\" +\n\t\t\t\t\t\t\t\ticon.html +\n\t\t\t\t\t\t\t\t\"</span>\"\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// standard icon: theme css will take care of this\n\t\t\t\t\t\tares.push(\n\t\t\t\t\t\t\t\"<span \" +\n\t\t\t\t\t\t\t\trole +\n\t\t\t\t\t\t\t\t\" class='fancytree-icon'\" +\n\t\t\t\t\t\t\t\ticonTooltip +\n\t\t\t\t\t\t\t\t\"></span>\"\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Node title\n\t\t\t\tnodeTitle = \"\";\n\t\t\t\tif (opts.renderTitle) {\n\t\t\t\t\tnodeTitle =\n\t\t\t\t\t\topts.renderTitle.call(\n\t\t\t\t\t\t\ttree,\n\t\t\t\t\t\t\t{ type: \"renderTitle\" },\n\t\t\t\t\t\t\tctx\n\t\t\t\t\t\t) || \"\";\n\t\t\t\t}\n\t\t\t\tif (!nodeTitle) {\n\t\t\t\t\ttooltip = FT.evalOption(\"tooltip\", node, node, opts, null);\n\t\t\t\t\tif (tooltip === true) {\n\t\t\t\t\t\ttooltip = node.title;\n\t\t\t\t\t}\n\t\t\t\t\t// if( node.tooltip ) {\n\t\t\t\t\t// \ttooltip = node.tooltip;\n\t\t\t\t\t// } else if ( opts.tooltip ) {\n\t\t\t\t\t// \ttooltip = opts.tooltip === true ? node.title : opts.tooltip.call(tree, node);\n\t\t\t\t\t// }\n\t\t\t\t\ttooltip = tooltip\n\t\t\t\t\t\t? \" title='\" + _escapeTooltip(tooltip) + \"'\"\n\t\t\t\t\t\t: \"\";\n\t\t\t\t\ttabindex = opts.titlesTabbable ? \" tabindex='0'\" : \"\";\n\n\t\t\t\t\tnodeTitle =\n\t\t\t\t\t\t\"<span class='fancytree-title'\" +\n\t\t\t\t\t\ttooltip +\n\t\t\t\t\t\ttabindex +\n\t\t\t\t\t\t\">\" +\n\t\t\t\t\t\t(opts.escapeTitles\n\t\t\t\t\t\t\t? FT.escapeHtml(node.title)\n\t\t\t\t\t\t\t: node.title) +\n\t\t\t\t\t\t\"</span>\";\n\t\t\t\t}\n\t\t\t\tares.push(nodeTitle);\n\t\t\t\t// Note: this will trigger focusout, if node had the focus\n\t\t\t\t//$(node.span).html(ares.join(\"\")); // it will cleanup the jQuery data currently associated with SPAN (if any), but it executes more slowly\n\t\t\t\tnode.span.innerHTML = ares.join(\"\");\n\t\t\t\t// Update CSS classes\n\t\t\t\tthis.nodeRenderStatus(ctx);\n\t\t\t\tif (opts.enhanceTitle) {\n\t\t\t\t\tctx.$title = $(\">span.fancytree-title\", node.span);\n\t\t\t\t\tnodeTitle =\n\t\t\t\t\t\topts.enhanceTitle.call(\n\t\t\t\t\t\t\ttree,\n\t\t\t\t\t\t\t{ type: \"enhanceTitle\" },\n\t\t\t\t\t\t\tctx\n\t\t\t\t\t\t) || \"\";\n\t\t\t\t}\n\t\t\t},\n\t\t\t/** Update element classes according to node state.\n\t\t\t * @param {EventData} ctx\n\t\t\t */\n\t\t\tnodeRenderStatus: function(ctx) {\n\t\t\t\t// Set classes for current status\n\t\t\t\tvar $ariaElem,\n\t\t\t\t\tnode = ctx.node,\n\t\t\t\t\ttree = ctx.tree,\n\t\t\t\t\topts = ctx.options,\n\t\t\t\t\t// \tnodeContainer = node[tree.nodeContainerAttrName],\n\t\t\t\t\thasChildren = node.hasChildren(),\n\t\t\t\t\tisLastSib = node.isLastSibling(),\n\t\t\t\t\taria = opts.aria,\n\t\t\t\t\tcn = opts._classNames,\n\t\t\t\t\tcnList = [],\n\t\t\t\t\tstatusElem = node[tree.statusClassPropName];\n\n\t\t\t\tif (!statusElem || tree._enableUpdate === false) {\n\t\t\t\t\t// if this function is called for an unrendered node, ignore it (will be updated on nect render anyway)\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (aria) {\n\t\t\t\t\t$ariaElem = $(node.tr || node.li);\n\t\t\t\t}\n\t\t\t\t// Build a list of class names that we will add to the node <span>\n\t\t\t\tcnList.push(cn.node);\n\t\t\t\tif (tree.activeNode === node) {\n\t\t\t\t\tcnList.push(cn.active);\n\t\t\t\t\t// \t\t$(\">span.fancytree-title\", statusElem).attr(\"tabindex\", \"0\");\n\t\t\t\t\t// \t\ttree.$container.removeAttr(\"tabindex\");\n\t\t\t\t\t// }else{\n\t\t\t\t\t// \t\t$(\">span.fancytree-title\", statusElem).removeAttr(\"tabindex\");\n\t\t\t\t\t// \t\ttree.$container.attr(\"tabindex\", \"0\");\n\t\t\t\t}\n\t\t\t\tif (tree.focusNode === node) {\n\t\t\t\t\tcnList.push(cn.focused);\n\t\t\t\t}\n\t\t\t\tif (node.expanded) {\n\t\t\t\t\tcnList.push(cn.expanded);\n\t\t\t\t}\n\t\t\t\tif (aria) {\n\t\t\t\t\tif (hasChildren === false) {\n\t\t\t\t\t\t$ariaElem.removeAttr(\"aria-expanded\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$ariaElem.attr(\"aria-expanded\", Boolean(node.expanded));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (node.folder) {\n\t\t\t\t\tcnList.push(cn.folder);\n\t\t\t\t}\n\t\t\t\tif (hasChildren !== false) {\n\t\t\t\t\tcnList.push(cn.hasChildren);\n\t\t\t\t}\n\t\t\t\t// TODO: required?\n\t\t\t\tif (isLastSib) {\n\t\t\t\t\tcnList.push(cn.lastsib);\n\t\t\t\t}\n\t\t\t\tif (node.lazy && node.children == null) {\n\t\t\t\t\tcnList.push(cn.lazy);\n\t\t\t\t}\n\t\t\t\tif (node.partload) {\n\t\t\t\t\tcnList.push(cn.partload);\n\t\t\t\t}\n\t\t\t\tif (node.partsel) {\n\t\t\t\t\tcnList.push(cn.partsel);\n\t\t\t\t}\n\t\t\t\tif (FT.evalOption(\"unselectable\", node, node, opts, false)) {\n\t\t\t\t\tcnList.push(cn.unselectable);\n\t\t\t\t}\n\t\t\t\tif (node._isLoading) {\n\t\t\t\t\tcnList.push(cn.loading);\n\t\t\t\t}\n\t\t\t\tif (node._error) {\n\t\t\t\t\tcnList.push(cn.error);\n\t\t\t\t}\n\t\t\t\tif (node.statusNodeType) {\n\t\t\t\t\tcnList.push(cn.statusNodePrefix + node.statusNodeType);\n\t\t\t\t}\n\t\t\t\tif (node.selected) {\n\t\t\t\t\tcnList.push(cn.selected);\n\t\t\t\t\tif (aria) {\n\t\t\t\t\t\t$ariaElem.attr(\"aria-selected\", true);\n\t\t\t\t\t}\n\t\t\t\t} else if (aria) {\n\t\t\t\t\t$ariaElem.attr(\"aria-selected\", false);\n\t\t\t\t}\n\t\t\t\tif (node.extraClasses) {\n\t\t\t\t\tcnList.push(node.extraClasses);\n\t\t\t\t}\n\t\t\t\t// IE6 doesn't correctly evaluate multiple class names,\n\t\t\t\t// so we create combined class names that can be used in the CSS\n\t\t\t\tif (hasChildren === false) {\n\t\t\t\t\tcnList.push(\n\t\t\t\t\t\tcn.combinedExpanderPrefix + \"n\" + (isLastSib ? \"l\" : \"\")\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tcnList.push(\n\t\t\t\t\t\tcn.combinedExpanderPrefix +\n\t\t\t\t\t\t\t(node.expanded ? \"e\" : \"c\") +\n\t\t\t\t\t\t\t(node.lazy && node.children == null ? \"d\" : \"\") +\n\t\t\t\t\t\t\t(isLastSib ? \"l\" : \"\")\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tcnList.push(\n\t\t\t\t\tcn.combinedIconPrefix +\n\t\t\t\t\t\t(node.expanded ? \"e\" : \"c\") +\n\t\t\t\t\t\t(node.folder ? \"f\" : \"\")\n\t\t\t\t);\n\t\t\t\t// node.span.className = cnList.join(\" \");\n\t\t\t\tstatusElem.className = cnList.join(\" \");\n\n\t\t\t\t// TODO: we should not set this in the <span> tag also, if we set it here:\n\t\t\t\t// Maybe most (all) of the classes should be set in LI instead of SPAN?\n\t\t\t\tif (node.li) {\n\t\t\t\t\t// #719: we have to consider that there may be already other classes:\n\t\t\t\t\t$(node.li).toggleClass(cn.lastsib, isLastSib);\n\t\t\t\t}\n\t\t\t},\n\t\t\t/** Activate node.\n\t\t\t * flag defaults to true.\n\t\t\t * If flag is true, the node is activated (must be a synchronous operation)\n\t\t\t * If flag is false, the node is deactivated (must be a synchronous operation)\n\t\t\t * @param {EventData} ctx\n\t\t\t * @param {boolean} [flag=true]\n\t\t\t * @param {object} [opts] additional options. Defaults to {noEvents: false, noFocus: false}\n\t\t\t * @returns {$.Promise}\n\t\t\t */\n\t\t\tnodeSetActive: function(ctx, flag, callOpts) {\n\t\t\t\t// Handle user click / [space] / [enter], according to clickFolderMode.\n\t\t\t\tcallOpts = callOpts || {};\n\t\t\t\tvar subCtx,\n\t\t\t\t\tnode = ctx.node,\n\t\t\t\t\ttree = ctx.tree,\n\t\t\t\t\topts = ctx.options,\n\t\t\t\t\tnoEvents = callOpts.noEvents === true,\n\t\t\t\t\tnoFocus = callOpts.noFocus === true,\n\t\t\t\t\tscroll = callOpts.scrollIntoView !== false,\n\t\t\t\t\tisActive = node === tree.activeNode;\n\n\t\t\t\t// flag defaults to true\n\t\t\t\tflag = flag !== false;\n\t\t\t\t// node.debug(\"nodeSetActive\", flag);\n\n\t\t\t\tif (isActive === flag) {\n\t\t\t\t\t// Nothing to do\n\t\t\t\t\treturn _getResolvedPromise(node);\n\t\t\t\t} else if (\n\t\t\t\t\tflag &&\n\t\t\t\t\t!noEvents &&\n\t\t\t\t\tthis._triggerNodeEvent(\n\t\t\t\t\t\t\"beforeActivate\",\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\tctx.originalEvent\n\t\t\t\t\t) === false\n\t\t\t\t) {\n\t\t\t\t\t// Callback returned false\n\t\t\t\t\treturn _getRejectedPromise(node, [\"rejected\"]);\n\t\t\t\t}\n\t\t\t\tif (flag) {\n\t\t\t\t\tif (tree.activeNode) {\n\t\t\t\t\t\t_assert(\n\t\t\t\t\t\t\ttree.activeNode !== node,\n\t\t\t\t\t\t\t\"node was active (inconsistency)\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\tsubCtx = $.extend({}, ctx, { node: tree.activeNode });\n\t\t\t\t\t\ttree.nodeSetActive(subCtx, false);\n\t\t\t\t\t\t_assert(\n\t\t\t\t\t\t\ttree.activeNode === null,\n\t\t\t\t\t\t\t\"deactivate was out of sync?\"\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (opts.activeVisible) {\n\t\t\t\t\t\t// If no focus is set (noFocus: true) and there is no focused node, this node is made visible.\n\t\t\t\t\t\t// scroll = noFocus && tree.focusNode == null;\n\t\t\t\t\t\t// #863: scroll by default (unless `scrollIntoView: false` was passed)\n\t\t\t\t\t\tnode.makeVisible({ scrollIntoView: scroll });\n\t\t\t\t\t}\n\t\t\t\t\ttree.activeNode = node;\n\t\t\t\t\ttree.nodeRenderStatus(ctx);\n\t\t\t\t\tif (!noFocus) {\n\t\t\t\t\t\ttree.nodeSetFocus(ctx);\n\t\t\t\t\t}\n\t\t\t\t\tif (!noEvents) {\n\t\t\t\t\t\ttree._triggerNodeEvent(\n\t\t\t\t\t\t\t\"activate\",\n\t\t\t\t\t\t\tnode,\n\t\t\t\t\t\t\tctx.originalEvent\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t_assert(\n\t\t\t\t\t\ttree.activeNode === node,\n\t\t\t\t\t\t\"node was not active (inconsistency)\"\n\t\t\t\t\t);\n\t\t\t\t\ttree.activeNode = null;\n\t\t\t\t\tthis.nodeRenderStatus(ctx);\n\t\t\t\t\tif (!noEvents) {\n\t\t\t\t\t\tctx.tree._triggerNodeEvent(\n\t\t\t\t\t\t\t\"deactivate\",\n\t\t\t\t\t\t\tnode,\n\t\t\t\t\t\t\tctx.originalEvent\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn _getResolvedPromise(node);\n\t\t\t},\n\t\t\t/** Expand or collapse node, return Deferred.promise.\n\t\t\t *\n\t\t\t * @param {EventData} ctx\n\t\t\t * @param {boolean} [flag=true]\n\t\t\t * @param {object} [opts] additional options. Defaults to `{noAnimation: false, noEvents: false}`\n\t\t\t * @returns {$.Promise} The deferred will be resolved as soon as the (lazy)\n\t\t\t *     data was retrieved, rendered, and the expand animation finished.\n\t\t\t */\n\t\t\tnodeSetExpanded: function(ctx, flag, callOpts) {\n\t\t\t\tcallOpts = callOpts || {};\n\t\t\t\tvar _afterLoad,\n\t\t\t\t\tdfd,\n\t\t\t\t\ti,\n\t\t\t\t\tl,\n\t\t\t\t\tparents,\n\t\t\t\t\tprevAC,\n\t\t\t\t\tnode = ctx.node,\n\t\t\t\t\ttree = ctx.tree,\n\t\t\t\t\topts = ctx.options,\n\t\t\t\t\tnoAnimation = callOpts.noAnimation === true,\n\t\t\t\t\tnoEvents = callOpts.noEvents === true;\n\n\t\t\t\t// flag defaults to true\n\t\t\t\tflag = flag !== false;\n\n\t\t\t\t// node.debug(\"nodeSetExpanded(\" + flag + \")\");\n\n\t\t\t\tif ((node.expanded && flag) || (!node.expanded && !flag)) {\n\t\t\t\t\t// Nothing to do\n\t\t\t\t\t// node.debug(\"nodeSetExpanded(\" + flag + \"): nothing to do\");\n\t\t\t\t\treturn _getResolvedPromise(node);\n\t\t\t\t} else if (flag && !node.lazy && !node.hasChildren()) {\n\t\t\t\t\t// Prevent expanding of empty nodes\n\t\t\t\t\t// return _getRejectedPromise(node, [\"empty\"]);\n\t\t\t\t\treturn _getResolvedPromise(node);\n\t\t\t\t} else if (!flag && node.getLevel() < opts.minExpandLevel) {\n\t\t\t\t\t// Prevent collapsing locked levels\n\t\t\t\t\treturn _getRejectedPromise(node, [\"locked\"]);\n\t\t\t\t} else if (\n\t\t\t\t\t!noEvents &&\n\t\t\t\t\tthis._triggerNodeEvent(\n\t\t\t\t\t\t\"beforeExpand\",\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\tctx.originalEvent\n\t\t\t\t\t) === false\n\t\t\t\t) {\n\t\t\t\t\t// Callback returned false\n\t\t\t\t\treturn _getRejectedPromise(node, [\"rejected\"]);\n\t\t\t\t}\n\t\t\t\t// If this node inside a collpased node, no animation and scrolling is needed\n\t\t\t\tif (!noAnimation && !node.isVisible()) {\n\t\t\t\t\tnoAnimation = callOpts.noAnimation = true;\n\t\t\t\t}\n\n\t\t\t\tdfd = new $.Deferred();\n\n\t\t\t\t// Auto-collapse mode: collapse all siblings\n\t\t\t\tif (flag && !node.expanded && opts.autoCollapse) {\n\t\t\t\t\tparents = node.getParentList(false, true);\n\t\t\t\t\tprevAC = opts.autoCollapse;\n\t\t\t\t\ttry {\n\t\t\t\t\t\topts.autoCollapse = false;\n\t\t\t\t\t\tfor (i = 0, l = parents.length; i < l; i++) {\n\t\t\t\t\t\t\t// TODO: should return promise?\n\t\t\t\t\t\t\tthis._callHook(\n\t\t\t\t\t\t\t\t\"nodeCollapseSiblings\",\n\t\t\t\t\t\t\t\tparents[i],\n\t\t\t\t\t\t\t\tcallOpts\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} finally {\n\t\t\t\t\t\topts.autoCollapse = prevAC;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Trigger expand/collapse after expanding\n\t\t\t\tdfd.done(function() {\n\t\t\t\t\tvar lastChild = node.getLastChild();\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tflag &&\n\t\t\t\t\t\topts.autoScroll &&\n\t\t\t\t\t\t!noAnimation &&\n\t\t\t\t\t\tlastChild &&\n\t\t\t\t\t\ttree._enableUpdate\n\t\t\t\t\t) {\n\t\t\t\t\t\t// Scroll down to last child, but keep current node visible\n\t\t\t\t\t\tlastChild\n\t\t\t\t\t\t\t.scrollIntoView(true, { topNode: node })\n\t\t\t\t\t\t\t.always(function() {\n\t\t\t\t\t\t\t\tif (!noEvents) {\n\t\t\t\t\t\t\t\t\tctx.tree._triggerNodeEvent(\n\t\t\t\t\t\t\t\t\t\tflag ? \"expand\" : \"collapse\",\n\t\t\t\t\t\t\t\t\t\tctx\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!noEvents) {\n\t\t\t\t\t\t\tctx.tree._triggerNodeEvent(\n\t\t\t\t\t\t\t\tflag ? \"expand\" : \"collapse\",\n\t\t\t\t\t\t\t\tctx\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// vvv Code below is executed after loading finished:\n\t\t\t\t_afterLoad = function(callback) {\n\t\t\t\t\tvar cn = opts._classNames,\n\t\t\t\t\t\tisVisible,\n\t\t\t\t\t\tisExpanded,\n\t\t\t\t\t\teffect = opts.toggleEffect;\n\n\t\t\t\t\tnode.expanded = flag;\n\t\t\t\t\ttree._callHook(\n\t\t\t\t\t\t\"treeStructureChanged\",\n\t\t\t\t\t\tctx,\n\t\t\t\t\t\tflag ? \"expand\" : \"collapse\"\n\t\t\t\t\t);\n\t\t\t\t\t// Create required markup, but make sure the top UL is hidden, so we\n\t\t\t\t\t// can animate later\n\t\t\t\t\ttree._callHook(\"nodeRender\", ctx, false, false, true);\n\n\t\t\t\t\t// Hide children, if node is collapsed\n\t\t\t\t\tif (node.ul) {\n\t\t\t\t\t\tisVisible = node.ul.style.display !== \"none\";\n\t\t\t\t\t\tisExpanded = !!node.expanded;\n\t\t\t\t\t\tif (isVisible === isExpanded) {\n\t\t\t\t\t\t\tnode.warn(\n\t\t\t\t\t\t\t\t\"nodeSetExpanded: UL.style.display already set\"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else if (!effect || noAnimation) {\n\t\t\t\t\t\t\tnode.ul.style.display =\n\t\t\t\t\t\t\t\tnode.expanded || !parent ? \"\" : \"none\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// The UI toggle() effect works with the ext-wide extension,\n\t\t\t\t\t\t\t// while jQuery.animate() has problems when the title span\n\t\t\t\t\t\t\t// has position: absolute.\n\t\t\t\t\t\t\t// Since jQuery UI 1.12, the blind effect requires the parent\n\t\t\t\t\t\t\t// element to have 'position: relative'.\n\t\t\t\t\t\t\t// See #716, #717\n\t\t\t\t\t\t\t$(node.li).addClass(cn.animating); // #717\n\n\t\t\t\t\t\t\tif ($.isFunction($(node.ul)[effect.effect])) {\n\t\t\t\t\t\t\t\t// tree.debug( \"use jquery.\" + effect.effect + \" method\" );\n\t\t\t\t\t\t\t\t$(node.ul)[effect.effect]({\n\t\t\t\t\t\t\t\t\tduration: effect.duration,\n\t\t\t\t\t\t\t\t\talways: function() {\n\t\t\t\t\t\t\t\t\t\t// node.debug(\"fancytree-animating end: \" + node.li.className);\n\t\t\t\t\t\t\t\t\t\t$(this).removeClass(cn.animating); // #716\n\t\t\t\t\t\t\t\t\t\t$(node.li).removeClass(cn.animating); // #717\n\t\t\t\t\t\t\t\t\t\tcallback();\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// The UI toggle() effect works with the ext-wide extension,\n\t\t\t\t\t\t\t\t// while jQuery.animate() has problems when the title span\n\t\t\t\t\t\t\t\t// has positon: absolute.\n\t\t\t\t\t\t\t\t// Since jQuery UI 1.12, the blind effect requires the parent\n\t\t\t\t\t\t\t\t// element to have 'position: relative'.\n\t\t\t\t\t\t\t\t// See #716, #717\n\t\t\t\t\t\t\t\t// tree.debug(\"use specified effect (\" + effect.effect + \") with the jqueryui.toggle method\");\n\n\t\t\t\t\t\t\t\t// try to stop an animation that might be already in progress\n\t\t\t\t\t\t\t\t$(node.ul).stop(true, true); //< does not work after resetLazy has been called for a node whose animation wasn't complete and effect was \"blind\"\n\n\t\t\t\t\t\t\t\t// dirty fix to remove a defunct animation (effect: \"blind\") after resetLazy has been called\n\t\t\t\t\t\t\t\t$(node.ul)\n\t\t\t\t\t\t\t\t\t.parent()\n\t\t\t\t\t\t\t\t\t.find(\".ui-effects-placeholder\")\n\t\t\t\t\t\t\t\t\t.remove();\n\n\t\t\t\t\t\t\t\t$(node.ul).toggle(\n\t\t\t\t\t\t\t\t\teffect.effect,\n\t\t\t\t\t\t\t\t\teffect.options,\n\t\t\t\t\t\t\t\t\teffect.duration,\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\t// node.debug(\"fancytree-animating end: \" + node.li.className);\n\t\t\t\t\t\t\t\t\t\t$(this).removeClass(cn.animating); // #716\n\t\t\t\t\t\t\t\t\t\t$(node.li).removeClass(cn.animating); // #717\n\t\t\t\t\t\t\t\t\t\tcallback();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcallback();\n\t\t\t\t};\n\t\t\t\t// ^^^ Code above is executed after loading finshed.\n\n\t\t\t\t// Load lazy nodes, if any. Then continue with _afterLoad()\n\t\t\t\tif (flag && node.lazy && node.hasChildren() === undefined) {\n\t\t\t\t\t// node.debug(\"nodeSetExpanded: load start...\");\n\t\t\t\t\tnode.load()\n\t\t\t\t\t\t.done(function() {\n\t\t\t\t\t\t\t// node.debug(\"nodeSetExpanded: load done\");\n\t\t\t\t\t\t\tif (dfd.notifyWith) {\n\t\t\t\t\t\t\t\t// requires jQuery 1.6+\n\t\t\t\t\t\t\t\tdfd.notifyWith(node, [\"loaded\"]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_afterLoad(function() {\n\t\t\t\t\t\t\t\tdfd.resolveWith(node);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.fail(function(errMsg) {\n\t\t\t\t\t\t\t_afterLoad(function() {\n\t\t\t\t\t\t\t\tdfd.rejectWith(node, [\n\t\t\t\t\t\t\t\t\t\"load failed (\" + errMsg + \")\",\n\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t/*\n\t\t\t\t\tvar source = tree._triggerNodeEvent(\"lazyLoad\", node, ctx.originalEvent);\n\t\t\t\t\t_assert(typeof source !== \"boolean\", \"lazyLoad event must return source in data.result\");\n\t\t\t\t\tnode.debug(\"nodeSetExpanded: load start...\");\n\t\t\t\t\tthis._callHook(\"nodeLoadChildren\", ctx, source).done(function(){\n\t\t\t\t\t\tnode.debug(\"nodeSetExpanded: load done\");\n\t\t\t\t\t\tif(dfd.notifyWith){ // requires jQuery 1.6+\n\t\t\t\t\t\t\tdfd.notifyWith(node, [\"loaded\"]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t_afterLoad.call(tree);\n\t\t\t\t\t}).fail(function(errMsg){\n\t\t\t\t\t\tdfd.rejectWith(node, [\"load failed (\" + errMsg + \")\"]);\n\t\t\t\t\t});\n\t\t\t\t\t*/\n\t\t\t\t} else {\n\t\t\t\t\t_afterLoad(function() {\n\t\t\t\t\t\tdfd.resolveWith(node);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t// node.debug(\"nodeSetExpanded: returns\");\n\t\t\t\treturn dfd.promise();\n\t\t\t},\n\t\t\t/** Focus or blur this node.\n\t\t\t * @param {EventData} ctx\n\t\t\t * @param {boolean} [flag=true]\n\t\t\t */\n\t\t\tnodeSetFocus: function(ctx, flag) {\n\t\t\t\t// ctx.node.debug(\"nodeSetFocus(\" + flag + \")\");\n\t\t\t\tvar ctx2,\n\t\t\t\t\ttree = ctx.tree,\n\t\t\t\t\tnode = ctx.node,\n\t\t\t\t\topts = tree.options,\n\t\t\t\t\t// et = ctx.originalEvent && ctx.originalEvent.type,\n\t\t\t\t\tisInput = ctx.originalEvent\n\t\t\t\t\t\t? $(ctx.originalEvent.target).is(\":input\")\n\t\t\t\t\t\t: false;\n\n\t\t\t\tflag = flag !== false;\n\n\t\t\t\t// (node || tree).debug(\"nodeSetFocus(\" + flag + \"), event: \" + et + \", isInput: \"+ isInput);\n\t\t\t\t// Blur previous node if any\n\t\t\t\tif (tree.focusNode) {\n\t\t\t\t\tif (tree.focusNode === node && flag) {\n\t\t\t\t\t\t// node.debug(\"nodeSetFocus(\" + flag + \"): nothing to do\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tctx2 = $.extend({}, ctx, { node: tree.focusNode });\n\t\t\t\t\ttree.focusNode = null;\n\t\t\t\t\tthis._triggerNodeEvent(\"blur\", ctx2);\n\t\t\t\t\tthis._callHook(\"nodeRenderStatus\", ctx2);\n\t\t\t\t}\n\t\t\t\t// Set focus to container and node\n\t\t\t\tif (flag) {\n\t\t\t\t\tif (!this.hasFocus()) {\n\t\t\t\t\t\tnode.debug(\"nodeSetFocus: forcing container focus\");\n\t\t\t\t\t\tthis._callHook(\"treeSetFocus\", ctx, true, {\n\t\t\t\t\t\t\tcalledByNode: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tnode.makeVisible({ scrollIntoView: false });\n\t\t\t\t\ttree.focusNode = node;\n\t\t\t\t\tif (opts.titlesTabbable) {\n\t\t\t\t\t\tif (!isInput) {\n\t\t\t\t\t\t\t// #621\n\t\t\t\t\t\t\t$(node.span)\n\t\t\t\t\t\t\t\t.find(\".fancytree-title\")\n\t\t\t\t\t\t\t\t.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (opts.aria) {\n\t\t\t\t\t\t// Set active descendant to node's span ID (create one, if needed)\n\t\t\t\t\t\t$(tree.$container).attr(\n\t\t\t\t\t\t\t\"aria-activedescendant\",\n\t\t\t\t\t\t\t$(node.tr || node.li)\n\t\t\t\t\t\t\t\t.uniqueId()\n\t\t\t\t\t\t\t\t.attr(\"id\")\n\t\t\t\t\t\t);\n\t\t\t\t\t\t// \"ftal_\" + opts.idPrefix + node.key);\n\t\t\t\t\t}\n\t\t\t\t\t// $(node.span).find(\".fancytree-title\").focus();\n\t\t\t\t\tthis._triggerNodeEvent(\"focus\", ctx);\n\n\t\t\t\t\t// determine if we have focus on or inside tree container\n\t\t\t\t\tvar hasFancytreeFocus =\n\t\t\t\t\t\tdocument.activeElement === tree.$container.get(0) ||\n\t\t\t\t\t\t$(document.activeElement, tree.$container).length >= 1;\n\n\t\t\t\t\tif (!hasFancytreeFocus) {\n\t\t\t\t\t\t// We cannot set KB focus to a node, so use the tree container\n\t\t\t\t\t\t// #563, #570: IE scrolls on every call to .focus(), if the container\n\t\t\t\t\t\t// is partially outside the viewport. So do it only, when absolutely\n\t\t\t\t\t\t// necessary.\n\t\t\t\t\t\t$(tree.$container).focus();\n\t\t\t\t\t}\n\n\t\t\t\t\t// if( opts.autoActivate ){\n\t\t\t\t\t// \ttree.nodeSetActive(ctx, true);\n\t\t\t\t\t// }\n\t\t\t\t\tif (opts.autoScroll) {\n\t\t\t\t\t\tnode.scrollIntoView();\n\t\t\t\t\t}\n\t\t\t\t\tthis._callHook(\"nodeRenderStatus\", ctx);\n\t\t\t\t}\n\t\t\t},\n\t\t\t/** (De)Select node, return new status (sync).\n\t\t\t *\n\t\t\t * @param {EventData} ctx\n\t\t\t * @param {boolean} [flag=true]\n\t\t\t * @param {object} [opts] additional options. Defaults to {noEvents: false,\n\t\t\t *     propagateDown: null, propagateUp: null,\n\t\t\t *     callback: null,\n\t\t\t *     }\n\t\t\t * @returns {boolean} previous status\n\t\t\t */\n\t\t\tnodeSetSelected: function(ctx, flag, callOpts) {\n\t\t\t\tcallOpts = callOpts || {};\n\t\t\t\tvar node = ctx.node,\n\t\t\t\t\ttree = ctx.tree,\n\t\t\t\t\topts = ctx.options,\n\t\t\t\t\tnoEvents = callOpts.noEvents === true,\n\t\t\t\t\tparent = node.parent;\n\n\t\t\t\t// flag defaults to true\n\t\t\t\tflag = flag !== false;\n\n\t\t\t\t// node.debug(\"nodeSetSelected(\" + flag + \")\", ctx);\n\n\t\t\t\t// Cannot (de)select unselectable nodes directly (only by propagation or\n\t\t\t\t// by setting the `.selected` property)\n\t\t\t\tif (FT.evalOption(\"unselectable\", node, node, opts, false)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Remember the user's intent, in case down -> up propagation prevents\n\t\t\t\t// applying it to node.selected\n\t\t\t\tnode._lastSelectIntent = flag; // Confusing use of '!'\n\n\t\t\t\t// Nothing to do?\n\t\t\t\tif (!!node.selected === flag) {\n\t\t\t\t\tif (opts.selectMode === 3 && node.partsel && !flag) {\n\t\t\t\t\t\t// If propagation prevented selecting this node last time, we still\n\t\t\t\t\t\t// want to allow to apply setSelected(false) now\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn flag;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t!noEvents &&\n\t\t\t\t\tthis._triggerNodeEvent(\n\t\t\t\t\t\t\"beforeSelect\",\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\tctx.originalEvent\n\t\t\t\t\t) === false\n\t\t\t\t) {\n\t\t\t\t\treturn !!node.selected;\n\t\t\t\t}\n\t\t\t\tif (flag && opts.selectMode === 1) {\n\t\t\t\t\t// single selection mode (we don't uncheck all tree nodes, for performance reasons)\n\t\t\t\t\tif (tree.lastSelectedNode) {\n\t\t\t\t\t\ttree.lastSelectedNode.setSelected(false);\n\t\t\t\t\t}\n\t\t\t\t\tnode.selected = flag;\n\t\t\t\t} else if (\n\t\t\t\t\topts.selectMode === 3 &&\n\t\t\t\t\tparent &&\n\t\t\t\t\t!parent.radiogroup &&\n\t\t\t\t\t!node.radiogroup\n\t\t\t\t) {\n\t\t\t\t\t// multi-hierarchical selection mode\n\t\t\t\t\tnode.selected = flag;\n\t\t\t\t\tnode.fixSelection3AfterClick(callOpts);\n\t\t\t\t} else if (parent && parent.radiogroup) {\n\t\t\t\t\tnode.visitSiblings(function(n) {\n\t\t\t\t\t\tn._changeSelectStatusAttrs(flag && n === node);\n\t\t\t\t\t}, true);\n\t\t\t\t} else {\n\t\t\t\t\t// default: selectMode: 2, multi selection mode\n\t\t\t\t\tnode.selected = flag;\n\t\t\t\t}\n\t\t\t\tthis.nodeRenderStatus(ctx);\n\t\t\t\ttree.lastSelectedNode = flag ? node : null;\n\t\t\t\tif (!noEvents) {\n\t\t\t\t\ttree._triggerNodeEvent(\"select\", ctx);\n\t\t\t\t}\n\t\t\t},\n\t\t\t/** Show node status (ok, loading, error, nodata) using styles and a dummy child node.\n\t\t\t *\n\t\t\t * @param {EventData} ctx\n\t\t\t * @param status\n\t\t\t * @param message\n\t\t\t * @param details\n\t\t\t * @since 2.3\n\t\t\t */\n\t\t\tnodeSetStatus: function(ctx, status, message, details) {\n\t\t\t\tvar node = ctx.node,\n\t\t\t\t\ttree = ctx.tree;\n\n\t\t\t\tfunction _clearStatusNode() {\n\t\t\t\t\t// Remove dedicated dummy node, if any\n\t\t\t\t\tvar firstChild = node.children ? node.children[0] : null;\n\t\t\t\t\tif (firstChild && firstChild.isStatusNode()) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// I've seen exceptions here with loadKeyPath...\n\t\t\t\t\t\t\tif (node.ul) {\n\t\t\t\t\t\t\t\tnode.ul.removeChild(firstChild.li);\n\t\t\t\t\t\t\t\tfirstChild.li = null; // avoid leaks (DT issue 215)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t\tif (node.children.length === 1) {\n\t\t\t\t\t\t\tnode.children = [];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnode.children.shift();\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttree._callHook(\n\t\t\t\t\t\t\t\"treeStructureChanged\",\n\t\t\t\t\t\t\tctx,\n\t\t\t\t\t\t\t\"clearStatusNode\"\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfunction _setStatusNode(data, type) {\n\t\t\t\t\t// Create/modify the dedicated dummy node for 'loading...' or\n\t\t\t\t\t// 'error!' status. (only called for direct child of the invisible\n\t\t\t\t\t// system root)\n\t\t\t\t\tvar firstChild = node.children ? node.children[0] : null;\n\t\t\t\t\tif (firstChild && firstChild.isStatusNode()) {\n\t\t\t\t\t\t$.extend(firstChild, data);\n\t\t\t\t\t\tfirstChild.statusNodeType = type;\n\t\t\t\t\t\ttree._callHook(\"nodeRenderTitle\", firstChild);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnode._setChildren([data]);\n\t\t\t\t\t\ttree._callHook(\n\t\t\t\t\t\t\t\"treeStructureChanged\",\n\t\t\t\t\t\t\tctx,\n\t\t\t\t\t\t\t\"setStatusNode\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\tnode.children[0].statusNodeType = type;\n\t\t\t\t\t\ttree.render();\n\t\t\t\t\t}\n\t\t\t\t\treturn node.children[0];\n\t\t\t\t}\n\n\t\t\t\tswitch (status) {\n\t\t\t\t\tcase \"ok\":\n\t\t\t\t\t\t_clearStatusNode();\n\t\t\t\t\t\tnode._isLoading = false;\n\t\t\t\t\t\tnode._error = null;\n\t\t\t\t\t\tnode.renderStatus();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"loading\":\n\t\t\t\t\t\tif (!node.parent) {\n\t\t\t\t\t\t\t_setStatusNode(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ttitle:\n\t\t\t\t\t\t\t\t\t\ttree.options.strings.loading +\n\t\t\t\t\t\t\t\t\t\t(message ? \" (\" + message + \")\" : \"\"),\n\t\t\t\t\t\t\t\t\t// icon: true,  // needed for 'loding' icon\n\t\t\t\t\t\t\t\t\tcheckbox: false,\n\t\t\t\t\t\t\t\t\ttooltip: details,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tstatus\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnode._isLoading = true;\n\t\t\t\t\t\tnode._error = null;\n\t\t\t\t\t\tnode.renderStatus();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"error\":\n\t\t\t\t\t\t_setStatusNode(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttitle:\n\t\t\t\t\t\t\t\t\ttree.options.strings.loadError +\n\t\t\t\t\t\t\t\t\t(message ? \" (\" + message + \")\" : \"\"),\n\t\t\t\t\t\t\t\t// icon: false,\n\t\t\t\t\t\t\t\tcheckbox: false,\n\t\t\t\t\t\t\t\ttooltip: details,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tstatus\n\t\t\t\t\t\t);\n\t\t\t\t\t\tnode._isLoading = false;\n\t\t\t\t\t\tnode._error = { message: message, details: details };\n\t\t\t\t\t\tnode.renderStatus();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"nodata\":\n\t\t\t\t\t\t_setStatusNode(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttitle: message || tree.options.strings.noData,\n\t\t\t\t\t\t\t\t// icon: false,\n\t\t\t\t\t\t\t\tcheckbox: false,\n\t\t\t\t\t\t\t\ttooltip: details,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tstatus\n\t\t\t\t\t\t);\n\t\t\t\t\t\tnode._isLoading = false;\n\t\t\t\t\t\tnode._error = null;\n\t\t\t\t\t\tnode.renderStatus();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$.error(\"invalid node status \" + status);\n\t\t\t\t}\n\t\t\t},\n\t\t\t/**\n\t\t\t *\n\t\t\t * @param {EventData} ctx\n\t\t\t */\n\t\t\tnodeToggleExpanded: function(ctx) {\n\t\t\t\treturn this.nodeSetExpanded(ctx, !ctx.node.expanded);\n\t\t\t},\n\t\t\t/**\n\t\t\t * @param {EventData} ctx\n\t\t\t */\n\t\t\tnodeToggleSelected: function(ctx) {\n\t\t\t\tvar node = ctx.node,\n\t\t\t\t\tflag = !node.selected;\n\n\t\t\t\t// In selectMode: 3 this node may be unselected+partsel, even if\n\t\t\t\t// setSelected(true) was called before, due to `unselectable` children.\n\t\t\t\t// In this case, we now toggle as `setSelected(false)`\n\t\t\t\tif (\n\t\t\t\t\tnode.partsel &&\n\t\t\t\t\t!node.selected &&\n\t\t\t\t\tnode._lastSelectIntent === true\n\t\t\t\t) {\n\t\t\t\t\tflag = false;\n\t\t\t\t\tnode.selected = true; // so it is not considered 'nothing to do'\n\t\t\t\t}\n\t\t\t\tnode._lastSelectIntent = flag;\n\t\t\t\treturn this.nodeSetSelected(ctx, flag);\n\t\t\t},\n\t\t\t/** Remove all nodes.\n\t\t\t * @param {EventData} ctx\n\t\t\t */\n\t\t\ttreeClear: function(ctx) {\n\t\t\t\tvar tree = ctx.tree;\n\t\t\t\ttree.activeNode = null;\n\t\t\t\ttree.focusNode = null;\n\t\t\t\ttree.$div.find(\">ul.fancytree-container\").empty();\n\t\t\t\t// TODO: call destructors and remove reference loops\n\t\t\t\ttree.rootNode.children = null;\n\t\t\t\ttree._callHook(\"treeStructureChanged\", ctx, \"clear\");\n\t\t\t},\n\t\t\t/** Widget was created (called only once, even it re-initialized).\n\t\t\t * @param {EventData} ctx\n\t\t\t */\n\t\t\ttreeCreate: function(ctx) {},\n\t\t\t/** Widget was destroyed.\n\t\t\t * @param {EventData} ctx\n\t\t\t */\n\t\t\ttreeDestroy: function(ctx) {\n\t\t\t\tthis.$div.find(\">ul.fancytree-container\").remove();\n\t\t\t\tif (this.$source) {\n\t\t\t\t\tthis.$source.removeClass(\"fancytree-helper-hidden\");\n\t\t\t\t}\n\t\t\t},\n\t\t\t/** Widget was (re-)initialized.\n\t\t\t * @param {EventData} ctx\n\t\t\t */\n\t\t\ttreeInit: function(ctx) {\n\t\t\t\tvar tree = ctx.tree,\n\t\t\t\t\topts = tree.options;\n\n\t\t\t\t//this.debug(\"Fancytree.treeInit()\");\n\t\t\t\t// Add container to the TAB chain\n\t\t\t\t// See http://www.w3.org/TR/wai-aria-practices/#focus_activedescendant\n\t\t\t\t// #577: Allow to set tabindex to \"0\", \"-1\" and \"\"\n\t\t\t\ttree.$container.attr(\"tabindex\", opts.tabindex);\n\n\t\t\t\t// Copy some attributes to tree.data\n\t\t\t\t$.each(TREE_ATTRS, function(i, attr) {\n\t\t\t\t\tif (opts[attr] !== undefined) {\n\t\t\t\t\t\ttree.info(\"Move option \" + attr + \" to tree\");\n\t\t\t\t\t\ttree[attr] = opts[attr];\n\t\t\t\t\t\tdelete opts[attr];\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tif (opts.checkboxAutoHide) {\n\t\t\t\t\ttree.$container.addClass(\"fancytree-checkbox-auto-hide\");\n\t\t\t\t}\n\t\t\t\tif (opts.rtl) {\n\t\t\t\t\ttree.$container\n\t\t\t\t\t\t.attr(\"DIR\", \"RTL\")\n\t\t\t\t\t\t.addClass(\"fancytree-rtl\");\n\t\t\t\t} else {\n\t\t\t\t\ttree.$container\n\t\t\t\t\t\t.removeAttr(\"DIR\")\n\t\t\t\t\t\t.removeClass(\"fancytree-rtl\");\n\t\t\t\t}\n\t\t\t\tif (opts.aria) {\n\t\t\t\t\ttree.$container.attr(\"role\", \"tree\");\n\t\t\t\t\tif (opts.selectMode !== 1) {\n\t\t\t\t\t\ttree.$container.attr(\"aria-multiselectable\", true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.treeLoad(ctx);\n\t\t\t},\n\t\t\t/** Parse Fancytree from source, as configured in the options.\n\t\t\t * @param {EventData} ctx\n\t\t\t * @param {object} [source] optional new source (use last data otherwise)\n\t\t\t */\n\t\t\ttreeLoad: function(ctx, source) {\n\t\t\t\tvar metaData,\n\t\t\t\t\ttype,\n\t\t\t\t\t$ul,\n\t\t\t\t\ttree = ctx.tree,\n\t\t\t\t\t$container = ctx.widget.element,\n\t\t\t\t\tdfd,\n\t\t\t\t\t// calling context for root node\n\t\t\t\t\trootCtx = $.extend({}, ctx, { node: this.rootNode });\n\n\t\t\t\tif (tree.rootNode.children) {\n\t\t\t\t\tthis.treeClear(ctx);\n\t\t\t\t}\n\t\t\t\tsource = source || this.options.source;\n\n\t\t\t\tif (!source) {\n\t\t\t\t\ttype = $container.data(\"type\") || \"html\";\n\t\t\t\t\tswitch (type) {\n\t\t\t\t\t\tcase \"html\":\n\t\t\t\t\t\t\t// There should be an embedded `<ul>` with initial nodes,\n\t\t\t\t\t\t\t// but another `<ul class='fancytree-container'>` is appended\n\t\t\t\t\t\t\t// to the tree's <div> on startup anyway.\n\t\t\t\t\t\t\t$ul = $container\n\t\t\t\t\t\t\t\t.find(\">ul\")\n\t\t\t\t\t\t\t\t.not(\".fancytree-container\")\n\t\t\t\t\t\t\t\t.first();\n\n\t\t\t\t\t\t\tif ($ul.length) {\n\t\t\t\t\t\t\t\t$ul.addClass(\n\t\t\t\t\t\t\t\t\t\"ui-fancytree-source fancytree-helper-hidden\"\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tsource = $.ui.fancytree.parseHtml($ul);\n\t\t\t\t\t\t\t\t// allow to init tree.data.foo from <ul data-foo=''>\n\t\t\t\t\t\t\t\tthis.data = $.extend(\n\t\t\t\t\t\t\t\t\tthis.data,\n\t\t\t\t\t\t\t\t\t_getElementDataAsDict($ul)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tFT.warn(\n\t\t\t\t\t\t\t\t\t\"No `source` option was passed and container does not contain `<ul>`: assuming `source: []`.\"\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tsource = [];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"json\":\n\t\t\t\t\t\t\tsource = $.parseJSON($container.text());\n\t\t\t\t\t\t\t// $container already contains the <ul>, but we remove the plain (json) text\n\t\t\t\t\t\t\t// $container.empty();\n\t\t\t\t\t\t\t$container\n\t\t\t\t\t\t\t\t.contents()\n\t\t\t\t\t\t\t\t.filter(function() {\n\t\t\t\t\t\t\t\t\treturn this.nodeType === 3;\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.remove();\n\t\t\t\t\t\t\tif ($.isPlainObject(source)) {\n\t\t\t\t\t\t\t\t// We got {foo: 'abc', children: [...]}\n\t\t\t\t\t\t\t\t_assert(\n\t\t\t\t\t\t\t\t\t$.isArray(source.children),\n\t\t\t\t\t\t\t\t\t\"if an object is passed as source, it must contain a 'children' array (all other properties are added to 'tree.data')\"\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tmetaData = source;\n\t\t\t\t\t\t\t\tsource = source.children;\n\t\t\t\t\t\t\t\tdelete metaData.children;\n\t\t\t\t\t\t\t\t// Copy some attributes to tree.data\n\t\t\t\t\t\t\t\t$.each(TREE_ATTRS, function(i, attr) {\n\t\t\t\t\t\t\t\t\tif (metaData[attr] !== undefined) {\n\t\t\t\t\t\t\t\t\t\ttree[attr] = metaData[attr];\n\t\t\t\t\t\t\t\t\t\tdelete metaData[attr];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t// Copy extra properties to tree.data.foo\n\t\t\t\t\t\t\t\t$.extend(tree.data, metaData);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$.error(\"Invalid data-type: \" + type);\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof source === \"string\") {\n\t\t\t\t\t// TODO: source is an element ID\n\t\t\t\t\t$.error(\"Not implemented\");\n\t\t\t\t}\n\n\t\t\t\t// preInit is fired when the widget markup is created, but nodes\n\t\t\t\t// not yet loaded\n\t\t\t\ttree._triggerTreeEvent(\"preInit\", null);\n\n\t\t\t\t// Trigger fancytreeinit after nodes have been loaded\n\t\t\t\tdfd = this.nodeLoadChildren(rootCtx, source)\n\t\t\t\t\t.done(function() {\n\t\t\t\t\t\ttree._callHook(\n\t\t\t\t\t\t\t\"treeStructureChanged\",\n\t\t\t\t\t\t\tctx,\n\t\t\t\t\t\t\t\"loadChildren\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\ttree.render();\n\t\t\t\t\t\tif (ctx.options.selectMode === 3) {\n\t\t\t\t\t\t\ttree.rootNode.fixSelection3FromEndNodes();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (tree.activeNode && tree.options.activeVisible) {\n\t\t\t\t\t\t\ttree.activeNode.makeVisible();\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttree._triggerTreeEvent(\"init\", null, { status: true });\n\t\t\t\t\t})\n\t\t\t\t\t.fail(function() {\n\t\t\t\t\t\ttree.render();\n\t\t\t\t\t\ttree._triggerTreeEvent(\"init\", null, { status: false });\n\t\t\t\t\t});\n\t\t\t\treturn dfd;\n\t\t\t},\n\t\t\t/** Node was inserted into or removed from the tree.\n\t\t\t * @param {EventData} ctx\n\t\t\t * @param {boolean} add\n\t\t\t * @param {FancytreeNode} node\n\t\t\t */\n\t\t\ttreeRegisterNode: function(ctx, add, node) {\n\t\t\t\tctx.tree._callHook(\n\t\t\t\t\t\"treeStructureChanged\",\n\t\t\t\t\tctx,\n\t\t\t\t\tadd ? \"addNode\" : \"removeNode\"\n\t\t\t\t);\n\t\t\t},\n\t\t\t/** Widget got focus.\n\t\t\t * @param {EventData} ctx\n\t\t\t * @param {boolean} [flag=true]\n\t\t\t */\n\t\t\ttreeSetFocus: function(ctx, flag, callOpts) {\n\t\t\t\tvar targetNode;\n\n\t\t\t\tflag = flag !== false;\n\n\t\t\t\t// this.debug(\"treeSetFocus(\" + flag + \"), callOpts: \", callOpts, this.hasFocus());\n\t\t\t\t// this.debug(\"    focusNode: \" + this.focusNode);\n\t\t\t\t// this.debug(\"    activeNode: \" + this.activeNode);\n\t\t\t\tif (flag !== this.hasFocus()) {\n\t\t\t\t\tthis._hasFocus = flag;\n\t\t\t\t\tif (!flag && this.focusNode) {\n\t\t\t\t\t\t// Node also looses focus if widget blurs\n\t\t\t\t\t\tthis.focusNode.setFocus(false);\n\t\t\t\t\t} else if (flag && (!callOpts || !callOpts.calledByNode)) {\n\t\t\t\t\t\t$(this.$container).focus();\n\t\t\t\t\t}\n\t\t\t\t\tthis.$container.toggleClass(\"fancytree-treefocus\", flag);\n\t\t\t\t\tthis._triggerTreeEvent(flag ? \"focusTree\" : \"blurTree\");\n\t\t\t\t\tif (flag && !this.activeNode) {\n\t\t\t\t\t\t// #712: Use last mousedowned node ('click' event fires after focusin)\n\t\t\t\t\t\ttargetNode =\n\t\t\t\t\t\t\tthis._lastMousedownNode || this.getFirstChild();\n\t\t\t\t\t\tif (targetNode) {\n\t\t\t\t\t\t\ttargetNode.setFocus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t/** Widget option was set using `$().fancytree(\"option\", \"KEY\", VALUE)`.\n\t\t\t *\n\t\t\t * Note: `key` may reference a nested option, e.g. 'dnd5.scroll'.\n\t\t\t * In this case `value`contains the complete, modified `dnd5` option hash.\n\t\t\t * We can check for changed values like\n\t\t\t *     if( value.scroll !== tree.options.dnd5.scroll ) {...}\n\t\t\t *\n\t\t\t * @param {EventData} ctx\n\t\t\t * @param {string} key option name\n\t\t\t * @param {any} value option value\n\t\t\t */\n\t\t\ttreeSetOption: function(ctx, key, value) {\n\t\t\t\tvar tree = ctx.tree,\n\t\t\t\t\tcallDefault = true,\n\t\t\t\t\tcallCreate = false,\n\t\t\t\t\tcallRender = false;\n\n\t\t\t\tswitch (key) {\n\t\t\t\t\tcase \"aria\":\n\t\t\t\t\tcase \"checkbox\":\n\t\t\t\t\tcase \"icon\":\n\t\t\t\t\tcase \"minExpandLevel\":\n\t\t\t\t\tcase \"tabindex\":\n\t\t\t\t\t\t// tree._callHook(\"treeCreate\", tree);\n\t\t\t\t\t\tcallCreate = true;\n\t\t\t\t\t\tcallRender = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"checkboxAutoHide\":\n\t\t\t\t\t\ttree.$container.toggleClass(\n\t\t\t\t\t\t\t\"fancytree-checkbox-auto-hide\",\n\t\t\t\t\t\t\t!!value\n\t\t\t\t\t\t);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"escapeTitles\":\n\t\t\t\t\tcase \"tooltip\":\n\t\t\t\t\t\tcallRender = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"rtl\":\n\t\t\t\t\t\tif (value === false) {\n\t\t\t\t\t\t\ttree.$container\n\t\t\t\t\t\t\t\t.removeAttr(\"DIR\")\n\t\t\t\t\t\t\t\t.removeClass(\"fancytree-rtl\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttree.$container\n\t\t\t\t\t\t\t\t.attr(\"DIR\", \"RTL\")\n\t\t\t\t\t\t\t\t.addClass(\"fancytree-rtl\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcallRender = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"source\":\n\t\t\t\t\t\tcallDefault = false;\n\t\t\t\t\t\ttree._callHook(\"treeLoad\", tree, value);\n\t\t\t\t\t\tcallRender = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ttree.debug(\n\t\t\t\t\t\"set option \" +\n\t\t\t\t\t\tkey +\n\t\t\t\t\t\t\"=\" +\n\t\t\t\t\t\tvalue +\n\t\t\t\t\t\t\" <\" +\n\t\t\t\t\t\ttypeof value +\n\t\t\t\t\t\t\">\"\n\t\t\t\t);\n\t\t\t\tif (callDefault) {\n\t\t\t\t\tif (this.widget._super) {\n\t\t\t\t\t\t// jQuery UI 1.9+\n\t\t\t\t\t\tthis.widget._super.call(this.widget, key, value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// jQuery UI <= 1.8, we have to manually invoke the _setOption method from the base widget\n\t\t\t\t\t\t$.Widget.prototype._setOption.call(\n\t\t\t\t\t\t\tthis.widget,\n\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\tvalue\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (callCreate) {\n\t\t\t\t\ttree._callHook(\"treeCreate\", tree);\n\t\t\t\t}\n\t\t\t\tif (callRender) {\n\t\t\t\t\ttree.render(true, false); // force, not-deep\n\t\t\t\t}\n\t\t\t},\n\t\t\t/** A Node was added, removed, moved, or it's visibility changed.\n\t\t\t * @param {EventData} ctx\n\t\t\t */\n\t\t\ttreeStructureChanged: function(ctx, type) {},\n\t\t}\n\t);\n\n\t/*******************************************************************************\n\t * jQuery UI widget boilerplate\n\t */\n\n\t/**\n\t * The plugin (derrived from [jQuery.Widget](http://api.jqueryui.com/jQuery.widget/)).\n\t *\n\t * **Note:**\n\t * These methods implement the standard jQuery UI widget API.\n\t * It is recommended to use methods of the {Fancytree} instance instead\n\t *\n\t * @example\n\t * // DEPRECATED: Access jQuery UI widget methods and members:\n\t * var tree = $(\"#tree\").fancytree(\"getTree\", \"#myTree\");\n\t * var node = $.ui.fancytree.getTree(\"#tree\").getActiveNode();\n\t *\n\t * // RECOMMENDED: Use the Fancytree object API\n\t * var tree = $.ui.fancytree.getTree(\"#myTree\");\n\t * var node = tree.getActiveNode();\n\t *\n\t * // or you may already have stored the tree instance upon creation:\n\t * import {createTree, version} from 'jquery.fancytree'\n\t * const tree = createTree('#tree', { ... });\n\t * var node = tree.getActiveNode();\n\t *\n\t * @see {Fancytree_Static#getTree}\n\t * @deprecated Use methods of the {Fancytree} instance instead\n\t * @mixin Fancytree_Widget\n\t */\n\n\t$.widget(\n\t\t\"ui.fancytree\",\n\t\t/** @lends Fancytree_Widget# */\n\t\t{\n\t\t\t/**These options will be used as defaults\n\t\t\t * @type {FancytreeOptions}\n\t\t\t */\n\t\t\toptions: {\n\t\t\t\tactiveVisible: true,\n\t\t\t\tajax: {\n\t\t\t\t\ttype: \"GET\",\n\t\t\t\t\tcache: false, // false: Append random '_' argument to the request url to prevent caching.\n\t\t\t\t\t// timeout: 0, // >0: Make sure we get an ajax error if server is unreachable\n\t\t\t\t\tdataType: \"json\", // Expect json format and pass json object to callbacks.\n\t\t\t\t},\n\t\t\t\taria: true,\n\t\t\t\tautoActivate: true,\n\t\t\t\tautoCollapse: false,\n\t\t\t\tautoScroll: false,\n\t\t\t\tcheckbox: false,\n\t\t\t\tclickFolderMode: 4,\n\t\t\t\tcopyFunctionsToData: false,\n\t\t\t\tdebugLevel: null, // 0..4 (null: use global setting $.ui.fancytree.debugLevel)\n\t\t\t\tdisabled: false, // TODO: required anymore?\n\t\t\t\tenableAspx: 42, // TODO: this is truethy, but distinguishable from true: default will change to false in the future\n\t\t\t\tescapeTitles: false,\n\t\t\t\textensions: [],\n\t\t\t\tfocusOnSelect: false,\n\t\t\t\tgenerateIds: false,\n\t\t\t\ticon: true,\n\t\t\t\tidPrefix: \"ft_\",\n\t\t\t\tkeyboard: true,\n\t\t\t\tkeyPathSeparator: \"/\",\n\t\t\t\tminExpandLevel: 1,\n\t\t\t\tnodata: true, // (bool, string, or callback) display message, when no data available\n\t\t\t\tquicksearch: false,\n\t\t\t\trtl: false,\n\t\t\t\tscrollOfs: { top: 0, bottom: 0 },\n\t\t\t\tscrollParent: null,\n\t\t\t\tselectMode: 2,\n\t\t\t\tstrings: {\n\t\t\t\t\tloading: \"Loading...\", // &#8230; would be escaped when escapeTitles is true\n\t\t\t\t\tloadError: \"Load error!\",\n\t\t\t\t\tmoreData: \"More...\",\n\t\t\t\t\tnoData: \"No data.\",\n\t\t\t\t},\n\t\t\t\ttabindex: \"0\",\n\t\t\t\ttitlesTabbable: false,\n\t\t\t\ttoggleEffect: { effect: \"slideToggle\", duration: 200 }, //< \"toggle\" or \"slideToggle\" to use jQuery instead of jQueryUI for toggleEffect animation\n\t\t\t\ttooltip: false,\n\t\t\t\ttreeId: null,\n\t\t\t\t_classNames: {\n\t\t\t\t\tactive: \"fancytree-active\",\n\t\t\t\t\tanimating: \"fancytree-animating\",\n\t\t\t\t\tcombinedExpanderPrefix: \"fancytree-exp-\",\n\t\t\t\t\tcombinedIconPrefix: \"fancytree-ico-\",\n\t\t\t\t\terror: \"fancytree-error\",\n\t\t\t\t\texpanded: \"fancytree-expanded\",\n\t\t\t\t\tfocused: \"fancytree-focused\",\n\t\t\t\t\tfolder: \"fancytree-folder\",\n\t\t\t\t\thasChildren: \"fancytree-has-children\",\n\t\t\t\t\tlastsib: \"fancytree-lastsib\",\n\t\t\t\t\tlazy: \"fancytree-lazy\",\n\t\t\t\t\tloading: \"fancytree-loading\",\n\t\t\t\t\tnode: \"fancytree-node\",\n\t\t\t\t\tpartload: \"fancytree-partload\",\n\t\t\t\t\tpartsel: \"fancytree-partsel\",\n\t\t\t\t\tradio: \"fancytree-radio\",\n\t\t\t\t\tselected: \"fancytree-selected\",\n\t\t\t\t\tstatusNodePrefix: \"fancytree-statusnode-\",\n\t\t\t\t\tunselectable: \"fancytree-unselectable\",\n\t\t\t\t},\n\t\t\t\t// events\n\t\t\t\tlazyLoad: null,\n\t\t\t\tpostProcess: null,\n\t\t\t},\n\t\t\t_deprecationWarning: function(name) {\n\t\t\t\tvar tree = this.tree;\n\n\t\t\t\tif (tree && tree.options.debugLevel >= 3) {\n\t\t\t\t\ttree.warn(\n\t\t\t\t\t\t\"$().fancytree('\" +\n\t\t\t\t\t\t\tname +\n\t\t\t\t\t\t\t\"') is deprecated (see https://wwwendt.de/tech/fancytree/doc/jsdoc/Fancytree_Widget.html\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t},\n\t\t\t/* Set up the widget, Called on first $().fancytree() */\n\t\t\t_create: function() {\n\t\t\t\tthis.tree = new Fancytree(this);\n\n\t\t\t\tthis.$source =\n\t\t\t\t\tthis.source || this.element.data(\"type\") === \"json\"\n\t\t\t\t\t\t? this.element\n\t\t\t\t\t\t: this.element.find(\">ul\").first();\n\t\t\t\t// Subclass Fancytree instance with all enabled extensions\n\t\t\t\tvar extension,\n\t\t\t\t\textName,\n\t\t\t\t\ti,\n\t\t\t\t\topts = this.options,\n\t\t\t\t\textensions = opts.extensions,\n\t\t\t\t\tbase = this.tree;\n\n\t\t\t\tfor (i = 0; i < extensions.length; i++) {\n\t\t\t\t\textName = extensions[i];\n\t\t\t\t\textension = $.ui.fancytree._extensions[extName];\n\t\t\t\t\tif (!extension) {\n\t\t\t\t\t\t$.error(\n\t\t\t\t\t\t\t\"Could not apply extension '\" +\n\t\t\t\t\t\t\t\textName +\n\t\t\t\t\t\t\t\t\"' (it is not registered, did you forget to include it?)\"\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t// Add extension options as tree.options.EXTENSION\n\t\t\t\t\t// \t_assert(!this.tree.options[extName], \"Extension name must not exist as option name: \" + extName);\n\n\t\t\t\t\t// console.info(\"extend \" + extName, extension.options, this.tree.options[extName])\n\t\t\t\t\t// issue #876: we want to replace custom array-options, not merge them\n\t\t\t\t\tthis.tree.options[extName] = _simpleDeepMerge(\n\t\t\t\t\t\t{},\n\t\t\t\t\t\textension.options,\n\t\t\t\t\t\tthis.tree.options[extName]\n\t\t\t\t\t);\n\t\t\t\t\t// this.tree.options[extName] = $.extend(true, {}, extension.options, this.tree.options[extName]);\n\n\t\t\t\t\t// console.info(\"extend \" + extName + \" =>\", this.tree.options[extName])\n\t\t\t\t\t// console.info(\"extend \" + extName + \" org default =>\", extension.options)\n\n\t\t\t\t\t// Add a namespace tree.ext.EXTENSION, to hold instance data\n\t\t\t\t\t_assert(\n\t\t\t\t\t\tthis.tree.ext[extName] === undefined,\n\t\t\t\t\t\t\"Extension name must not exist as Fancytree.ext attribute: '\" +\n\t\t\t\t\t\t\textName +\n\t\t\t\t\t\t\t\"'\"\n\t\t\t\t\t);\n\t\t\t\t\t// this.tree[extName] = extension;\n\t\t\t\t\tthis.tree.ext[extName] = {};\n\t\t\t\t\t// Subclass Fancytree methods using proxies.\n\t\t\t\t\t_subclassObject(this.tree, base, extension, extName);\n\t\t\t\t\t// current extension becomes base for the next extension\n\t\t\t\t\tbase = extension;\n\t\t\t\t}\n\t\t\t\t//\n\t\t\t\tif (opts.icons !== undefined) {\n\t\t\t\t\t// 2015-11-16\n\t\t\t\t\tif (opts.icon === true) {\n\t\t\t\t\t\tthis.tree.warn(\n\t\t\t\t\t\t\t\"'icons' tree option is deprecated since v2.14.0: use 'icon' instead\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\topts.icon = opts.icons;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$.error(\n\t\t\t\t\t\t\t\"'icons' tree option is deprecated since v2.14.0: use 'icon' only instead\"\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (opts.iconClass !== undefined) {\n\t\t\t\t\t// 2015-11-16\n\t\t\t\t\tif (opts.icon) {\n\t\t\t\t\t\t$.error(\n\t\t\t\t\t\t\t\"'iconClass' tree option is deprecated since v2.14.0: use 'icon' only instead\"\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.tree.warn(\n\t\t\t\t\t\t\t\"'iconClass' tree option is deprecated since v2.14.0: use 'icon' instead\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\topts.icon = opts.iconClass;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (opts.tabbable !== undefined) {\n\t\t\t\t\t// 2016-04-04\n\t\t\t\t\topts.tabindex = opts.tabbable ? \"0\" : \"-1\";\n\t\t\t\t\tthis.tree.warn(\n\t\t\t\t\t\t\"'tabbable' tree option is deprecated since v2.17.0: use 'tabindex='\" +\n\t\t\t\t\t\t\topts.tabindex +\n\t\t\t\t\t\t\t\"' instead\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t//\n\t\t\t\tthis.tree._callHook(\"treeCreate\", this.tree);\n\t\t\t\t// Note: 'fancytreecreate' event is fired by widget base class\n\t\t\t\t//        this.tree._triggerTreeEvent(\"create\");\n\t\t\t},\n\n\t\t\t/* Called on every $().fancytree() */\n\t\t\t_init: function() {\n\t\t\t\tthis.tree._callHook(\"treeInit\", this.tree);\n\t\t\t\t// TODO: currently we call bind after treeInit, because treeInit\n\t\t\t\t// might change tree.$container.\n\t\t\t\t// It would be better, to move event binding into hooks altogether\n\t\t\t\tthis._bind();\n\t\t\t},\n\n\t\t\t/* Use the _setOption method to respond to changes to options. */\n\t\t\t_setOption: function(key, value) {\n\t\t\t\treturn this.tree._callHook(\n\t\t\t\t\t\"treeSetOption\",\n\t\t\t\t\tthis.tree,\n\t\t\t\t\tkey,\n\t\t\t\t\tvalue\n\t\t\t\t);\n\t\t\t},\n\n\t\t\t/** Use the destroy method to clean up any modifications your widget has made to the DOM */\n\t\t\t_destroy: function() {\n\t\t\t\tthis._unbind();\n\t\t\t\tthis.tree._callHook(\"treeDestroy\", this.tree);\n\t\t\t\t// In jQuery UI 1.8, you must invoke the destroy method from the base widget\n\t\t\t\t// $.Widget.prototype.destroy.call(this);\n\t\t\t\t// TODO: delete tree and nodes to make garbage collect easier?\n\t\t\t\t// TODO: In jQuery UI 1.9 and above, you would define _destroy instead of destroy and not call the base method\n\t\t\t},\n\n\t\t\t// -------------------------------------------------------------------------\n\n\t\t\t/* Remove all event handlers for our namespace */\n\t\t\t_unbind: function() {\n\t\t\t\tvar ns = this.tree._ns;\n\t\t\t\tthis.element.off(ns);\n\t\t\t\tthis.tree.$container.off(ns);\n\t\t\t\t$(document).off(ns);\n\t\t\t},\n\t\t\t/* Add mouse and kyboard handlers to the container */\n\t\t\t_bind: function() {\n\t\t\t\tvar self = this,\n\t\t\t\t\topts = this.options,\n\t\t\t\t\ttree = this.tree,\n\t\t\t\t\tns = tree._ns;\n\t\t\t\t// selstartEvent = ( $.support.selectstart ? \"selectstart\" : \"mousedown\" )\n\n\t\t\t\t// Remove all previuous handlers for this tree\n\t\t\t\tthis._unbind();\n\n\t\t\t\t//alert(\"keydown\" + ns + \"foc=\" + tree.hasFocus() + tree.$container);\n\t\t\t\t// tree.debug(\"bind events; container: \", tree.$container);\n\t\t\t\ttree.$container\n\t\t\t\t\t.on(\"focusin\" + ns + \" focusout\" + ns, function(event) {\n\t\t\t\t\t\tvar node = FT.getNode(event),\n\t\t\t\t\t\t\tflag = event.type === \"focusin\";\n\n\t\t\t\t\t\tif (!flag && node && $(event.target).is(\"a\")) {\n\t\t\t\t\t\t\t// #764\n\t\t\t\t\t\t\tnode.debug(\n\t\t\t\t\t\t\t\t\"Ignored focusout on embedded <a> element.\"\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// tree.treeOnFocusInOut.call(tree, event);\n\t\t\t\t\t\t// tree.debug(\"Tree container got event \" + event.type, node, event, FT.getEventTarget(event));\n\t\t\t\t\t\tif (flag) {\n\t\t\t\t\t\t\tif (tree._getExpiringValue(\"focusin\")) {\n\t\t\t\t\t\t\t\t// #789: IE 11 may send duplicate focusin events\n\t\t\t\t\t\t\t\ttree.debug(\"Ignored double focusin.\");\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttree._setExpiringValue(\"focusin\", true, 50);\n\n\t\t\t\t\t\t\tif (!node) {\n\t\t\t\t\t\t\t\t// #789: IE 11 may send focusin before mousdown(?)\n\t\t\t\t\t\t\t\tnode = tree._getExpiringValue(\"mouseDownNode\");\n\t\t\t\t\t\t\t\tif (node) {\n\t\t\t\t\t\t\t\t\ttree.debug(\n\t\t\t\t\t\t\t\t\t\t\"Reconstruct mouse target for focusin from recent event.\"\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (node) {\n\t\t\t\t\t\t\t// For example clicking into an <input> that is part of a node\n\t\t\t\t\t\t\ttree._callHook(\n\t\t\t\t\t\t\t\t\"nodeSetFocus\",\n\t\t\t\t\t\t\t\ttree._makeHookContext(node, event),\n\t\t\t\t\t\t\t\tflag\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\ttree.tbody &&\n\t\t\t\t\t\t\t\t$(event.target).parents(\n\t\t\t\t\t\t\t\t\t\"table.fancytree-container > thead\"\n\t\t\t\t\t\t\t\t).length\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t// #767: ignore events in the table's header\n\t\t\t\t\t\t\t\ttree.debug(\n\t\t\t\t\t\t\t\t\t\"Ignore focus event outside table body.\",\n\t\t\t\t\t\t\t\t\tevent\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttree._callHook(\"treeSetFocus\", tree, flag);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.on(\"selectstart\" + ns, \"span.fancytree-title\", function(\n\t\t\t\t\t\tevent\n\t\t\t\t\t) {\n\t\t\t\t\t\t// prevent mouse-drags to select text ranges\n\t\t\t\t\t\t// tree.debug(\"<span title> got event \" + event.type);\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t})\n\t\t\t\t\t.on(\"keydown\" + ns, function(event) {\n\t\t\t\t\t\t// TODO: also bind keyup and keypress\n\t\t\t\t\t\t// tree.debug(\"got event \" + event.type + \", hasFocus:\" + tree.hasFocus());\n\t\t\t\t\t\t// if(opts.disabled || opts.keyboard === false || !tree.hasFocus() ){\n\t\t\t\t\t\tif (opts.disabled || opts.keyboard === false) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar res,\n\t\t\t\t\t\t\tnode = tree.focusNode, // node may be null\n\t\t\t\t\t\t\tctx = tree._makeHookContext(node || tree, event),\n\t\t\t\t\t\t\tprevPhase = tree.phase;\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ttree.phase = \"userEvent\";\n\t\t\t\t\t\t\t// If a 'fancytreekeydown' handler returns false, skip the default\n\t\t\t\t\t\t\t// handling (implemented by tree.nodeKeydown()).\n\t\t\t\t\t\t\tif (node) {\n\t\t\t\t\t\t\t\tres = tree._triggerNodeEvent(\n\t\t\t\t\t\t\t\t\t\"keydown\",\n\t\t\t\t\t\t\t\t\tnode,\n\t\t\t\t\t\t\t\t\tevent\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tres = tree._triggerTreeEvent(\"keydown\", event);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (res === \"preventNav\") {\n\t\t\t\t\t\t\t\tres = true; // prevent keyboard navigation, but don't prevent default handling of embedded input controls\n\t\t\t\t\t\t\t} else if (res !== false) {\n\t\t\t\t\t\t\t\tres = tree._callHook(\"nodeKeydown\", ctx);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn res;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\ttree.phase = prevPhase;\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.on(\"mousedown\" + ns, function(event) {\n\t\t\t\t\t\tvar et = FT.getEventTarget(event);\n\t\t\t\t\t\t// self.tree.debug(\"event(\" + event.type + \"): node: \", et.node);\n\t\t\t\t\t\t// #712: Store the clicked node, so we can use it when we get a focusin event\n\t\t\t\t\t\t//       ('click' event fires after focusin)\n\t\t\t\t\t\t// tree.debug(\"event(\" + event.type + \"): node: \", et.node);\n\t\t\t\t\t\ttree._lastMousedownNode = et ? et.node : null;\n\t\t\t\t\t\t// #789: Store the node also for a short period, so we can use it\n\t\t\t\t\t\t// in a *resulting* focusin event\n\t\t\t\t\t\ttree._setExpiringValue(\n\t\t\t\t\t\t\t\"mouseDownNode\",\n\t\t\t\t\t\t\ttree._lastMousedownNode\n\t\t\t\t\t\t);\n\t\t\t\t\t})\n\t\t\t\t\t.on(\"click\" + ns + \" dblclick\" + ns, function(event) {\n\t\t\t\t\t\tif (opts.disabled) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar ctx,\n\t\t\t\t\t\t\tet = FT.getEventTarget(event),\n\t\t\t\t\t\t\tnode = et.node,\n\t\t\t\t\t\t\ttree = self.tree,\n\t\t\t\t\t\t\tprevPhase = tree.phase;\n\n\t\t\t\t\t\t// self.tree.debug(\"event(\" + event.type + \"): node: \", node);\n\t\t\t\t\t\tif (!node) {\n\t\t\t\t\t\t\treturn true; // Allow bubbling of other events\n\t\t\t\t\t\t}\n\t\t\t\t\t\tctx = tree._makeHookContext(node, event);\n\t\t\t\t\t\t// self.tree.debug(\"event(\" + event.type + \"): node: \", node);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ttree.phase = \"userEvent\";\n\t\t\t\t\t\t\tswitch (event.type) {\n\t\t\t\t\t\t\t\tcase \"click\":\n\t\t\t\t\t\t\t\t\tctx.targetType = et.type;\n\t\t\t\t\t\t\t\t\tif (node.isPagingNode()) {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\ttree._triggerNodeEvent(\n\t\t\t\t\t\t\t\t\t\t\t\t\"clickPaging\",\n\t\t\t\t\t\t\t\t\t\t\t\tctx,\n\t\t\t\t\t\t\t\t\t\t\t\tevent\n\t\t\t\t\t\t\t\t\t\t\t) === true\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn tree._triggerNodeEvent(\n\t\t\t\t\t\t\t\t\t\t\"click\",\n\t\t\t\t\t\t\t\t\t\tctx,\n\t\t\t\t\t\t\t\t\t\tevent\n\t\t\t\t\t\t\t\t\t) === false\n\t\t\t\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t\t\t\t: tree._callHook(\"nodeClick\", ctx);\n\t\t\t\t\t\t\t\tcase \"dblclick\":\n\t\t\t\t\t\t\t\t\tctx.targetType = et.type;\n\t\t\t\t\t\t\t\t\treturn tree._triggerNodeEvent(\n\t\t\t\t\t\t\t\t\t\t\"dblclick\",\n\t\t\t\t\t\t\t\t\t\tctx,\n\t\t\t\t\t\t\t\t\t\tevent\n\t\t\t\t\t\t\t\t\t) === false\n\t\t\t\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t\t\t\t: tree._callHook(\"nodeDblclick\", ctx);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\ttree.phase = prevPhase;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t},\n\t\t\t/** Return the active node or null.\n\t\t\t * @returns {FancytreeNode}\n\t\t\t * @deprecated Use methods of the Fancytree instance instead (<a href=\"Fancytree_Widget.html\">example above</a>).\n\t\t\t */\n\t\t\tgetActiveNode: function() {\n\t\t\t\tthis._deprecationWarning(\"getActiveNode\");\n\t\t\t\treturn this.tree.activeNode;\n\t\t\t},\n\t\t\t/** Return the matching node or null.\n\t\t\t * @param {string} key\n\t\t\t * @returns {FancytreeNode}\n\t\t\t * @deprecated Use methods of the Fancytree instance instead (<a href=\"Fancytree_Widget.html\">example above</a>).\n\t\t\t */\n\t\t\tgetNodeByKey: function(key) {\n\t\t\t\tthis._deprecationWarning(\"getNodeByKey\");\n\t\t\t\treturn this.tree.getNodeByKey(key);\n\t\t\t},\n\t\t\t/** Return the invisible system root node.\n\t\t\t * @returns {FancytreeNode}\n\t\t\t * @deprecated Use methods of the Fancytree instance instead (<a href=\"Fancytree_Widget.html\">example above</a>).\n\t\t\t */\n\t\t\tgetRootNode: function() {\n\t\t\t\tthis._deprecationWarning(\"getRootNode\");\n\t\t\t\treturn this.tree.rootNode;\n\t\t\t},\n\t\t\t/** Return the current tree instance.\n\t\t\t * @returns {Fancytree}\n\t\t\t * @deprecated Use `$.ui.fancytree.getTree()` instead (<a href=\"Fancytree_Widget.html\">example above</a>).\n\t\t\t */\n\t\t\tgetTree: function() {\n\t\t\t\tthis._deprecationWarning(\"getTree\");\n\t\t\t\treturn this.tree;\n\t\t\t},\n\t\t}\n\t);\n\n\t// $.ui.fancytree was created by the widget factory. Create a local shortcut:\n\tFT = $.ui.fancytree;\n\n\t/**\n\t * Static members in the `$.ui.fancytree` namespace.\n\t * This properties and methods can be accessed without instantiating a concrete\n\t * Fancytree instance.\n\t *\n\t * @example\n\t * // Access static members:\n\t * var node = $.ui.fancytree.getNode(element);\n\t * alert($.ui.fancytree.version);\n\t *\n\t * @mixin Fancytree_Static\n\t */\n\t$.extend(\n\t\t$.ui.fancytree,\n\t\t/** @lends Fancytree_Static# */\n\t\t{\n\t\t\t/** Version number `\"MAJOR.MINOR.PATCH\"`\n\t\t\t * @type {string} */\n\t\t\tversion: \"2.36.1\", // Set to semver by 'grunt release'\n\t\t\t/** @type {string}\n\t\t\t * @description `\"production\" for release builds` */\n\t\t\tbuildType: \"production\", // Set to 'production' by 'grunt build'\n\t\t\t/** @type {int}\n\t\t\t * @description 0: silent .. 5: verbose (default: 3 for release builds). */\n\t\t\tdebugLevel: 3, // Set to 3 by 'grunt build'\n\t\t\t// Used by $.ui.fancytree.debug() and as default for tree.options.debugLevel\n\n\t\t\t_nextId: 1,\n\t\t\t_nextNodeKey: 1,\n\t\t\t_extensions: {},\n\t\t\t// focusTree: null,\n\n\t\t\t/** Expose class object as `$.ui.fancytree._FancytreeClass`.\n\t\t\t * Useful to extend `$.ui.fancytree._FancytreeClass.prototype`.\n\t\t\t * @type {Fancytree}\n\t\t\t */\n\t\t\t_FancytreeClass: Fancytree,\n\t\t\t/** Expose class object as $.ui.fancytree._FancytreeNodeClass\n\t\t\t * Useful to extend `$.ui.fancytree._FancytreeNodeClass.prototype`.\n\t\t\t * @type {FancytreeNode}\n\t\t\t */\n\t\t\t_FancytreeNodeClass: FancytreeNode,\n\t\t\t/* Feature checks to provide backwards compatibility */\n\t\t\tjquerySupports: {\n\t\t\t\t// http://jqueryui.com/upgrade-guide/1.9/#deprecated-offset-option-merged-into-my-and-at\n\t\t\t\tpositionMyOfs: isVersionAtLeast($.ui.version, 1, 9),\n\t\t\t},\n\t\t\t/** Throw an error if condition fails (debug method).\n\t\t\t * @param {boolean} cond\n\t\t\t * @param {string} msg\n\t\t\t */\n\t\t\tassert: function(cond, msg) {\n\t\t\t\treturn _assert(cond, msg);\n\t\t\t},\n\t\t\t/** Create a new Fancytree instance on a target element.\n\t\t\t *\n\t\t\t * @param {Element | jQueryObject | string} el Target DOM element or selector\n\t\t\t * @param {FancytreeOptions} [opts] Fancytree options\n\t\t\t * @returns {Fancytree} new tree instance\n\t\t\t * @example\n\t\t\t * var tree = $.ui.fancytree.createTree(\"#tree\", {\n\t\t\t *     source: {url: \"my/webservice\"}\n\t\t\t * }); // Create tree for this matching element\n\t\t\t *\n\t\t\t * @since 2.25\n\t\t\t */\n\t\t\tcreateTree: function(el, opts) {\n\t\t\t\tvar $tree = $(el).fancytree(opts);\n\t\t\t\treturn FT.getTree($tree);\n\t\t\t},\n\t\t\t/** Return a function that executes *fn* at most every *timeout* ms.\n\t\t\t * @param {integer} timeout\n\t\t\t * @param {function} fn\n\t\t\t * @param {boolean} [invokeAsap=false]\n\t\t\t * @param {any} [ctx]\n\t\t\t */\n\t\t\tdebounce: function(timeout, fn, invokeAsap, ctx) {\n\t\t\t\tvar timer;\n\t\t\t\tif (arguments.length === 3 && typeof invokeAsap !== \"boolean\") {\n\t\t\t\t\tctx = invokeAsap;\n\t\t\t\t\tinvokeAsap = false;\n\t\t\t\t}\n\t\t\t\treturn function() {\n\t\t\t\t\tvar args = arguments;\n\t\t\t\t\tctx = ctx || this;\n\t\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\t\tinvokeAsap && !timer && fn.apply(ctx, args);\n\t\t\t\t\tclearTimeout(timer);\n\t\t\t\t\ttimer = setTimeout(function() {\n\t\t\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\t\t\tinvokeAsap || fn.apply(ctx, args);\n\t\t\t\t\t\ttimer = null;\n\t\t\t\t\t}, timeout);\n\t\t\t\t};\n\t\t\t},\n\t\t\t/** Write message to console if debugLevel >= 4\n\t\t\t * @param {string} msg\n\t\t\t */\n\t\t\tdebug: function(msg) {\n\t\t\t\tif ($.ui.fancytree.debugLevel >= 4) {\n\t\t\t\t\tconsoleApply(\"log\", arguments);\n\t\t\t\t}\n\t\t\t},\n\t\t\t/** Write error message to console if debugLevel >= 1.\n\t\t\t * @param {string} msg\n\t\t\t */\n\t\t\terror: function(msg) {\n\t\t\t\tif ($.ui.fancytree.debugLevel >= 1) {\n\t\t\t\t\tconsoleApply(\"error\", arguments);\n\t\t\t\t}\n\t\t\t},\n\t\t\t/** Convert `<`, `>`, `&`, `\"`, `'`, and `/` to the equivalent entities.\n\t\t\t *\n\t\t\t * @param {string} s\n\t\t\t * @returns {string}\n\t\t\t */\n\t\t\tescapeHtml: function(s) {\n\t\t\t\treturn (\"\" + s).replace(REX_HTML, function(s) {\n\t\t\t\t\treturn ENTITY_MAP[s];\n\t\t\t\t});\n\t\t\t},\n\t\t\t/** Make jQuery.position() arguments backwards compatible, i.e. if\n\t\t\t * jQuery UI version <= 1.8, convert\n\t\t\t *   { my: \"left+3 center\", at: \"left bottom\", of: $target }\n\t\t\t * to\n\t\t\t *   { my: \"left center\", at: \"left bottom\", of: $target, offset: \"3  0\" }\n\t\t\t *\n\t\t\t * See http://jqueryui.com/upgrade-guide/1.9/#deprecated-offset-option-merged-into-my-and-at\n\t\t\t * and http://jsfiddle.net/mar10/6xtu9a4e/\n\t\t\t *\n\t\t\t * @param {object} opts\n\t\t\t * @returns {object} the (potentially modified) original opts hash object\n\t\t\t */\n\t\t\tfixPositionOptions: function(opts) {\n\t\t\t\tif (opts.offset || (\"\" + opts.my + opts.at).indexOf(\"%\") >= 0) {\n\t\t\t\t\t$.error(\n\t\t\t\t\t\t\"expected new position syntax (but '%' is not supported)\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (!$.ui.fancytree.jquerySupports.positionMyOfs) {\n\t\t\t\t\tvar // parse 'left+3 center' into ['left+3 center', 'left', '+3', 'center', undefined]\n\t\t\t\t\t\tmyParts = /(\\w+)([+-]?\\d+)?\\s+(\\w+)([+-]?\\d+)?/.exec(\n\t\t\t\t\t\t\topts.my\n\t\t\t\t\t\t),\n\t\t\t\t\t\tatParts = /(\\w+)([+-]?\\d+)?\\s+(\\w+)([+-]?\\d+)?/.exec(\n\t\t\t\t\t\t\topts.at\n\t\t\t\t\t\t),\n\t\t\t\t\t\t// convert to numbers\n\t\t\t\t\t\tdx =\n\t\t\t\t\t\t\t(myParts[2] ? +myParts[2] : 0) +\n\t\t\t\t\t\t\t(atParts[2] ? +atParts[2] : 0),\n\t\t\t\t\t\tdy =\n\t\t\t\t\t\t\t(myParts[4] ? +myParts[4] : 0) +\n\t\t\t\t\t\t\t(atParts[4] ? +atParts[4] : 0);\n\n\t\t\t\t\topts = $.extend({}, opts, {\n\t\t\t\t\t\t// make a copy and overwrite\n\t\t\t\t\t\tmy: myParts[1] + \" \" + myParts[3],\n\t\t\t\t\t\tat: atParts[1] + \" \" + atParts[3],\n\t\t\t\t\t});\n\t\t\t\t\tif (dx || dy) {\n\t\t\t\t\t\topts.offset = \"\" + dx + \" \" + dy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn opts;\n\t\t\t},\n\t\t\t/** Return a {node: FancytreeNode, type: TYPE} object for a mouse event.\n\t\t\t *\n\t\t\t * @param {Event} event Mouse event, e.g. click, ...\n\t\t\t * @returns {object} Return a {node: FancytreeNode, type: TYPE} object\n\t\t\t *     TYPE: 'title' | 'prefix' | 'expander' | 'checkbox' | 'icon' | undefined\n\t\t\t */\n\t\t\tgetEventTarget: function(event) {\n\t\t\t\tvar $target,\n\t\t\t\t\ttree,\n\t\t\t\t\ttcn = event && event.target ? event.target.className : \"\",\n\t\t\t\t\tres = { node: this.getNode(event.target), type: undefined };\n\t\t\t\t// We use a fast version of $(res.node).hasClass()\n\t\t\t\t// See http://jsperf.com/test-for-classname/2\n\t\t\t\tif (/\\bfancytree-title\\b/.test(tcn)) {\n\t\t\t\t\tres.type = \"title\";\n\t\t\t\t} else if (/\\bfancytree-expander\\b/.test(tcn)) {\n\t\t\t\t\tres.type =\n\t\t\t\t\t\tres.node.hasChildren() === false\n\t\t\t\t\t\t\t? \"prefix\"\n\t\t\t\t\t\t\t: \"expander\";\n\t\t\t\t\t// }else if( /\\bfancytree-checkbox\\b/.test(tcn) || /\\bfancytree-radio\\b/.test(tcn) ){\n\t\t\t\t} else if (/\\bfancytree-checkbox\\b/.test(tcn)) {\n\t\t\t\t\tres.type = \"checkbox\";\n\t\t\t\t} else if (/\\bfancytree(-custom)?-icon\\b/.test(tcn)) {\n\t\t\t\t\tres.type = \"icon\";\n\t\t\t\t} else if (/\\bfancytree-node\\b/.test(tcn)) {\n\t\t\t\t\t// Somewhere near the title\n\t\t\t\t\tres.type = \"title\";\n\t\t\t\t} else if (event && event.target) {\n\t\t\t\t\t$target = $(event.target);\n\t\t\t\t\tif ($target.is(\"ul[role=group]\")) {\n\t\t\t\t\t\t// #nnn: Clicking right to a node may hit the surrounding UL\n\t\t\t\t\t\ttree = res.node && res.node.tree;\n\t\t\t\t\t\t(tree || FT).debug(\"Ignoring click on outer UL.\");\n\t\t\t\t\t\tres.node = null;\n\t\t\t\t\t} else if ($target.closest(\".fancytree-title\").length) {\n\t\t\t\t\t\t// #228: clicking an embedded element inside a title\n\t\t\t\t\t\tres.type = \"title\";\n\t\t\t\t\t} else if ($target.closest(\".fancytree-checkbox\").length) {\n\t\t\t\t\t\t// E.g. <svg> inside checkbox span\n\t\t\t\t\t\tres.type = \"checkbox\";\n\t\t\t\t\t} else if ($target.closest(\".fancytree-expander\").length) {\n\t\t\t\t\t\tres.type = \"expander\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn res;\n\t\t\t},\n\t\t\t/** Return a string describing the affected node region for a mouse event.\n\t\t\t *\n\t\t\t * @param {Event} event Mouse event, e.g. click, mousemove, ...\n\t\t\t * @returns {string} 'title' | 'prefix' | 'expander' | 'checkbox' | 'icon' | undefined\n\t\t\t */\n\t\t\tgetEventTargetType: function(event) {\n\t\t\t\treturn this.getEventTarget(event).type;\n\t\t\t},\n\t\t\t/** Return a FancytreeNode instance from element, event, or jQuery object.\n\t\t\t *\n\t\t\t * @param {Element | jQueryObject | Event} el\n\t\t\t * @returns {FancytreeNode} matching node or null\n\t\t\t */\n\t\t\tgetNode: function(el) {\n\t\t\t\tif (el instanceof FancytreeNode) {\n\t\t\t\t\treturn el; // el already was a FancytreeNode\n\t\t\t\t} else if (el instanceof $) {\n\t\t\t\t\tel = el[0]; // el was a jQuery object: use the DOM element\n\t\t\t\t} else if (el.originalEvent !== undefined) {\n\t\t\t\t\tel = el.target; // el was an Event\n\t\t\t\t}\n\t\t\t\twhile (el) {\n\t\t\t\t\tif (el.ftnode) {\n\t\t\t\t\t\treturn el.ftnode;\n\t\t\t\t\t}\n\t\t\t\t\tel = el.parentNode;\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t},\n\t\t\t/** Return a Fancytree instance, from element, index, event, or jQueryObject.\n\t\t\t *\n\t\t\t * @param {Element | jQueryObject | Event | integer | string} [el]\n\t\t\t * @returns {Fancytree} matching tree or null\n\t\t\t * @example\n\t\t\t * $.ui.fancytree.getTree();  // Get first Fancytree instance on page\n\t\t\t * $.ui.fancytree.getTree(1);  // Get second Fancytree instance on page\n\t\t\t * $.ui.fancytree.getTree(event);  // Get tree for this mouse- or keyboard event\n\t\t\t * $.ui.fancytree.getTree(\"foo\");  // Get tree for this `opts.treeId`\n\t\t\t * $.ui.fancytree.getTree(\"#tree\");  // Get tree for this matching element\n\t\t\t *\n\t\t\t * @since 2.13\n\t\t\t */\n\t\t\tgetTree: function(el) {\n\t\t\t\tvar widget,\n\t\t\t\t\torgEl = el;\n\n\t\t\t\tif (el instanceof Fancytree) {\n\t\t\t\t\treturn el; // el already was a Fancytree\n\t\t\t\t}\n\t\t\t\tif (el === undefined) {\n\t\t\t\t\tel = 0; // get first tree\n\t\t\t\t}\n\t\t\t\tif (typeof el === \"number\") {\n\t\t\t\t\tel = $(\".fancytree-container\").eq(el); // el was an integer: return nth instance\n\t\t\t\t} else if (typeof el === \"string\") {\n\t\t\t\t\t// `el` may be a treeId or a selector:\n\t\t\t\t\tel = $(\"#ft-id-\" + orgEl).eq(0);\n\t\t\t\t\tif (!el.length) {\n\t\t\t\t\t\tel = $(orgEl).eq(0); // el was a selector: use first match\n\t\t\t\t\t}\n\t\t\t\t} else if (\n\t\t\t\t\tel instanceof Element ||\n\t\t\t\t\tel instanceof HTMLDocument\n\t\t\t\t) {\n\t\t\t\t\tel = $(el);\n\t\t\t\t} else if (el instanceof $) {\n\t\t\t\t\tel = el.eq(0); // el was a jQuery object: use the first\n\t\t\t\t} else if (el.originalEvent !== undefined) {\n\t\t\t\t\tel = $(el.target); // el was an Event\n\t\t\t\t}\n\t\t\t\t// el is a jQuery object wit one element here\n\t\t\t\tel = el.closest(\":ui-fancytree\");\n\t\t\t\twidget = el.data(\"ui-fancytree\") || el.data(\"fancytree\"); // the latter is required by jQuery <= 1.8\n\t\t\t\treturn widget ? widget.tree : null;\n\t\t\t},\n\t\t\t/** Return an option value that has a default, but may be overridden by a\n\t\t\t * callback or a node instance attribute.\n\t\t\t *\n\t\t\t * Evaluation sequence:\n\t\t\t *\n\t\t\t * If `tree.options.<optionName>` is a callback that returns something, use that.\n\t\t\t * Else if `node.<optionName>` is defined, use that.\n\t\t\t * Else if `tree.options.<optionName>` is a value, use that.\n\t\t\t * Else use `defaultValue`.\n\t\t\t *\n\t\t\t * @param {string} optionName name of the option property (on node and tree)\n\t\t\t * @param {FancytreeNode} node passed to the callback\n\t\t\t * @param {object} nodeObject where to look for the local option property, e.g. `node` or `node.data`\n\t\t\t * @param {object} treeOption where to look for the tree option, e.g. `tree.options` or `tree.options.dnd5`\n\t\t\t * @param {any} [defaultValue]\n\t\t\t * @returns {any}\n\t\t\t *\n\t\t\t * @example\n\t\t\t * // Check for node.foo, tree,options.foo(), and tree.options.foo:\n\t\t\t * $.ui.fancytree.evalOption(\"foo\", node, node, tree.options);\n\t\t\t * // Check for node.data.bar, tree,options.qux.bar(), and tree.options.qux.bar:\n\t\t\t * $.ui.fancytree.evalOption(\"bar\", node, node.data, tree.options.qux);\n\t\t\t *\n\t\t\t * @since 2.22\n\t\t\t */\n\t\t\tevalOption: function(\n\t\t\t\toptionName,\n\t\t\t\tnode,\n\t\t\t\tnodeObject,\n\t\t\t\ttreeOptions,\n\t\t\t\tdefaultValue\n\t\t\t) {\n\t\t\t\tvar ctx,\n\t\t\t\t\tres,\n\t\t\t\t\ttree = node.tree,\n\t\t\t\t\ttreeOpt = treeOptions[optionName],\n\t\t\t\t\tnodeOpt = nodeObject[optionName];\n\n\t\t\t\tif ($.isFunction(treeOpt)) {\n\t\t\t\t\tctx = {\n\t\t\t\t\t\tnode: node,\n\t\t\t\t\t\ttree: tree,\n\t\t\t\t\t\twidget: tree.widget,\n\t\t\t\t\t\toptions: tree.widget.options,\n\t\t\t\t\t\ttypeInfo: tree.types[node.type] || {},\n\t\t\t\t\t};\n\t\t\t\t\tres = treeOpt.call(tree, { type: optionName }, ctx);\n\t\t\t\t\tif (res == null) {\n\t\t\t\t\t\tres = nodeOpt;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tres = nodeOpt == null ? treeOpt : nodeOpt;\n\t\t\t\t}\n\t\t\t\tif (res == null) {\n\t\t\t\t\tres = defaultValue; // no option set at all: return default\n\t\t\t\t}\n\t\t\t\treturn res;\n\t\t\t},\n\t\t\t/** Set expander, checkbox, or node icon, supporting string and object format.\n\t\t\t *\n\t\t\t * @param {Element | jQueryObject} span\n\t\t\t * @param {string} baseClass\n\t\t\t * @param {string | object} icon\n\t\t\t * @since 2.27\n\t\t\t */\n\t\t\tsetSpanIcon: function(span, baseClass, icon) {\n\t\t\t\tvar $span = $(span);\n\n\t\t\t\tif (typeof icon === \"string\") {\n\t\t\t\t\t$span.attr(\"class\", baseClass + \" \" + icon);\n\t\t\t\t} else {\n\t\t\t\t\t// support object syntax: { text: ligature, addClasse: classname }\n\t\t\t\t\tif (icon.text) {\n\t\t\t\t\t\t$span.text(\"\" + icon.text);\n\t\t\t\t\t} else if (icon.html) {\n\t\t\t\t\t\tspan.innerHTML = icon.html;\n\t\t\t\t\t}\n\t\t\t\t\t$span.attr(\n\t\t\t\t\t\t\"class\",\n\t\t\t\t\t\tbaseClass + \" \" + (icon.addClass || \"\")\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t},\n\t\t\t/** Convert a keydown or mouse event to a canonical string like 'ctrl+a',\n\t\t\t * 'ctrl+shift+f2', 'shift+leftdblclick'.\n\t\t\t *\n\t\t\t * This is especially handy for switch-statements in event handlers.\n\t\t\t *\n\t\t\t * @param {event}\n\t\t\t * @returns {string}\n\t\t\t *\n\t\t\t * @example\n\n\t\t\tswitch( $.ui.fancytree.eventToString(event) ) {\n\t\t\t\tcase \"-\":\n\t\t\t\t\ttree.nodeSetExpanded(ctx, false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"shift+return\":\n\t\t\t\t\ttree.nodeSetActive(ctx, true);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"down\":\n\t\t\t\t\tres = node.navigate(event.which, activate);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\thandled = false;\n\t\t\t}\n\t\t\tif( handled ){\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t\t*/\n\t\t\teventToString: function(event) {\n\t\t\t\t// Poor-man's hotkeys. See here for a complete implementation:\n\t\t\t\t//   https://github.com/jeresig/jquery.hotkeys\n\t\t\t\tvar which = event.which,\n\t\t\t\t\tet = event.type,\n\t\t\t\t\ts = [];\n\n\t\t\t\tif (event.altKey) {\n\t\t\t\t\ts.push(\"alt\");\n\t\t\t\t}\n\t\t\t\tif (event.ctrlKey) {\n\t\t\t\t\ts.push(\"ctrl\");\n\t\t\t\t}\n\t\t\t\tif (event.metaKey) {\n\t\t\t\t\ts.push(\"meta\");\n\t\t\t\t}\n\t\t\t\tif (event.shiftKey) {\n\t\t\t\t\ts.push(\"shift\");\n\t\t\t\t}\n\n\t\t\t\tif (et === \"click\" || et === \"dblclick\") {\n\t\t\t\t\ts.push(MOUSE_BUTTONS[event.button] + et);\n\t\t\t\t} else if (et === \"wheel\") {\n\t\t\t\t\ts.push(et);\n\t\t\t\t} else if (!IGNORE_KEYCODES[which]) {\n\t\t\t\t\ts.push(\n\t\t\t\t\t\tSPECIAL_KEYCODES[which] ||\n\t\t\t\t\t\t\tString.fromCharCode(which).toLowerCase()\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn s.join(\"+\");\n\t\t\t},\n\t\t\t/** Write message to console if debugLevel >= 3\n\t\t\t * @param {string} msg\n\t\t\t */\n\t\t\tinfo: function(msg) {\n\t\t\t\tif ($.ui.fancytree.debugLevel >= 3) {\n\t\t\t\t\tconsoleApply(\"info\", arguments);\n\t\t\t\t}\n\t\t\t},\n\t\t\t/* @deprecated: use eventToString(event) instead.\n\t\t\t */\n\t\t\tkeyEventToString: function(event) {\n\t\t\t\tthis.warn(\n\t\t\t\t\t\"keyEventToString() is deprecated: use eventToString()\"\n\t\t\t\t);\n\t\t\t\treturn this.eventToString(event);\n\t\t\t},\n\t\t\t/** Return a wrapped handler method, that provides `this._super`.\n\t\t\t *\n\t\t\t * @example\n\t\t\t\t// Implement `opts.createNode` event to add the 'draggable' attribute\n\t\t\t\t$.ui.fancytree.overrideMethod(ctx.options, \"createNode\", function(event, data) {\n\t\t\t\t\t// Default processing if any\n\t\t\t\t\tthis._super.apply(this, arguments);\n\t\t\t\t\t// Add 'draggable' attribute\n\t\t\t\t\tdata.node.span.draggable = true;\n\t\t\t\t});\n\t\t\t *\n\t\t\t * @param {object} instance\n\t\t\t * @param {string} methodName\n\t\t\t * @param {function} handler\n\t\t\t * @param {object} [context] optional context\n\t\t\t */\n\t\t\toverrideMethod: function(instance, methodName, handler, context) {\n\t\t\t\tvar prevSuper,\n\t\t\t\t\t_super = instance[methodName] || $.noop;\n\n\t\t\t\tinstance[methodName] = function() {\n\t\t\t\t\tvar self = context || this;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tprevSuper = self._super;\n\t\t\t\t\t\tself._super = _super;\n\t\t\t\t\t\treturn handler.apply(self, arguments);\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tself._super = prevSuper;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\t\t\t/**\n\t\t\t * Parse tree data from HTML <ul> markup\n\t\t\t *\n\t\t\t * @param {jQueryObject} $ul\n\t\t\t * @returns {NodeData[]}\n\t\t\t */\n\t\t\tparseHtml: function($ul) {\n\t\t\t\tvar classes,\n\t\t\t\t\tclassName,\n\t\t\t\t\textraClasses,\n\t\t\t\t\ti,\n\t\t\t\t\tiPos,\n\t\t\t\t\tl,\n\t\t\t\t\ttmp,\n\t\t\t\t\ttmp2,\n\t\t\t\t\t$children = $ul.find(\">li\"),\n\t\t\t\t\tchildren = [];\n\n\t\t\t\t$children.each(function() {\n\t\t\t\t\tvar allData,\n\t\t\t\t\t\tlowerCaseAttr,\n\t\t\t\t\t\t$li = $(this),\n\t\t\t\t\t\t$liSpan = $li.find(\">span\", this).first(),\n\t\t\t\t\t\t$liA = $liSpan.length ? null : $li.find(\">a\").first(),\n\t\t\t\t\t\td = { tooltip: null, data: {} };\n\n\t\t\t\t\tif ($liSpan.length) {\n\t\t\t\t\t\td.title = $liSpan.html();\n\t\t\t\t\t} else if ($liA && $liA.length) {\n\t\t\t\t\t\t// If a <li><a> tag is specified, use it literally and extract href/target.\n\t\t\t\t\t\td.title = $liA.html();\n\t\t\t\t\t\td.data.href = $liA.attr(\"href\");\n\t\t\t\t\t\td.data.target = $liA.attr(\"target\");\n\t\t\t\t\t\td.tooltip = $liA.attr(\"title\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If only a <li> tag is specified, use the trimmed string up to\n\t\t\t\t\t\t// the next child <ul> tag.\n\t\t\t\t\t\td.title = $li.html();\n\t\t\t\t\t\tiPos = d.title.search(/<ul/i);\n\t\t\t\t\t\tif (iPos >= 0) {\n\t\t\t\t\t\t\td.title = d.title.substring(0, iPos);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\td.title = $.trim(d.title);\n\n\t\t\t\t\t// Make sure all fields exist\n\t\t\t\t\tfor (i = 0, l = CLASS_ATTRS.length; i < l; i++) {\n\t\t\t\t\t\td[CLASS_ATTRS[i]] = undefined;\n\t\t\t\t\t}\n\t\t\t\t\t// Initialize to `true`, if class is set and collect extraClasses\n\t\t\t\t\tclasses = this.className.split(\" \");\n\t\t\t\t\textraClasses = [];\n\t\t\t\t\tfor (i = 0, l = classes.length; i < l; i++) {\n\t\t\t\t\t\tclassName = classes[i];\n\t\t\t\t\t\tif (CLASS_ATTR_MAP[className]) {\n\t\t\t\t\t\t\td[className] = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\textraClasses.push(className);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\td.extraClasses = extraClasses.join(\" \");\n\n\t\t\t\t\t// Parse node options from ID, title and class attributes\n\t\t\t\t\ttmp = $li.attr(\"title\");\n\t\t\t\t\tif (tmp) {\n\t\t\t\t\t\td.tooltip = tmp; // overrides <a title='...'>\n\t\t\t\t\t}\n\t\t\t\t\ttmp = $li.attr(\"id\");\n\t\t\t\t\tif (tmp) {\n\t\t\t\t\t\td.key = tmp;\n\t\t\t\t\t}\n\t\t\t\t\t// Translate hideCheckbox -> checkbox:false\n\t\t\t\t\tif ($li.attr(\"hideCheckbox\")) {\n\t\t\t\t\t\td.checkbox = false;\n\t\t\t\t\t}\n\t\t\t\t\t// Add <li data-NAME='...'> as node.data.NAME\n\t\t\t\t\tallData = _getElementDataAsDict($li);\n\t\t\t\t\tif (allData && !$.isEmptyObject(allData)) {\n\t\t\t\t\t\t// #507: convert data-hidecheckbox (lower case) to hideCheckbox\n\t\t\t\t\t\tfor (lowerCaseAttr in NODE_ATTR_LOWERCASE_MAP) {\n\t\t\t\t\t\t\tif (allData.hasOwnProperty(lowerCaseAttr)) {\n\t\t\t\t\t\t\t\tallData[\n\t\t\t\t\t\t\t\t\tNODE_ATTR_LOWERCASE_MAP[lowerCaseAttr]\n\t\t\t\t\t\t\t\t] = allData[lowerCaseAttr];\n\t\t\t\t\t\t\t\tdelete allData[lowerCaseAttr];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// #56: Allow to set special node.attributes from data-...\n\t\t\t\t\t\tfor (i = 0, l = NODE_ATTRS.length; i < l; i++) {\n\t\t\t\t\t\t\ttmp = NODE_ATTRS[i];\n\t\t\t\t\t\t\ttmp2 = allData[tmp];\n\t\t\t\t\t\t\tif (tmp2 != null) {\n\t\t\t\t\t\t\t\tdelete allData[tmp];\n\t\t\t\t\t\t\t\td[tmp] = tmp2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// All other data-... goes to node.data...\n\t\t\t\t\t\t$.extend(d.data, allData);\n\t\t\t\t\t}\n\t\t\t\t\t// Recursive reading of child nodes, if LI tag contains an UL tag\n\t\t\t\t\t$ul = $li.find(\">ul\").first();\n\t\t\t\t\tif ($ul.length) {\n\t\t\t\t\t\td.children = $.ui.fancytree.parseHtml($ul);\n\t\t\t\t\t} else {\n\t\t\t\t\t\td.children = d.lazy ? undefined : null;\n\t\t\t\t\t}\n\t\t\t\t\tchildren.push(d);\n\t\t\t\t\t// FT.debug(\"parse \", d, children);\n\t\t\t\t});\n\t\t\t\treturn children;\n\t\t\t},\n\t\t\t/** Add Fancytree extension definition to the list of globally available extensions.\n\t\t\t *\n\t\t\t * @param {object} definition\n\t\t\t */\n\t\t\tregisterExtension: function(definition) {\n\t\t\t\t_assert(\n\t\t\t\t\tdefinition.name != null,\n\t\t\t\t\t\"extensions must have a `name` property.\"\n\t\t\t\t);\n\t\t\t\t_assert(\n\t\t\t\t\tdefinition.version != null,\n\t\t\t\t\t\"extensions must have a `version` property.\"\n\t\t\t\t);\n\t\t\t\t$.ui.fancytree._extensions[definition.name] = definition;\n\t\t\t},\n\t\t\t/** Inverse of escapeHtml().\n\t\t\t *\n\t\t\t * @param {string} s\n\t\t\t * @returns {string}\n\t\t\t */\n\t\t\tunescapeHtml: function(s) {\n\t\t\t\tvar e = document.createElement(\"div\");\n\t\t\t\te.innerHTML = s;\n\t\t\t\treturn e.childNodes.length === 0\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: e.childNodes[0].nodeValue;\n\t\t\t},\n\t\t\t/** Write warning message to console if debugLevel >= 2.\n\t\t\t * @param {string} msg\n\t\t\t */\n\t\t\twarn: function(msg) {\n\t\t\t\tif ($.ui.fancytree.debugLevel >= 2) {\n\t\t\t\t\tconsoleApply(\"warn\", arguments);\n\t\t\t\t}\n\t\t\t},\n\t\t}\n\t);\n\n\t// Value returned by `require('jquery.fancytree')`\n\treturn $.ui.fancytree;\n}); // End of closure\n","import { checkBrowserCompatibility } from '../../view/helpers';\r\nimport { Events, ApiMethods, callApiMethod, parseJson, _sessionList } from './components';\r\nimport { PromptLogin } from './promptlogin';\r\nimport { Resources } from '../../resources/resources';\r\n\r\nlet PmaStartUrl = \"http://127.0.0.1:54001/\";\r\n\r\n/**\r\n * The Context class glues component instances together. It provides API method implementations and simplifies the interaction with PMA.core by automatically managing authentication and sessionID handling, via the authentication provider classes.\r\n * @param  {Object} options\r\n * @param  {string} options.caller\r\n * @tutorial 03-gallery\r\n * @tutorial 04-tree\r\n * @tutorial 05-annotations\r\n */\r\n\r\nexport class Context {\r\n    constructor(options) {\r\n        if (!checkBrowserCompatibility()) {\r\n            return;\r\n        }\r\n\r\n        if (!options || typeof options.caller !== \"string\") {\r\n            throw \"Caller parameter not supplied\";\r\n        }\r\n\r\n        this.options = options;\r\n\r\n        // create event listeners object and add one array for each event type\r\n        this.listeners = {};\r\n        for (var ev in Events) {\r\n            if (Events.hasOwnProperty(ev)) {\r\n                this.listeners[Events[ev]] = [];\r\n            }\r\n        }\r\n\r\n        // list of components that can authenticate against a PMA.core server\r\n        this.authenticationProviders = [];\r\n    }\r\n    /**\r\n     * Gets the caller value\r\n     * @return {string}\r\n     */\r\n    getCaller() {\r\n        return this.options.caller;\r\n    }\r\n    /**\r\n     * Adds an authentication provider to the list of available authentication methods\r\n     * @param  {AutoLogin|PromptLogin|SessionLogin} provider\r\n     */\r\n    registerAuthenticationProvider(provider) {\r\n        if (typeof provider.authenticate !== \"function\") {\r\n            console.error(\"Invalid authentication provider\");\r\n        }\r\n        else {\r\n            this.authenticationProviders.push(provider);\r\n        }\r\n    }\r\n    /**\r\n     * Removes an authentication provider from the list of available authentication methods\r\n     * @param  {AutoLogin|PromptLogin|SessionLogin} provider - The provider to remove\r\n     * @param {bool} clearCache - Clears the session ids cache\r\n     */\r\n    removeAuthenticationProvider(provider, clearCache) {\r\n        if (typeof provider.authenticate !== \"function\") {\r\n            console.error(\"Invalid authentication provider\");\r\n        }\r\n        else {\r\n            for (var i = 0; i < this.authenticationProviders.length; i++) {\r\n                if (this.authenticationProviders[i] === provider) {\r\n                    this.authenticationProviders.splice(i, 1);\r\n\r\n                    // Clear all cache\r\n                    if (clearCache !== false) {\r\n                        _sessionList.clear();\r\n                    }\r\n                    break;\r\n                }\r\n            }\r\n        }\r\n    }\r\n    /**\r\n     * Gets the list of available authentication methods\r\n     * @returns  [{PMA.UI.Authentication.AutoLogin|PMA.UI.Authentication.PromptLogin|PMA.UI.Authentication.SessionLogin}] providers\r\n     */\r\n    getAuthenticationProviders() {\r\n        return this.authenticationProviders;\r\n    }\r\n    /**\r\n    * PMA.core authentication response\r\n    * @typedef {Object} Context~authenticationResponse\r\n    * @property {string} SessionId - The session ID\r\n    * @property {string} Username - The username\r\n    * @property {string} Email - The user's email\r\n    * @property {string} FirstName - The user's first name\r\n    * @property {string} LastName - The user's last name\r\n    */\r\n    /**\r\n     * A function called after successfully pinging a list of servers\r\n     * @callback Context~pingServersDoneCallback\r\n     * @param {String[]} servers - A sorted list of server url's from fastest to slowest\r\n     * @param {Object[]} detailInfo - An array of detailed information from pinging the servers (not sorted)\r\n     * @param {string} detailInfo.serverUrl - The server url\r\n     * @param {bool} detailInfo.success - Whether the server responded to any pinging\r\n     * @param {Number[]} detailInfo.times - An array of all the times the server took to respond (in miliseconds)\r\n     * @param {Number} detailInfo.avgTime - The average time the server took to respond (in miliseconds)\r\n     * @param {Number} detailInfo.attempts - The number of attempted pings to the server\r\n     */\r\n    /**\r\n     * Pings a list of servers to find the fastests\r\n     * @param {string[]} servers - An array of server url to ping\r\n     * @param {Context~pingServersDoneCallback} done - The done callback to run\r\n     * @param {Number} [maxAttempts=5] - The number of attempts for each server\r\n     * */\r\n    pingServers(servers, done, maxAttempts) {\r\n        if (maxAttempts <= 1 || !maxAttempts || maxAttempts === undefined) {\r\n            maxAttempts = 6;\r\n        }\r\n\r\n        var instances = servers.map(function (s) { return { serverUrl: s, success: false, times: [], avgTime: null, attempts: 0 }; });\r\n\r\n        var cb = function (startTime, instanceIndex, success) {\r\n            instances[instanceIndex].attempts++;\r\n            if (success && instances[instanceIndex].attempts > 1) {\r\n                // We ignore first attempt for warm up\r\n                var time = performance.now() - startTime;\r\n                instances[instanceIndex].times.push(time);\r\n                instances[instanceIndex].avgTime = instances[instanceIndex].avgTime != null ?\r\n                    ((instances[instanceIndex].avgTime * instances[instanceIndex].times.length) + time) / (instances[instanceIndex].times.length + 1) : time;\r\n                instances[instanceIndex].success = true;\r\n            }\r\n\r\n            if (instances[instanceIndex].attempts >= maxAttempts) {\r\n                instanceIndex++;\r\n            }\r\n\r\n            if (instanceIndex >= instances.length) {\r\n                // done testing\r\n                if (typeof done === \"function\") {\r\n                    done(instances.sort(function (a, b) {\r\n                        if (a.avgTime != null && b.avgTime != null) {\r\n                            return a.avgTime - b.avgTime;\r\n                        }\r\n                        else if (a.avgTime != null) {\r\n                            return -10000000;\r\n                        }\r\n                        else {\r\n                            return 10000000;\r\n                        }\r\n                    }).map(function (s) { return s.serverUrl; }), instances);\r\n                }\r\n            }\r\n            else {\r\n                // Run next test\r\n                var nowTime = performance.now();\r\n                callApiMethod({\r\n                    serverUrl: instances[instanceIndex].serverUrl,\r\n                    method: ApiMethods.GetVersionInfo,\r\n                    success: cb.bind(this, nowTime, instanceIndex, true),\r\n                    failure: cb.bind(this, nowTime, instanceIndex, false)\r\n                });\r\n            }\r\n        };\r\n\r\n        //Start first test\r\n        var nowTime = performance.now();\r\n        callApiMethod({\r\n            serverUrl: instances[0].serverUrl,\r\n            method: ApiMethods.GetVersionInfo,\r\n            success: cb.bind(this, nowTime, 0, true),\r\n            failure: cb.bind(this, nowTime, 0, false)\r\n        });\r\n    }\r\n    /**\r\n     * Gets the user information associated with a server\r\n     * @param {string} serverUrl - The URL of the PMA.core for which to fetch user information\r\n     * @returns {Context~authenticationResponse} If no authentication has taken place for the particular server, null is returned, otherwise an object.\r\n     */\r\n    getUserInfo(serverUrl) {\r\n        for (var url in _sessionList.get()) {\r\n            if (_sessionList.get().hasOwnProperty(url) && url === serverUrl && _sessionList.get()[url]) {\r\n                return _sessionList.get()[url];\r\n            }\r\n        }\r\n\r\n        return null;\r\n    }\r\n    /**\r\n     * Called when a session ID was successfully obtained\r\n     * @callback Context~getSessionCallback\r\n     * @param {string} sessionID\r\n     */\r\n    /**\r\n     * Finds a session ID for the requested server, either by scanning the already cached session ids or by invoking one by one the available authentication providers, until a valid session ID is found\r\n     * @param  {string} serverUrl - The URL of the PMA.core for which to fetch a session ID\r\n     * @param  {Context~getSessionCallback} success\r\n     * @param  {function} [failure]\r\n     */\r\n    getSession(serverUrl, success, failure) {\r\n        // scan cached session IDs\r\n        for (var url in _sessionList.get()) {\r\n            if (_sessionList.get().hasOwnProperty(url) && url === serverUrl && _sessionList.get()[url]) {\r\n                success(_sessionList.get()[url].SessionId);\r\n                return;\r\n            }\r\n        }\r\n\r\n        // no session ID found in cached list\r\n        // fire all providers until one succeeds or all failed\r\n        authenticateWithProvider.call(this, serverUrl, success, failure);\r\n    }\r\n    getImageInfo(serverUrl, pathOrUid, success, failure) {\r\n        callApiMethodWithAuthentication.call(\r\n            this, {\r\n            attemptCount: 0,\r\n            serverUrl: serverUrl,\r\n            method: ApiMethods.GetImageInfo,\r\n            data: {\r\n                pathOrUid: pathOrUid\r\n            },\r\n            httpMethod: \"GET\",\r\n            success: success,\r\n            failure: failure\r\n        });\r\n    }\r\n    getFiles(serverUrl, path, success, failure) {\r\n        console.warn(\"Context.getFiles is deprecated please use Context.getSlides instead\");\r\n        callApiMethodWithAuthentication.call(\r\n            this, {\r\n            attemptCount: 0,\r\n            serverUrl: serverUrl,\r\n            method: ApiMethods.GetFiles,\r\n            data: {\r\n                path: path\r\n            },\r\n            httpMethod: \"GET\",\r\n            success: success,\r\n            failure: failure\r\n        });\r\n    }\r\n    /**\r\n    * Gets all slides in a specified path\r\n    * @param {Object} options - Parameters to pass to the GetSlides request\r\n    * @param {string} options.serverUrl - The server url to get slides from\r\n    * @param {string} options.path - The path to get slides from\r\n    * @param {GetSlidesScope} options.scope - The search scope to use\r\n    * @param {function} [options.success] - Called upon success\r\n    * @param {function} [options.failure] - Called upon failure\r\n    **/\r\n    getSlides(options) {\r\n        callApiMethodWithAuthentication.call(\r\n            this, {\r\n            attemptCount: 0,\r\n            serverUrl: options.serverUrl,\r\n            method: ApiMethods.GetFiles,\r\n            data: {\r\n                path: options.path,\r\n                scope: options.scope ? options.scope : 0\r\n            },\r\n            httpMethod: \"GET\",\r\n            success: options.success,\r\n            failure: options.failure\r\n        });\r\n    }\r\n    getDirectories(serverUrl, path, success, failure) {\r\n        callApiMethodWithAuthentication.call(\r\n            this, {\r\n            attemptCount: 0,\r\n            serverUrl: serverUrl,\r\n            method: ApiMethods.GetDirectories,\r\n            data: {\r\n                path: path\r\n            },\r\n            httpMethod: \"GET\",\r\n            success: success,\r\n            failure: failure\r\n        });\r\n    }\r\n    getAnnotations(serverUrl, path, currentUserOnly, success, failure) {\r\n        callApiMethodWithAuthentication.call(\r\n            this, {\r\n            attemptCount: 0,\r\n            serverUrl: serverUrl,\r\n            method: ApiMethods.GetAnnotations,\r\n            data: {\r\n                pathOrUid: path,\r\n                currentUserOnly: currentUserOnly\r\n            },\r\n            httpMethod: \"GET\",\r\n            success: success,\r\n            failure: failure\r\n        });\r\n    }\r\n    addAnnotation(serverUrl, path, classification, layerID, notes, geometry, color, success, failure) {\r\n        callApiMethodWithAuthentication.call(\r\n            this, {\r\n            attemptCount: 0,\r\n            serverUrl: serverUrl,\r\n            method: ApiMethods.AddAnnotation,\r\n            data: {\r\n                pathOrUid: path,\r\n                classification: classification,\r\n                layerID: layerID,\r\n                notes: notes,\r\n                geometry: geometry,\r\n                color: color\r\n            },\r\n            httpMethod: \"POST\",\r\n            contentType: \"application/json\",\r\n            success: success,\r\n            failure: failure\r\n        });\r\n    }\r\n    updateAnnotation(serverUrl, path, layerID, annotationID, notes, geometry, color, success, failure) {\r\n        callApiMethodWithAuthentication.call(\r\n            this, {\r\n            attemptCount: 0,\r\n            serverUrl: serverUrl,\r\n            method: ApiMethods.UpdateAnnotation,\r\n            data: {\r\n                pathOrUid: path,\r\n                layerID: layerID,\r\n                annotationID: annotationID,\r\n                notes: notes,\r\n                geometry: geometry,\r\n                color: color\r\n            },\r\n            httpMethod: \"POST\",\r\n            contentType: \"application/json\",\r\n            success: success,\r\n            failure: failure\r\n        });\r\n    }\r\n    saveAnnotations(serverUrl, path, added, updated, deleted, success, failure) {\r\n        callApiMethodWithAuthentication.call(\r\n            this, {\r\n            attemptCount: 0,\r\n            serverUrl: serverUrl,\r\n            method: ApiMethods.SaveAnnotations,\r\n            data: {\r\n                pathOrUid: path,\r\n                added: added,\r\n                updated: updated,\r\n                deleted: deleted\r\n            },\r\n            httpMethod: \"POST\",\r\n            contentType: \"application/json\",\r\n            success: success,\r\n            failure: failure\r\n        });\r\n    }\r\n    deleteAnnotation(serverUrl, path, layerID, annotationID, success, failure) {\r\n        callApiMethodWithAuthentication.call(\r\n            this, {\r\n            attemptCount: 0,\r\n            serverUrl: serverUrl,\r\n            method: ApiMethods.DeleteAnnotation,\r\n            data: {\r\n                pathOrUid: path,\r\n                layerID: layerID,\r\n                annotationID: annotationID\r\n            },\r\n            httpMethod: \"POST\",\r\n            contentType: \"application/json\",\r\n            success: success,\r\n            failure: failure\r\n        });\r\n    }\r\n    getFormDefinitions(serverUrl, formIDs, rootDirectoryAlias, success, failure) {\r\n        callApiMethodWithAuthentication.call(\r\n            this, {\r\n            attemptCount: 0,\r\n            serverUrl: serverUrl,\r\n            method: ApiMethods.GetFormDefinitions,\r\n            data: {\r\n                formIDs: formIDs instanceof Array ? formIDs.join(\",\") : formIDs,\r\n                rootDirectoryAlias: rootDirectoryAlias\r\n            },\r\n            httpMethod: \"GET\",\r\n            success: success,\r\n            failure: failure\r\n        });\r\n    }\r\n    getFormSubmissions(serverUrl, pathOrUids, formIDs, currentUserOnly, success, failure) {\r\n        callApiMethodWithAuthentication.call(\r\n            this, {\r\n            attemptCount: 0,\r\n            serverUrl: serverUrl,\r\n            method: ApiMethods.GetFormSubmissions,\r\n            data: {\r\n                pathOrUids: pathOrUids instanceof Array ? pathOrUids : [],\r\n                formIDs: formIDs instanceof Array ? formIDs : [],\r\n                currentUserOnly: currentUserOnly\r\n            },\r\n            httpMethod: \"POST\",\r\n            contentType: \"application/json\",\r\n            success: success,\r\n            failure: failure\r\n        });\r\n    }\r\n    saveFormDefinition(serverUrl, definition, success, failure) {\r\n        callApiMethodWithAuthentication.call(\r\n            this, {\r\n            attemptCount: 0,\r\n            serverUrl: serverUrl,\r\n            method: ApiMethods.SaveFormDefinition,\r\n            apiPath: \"admin\",\r\n            contentType: \"application/json\",\r\n            data: {\r\n                definition: definition\r\n            },\r\n            httpMethod: \"POST\",\r\n            success: success,\r\n            failure: failure\r\n        });\r\n    }\r\n    deleteFormDefinition(serverUrl, formID, success, failure) {\r\n        callApiMethodWithAuthentication.call(\r\n            this, {\r\n            attemptCount: 0,\r\n            serverUrl: serverUrl,\r\n            method: ApiMethods.DeleteFormDefinition,\r\n            apiPath: \"admin\",\r\n            data: {\r\n                formID: formID\r\n            },\r\n            httpMethod: \"GET\",\r\n            success: success,\r\n            failure: failure\r\n        });\r\n    }\r\n    getVersionInfo(serverUrl, success, failure) {\r\n        callApiMethod({\r\n            serverUrl: serverUrl,\r\n            method: ApiMethods.GetVersionInfo,\r\n            success: function (http) {\r\n                if (typeof success === \"function\") {\r\n                    var response = parseJson(http.responseText);\r\n                    success(response);\r\n                }\r\n            },\r\n            failure: function (http) {\r\n                if (typeof failure === \"function\") {\r\n                    if (http.responseText && http.responseText.length !== 0) {\r\n                        var response = parseJson(http.responseText);\r\n                        failure(response);\r\n                    }\r\n                    else {\r\n                        failure({ Message: Resources.translate(\"Get Version Info failed\") });\r\n                    }\r\n                }\r\n            }\r\n        });\r\n    }\r\n    /**\r\n    * Gets the events log from the server\r\n    * @param {Object} options - Parameters to pass to the GetEvents request\r\n    * @param {string} options.serverUrl - The server url to get events log\r\n    * @param {number} options.page - The page to fetch\r\n    * @param {number} options.pageSize - The page size to fetch\r\n    * @param {function} [options.success] - Called upon success\r\n    * @param {function} [options.failure] - Called upon failure\r\n    **/\r\n    getEvents(options, success, failure) {\r\n        callApiMethodWithAuthentication.call(\r\n            this, {\r\n            attemptCount: 0,\r\n            serverUrl: options.serverUrl,\r\n            method: ApiMethods.GetEvents,\r\n            apiPath: \"admin\",\r\n            data: {\r\n                page: options.page,\r\n                pageSize: options.pageSize\r\n            },\r\n            httpMethod: \"GET\",\r\n            success: success,\r\n            failure: failure\r\n        });\r\n    }\r\n    deAuthenticate(serverUrl, success, failure) {\r\n        var sessionId = null;\r\n        if (_sessionList.get().hasOwnProperty(serverUrl) && _sessionList.get()[serverUrl]) {\r\n            sessionId = _sessionList.get()[serverUrl].SessionId;\r\n            if (!sessionId) {\r\n                // nothing to do, no session ID cached, call success\r\n                if (typeof success === \"function\") {\r\n                    success();\r\n                    return;\r\n                }\r\n            }\r\n        }\r\n        else {\r\n            var cbFn = function (sId) {\r\n                sessionId = sId;\r\n            };\r\n\r\n            // there is no cached sessionId for this server check for a sessionLogin provider\r\n            for (var i = 0; i < this.authenticationProviders.length; i++) {\r\n                if (this.authenticationProviders[i] instanceof PMA.UI.Authentication.SessionLogin) {\r\n                    // check that this sessionLogin provider can handle the requested serverUrl\r\n                    if (this.authenticationProviders[i].authenticate(serverUrl, cbFn, null)) {\r\n                        break;\r\n                    }\r\n\r\n                    continue;\r\n                }\r\n            }\r\n        }\r\n\r\n        if (sessionId == null) {\r\n            // cannot handle this serverUrl just return\r\n            return;\r\n        }\r\n\r\n        _sessionList.set(serverUrl, null);\r\n\r\n        callApiMethod({\r\n            serverUrl: serverUrl,\r\n            method: ApiMethods.DeAuthenticate,\r\n            data: { sessionID: sessionId },\r\n            success: function (http) {\r\n                if (typeof success === \"function\") {\r\n                    success();\r\n                }\r\n            },\r\n            failure: function (http) {\r\n                if (typeof failure === \"function\") {\r\n                    if (http.responseText && http.responseText.length !== 0) {\r\n                        var response = parseJson(http.responseText);\r\n                        failure(response);\r\n                    }\r\n                    else {\r\n                        failure();\r\n                    }\r\n                }\r\n            }\r\n        });\r\n    }\r\n    queryFilename(serverUrl, path, pattern, success, failure) {\r\n        callApiMethodWithAuthentication.call(\r\n            this, {\r\n            attemptCount: 0,\r\n            serverUrl: serverUrl,\r\n            method: ApiMethods.QueryFilename,\r\n            apiPath: \"query\",\r\n            data: {\r\n                path: path,\r\n                pattern: pattern\r\n            },\r\n            httpMethod: \"GET\",\r\n            success: success,\r\n            failure: failure\r\n        });\r\n    }\r\n    /**\r\n    * Gets all distinct values for a field in aform\r\n    * @param {Object} options - Parameters to pass to the \"distinct values\" request\r\n    * @param {string} options.serverUrl - The server url to use\r\n    * @param {string} options.formId - The Form Id to use\r\n    * @param {string} options.fieldId - The Field Id to get distinct values for\r\n    * @param {function} [options.success] - Called upon success\r\n    * @param {function} [options.failure] - Called upon failure\r\n    **/\r\n    distinctValues(options) {\r\n        callApiMethodWithAuthentication.call(\r\n            this, {\r\n            attemptCount: 0,\r\n            serverUrl: options.serverUrl,\r\n            method: ApiMethods.DistinctValues,\r\n            apiPath: \"query\",\r\n            data: {\r\n                formID: options.formId,\r\n                fieldID: options.fieldId\r\n            },\r\n            httpMethod: \"GET\",\r\n            success: options.success,\r\n            failure: options.failure\r\n        });\r\n    }\r\n    /**\r\n    * Gets information for all slides specified\r\n    * @param {Object} options - Parameters to pass to the GetSlides request\r\n    * @param {string} options.serverUrl - The server url to get slides from\r\n    * @param {string[]} options.images - An array of image paths or uids to fetch information for\r\n    * @param {function} [options.success] - Called upon success\r\n    * @param {function} [options.failure] - Called upon failure\r\n    **/\r\n    getImagesInfo(options) {\r\n        callApiMethodWithAuthentication.call(\r\n            this, {\r\n            attemptCount: 0,\r\n            serverUrl: options.serverUrl,\r\n            method: ApiMethods.GetImagesInfo,\r\n            apiPath: \"api\",\r\n            data: {\r\n                pathOrUids: options.images\r\n            },\r\n            contentType: \"application/json\",\r\n            httpMethod: \"POST\",\r\n            success: options.success,\r\n            failure: options.failure\r\n        });\r\n    }\r\n    /**\r\n    * Gets slides that satisfy the specified expressions\r\n    * @param {Object} options - Parameters to pass to the \"distinct values\" request\r\n    * @param {string} options.serverUrl - The server url to use\r\n    * @param {Object[]} options.expressions - The Expressions to use\r\n    * @param {Number} options.expressions.FormID - The form Id for this expression\r\n    * @param {Number} options.expressions.FieldID - The field Id for this expression\r\n    * @param {Number} options.expressions.Operator - The Operator for this expression ( Equals = 0, LessThan = 1, LessThanOrEquals = 2, GreaterThan = 3, GreaterThanOrEquals = 4)\r\n    * @param {Number} options.expressions.Value - The value to compare for this expression\r\n    * @param {function} [options.success] - Called upon success\r\n    * @param {function} [options.failure] - Called upon failure\r\n    **/\r\n    metadata(options) {\r\n        callApiMethodWithAuthentication.call(\r\n            this, {\r\n            attemptCount: 0,\r\n            serverUrl: options.serverUrl,\r\n            method: ApiMethods.Metadata,\r\n            apiPath: \"query\",\r\n            data: {\r\n                expressions: options.expressions\r\n            },\r\n            httpMethod: \"POST\",\r\n            contentType: \"application/json\",\r\n            success: options.success,\r\n            failure: options.failure\r\n        });\r\n    }\r\n\r\n    /**\r\n    * Checks if a PMA.start server is available\r\n    * @param {function} success - The function to call when check succeded\r\n    * @param {function} failure - The function to call when check failed\r\n    **/\r\n    checkPmaStartServer(success, failure) {\r\n\r\n        callApiMethod({\r\n            method: ApiMethods.GetVersionInfo,\r\n            httpMethod: \"GET\",\r\n            serverUrl: PmaStartUrl,\r\n            success: function () {\r\n                if (typeof callback === \"function\") {\r\n                    success.call(this, true);\r\n                }\r\n            },\r\n            failure: function () {\r\n                if (typeof callback === \"function\") {\r\n                    failure.call(this, false);\r\n                }\r\n            }\r\n        });\r\n    };\r\n\r\n    /**\r\n    * Returns the url to PMA.start CORS allow page\r\n    * @return {string}\r\n    **/\r\n    getPmaStartCorsUrl() {\r\n        var url = PmaStartUrl + \"home/allowdomain/?host=\" + document.location.origin;\r\n        return url;\r\n    };\r\n\r\n    /**\r\n    * Gets slides that satisfy the specified expressions\r\n    * @param {Object} options - Parameters to pass to the \"distinct values\" request\r\n    * @param {string} options.serverUrl - The server url to use\r\n    * @param {string} options.name - The script name to run\r\n    * @param {object} [options.params] - Optional script parameters to pass\r\n    * @param {function} [options.success] - Called upon success\r\n    * @param {function} [options.failure] - Called upon failure\r\n    **/\r\n    runScript(options) {\r\n        callApiMethodWithAuthentication.call(\r\n            this, {\r\n            attemptCount: 0,\r\n            serverUrl: options.serverUrl,\r\n            method: ApiMethods.RunScripts,\r\n            apiPath: \"scripts\",\r\n            webapi: true,\r\n            data: Object.assign({\r\n                name: options.name,\r\n            }, options.params),\r\n            httpMethod: \"GET\",\r\n            success: options.success,\r\n            failure: options.failure\r\n        });\r\n    }\r\n\r\n    // registers an event listener\r\n    listen(eventName, callback) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" is not a valid event\");\r\n        }\r\n\r\n        this.listeners[eventName].push(callback);\r\n    }\r\n    fireEvent(eventName, eventArgs) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" does not exist\");\r\n            return;\r\n        }\r\n\r\n        for (var i = 0, max = this.listeners[eventName].length; i < max; i++) {\r\n            this.listeners[eventName][i](eventArgs);\r\n        }\r\n    }\r\n}\r\n\r\n// private methods\r\n\r\n// finds the first authentication provider that handles the requested server\r\n// and calls it's authenticate method \r\nfunction authenticateWithProvider(serverUrl, success, failure) {\r\n    // search all authentication providers apart from PromptLogin\r\n    var i = 0;\r\n    for (i = 0; i < this.authenticationProviders.length; i++) {\r\n        if (this.authenticationProviders[i] instanceof PromptLogin) {\r\n            continue;\r\n        }\r\n\r\n        if (this.authenticationProviders[i].authenticate(serverUrl, success, failure)) {\r\n            return;\r\n        }\r\n    }\r\n\r\n    // if none of the previous providers were able to provide a session, search for a PromptLogin and attempt to authenticate with it\r\n    for (i = 0; i < this.authenticationProviders.length; i++) {\r\n        if (this.authenticationProviders[i] instanceof PromptLogin) {\r\n            if (this.authenticationProviders[i].authenticate(serverUrl, success, failure)) {\r\n                return;\r\n            }\r\n\r\n            break;\r\n        }\r\n    }\r\n\r\n    // no provider found, call failure\r\n    if (typeof failure === \"function\") {\r\n        failure({ Message: Resources.translate(\"Authentication failed at server {serverUrl}.\", { serverUrl: serverUrl }) });\r\n    }\r\n}\r\n\r\n/**\r\n * calls an API method that requires a session ID. This method will first attempt to acquire \r\n * a session ID (possibly a cached one) and then call the requested method. \r\n * If the method call fails because the call was unauthorized (so possible the session ID was not good),\r\n * the method will be called again for a second time, this time forcing an authentication before the\r\n * actual call.\r\n * @param  {object} options - The parameters to pass to the ajax request\r\n * @param  {number} options.attemptCount - Current attempt count\r\n * @param  {string} options.serverUrl - The URL of the server to send the request to\r\n * @param  {string} options.method - The API method to call\r\n * @param  {object} options.data - The data to send\r\n * @param  {string} options.httpMethod - The HTTP method to use\r\n * @param  {string} options.contentType - The content type of the request\r\n * @param  {function} options.success - Called upon success\r\n * @param  {function} options.failure - Called upon failure\r\n * @param {string} [options.apiPath=\"api\"] - The API path to append to the server URL\r\n * @param {boolean} [options.webapi=false] - Whether the api call is a webapi call\r\n * @fires PMA.UI.Components.Events#SessionIdLoginFailed\r\n */\r\nfunction callApiMethodWithAuthentication(options) {\r\n    var _this = this;\r\n\r\n    if (!options.apiPath) {\r\n        options.apiPath = \"api\";\r\n    }\r\n\r\n    _this.getSession(options.serverUrl,\r\n        function (sessionId) {\r\n            // we have a session ID, try to call the actual method\r\n            options.data.sessionID = sessionId;\r\n\r\n            callApiMethod({\r\n                serverUrl: options.serverUrl,\r\n                method: options.method,\r\n                data: options.data,\r\n                contentType: options.contentType,\r\n                httpMethod: options.httpMethod,\r\n                apiPath: options.apiPath,\r\n                webapi: options.webapi,\r\n                success: function (http) {\r\n                    // the call succeeded, parse data and call success\r\n                    if (typeof options.success === \"function\") {\r\n                        var response = parseJson(http.responseText);\r\n                        options.success(options.data.sessionID, response);\r\n                    }\r\n                },\r\n                failure: function (http) {\r\n                    // failed, clean up the session ID that was possibly cached for this server\r\n                    _sessionList.set(options.serverUrl, null);\r\n\r\n                    // if it's the first attempt, try again, otherwise fail for good\r\n                    if (http.status == 0 && options.attemptCount === 0) {\r\n                        options.attemptCount = 1;\r\n                        callApiMethodWithAuthentication.call(_this, options);\r\n                    }\r\n                    else {\r\n                        if (typeof options.failure === \"function\") {\r\n                            if (http.responseText && http.responseText.length !== 0) {\r\n                                try {\r\n                                    var response = parseJson(http.responseText);\r\n                                    options.failure(response);\r\n                                    _this.fireEvent(Events.SessionIdLoginFailed, { serverUrl: options.serverUrl });\r\n                                }\r\n                                catch (ex) {\r\n                                    options.failure(http.responseText);\r\n                                    _this.fireEvent(Events.SessionIdLoginFailed, { serverUrl: options.serverUrl });\r\n                                }\r\n                            }\r\n                            else {\r\n                                options.failure({ Message: Resources.translate(\"Authentication failed\") });\r\n                                _this.fireEvent(Events.SessionIdLoginFailed, { serverUrl: options.serverUrl });\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            });\r\n        },\r\n        function (error) {\r\n            if (!error.Message && error.Reason) {\r\n                error.Message = error.Reason;\r\n            }\r\n\r\n            // session acquisition failed in the first place, so fail\r\n            if (typeof options.failure === \"function\") {\r\n                options.failure(error);\r\n            }\r\n\r\n            _this.fireEvent(Events.SessionIdLoginFailed, { serverUrl: options.serverUrl });\r\n        });\r\n}\r\n\r\n// legacy alias because of typo\r\nContext.prototype.GetImagesInfo = Context.prototype.getImagesInfo;\r\n\r\n\r\n\r\n\r\n","/**\n * @module ol/sphere\n */\nimport GeometryType from './geom/GeometryType.js';\nimport { toDegrees, toRadians } from './math.js';\n/**\n * Object literal with options for the {@link getLength} or {@link getArea}\n * functions.\n * @typedef {Object} SphereMetricOptions\n * @property {import(\"./proj.js\").ProjectionLike} [projection='EPSG:3857']\n * Projection of the  geometry.  By default, the geometry is assumed to be in\n * Web Mercator.\n * @property {number} [radius=6371008.8] Sphere radius.  By default, the\n * [mean Earth radius](https://en.wikipedia.org/wiki/Earth_radius#Mean_radius)\n * for the WGS84 ellipsoid is used.\n */\n/**\n * The mean Earth radius (1/3 * (2a + b)) for the WGS84 ellipsoid.\n * https://en.wikipedia.org/wiki/Earth_radius#Mean_radius\n * @type {number}\n */\nexport var DEFAULT_RADIUS = 6371008.8;\n/**\n * Get the great circle distance (in meters) between two geographic coordinates.\n * @param {Array} c1 Starting coordinate.\n * @param {Array} c2 Ending coordinate.\n * @param {number} [opt_radius] The sphere radius to use.  Defaults to the Earth's\n *     mean radius using the WGS84 ellipsoid.\n * @return {number} The great circle distance between the points (in meters).\n * @api\n */\nexport function getDistance(c1, c2, opt_radius) {\n    var radius = opt_radius || DEFAULT_RADIUS;\n    var lat1 = toRadians(c1[1]);\n    var lat2 = toRadians(c2[1]);\n    var deltaLatBy2 = (lat2 - lat1) / 2;\n    var deltaLonBy2 = toRadians(c2[0] - c1[0]) / 2;\n    var a = Math.sin(deltaLatBy2) * Math.sin(deltaLatBy2) +\n        Math.sin(deltaLonBy2) *\n            Math.sin(deltaLonBy2) *\n            Math.cos(lat1) *\n            Math.cos(lat2);\n    return 2 * radius * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n}\n/**\n * Get the cumulative great circle length of linestring coordinates (geographic).\n * @param {Array} coordinates Linestring coordinates.\n * @param {number} radius The sphere radius to use.\n * @return {number} The length (in meters).\n */\nfunction getLengthInternal(coordinates, radius) {\n    var length = 0;\n    for (var i = 0, ii = coordinates.length; i < ii - 1; ++i) {\n        length += getDistance(coordinates[i], coordinates[i + 1], radius);\n    }\n    return length;\n}\n/**\n * Get the spherical length of a geometry.  This length is the sum of the\n * great circle distances between coordinates.  For polygons, the length is\n * the sum of all rings.  For points, the length is zero.  For multi-part\n * geometries, the length is the sum of the length of each part.\n * @param {import(\"./geom/Geometry.js\").default} geometry A geometry.\n * @param {SphereMetricOptions} [opt_options] Options for the\n * length calculation.  By default, geometries are assumed to be in 'EPSG:3857'.\n * You can change this by providing a `projection` option.\n * @return {number} The spherical length (in meters).\n * @api\n */\nexport function getLength(geometry, opt_options) {\n    var options = opt_options || {};\n    var radius = options.radius || DEFAULT_RADIUS;\n    var projection = options.projection || 'EPSG:3857';\n    var type = geometry.getType();\n    if (type !== GeometryType.GEOMETRY_COLLECTION) {\n        geometry = geometry.clone().transform(projection, 'EPSG:4326');\n    }\n    var length = 0;\n    var coordinates, coords, i, ii, j, jj;\n    switch (type) {\n        case GeometryType.POINT:\n        case GeometryType.MULTI_POINT: {\n            break;\n        }\n        case GeometryType.LINE_STRING:\n        case GeometryType.LINEAR_RING: {\n            coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n            length = getLengthInternal(coordinates, radius);\n            break;\n        }\n        case GeometryType.MULTI_LINE_STRING:\n        case GeometryType.POLYGON: {\n            coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n            for (i = 0, ii = coordinates.length; i < ii; ++i) {\n                length += getLengthInternal(coordinates[i], radius);\n            }\n            break;\n        }\n        case GeometryType.MULTI_POLYGON: {\n            coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n            for (i = 0, ii = coordinates.length; i < ii; ++i) {\n                coords = coordinates[i];\n                for (j = 0, jj = coords.length; j < jj; ++j) {\n                    length += getLengthInternal(coords[j], radius);\n                }\n            }\n            break;\n        }\n        case GeometryType.GEOMETRY_COLLECTION: {\n            var geometries = \n            /** @type {import(\"./geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n            for (i = 0, ii = geometries.length; i < ii; ++i) {\n                length += getLength(geometries[i], opt_options);\n            }\n            break;\n        }\n        default: {\n            throw new Error('Unsupported geometry type: ' + type);\n        }\n    }\n    return length;\n}\n/**\n * Returns the spherical area for a list of coordinates.\n *\n * [Reference](https://trs.jpl.nasa.gov/handle/2014/40409)\n * Robert. G. Chamberlain and William H. Duquette, \"Some Algorithms for\n * Polygons on a Sphere\", JPL Publication 07-03, Jet Propulsion\n * Laboratory, Pasadena, CA, June 2007\n *\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates List of coordinates of a linear\n * ring. If the ring is oriented clockwise, the area will be positive,\n * otherwise it will be negative.\n * @param {number} radius The sphere radius.\n * @return {number} Area (in square meters).\n */\nfunction getAreaInternal(coordinates, radius) {\n    var area = 0;\n    var len = coordinates.length;\n    var x1 = coordinates[len - 1][0];\n    var y1 = coordinates[len - 1][1];\n    for (var i = 0; i < len; i++) {\n        var x2 = coordinates[i][0];\n        var y2 = coordinates[i][1];\n        area +=\n            toRadians(x2 - x1) *\n                (2 + Math.sin(toRadians(y1)) + Math.sin(toRadians(y2)));\n        x1 = x2;\n        y1 = y2;\n    }\n    return (area * radius * radius) / 2.0;\n}\n/**\n * Get the spherical area of a geometry.  This is the area (in meters) assuming\n * that polygon edges are segments of great circles on a sphere.\n * @param {import(\"./geom/Geometry.js\").default} geometry A geometry.\n * @param {SphereMetricOptions} [opt_options] Options for the area\n *     calculation.  By default, geometries are assumed to be in 'EPSG:3857'.\n *     You can change this by providing a `projection` option.\n * @return {number} The spherical area (in square meters).\n * @api\n */\nexport function getArea(geometry, opt_options) {\n    var options = opt_options || {};\n    var radius = options.radius || DEFAULT_RADIUS;\n    var projection = options.projection || 'EPSG:3857';\n    var type = geometry.getType();\n    if (type !== GeometryType.GEOMETRY_COLLECTION) {\n        geometry = geometry.clone().transform(projection, 'EPSG:4326');\n    }\n    var area = 0;\n    var coordinates, coords, i, ii, j, jj;\n    switch (type) {\n        case GeometryType.POINT:\n        case GeometryType.MULTI_POINT:\n        case GeometryType.LINE_STRING:\n        case GeometryType.MULTI_LINE_STRING:\n        case GeometryType.LINEAR_RING: {\n            break;\n        }\n        case GeometryType.POLYGON: {\n            coordinates = /** @type {import(\"./geom/Polygon.js\").default} */ (geometry).getCoordinates();\n            area = Math.abs(getAreaInternal(coordinates[0], radius));\n            for (i = 1, ii = coordinates.length; i < ii; ++i) {\n                area -= Math.abs(getAreaInternal(coordinates[i], radius));\n            }\n            break;\n        }\n        case GeometryType.MULTI_POLYGON: {\n            coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n            for (i = 0, ii = coordinates.length; i < ii; ++i) {\n                coords = coordinates[i];\n                area += Math.abs(getAreaInternal(coords[0], radius));\n                for (j = 1, jj = coords.length; j < jj; ++j) {\n                    area -= Math.abs(getAreaInternal(coords[j], radius));\n                }\n            }\n            break;\n        }\n        case GeometryType.GEOMETRY_COLLECTION: {\n            var geometries = \n            /** @type {import(\"./geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n            for (i = 0, ii = geometries.length; i < ii; ++i) {\n                area += getArea(geometries[i], opt_options);\n            }\n            break;\n        }\n        default: {\n            throw new Error('Unsupported geometry type: ' + type);\n        }\n    }\n    return area;\n}\n/**\n * Returns the coordinate at the given distance and bearing from `c1`.\n *\n * @param {import(\"./coordinate.js\").Coordinate} c1 The origin point (`[lon, lat]` in degrees).\n * @param {number} distance The great-circle distance between the origin\n *     point and the target point.\n * @param {number} bearing The bearing (in radians).\n * @param {number} [opt_radius] The sphere radius to use.  Defaults to the Earth's\n *     mean radius using the WGS84 ellipsoid.\n * @return {import(\"./coordinate.js\").Coordinate} The target point.\n */\nexport function offset(c1, distance, bearing, opt_radius) {\n    var radius = opt_radius || DEFAULT_RADIUS;\n    var lat1 = toRadians(c1[1]);\n    var lon1 = toRadians(c1[0]);\n    var dByR = distance / radius;\n    var lat = Math.asin(Math.sin(lat1) * Math.cos(dByR) +\n        Math.cos(lat1) * Math.sin(dByR) * Math.cos(bearing));\n    var lon = lon1 +\n        Math.atan2(Math.sin(bearing) * Math.sin(dByR) * Math.cos(lat1), Math.cos(dByR) - Math.sin(lat1) * Math.sin(lat));\n    return [toDegrees(lon), toDegrees(lat)];\n}\n//# sourceMappingURL=sphere.js.map","/**\n * @module ol/featureloader\n */\nimport FormatType from './format/FormatType.js';\nimport { VOID } from './functions.js';\n/**\n *\n * @type {boolean}\n * @private\n */\nvar withCredentials = false;\n/**\n * {@link module:ol/source/Vector} sources use a function of this type to\n * load features.\n *\n * This function takes up to 5 arguments. These are an {@link module:ol/extent~Extent} representing\n * the area to be loaded, a `{number}` representing the resolution (map units per pixel), an\n * {@link module:ol/proj/Projection} for the projection, an optional success callback that should get\n * the loaded features passed as an argument and an optional failure callback with no arguments. If\n * the callbacks are not used, the corresponding vector source will not fire `'featuresloadend'` and\n * `'featuresloaderror'` events. `this` within the function is bound to the\n * {@link module:ol/source/Vector} it's called from.\n *\n * The function is responsible for loading the features and adding them to the\n * source.\n * @typedef {function(this:(import(\"./source/Vector\").default|import(\"./VectorTile.js\").default),\n *           import(\"./extent.js\").Extent,\n *           number,\n *           import(\"./proj/Projection.js\").default,\n *           function(Array<import(\"./Feature.js\").default>): void=,\n *           function(): void=): void} FeatureLoader\n * @api\n */\n/**\n * {@link module:ol/source/Vector} sources use a function of this type to\n * get the url to load features from.\n *\n * This function takes an {@link module:ol/extent~Extent} representing the area\n * to be loaded, a `{number}` representing the resolution (map units per pixel)\n * and an {@link module:ol/proj/Projection} for the projection  as\n * arguments and returns a `{string}` representing the URL.\n * @typedef {function(import(\"./extent.js\").Extent, number, import(\"./proj/Projection.js\").default): string} FeatureUrlFunction\n * @api\n */\n/**\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {function(Array<import(\"./Feature.js\").default>, import(\"./proj/Projection.js\").default): void} success Success\n *      Function called with the loaded features and optionally with the data projection.\n * @param {function(): void} failure Failure\n *      Function called when loading failed.\n */\nexport function loadFeaturesXhr(url, format, extent, resolution, projection, success, failure) {\n    var xhr = new XMLHttpRequest();\n    xhr.open('GET', typeof url === 'function' ? url(extent, resolution, projection) : url, true);\n    if (format.getType() == FormatType.ARRAY_BUFFER) {\n        xhr.responseType = 'arraybuffer';\n    }\n    xhr.withCredentials = withCredentials;\n    /**\n     * @param {Event} event Event.\n     * @private\n     */\n    xhr.onload = function (event) {\n        // status will be 0 for file:// urls\n        if (!xhr.status || (xhr.status >= 200 && xhr.status < 300)) {\n            var type = format.getType();\n            /** @type {Document|Node|Object|string|undefined} */\n            var source = void 0;\n            if (type == FormatType.JSON || type == FormatType.TEXT) {\n                source = xhr.responseText;\n            }\n            else if (type == FormatType.XML) {\n                source = xhr.responseXML;\n                if (!source) {\n                    source = new DOMParser().parseFromString(xhr.responseText, 'application/xml');\n                }\n            }\n            else if (type == FormatType.ARRAY_BUFFER) {\n                source = /** @type {ArrayBuffer} */ (xhr.response);\n            }\n            if (source) {\n                success(\n                /** @type {Array<import(\"./Feature.js\").default>} */\n                (format.readFeatures(source, {\n                    extent: extent,\n                    featureProjection: projection,\n                })), format.readProjection(source));\n            }\n            else {\n                failure();\n            }\n        }\n        else {\n            failure();\n        }\n    };\n    /**\n     * @private\n     */\n    xhr.onerror = failure;\n    xhr.send();\n}\n/**\n * Create an XHR feature loader for a `url` and `format`. The feature loader\n * loads features (with XHR), parses the features, and adds them to the\n * vector source.\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @return {FeatureLoader} The feature loader.\n * @api\n */\nexport function xhr(url, format) {\n    /**\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {import(\"./proj/Projection.js\").default} projection Projection.\n     * @param {function(Array<import(\"./Feature.js\").default>): void} [success] Success\n     *      Function called when loading succeeded.\n     * @param {function(): void} [failure] Failure\n     *      Function called when loading failed.\n     * @this {import(\"./source/Vector\").default}\n     */\n    return function (extent, resolution, projection, success, failure) {\n        var source = /** @type {import(\"./source/Vector\").default} */ (this);\n        loadFeaturesXhr(url, format, extent, resolution, projection, \n        /**\n         * @param {Array<import(\"./Feature.js\").default>} features The loaded features.\n         * @param {import(\"./proj/Projection.js\").default} dataProjection Data\n         * projection.\n         */\n        function (features, dataProjection) {\n            source.addFeatures(features);\n            if (success !== undefined) {\n                success(features);\n            }\n        }, \n        /* FIXME handle error */ failure ? failure : VOID);\n    };\n}\n/**\n * Setter for the withCredentials configuration for the XHR.\n *\n * @param {boolean} xhrWithCredentials The value of withCredentials to set.\n * Compare https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/\n * @api\n */\nexport function setWithCredentials(xhrWithCredentials) {\n    withCredentials = xhrWithCredentials;\n}\n//# sourceMappingURL=featureloader.js.map","/**\n * @module ol/render/canvas/Immediate\n */\n// FIXME test, especially polygons with holes and multipolygons\n// FIXME need to handle large thick features (where pixel size matters)\n// FIXME add offset and end to ol/geom/flat/transform~transform2D?\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport GeometryType from '../../geom/GeometryType.js';\nimport VectorContext from '../VectorContext.js';\nimport { asColorLike } from '../../colorlike.js';\nimport { compose as composeTransform, create as createTransform, } from '../../transform.js';\nimport { defaultFillStyle, defaultFont, defaultLineCap, defaultLineDash, defaultLineDashOffset, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, defaultTextAlign, defaultTextBaseline, } from '../canvas.js';\nimport { equals } from '../../array.js';\nimport { intersects } from '../../extent.js';\nimport { transform2D } from '../../geom/flat/transform.js';\nimport { transformGeom2D } from '../../geom/SimpleGeometry.js';\n/**\n * @classdesc\n * A concrete subclass of {@link module:ol/render/VectorContext VectorContext} that implements\n * direct rendering of features and geometries to an HTML5 Canvas context.\n * Instances of this class are created internally by the library and\n * provided to application code as vectorContext member of the\n * {@link module:ol/render/Event~RenderEvent RenderEvent} object associated with postcompose, precompose and\n * render events emitted by layers and maps.\n */\nvar CanvasImmediateRenderer = /** @class */ (function (_super) {\n    __extends(CanvasImmediateRenderer, _super);\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../../extent.js\").Extent} extent Extent.\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     * @param {number} viewRotation View rotation.\n     * @param {number} [opt_squaredTolerance] Optional squared tolerance for simplification.\n     * @param {import(\"../../proj.js\").TransformFunction} [opt_userTransform] Transform from user to view projection.\n     */\n    function CanvasImmediateRenderer(context, pixelRatio, extent, transform, viewRotation, opt_squaredTolerance, opt_userTransform) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {CanvasRenderingContext2D}\n         */\n        _this.context_ = context;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.pixelRatio_ = pixelRatio;\n        /**\n         * @private\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.extent_ = extent;\n        /**\n         * @private\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.transform_ = transform;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.viewRotation_ = viewRotation;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.squaredTolerance_ = opt_squaredTolerance;\n        /**\n         * @private\n         * @type {import(\"../../proj.js\").TransformFunction}\n         */\n        _this.userTransform_ = opt_userTransform;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").FillState}\n         */\n        _this.contextFillState_ = null;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").StrokeState}\n         */\n        _this.contextStrokeState_ = null;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").TextState}\n         */\n        _this.contextTextState_ = null;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").FillState}\n         */\n        _this.fillState_ = null;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").StrokeState}\n         */\n        _this.strokeState_ = null;\n        /**\n         * @private\n         * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n         */\n        _this.image_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageAnchorX_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageAnchorY_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageHeight_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageOpacity_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageOriginX_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageOriginY_ = 0;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.imageRotateWithView_ = false;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageRotation_ = 0;\n        /**\n         * @private\n         * @type {import(\"../../size.js\").Size}\n         */\n        _this.imageScale_ = [0, 0];\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.imageWidth_ = 0;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.text_ = '';\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.textOffsetX_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.textOffsetY_ = 0;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.textRotateWithView_ = false;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.textRotation_ = 0;\n        /**\n         * @private\n         * @type {import(\"../../size.js\").Size}\n         */\n        _this.textScale_ = [0, 0];\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").FillState}\n         */\n        _this.textFillState_ = null;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").StrokeState}\n         */\n        _this.textStrokeState_ = null;\n        /**\n         * @private\n         * @type {?import(\"../canvas.js\").TextState}\n         */\n        _this.textState_ = null;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.pixelCoordinates_ = [];\n        /**\n         * @private\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.tmpLocalTransform_ = createTransform();\n        return _this;\n    }\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {number} end End.\n     * @param {number} stride Stride.\n     * @private\n     */\n    CanvasImmediateRenderer.prototype.drawImages_ = function (flatCoordinates, offset, end, stride) {\n        if (!this.image_) {\n            return;\n        }\n        var pixelCoordinates = transform2D(flatCoordinates, offset, end, stride, this.transform_, this.pixelCoordinates_);\n        var context = this.context_;\n        var localTransform = this.tmpLocalTransform_;\n        var alpha = context.globalAlpha;\n        if (this.imageOpacity_ != 1) {\n            context.globalAlpha = alpha * this.imageOpacity_;\n        }\n        var rotation = this.imageRotation_;\n        if (this.imageRotateWithView_) {\n            rotation += this.viewRotation_;\n        }\n        for (var i = 0, ii = pixelCoordinates.length; i < ii; i += 2) {\n            var x = pixelCoordinates[i] - this.imageAnchorX_;\n            var y = pixelCoordinates[i + 1] - this.imageAnchorY_;\n            if (rotation !== 0 ||\n                this.imageScale_[0] != 1 ||\n                this.imageScale_[1] != 1) {\n                var centerX = x + this.imageAnchorX_;\n                var centerY = y + this.imageAnchorY_;\n                composeTransform(localTransform, centerX, centerY, 1, 1, rotation, -centerX, -centerY);\n                context.setTransform.apply(context, localTransform);\n                context.translate(centerX, centerY);\n                context.scale(this.imageScale_[0], this.imageScale_[1]);\n                context.drawImage(this.image_, this.imageOriginX_, this.imageOriginY_, this.imageWidth_, this.imageHeight_, -this.imageAnchorX_, -this.imageAnchorY_, this.imageWidth_, this.imageHeight_);\n                context.setTransform(1, 0, 0, 1, 0, 0);\n            }\n            else {\n                context.drawImage(this.image_, this.imageOriginX_, this.imageOriginY_, this.imageWidth_, this.imageHeight_, x, y, this.imageWidth_, this.imageHeight_);\n            }\n        }\n        if (this.imageOpacity_ != 1) {\n            context.globalAlpha = alpha;\n        }\n    };\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {number} end End.\n     * @param {number} stride Stride.\n     * @private\n     */\n    CanvasImmediateRenderer.prototype.drawText_ = function (flatCoordinates, offset, end, stride) {\n        if (!this.textState_ || this.text_ === '') {\n            return;\n        }\n        if (this.textFillState_) {\n            this.setContextFillState_(this.textFillState_);\n        }\n        if (this.textStrokeState_) {\n            this.setContextStrokeState_(this.textStrokeState_);\n        }\n        this.setContextTextState_(this.textState_);\n        var pixelCoordinates = transform2D(flatCoordinates, offset, end, stride, this.transform_, this.pixelCoordinates_);\n        var context = this.context_;\n        var rotation = this.textRotation_;\n        if (this.textRotateWithView_) {\n            rotation += this.viewRotation_;\n        }\n        for (; offset < end; offset += stride) {\n            var x = pixelCoordinates[offset] + this.textOffsetX_;\n            var y = pixelCoordinates[offset + 1] + this.textOffsetY_;\n            if (rotation !== 0 ||\n                this.textScale_[0] != 1 ||\n                this.textScale_[1] != 1) {\n                var localTransform = composeTransform(this.tmpLocalTransform_, x, y, 1, 1, rotation, -x, -y);\n                context.setTransform.apply(context, localTransform);\n                context.translate(x, y);\n                context.scale(this.textScale_[0], this.textScale_[1]);\n                if (this.textStrokeState_) {\n                    context.strokeText(this.text_, 0, 0);\n                }\n                if (this.textFillState_) {\n                    context.fillText(this.text_, 0, 0);\n                }\n                context.setTransform(1, 0, 0, 1, 0, 0);\n            }\n            else {\n                if (this.textStrokeState_) {\n                    context.strokeText(this.text_, x, y);\n                }\n                if (this.textFillState_) {\n                    context.fillText(this.text_, x, y);\n                }\n            }\n        }\n    };\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {number} end End.\n     * @param {number} stride Stride.\n     * @param {boolean} close Close.\n     * @private\n     * @return {number} end End.\n     */\n    CanvasImmediateRenderer.prototype.moveToLineTo_ = function (flatCoordinates, offset, end, stride, close) {\n        var context = this.context_;\n        var pixelCoordinates = transform2D(flatCoordinates, offset, end, stride, this.transform_, this.pixelCoordinates_);\n        context.moveTo(pixelCoordinates[0], pixelCoordinates[1]);\n        var length = pixelCoordinates.length;\n        if (close) {\n            length -= 2;\n        }\n        for (var i = 2; i < length; i += 2) {\n            context.lineTo(pixelCoordinates[i], pixelCoordinates[i + 1]);\n        }\n        if (close) {\n            context.closePath();\n        }\n        return end;\n    };\n    /**\n     * @param {Array<number>} flatCoordinates Flat coordinates.\n     * @param {number} offset Offset.\n     * @param {Array<number>} ends Ends.\n     * @param {number} stride Stride.\n     * @private\n     * @return {number} End.\n     */\n    CanvasImmediateRenderer.prototype.drawRings_ = function (flatCoordinates, offset, ends, stride) {\n        for (var i = 0, ii = ends.length; i < ii; ++i) {\n            offset = this.moveToLineTo_(flatCoordinates, offset, ends[i], stride, true);\n        }\n        return offset;\n    };\n    /**\n     * Render a circle geometry into the canvas.  Rendering is immediate and uses\n     * the current fill and stroke styles.\n     *\n     * @param {import(\"../../geom/Circle.js\").default} geometry Circle geometry.\n     * @api\n     */\n    CanvasImmediateRenderer.prototype.drawCircle = function (geometry) {\n        if (!intersects(this.extent_, geometry.getExtent())) {\n            return;\n        }\n        if (this.fillState_ || this.strokeState_) {\n            if (this.fillState_) {\n                this.setContextFillState_(this.fillState_);\n            }\n            if (this.strokeState_) {\n                this.setContextStrokeState_(this.strokeState_);\n            }\n            var pixelCoordinates = transformGeom2D(geometry, this.transform_, this.pixelCoordinates_);\n            var dx = pixelCoordinates[2] - pixelCoordinates[0];\n            var dy = pixelCoordinates[3] - pixelCoordinates[1];\n            var radius = Math.sqrt(dx * dx + dy * dy);\n            var context = this.context_;\n            context.beginPath();\n            context.arc(pixelCoordinates[0], pixelCoordinates[1], radius, 0, 2 * Math.PI);\n            if (this.fillState_) {\n                context.fill();\n            }\n            if (this.strokeState_) {\n                context.stroke();\n            }\n        }\n        if (this.text_ !== '') {\n            this.drawText_(geometry.getCenter(), 0, 2, 2);\n        }\n    };\n    /**\n     * Set the rendering style.  Note that since this is an immediate rendering API,\n     * any `zIndex` on the provided style will be ignored.\n     *\n     * @param {import(\"../../style/Style.js\").default} style The rendering style.\n     * @api\n     */\n    CanvasImmediateRenderer.prototype.setStyle = function (style) {\n        this.setFillStrokeStyle(style.getFill(), style.getStroke());\n        this.setImageStyle(style.getImage());\n        this.setTextStyle(style.getText());\n    };\n    /**\n     * @param {import(\"../../transform.js\").Transform} transform Transform.\n     */\n    CanvasImmediateRenderer.prototype.setTransform = function (transform) {\n        this.transform_ = transform;\n    };\n    /**\n     * Render a geometry into the canvas.  Call\n     * {@link module:ol/render/canvas/Immediate~CanvasImmediateRenderer#setStyle renderer.setStyle()} first to set the rendering style.\n     *\n     * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry The geometry to render.\n     * @api\n     */\n    CanvasImmediateRenderer.prototype.drawGeometry = function (geometry) {\n        var type = geometry.getType();\n        switch (type) {\n            case GeometryType.POINT:\n                this.drawPoint(\n                /** @type {import(\"../../geom/Point.js\").default} */ (geometry));\n                break;\n            case GeometryType.LINE_STRING:\n                this.drawLineString(\n                /** @type {import(\"../../geom/LineString.js\").default} */ (geometry));\n                break;\n            case GeometryType.POLYGON:\n                this.drawPolygon(\n                /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry));\n                break;\n            case GeometryType.MULTI_POINT:\n                this.drawMultiPoint(\n                /** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry));\n                break;\n            case GeometryType.MULTI_LINE_STRING:\n                this.drawMultiLineString(\n                /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry));\n                break;\n            case GeometryType.MULTI_POLYGON:\n                this.drawMultiPolygon(\n                /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry));\n                break;\n            case GeometryType.GEOMETRY_COLLECTION:\n                this.drawGeometryCollection(\n                /** @type {import(\"../../geom/GeometryCollection.js\").default} */ (geometry));\n                break;\n            case GeometryType.CIRCLE:\n                this.drawCircle(\n                /** @type {import(\"../../geom/Circle.js\").default} */ (geometry));\n                break;\n            default:\n        }\n    };\n    /**\n     * Render a feature into the canvas.  Note that any `zIndex` on the provided\n     * style will be ignored - features are rendered immediately in the order that\n     * this method is called.  If you need `zIndex` support, you should be using an\n     * {@link module:ol/layer/Vector~VectorLayer VectorLayer} instead.\n     *\n     * @param {import(\"../../Feature.js\").default} feature Feature.\n     * @param {import(\"../../style/Style.js\").default} style Style.\n     * @api\n     */\n    CanvasImmediateRenderer.prototype.drawFeature = function (feature, style) {\n        var geometry = style.getGeometryFunction()(feature);\n        if (!geometry || !intersects(this.extent_, geometry.getExtent())) {\n            return;\n        }\n        this.setStyle(style);\n        this.drawGeometry(geometry);\n    };\n    /**\n     * Render a GeometryCollection to the canvas.  Rendering is immediate and\n     * uses the current styles appropriate for each geometry in the collection.\n     *\n     * @param {import(\"../../geom/GeometryCollection.js\").default} geometry Geometry collection.\n     */\n    CanvasImmediateRenderer.prototype.drawGeometryCollection = function (geometry) {\n        var geometries = geometry.getGeometriesArray();\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            this.drawGeometry(geometries[i]);\n        }\n    };\n    /**\n     * Render a Point geometry into the canvas.  Rendering is immediate and uses\n     * the current style.\n     *\n     * @param {import(\"../../geom/Point.js\").default|import(\"../Feature.js\").default} geometry Point geometry.\n     */\n    CanvasImmediateRenderer.prototype.drawPoint = function (geometry) {\n        if (this.squaredTolerance_) {\n            geometry = /** @type {import(\"../../geom/Point.js\").default} */ (geometry.simplifyTransformed(this.squaredTolerance_, this.userTransform_));\n        }\n        var flatCoordinates = geometry.getFlatCoordinates();\n        var stride = geometry.getStride();\n        if (this.image_) {\n            this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n        }\n        if (this.text_ !== '') {\n            this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n        }\n    };\n    /**\n     * Render a MultiPoint geometry  into the canvas.  Rendering is immediate and\n     * uses the current style.\n     *\n     * @param {import(\"../../geom/MultiPoint.js\").default|import(\"../Feature.js\").default} geometry MultiPoint geometry.\n     */\n    CanvasImmediateRenderer.prototype.drawMultiPoint = function (geometry) {\n        if (this.squaredTolerance_) {\n            geometry = /** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry.simplifyTransformed(this.squaredTolerance_, this.userTransform_));\n        }\n        var flatCoordinates = geometry.getFlatCoordinates();\n        var stride = geometry.getStride();\n        if (this.image_) {\n            this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n        }\n        if (this.text_ !== '') {\n            this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n        }\n    };\n    /**\n     * Render a LineString into the canvas.  Rendering is immediate and uses\n     * the current style.\n     *\n     * @param {import(\"../../geom/LineString.js\").default|import(\"../Feature.js\").default} geometry LineString geometry.\n     */\n    CanvasImmediateRenderer.prototype.drawLineString = function (geometry) {\n        if (this.squaredTolerance_) {\n            geometry = /** @type {import(\"../../geom/LineString.js\").default} */ (geometry.simplifyTransformed(this.squaredTolerance_, this.userTransform_));\n        }\n        if (!intersects(this.extent_, geometry.getExtent())) {\n            return;\n        }\n        if (this.strokeState_) {\n            this.setContextStrokeState_(this.strokeState_);\n            var context = this.context_;\n            var flatCoordinates = geometry.getFlatCoordinates();\n            context.beginPath();\n            this.moveToLineTo_(flatCoordinates, 0, flatCoordinates.length, geometry.getStride(), false);\n            context.stroke();\n        }\n        if (this.text_ !== '') {\n            var flatMidpoint = geometry.getFlatMidpoint();\n            this.drawText_(flatMidpoint, 0, 2, 2);\n        }\n    };\n    /**\n     * Render a MultiLineString geometry into the canvas.  Rendering is immediate\n     * and uses the current style.\n     *\n     * @param {import(\"../../geom/MultiLineString.js\").default|import(\"../Feature.js\").default} geometry MultiLineString geometry.\n     */\n    CanvasImmediateRenderer.prototype.drawMultiLineString = function (geometry) {\n        if (this.squaredTolerance_) {\n            geometry =\n                /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry.simplifyTransformed(this.squaredTolerance_, this.userTransform_));\n        }\n        var geometryExtent = geometry.getExtent();\n        if (!intersects(this.extent_, geometryExtent)) {\n            return;\n        }\n        if (this.strokeState_) {\n            this.setContextStrokeState_(this.strokeState_);\n            var context = this.context_;\n            var flatCoordinates = geometry.getFlatCoordinates();\n            var offset = 0;\n            var ends = /** @type {Array<number>} */ (geometry.getEnds());\n            var stride = geometry.getStride();\n            context.beginPath();\n            for (var i = 0, ii = ends.length; i < ii; ++i) {\n                offset = this.moveToLineTo_(flatCoordinates, offset, ends[i], stride, false);\n            }\n            context.stroke();\n        }\n        if (this.text_ !== '') {\n            var flatMidpoints = geometry.getFlatMidpoints();\n            this.drawText_(flatMidpoints, 0, flatMidpoints.length, 2);\n        }\n    };\n    /**\n     * Render a Polygon geometry into the canvas.  Rendering is immediate and uses\n     * the current style.\n     *\n     * @param {import(\"../../geom/Polygon.js\").default|import(\"../Feature.js\").default} geometry Polygon geometry.\n     */\n    CanvasImmediateRenderer.prototype.drawPolygon = function (geometry) {\n        if (this.squaredTolerance_) {\n            geometry = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry.simplifyTransformed(this.squaredTolerance_, this.userTransform_));\n        }\n        if (!intersects(this.extent_, geometry.getExtent())) {\n            return;\n        }\n        if (this.strokeState_ || this.fillState_) {\n            if (this.fillState_) {\n                this.setContextFillState_(this.fillState_);\n            }\n            if (this.strokeState_) {\n                this.setContextStrokeState_(this.strokeState_);\n            }\n            var context = this.context_;\n            context.beginPath();\n            this.drawRings_(geometry.getOrientedFlatCoordinates(), 0, \n            /** @type {Array<number>} */ (geometry.getEnds()), geometry.getStride());\n            if (this.fillState_) {\n                context.fill();\n            }\n            if (this.strokeState_) {\n                context.stroke();\n            }\n        }\n        if (this.text_ !== '') {\n            var flatInteriorPoint = geometry.getFlatInteriorPoint();\n            this.drawText_(flatInteriorPoint, 0, 2, 2);\n        }\n    };\n    /**\n     * Render MultiPolygon geometry into the canvas.  Rendering is immediate and\n     * uses the current style.\n     * @param {import(\"../../geom/MultiPolygon.js\").default} geometry MultiPolygon geometry.\n     */\n    CanvasImmediateRenderer.prototype.drawMultiPolygon = function (geometry) {\n        if (this.squaredTolerance_) {\n            geometry = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry.simplifyTransformed(this.squaredTolerance_, this.userTransform_));\n        }\n        if (!intersects(this.extent_, geometry.getExtent())) {\n            return;\n        }\n        if (this.strokeState_ || this.fillState_) {\n            if (this.fillState_) {\n                this.setContextFillState_(this.fillState_);\n            }\n            if (this.strokeState_) {\n                this.setContextStrokeState_(this.strokeState_);\n            }\n            var context = this.context_;\n            var flatCoordinates = geometry.getOrientedFlatCoordinates();\n            var offset = 0;\n            var endss = geometry.getEndss();\n            var stride = geometry.getStride();\n            context.beginPath();\n            for (var i = 0, ii = endss.length; i < ii; ++i) {\n                var ends = endss[i];\n                offset = this.drawRings_(flatCoordinates, offset, ends, stride);\n            }\n            if (this.fillState_) {\n                context.fill();\n            }\n            if (this.strokeState_) {\n                context.stroke();\n            }\n        }\n        if (this.text_ !== '') {\n            var flatInteriorPoints = geometry.getFlatInteriorPoints();\n            this.drawText_(flatInteriorPoints, 0, flatInteriorPoints.length, 2);\n        }\n    };\n    /**\n     * @param {import(\"../canvas.js\").FillState} fillState Fill state.\n     * @private\n     */\n    CanvasImmediateRenderer.prototype.setContextFillState_ = function (fillState) {\n        var context = this.context_;\n        var contextFillState = this.contextFillState_;\n        if (!contextFillState) {\n            context.fillStyle = fillState.fillStyle;\n            this.contextFillState_ = {\n                fillStyle: fillState.fillStyle,\n            };\n        }\n        else {\n            if (contextFillState.fillStyle != fillState.fillStyle) {\n                contextFillState.fillStyle = fillState.fillStyle;\n                context.fillStyle = fillState.fillStyle;\n            }\n        }\n    };\n    /**\n     * @param {import(\"../canvas.js\").StrokeState} strokeState Stroke state.\n     * @private\n     */\n    CanvasImmediateRenderer.prototype.setContextStrokeState_ = function (strokeState) {\n        var context = this.context_;\n        var contextStrokeState = this.contextStrokeState_;\n        if (!contextStrokeState) {\n            context.lineCap = strokeState.lineCap;\n            if (context.setLineDash) {\n                context.setLineDash(strokeState.lineDash);\n                context.lineDashOffset = strokeState.lineDashOffset;\n            }\n            context.lineJoin = strokeState.lineJoin;\n            context.lineWidth = strokeState.lineWidth;\n            context.miterLimit = strokeState.miterLimit;\n            context.strokeStyle = strokeState.strokeStyle;\n            this.contextStrokeState_ = {\n                lineCap: strokeState.lineCap,\n                lineDash: strokeState.lineDash,\n                lineDashOffset: strokeState.lineDashOffset,\n                lineJoin: strokeState.lineJoin,\n                lineWidth: strokeState.lineWidth,\n                miterLimit: strokeState.miterLimit,\n                strokeStyle: strokeState.strokeStyle,\n            };\n        }\n        else {\n            if (contextStrokeState.lineCap != strokeState.lineCap) {\n                contextStrokeState.lineCap = strokeState.lineCap;\n                context.lineCap = strokeState.lineCap;\n            }\n            if (context.setLineDash) {\n                if (!equals(contextStrokeState.lineDash, strokeState.lineDash)) {\n                    context.setLineDash((contextStrokeState.lineDash = strokeState.lineDash));\n                }\n                if (contextStrokeState.lineDashOffset != strokeState.lineDashOffset) {\n                    contextStrokeState.lineDashOffset = strokeState.lineDashOffset;\n                    context.lineDashOffset = strokeState.lineDashOffset;\n                }\n            }\n            if (contextStrokeState.lineJoin != strokeState.lineJoin) {\n                contextStrokeState.lineJoin = strokeState.lineJoin;\n                context.lineJoin = strokeState.lineJoin;\n            }\n            if (contextStrokeState.lineWidth != strokeState.lineWidth) {\n                contextStrokeState.lineWidth = strokeState.lineWidth;\n                context.lineWidth = strokeState.lineWidth;\n            }\n            if (contextStrokeState.miterLimit != strokeState.miterLimit) {\n                contextStrokeState.miterLimit = strokeState.miterLimit;\n                context.miterLimit = strokeState.miterLimit;\n            }\n            if (contextStrokeState.strokeStyle != strokeState.strokeStyle) {\n                contextStrokeState.strokeStyle = strokeState.strokeStyle;\n                context.strokeStyle = strokeState.strokeStyle;\n            }\n        }\n    };\n    /**\n     * @param {import(\"../canvas.js\").TextState} textState Text state.\n     * @private\n     */\n    CanvasImmediateRenderer.prototype.setContextTextState_ = function (textState) {\n        var context = this.context_;\n        var contextTextState = this.contextTextState_;\n        var textAlign = textState.textAlign\n            ? textState.textAlign\n            : defaultTextAlign;\n        if (!contextTextState) {\n            context.font = textState.font;\n            context.textAlign = /** @type {CanvasTextAlign} */ (textAlign);\n            context.textBaseline = /** @type {CanvasTextBaseline} */ (textState.textBaseline);\n            this.contextTextState_ = {\n                font: textState.font,\n                textAlign: textAlign,\n                textBaseline: textState.textBaseline,\n            };\n        }\n        else {\n            if (contextTextState.font != textState.font) {\n                contextTextState.font = textState.font;\n                context.font = textState.font;\n            }\n            if (contextTextState.textAlign != textAlign) {\n                contextTextState.textAlign = /** @type {CanvasTextAlign} */ (textAlign);\n                context.textAlign = /** @type {CanvasTextAlign} */ (textAlign);\n            }\n            if (contextTextState.textBaseline != textState.textBaseline) {\n                contextTextState.textBaseline = /** @type {CanvasTextBaseline} */ (textState.textBaseline);\n                context.textBaseline = /** @type {CanvasTextBaseline} */ (textState.textBaseline);\n            }\n        }\n    };\n    /**\n     * Set the fill and stroke style for subsequent draw operations.  To clear\n     * either fill or stroke styles, pass null for the appropriate parameter.\n     *\n     * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n     * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n     */\n    CanvasImmediateRenderer.prototype.setFillStrokeStyle = function (fillStyle, strokeStyle) {\n        var _this = this;\n        if (!fillStyle) {\n            this.fillState_ = null;\n        }\n        else {\n            var fillStyleColor = fillStyle.getColor();\n            this.fillState_ = {\n                fillStyle: asColorLike(fillStyleColor ? fillStyleColor : defaultFillStyle),\n            };\n        }\n        if (!strokeStyle) {\n            this.strokeState_ = null;\n        }\n        else {\n            var strokeStyleColor = strokeStyle.getColor();\n            var strokeStyleLineCap = strokeStyle.getLineCap();\n            var strokeStyleLineDash = strokeStyle.getLineDash();\n            var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n            var strokeStyleLineJoin = strokeStyle.getLineJoin();\n            var strokeStyleWidth = strokeStyle.getWidth();\n            var strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n            var lineDash = strokeStyleLineDash\n                ? strokeStyleLineDash\n                : defaultLineDash;\n            this.strokeState_ = {\n                lineCap: strokeStyleLineCap !== undefined\n                    ? strokeStyleLineCap\n                    : defaultLineCap,\n                lineDash: this.pixelRatio_ === 1\n                    ? lineDash\n                    : lineDash.map(function (n) { return n * _this.pixelRatio_; }),\n                lineDashOffset: (strokeStyleLineDashOffset\n                    ? strokeStyleLineDashOffset\n                    : defaultLineDashOffset) * this.pixelRatio_,\n                lineJoin: strokeStyleLineJoin !== undefined\n                    ? strokeStyleLineJoin\n                    : defaultLineJoin,\n                lineWidth: (strokeStyleWidth !== undefined\n                    ? strokeStyleWidth\n                    : defaultLineWidth) * this.pixelRatio_,\n                miterLimit: strokeStyleMiterLimit !== undefined\n                    ? strokeStyleMiterLimit\n                    : defaultMiterLimit,\n                strokeStyle: asColorLike(strokeStyleColor ? strokeStyleColor : defaultStrokeStyle),\n            };\n        }\n    };\n    /**\n     * Set the image style for subsequent draw operations.  Pass null to remove\n     * the image style.\n     *\n     * @param {import(\"../../style/Image.js\").default} imageStyle Image style.\n     */\n    CanvasImmediateRenderer.prototype.setImageStyle = function (imageStyle) {\n        var imageSize;\n        if (!imageStyle || !(imageSize = imageStyle.getSize())) {\n            this.image_ = null;\n            return;\n        }\n        var imageAnchor = imageStyle.getAnchor();\n        var imageOrigin = imageStyle.getOrigin();\n        this.image_ = imageStyle.getImage(this.pixelRatio_);\n        this.imageAnchorX_ = imageAnchor[0] * this.pixelRatio_;\n        this.imageAnchorY_ = imageAnchor[1] * this.pixelRatio_;\n        this.imageHeight_ = imageSize[1] * this.pixelRatio_;\n        this.imageOpacity_ = imageStyle.getOpacity();\n        this.imageOriginX_ = imageOrigin[0];\n        this.imageOriginY_ = imageOrigin[1];\n        this.imageRotateWithView_ = imageStyle.getRotateWithView();\n        this.imageRotation_ = imageStyle.getRotation();\n        this.imageScale_ = imageStyle.getScaleArray();\n        this.imageWidth_ = imageSize[0] * this.pixelRatio_;\n    };\n    /**\n     * Set the text style for subsequent draw operations.  Pass null to\n     * remove the text style.\n     *\n     * @param {import(\"../../style/Text.js\").default} textStyle Text style.\n     */\n    CanvasImmediateRenderer.prototype.setTextStyle = function (textStyle) {\n        if (!textStyle) {\n            this.text_ = '';\n        }\n        else {\n            var textFillStyle = textStyle.getFill();\n            if (!textFillStyle) {\n                this.textFillState_ = null;\n            }\n            else {\n                var textFillStyleColor = textFillStyle.getColor();\n                this.textFillState_ = {\n                    fillStyle: asColorLike(textFillStyleColor ? textFillStyleColor : defaultFillStyle),\n                };\n            }\n            var textStrokeStyle = textStyle.getStroke();\n            if (!textStrokeStyle) {\n                this.textStrokeState_ = null;\n            }\n            else {\n                var textStrokeStyleColor = textStrokeStyle.getColor();\n                var textStrokeStyleLineCap = textStrokeStyle.getLineCap();\n                var textStrokeStyleLineDash = textStrokeStyle.getLineDash();\n                var textStrokeStyleLineDashOffset = textStrokeStyle.getLineDashOffset();\n                var textStrokeStyleLineJoin = textStrokeStyle.getLineJoin();\n                var textStrokeStyleWidth = textStrokeStyle.getWidth();\n                var textStrokeStyleMiterLimit = textStrokeStyle.getMiterLimit();\n                this.textStrokeState_ = {\n                    lineCap: textStrokeStyleLineCap !== undefined\n                        ? textStrokeStyleLineCap\n                        : defaultLineCap,\n                    lineDash: textStrokeStyleLineDash\n                        ? textStrokeStyleLineDash\n                        : defaultLineDash,\n                    lineDashOffset: textStrokeStyleLineDashOffset\n                        ? textStrokeStyleLineDashOffset\n                        : defaultLineDashOffset,\n                    lineJoin: textStrokeStyleLineJoin !== undefined\n                        ? textStrokeStyleLineJoin\n                        : defaultLineJoin,\n                    lineWidth: textStrokeStyleWidth !== undefined\n                        ? textStrokeStyleWidth\n                        : defaultLineWidth,\n                    miterLimit: textStrokeStyleMiterLimit !== undefined\n                        ? textStrokeStyleMiterLimit\n                        : defaultMiterLimit,\n                    strokeStyle: asColorLike(textStrokeStyleColor ? textStrokeStyleColor : defaultStrokeStyle),\n                };\n            }\n            var textFont = textStyle.getFont();\n            var textOffsetX = textStyle.getOffsetX();\n            var textOffsetY = textStyle.getOffsetY();\n            var textRotateWithView = textStyle.getRotateWithView();\n            var textRotation = textStyle.getRotation();\n            var textScale = textStyle.getScaleArray();\n            var textText = textStyle.getText();\n            var textTextAlign = textStyle.getTextAlign();\n            var textTextBaseline = textStyle.getTextBaseline();\n            this.textState_ = {\n                font: textFont !== undefined ? textFont : defaultFont,\n                textAlign: textTextAlign !== undefined ? textTextAlign : defaultTextAlign,\n                textBaseline: textTextBaseline !== undefined\n                    ? textTextBaseline\n                    : defaultTextBaseline,\n            };\n            this.text_ = textText !== undefined ? textText : '';\n            this.textOffsetX_ =\n                textOffsetX !== undefined ? this.pixelRatio_ * textOffsetX : 0;\n            this.textOffsetY_ =\n                textOffsetY !== undefined ? this.pixelRatio_ * textOffsetY : 0;\n            this.textRotateWithView_ =\n                textRotateWithView !== undefined ? textRotateWithView : false;\n            this.textRotation_ = textRotation !== undefined ? textRotation : 0;\n            this.textScale_ = [\n                this.pixelRatio_ * textScale[0],\n                this.pixelRatio_ * textScale[1],\n            ];\n        }\n    };\n    return CanvasImmediateRenderer;\n}(VectorContext));\nexport default CanvasImmediateRenderer;\n//# sourceMappingURL=Immediate.js.map","/**\n * @module ol/render/Feature\n */\nimport GeometryType from '../geom/GeometryType.js';\nimport { compose as composeTransform, create as createTransform, } from '../transform.js';\nimport { createOrUpdateFromCoordinate, createOrUpdateFromFlatCoordinates, getCenter, getHeight, } from '../extent.js';\nimport { extend } from '../array.js';\nimport { getInteriorPointOfArray, getInteriorPointsOfMultiArray, } from '../geom/flat/interiorpoint.js';\nimport { get as getProjection } from '../proj.js';\nimport { interpolatePoint } from '../geom/flat/interpolate.js';\nimport { linearRingss as linearRingssCenter } from '../geom/flat/center.js';\nimport { transform2D } from '../geom/flat/transform.js';\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nvar tmpTransform = createTransform();\n/**\n * Lightweight, read-only, {@link module:ol/Feature~Feature} and {@link module:ol/geom/Geometry~Geometry} like\n * structure, optimized for vector tile rendering and styling. Geometry access\n * through the API is limited to getting the type and extent of the geometry.\n */\nvar RenderFeature = /** @class */ (function () {\n    /**\n     * @param {import(\"../geom/GeometryType.js\").default} type Geometry type.\n     * @param {Array<number>} flatCoordinates Flat coordinates. These always need\n     *     to be right-handed for polygons.\n     * @param {Array<number>|Array<Array<number>>} ends Ends or Endss.\n     * @param {Object<string, *>} properties Properties.\n     * @param {number|string|undefined} id Feature id.\n     */\n    function RenderFeature(type, flatCoordinates, ends, properties, id) {\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent|undefined}\n         */\n        this.extent_;\n        /**\n         * @private\n         * @type {number|string|undefined}\n         */\n        this.id_ = id;\n        /**\n         * @private\n         * @type {import(\"../geom/GeometryType.js\").default}\n         */\n        this.type_ = type;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.flatCoordinates_ = flatCoordinates;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.flatInteriorPoints_ = null;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.flatMidpoints_ = null;\n        /**\n         * @private\n         * @type {Array<number>|Array<Array<number>>}\n         */\n        this.ends_ = ends;\n        /**\n         * @private\n         * @type {Object<string, *>}\n         */\n        this.properties_ = properties;\n    }\n    /**\n     * Get a feature property by its key.\n     * @param {string} key Key\n     * @return {*} Value for the requested key.\n     * @api\n     */\n    RenderFeature.prototype.get = function (key) {\n        return this.properties_[key];\n    };\n    /**\n     * Get the extent of this feature's geometry.\n     * @return {import(\"../extent.js\").Extent} Extent.\n     * @api\n     */\n    RenderFeature.prototype.getExtent = function () {\n        if (!this.extent_) {\n            this.extent_ =\n                this.type_ === GeometryType.POINT\n                    ? createOrUpdateFromCoordinate(this.flatCoordinates_)\n                    : createOrUpdateFromFlatCoordinates(this.flatCoordinates_, 0, this.flatCoordinates_.length, 2);\n        }\n        return this.extent_;\n    };\n    /**\n     * @return {Array<number>} Flat interior points.\n     */\n    RenderFeature.prototype.getFlatInteriorPoint = function () {\n        if (!this.flatInteriorPoints_) {\n            var flatCenter = getCenter(this.getExtent());\n            this.flatInteriorPoints_ = getInteriorPointOfArray(this.flatCoordinates_, 0, \n            /** @type {Array<number>} */ (this.ends_), 2, flatCenter, 0);\n        }\n        return this.flatInteriorPoints_;\n    };\n    /**\n     * @return {Array<number>} Flat interior points.\n     */\n    RenderFeature.prototype.getFlatInteriorPoints = function () {\n        if (!this.flatInteriorPoints_) {\n            var flatCenters = linearRingssCenter(this.flatCoordinates_, 0, \n            /** @type {Array<Array<number>>} */ (this.ends_), 2);\n            this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(this.flatCoordinates_, 0, \n            /** @type {Array<Array<number>>} */ (this.ends_), 2, flatCenters);\n        }\n        return this.flatInteriorPoints_;\n    };\n    /**\n     * @return {Array<number>} Flat midpoint.\n     */\n    RenderFeature.prototype.getFlatMidpoint = function () {\n        if (!this.flatMidpoints_) {\n            this.flatMidpoints_ = interpolatePoint(this.flatCoordinates_, 0, this.flatCoordinates_.length, 2, 0.5);\n        }\n        return this.flatMidpoints_;\n    };\n    /**\n     * @return {Array<number>} Flat midpoints.\n     */\n    RenderFeature.prototype.getFlatMidpoints = function () {\n        if (!this.flatMidpoints_) {\n            this.flatMidpoints_ = [];\n            var flatCoordinates = this.flatCoordinates_;\n            var offset = 0;\n            var ends = /** @type {Array<number>} */ (this.ends_);\n            for (var i = 0, ii = ends.length; i < ii; ++i) {\n                var end = ends[i];\n                var midpoint = interpolatePoint(flatCoordinates, offset, end, 2, 0.5);\n                extend(this.flatMidpoints_, midpoint);\n                offset = end;\n            }\n        }\n        return this.flatMidpoints_;\n    };\n    /**\n     * Get the feature identifier.  This is a stable identifier for the feature and\n     * is set when reading data from a remote source.\n     * @return {number|string|undefined} Id.\n     * @api\n     */\n    RenderFeature.prototype.getId = function () {\n        return this.id_;\n    };\n    /**\n     * @return {Array<number>} Flat coordinates.\n     */\n    RenderFeature.prototype.getOrientedFlatCoordinates = function () {\n        return this.flatCoordinates_;\n    };\n    /**\n     * For API compatibility with {@link module:ol/Feature~Feature}, this method is useful when\n     * determining the geometry type in style function (see {@link #getType}).\n     * @return {RenderFeature} Feature.\n     * @api\n     */\n    RenderFeature.prototype.getGeometry = function () {\n        return this;\n    };\n    /**\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {RenderFeature} Simplified geometry.\n     */\n    RenderFeature.prototype.getSimplifiedGeometry = function (squaredTolerance) {\n        return this;\n    };\n    /**\n     * Get a transformed and simplified version of the geometry.\n     * @abstract\n     * @param {number} squaredTolerance Squared tolerance.\n     * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Optional transform function.\n     * @return {RenderFeature} Simplified geometry.\n     */\n    RenderFeature.prototype.simplifyTransformed = function (squaredTolerance, opt_transform) {\n        return this;\n    };\n    /**\n     * Get the feature properties.\n     * @return {Object<string, *>} Feature properties.\n     * @api\n     */\n    RenderFeature.prototype.getProperties = function () {\n        return this.properties_;\n    };\n    /**\n     * @return {number} Stride.\n     */\n    RenderFeature.prototype.getStride = function () {\n        return 2;\n    };\n    /**\n     * @return {undefined}\n     */\n    RenderFeature.prototype.getStyleFunction = function () {\n        return undefined;\n    };\n    /**\n     * Get the type of this feature's geometry.\n     * @return {import(\"../geom/GeometryType.js\").default} Geometry type.\n     * @api\n     */\n    RenderFeature.prototype.getType = function () {\n        return this.type_;\n    };\n    /**\n     * Transform geometry coordinates from tile pixel space to projected.\n     *\n     * @param {import(\"../proj.js\").ProjectionLike} projection The data projection\n     */\n    RenderFeature.prototype.transform = function (projection) {\n        projection = getProjection(projection);\n        var pixelExtent = projection.getExtent();\n        var projectedExtent = projection.getWorldExtent();\n        if (pixelExtent && projectedExtent) {\n            var scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n            composeTransform(tmpTransform, projectedExtent[0], projectedExtent[3], scale, -scale, 0, 0, 0);\n            transform2D(this.flatCoordinates_, 0, this.flatCoordinates_.length, 2, tmpTransform, this.flatCoordinates_);\n        }\n    };\n    /**\n     * @return {Array<number>|Array<Array<number>>} Ends or endss.\n     */\n    RenderFeature.prototype.getEnds = function () {\n        return this.ends_;\n    };\n    return RenderFeature;\n}());\nRenderFeature.prototype.getEndss = RenderFeature.prototype.getEnds;\n/**\n * @return {Array<number>} Flat coordinates.\n */\nRenderFeature.prototype.getFlatCoordinates =\n    RenderFeature.prototype.getOrientedFlatCoordinates;\nexport default RenderFeature;\n//# sourceMappingURL=Feature.js.map","import { feature } from '@turf/helpers';\nimport { getCoords, getType } from '@turf/invariant';\n\n/**\n * Removes redundant coordinates from any GeoJSON Geometry.\n *\n * @name cleanCoords\n * @param {Geometry|Feature} geojson Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated\n * @returns {Geometry|Feature} the cleaned input Feature/Geometry\n * @example\n * var line = turf.lineString([[0, 0], [0, 2], [0, 5], [0, 8], [0, 8], [0, 10]]);\n * var multiPoint = turf.multiPoint([[0, 0], [0, 0], [2, 2]]);\n *\n * turf.cleanCoords(line).geometry.coordinates;\n * //= [[0, 0], [0, 10]]\n *\n * turf.cleanCoords(multiPoint).geometry.coordinates;\n * //= [[0, 0], [2, 2]]\n */\nfunction cleanCoords(geojson, options) {\n    // Backwards compatible with v4.0\n    var mutate = (typeof options === 'object') ? options.mutate : options;\n    if (!geojson) throw new Error('geojson is required');\n    var type = getType(geojson);\n\n    // Store new \"clean\" points in this Array\n    var newCoords = [];\n\n    switch (type) {\n    case 'LineString':\n        newCoords = cleanLine(geojson);\n        break;\n    case 'MultiLineString':\n    case 'Polygon':\n        getCoords(geojson).forEach(function (line) {\n            newCoords.push(cleanLine(line));\n        });\n        break;\n    case 'MultiPolygon':\n        getCoords(geojson).forEach(function (polygons) {\n            var polyPoints = [];\n            polygons.forEach(function (ring) {\n                polyPoints.push(cleanLine(ring));\n            });\n            newCoords.push(polyPoints);\n        });\n        break;\n    case 'Point':\n        return geojson;\n    case 'MultiPoint':\n        var existing = {};\n        getCoords(geojson).forEach(function (coord) {\n            var key = coord.join('-');\n            if (!existing.hasOwnProperty(key)) {\n                newCoords.push(coord);\n                existing[key] = true;\n            }\n        });\n        break;\n    default:\n        throw new Error(type + ' geometry not supported');\n    }\n\n    // Support input mutation\n    if (geojson.coordinates) {\n        if (mutate === true) {\n            geojson.coordinates = newCoords;\n            return geojson;\n        }\n        return {type: type, coordinates: newCoords};\n    } else {\n        if (mutate === true) {\n            geojson.geometry.coordinates = newCoords;\n            return geojson;\n        }\n        return feature({type: type, coordinates: newCoords}, geojson.properties, geojson.bbox, geojson.id);\n    }\n}\n\n/**\n * Clean Coords\n *\n * @private\n * @param {Array<number>|LineString} line Line\n * @returns {Array<number>} Cleaned coordinates\n */\nfunction cleanLine(line) {\n    var points = getCoords(line);\n    // handle \"clean\" segment\n    if (points.length === 2 && !equals(points[0], points[1])) return points;\n\n    var prevPoint, point, nextPoint;\n    var newPoints = [];\n    var secondToLast = points.length - 1;\n\n    newPoints.push(points[0]);\n    for (var i = 1; i < secondToLast; i++) {\n        prevPoint = points[i - 1];\n        point = points[i];\n        nextPoint = points[i + 1];\n\n        if (!isPointOnLineSegment(prevPoint, nextPoint, point)) {\n            newPoints.push(point);\n        }\n    }\n    newPoints.push(nextPoint);\n    return newPoints;\n}\n\n/**\n * Compares two points and returns if they are equals\n *\n * @private\n * @param {Position} pt1 point\n * @param {Position} pt2 point\n * @returns {boolean} true if they are equals\n */\nfunction equals(pt1, pt2) {\n    return pt1[0] === pt2[0] && pt1[1] === pt2[1];\n}\n\n/**\n * Returns if `point` is on the segment between `start` and `end`.\n * Borrowed from `@turf/boolean-point-on-line` to speed up the evaluation (instead of using the module as dependency)\n *\n * @private\n * @param {Position} start coord pair of start of line\n * @param {Position} end coord pair of end of line\n * @param {Position} point coord pair of point to check\n * @returns {boolean} true/false\n */\nfunction isPointOnLineSegment(start, end, point) {\n    var x = point[0], y = point[1];\n    var startX = start[0], startY = start[1];\n    var endX = end[0], endY = end[1];\n\n    var dxc = x - startX;\n    var dyc = y - startY;\n    var dxl = endX - startX;\n    var dyl = endY - startY;\n    var cross = dxc * dyl - dyc * dxl;\n\n    if (cross !== 0) return false;\n    else if (Math.abs(dxl) >= Math.abs(dyl)) return dxl > 0 ? startX <= x && x <= endX : endX <= x && x <= startX;\n    else return dyl > 0 ? startY <= y && y <= endY : endY <= y && y <= startY;\n}\n\nexport default cleanCoords;\n","import { Control } from 'ol/control';\r\n\r\n/**\r\n * Displays the copyright attributions of slide, if any\r\n * @param {object} opt_options Options to initialize the copyright attribution control\r\n * @param {string} [opt_options.className] Classname of copyright attribution\r\n * @param {string} [opt_options.html] HTML code of copyright attribution\r\n */\r\nexport class PathomationAttribution extends Control {\r\n    constructor(opt_options) {\r\n        var options = opt_options || {};\r\n\r\n        var element = document.createElement('div');\r\n        element.className = (options.className || \"ol-attr\") + ' ol-unselectable';\r\n        element.innerHTML = options.html || \"\";\r\n\r\n        super({\r\n            element: element,\r\n            target: options.target\r\n        });\r\n    }\r\n}\r\n","import { login } from './components';\r\nimport $ from 'jquery';\r\nimport { Resources } from '../../resources/resources';\r\nimport { checkBrowserCompatibility } from '../../view/helpers';\r\n\r\n/**\r\n * PMA.UI.Authentication contains UI and utility components that authenticate against PMA.core\r\n * @namespace PMA.UI.Authentication\r\n */\r\n\r\nfunction loginClick(serverUrl, attempts) {\r\n    var self = this;\r\n\r\n    login(\r\n        serverUrl,\r\n        $(\"div.pma-ui-loginprompt input[type=text]\").val(),\r\n        $(\"div.pma-ui-loginprompt input[type=password]\").val(),\r\n        this.context.getCaller(),\r\n        function (sessionId) {\r\n            for (var i = 0; i < self.successCallbacks.length; i++) {\r\n                self.successCallbacks[i](sessionId);\r\n            }\r\n\r\n            self.active = false;\r\n            $(\"div.pma-ui-loginprompt\").remove();\r\n        },\r\n        function (error) {\r\n            if (!error.Message && error.Reason) {\r\n                error.Message = error.Reason;\r\n            }\r\n\r\n            if (attempts < 2) {\r\n                $(\"div.pma-ui-loginprompt .error\").html(error.Message);\r\n            }\r\n            else {\r\n                self.active = false;\r\n                for (var i = 0; i < self.failureCallbacks.length; i++) {\r\n                    self.failureCallbacks[i](error);\r\n                }\r\n\r\n                $(\"div.pma-ui-loginprompt\").remove();\r\n            }\r\n        });\r\n}\r\n/**\r\n* The callback function used to authenticate to a server url\r\n* @callback PromptLogin~serverNameCallback\r\n* @param  {string} serverUrl - The URL of the PMA.core server to find a friendly name for\r\n* @returns {string} A friendly name for the specified server url if found or null\r\n*/\r\n\r\nexport\r\n    /**\r\n     * Authenticates against a PMA.core server by prompting the user to enter credentials. Upon creation, the instance will register itself automatically as an authentication provider for the given context.\r\n     * @param  {Context} context\r\n     * @param {PromptLogin~serverNameCallback} serverNameCallback - A callback that takes a serverUrl as parameter and returns a frienly name for that server\r\n     * @tutorial 04-tree\r\n     */\r\n    class PromptLogin {\r\n    constructor(context, serverNameCallback) {\r\n        if (!checkBrowserCompatibility()) {\r\n            return;\r\n        }\r\n\r\n        this.context = context;\r\n        this.context.registerAuthenticationProvider(this);\r\n        this.active = false;\r\n        this.serverNameCallback = serverNameCallback;\r\n    }\r\n    /**\r\n     * Authenticates against a PMA.core server. This method is usually invoked by the context itself and should rarely be used outside it.\r\n     * @param  {string} serverUrl - The URL of the PMA.core server to authenticate against\r\n     * @param  {function} [success]\r\n     * @param  {function} [failure]\r\n     * @returns {boolean} - True or false depending on whether this instance has enough information to authenticate against this PMA.core server\r\n     */\r\n    authenticate(serverUrl, success, failure) {\r\n        if (!this.active) {\r\n            this.successCallbacks = [];\r\n            this.failureCallbacks = [];\r\n\r\n            if (typeof success === \"function\") {\r\n                this.successCallbacks.push(success);\r\n            }\r\n\r\n            if (typeof failure === \"function\") {\r\n                this.failureCallbacks.push(failure);\r\n            }\r\n\r\n            this.active = true;\r\n            var self = this;\r\n            var attempts = 0;\r\n\r\n            var name = serverUrl;\r\n            if (typeof this.serverNameCallback === \"function\") {\r\n                var r = this.serverNameCallback(serverUrl);\r\n                if (r && typeof r === \"string\") {\r\n                    name = r;\r\n                }\r\n            }\r\n\r\n            $(\"body\").append(\"<div class='pma-ui-loginprompt'>\" +\r\n                \"<div class='login-panel'>\" +\r\n                \"<div>\" +\r\n                \"<label>\" + name + \"</label>\" +\r\n                \"</div>\" +\r\n                \"<div>\" +\r\n                \"<input type='text' placeholder='\" + Resources.translate(\"Username\") + \"' />\" +\r\n                \"</div>\" +\r\n                \"<div>\" +\r\n                \"<input type='password' placeholder='\" + Resources.translate(\"Password\") + \"' />\" +\r\n                \"</div>\" +\r\n                \"<div class='error'></div>\" +\r\n                \"<div class='controls'>\" +\r\n                \"<input type='button' class='accept' value='\" + Resources.translate(\"OK\") + \"' />\" +\r\n                \"<input type='button' class='cancel' value='\" + Resources.translate(\"Cancel\") + \"' />\" +\r\n                \"</div>\" +\r\n                \"</div>\" +\r\n                \"</div>\");\r\n\r\n            $(\"div.pma-ui-loginprompt input[type=text], div.pma-ui-loginprompt input[type=password]\").keypress(function (e) {\r\n                if (e.which == 13) {\r\n                    e.preventDefault();\r\n                    loginClick.call(self, serverUrl, attempts++);\r\n                }\r\n            });\r\n\r\n            $(\"div.pma-ui-loginprompt input.accept\").click(function () {\r\n                loginClick.call(self, serverUrl, attempts++);\r\n            });\r\n\r\n            $(\"div.pma-ui-loginprompt input.cancel\").click(function () {\r\n                self.active = false;\r\n                for (var i = 0; i < self.failureCallbacks.length; i++) {\r\n                    self.failureCallbacks[i]({ Message: Resources.translate(\"Login cancelled\") });\r\n                }\r\n\r\n                $(\"div.pma-ui-loginprompt\").remove();\r\n            });\r\n        }\r\n        else {\r\n            if (typeof success === \"function\") {\r\n                this.successCallbacks.push(success);\r\n            }\r\n\r\n            if (typeof failure === \"function\") {\r\n                this.failureCallbacks.push(failure);\r\n            }\r\n        }\r\n\r\n        return true;\r\n    }\r\n}\r\n","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/TileQueue\n */\nimport EventType from './events/EventType.js';\nimport PriorityQueue, { DROP } from './structs/PriorityQueue.js';\nimport TileState from './TileState.js';\n/**\n * @typedef {function(import(\"./Tile.js\").default, string, import(\"./coordinate.js\").Coordinate, number): number} PriorityFunction\n */\nvar TileQueue = /** @class */ (function (_super) {\n    __extends(TileQueue, _super);\n    /**\n     * @param {PriorityFunction} tilePriorityFunction Tile priority function.\n     * @param {function(): ?} tileChangeCallback Function called on each tile change event.\n     */\n    function TileQueue(tilePriorityFunction, tileChangeCallback) {\n        var _this = _super.call(this, \n        /**\n         * @param {Array} element Element.\n         * @return {number} Priority.\n         */\n        function (element) {\n            return tilePriorityFunction.apply(null, element);\n        }, \n        /**\n         * @param {Array} element Element.\n         * @return {string} Key.\n         */\n        function (element) {\n            return /** @type {import(\"./Tile.js\").default} */ (element[0]).getKey();\n        }) || this;\n        /** @private */\n        _this.boundHandleTileChange_ = _this.handleTileChange.bind(_this);\n        /**\n         * @private\n         * @type {function(): ?}\n         */\n        _this.tileChangeCallback_ = tileChangeCallback;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.tilesLoading_ = 0;\n        /**\n         * @private\n         * @type {!Object<string,boolean>}\n         */\n        _this.tilesLoadingKeys_ = {};\n        return _this;\n    }\n    /**\n     * @param {Array} element Element.\n     * @return {boolean} The element was added to the queue.\n     */\n    TileQueue.prototype.enqueue = function (element) {\n        var added = _super.prototype.enqueue.call(this, element);\n        if (added) {\n            var tile = element[0];\n            tile.addEventListener(EventType.CHANGE, this.boundHandleTileChange_);\n        }\n        return added;\n    };\n    /**\n     * @return {number} Number of tiles loading.\n     */\n    TileQueue.prototype.getTilesLoading = function () {\n        return this.tilesLoading_;\n    };\n    /**\n     * @param {import(\"./events/Event.js\").default} event Event.\n     * @protected\n     */\n    TileQueue.prototype.handleTileChange = function (event) {\n        var tile = /** @type {import(\"./Tile.js\").default} */ (event.target);\n        var state = tile.getState();\n        if (state === TileState.LOADED ||\n            state === TileState.ERROR ||\n            state === TileState.EMPTY) {\n            tile.removeEventListener(EventType.CHANGE, this.boundHandleTileChange_);\n            var tileKey = tile.getKey();\n            if (tileKey in this.tilesLoadingKeys_) {\n                delete this.tilesLoadingKeys_[tileKey];\n                --this.tilesLoading_;\n            }\n            this.tileChangeCallback_();\n        }\n    };\n    /**\n     * @param {number} maxTotalLoading Maximum number tiles to load simultaneously.\n     * @param {number} maxNewLoads Maximum number of new tiles to load.\n     */\n    TileQueue.prototype.loadMoreTiles = function (maxTotalLoading, maxNewLoads) {\n        var newLoads = 0;\n        var state, tile, tileKey;\n        while (this.tilesLoading_ < maxTotalLoading &&\n            newLoads < maxNewLoads &&\n            this.getCount() > 0) {\n            tile = /** @type {import(\"./Tile.js\").default} */ (this.dequeue()[0]);\n            tileKey = tile.getKey();\n            state = tile.getState();\n            if (state === TileState.IDLE && !(tileKey in this.tilesLoadingKeys_)) {\n                this.tilesLoadingKeys_[tileKey] = true;\n                ++this.tilesLoading_;\n                ++newLoads;\n                tile.load();\n            }\n        }\n    };\n    return TileQueue;\n}(PriorityQueue));\nexport default TileQueue;\n/**\n * @param {import('./PluggableMap.js').FrameState} frameState Frame state.\n * @param {import(\"./Tile.js\").default} tile Tile.\n * @param {string} tileSourceKey Tile source key.\n * @param {import(\"./coordinate.js\").Coordinate} tileCenter Tile center.\n * @param {number} tileResolution Tile resolution.\n * @return {number} Tile priority.\n */\nexport function getTilePriority(frameState, tile, tileSourceKey, tileCenter, tileResolution) {\n    // Filter out tiles at higher zoom levels than the current zoom level, or that\n    // are outside the visible extent.\n    if (!frameState || !(tileSourceKey in frameState.wantedTiles)) {\n        return DROP;\n    }\n    if (!frameState.wantedTiles[tileSourceKey][tile.getKey()]) {\n        return DROP;\n    }\n    // Prioritize the highest zoom level tiles closest to the focus.\n    // Tiles at higher zoom levels are prioritized using Math.log(tileResolution).\n    // Within a zoom level, tiles are prioritized by the distance in pixels between\n    // the center of the tile and the center of the viewport.  The factor of 65536\n    // means that the prioritization should behave as desired for tiles up to\n    // 65536 * Math.log(2) = 45426 pixels from the focus.\n    var center = frameState.viewState.center;\n    var deltaX = tileCenter[0] - center[0];\n    var deltaY = tileCenter[1] - center[1];\n    return (65536 * Math.log(tileResolution) +\n        Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution);\n}\n//# sourceMappingURL=TileQueue.js.map","/**\n * @module ol/structs/PriorityQueue\n */\nimport { assert } from '../asserts.js';\nimport { clear } from '../obj.js';\n/**\n * @type {number}\n */\nexport var DROP = Infinity;\n/**\n * @classdesc\n * Priority queue.\n *\n * The implementation is inspired from the Closure Library's Heap class and\n * Python's heapq module.\n *\n * See https://github.com/google/closure-library/blob/master/closure/goog/structs/heap.js\n * and https://hg.python.org/cpython/file/2.7/Lib/heapq.py.\n *\n * @template T\n */\nvar PriorityQueue = /** @class */ (function () {\n    /**\n     * @param {function(T): number} priorityFunction Priority function.\n     * @param {function(T): string} keyFunction Key function.\n     */\n    function PriorityQueue(priorityFunction, keyFunction) {\n        /**\n         * @type {function(T): number}\n         * @private\n         */\n        this.priorityFunction_ = priorityFunction;\n        /**\n         * @type {function(T): string}\n         * @private\n         */\n        this.keyFunction_ = keyFunction;\n        /**\n         * @type {Array<T>}\n         * @private\n         */\n        this.elements_ = [];\n        /**\n         * @type {Array<number>}\n         * @private\n         */\n        this.priorities_ = [];\n        /**\n         * @type {!Object<string, boolean>}\n         * @private\n         */\n        this.queuedElements_ = {};\n    }\n    /**\n     * FIXME empty description for jsdoc\n     */\n    PriorityQueue.prototype.clear = function () {\n        this.elements_.length = 0;\n        this.priorities_.length = 0;\n        clear(this.queuedElements_);\n    };\n    /**\n     * Remove and return the highest-priority element. O(log N).\n     * @return {T} Element.\n     */\n    PriorityQueue.prototype.dequeue = function () {\n        var elements = this.elements_;\n        var priorities = this.priorities_;\n        var element = elements[0];\n        if (elements.length == 1) {\n            elements.length = 0;\n            priorities.length = 0;\n        }\n        else {\n            elements[0] = elements.pop();\n            priorities[0] = priorities.pop();\n            this.siftUp_(0);\n        }\n        var elementKey = this.keyFunction_(element);\n        delete this.queuedElements_[elementKey];\n        return element;\n    };\n    /**\n     * Enqueue an element. O(log N).\n     * @param {T} element Element.\n     * @return {boolean} The element was added to the queue.\n     */\n    PriorityQueue.prototype.enqueue = function (element) {\n        assert(!(this.keyFunction_(element) in this.queuedElements_), 31); // Tried to enqueue an `element` that was already added to the queue\n        var priority = this.priorityFunction_(element);\n        if (priority != DROP) {\n            this.elements_.push(element);\n            this.priorities_.push(priority);\n            this.queuedElements_[this.keyFunction_(element)] = true;\n            this.siftDown_(0, this.elements_.length - 1);\n            return true;\n        }\n        return false;\n    };\n    /**\n     * @return {number} Count.\n     */\n    PriorityQueue.prototype.getCount = function () {\n        return this.elements_.length;\n    };\n    /**\n     * Gets the index of the left child of the node at the given index.\n     * @param {number} index The index of the node to get the left child for.\n     * @return {number} The index of the left child.\n     * @private\n     */\n    PriorityQueue.prototype.getLeftChildIndex_ = function (index) {\n        return index * 2 + 1;\n    };\n    /**\n     * Gets the index of the right child of the node at the given index.\n     * @param {number} index The index of the node to get the right child for.\n     * @return {number} The index of the right child.\n     * @private\n     */\n    PriorityQueue.prototype.getRightChildIndex_ = function (index) {\n        return index * 2 + 2;\n    };\n    /**\n     * Gets the index of the parent of the node at the given index.\n     * @param {number} index The index of the node to get the parent for.\n     * @return {number} The index of the parent.\n     * @private\n     */\n    PriorityQueue.prototype.getParentIndex_ = function (index) {\n        return (index - 1) >> 1;\n    };\n    /**\n     * Make this a heap. O(N).\n     * @private\n     */\n    PriorityQueue.prototype.heapify_ = function () {\n        var i;\n        for (i = (this.elements_.length >> 1) - 1; i >= 0; i--) {\n            this.siftUp_(i);\n        }\n    };\n    /**\n     * @return {boolean} Is empty.\n     */\n    PriorityQueue.prototype.isEmpty = function () {\n        return this.elements_.length === 0;\n    };\n    /**\n     * @param {string} key Key.\n     * @return {boolean} Is key queued.\n     */\n    PriorityQueue.prototype.isKeyQueued = function (key) {\n        return key in this.queuedElements_;\n    };\n    /**\n     * @param {T} element Element.\n     * @return {boolean} Is queued.\n     */\n    PriorityQueue.prototype.isQueued = function (element) {\n        return this.isKeyQueued(this.keyFunction_(element));\n    };\n    /**\n     * @param {number} index The index of the node to move down.\n     * @private\n     */\n    PriorityQueue.prototype.siftUp_ = function (index) {\n        var elements = this.elements_;\n        var priorities = this.priorities_;\n        var count = elements.length;\n        var element = elements[index];\n        var priority = priorities[index];\n        var startIndex = index;\n        while (index < count >> 1) {\n            var lIndex = this.getLeftChildIndex_(index);\n            var rIndex = this.getRightChildIndex_(index);\n            var smallerChildIndex = rIndex < count && priorities[rIndex] < priorities[lIndex]\n                ? rIndex\n                : lIndex;\n            elements[index] = elements[smallerChildIndex];\n            priorities[index] = priorities[smallerChildIndex];\n            index = smallerChildIndex;\n        }\n        elements[index] = element;\n        priorities[index] = priority;\n        this.siftDown_(startIndex, index);\n    };\n    /**\n     * @param {number} startIndex The index of the root.\n     * @param {number} index The index of the node to move up.\n     * @private\n     */\n    PriorityQueue.prototype.siftDown_ = function (startIndex, index) {\n        var elements = this.elements_;\n        var priorities = this.priorities_;\n        var element = elements[index];\n        var priority = priorities[index];\n        while (index > startIndex) {\n            var parentIndex = this.getParentIndex_(index);\n            if (priorities[parentIndex] > priority) {\n                elements[index] = elements[parentIndex];\n                priorities[index] = priorities[parentIndex];\n                index = parentIndex;\n            }\n            else {\n                break;\n            }\n        }\n        elements[index] = element;\n        priorities[index] = priority;\n    };\n    /**\n     * FIXME empty description for jsdoc\n     */\n    PriorityQueue.prototype.reprioritize = function () {\n        var priorityFunction = this.priorityFunction_;\n        var elements = this.elements_;\n        var priorities = this.priorities_;\n        var index = 0;\n        var n = elements.length;\n        var element, i, priority;\n        for (i = 0; i < n; ++i) {\n            element = elements[i];\n            priority = priorityFunction(element);\n            if (priority == DROP) {\n                delete this.queuedElements_[this.keyFunction_(element)];\n            }\n            else {\n                priorities[index] = priority;\n                elements[index++] = element;\n            }\n        }\n        elements.length = index;\n        priorities.length = index;\n        this.heapify_();\n    };\n    return PriorityQueue;\n}());\nexport default PriorityQueue;\n//# sourceMappingURL=PriorityQueue.js.map","/**\n * @module ol/style/IconImage\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventTarget from '../events/Target.js';\nimport EventType from '../events/EventType.js';\nimport ImageState from '../ImageState.js';\nimport { asString } from '../color.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { shared as iconImageCache } from './IconImageCache.js';\nimport { listenImage } from '../Image.js';\n/**\n * @type {CanvasRenderingContext2D}\n */\nvar taintedTestContext = null;\nvar IconImage = /** @class */ (function (_super) {\n    __extends(IconImage, _super);\n    /**\n     * @param {HTMLImageElement|HTMLCanvasElement} image Image.\n     * @param {string|undefined} src Src.\n     * @param {import(\"../size.js\").Size} size Size.\n     * @param {?string} crossOrigin Cross origin.\n     * @param {import(\"../ImageState.js\").default} imageState Image state.\n     * @param {import(\"../color.js\").Color} color Color.\n     */\n    function IconImage(image, src, size, crossOrigin, imageState, color) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {HTMLImageElement|HTMLCanvasElement}\n         */\n        _this.hitDetectionImage_ = null;\n        /**\n         * @private\n         * @type {HTMLImageElement|HTMLCanvasElement}\n         */\n        _this.image_ = !image ? new Image() : image;\n        if (crossOrigin !== null) {\n            /** @type {HTMLImageElement} */ (_this.image_).crossOrigin = crossOrigin;\n        }\n        /**\n         * @private\n         * @type {Object<number, HTMLCanvasElement>}\n         */\n        _this.canvas_ = {};\n        /**\n         * @private\n         * @type {import(\"../color.js\").Color}\n         */\n        _this.color_ = color;\n        /**\n         * @private\n         * @type {?function():void}\n         */\n        _this.unlisten_ = null;\n        /**\n         * @private\n         * @type {import(\"../ImageState.js\").default}\n         */\n        _this.imageState_ = imageState;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.size_ = size;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.src_ = src;\n        /**\n         * @private\n         */\n        _this.tainted_;\n        return _this;\n    }\n    /**\n     * @private\n     * @return {boolean} The image canvas is tainted.\n     */\n    IconImage.prototype.isTainted_ = function () {\n        if (this.tainted_ === undefined && this.imageState_ === ImageState.LOADED) {\n            if (!taintedTestContext) {\n                taintedTestContext = createCanvasContext2D(1, 1);\n            }\n            taintedTestContext.drawImage(this.image_, 0, 0);\n            try {\n                taintedTestContext.getImageData(0, 0, 1, 1);\n                this.tainted_ = false;\n            }\n            catch (e) {\n                taintedTestContext = null;\n                this.tainted_ = true;\n            }\n        }\n        return this.tainted_ === true;\n    };\n    /**\n     * @private\n     */\n    IconImage.prototype.dispatchChangeEvent_ = function () {\n        this.dispatchEvent(EventType.CHANGE);\n    };\n    /**\n     * @private\n     */\n    IconImage.prototype.handleImageError_ = function () {\n        this.imageState_ = ImageState.ERROR;\n        this.unlistenImage_();\n        this.dispatchChangeEvent_();\n    };\n    /**\n     * @private\n     */\n    IconImage.prototype.handleImageLoad_ = function () {\n        this.imageState_ = ImageState.LOADED;\n        if (this.size_) {\n            this.image_.width = this.size_[0];\n            this.image_.height = this.size_[1];\n        }\n        else {\n            this.size_ = [this.image_.width, this.image_.height];\n        }\n        this.unlistenImage_();\n        this.dispatchChangeEvent_();\n    };\n    /**\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {HTMLImageElement|HTMLCanvasElement} Image or Canvas element.\n     */\n    IconImage.prototype.getImage = function (pixelRatio) {\n        this.replaceColor_(pixelRatio);\n        return this.canvas_[pixelRatio] ? this.canvas_[pixelRatio] : this.image_;\n    };\n    /**\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} Image or Canvas element.\n     */\n    IconImage.prototype.getPixelRatio = function (pixelRatio) {\n        this.replaceColor_(pixelRatio);\n        return this.canvas_[pixelRatio] ? pixelRatio : 1;\n    };\n    /**\n     * @return {import(\"../ImageState.js\").default} Image state.\n     */\n    IconImage.prototype.getImageState = function () {\n        return this.imageState_;\n    };\n    /**\n     * @return {HTMLImageElement|HTMLCanvasElement} Image element.\n     */\n    IconImage.prototype.getHitDetectionImage = function () {\n        if (!this.hitDetectionImage_) {\n            if (this.isTainted_()) {\n                var width = this.size_[0];\n                var height = this.size_[1];\n                var context = createCanvasContext2D(width, height);\n                context.fillRect(0, 0, width, height);\n                this.hitDetectionImage_ = context.canvas;\n            }\n            else {\n                this.hitDetectionImage_ = this.image_;\n            }\n        }\n        return this.hitDetectionImage_;\n    };\n    /**\n     * Get the size of the icon (in pixels).\n     * @return {import(\"../size.js\").Size} Image size.\n     */\n    IconImage.prototype.getSize = function () {\n        return this.size_;\n    };\n    /**\n     * @return {string|undefined} Image src.\n     */\n    IconImage.prototype.getSrc = function () {\n        return this.src_;\n    };\n    /**\n     * Load not yet loaded URI.\n     */\n    IconImage.prototype.load = function () {\n        if (this.imageState_ == ImageState.IDLE) {\n            this.imageState_ = ImageState.LOADING;\n            try {\n                /** @type {HTMLImageElement} */ (this.image_).src = this.src_;\n            }\n            catch (e) {\n                this.handleImageError_();\n            }\n            this.unlisten_ = listenImage(this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this));\n        }\n    };\n    /**\n     * @param {number} pixelRatio Pixel ratio.\n     * @private\n     */\n    IconImage.prototype.replaceColor_ = function (pixelRatio) {\n        if (!this.color_ || this.canvas_[pixelRatio]) {\n            return;\n        }\n        var canvas = document.createElement('canvas');\n        this.canvas_[pixelRatio] = canvas;\n        canvas.width = Math.ceil(this.image_.width * pixelRatio);\n        canvas.height = Math.ceil(this.image_.height * pixelRatio);\n        var ctx = canvas.getContext('2d');\n        ctx.scale(pixelRatio, pixelRatio);\n        ctx.drawImage(this.image_, 0, 0);\n        ctx.globalCompositeOperation = 'multiply';\n        // Internet Explorer 11 does not support the multiply operation.\n        // If the canvas is tainted in Internet Explorer this still produces\n        // a solid color image with the shape of the icon.\n        if (ctx.globalCompositeOperation === 'multiply' || this.isTainted_()) {\n            ctx.fillStyle = asString(this.color_);\n            ctx.fillRect(0, 0, canvas.width / pixelRatio, canvas.height / pixelRatio);\n            ctx.globalCompositeOperation = 'destination-in';\n            ctx.drawImage(this.image_, 0, 0);\n        }\n        else {\n            var imgData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n            var data = imgData.data;\n            var r = this.color_[0] / 255.0;\n            var g = this.color_[1] / 255.0;\n            var b = this.color_[2] / 255.0;\n            var a = this.color_[3];\n            for (var i = 0, ii = data.length; i < ii; i += 4) {\n                data[i] *= r;\n                data[i + 1] *= g;\n                data[i + 2] *= b;\n                data[i + 3] *= a;\n            }\n            ctx.putImageData(imgData, 0, 0);\n        }\n    };\n    /**\n     * Discards event handlers which listen for load completion or errors.\n     *\n     * @private\n     */\n    IconImage.prototype.unlistenImage_ = function () {\n        if (this.unlisten_) {\n            this.unlisten_();\n            this.unlisten_ = null;\n        }\n    };\n    return IconImage;\n}(EventTarget));\n/**\n * @param {HTMLImageElement|HTMLCanvasElement} image Image.\n * @param {string} src Src.\n * @param {import(\"../size.js\").Size} size Size.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../ImageState.js\").default} imageState Image state.\n * @param {import(\"../color.js\").Color} color Color.\n * @return {IconImage} Icon image.\n */\nexport function get(image, src, size, crossOrigin, imageState, color) {\n    var iconImage = iconImageCache.get(src, crossOrigin, color);\n    if (!iconImage) {\n        iconImage = new IconImage(image, src, size, crossOrigin, imageState, color);\n        iconImageCache.set(src, crossOrigin, color, iconImage);\n    }\n    return iconImage;\n}\nexport default IconImage;\n//# sourceMappingURL=IconImage.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Group\n */\nimport BaseLayer from './Base.js';\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport EventType from '../events/EventType.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport SourceState from '../source/State.js';\nimport { assert } from '../asserts.js';\nimport { assign, clear } from '../obj.js';\nimport { getIntersection } from '../extent.js';\nimport { getUid } from '../util.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @typedef {Object} Options\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {Array<import(\"./Base.js\").default>|import(\"../Collection.js\").default<import(\"./Base.js\").default>} [layers] Child layers.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n    LAYERS: 'layers',\n};\n/**\n * @classdesc\n * A {@link module:ol/Collection~Collection} of layers that are handled together.\n *\n * A generic `change` event is triggered when the group/Collection changes.\n *\n * @api\n */\nvar LayerGroup = /** @class */ (function (_super) {\n    __extends(LayerGroup, _super);\n    /**\n     * @param {Options} [opt_options] Layer options.\n     */\n    function LayerGroup(opt_options) {\n        var _this = this;\n        var options = opt_options || {};\n        var baseOptions = /** @type {Options} */ (assign({}, options));\n        delete baseOptions.layers;\n        var layers = options.layers;\n        _this = _super.call(this, baseOptions) || this;\n        /**\n         * @private\n         * @type {Array<import(\"../events.js\").EventsKey>}\n         */\n        _this.layersListenerKeys_ = [];\n        /**\n         * @private\n         * @type {Object<string, Array<import(\"../events.js\").EventsKey>>}\n         */\n        _this.listenerKeys_ = {};\n        _this.addChangeListener(Property.LAYERS, _this.handleLayersChanged_);\n        if (layers) {\n            if (Array.isArray(layers)) {\n                layers = new Collection(layers.slice(), { unique: true });\n            }\n            else {\n                assert(typeof ( /** @type {?} */(layers).getArray) === 'function', 43); // Expected `layers` to be an array or a `Collection`\n            }\n        }\n        else {\n            layers = new Collection(undefined, { unique: true });\n        }\n        _this.setLayers(layers);\n        return _this;\n    }\n    /**\n     * @private\n     */\n    LayerGroup.prototype.handleLayerChange_ = function () {\n        this.changed();\n    };\n    /**\n     * @private\n     */\n    LayerGroup.prototype.handleLayersChanged_ = function () {\n        this.layersListenerKeys_.forEach(unlistenByKey);\n        this.layersListenerKeys_.length = 0;\n        var layers = this.getLayers();\n        this.layersListenerKeys_.push(listen(layers, CollectionEventType.ADD, this.handleLayersAdd_, this), listen(layers, CollectionEventType.REMOVE, this.handleLayersRemove_, this));\n        for (var id in this.listenerKeys_) {\n            this.listenerKeys_[id].forEach(unlistenByKey);\n        }\n        clear(this.listenerKeys_);\n        var layersArray = layers.getArray();\n        for (var i = 0, ii = layersArray.length; i < ii; i++) {\n            var layer = layersArray[i];\n            this.listenerKeys_[getUid(layer)] = [\n                listen(layer, ObjectEventType.PROPERTYCHANGE, this.handleLayerChange_, this),\n                listen(layer, EventType.CHANGE, this.handleLayerChange_, this),\n            ];\n        }\n        this.changed();\n    };\n    /**\n     * @param {import(\"../Collection.js\").CollectionEvent} collectionEvent CollectionEvent.\n     * @private\n     */\n    LayerGroup.prototype.handleLayersAdd_ = function (collectionEvent) {\n        var layer = /** @type {import(\"./Base.js\").default} */ (collectionEvent.element);\n        this.listenerKeys_[getUid(layer)] = [\n            listen(layer, ObjectEventType.PROPERTYCHANGE, this.handleLayerChange_, this),\n            listen(layer, EventType.CHANGE, this.handleLayerChange_, this),\n        ];\n        this.changed();\n    };\n    /**\n     * @param {import(\"../Collection.js\").CollectionEvent} collectionEvent CollectionEvent.\n     * @private\n     */\n    LayerGroup.prototype.handleLayersRemove_ = function (collectionEvent) {\n        var layer = /** @type {import(\"./Base.js\").default} */ (collectionEvent.element);\n        var key = getUid(layer);\n        this.listenerKeys_[key].forEach(unlistenByKey);\n        delete this.listenerKeys_[key];\n        this.changed();\n    };\n    /**\n     * Returns the {@link module:ol/Collection collection} of {@link module:ol/layer/Layer~Layer layers}\n     * in this group.\n     * @return {!import(\"../Collection.js\").default<import(\"./Base.js\").default>} Collection of\n     *   {@link module:ol/layer/Base layers} that are part of this group.\n     * @observable\n     * @api\n     */\n    LayerGroup.prototype.getLayers = function () {\n        return /** @type {!import(\"../Collection.js\").default<import(\"./Base.js\").default>} */ (this.get(Property.LAYERS));\n    };\n    /**\n     * Set the {@link module:ol/Collection collection} of {@link module:ol/layer/Layer~Layer layers}\n     * in this group.\n     * @param {!import(\"../Collection.js\").default<import(\"./Base.js\").default>} layers Collection of\n     *   {@link module:ol/layer/Base layers} that are part of this group.\n     * @observable\n     * @api\n     */\n    LayerGroup.prototype.setLayers = function (layers) {\n        this.set(Property.LAYERS, layers);\n    };\n    /**\n     * @param {Array<import(\"./Layer.js\").default>} [opt_array] Array of layers (to be modified in place).\n     * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n     */\n    LayerGroup.prototype.getLayersArray = function (opt_array) {\n        var array = opt_array !== undefined ? opt_array : [];\n        this.getLayers().forEach(function (layer) {\n            layer.getLayersArray(array);\n        });\n        return array;\n    };\n    /**\n     * Get the layer states list and use this groups z-index as the default\n     * for all layers in this and nested groups, if it is unset at this point.\n     * If opt_states is not provided and this group's z-index is undefined\n     * 0 is used a the default z-index.\n     * @param {Array<import(\"./Layer.js\").State>} [opt_states] Optional list\n     * of layer states (to be modified in place).\n     * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n     */\n    LayerGroup.prototype.getLayerStatesArray = function (opt_states) {\n        var states = opt_states !== undefined ? opt_states : [];\n        var pos = states.length;\n        this.getLayers().forEach(function (layer) {\n            layer.getLayerStatesArray(states);\n        });\n        var ownLayerState = this.getLayerState();\n        var defaultZIndex = ownLayerState.zIndex;\n        if (!opt_states && ownLayerState.zIndex === undefined) {\n            defaultZIndex = 0;\n        }\n        for (var i = pos, ii = states.length; i < ii; i++) {\n            var layerState = states[i];\n            layerState.opacity *= ownLayerState.opacity;\n            layerState.visible = layerState.visible && ownLayerState.visible;\n            layerState.maxResolution = Math.min(layerState.maxResolution, ownLayerState.maxResolution);\n            layerState.minResolution = Math.max(layerState.minResolution, ownLayerState.minResolution);\n            layerState.minZoom = Math.max(layerState.minZoom, ownLayerState.minZoom);\n            layerState.maxZoom = Math.min(layerState.maxZoom, ownLayerState.maxZoom);\n            if (ownLayerState.extent !== undefined) {\n                if (layerState.extent !== undefined) {\n                    layerState.extent = getIntersection(layerState.extent, ownLayerState.extent);\n                }\n                else {\n                    layerState.extent = ownLayerState.extent;\n                }\n            }\n            if (layerState.zIndex === undefined) {\n                layerState.zIndex = defaultZIndex;\n            }\n        }\n        return states;\n    };\n    /**\n     * @return {import(\"../source/State.js\").default} Source state.\n     */\n    LayerGroup.prototype.getSourceState = function () {\n        return SourceState.READY;\n    };\n    return LayerGroup;\n}(BaseLayer));\nexport default LayerGroup;\n//# sourceMappingURL=Group.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/DragPan\n */\nimport PointerInteraction, { centroid as centroidFromPointers, } from './Pointer.js';\nimport { FALSE } from '../functions.js';\nimport { all, focusWithTabindex, noModifierKeys, primaryAction, } from '../events/condition.js';\nimport { easeOut } from '../easing.js';\nimport { rotate as rotateCoordinate, scale as scaleCoordinate, } from '../coordinate.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition.noModifierKeys} and {@link module:ol/events/condition.primaryAction}.\n * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,\n * the interaction will only handle events when the map has the focus.\n * @property {import(\"../Kinetic.js\").default} [kinetic] Kinetic inertia to apply to the pan.\n */\n/**\n * @classdesc\n * Allows the user to pan the map by dragging the map.\n * @api\n */\nvar DragPan = /** @class */ (function (_super) {\n    __extends(DragPan, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function DragPan(opt_options) {\n        var _this = _super.call(this, {\n            stopDown: FALSE,\n        }) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         * @type {import(\"../Kinetic.js\").default|undefined}\n         */\n        _this.kinetic_ = options.kinetic;\n        /**\n         * @type {import(\"../pixel.js\").Pixel}\n         */\n        _this.lastCentroid = null;\n        /**\n         * @type {number}\n         */\n        _this.lastPointersCount_;\n        /**\n         * @type {boolean}\n         */\n        _this.panning_ = false;\n        var condition = options.condition\n            ? options.condition\n            : all(noModifierKeys, primaryAction);\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.onFocusOnly\n            ? all(focusWithTabindex, condition)\n            : condition;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.noKinetic_ = false;\n        return _this;\n    }\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     */\n    DragPan.prototype.handleDragEvent = function (mapBrowserEvent) {\n        if (!this.panning_) {\n            this.panning_ = true;\n            this.getMap().getView().beginInteraction();\n        }\n        var targetPointers = this.targetPointers;\n        var centroid = centroidFromPointers(targetPointers);\n        if (targetPointers.length == this.lastPointersCount_) {\n            if (this.kinetic_) {\n                this.kinetic_.update(centroid[0], centroid[1]);\n            }\n            if (this.lastCentroid) {\n                var delta = [\n                    this.lastCentroid[0] - centroid[0],\n                    centroid[1] - this.lastCentroid[1],\n                ];\n                var map = mapBrowserEvent.map;\n                var view = map.getView();\n                scaleCoordinate(delta, view.getResolution());\n                rotateCoordinate(delta, view.getRotation());\n                view.adjustCenterInternal(delta);\n            }\n        }\n        else if (this.kinetic_) {\n            // reset so we don't overestimate the kinetic energy after\n            // after one finger down, tiny drag, second finger down\n            this.kinetic_.begin();\n        }\n        this.lastCentroid = centroid;\n        this.lastPointersCount_ = targetPointers.length;\n        mapBrowserEvent.originalEvent.preventDefault();\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragPan.prototype.handleUpEvent = function (mapBrowserEvent) {\n        var map = mapBrowserEvent.map;\n        var view = map.getView();\n        if (this.targetPointers.length === 0) {\n            if (!this.noKinetic_ && this.kinetic_ && this.kinetic_.end()) {\n                var distance = this.kinetic_.getDistance();\n                var angle = this.kinetic_.getAngle();\n                var center = view.getCenterInternal();\n                var centerpx = map.getPixelFromCoordinateInternal(center);\n                var dest = map.getCoordinateFromPixelInternal([\n                    centerpx[0] - distance * Math.cos(angle),\n                    centerpx[1] - distance * Math.sin(angle),\n                ]);\n                view.animateInternal({\n                    center: view.getConstrainedCenter(dest),\n                    duration: 500,\n                    easing: easeOut,\n                });\n            }\n            if (this.panning_) {\n                this.panning_ = false;\n                view.endInteraction();\n            }\n            return false;\n        }\n        else {\n            if (this.kinetic_) {\n                // reset so we don't overestimate the kinetic energy after\n                // after one finger up, tiny drag, second finger up\n                this.kinetic_.begin();\n            }\n            this.lastCentroid = null;\n            return true;\n        }\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Event.\n     * @return {boolean} If the event was consumed.\n     */\n    DragPan.prototype.handleDownEvent = function (mapBrowserEvent) {\n        if (this.targetPointers.length > 0 && this.condition_(mapBrowserEvent)) {\n            var map = mapBrowserEvent.map;\n            var view = map.getView();\n            this.lastCentroid = null;\n            // stop any current animation\n            if (view.getAnimating()) {\n                view.cancelAnimations();\n            }\n            if (this.kinetic_) {\n                this.kinetic_.begin();\n            }\n            // No kinetic as soon as more than one pointer on the screen is\n            // detected. This is to prevent nasty pans after pinch.\n            this.noKinetic_ = this.targetPointers.length > 1;\n            return true;\n        }\n        else {\n            return false;\n        }\n    };\n    return DragPan;\n}(PointerInteraction));\nexport default DragPan;\n//# sourceMappingURL=DragPan.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Translate\n */\nimport Collection from '../Collection.js';\nimport Event from '../events/Event.js';\nimport InteractionProperty from './Property.js';\nimport PointerInteraction from './Pointer.js';\nimport { TRUE } from '../functions.js';\nimport { always } from '../events/condition.js';\nimport { includes } from '../array.js';\n/**\n * @enum {string}\n */\nvar TranslateEventType = {\n    /**\n     * Triggered upon feature translation start.\n     * @event TranslateEvent#translatestart\n     * @api\n     */\n    TRANSLATESTART: 'translatestart',\n    /**\n     * Triggered upon feature translation.\n     * @event TranslateEvent#translating\n     * @api\n     */\n    TRANSLATING: 'translating',\n    /**\n     * Triggered upon feature translation end.\n     * @event TranslateEvent#translateend\n     * @api\n     */\n    TRANSLATEEND: 'translateend',\n};\n/**\n * A function that takes an {@link module:ol/Feature} or\n * {@link module:ol/render/Feature} and an\n * {@link module:ol/layer/Layer} and returns `true` if the feature may be\n * translated or `false` otherwise.\n * @typedef {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default):boolean} FilterFunction\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition.always}.\n * @property {Collection<import(\"../Feature.js\").default>} [features] Only features contained in this collection will be able to be translated. If\n * not specified, all features on the map will be able to be translated.\n * @property {Array<import(\"../layer/Layer.js\").default>|function(import(\"../layer/Layer.js\").default): boolean} [layers] A list of layers from which features should be\n * translated. Alternatively, a filter function can be provided. The\n * function will be called for each layer in the map and should return\n * `true` for layers that you want to be translatable. If the option is\n * absent, all visible layers will be considered translatable.\n * @property {FilterFunction} [filter] A function\n * that takes an {@link module:ol/Feature} and an\n * {@link module:ol/layer/Layer} and returns `true` if the feature may be\n * translated or `false` otherwise.\n * @property {number} [hitTolerance=0] Hit-detection tolerance. Pixels inside the radius around the given position\n * will be checked for features.\n */\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Translate~Translate} instances\n * are instances of this type.\n */\nvar TranslateEvent = /** @class */ (function (_super) {\n    __extends(TranslateEvent, _super);\n    /**\n     * @param {TranslateEventType} type Type.\n     * @param {Collection<import(\"../Feature.js\").default>} features The features translated.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate The event coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} startCoordinate The original coordinates before.translation started\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     */\n    function TranslateEvent(type, features, coordinate, startCoordinate, mapBrowserEvent) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The features being translated.\n         * @type {Collection<import(\"../Feature.js\").default>}\n         * @api\n         */\n        _this.features = features;\n        /**\n         * The coordinate of the drag event.\n         * @const\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @api\n         */\n        _this.coordinate = coordinate;\n        /**\n         * The coordinate of the start position before translation started.\n         * @const\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @api\n         */\n        _this.startCoordinate = startCoordinate;\n        /**\n         * Associated {@link module:ol/MapBrowserEvent}.\n         * @type {import(\"../MapBrowserEvent.js\").default}\n         * @api\n         */\n        _this.mapBrowserEvent = mapBrowserEvent;\n        return _this;\n    }\n    return TranslateEvent;\n}(Event));\nexport { TranslateEvent };\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types|\n *     'change:active', import(\"../Object\").ObjectEvent, Return> &\n *   import(\"../Observable\").OnSignature<'translateend'|'translatestart'|'translating', TranslateEvent, Return> &\n *   import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"../ObjectEventType\").Types|\n *     'change:active'|'translateend'|'translatestart'|'translating', Return>} TranslateOnSignature\n */\n/**\n * @classdesc\n * Interaction for translating (moving) features.\n *\n * @fires TranslateEvent\n * @api\n */\nvar Translate = /** @class */ (function (_super) {\n    __extends(Translate, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function Translate(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, /** @type {import(\"./Pointer.js\").Options} */ (options)) || this;\n        /***\n         * @type {TranslateOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {TranslateOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {TranslateOnSignature<void>}\n         */\n        _this.un;\n        /**\n         * The last position we translated to.\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.lastCoordinate_ = null;\n        /**\n         * The start position before translation started.\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.startCoordinate_ = null;\n        /**\n         * @type {Collection<import(\"../Feature.js\").default>}\n         * @private\n         */\n        _this.features_ = options.features !== undefined ? options.features : null;\n        /** @type {function(import(\"../layer/Layer.js\").default): boolean} */\n        var layerFilter;\n        if (options.layers) {\n            if (typeof options.layers === 'function') {\n                layerFilter = options.layers;\n            }\n            else {\n                var layers_1 = options.layers;\n                layerFilter = function (layer) {\n                    return includes(layers_1, layer);\n                };\n            }\n        }\n        else {\n            layerFilter = TRUE;\n        }\n        /**\n         * @private\n         * @type {function(import(\"../layer/Layer.js\").default): boolean}\n         */\n        _this.layerFilter_ = layerFilter;\n        /**\n         * @private\n         * @type {FilterFunction}\n         */\n        _this.filter_ = options.filter ? options.filter : TRUE;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : always;\n        /**\n         * @type {import(\"../Feature.js\").default}\n         * @private\n         */\n        _this.lastFeature_ = null;\n        _this.addChangeListener(InteractionProperty.ACTIVE, _this.handleActiveChanged_);\n        return _this;\n    }\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Translate.prototype.handleDownEvent = function (event) {\n        if (!event.originalEvent || !this.condition_(event)) {\n            return false;\n        }\n        this.lastFeature_ = this.featuresAtPixel_(event.pixel, event.map);\n        if (!this.lastCoordinate_ && this.lastFeature_) {\n            this.startCoordinate_ = event.coordinate;\n            this.lastCoordinate_ = event.coordinate;\n            this.handleMoveEvent(event);\n            var features = this.features_ || new Collection([this.lastFeature_]);\n            this.dispatchEvent(new TranslateEvent(TranslateEventType.TRANSLATESTART, features, event.coordinate, this.startCoordinate_, event));\n            return true;\n        }\n        return false;\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Translate.prototype.handleUpEvent = function (event) {\n        if (this.lastCoordinate_) {\n            this.lastCoordinate_ = null;\n            this.handleMoveEvent(event);\n            var features = this.features_ || new Collection([this.lastFeature_]);\n            this.dispatchEvent(new TranslateEvent(TranslateEventType.TRANSLATEEND, features, event.coordinate, this.startCoordinate_, event));\n            // cleanup\n            this.startCoordinate_ = null;\n            return true;\n        }\n        return false;\n    };\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     */\n    Translate.prototype.handleDragEvent = function (event) {\n        if (this.lastCoordinate_) {\n            var newCoordinate = event.coordinate;\n            var deltaX_1 = newCoordinate[0] - this.lastCoordinate_[0];\n            var deltaY_1 = newCoordinate[1] - this.lastCoordinate_[1];\n            var features = this.features_ || new Collection([this.lastFeature_]);\n            features.forEach(function (feature) {\n                var geom = feature.getGeometry();\n                geom.translate(deltaX_1, deltaY_1);\n                feature.setGeometry(geom);\n            });\n            this.lastCoordinate_ = newCoordinate;\n            this.dispatchEvent(new TranslateEvent(TranslateEventType.TRANSLATING, features, newCoordinate, this.startCoordinate_, event));\n        }\n    };\n    /**\n     * Handle pointer move events.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     */\n    Translate.prototype.handleMoveEvent = function (event) {\n        var elem = event.map.getViewport();\n        // Change the cursor to grab/grabbing if hovering any of the features managed\n        // by the interaction\n        if (this.featuresAtPixel_(event.pixel, event.map)) {\n            elem.classList.remove(this.lastCoordinate_ ? 'ol-grab' : 'ol-grabbing');\n            elem.classList.add(this.lastCoordinate_ ? 'ol-grabbing' : 'ol-grab');\n        }\n        else {\n            elem.classList.remove('ol-grab', 'ol-grabbing');\n        }\n    };\n    /**\n     * Tests to see if the given coordinates intersects any of our selected\n     * features.\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel coordinate to test for intersection.\n     * @param {import(\"../PluggableMap.js\").default} map Map to test the intersection on.\n     * @return {import(\"../Feature.js\").default} Returns the feature found at the specified pixel\n     * coordinates.\n     * @private\n     */\n    Translate.prototype.featuresAtPixel_ = function (pixel, map) {\n        return map.forEachFeatureAtPixel(pixel, function (feature, layer) {\n            if (this.filter_(feature, layer)) {\n                if (!this.features_ || includes(this.features_.getArray(), feature)) {\n                    return feature;\n                }\n            }\n        }.bind(this), {\n            layerFilter: this.layerFilter_,\n            hitTolerance: this.hitTolerance_,\n        });\n    };\n    /**\n     * Returns the Hit-detection tolerance.\n     * @return {number} Hit tolerance in pixels.\n     * @api\n     */\n    Translate.prototype.getHitTolerance = function () {\n        return this.hitTolerance_;\n    };\n    /**\n     * Hit-detection tolerance. Pixels inside the radius around the given position\n     * will be checked for features.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @api\n     */\n    Translate.prototype.setHitTolerance = function (hitTolerance) {\n        this.hitTolerance_ = hitTolerance;\n    };\n    /**\n     * Remove the interaction from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    Translate.prototype.setMap = function (map) {\n        var oldMap = this.getMap();\n        _super.prototype.setMap.call(this, map);\n        this.updateState_(oldMap);\n    };\n    /**\n     * @private\n     */\n    Translate.prototype.handleActiveChanged_ = function () {\n        this.updateState_(null);\n    };\n    /**\n     * @param {import(\"../PluggableMap.js\").default} oldMap Old map.\n     * @private\n     */\n    Translate.prototype.updateState_ = function (oldMap) {\n        var map = this.getMap();\n        var active = this.getActive();\n        if (!map || !active) {\n            map = map || oldMap;\n            if (map) {\n                var elem = map.getViewport();\n                elem.classList.remove('ol-grab', 'ol-grabbing');\n            }\n        }\n    };\n    return Translate;\n}(PointerInteraction));\nexport default Translate;\n//# sourceMappingURL=Translate.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/EsriJSON\n */\nimport Feature from '../Feature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport JSONFeature from './JSONFeature.js';\nimport LineString from '../geom/LineString.js';\nimport LinearRing from '../geom/LinearRing.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport { assert } from '../asserts.js';\nimport { assign, isEmpty } from '../obj.js';\nimport { containsExtent } from '../extent.js';\nimport { deflateCoordinates } from '../geom/flat/deflate.js';\nimport { get as getProjection } from '../proj.js';\nimport { linearRingIsClockwise } from '../geom/flat/orient.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * @typedef {import(\"arcgis-rest-api\").Feature} EsriJSONFeature\n * @typedef {import(\"arcgis-rest-api\").FeatureSet} EsriJSONFeatureSet\n * @typedef {import(\"arcgis-rest-api\").Geometry} EsriJSONGeometry\n * @typedef {import(\"arcgis-rest-api\").Point} EsriJSONPoint\n * @typedef {import(\"arcgis-rest-api\").Polyline} EsriJSONPolyline\n * @typedef {import(\"arcgis-rest-api\").Polygon} EsriJSONPolygon\n * @typedef {import(\"arcgis-rest-api\").Multipoint} EsriJSONMultipoint\n * @typedef {import(\"arcgis-rest-api\").HasZM} EsriJSONHasZM\n * @typedef {import(\"arcgis-rest-api\").Position} EsriJSONPosition\n * @typedef {import(\"arcgis-rest-api\").SpatialReferenceWkid} EsriJSONSpatialReferenceWkid\n */\n/**\n * @typedef {Object} EsriJSONMultiPolygon\n * @property {Array<Array<Array<Array<number>>>>} rings Rings for the MultiPolygon.\n * @property {boolean} [hasM] If the polygon coordinates have an M value.\n * @property {boolean} [hasZ] If the polygon coordinates have a Z value.\n * @property {EsriJSONSpatialReferenceWkid} [spatialReference] The coordinate reference system.\n */\n/**\n * @const\n * @type {Object<import(\"../geom/GeometryType.js\").default, function(EsriJSONGeometry): import(\"../geom/Geometry.js\").default>}\n */\nvar GEOMETRY_READERS = {};\nGEOMETRY_READERS[GeometryType.POINT] = readPointGeometry;\nGEOMETRY_READERS[GeometryType.LINE_STRING] = readLineStringGeometry;\nGEOMETRY_READERS[GeometryType.POLYGON] = readPolygonGeometry;\nGEOMETRY_READERS[GeometryType.MULTI_POINT] = readMultiPointGeometry;\nGEOMETRY_READERS[GeometryType.MULTI_LINE_STRING] = readMultiLineStringGeometry;\nGEOMETRY_READERS[GeometryType.MULTI_POLYGON] = readMultiPolygonGeometry;\n/**\n * @const\n * @type {Object<string, function(import(\"../geom/Geometry.js\").default, import(\"./Feature.js\").WriteOptions=): (EsriJSONGeometry)>}\n */\nvar GEOMETRY_WRITERS = {};\nGEOMETRY_WRITERS[GeometryType.POINT] = writePointGeometry;\nGEOMETRY_WRITERS[GeometryType.LINE_STRING] = writeLineStringGeometry;\nGEOMETRY_WRITERS[GeometryType.POLYGON] = writePolygonGeometry;\nGEOMETRY_WRITERS[GeometryType.MULTI_POINT] = writeMultiPointGeometry;\nGEOMETRY_WRITERS[GeometryType.MULTI_LINE_STRING] = writeMultiLineStringGeometry;\nGEOMETRY_WRITERS[GeometryType.MULTI_POLYGON] = writeMultiPolygonGeometry;\n/**\n * @typedef {Object} Options\n * @property {string} [geometryName] Geometry name to use when creating features.\n */\n/**\n * @classdesc\n * Feature format for reading and writing data in the EsriJSON format.\n *\n * @api\n */\nvar EsriJSON = /** @class */ (function (_super) {\n    __extends(EsriJSON, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function EsriJSON(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this) || this;\n        /**\n         * Name of the geometry attribute for features.\n         * @type {string|undefined}\n         * @private\n         */\n        _this.geometryName_ = options.geometryName;\n        return _this;\n    }\n    /**\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @param {string} [opt_idField] Name of the field where to get the id from.\n     * @protected\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    EsriJSON.prototype.readFeatureFromObject = function (object, opt_options, opt_idField) {\n        var esriJSONFeature = /** @type {EsriJSONFeature} */ (object);\n        var geometry = readGeometry(esriJSONFeature.geometry, opt_options);\n        var feature = new Feature();\n        if (this.geometryName_) {\n            feature.setGeometryName(this.geometryName_);\n        }\n        feature.setGeometry(geometry);\n        if (esriJSONFeature.attributes) {\n            feature.setProperties(esriJSONFeature.attributes, true);\n            var id = esriJSONFeature.attributes[opt_idField];\n            if (id !== undefined) {\n                feature.setId(/** @type {number} */ (id));\n            }\n        }\n        return feature;\n    };\n    /**\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @protected\n     * @return {Array<Feature>} Features.\n     */\n    EsriJSON.prototype.readFeaturesFromObject = function (object, opt_options) {\n        var options = opt_options ? opt_options : {};\n        if (object['features']) {\n            var esriJSONFeatureSet = /** @type {EsriJSONFeatureSet} */ (object);\n            /** @type {Array<import(\"../Feature.js\").default>} */\n            var features = [];\n            var esriJSONFeatures = esriJSONFeatureSet.features;\n            for (var i = 0, ii = esriJSONFeatures.length; i < ii; ++i) {\n                features.push(this.readFeatureFromObject(esriJSONFeatures[i], options, object.objectIdFieldName));\n            }\n            return features;\n        }\n        else {\n            return [this.readFeatureFromObject(object, options)];\n        }\n    };\n    /**\n     * @param {EsriJSONGeometry} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    EsriJSON.prototype.readGeometryFromObject = function (object, opt_options) {\n        return readGeometry(object, opt_options);\n    };\n    /**\n     * @param {Object} object Object.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    EsriJSON.prototype.readProjectionFromObject = function (object) {\n        if (object['spatialReference'] &&\n            object['spatialReference']['wkid'] !== undefined) {\n            var spatialReference = /** @type {EsriJSONSpatialReferenceWkid} */ (object['spatialReference']);\n            var crs = spatialReference.wkid;\n            return getProjection('EPSG:' + crs);\n        }\n        else {\n            return null;\n        }\n    };\n    /**\n     * Encode a geometry as a EsriJSON object.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @return {EsriJSONGeometry} Object.\n     * @api\n     */\n    EsriJSON.prototype.writeGeometryObject = function (geometry, opt_options) {\n        return writeGeometry(geometry, this.adaptOptions(opt_options));\n    };\n    /**\n     * Encode a feature as a esriJSON Feature object.\n     *\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @return {Object} Object.\n     * @api\n     */\n    EsriJSON.prototype.writeFeatureObject = function (feature, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        var object = {};\n        if (!feature.hasProperties()) {\n            object['attributes'] = {};\n            return object;\n        }\n        var properties = feature.getProperties();\n        var geometry = feature.getGeometry();\n        if (geometry) {\n            object['geometry'] = writeGeometry(geometry, opt_options);\n            var projection = opt_options &&\n                (opt_options.dataProjection || opt_options.featureProjection);\n            if (projection) {\n                object['geometry']['spatialReference'] =\n                    /** @type {EsriJSONSpatialReferenceWkid} */ ({\n                        wkid: Number(getProjection(projection).getCode().split(':').pop()),\n                    });\n            }\n            delete properties[feature.getGeometryName()];\n        }\n        if (!isEmpty(properties)) {\n            object['attributes'] = properties;\n        }\n        else {\n            object['attributes'] = {};\n        }\n        return object;\n    };\n    /**\n     * Encode an array of features as a EsriJSON object.\n     *\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @return {EsriJSONFeatureSet} EsriJSON Object.\n     * @api\n     */\n    EsriJSON.prototype.writeFeaturesObject = function (features, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        var objects = [];\n        for (var i = 0, ii = features.length; i < ii; ++i) {\n            objects.push(this.writeFeatureObject(features[i], opt_options));\n        }\n        return {\n            'features': objects,\n        };\n    };\n    return EsriJSON;\n}(JSONFeature));\n/**\n * @param {EsriJSONGeometry} object Object.\n * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\nfunction readGeometry(object, opt_options) {\n    var _a, _b;\n    if (!object) {\n        return null;\n    }\n    /** @type {import(\"../geom/GeometryType.js\").default} */\n    var type;\n    if (typeof object['x'] === 'number' && typeof object['y'] === 'number') {\n        type = GeometryType.POINT;\n    }\n    else if (object['points']) {\n        type = GeometryType.MULTI_POINT;\n    }\n    else if (object['paths']) {\n        var esriJSONPolyline = /** @type {EsriJSONPolyline} */ (object);\n        if (esriJSONPolyline.paths.length === 1) {\n            type = GeometryType.LINE_STRING;\n        }\n        else {\n            type = GeometryType.MULTI_LINE_STRING;\n        }\n    }\n    else if (object['rings']) {\n        var esriJSONPolygon = /** @type {EsriJSONPolygon} */ (object);\n        var layout = getGeometryLayout(esriJSONPolygon);\n        var rings = convertRings(esriJSONPolygon.rings, layout);\n        if (rings.length === 1) {\n            type = GeometryType.POLYGON;\n            object = assign({}, object, (_a = {}, _a['rings'] = rings[0], _a));\n        }\n        else {\n            type = GeometryType.MULTI_POLYGON;\n            object = assign({}, object, (_b = {}, _b['rings'] = rings, _b));\n        }\n    }\n    var geometryReader = GEOMETRY_READERS[type];\n    return transformGeometryWithOptions(geometryReader(object), false, opt_options);\n}\n/**\n * Determines inner and outer rings.\n * Checks if any polygons in this array contain any other polygons in this\n * array. It is used for checking for holes.\n * Logic inspired by: https://github.com/Esri/terraformer-arcgis-parser\n * @param {Array<!Array<!Array<number>>>} rings Rings.\n * @param {import(\"../geom/GeometryLayout.js\").default} layout Geometry layout.\n * @return {Array<!Array<!Array<!Array<number>>>>} Transformed rings.\n */\nfunction convertRings(rings, layout) {\n    var flatRing = [];\n    var outerRings = [];\n    var holes = [];\n    var i, ii;\n    for (i = 0, ii = rings.length; i < ii; ++i) {\n        flatRing.length = 0;\n        deflateCoordinates(flatRing, 0, rings[i], layout.length);\n        // is this ring an outer ring? is it clockwise?\n        var clockwise = linearRingIsClockwise(flatRing, 0, flatRing.length, layout.length);\n        if (clockwise) {\n            outerRings.push([rings[i]]);\n        }\n        else {\n            holes.push(rings[i]);\n        }\n    }\n    while (holes.length) {\n        var hole = holes.shift();\n        var matched = false;\n        // loop over all outer rings and see if they contain our hole.\n        for (i = outerRings.length - 1; i >= 0; i--) {\n            var outerRing = outerRings[i][0];\n            var containsHole = containsExtent(new LinearRing(outerRing).getExtent(), new LinearRing(hole).getExtent());\n            if (containsHole) {\n                // the hole is contained push it into our polygon\n                outerRings[i].push(hole);\n                matched = true;\n                break;\n            }\n        }\n        if (!matched) {\n            // no outer rings contain this hole turn it into and outer\n            // ring (reverse it)\n            outerRings.push([hole.reverse()]);\n        }\n    }\n    return outerRings;\n}\n/**\n * @param {EsriJSONPoint} object Object.\n * @return {import(\"../geom/Geometry.js\").default} Point.\n */\nfunction readPointGeometry(object) {\n    var point;\n    if (object.m !== undefined && object.z !== undefined) {\n        point = new Point([object.x, object.y, object.z, object.m], GeometryLayout.XYZM);\n    }\n    else if (object.z !== undefined) {\n        point = new Point([object.x, object.y, object.z], GeometryLayout.XYZ);\n    }\n    else if (object.m !== undefined) {\n        point = new Point([object.x, object.y, object.m], GeometryLayout.XYM);\n    }\n    else {\n        point = new Point([object.x, object.y]);\n    }\n    return point;\n}\n/**\n * @param {EsriJSONPolyline} object Object.\n * @return {import(\"../geom/Geometry.js\").default} LineString.\n */\nfunction readLineStringGeometry(object) {\n    var layout = getGeometryLayout(object);\n    return new LineString(object.paths[0], layout);\n}\n/**\n * @param {EsriJSONPolyline} object Object.\n * @return {import(\"../geom/Geometry.js\").default} MultiLineString.\n */\nfunction readMultiLineStringGeometry(object) {\n    var layout = getGeometryLayout(object);\n    return new MultiLineString(object.paths, layout);\n}\n/**\n * @param {EsriJSONHasZM} object Object.\n * @return {import(\"../geom/GeometryLayout.js\").default} The geometry layout to use.\n */\nfunction getGeometryLayout(object) {\n    var layout = GeometryLayout.XY;\n    if (object.hasZ === true && object.hasM === true) {\n        layout = GeometryLayout.XYZM;\n    }\n    else if (object.hasZ === true) {\n        layout = GeometryLayout.XYZ;\n    }\n    else if (object.hasM === true) {\n        layout = GeometryLayout.XYM;\n    }\n    return layout;\n}\n/**\n * @param {EsriJSONMultipoint} object Object.\n * @return {import(\"../geom/Geometry.js\").default} MultiPoint.\n */\nfunction readMultiPointGeometry(object) {\n    var layout = getGeometryLayout(object);\n    return new MultiPoint(object.points, layout);\n}\n/**\n * @param {EsriJSONMultiPolygon} object Object.\n * @return {import(\"../geom/Geometry.js\").default} MultiPolygon.\n */\nfunction readMultiPolygonGeometry(object) {\n    var layout = getGeometryLayout(object);\n    return new MultiPolygon(object.rings, layout);\n}\n/**\n * @param {EsriJSONPolygon} object Object.\n * @return {import(\"../geom/Geometry.js\").default} Polygon.\n */\nfunction readPolygonGeometry(object) {\n    var layout = getGeometryLayout(object);\n    return new Polygon(object.rings, layout);\n}\n/**\n * @param {import(\"../geom/Point.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n * @return {EsriJSONPoint} EsriJSON geometry.\n */\nfunction writePointGeometry(geometry, opt_options) {\n    var coordinates = geometry.getCoordinates();\n    /** @type {EsriJSONPoint} */\n    var esriJSON;\n    var layout = geometry.getLayout();\n    if (layout === GeometryLayout.XYZ) {\n        esriJSON = {\n            x: coordinates[0],\n            y: coordinates[1],\n            z: coordinates[2],\n        };\n    }\n    else if (layout === GeometryLayout.XYM) {\n        esriJSON = {\n            x: coordinates[0],\n            y: coordinates[1],\n            m: coordinates[2],\n        };\n    }\n    else if (layout === GeometryLayout.XYZM) {\n        esriJSON = {\n            x: coordinates[0],\n            y: coordinates[1],\n            z: coordinates[2],\n            m: coordinates[3],\n        };\n    }\n    else if (layout === GeometryLayout.XY) {\n        esriJSON = {\n            x: coordinates[0],\n            y: coordinates[1],\n        };\n    }\n    else {\n        assert(false, 34); // Invalid geometry layout\n    }\n    return esriJSON;\n}\n/**\n * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @return {Object} Object with boolean hasZ and hasM keys.\n */\nfunction getHasZM(geometry) {\n    var layout = geometry.getLayout();\n    return {\n        hasZ: layout === GeometryLayout.XYZ || layout === GeometryLayout.XYZM,\n        hasM: layout === GeometryLayout.XYM || layout === GeometryLayout.XYZM,\n    };\n}\n/**\n * @param {import(\"../geom/LineString.js\").default} lineString Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n * @return {EsriJSONPolyline} EsriJSON geometry.\n */\nfunction writeLineStringGeometry(lineString, opt_options) {\n    var hasZM = getHasZM(lineString);\n    return {\n        hasZ: hasZM.hasZ,\n        hasM: hasZM.hasM,\n        paths: [\n            /** @type {Array<EsriJSONPosition>} */ (lineString.getCoordinates()),\n        ],\n    };\n}\n/**\n * @param {import(\"../geom/Polygon.js\").default} polygon Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n * @return {EsriJSONPolygon} EsriJSON geometry.\n */\nfunction writePolygonGeometry(polygon, opt_options) {\n    // Esri geometries use the left-hand rule\n    var hasZM = getHasZM(polygon);\n    return {\n        hasZ: hasZM.hasZ,\n        hasM: hasZM.hasM,\n        rings: /** @type {Array<Array<EsriJSONPosition>>} */ (polygon.getCoordinates(false)),\n    };\n}\n/**\n * @param {import(\"../geom/MultiLineString.js\").default} multiLineString Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n * @return {EsriJSONPolyline} EsriJSON geometry.\n */\nfunction writeMultiLineStringGeometry(multiLineString, opt_options) {\n    var hasZM = getHasZM(multiLineString);\n    return {\n        hasZ: hasZM.hasZ,\n        hasM: hasZM.hasM,\n        paths: /** @type {Array<Array<EsriJSONPosition>>} */ (multiLineString.getCoordinates()),\n    };\n}\n/**\n * @param {import(\"../geom/MultiPoint.js\").default} multiPoint Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n * @return {EsriJSONMultipoint} EsriJSON geometry.\n */\nfunction writeMultiPointGeometry(multiPoint, opt_options) {\n    var hasZM = getHasZM(multiPoint);\n    return {\n        hasZ: hasZM.hasZ,\n        hasM: hasZM.hasM,\n        points: /** @type {Array<EsriJSONPosition>} */ (multiPoint.getCoordinates()),\n    };\n}\n/**\n * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n * @return {EsriJSONPolygon} EsriJSON geometry.\n */\nfunction writeMultiPolygonGeometry(geometry, opt_options) {\n    var hasZM = getHasZM(geometry);\n    var coordinates = geometry.getCoordinates(false);\n    var output = [];\n    for (var i = 0; i < coordinates.length; i++) {\n        for (var x = coordinates[i].length - 1; x >= 0; x--) {\n            output.push(coordinates[i][x]);\n        }\n    }\n    return {\n        hasZ: hasZM.hasZ,\n        hasM: hasZM.hasM,\n        rings: /** @type {Array<Array<EsriJSONPosition>>} */ (output),\n    };\n}\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n * @return {EsriJSONGeometry} EsriJSON geometry.\n */\nfunction writeGeometry(geometry, opt_options) {\n    var geometryWriter = GEOMETRY_WRITERS[geometry.getType()];\n    return geometryWriter(transformGeometryWithOptions(geometry, true, opt_options), opt_options);\n}\nexport default EsriJSON;\n//# sourceMappingURL=EsriJSON.js.map","/**\n * @module ol/xml\n */\nimport { extend } from './array.js';\n/**\n * When using {@link module:ol/xml.makeChildAppender} or\n * {@link module:ol/xml.makeSimpleNodeFactory}, the top `objectStack` item needs\n * to have this structure.\n * @typedef {Object} NodeStackItem\n * @property {Node} node Node.\n */\n/**\n * @typedef {function(Element, Array<*>): void} Parser\n */\n/**\n * @typedef {function(Element, *, Array<*>): void} Serializer\n */\n/**\n * @type {string}\n */\nexport var XML_SCHEMA_INSTANCE_URI = 'http://www.w3.org/2001/XMLSchema-instance';\n/**\n * @param {string} namespaceURI Namespace URI.\n * @param {string} qualifiedName Qualified name.\n * @return {Element} Node.\n */\nexport function createElementNS(namespaceURI, qualifiedName) {\n    return getDocument().createElementNS(namespaceURI, qualifiedName);\n}\n/**\n * Recursively grab all text content of child nodes into a single string.\n * @param {Node} node Node.\n * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line\n * breaks.\n * @return {string} All text content.\n * @api\n */\nexport function getAllTextContent(node, normalizeWhitespace) {\n    return getAllTextContent_(node, normalizeWhitespace, []).join('');\n}\n/**\n * Recursively grab all text content of child nodes into a single string.\n * @param {Node} node Node.\n * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line\n * breaks.\n * @param {Array<string>} accumulator Accumulator.\n * @private\n * @return {Array<string>} Accumulator.\n */\nexport function getAllTextContent_(node, normalizeWhitespace, accumulator) {\n    if (node.nodeType == Node.CDATA_SECTION_NODE ||\n        node.nodeType == Node.TEXT_NODE) {\n        if (normalizeWhitespace) {\n            accumulator.push(String(node.nodeValue).replace(/(\\r\\n|\\r|\\n)/g, ''));\n        }\n        else {\n            accumulator.push(node.nodeValue);\n        }\n    }\n    else {\n        var n = void 0;\n        for (n = node.firstChild; n; n = n.nextSibling) {\n            getAllTextContent_(n, normalizeWhitespace, accumulator);\n        }\n    }\n    return accumulator;\n}\n/**\n * @param {Object} object Object.\n * @return {boolean} Is a document.\n */\nexport function isDocument(object) {\n    return 'documentElement' in object;\n}\n/**\n * @param {Element} node Node.\n * @param {?string} namespaceURI Namespace URI.\n * @param {string} name Attribute name.\n * @return {string} Value\n */\nexport function getAttributeNS(node, namespaceURI, name) {\n    return node.getAttributeNS(namespaceURI, name) || '';\n}\n/**\n * Parse an XML string to an XML Document.\n * @param {string} xml XML.\n * @return {Document} Document.\n * @api\n */\nexport function parse(xml) {\n    return new DOMParser().parseFromString(xml, 'application/xml');\n}\n/**\n * Make an array extender function for extending the array at the top of the\n * object stack.\n * @param {function(this: T, Node, Array<*>): (Array<*>|undefined)} valueReader Value reader.\n * @param {T} [opt_this] The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeArrayExtender(valueReader, opt_this) {\n    return (\n    /**\n     * @param {Node} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    function (node, objectStack) {\n        var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n        if (value !== undefined) {\n            var array = /** @type {Array<*>} */ (objectStack[objectStack.length - 1]);\n            extend(array, value);\n        }\n    });\n}\n/**\n * Make an array pusher function for pushing to the array at the top of the\n * object stack.\n * @param {function(this: T, Element, Array<*>): *} valueReader Value reader.\n * @param {T} [opt_this] The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeArrayPusher(valueReader, opt_this) {\n    return (\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    function (node, objectStack) {\n        var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n        if (value !== undefined) {\n            var array = /** @type {Array<*>} */ (objectStack[objectStack.length - 1]);\n            array.push(value);\n        }\n    });\n}\n/**\n * Make an object stack replacer function for replacing the object at the\n * top of the stack.\n * @param {function(this: T, Node, Array<*>): *} valueReader Value reader.\n * @param {T} [opt_this] The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeReplacer(valueReader, opt_this) {\n    return (\n    /**\n     * @param {Node} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    function (node, objectStack) {\n        var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n        if (value !== undefined) {\n            objectStack[objectStack.length - 1] = value;\n        }\n    });\n}\n/**\n * Make an object property pusher function for adding a property to the\n * object at the top of the stack.\n * @param {function(this: T, Element, Array<*>): *} valueReader Value reader.\n * @param {string} [opt_property] Property.\n * @param {T} [opt_this] The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeObjectPropertyPusher(valueReader, opt_property, opt_this) {\n    return (\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    function (node, objectStack) {\n        var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n        if (value !== undefined) {\n            var object = /** @type {!Object} */ (objectStack[objectStack.length - 1]);\n            var property = opt_property !== undefined ? opt_property : node.localName;\n            var array = void 0;\n            if (property in object) {\n                array = object[property];\n            }\n            else {\n                array = [];\n                object[property] = array;\n            }\n            array.push(value);\n        }\n    });\n}\n/**\n * Make an object property setter function.\n * @param {function(this: T, Element, Array<*>): *} valueReader Value reader.\n * @param {string} [opt_property] Property.\n * @param {T} [opt_this] The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeObjectPropertySetter(valueReader, opt_property, opt_this) {\n    return (\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    function (node, objectStack) {\n        var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n        if (value !== undefined) {\n            var object = /** @type {!Object} */ (objectStack[objectStack.length - 1]);\n            var property = opt_property !== undefined ? opt_property : node.localName;\n            object[property] = value;\n        }\n    });\n}\n/**\n * Create a serializer that appends nodes written by its `nodeWriter` to its\n * designated parent. The parent is the `node` of the\n * {@link module:ol/xml~NodeStackItem} at the top of the `objectStack`.\n * @param {function(this: T, Node, V, Array<*>): void} nodeWriter Node writer.\n * @param {T} [opt_this] The object to use as `this` in `nodeWriter`.\n * @return {Serializer} Serializer.\n * @template T, V\n */\nexport function makeChildAppender(nodeWriter, opt_this) {\n    return function (node, value, objectStack) {\n        nodeWriter.call(opt_this !== undefined ? opt_this : this, node, value, objectStack);\n        var parent = /** @type {NodeStackItem} */ (objectStack[objectStack.length - 1]);\n        var parentNode = parent.node;\n        parentNode.appendChild(node);\n    };\n}\n/**\n * Create a serializer that calls the provided `nodeWriter` from\n * {@link module:ol/xml.serialize}. This can be used by the parent writer to have the\n * 'nodeWriter' called with an array of values when the `nodeWriter` was\n * designed to serialize a single item. An example would be a LineString\n * geometry writer, which could be reused for writing MultiLineString\n * geometries.\n * @param {function(this: T, Element, V, Array<*>): void} nodeWriter Node writer.\n * @param {T} [opt_this] The object to use as `this` in `nodeWriter`.\n * @return {Serializer} Serializer.\n * @template T, V\n */\nexport function makeArraySerializer(nodeWriter, opt_this) {\n    var serializersNS, nodeFactory;\n    return function (node, value, objectStack) {\n        if (serializersNS === undefined) {\n            serializersNS = {};\n            var serializers = {};\n            serializers[node.localName] = nodeWriter;\n            serializersNS[node.namespaceURI] = serializers;\n            nodeFactory = makeSimpleNodeFactory(node.localName);\n        }\n        serialize(serializersNS, nodeFactory, value, objectStack);\n    };\n}\n/**\n * Create a node factory which can use the `opt_keys` passed to\n * {@link module:ol/xml.serialize} or {@link module:ol/xml.pushSerializeAndPop} as node names,\n * or a fixed node name. The namespace of the created nodes can either be fixed,\n * or the parent namespace will be used.\n * @param {string} [opt_nodeName] Fixed node name which will be used for all\n *     created nodes. If not provided, the 3rd argument to the resulting node\n *     factory needs to be provided and will be the nodeName.\n * @param {string} [opt_namespaceURI] Fixed namespace URI which will be used for\n *     all created nodes. If not provided, the namespace of the parent node will\n *     be used.\n * @return {function(*, Array<*>, string=): (Node|undefined)} Node factory.\n */\nexport function makeSimpleNodeFactory(opt_nodeName, opt_namespaceURI) {\n    var fixedNodeName = opt_nodeName;\n    return (\n    /**\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string} [opt_nodeName] Node name.\n     * @return {Node} Node.\n     */\n    function (value, objectStack, opt_nodeName) {\n        var context = /** @type {NodeStackItem} */ (objectStack[objectStack.length - 1]);\n        var node = context.node;\n        var nodeName = fixedNodeName;\n        if (nodeName === undefined) {\n            nodeName = opt_nodeName;\n        }\n        var namespaceURI = opt_namespaceURI !== undefined ? opt_namespaceURI : node.namespaceURI;\n        return createElementNS(namespaceURI, /** @type {string} */ (nodeName));\n    });\n}\n/**\n * A node factory that creates a node using the parent's `namespaceURI` and the\n * `nodeName` passed by {@link module:ol/xml.serialize} or\n * {@link module:ol/xml.pushSerializeAndPop} to the node factory.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nexport var OBJECT_PROPERTY_NODE_FACTORY = makeSimpleNodeFactory();\n/**\n * Create an array of `values` to be used with {@link module:ol/xml.serialize} or\n * {@link module:ol/xml.pushSerializeAndPop}, where `orderedKeys` has to be provided as\n * `opt_key` argument.\n * @param {Object<string, *>} object Key-value pairs for the sequence. Keys can\n *     be a subset of the `orderedKeys`.\n * @param {Array<string>} orderedKeys Keys in the order of the sequence.\n * @return {Array<*>} Values in the order of the sequence. The resulting array\n *     has the same length as the `orderedKeys` array. Values that are not\n *     present in `object` will be `undefined` in the resulting array.\n */\nexport function makeSequence(object, orderedKeys) {\n    var length = orderedKeys.length;\n    var sequence = new Array(length);\n    for (var i = 0; i < length; ++i) {\n        sequence[i] = object[orderedKeys[i]];\n    }\n    return sequence;\n}\n/**\n * Create a namespaced structure, using the same values for each namespace.\n * This can be used as a starting point for versioned parsers, when only a few\n * values are version specific.\n * @param {Array<string>} namespaceURIs Namespace URIs.\n * @param {T} structure Structure.\n * @param {Object<string, T>} [opt_structureNS] Namespaced structure to add to.\n * @return {Object<string, T>} Namespaced structure.\n * @template T\n */\nexport function makeStructureNS(namespaceURIs, structure, opt_structureNS) {\n    /**\n     * @type {Object<string, T>}\n     */\n    var structureNS = opt_structureNS !== undefined ? opt_structureNS : {};\n    var i, ii;\n    for (i = 0, ii = namespaceURIs.length; i < ii; ++i) {\n        structureNS[namespaceURIs[i]] = structure;\n    }\n    return structureNS;\n}\n/**\n * Parse a node using the parsers and object stack.\n * @param {Object<string, Object<string, Parser>>} parsersNS\n *     Parsers by namespace.\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @param {*} [opt_this] The object to use as `this`.\n */\nexport function parseNode(parsersNS, node, objectStack, opt_this) {\n    var n;\n    for (n = node.firstElementChild; n; n = n.nextElementSibling) {\n        var parsers = parsersNS[n.namespaceURI];\n        if (parsers !== undefined) {\n            var parser = parsers[n.localName];\n            if (parser !== undefined) {\n                parser.call(opt_this, n, objectStack);\n            }\n        }\n    }\n}\n/**\n * Push an object on top of the stack, parse and return the popped object.\n * @param {T} object Object.\n * @param {Object<string, Object<string, Parser>>} parsersNS\n *     Parsers by namespace.\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @param {*} [opt_this] The object to use as `this`.\n * @return {T} Object.\n * @template T\n */\nexport function pushParseAndPop(object, parsersNS, node, objectStack, opt_this) {\n    objectStack.push(object);\n    parseNode(parsersNS, node, objectStack, opt_this);\n    return /** @type {T} */ (objectStack.pop());\n}\n/**\n * Walk through an array of `values` and call a serializer for each value.\n * @param {Object<string, Object<string, Serializer>>} serializersNS\n *     Namespaced serializers.\n * @param {function(this: T, *, Array<*>, (string|undefined)): (Node|undefined)} nodeFactory\n *     Node factory. The `nodeFactory` creates the node whose namespace and name\n *     will be used to choose a node writer from `serializersNS`. This\n *     separation allows us to decide what kind of node to create, depending on\n *     the value we want to serialize. An example for this would be different\n *     geometry writers based on the geometry type.\n * @param {Array<*>} values Values to serialize. An example would be an array\n *     of {@link module:ol/Feature~Feature} instances.\n * @param {Array<*>} objectStack Node stack.\n * @param {Array<string>} [opt_keys] Keys of the `values`. Will be passed to the\n *     `nodeFactory`. This is used for serializing object literals where the\n *     node name relates to the property key. The array length of `opt_keys` has\n *     to match the length of `values`. For serializing a sequence, `opt_keys`\n *     determines the order of the sequence.\n * @param {T} [opt_this] The object to use as `this` for the node factory and\n *     serializers.\n * @template T\n */\nexport function serialize(serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this) {\n    var length = (opt_keys !== undefined ? opt_keys : values).length;\n    var value, node;\n    for (var i = 0; i < length; ++i) {\n        value = values[i];\n        if (value !== undefined) {\n            node = nodeFactory.call(opt_this !== undefined ? opt_this : this, value, objectStack, opt_keys !== undefined ? opt_keys[i] : undefined);\n            if (node !== undefined) {\n                serializersNS[node.namespaceURI][node.localName].call(opt_this, node, value, objectStack);\n            }\n        }\n    }\n}\n/**\n * @param {O} object Object.\n * @param {Object<string, Object<string, Serializer>>} serializersNS\n *     Namespaced serializers.\n * @param {function(this: T, *, Array<*>, (string|undefined)): (Node|undefined)} nodeFactory\n *     Node factory. The `nodeFactory` creates the node whose namespace and name\n *     will be used to choose a node writer from `serializersNS`. This\n *     separation allows us to decide what kind of node to create, depending on\n *     the value we want to serialize. An example for this would be different\n *     geometry writers based on the geometry type.\n * @param {Array<*>} values Values to serialize. An example would be an array\n *     of {@link module:ol/Feature~Feature} instances.\n * @param {Array<*>} objectStack Node stack.\n * @param {Array<string>} [opt_keys] Keys of the `values`. Will be passed to the\n *     `nodeFactory`. This is used for serializing object literals where the\n *     node name relates to the property key. The array length of `opt_keys` has\n *     to match the length of `values`. For serializing a sequence, `opt_keys`\n *     determines the order of the sequence.\n * @param {T} [opt_this] The object to use as `this` for the node factory and\n *     serializers.\n * @return {O|undefined} Object.\n * @template O, T\n */\nexport function pushSerializeAndPop(object, serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this) {\n    objectStack.push(object);\n    serialize(serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this);\n    return /** @type {O|undefined} */ (objectStack.pop());\n}\nvar xmlSerializer_ = undefined;\n/**\n * Register a XMLSerializer. Can be used  to inject a XMLSerializer\n * where there is no globally available implementation.\n *\n * @param {XMLSerializer} xmlSerializer A XMLSerializer.\n * @api\n */\nexport function registerXMLSerializer(xmlSerializer) {\n    xmlSerializer_ = xmlSerializer;\n}\n/**\n * @return {XMLSerializer} The XMLSerializer.\n */\nexport function getXMLSerializer() {\n    if (xmlSerializer_ === undefined && typeof XMLSerializer !== 'undefined') {\n        xmlSerializer_ = new XMLSerializer();\n    }\n    return xmlSerializer_;\n}\nvar document_ = undefined;\n/**\n * Register a Document to use when creating nodes for XML serializations. Can be used\n * to inject a Document where there is no globally available implementation.\n *\n * @param {Document} document A Document.\n * @api\n */\nexport function registerDocument(document) {\n    document_ = document;\n}\n/**\n * Get a document that should be used when creating nodes for XML serializations.\n * @return {Document} The document.\n */\nexport function getDocument() {\n    if (document_ === undefined && typeof document !== 'undefined') {\n        document_ = document.implementation.createDocument('', '', null);\n    }\n    return document_;\n}\n//# sourceMappingURL=xml.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/XMLFeature\n */\nimport FeatureFormat from '../format/Feature.js';\nimport FormatType from '../format/FormatType.js';\nimport { abstract } from '../util.js';\nimport { extend } from '../array.js';\nimport { getXMLSerializer, isDocument, parse } from '../xml.js';\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for XML feature formats.\n *\n * @abstract\n */\nvar XMLFeature = /** @class */ (function (_super) {\n    __extends(XMLFeature, _super);\n    function XMLFeature() {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {XMLSerializer}\n         * @private\n         */\n        _this.xmlSerializer_ = getXMLSerializer();\n        return _this;\n    }\n    /**\n     * @return {import(\"./FormatType.js\").default} Format.\n     */\n    XMLFeature.prototype.getType = function () {\n        return FormatType.XML;\n    };\n    /**\n     * Read a single feature.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     * @api\n     */\n    XMLFeature.prototype.readFeature = function (source, opt_options) {\n        if (!source) {\n            return null;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readFeatureFromDocument(doc, opt_options);\n        }\n        else if (isDocument(source)) {\n            return this.readFeatureFromDocument(\n            /** @type {Document} */ (source), opt_options);\n        }\n        else {\n            return this.readFeatureFromNode(\n            /** @type {Element} */ (source), opt_options);\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    XMLFeature.prototype.readFeatureFromDocument = function (doc, opt_options) {\n        var features = this.readFeaturesFromDocument(doc, opt_options);\n        if (features.length > 0) {\n            return features[0];\n        }\n        else {\n            return null;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    XMLFeature.prototype.readFeatureFromNode = function (node, opt_options) {\n        return null; // not implemented\n    };\n    /**\n     * Read all features from a feature collection.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     * @api\n     */\n    XMLFeature.prototype.readFeatures = function (source, opt_options) {\n        if (!source) {\n            return [];\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readFeaturesFromDocument(doc, opt_options);\n        }\n        else if (isDocument(source)) {\n            return this.readFeaturesFromDocument(\n            /** @type {Document} */ (source), opt_options);\n        }\n        else {\n            return this.readFeaturesFromNode(\n            /** @type {Element} */ (source), opt_options);\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Options.\n     * @protected\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    XMLFeature.prototype.readFeaturesFromDocument = function (doc, opt_options) {\n        /** @type {Array<import(\"../Feature.js\").default>} */\n        var features = [];\n        for (var n = doc.firstChild; n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                extend(features, this.readFeaturesFromNode(/** @type {Element} */ (n), opt_options));\n            }\n        }\n        return features;\n    };\n    /**\n     * @abstract\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Options.\n     * @protected\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    XMLFeature.prototype.readFeaturesFromNode = function (node, opt_options) {\n        return abstract();\n    };\n    /**\n     * Read a single geometry from a source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    XMLFeature.prototype.readGeometry = function (source, opt_options) {\n        if (!source) {\n            return null;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readGeometryFromDocument(doc, opt_options);\n        }\n        else if (isDocument(source)) {\n            return this.readGeometryFromDocument(\n            /** @type {Document} */ (source), opt_options);\n        }\n        else {\n            return this.readGeometryFromNode(\n            /** @type {Element} */ (source), opt_options);\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    XMLFeature.prototype.readGeometryFromDocument = function (doc, opt_options) {\n        return null; // not implemented\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    XMLFeature.prototype.readGeometryFromNode = function (node, opt_options) {\n        return null; // not implemented\n    };\n    /**\n     * Read the projection from the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     * @api\n     */\n    XMLFeature.prototype.readProjection = function (source) {\n        if (!source) {\n            return null;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readProjectionFromDocument(doc);\n        }\n        else if (isDocument(source)) {\n            return this.readProjectionFromDocument(/** @type {Document} */ (source));\n        }\n        else {\n            return this.readProjectionFromNode(/** @type {Element} */ (source));\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    XMLFeature.prototype.readProjectionFromDocument = function (doc) {\n        return this.dataProjection;\n    };\n    /**\n     * @param {Element} node Node.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    XMLFeature.prototype.readProjectionFromNode = function (node) {\n        return this.dataProjection;\n    };\n    /**\n     * Encode a feature as string.\n     *\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @return {string} Encoded feature.\n     */\n    XMLFeature.prototype.writeFeature = function (feature, opt_options) {\n        var node = this.writeFeatureNode(feature, opt_options);\n        return this.xmlSerializer_.serializeToString(node);\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Options.\n     * @protected\n     * @return {Node} Node.\n     */\n    XMLFeature.prototype.writeFeatureNode = function (feature, opt_options) {\n        return null; // not implemented\n    };\n    /**\n     * Encode an array of features as string.\n     *\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @return {string} Result.\n     * @api\n     */\n    XMLFeature.prototype.writeFeatures = function (features, opt_options) {\n        var node = this.writeFeaturesNode(features, opt_options);\n        return this.xmlSerializer_.serializeToString(node);\n    };\n    /**\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Options.\n     * @return {Node} Node.\n     */\n    XMLFeature.prototype.writeFeaturesNode = function (features, opt_options) {\n        return null; // not implemented\n    };\n    /**\n     * Encode a geometry as string.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @return {string} Encoded geometry.\n     */\n    XMLFeature.prototype.writeGeometry = function (geometry, opt_options) {\n        var node = this.writeGeometryNode(geometry, opt_options);\n        return this.xmlSerializer_.serializeToString(node);\n    };\n    /**\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Options.\n     * @return {Node} Node.\n     */\n    XMLFeature.prototype.writeGeometryNode = function (geometry, opt_options) {\n        return null; // not implemented\n    };\n    return XMLFeature;\n}(FeatureFormat));\nexport default XMLFeature;\n//# sourceMappingURL=XMLFeature.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/GMLBase\n */\n// FIXME Envelopes should not be treated as geometries! readEnvelope_ is part\n// of GEOMETRY_PARSERS_ and methods using GEOMETRY_PARSERS_ do not expect\n// envelopes/extents, only geometries!\nimport Feature from '../Feature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport LinearRing from '../geom/LinearRing.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport XMLFeature from './XMLFeature.js';\nimport { assign } from '../obj.js';\nimport { extend } from '../array.js';\nimport { getAllTextContent, getAttributeNS, makeArrayPusher, makeReplacer, parseNode, pushParseAndPop, } from '../xml.js';\nimport { get as getProjection } from '../proj.js';\nimport { transformExtentWithOptions, transformGeometryWithOptions, } from './Feature.js';\n/**\n * @const\n * @type {string}\n */\nexport var GMLNS = 'http://www.opengis.net/gml';\n/**\n * A regular expression that matches if a string only contains whitespace\n * characters. It will e.g. match `''`, `' '`, `'\\n'` etc. The non-breaking\n * space (0xa0) is explicitly included as IE doesn't include it in its\n * definition of `\\s`.\n *\n * Information from `goog.string.isEmptyOrWhitespace`: https://github.com/google/closure-library/blob/e877b1e/closure/goog/string/string.js#L156-L160\n *\n * @const\n * @type {RegExp}\n */\nvar ONLY_WHITESPACE_RE = /^[\\s\\xa0]*$/;\n/**\n * @typedef {Object} Options\n * @property {Object<string, string>|string} [featureNS] Feature\n * namespace. If not defined will be derived from GML. If multiple\n * feature types have been configured which come from different feature\n * namespaces, this will be an object with the keys being the prefixes used\n * in the entries of featureType array. The values of the object will be the\n * feature namespaces themselves. So for instance there might be a featureType\n * item `topp:states` in the `featureType` array and then there will be a key\n * `topp` in the featureNS object with value `http://www.openplans.org/topp`.\n * @property {Array<string>|string} [featureType] Feature type(s) to parse.\n * If multiple feature types need to be configured\n * which come from different feature namespaces, `featureNS` will be an object\n * with the keys being the prefixes used in the entries of featureType array.\n * The values of the object will be the feature namespaces themselves.\n * So for instance there might be a featureType item `topp:states` and then\n * there will be a key named `topp` in the featureNS object with value\n * `http://www.openplans.org/topp`.\n * @property {string} srsName srsName to use when writing geometries.\n * @property {boolean} [surface=false] Write gml:Surface instead of gml:Polygon\n * elements. This also affects the elements in multi-part geometries.\n * @property {boolean} [curve=false] Write gml:Curve instead of gml:LineString\n * elements. This also affects the elements in multi-part geometries.\n * @property {boolean} [multiCurve=true] Write gml:MultiCurve instead of gml:MultiLineString.\n * Since the latter is deprecated in GML 3.\n * @property {boolean} [multiSurface=true] Write gml:multiSurface instead of\n * gml:MultiPolygon. Since the latter is deprecated in GML 3.\n * @property {string} [schemaLocation] Optional schemaLocation to use when\n * writing out the GML, this will override the default provided.\n * @property {boolean} [hasZ=false] If coordinates have a Z value.\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Feature base format for reading and writing data in the GML format.\n * This class cannot be instantiated, it contains only base content that\n * is shared with versioned format classes GML2 and GML3.\n *\n * @abstract\n */\nvar GMLBase = /** @class */ (function (_super) {\n    __extends(GMLBase, _super);\n    /**\n     * @param {Options} [opt_options] Optional configuration object.\n     */\n    function GMLBase(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = /** @type {Options} */ (opt_options ? opt_options : {});\n        /**\n         * @protected\n         * @type {Array<string>|string|undefined}\n         */\n        _this.featureType = options.featureType;\n        /**\n         * @protected\n         * @type {Object<string, string>|string|undefined}\n         */\n        _this.featureNS = options.featureNS;\n        /**\n         * @protected\n         * @type {string}\n         */\n        _this.srsName = options.srsName;\n        /**\n         * @protected\n         * @type {string}\n         */\n        _this.schemaLocation = '';\n        /**\n         * @type {Object<string, Object<string, Object>>}\n         */\n        _this.FEATURE_COLLECTION_PARSERS = {};\n        _this.FEATURE_COLLECTION_PARSERS[_this.namespace] = {\n            'featureMember': makeArrayPusher(_this.readFeaturesInternal),\n            'featureMembers': makeReplacer(_this.readFeaturesInternal),\n        };\n        return _this;\n    }\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<Feature> | undefined} Features.\n     */\n    GMLBase.prototype.readFeaturesInternal = function (node, objectStack) {\n        var localName = node.localName;\n        var features = null;\n        if (localName == 'FeatureCollection') {\n            features = pushParseAndPop([], this.FEATURE_COLLECTION_PARSERS, node, objectStack, this);\n        }\n        else if (localName == 'featureMembers' ||\n            localName == 'featureMember' ||\n            localName == 'member') {\n            var context = objectStack[0];\n            var featureType = context['featureType'];\n            var featureNS = context['featureNS'];\n            var prefix = 'p';\n            var defaultPrefix = 'p0';\n            if (!featureType && node.childNodes) {\n                (featureType = []), (featureNS = {});\n                for (var i = 0, ii = node.childNodes.length; i < ii; ++i) {\n                    var child = node.childNodes[i];\n                    if (child.nodeType === 1) {\n                        var ft = child.nodeName.split(':').pop();\n                        if (featureType.indexOf(ft) === -1) {\n                            var key = '';\n                            var count = 0;\n                            var uri = child.namespaceURI;\n                            for (var candidate in featureNS) {\n                                if (featureNS[candidate] === uri) {\n                                    key = candidate;\n                                    break;\n                                }\n                                ++count;\n                            }\n                            if (!key) {\n                                key = prefix + count;\n                                featureNS[key] = uri;\n                            }\n                            featureType.push(key + ':' + ft);\n                        }\n                    }\n                }\n                if (localName != 'featureMember') {\n                    // recheck featureType for each featureMember\n                    context['featureType'] = featureType;\n                    context['featureNS'] = featureNS;\n                }\n            }\n            if (typeof featureNS === 'string') {\n                var ns = featureNS;\n                featureNS = {};\n                featureNS[defaultPrefix] = ns;\n            }\n            /** @type {Object<string, Object<string, import(\"../xml.js\").Parser>>} */\n            var parsersNS = {};\n            var featureTypes = Array.isArray(featureType)\n                ? featureType\n                : [featureType];\n            for (var p in featureNS) {\n                /** @type {Object<string, import(\"../xml.js\").Parser>} */\n                var parsers = {};\n                for (var i = 0, ii = featureTypes.length; i < ii; ++i) {\n                    var featurePrefix = featureTypes[i].indexOf(':') === -1\n                        ? defaultPrefix\n                        : featureTypes[i].split(':')[0];\n                    if (featurePrefix === p) {\n                        parsers[featureTypes[i].split(':').pop()] =\n                            localName == 'featureMembers'\n                                ? makeArrayPusher(this.readFeatureElement, this)\n                                : makeReplacer(this.readFeatureElement, this);\n                    }\n                }\n                parsersNS[featureNS[p]] = parsers;\n            }\n            if (localName == 'featureMember' || localName == 'member') {\n                features = pushParseAndPop(undefined, parsersNS, node, objectStack);\n            }\n            else {\n                features = pushParseAndPop([], parsersNS, node, objectStack);\n            }\n        }\n        if (features === null) {\n            features = [];\n        }\n        return features;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {import(\"../geom/Geometry.js\").default|import(\"../extent.js\").Extent|undefined} Geometry.\n     */\n    GMLBase.prototype.readGeometryElement = function (node, objectStack) {\n        var context = /** @type {Object} */ (objectStack[0]);\n        context['srsName'] = node.firstElementChild.getAttribute('srsName');\n        context['srsDimension'] =\n            node.firstElementChild.getAttribute('srsDimension');\n        var geometry = pushParseAndPop(null, this.GEOMETRY_PARSERS, node, objectStack, this);\n        if (geometry) {\n            if (Array.isArray(geometry)) {\n                return transformExtentWithOptions(\n                /** @type {import(\"../extent.js\").Extent} */ (geometry), context);\n            }\n            else {\n                return transformGeometryWithOptions(\n                /** @type {import(\"../geom/Geometry.js\").default} */ (geometry), false, context);\n            }\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {boolean} asFeature whether result should be wrapped as a feature.\n     * @return {Feature|Object} Feature\n     */\n    GMLBase.prototype.readFeatureElementInternal = function (node, objectStack, asFeature) {\n        var geometryName;\n        var values = {};\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n            var value = void 0;\n            var localName = n.localName;\n            // first, check if it is simple attribute\n            if (n.childNodes.length === 0 ||\n                (n.childNodes.length === 1 &&\n                    (n.firstChild.nodeType === 3 || n.firstChild.nodeType === 4))) {\n                value = getAllTextContent(n, false);\n                if (ONLY_WHITESPACE_RE.test(value)) {\n                    value = undefined;\n                }\n            }\n            else {\n                if (asFeature) {\n                    //if feature, try it as a geometry\n                    value = this.readGeometryElement(n, objectStack);\n                }\n                if (!value) {\n                    //if not a geometry or not a feature, treat it as a complex attribute\n                    value = this.readFeatureElementInternal(n, objectStack, false);\n                }\n                else if (localName !== 'boundedBy') {\n                    // boundedBy is an extent and must not be considered as a geometry\n                    geometryName = localName;\n                }\n            }\n            if (values[localName]) {\n                if (!(values[localName] instanceof Array)) {\n                    values[localName] = [values[localName]];\n                }\n                values[localName].push(value);\n            }\n            else {\n                values[localName] = value;\n            }\n            var len = n.attributes.length;\n            if (len > 0) {\n                values[localName] = { _content_: values[localName] };\n                for (var i = 0; i < len; i++) {\n                    var attName = n.attributes[i].name;\n                    values[localName][attName] = n.attributes[i].value;\n                }\n            }\n        }\n        if (!asFeature) {\n            return values;\n        }\n        else {\n            var feature = new Feature(values);\n            if (geometryName) {\n                feature.setGeometryName(geometryName);\n            }\n            var fid = node.getAttribute('fid') || getAttributeNS(node, this.namespace, 'id');\n            if (fid) {\n                feature.setId(fid);\n            }\n            return feature;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Feature} Feature.\n     */\n    GMLBase.prototype.readFeatureElement = function (node, objectStack) {\n        return this.readFeatureElementInternal(node, objectStack, true);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Point|undefined} Point.\n     */\n    GMLBase.prototype.readPoint = function (node, objectStack) {\n        var flatCoordinates = this.readFlatCoordinatesFromNode(node, objectStack);\n        if (flatCoordinates) {\n            return new Point(flatCoordinates, GeometryLayout.XYZ);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {MultiPoint|undefined} MultiPoint.\n     */\n    GMLBase.prototype.readMultiPoint = function (node, objectStack) {\n        /** @type {Array<Array<number>>} */\n        var coordinates = pushParseAndPop([], this.MULTIPOINT_PARSERS, node, objectStack, this);\n        if (coordinates) {\n            return new MultiPoint(coordinates);\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {MultiLineString|undefined} MultiLineString.\n     */\n    GMLBase.prototype.readMultiLineString = function (node, objectStack) {\n        /** @type {Array<LineString>} */\n        var lineStrings = pushParseAndPop([], this.MULTILINESTRING_PARSERS, node, objectStack, this);\n        if (lineStrings) {\n            return new MultiLineString(lineStrings);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {MultiPolygon|undefined} MultiPolygon.\n     */\n    GMLBase.prototype.readMultiPolygon = function (node, objectStack) {\n        /** @type {Array<Polygon>} */\n        var polygons = pushParseAndPop([], this.MULTIPOLYGON_PARSERS, node, objectStack, this);\n        if (polygons) {\n            return new MultiPolygon(polygons);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GMLBase.prototype.pointMemberParser = function (node, objectStack) {\n        parseNode(this.POINTMEMBER_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GMLBase.prototype.lineStringMemberParser = function (node, objectStack) {\n        parseNode(this.LINESTRINGMEMBER_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GMLBase.prototype.polygonMemberParser = function (node, objectStack) {\n        parseNode(this.POLYGONMEMBER_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {LineString|undefined} LineString.\n     */\n    GMLBase.prototype.readLineString = function (node, objectStack) {\n        var flatCoordinates = this.readFlatCoordinatesFromNode(node, objectStack);\n        if (flatCoordinates) {\n            var lineString = new LineString(flatCoordinates, GeometryLayout.XYZ);\n            return lineString;\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<number>|undefined} LinearRing flat coordinates.\n     */\n    GMLBase.prototype.readFlatLinearRing = function (node, objectStack) {\n        var ring = pushParseAndPop(null, this.GEOMETRY_FLAT_COORDINATES_PARSERS, node, objectStack, this);\n        if (ring) {\n            return ring;\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {LinearRing|undefined} LinearRing.\n     */\n    GMLBase.prototype.readLinearRing = function (node, objectStack) {\n        var flatCoordinates = this.readFlatCoordinatesFromNode(node, objectStack);\n        if (flatCoordinates) {\n            return new LinearRing(flatCoordinates, GeometryLayout.XYZ);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Polygon|undefined} Polygon.\n     */\n    GMLBase.prototype.readPolygon = function (node, objectStack) {\n        /** @type {Array<Array<number>>} */\n        var flatLinearRings = pushParseAndPop([null], this.FLAT_LINEAR_RINGS_PARSERS, node, objectStack, this);\n        if (flatLinearRings && flatLinearRings[0]) {\n            var flatCoordinates = flatLinearRings[0];\n            var ends = [flatCoordinates.length];\n            var i = void 0, ii = void 0;\n            for (i = 1, ii = flatLinearRings.length; i < ii; ++i) {\n                extend(flatCoordinates, flatLinearRings[i]);\n                ends.push(flatCoordinates.length);\n            }\n            return new Polygon(flatCoordinates, GeometryLayout.XYZ, ends);\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<number>} Flat coordinates.\n     */\n    GMLBase.prototype.readFlatCoordinatesFromNode = function (node, objectStack) {\n        return pushParseAndPop(null, this.GEOMETRY_FLAT_COORDINATES_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default|import(\"../extent.js\").Extent} Geometry.\n     */\n    //@ts-ignore\n    GMLBase.prototype.readGeometryFromNode = function (node, opt_options) {\n        var geometry = this.readGeometryElement(node, [\n            this.getReadOptions(node, opt_options ? opt_options : {}),\n        ]);\n        return geometry ? geometry : null;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    GMLBase.prototype.readFeaturesFromNode = function (node, opt_options) {\n        var options = {\n            featureType: this.featureType,\n            featureNS: this.featureNS,\n        };\n        if (opt_options) {\n            assign(options, this.getReadOptions(node, opt_options));\n        }\n        var features = this.readFeaturesInternal(node, [options]);\n        return features || [];\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    GMLBase.prototype.readProjectionFromNode = function (node) {\n        return getProjection(this.srsName\n            ? this.srsName\n            : node.firstElementChild.getAttribute('srsName'));\n    };\n    return GMLBase;\n}(XMLFeature));\nGMLBase.prototype.namespace = GMLNS;\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.FLAT_LINEAR_RINGS_PARSERS = {\n    'http://www.opengis.net/gml': {},\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = {\n    'http://www.opengis.net/gml': {},\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.GEOMETRY_PARSERS = {\n    'http://www.opengis.net/gml': {},\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.MULTIPOINT_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'pointMember': makeArrayPusher(GMLBase.prototype.pointMemberParser),\n        'pointMembers': makeArrayPusher(GMLBase.prototype.pointMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.MULTILINESTRING_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'lineStringMember': makeArrayPusher(GMLBase.prototype.lineStringMemberParser),\n        'lineStringMembers': makeArrayPusher(GMLBase.prototype.lineStringMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.MULTIPOLYGON_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'polygonMember': makeArrayPusher(GMLBase.prototype.polygonMemberParser),\n        'polygonMembers': makeArrayPusher(GMLBase.prototype.polygonMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.POINTMEMBER_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'Point': makeArrayPusher(GMLBase.prototype.readFlatCoordinatesFromNode),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.LINESTRINGMEMBER_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'LineString': makeArrayPusher(GMLBase.prototype.readLineString),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.POLYGONMEMBER_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'Polygon': makeArrayPusher(GMLBase.prototype.readPolygon),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGMLBase.prototype.RING_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'LinearRing': makeReplacer(GMLBase.prototype.readFlatLinearRing),\n    },\n};\nexport default GMLBase;\n//# sourceMappingURL=GMLBase.js.map","/**\n * @module ol/format/xsd\n */\nimport { getAllTextContent, getDocument } from '../xml.js';\nimport { padNumber } from '../string.js';\n/**\n * @param {Node} node Node.\n * @return {boolean|undefined} Boolean.\n */\nexport function readBoolean(node) {\n    var s = getAllTextContent(node, false);\n    return readBooleanString(s);\n}\n/**\n * @param {string} string String.\n * @return {boolean|undefined} Boolean.\n */\nexport function readBooleanString(string) {\n    var m = /^\\s*(true|1)|(false|0)\\s*$/.exec(string);\n    if (m) {\n        return m[1] !== undefined || false;\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @param {Node} node Node.\n * @return {number|undefined} DateTime in seconds.\n */\nexport function readDateTime(node) {\n    var s = getAllTextContent(node, false);\n    var dateTime = Date.parse(s);\n    return isNaN(dateTime) ? undefined : dateTime / 1000;\n}\n/**\n * @param {Node} node Node.\n * @return {number|undefined} Decimal.\n */\nexport function readDecimal(node) {\n    var s = getAllTextContent(node, false);\n    return readDecimalString(s);\n}\n/**\n * @param {string} string String.\n * @return {number|undefined} Decimal.\n */\nexport function readDecimalString(string) {\n    // FIXME check spec\n    var m = /^\\s*([+\\-]?\\d*\\.?\\d+(?:e[+\\-]?\\d+)?)\\s*$/i.exec(string);\n    if (m) {\n        return parseFloat(m[1]);\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @param {Node} node Node.\n * @return {number|undefined} Non negative integer.\n */\nexport function readNonNegativeInteger(node) {\n    var s = getAllTextContent(node, false);\n    return readNonNegativeIntegerString(s);\n}\n/**\n * @param {string} string String.\n * @return {number|undefined} Non negative integer.\n */\nexport function readNonNegativeIntegerString(string) {\n    var m = /^\\s*(\\d+)\\s*$/.exec(string);\n    if (m) {\n        return parseInt(m[1], 10);\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @param {Node} node Node.\n * @return {string|undefined} String.\n */\nexport function readString(node) {\n    return getAllTextContent(node, false).trim();\n}\n/**\n * @param {Node} node Node to append a TextNode with the boolean to.\n * @param {boolean} bool Boolean.\n */\nexport function writeBooleanTextNode(node, bool) {\n    writeStringTextNode(node, bool ? '1' : '0');\n}\n/**\n * @param {Node} node Node to append a CDATA Section with the string to.\n * @param {string} string String.\n */\nexport function writeCDATASection(node, string) {\n    node.appendChild(getDocument().createCDATASection(string));\n}\n/**\n * @param {Node} node Node to append a TextNode with the dateTime to.\n * @param {number} dateTime DateTime in seconds.\n */\nexport function writeDateTimeTextNode(node, dateTime) {\n    var date = new Date(dateTime * 1000);\n    var string = date.getUTCFullYear() +\n        '-' +\n        padNumber(date.getUTCMonth() + 1, 2) +\n        '-' +\n        padNumber(date.getUTCDate(), 2) +\n        'T' +\n        padNumber(date.getUTCHours(), 2) +\n        ':' +\n        padNumber(date.getUTCMinutes(), 2) +\n        ':' +\n        padNumber(date.getUTCSeconds(), 2) +\n        'Z';\n    node.appendChild(getDocument().createTextNode(string));\n}\n/**\n * @param {Node} node Node to append a TextNode with the decimal to.\n * @param {number} decimal Decimal.\n */\nexport function writeDecimalTextNode(node, decimal) {\n    var string = decimal.toPrecision();\n    node.appendChild(getDocument().createTextNode(string));\n}\n/**\n * @param {Node} node Node to append a TextNode with the decimal to.\n * @param {number} nonNegativeInteger Non negative integer.\n */\nexport function writeNonNegativeIntegerTextNode(node, nonNegativeInteger) {\n    var string = nonNegativeInteger.toString();\n    node.appendChild(getDocument().createTextNode(string));\n}\n/**\n * @param {Node} node Node to append a TextNode with the string to.\n * @param {string} string String.\n */\nexport function writeStringTextNode(node, string) {\n    node.appendChild(getDocument().createTextNode(string));\n}\n//# sourceMappingURL=xsd.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/GML2\n */\nimport GMLBase, { GMLNS } from './GMLBase.js';\nimport { OBJECT_PROPERTY_NODE_FACTORY, createElementNS, getAllTextContent, makeArrayPusher, makeChildAppender, makeReplacer, makeSimpleNodeFactory, pushParseAndPop, pushSerializeAndPop, } from '../xml.js';\nimport { assign } from '../obj.js';\nimport { createOrUpdate } from '../extent.js';\nimport { get as getProjection } from '../proj.js';\nimport { transformExtentWithOptions, transformGeometryWithOptions, } from './Feature.js';\nimport { writeStringTextNode } from './xsd.js';\n/**\n * @const\n * @type {string}\n */\nvar schemaLocation = GMLNS + ' http://schemas.opengis.net/gml/2.1.2/feature.xsd';\n/**\n * @const\n * @type {Object<string, string>}\n */\nvar MULTIGEOMETRY_TO_MEMBER_NODENAME = {\n    'MultiLineString': 'lineStringMember',\n    'MultiCurve': 'curveMember',\n    'MultiPolygon': 'polygonMember',\n    'MultiSurface': 'surfaceMember',\n};\n/**\n * @classdesc\n * Feature format for reading and writing data in the GML format,\n * version 2.1.2.\n *\n * @api\n */\nvar GML2 = /** @class */ (function (_super) {\n    __extends(GML2, _super);\n    /**\n     * @param {import(\"./GMLBase.js\").Options} [opt_options] Optional configuration object.\n     */\n    function GML2(opt_options) {\n        var _this = this;\n        var options = \n        /** @type {import(\"./GMLBase.js\").Options} */\n        (opt_options ? opt_options : {});\n        _this = _super.call(this, options) || this;\n        _this.FEATURE_COLLECTION_PARSERS[GMLNS]['featureMember'] = makeArrayPusher(_this.readFeaturesInternal);\n        /**\n         * @type {string}\n         */\n        _this.schemaLocation = options.schemaLocation\n            ? options.schemaLocation\n            : schemaLocation;\n        return _this;\n    }\n    /**\n     * @param {Node} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<number>|undefined} Flat coordinates.\n     */\n    GML2.prototype.readFlatCoordinates = function (node, objectStack) {\n        var s = getAllTextContent(node, false).replace(/^\\s*|\\s*$/g, '');\n        var context = /** @type {import(\"../xml.js\").NodeStackItem} */ (objectStack[0]);\n        var containerSrs = context['srsName'];\n        var axisOrientation = 'enu';\n        if (containerSrs) {\n            var proj = getProjection(containerSrs);\n            if (proj) {\n                axisOrientation = proj.getAxisOrientation();\n            }\n        }\n        var coordsGroups = s.trim().split(/\\s+/);\n        var flatCoordinates = [];\n        for (var i = 0, ii = coordsGroups.length; i < ii; i++) {\n            var coords = coordsGroups[i].split(/,+/);\n            var x = parseFloat(coords[0]);\n            var y = parseFloat(coords[1]);\n            var z = coords.length === 3 ? parseFloat(coords[2]) : 0;\n            if (axisOrientation.substr(0, 2) === 'en') {\n                flatCoordinates.push(x, y, z);\n            }\n            else {\n                flatCoordinates.push(y, x, z);\n            }\n        }\n        return flatCoordinates;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {import(\"../extent.js\").Extent|undefined} Envelope.\n     */\n    GML2.prototype.readBox = function (node, objectStack) {\n        /** @type {Array<number>} */\n        var flatCoordinates = pushParseAndPop([null], this.BOX_PARSERS_, node, objectStack, this);\n        return createOrUpdate(flatCoordinates[1][0], flatCoordinates[1][1], flatCoordinates[1][3], flatCoordinates[1][4]);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GML2.prototype.innerBoundaryIsParser = function (node, objectStack) {\n        /** @type {Array<number>|undefined} */\n        var flatLinearRing = pushParseAndPop(undefined, this.RING_PARSERS, node, objectStack, this);\n        if (flatLinearRing) {\n            var flatLinearRings = \n            /** @type {Array<Array<number>>} */\n            (objectStack[objectStack.length - 1]);\n            flatLinearRings.push(flatLinearRing);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GML2.prototype.outerBoundaryIsParser = function (node, objectStack) {\n        /** @type {Array<number>|undefined} */\n        var flatLinearRing = pushParseAndPop(undefined, this.RING_PARSERS, node, objectStack, this);\n        if (flatLinearRing) {\n            var flatLinearRings = \n            /** @type {Array<Array<number>>} */\n            (objectStack[objectStack.length - 1]);\n            flatLinearRings[0] = flatLinearRing;\n        }\n    };\n    /**\n     * @const\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string} [opt_nodeName] Node name.\n     * @return {Element|undefined} Node.\n     * @private\n     */\n    GML2.prototype.GEOMETRY_NODE_FACTORY_ = function (value, objectStack, opt_nodeName) {\n        var context = objectStack[objectStack.length - 1];\n        var multiSurface = context['multiSurface'];\n        var surface = context['surface'];\n        var multiCurve = context['multiCurve'];\n        var nodeName;\n        if (!Array.isArray(value)) {\n            nodeName = /** @type {import(\"../geom/Geometry.js\").default} */ (value).getType();\n            if (nodeName === 'MultiPolygon' && multiSurface === true) {\n                nodeName = 'MultiSurface';\n            }\n            else if (nodeName === 'Polygon' && surface === true) {\n                nodeName = 'Surface';\n            }\n            else if (nodeName === 'MultiLineString' && multiCurve === true) {\n                nodeName = 'MultiCurve';\n            }\n        }\n        else {\n            nodeName = 'Envelope';\n        }\n        return createElementNS('http://www.opengis.net/gml', nodeName);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeFeatureElement = function (node, feature, objectStack) {\n        var fid = feature.getId();\n        if (fid) {\n            node.setAttribute('fid', /** @type {string} */ (fid));\n        }\n        var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n        var featureNS = context['featureNS'];\n        var geometryName = feature.getGeometryName();\n        if (!context.serializers) {\n            context.serializers = {};\n            context.serializers[featureNS] = {};\n        }\n        var keys = [];\n        var values = [];\n        if (feature.hasProperties()) {\n            var properties = feature.getProperties();\n            for (var key in properties) {\n                var value = properties[key];\n                if (value !== null) {\n                    keys.push(key);\n                    values.push(value);\n                    if (key == geometryName ||\n                        typeof ( /** @type {?} */(value).getSimplifiedGeometry) ===\n                            'function') {\n                        if (!(key in context.serializers[featureNS])) {\n                            context.serializers[featureNS][key] = makeChildAppender(this.writeGeometryElement, this);\n                        }\n                    }\n                    else {\n                        if (!(key in context.serializers[featureNS])) {\n                            context.serializers[featureNS][key] =\n                                makeChildAppender(writeStringTextNode);\n                        }\n                    }\n                }\n            }\n        }\n        var item = assign({}, context);\n        item.node = node;\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        (item), context.serializers, makeSimpleNodeFactory(undefined, featureNS), values, objectStack, keys);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/LineString.js\").default} geometry LineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeCurveOrLineString = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (node.nodeName !== 'LineStringSegment' && srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        if (node.nodeName === 'LineString' ||\n            node.nodeName === 'LineStringSegment') {\n            var coordinates = this.createCoordinatesNode_(node.namespaceURI);\n            node.appendChild(coordinates);\n            this.writeCoordinates_(coordinates, geometry, objectStack);\n        }\n        else if (node.nodeName === 'Curve') {\n            var segments = createElementNS(node.namespaceURI, 'segments');\n            node.appendChild(segments);\n            this.writeCurveSegments_(segments, geometry, objectStack);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/LineString.js\").default} line LineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeLineStringOrCurveMember = function (node, line, objectStack) {\n        var child = this.GEOMETRY_NODE_FACTORY_(line, objectStack);\n        if (child) {\n            node.appendChild(child);\n            this.writeCurveOrLineString(child, line, objectStack);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/MultiLineString.js\").default} geometry MultiLineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeMultiCurveOrLineString = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        var curve = context['curve'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var lines = geometry.getLineStrings();\n        pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName, curve: curve }, this.LINESTRINGORCURVEMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, lines, objectStack, undefined, this);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/Geometry.js\").default|import(\"../extent.js\").Extent} geometry Geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeGeometryElement = function (node, geometry, objectStack) {\n        var context = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[objectStack.length - 1]);\n        var item = assign({}, context);\n        item['node'] = node;\n        var value;\n        if (Array.isArray(geometry)) {\n            value = transformExtentWithOptions(\n            /** @type {import(\"../extent.js\").Extent} */ (geometry), context);\n        }\n        else {\n            value = transformGeometryWithOptions(\n            /** @type {import(\"../geom/Geometry.js\").default} */ (geometry), true, context);\n        }\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        (item), this.GEOMETRY_SERIALIZERS, this.GEOMETRY_NODE_FACTORY_, [value], objectStack, undefined, this);\n    };\n    /**\n     * @param {string} namespaceURI XML namespace.\n     * @return {Element} coordinates node.\n     * @private\n     */\n    GML2.prototype.createCoordinatesNode_ = function (namespaceURI) {\n        var coordinates = createElementNS(namespaceURI, 'coordinates');\n        coordinates.setAttribute('decimal', '.');\n        coordinates.setAttribute('cs', ',');\n        coordinates.setAttribute('ts', ' ');\n        return coordinates;\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/LineString.js\").default|import(\"../geom/LinearRing.js\").default} value Geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML2.prototype.writeCoordinates_ = function (node, value, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        // only 2d for simple features profile\n        var points = value.getCoordinates();\n        var len = points.length;\n        var parts = new Array(len);\n        for (var i = 0; i < len; ++i) {\n            var point = points[i];\n            parts[i] = this.getCoords_(point, srsName, hasZ);\n        }\n        writeStringTextNode(node, parts.join(' '));\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/LineString.js\").default} line LineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML2.prototype.writeCurveSegments_ = function (node, line, objectStack) {\n        var child = createElementNS(node.namespaceURI, 'LineStringSegment');\n        node.appendChild(child);\n        this.writeCurveOrLineString(child, line, objectStack);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/Polygon.js\").default} geometry Polygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeSurfaceOrPolygon = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        if (node.nodeName !== 'PolygonPatch' && srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        if (node.nodeName === 'Polygon' || node.nodeName === 'PolygonPatch') {\n            var rings = geometry.getLinearRings();\n            pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName }, this.RING_SERIALIZERS, this.RING_NODE_FACTORY_, rings, objectStack, undefined, this);\n        }\n        else if (node.nodeName === 'Surface') {\n            var patches = createElementNS(node.namespaceURI, 'patches');\n            node.appendChild(patches);\n            this.writeSurfacePatches_(patches, geometry, objectStack);\n        }\n    };\n    /**\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string} [opt_nodeName] Node name.\n     * @return {Node} Node.\n     * @private\n     */\n    GML2.prototype.RING_NODE_FACTORY_ = function (value, objectStack, opt_nodeName) {\n        var context = objectStack[objectStack.length - 1];\n        var parentNode = context.node;\n        var exteriorWritten = context['exteriorWritten'];\n        if (exteriorWritten === undefined) {\n            context['exteriorWritten'] = true;\n        }\n        return createElementNS(parentNode.namespaceURI, exteriorWritten !== undefined ? 'innerBoundaryIs' : 'outerBoundaryIs');\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/Polygon.js\").default} polygon Polygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML2.prototype.writeSurfacePatches_ = function (node, polygon, objectStack) {\n        var child = createElementNS(node.namespaceURI, 'PolygonPatch');\n        node.appendChild(child);\n        this.writeSurfaceOrPolygon(child, polygon, objectStack);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/LinearRing.js\").default} ring LinearRing geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeRing = function (node, ring, objectStack) {\n        var linearRing = createElementNS(node.namespaceURI, 'LinearRing');\n        node.appendChild(linearRing);\n        this.writeLinearRing(linearRing, ring, objectStack);\n    };\n    /**\n     * @param {Array<number>} point Point geometry.\n     * @param {string} [opt_srsName] Optional srsName\n     * @param {boolean} [opt_hasZ] whether the geometry has a Z coordinate (is 3D) or not.\n     * @return {string} The coords string.\n     * @private\n     */\n    GML2.prototype.getCoords_ = function (point, opt_srsName, opt_hasZ) {\n        var axisOrientation = 'enu';\n        if (opt_srsName) {\n            axisOrientation = getProjection(opt_srsName).getAxisOrientation();\n        }\n        var coords = axisOrientation.substr(0, 2) === 'en'\n            ? point[0] + ',' + point[1]\n            : point[1] + ',' + point[0];\n        if (opt_hasZ) {\n            // For newly created points, Z can be undefined.\n            var z = point[2] || 0;\n            coords += ',' + z;\n        }\n        return coords;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/Point.js\").default} geometry Point geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writePoint = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var coordinates = this.createCoordinatesNode_(node.namespaceURI);\n        node.appendChild(coordinates);\n        var point = geometry.getCoordinates();\n        var coord = this.getCoords_(point, srsName, hasZ);\n        writeStringTextNode(coordinates, coord);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/MultiPoint.js\").default} geometry MultiPoint geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeMultiPoint = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var points = geometry.getPoints();\n        pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName }, this.POINTMEMBER_SERIALIZERS, makeSimpleNodeFactory('pointMember'), points, objectStack, undefined, this);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/Point.js\").default} point Point geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writePointMember = function (node, point, objectStack) {\n        var child = createElementNS(node.namespaceURI, 'Point');\n        node.appendChild(child);\n        this.writePoint(child, point, objectStack);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/LinearRing.js\").default} geometry LinearRing geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeLinearRing = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var coordinates = this.createCoordinatesNode_(node.namespaceURI);\n        node.appendChild(coordinates);\n        this.writeCoordinates_(coordinates, geometry, objectStack);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/MultiPolygon.js\").default} geometry MultiPolygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeMultiSurfaceOrPolygon = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        var surface = context['surface'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var polygons = geometry.getPolygons();\n        pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName, surface: surface }, this.SURFACEORPOLYGONMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, polygons, objectStack, undefined, this);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/Polygon.js\").default} polygon Polygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeSurfaceOrPolygonMember = function (node, polygon, objectStack) {\n        var child = this.GEOMETRY_NODE_FACTORY_(polygon, objectStack);\n        if (child) {\n            node.appendChild(child);\n            this.writeSurfaceOrPolygon(child, polygon, objectStack);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML2.prototype.writeEnvelope = function (node, extent, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var keys = ['lowerCorner', 'upperCorner'];\n        var values = [extent[0] + ' ' + extent[1], extent[2] + ' ' + extent[3]];\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        ({ node: node }), this.ENVELOPE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, keys, this);\n    };\n    /**\n     * @const\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string} [opt_nodeName] Node name.\n     * @return {Node|undefined} Node.\n     * @private\n     */\n    GML2.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_ = function (value, objectStack, opt_nodeName) {\n        var parentNode = objectStack[objectStack.length - 1].node;\n        return createElementNS('http://www.opengis.net/gml', MULTIGEOMETRY_TO_MEMBER_NODENAME[parentNode.nodeName]);\n    };\n    return GML2;\n}(GMLBase));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'coordinates': makeReplacer(GML2.prototype.readFlatCoordinates),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML2.prototype.FLAT_LINEAR_RINGS_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'innerBoundaryIs': GML2.prototype.innerBoundaryIsParser,\n        'outerBoundaryIs': GML2.prototype.outerBoundaryIsParser,\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML2.prototype.BOX_PARSERS_ = {\n    'http://www.opengis.net/gml': {\n        'coordinates': makeArrayPusher(GML2.prototype.readFlatCoordinates),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML2.prototype.GEOMETRY_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'Point': makeReplacer(GMLBase.prototype.readPoint),\n        'MultiPoint': makeReplacer(GMLBase.prototype.readMultiPoint),\n        'LineString': makeReplacer(GMLBase.prototype.readLineString),\n        'MultiLineString': makeReplacer(GMLBase.prototype.readMultiLineString),\n        'LinearRing': makeReplacer(GMLBase.prototype.readLinearRing),\n        'Polygon': makeReplacer(GMLBase.prototype.readPolygon),\n        'MultiPolygon': makeReplacer(GMLBase.prototype.readMultiPolygon),\n        'Box': makeReplacer(GML2.prototype.readBox),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML2.prototype.GEOMETRY_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'Curve': makeChildAppender(GML2.prototype.writeCurveOrLineString),\n        'MultiCurve': makeChildAppender(GML2.prototype.writeMultiCurveOrLineString),\n        'Point': makeChildAppender(GML2.prototype.writePoint),\n        'MultiPoint': makeChildAppender(GML2.prototype.writeMultiPoint),\n        'LineString': makeChildAppender(GML2.prototype.writeCurveOrLineString),\n        'MultiLineString': makeChildAppender(GML2.prototype.writeMultiCurveOrLineString),\n        'LinearRing': makeChildAppender(GML2.prototype.writeLinearRing),\n        'Polygon': makeChildAppender(GML2.prototype.writeSurfaceOrPolygon),\n        'MultiPolygon': makeChildAppender(GML2.prototype.writeMultiSurfaceOrPolygon),\n        'Surface': makeChildAppender(GML2.prototype.writeSurfaceOrPolygon),\n        'MultiSurface': makeChildAppender(GML2.prototype.writeMultiSurfaceOrPolygon),\n        'Envelope': makeChildAppender(GML2.prototype.writeEnvelope),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML2.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'lineStringMember': makeChildAppender(GML2.prototype.writeLineStringOrCurveMember),\n        'curveMember': makeChildAppender(GML2.prototype.writeLineStringOrCurveMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML2.prototype.RING_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'outerBoundaryIs': makeChildAppender(GML2.prototype.writeRing),\n        'innerBoundaryIs': makeChildAppender(GML2.prototype.writeRing),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML2.prototype.POINTMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'pointMember': makeChildAppender(GML2.prototype.writePointMember),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML2.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'surfaceMember': makeChildAppender(GML2.prototype.writeSurfaceOrPolygonMember),\n        'polygonMember': makeChildAppender(GML2.prototype.writeSurfaceOrPolygonMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML2.prototype.ENVELOPE_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'lowerCorner': makeChildAppender(writeStringTextNode),\n        'upperCorner': makeChildAppender(writeStringTextNode),\n    },\n};\nexport default GML2;\n//# sourceMappingURL=GML2.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/GML3\n */\nimport GML2 from './GML2.js';\nimport GMLBase, { GMLNS } from './GMLBase.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Polygon from '../geom/Polygon.js';\nimport { OBJECT_PROPERTY_NODE_FACTORY, XML_SCHEMA_INSTANCE_URI, createElementNS, getAllTextContent, makeArrayPusher, makeChildAppender, makeReplacer, makeSimpleNodeFactory, parseNode, pushParseAndPop, pushSerializeAndPop, } from '../xml.js';\nimport { assign } from '../obj.js';\nimport { createOrUpdate } from '../extent.js';\nimport { extend } from '../array.js';\nimport { get as getProjection } from '../proj.js';\nimport { readNonNegativeIntegerString, writeStringTextNode } from './xsd.js';\nimport { transformExtentWithOptions, transformGeometryWithOptions, } from './Feature.js';\n/**\n * @const\n * @type {string}\n * @private\n */\nvar schemaLocation = GMLNS +\n    ' http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/' +\n    '1.0.0/gmlsf.xsd';\n/**\n * @const\n * @type {Object<string, string>}\n */\nvar MULTIGEOMETRY_TO_MEMBER_NODENAME = {\n    'MultiLineString': 'lineStringMember',\n    'MultiCurve': 'curveMember',\n    'MultiPolygon': 'polygonMember',\n    'MultiSurface': 'surfaceMember',\n};\n/**\n * @classdesc\n * Feature format for reading and writing data in the GML format\n * version 3.1.1.\n * Currently only supports GML 3.1.1 Simple Features profile.\n *\n * @api\n */\nvar GML3 = /** @class */ (function (_super) {\n    __extends(GML3, _super);\n    /**\n     * @param {import(\"./GMLBase.js\").Options} [opt_options] Optional configuration object.\n     */\n    function GML3(opt_options) {\n        var _this = this;\n        var options = \n        /** @type {import(\"./GMLBase.js\").Options} */\n        (opt_options ? opt_options : {});\n        _this = _super.call(this, options) || this;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.surface_ = options.surface !== undefined ? options.surface : false;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.curve_ = options.curve !== undefined ? options.curve : false;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.multiCurve_ =\n            options.multiCurve !== undefined ? options.multiCurve : true;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.multiSurface_ =\n            options.multiSurface !== undefined ? options.multiSurface : true;\n        /**\n         * @type {string}\n         */\n        _this.schemaLocation = options.schemaLocation\n            ? options.schemaLocation\n            : schemaLocation;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hasZ = options.hasZ !== undefined ? options.hasZ : false;\n        return _this;\n    }\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {MultiLineString|undefined} MultiLineString.\n     */\n    GML3.prototype.readMultiCurve = function (node, objectStack) {\n        /** @type {Array<LineString>} */\n        var lineStrings = pushParseAndPop([], this.MULTICURVE_PARSERS, node, objectStack, this);\n        if (lineStrings) {\n            var multiLineString = new MultiLineString(lineStrings);\n            return multiLineString;\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {MultiPolygon|undefined} MultiPolygon.\n     */\n    GML3.prototype.readMultiSurface = function (node, objectStack) {\n        /** @type {Array<Polygon>} */\n        var polygons = pushParseAndPop([], this.MULTISURFACE_PARSERS, node, objectStack, this);\n        if (polygons) {\n            return new MultiPolygon(polygons);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GML3.prototype.curveMemberParser = function (node, objectStack) {\n        parseNode(this.CURVEMEMBER_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GML3.prototype.surfaceMemberParser = function (node, objectStack) {\n        parseNode(this.SURFACEMEMBER_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<(Array<number>)>|undefined} flat coordinates.\n     */\n    GML3.prototype.readPatch = function (node, objectStack) {\n        return pushParseAndPop([null], this.PATCHES_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<number>|undefined} flat coordinates.\n     */\n    GML3.prototype.readSegment = function (node, objectStack) {\n        return pushParseAndPop([null], this.SEGMENTS_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<(Array<number>)>|undefined} flat coordinates.\n     */\n    GML3.prototype.readPolygonPatch = function (node, objectStack) {\n        return pushParseAndPop([null], this.FLAT_LINEAR_RINGS_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<number>|undefined} flat coordinates.\n     */\n    GML3.prototype.readLineStringSegment = function (node, objectStack) {\n        return pushParseAndPop([null], this.GEOMETRY_FLAT_COORDINATES_PARSERS, node, objectStack, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GML3.prototype.interiorParser = function (node, objectStack) {\n        /** @type {Array<number>|undefined} */\n        var flatLinearRing = pushParseAndPop(undefined, this.RING_PARSERS, node, objectStack, this);\n        if (flatLinearRing) {\n            var flatLinearRings = \n            /** @type {Array<Array<number>>} */\n            (objectStack[objectStack.length - 1]);\n            flatLinearRings.push(flatLinearRing);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    GML3.prototype.exteriorParser = function (node, objectStack) {\n        /** @type {Array<number>|undefined} */\n        var flatLinearRing = pushParseAndPop(undefined, this.RING_PARSERS, node, objectStack, this);\n        if (flatLinearRing) {\n            var flatLinearRings = \n            /** @type {Array<Array<number>>} */\n            (objectStack[objectStack.length - 1]);\n            flatLinearRings[0] = flatLinearRing;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Polygon|undefined} Polygon.\n     */\n    GML3.prototype.readSurface = function (node, objectStack) {\n        /** @type {Array<Array<number>>} */\n        var flatLinearRings = pushParseAndPop([null], this.SURFACE_PARSERS, node, objectStack, this);\n        if (flatLinearRings && flatLinearRings[0]) {\n            var flatCoordinates = flatLinearRings[0];\n            var ends = [flatCoordinates.length];\n            var i = void 0, ii = void 0;\n            for (i = 1, ii = flatLinearRings.length; i < ii; ++i) {\n                extend(flatCoordinates, flatLinearRings[i]);\n                ends.push(flatCoordinates.length);\n            }\n            return new Polygon(flatCoordinates, GeometryLayout.XYZ, ends);\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {LineString|undefined} LineString.\n     */\n    GML3.prototype.readCurve = function (node, objectStack) {\n        /** @type {Array<number>} */\n        var flatCoordinates = pushParseAndPop([null], this.CURVE_PARSERS, node, objectStack, this);\n        if (flatCoordinates) {\n            var lineString = new LineString(flatCoordinates, GeometryLayout.XYZ);\n            return lineString;\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {import(\"../extent.js\").Extent|undefined} Envelope.\n     */\n    GML3.prototype.readEnvelope = function (node, objectStack) {\n        /** @type {Array<number>} */\n        var flatCoordinates = pushParseAndPop([null], this.ENVELOPE_PARSERS, node, objectStack, this);\n        return createOrUpdate(flatCoordinates[1][0], flatCoordinates[1][1], flatCoordinates[2][0], flatCoordinates[2][1]);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<number>|undefined} Flat coordinates.\n     */\n    GML3.prototype.readFlatPos = function (node, objectStack) {\n        var s = getAllTextContent(node, false);\n        var re = /^\\s*([+\\-]?\\d*\\.?\\d+(?:[eE][+\\-]?\\d+)?)\\s*/;\n        /** @type {Array<number>} */\n        var flatCoordinates = [];\n        var m;\n        while ((m = re.exec(s))) {\n            flatCoordinates.push(parseFloat(m[1]));\n            s = s.substr(m[0].length);\n        }\n        if (s !== '') {\n            return undefined;\n        }\n        var context = objectStack[0];\n        var containerSrs = context['srsName'];\n        var axisOrientation = 'enu';\n        if (containerSrs) {\n            var proj = getProjection(containerSrs);\n            axisOrientation = proj.getAxisOrientation();\n        }\n        if (axisOrientation === 'neu') {\n            var i = void 0, ii = void 0;\n            for (i = 0, ii = flatCoordinates.length; i < ii; i += 3) {\n                var y = flatCoordinates[i];\n                var x = flatCoordinates[i + 1];\n                flatCoordinates[i] = x;\n                flatCoordinates[i + 1] = y;\n            }\n        }\n        var len = flatCoordinates.length;\n        if (len == 2) {\n            flatCoordinates.push(0);\n        }\n        if (len === 0) {\n            return undefined;\n        }\n        return flatCoordinates;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<number>|undefined} Flat coordinates.\n     */\n    GML3.prototype.readFlatPosList = function (node, objectStack) {\n        var s = getAllTextContent(node, false).replace(/^\\s*|\\s*$/g, '');\n        var context = objectStack[0];\n        var containerSrs = context['srsName'];\n        var contextDimension = context['srsDimension'];\n        var axisOrientation = 'enu';\n        if (containerSrs) {\n            var proj = getProjection(containerSrs);\n            axisOrientation = proj.getAxisOrientation();\n        }\n        var coords = s.split(/\\s+/);\n        // The \"dimension\" attribute is from the GML 3.0.1 spec.\n        var dim = 2;\n        if (node.getAttribute('srsDimension')) {\n            dim = readNonNegativeIntegerString(node.getAttribute('srsDimension'));\n        }\n        else if (node.getAttribute('dimension')) {\n            dim = readNonNegativeIntegerString(node.getAttribute('dimension'));\n        }\n        else if (\n        /** @type {Element} */ (node.parentNode).getAttribute('srsDimension')) {\n            dim = readNonNegativeIntegerString(\n            /** @type {Element} */ (node.parentNode).getAttribute('srsDimension'));\n        }\n        else if (contextDimension) {\n            dim = readNonNegativeIntegerString(contextDimension);\n        }\n        var x, y, z;\n        var flatCoordinates = [];\n        for (var i = 0, ii = coords.length; i < ii; i += dim) {\n            x = parseFloat(coords[i]);\n            y = parseFloat(coords[i + 1]);\n            z = dim === 3 ? parseFloat(coords[i + 2]) : 0;\n            if (axisOrientation.substr(0, 2) === 'en') {\n                flatCoordinates.push(x, y, z);\n            }\n            else {\n                flatCoordinates.push(y, x, z);\n            }\n        }\n        return flatCoordinates;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/Point.js\").default} value Point geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML3.prototype.writePos_ = function (node, value, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsDimension = hasZ ? '3' : '2';\n        node.setAttribute('srsDimension', srsDimension);\n        var srsName = context['srsName'];\n        var axisOrientation = 'enu';\n        if (srsName) {\n            axisOrientation = getProjection(srsName).getAxisOrientation();\n        }\n        var point = value.getCoordinates();\n        var coords;\n        // only 2d for simple features profile\n        if (axisOrientation.substr(0, 2) === 'en') {\n            coords = point[0] + ' ' + point[1];\n        }\n        else {\n            coords = point[1] + ' ' + point[0];\n        }\n        if (hasZ) {\n            // For newly created points, Z can be undefined.\n            var z = point[2] || 0;\n            coords += ' ' + z;\n        }\n        writeStringTextNode(node, coords);\n    };\n    /**\n     * @param {Array<number>} point Point geometry.\n     * @param {string} [opt_srsName] Optional srsName\n     * @param {boolean} [opt_hasZ] whether the geometry has a Z coordinate (is 3D) or not.\n     * @return {string} The coords string.\n     * @private\n     */\n    GML3.prototype.getCoords_ = function (point, opt_srsName, opt_hasZ) {\n        var axisOrientation = 'enu';\n        if (opt_srsName) {\n            axisOrientation = getProjection(opt_srsName).getAxisOrientation();\n        }\n        var coords = axisOrientation.substr(0, 2) === 'en'\n            ? point[0] + ' ' + point[1]\n            : point[1] + ' ' + point[0];\n        if (opt_hasZ) {\n            // For newly created points, Z can be undefined.\n            var z = point[2] || 0;\n            coords += ' ' + z;\n        }\n        return coords;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {LineString|import(\"../geom/LinearRing.js\").default} value Geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML3.prototype.writePosList_ = function (node, value, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsDimension = hasZ ? '3' : '2';\n        node.setAttribute('srsDimension', srsDimension);\n        var srsName = context['srsName'];\n        // only 2d for simple features profile\n        var points = value.getCoordinates();\n        var len = points.length;\n        var parts = new Array(len);\n        var point;\n        for (var i = 0; i < len; ++i) {\n            point = points[i];\n            parts[i] = this.getCoords_(point, srsName, hasZ);\n        }\n        writeStringTextNode(node, parts.join(' '));\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/Point.js\").default} geometry Point geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writePoint = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var pos = createElementNS(node.namespaceURI, 'pos');\n        node.appendChild(pos);\n        this.writePos_(pos, geometry, objectStack);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeEnvelope = function (node, extent, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var keys = ['lowerCorner', 'upperCorner'];\n        var values = [extent[0] + ' ' + extent[1], extent[2] + ' ' + extent[3]];\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        ({ node: node }), this.ENVELOPE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, keys, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/LinearRing.js\").default} geometry LinearRing geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeLinearRing = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var posList = createElementNS(node.namespaceURI, 'posList');\n        node.appendChild(posList);\n        this.writePosList_(posList, geometry, objectStack);\n    };\n    /**\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string} [opt_nodeName] Node name.\n     * @return {Node} Node.\n     * @private\n     */\n    GML3.prototype.RING_NODE_FACTORY_ = function (value, objectStack, opt_nodeName) {\n        var context = objectStack[objectStack.length - 1];\n        var parentNode = context.node;\n        var exteriorWritten = context['exteriorWritten'];\n        if (exteriorWritten === undefined) {\n            context['exteriorWritten'] = true;\n        }\n        return createElementNS(parentNode.namespaceURI, exteriorWritten !== undefined ? 'interior' : 'exterior');\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Polygon} geometry Polygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeSurfaceOrPolygon = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        if (node.nodeName !== 'PolygonPatch' && srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        if (node.nodeName === 'Polygon' || node.nodeName === 'PolygonPatch') {\n            var rings = geometry.getLinearRings();\n            pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName }, this.RING_SERIALIZERS, this.RING_NODE_FACTORY_, rings, objectStack, undefined, this);\n        }\n        else if (node.nodeName === 'Surface') {\n            var patches = createElementNS(node.namespaceURI, 'patches');\n            node.appendChild(patches);\n            this.writeSurfacePatches_(patches, geometry, objectStack);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {LineString} geometry LineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeCurveOrLineString = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        if (node.nodeName !== 'LineStringSegment' && srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        if (node.nodeName === 'LineString' ||\n            node.nodeName === 'LineStringSegment') {\n            var posList = createElementNS(node.namespaceURI, 'posList');\n            node.appendChild(posList);\n            this.writePosList_(posList, geometry, objectStack);\n        }\n        else if (node.nodeName === 'Curve') {\n            var segments = createElementNS(node.namespaceURI, 'segments');\n            node.appendChild(segments);\n            this.writeCurveSegments_(segments, geometry, objectStack);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {MultiPolygon} geometry MultiPolygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeMultiSurfaceOrPolygon = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        var surface = context['surface'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var polygons = geometry.getPolygons();\n        pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName, surface: surface }, this.SURFACEORPOLYGONMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, polygons, objectStack, undefined, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../geom/MultiPoint.js\").default} geometry MultiPoint geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeMultiPoint = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var srsName = context['srsName'];\n        var hasZ = context['hasZ'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var points = geometry.getPoints();\n        pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName }, this.POINTMEMBER_SERIALIZERS, makeSimpleNodeFactory('pointMember'), points, objectStack, undefined, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {MultiLineString} geometry MultiLineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeMultiCurveOrLineString = function (node, geometry, objectStack) {\n        var context = objectStack[objectStack.length - 1];\n        var hasZ = context['hasZ'];\n        var srsName = context['srsName'];\n        var curve = context['curve'];\n        if (srsName) {\n            node.setAttribute('srsName', srsName);\n        }\n        var lines = geometry.getLineStrings();\n        pushSerializeAndPop({ node: node, hasZ: hasZ, srsName: srsName, curve: curve }, this.LINESTRINGORCURVEMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, lines, objectStack, undefined, this);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/LinearRing.js\").default} ring LinearRing geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeRing = function (node, ring, objectStack) {\n        var linearRing = createElementNS(node.namespaceURI, 'LinearRing');\n        node.appendChild(linearRing);\n        this.writeLinearRing(linearRing, ring, objectStack);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {Polygon} polygon Polygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeSurfaceOrPolygonMember = function (node, polygon, objectStack) {\n        var child = this.GEOMETRY_NODE_FACTORY_(polygon, objectStack);\n        if (child) {\n            node.appendChild(child);\n            this.writeSurfaceOrPolygon(child, polygon, objectStack);\n        }\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/Point.js\").default} point Point geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writePointMember = function (node, point, objectStack) {\n        var child = createElementNS(node.namespaceURI, 'Point');\n        node.appendChild(child);\n        this.writePoint(child, point, objectStack);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {LineString} line LineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeLineStringOrCurveMember = function (node, line, objectStack) {\n        var child = this.GEOMETRY_NODE_FACTORY_(line, objectStack);\n        if (child) {\n            node.appendChild(child);\n            this.writeCurveOrLineString(child, line, objectStack);\n        }\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {Polygon} polygon Polygon geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML3.prototype.writeSurfacePatches_ = function (node, polygon, objectStack) {\n        var child = createElementNS(node.namespaceURI, 'PolygonPatch');\n        node.appendChild(child);\n        this.writeSurfaceOrPolygon(child, polygon, objectStack);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {LineString} line LineString geometry.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML3.prototype.writeCurveSegments_ = function (node, line, objectStack) {\n        var child = createElementNS(node.namespaceURI, 'LineStringSegment');\n        node.appendChild(child);\n        this.writeCurveOrLineString(child, line, objectStack);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {import(\"../geom/Geometry.js\").default|import(\"../extent.js\").Extent} geometry Geometry.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeGeometryElement = function (node, geometry, objectStack) {\n        var context = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[objectStack.length - 1]);\n        var item = assign({}, context);\n        item['node'] = node;\n        var value;\n        if (Array.isArray(geometry)) {\n            value = transformExtentWithOptions(\n            /** @type {import(\"../extent.js\").Extent} */ (geometry), context);\n        }\n        else {\n            value = transformGeometryWithOptions(\n            /** @type {import(\"../geom/Geometry.js\").default} */ (geometry), true, context);\n        }\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        (item), this.GEOMETRY_SERIALIZERS, this.GEOMETRY_NODE_FACTORY_, [value], objectStack, undefined, this);\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {Array<*>} objectStack Node stack.\n     */\n    GML3.prototype.writeFeatureElement = function (node, feature, objectStack) {\n        var fid = feature.getId();\n        if (fid) {\n            node.setAttribute('fid', /** @type {string} */ (fid));\n        }\n        var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n        var featureNS = context['featureNS'];\n        var geometryName = feature.getGeometryName();\n        if (!context.serializers) {\n            context.serializers = {};\n            context.serializers[featureNS] = {};\n        }\n        var keys = [];\n        var values = [];\n        if (feature.hasProperties()) {\n            var properties = feature.getProperties();\n            for (var key in properties) {\n                var value = properties[key];\n                if (value !== null) {\n                    keys.push(key);\n                    values.push(value);\n                    if (key == geometryName ||\n                        typeof ( /** @type {?} */(value).getSimplifiedGeometry) ===\n                            'function') {\n                        if (!(key in context.serializers[featureNS])) {\n                            context.serializers[featureNS][key] = makeChildAppender(this.writeGeometryElement, this);\n                        }\n                    }\n                    else {\n                        if (!(key in context.serializers[featureNS])) {\n                            context.serializers[featureNS][key] =\n                                makeChildAppender(writeStringTextNode);\n                        }\n                    }\n                }\n            }\n        }\n        var item = assign({}, context);\n        item.node = node;\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        (item), context.serializers, makeSimpleNodeFactory(undefined, featureNS), values, objectStack, keys);\n    };\n    /**\n     * @param {Node} node Node.\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {Array<*>} objectStack Node stack.\n     * @private\n     */\n    GML3.prototype.writeFeatureMembers_ = function (node, features, objectStack) {\n        var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n        var featureType = context['featureType'];\n        var featureNS = context['featureNS'];\n        /** @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>} */\n        var serializers = {};\n        serializers[featureNS] = {};\n        serializers[featureNS][featureType] = makeChildAppender(this.writeFeatureElement, this);\n        var item = assign({}, context);\n        item.node = node;\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        (item), serializers, makeSimpleNodeFactory(featureType, featureNS), features, objectStack);\n    };\n    /**\n     * @const\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string} [opt_nodeName] Node name.\n     * @return {Node|undefined} Node.\n     * @private\n     */\n    GML3.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_ = function (value, objectStack, opt_nodeName) {\n        var parentNode = objectStack[objectStack.length - 1].node;\n        return createElementNS(this.namespace, MULTIGEOMETRY_TO_MEMBER_NODENAME[parentNode.nodeName]);\n    };\n    /**\n     * @const\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string} [opt_nodeName] Node name.\n     * @return {Element|undefined} Node.\n     * @private\n     */\n    GML3.prototype.GEOMETRY_NODE_FACTORY_ = function (value, objectStack, opt_nodeName) {\n        var context = objectStack[objectStack.length - 1];\n        var multiSurface = context['multiSurface'];\n        var surface = context['surface'];\n        var curve = context['curve'];\n        var multiCurve = context['multiCurve'];\n        var nodeName;\n        if (!Array.isArray(value)) {\n            nodeName = /** @type {import(\"../geom/Geometry.js\").default} */ (value).getType();\n            if (nodeName === 'MultiPolygon' && multiSurface === true) {\n                nodeName = 'MultiSurface';\n            }\n            else if (nodeName === 'Polygon' && surface === true) {\n                nodeName = 'Surface';\n            }\n            else if (nodeName === 'LineString' && curve === true) {\n                nodeName = 'Curve';\n            }\n            else if (nodeName === 'MultiLineString' && multiCurve === true) {\n                nodeName = 'MultiCurve';\n            }\n        }\n        else {\n            nodeName = 'Envelope';\n        }\n        return createElementNS(this.namespace, nodeName);\n    };\n    /**\n     * Encode a geometry in GML 3.1.1 Simple Features.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Options.\n     * @return {Node} Node.\n     * @api\n     */\n    GML3.prototype.writeGeometryNode = function (geometry, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        var geom = createElementNS(this.namespace, 'geom');\n        var context = {\n            node: geom,\n            hasZ: this.hasZ,\n            srsName: this.srsName,\n            curve: this.curve_,\n            surface: this.surface_,\n            multiSurface: this.multiSurface_,\n            multiCurve: this.multiCurve_,\n        };\n        if (opt_options) {\n            assign(context, opt_options);\n        }\n        this.writeGeometryElement(geom, geometry, [context]);\n        return geom;\n    };\n    /**\n     * Encode an array of features in the GML 3.1.1 format as an XML node.\n     *\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Options.\n     * @return {Element} Node.\n     * @api\n     */\n    GML3.prototype.writeFeaturesNode = function (features, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        var node = createElementNS(this.namespace, 'featureMembers');\n        node.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', this.schemaLocation);\n        var context = {\n            srsName: this.srsName,\n            hasZ: this.hasZ,\n            curve: this.curve_,\n            surface: this.surface_,\n            multiSurface: this.multiSurface_,\n            multiCurve: this.multiCurve_,\n            featureNS: this.featureNS,\n            featureType: this.featureType,\n        };\n        if (opt_options) {\n            assign(context, opt_options);\n        }\n        this.writeFeatureMembers_(node, features, [context]);\n        return node;\n    };\n    return GML3;\n}(GMLBase));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'pos': makeReplacer(GML3.prototype.readFlatPos),\n        'posList': makeReplacer(GML3.prototype.readFlatPosList),\n        'coordinates': makeReplacer(GML2.prototype.readFlatCoordinates),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.FLAT_LINEAR_RINGS_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'interior': GML3.prototype.interiorParser,\n        'exterior': GML3.prototype.exteriorParser,\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.GEOMETRY_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'Point': makeReplacer(GMLBase.prototype.readPoint),\n        'MultiPoint': makeReplacer(GMLBase.prototype.readMultiPoint),\n        'LineString': makeReplacer(GMLBase.prototype.readLineString),\n        'MultiLineString': makeReplacer(GMLBase.prototype.readMultiLineString),\n        'LinearRing': makeReplacer(GMLBase.prototype.readLinearRing),\n        'Polygon': makeReplacer(GMLBase.prototype.readPolygon),\n        'MultiPolygon': makeReplacer(GMLBase.prototype.readMultiPolygon),\n        'Surface': makeReplacer(GML3.prototype.readSurface),\n        'MultiSurface': makeReplacer(GML3.prototype.readMultiSurface),\n        'Curve': makeReplacer(GML3.prototype.readCurve),\n        'MultiCurve': makeReplacer(GML3.prototype.readMultiCurve),\n        'Envelope': makeReplacer(GML3.prototype.readEnvelope),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.MULTICURVE_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'curveMember': makeArrayPusher(GML3.prototype.curveMemberParser),\n        'curveMembers': makeArrayPusher(GML3.prototype.curveMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.MULTISURFACE_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'surfaceMember': makeArrayPusher(GML3.prototype.surfaceMemberParser),\n        'surfaceMembers': makeArrayPusher(GML3.prototype.surfaceMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.CURVEMEMBER_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'LineString': makeArrayPusher(GMLBase.prototype.readLineString),\n        'Curve': makeArrayPusher(GML3.prototype.readCurve),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.SURFACEMEMBER_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'Polygon': makeArrayPusher(GMLBase.prototype.readPolygon),\n        'Surface': makeArrayPusher(GML3.prototype.readSurface),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.SURFACE_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'patches': makeReplacer(GML3.prototype.readPatch),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.CURVE_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'segments': makeReplacer(GML3.prototype.readSegment),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.ENVELOPE_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'lowerCorner': makeArrayPusher(GML3.prototype.readFlatPosList),\n        'upperCorner': makeArrayPusher(GML3.prototype.readFlatPosList),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.PATCHES_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'PolygonPatch': makeReplacer(GML3.prototype.readPolygonPatch),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML3.prototype.SEGMENTS_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'LineStringSegment': makeReplacer(GML3.prototype.readLineStringSegment),\n    },\n};\n/**\n * Encode an array of features in GML 3.1.1 Simple Features.\n *\n * @function\n * @param {Array<import(\"../Feature.js\").default>} features Features.\n * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Options.\n * @return {string} Result.\n * @api\n */\nGML3.prototype.writeFeatures;\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML3.prototype.RING_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'exterior': makeChildAppender(GML3.prototype.writeRing),\n        'interior': makeChildAppender(GML3.prototype.writeRing),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML3.prototype.ENVELOPE_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'lowerCorner': makeChildAppender(writeStringTextNode),\n        'upperCorner': makeChildAppender(writeStringTextNode),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML3.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'surfaceMember': makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember),\n        'polygonMember': makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML3.prototype.POINTMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'pointMember': makeChildAppender(GML3.prototype.writePointMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML3.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'lineStringMember': makeChildAppender(GML3.prototype.writeLineStringOrCurveMember),\n        'curveMember': makeChildAppender(GML3.prototype.writeLineStringOrCurveMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML3.prototype.GEOMETRY_SERIALIZERS = {\n    'http://www.opengis.net/gml': {\n        'Curve': makeChildAppender(GML3.prototype.writeCurveOrLineString),\n        'MultiCurve': makeChildAppender(GML3.prototype.writeMultiCurveOrLineString),\n        'Point': makeChildAppender(GML3.prototype.writePoint),\n        'MultiPoint': makeChildAppender(GML3.prototype.writeMultiPoint),\n        'LineString': makeChildAppender(GML3.prototype.writeCurveOrLineString),\n        'MultiLineString': makeChildAppender(GML3.prototype.writeMultiCurveOrLineString),\n        'LinearRing': makeChildAppender(GML3.prototype.writeLinearRing),\n        'Polygon': makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),\n        'MultiPolygon': makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),\n        'Surface': makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),\n        'MultiSurface': makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),\n        'Envelope': makeChildAppender(GML3.prototype.writeEnvelope),\n    },\n};\nexport default GML3;\n//# sourceMappingURL=GML3.js.map","/**\n * @module ol/format/GML\n */\nimport GML3 from './GML3.js';\n/**\n * Feature format for reading and writing data in the GML format\n * version 3.1.1.\n * Currently only supports GML 3.1.1 Simple Features profile.\n *\n * @class\n * @param {import(\"./GMLBase.js\").Options} [opt_options]\n *     Optional configuration object.\n * @api\n */\nvar GML = GML3;\n/**\n * Encode an array of features in GML 3.1.1 Simple Features.\n *\n * @function\n * @param {Array<import(\"../Feature.js\").default>} features Features.\n * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Options.\n * @return {string} Result.\n * @api\n */\nGML.prototype.writeFeatures;\n/**\n * Encode an array of features in the GML 3.1.1 format as an XML node.\n *\n * @function\n * @param {Array<import(\"../Feature.js\").default>} features Features.\n * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Options.\n * @return {Node} Node.\n * @api\n */\nGML.prototype.writeFeaturesNode;\nexport default GML;\n//# sourceMappingURL=GML.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/GPX\n */\nimport Feature from '../Feature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport Point from '../geom/Point.js';\nimport XMLFeature from './XMLFeature.js';\nimport { OBJECT_PROPERTY_NODE_FACTORY, XML_SCHEMA_INSTANCE_URI, createElementNS, makeArrayPusher, makeArraySerializer, makeChildAppender, makeObjectPropertySetter, makeSequence, makeSimpleNodeFactory, makeStructureNS, parseNode, pushParseAndPop, pushSerializeAndPop, } from '../xml.js';\nimport { get as getProjection } from '../proj.js';\nimport { includes } from '../array.js';\nimport { readDateTime, readDecimal, readNonNegativeInteger, readString, writeDateTimeTextNode, writeDecimalTextNode, writeNonNegativeIntegerTextNode, writeStringTextNode, } from './xsd.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [\n    null,\n    'http://www.topografix.com/GPX/1/0',\n    'http://www.topografix.com/GPX/1/1',\n];\n/**\n * @const\n * @type {string}\n */\nvar SCHEMA_LOCATION = 'http://www.topografix.com/GPX/1/1 ' +\n    'http://www.topografix.com/GPX/1/1/gpx.xsd';\n/**\n * @const\n * @type {Object<string, function(Node, Array<*>): (Feature|undefined)>}\n */\nvar FEATURE_READER = {\n    'rte': readRte,\n    'trk': readTrk,\n    'wpt': readWpt,\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar GPX_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'rte': makeArrayPusher(readRte),\n    'trk': makeArrayPusher(readTrk),\n    'wpt': makeArrayPusher(readWpt),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LINK_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'text': makeObjectPropertySetter(readString, 'linkText'),\n    'type': makeObjectPropertySetter(readString, 'linkType'),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar GPX_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'rte': makeChildAppender(writeRte),\n    'trk': makeChildAppender(writeTrk),\n    'wpt': makeChildAppender(writeWpt),\n});\n/**\n * @typedef {Object} Options\n * @property {function(Feature, Node):void} [readExtensions] Callback function\n * to process `extensions` nodes. To prevent memory leaks, this callback function must\n * not store any references to the node. Note that the `extensions`\n * node is not allowed in GPX 1.0. Moreover, only `extensions`\n * nodes from `wpt`, `rte` and `trk` can be processed, as those are\n * directly mapped to a feature.\n */\n/**\n * @typedef {Object} LayoutOptions\n * @property {boolean} [hasZ] HasZ.\n * @property {boolean} [hasM] HasM.\n */\n/**\n * @classdesc\n * Feature format for reading and writing data in the GPX format.\n *\n * Note that {@link module:ol/format/GPX~GPX#readFeature} only reads the first\n * feature of the source.\n *\n * When reading, routes (`<rte>`) are converted into LineString geometries, and\n * tracks (`<trk>`) into MultiLineString. Any properties on route and track\n * waypoints are ignored.\n *\n * When writing, LineString geometries are output as routes (`<rte>`), and\n * MultiLineString as tracks (`<trk>`).\n *\n * @api\n */\nvar GPX = /** @class */ (function (_super) {\n    __extends(GPX, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function GPX(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection('EPSG:4326');\n        /**\n         * @type {function(Feature, Node): void|undefined}\n         * @private\n         */\n        _this.readExtensions_ = options.readExtensions;\n        return _this;\n    }\n    /**\n     * @param {Array<Feature>} features List of features.\n     * @private\n     */\n    GPX.prototype.handleReadExtensions_ = function (features) {\n        if (!features) {\n            features = [];\n        }\n        for (var i = 0, ii = features.length; i < ii; ++i) {\n            var feature = features[i];\n            if (this.readExtensions_) {\n                var extensionsNode = feature.get('extensionsNode_') || null;\n                this.readExtensions_(feature, extensionsNode);\n            }\n            feature.set('extensionsNode_', undefined);\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    GPX.prototype.readFeatureFromNode = function (node, opt_options) {\n        if (!includes(NAMESPACE_URIS, node.namespaceURI)) {\n            return null;\n        }\n        var featureReader = FEATURE_READER[node.localName];\n        if (!featureReader) {\n            return null;\n        }\n        var feature = featureReader(node, [\n            this.getReadOptions(node, opt_options),\n        ]);\n        if (!feature) {\n            return null;\n        }\n        this.handleReadExtensions_([feature]);\n        return feature;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    GPX.prototype.readFeaturesFromNode = function (node, opt_options) {\n        if (!includes(NAMESPACE_URIS, node.namespaceURI)) {\n            return [];\n        }\n        if (node.localName == 'gpx') {\n            /** @type {Array<Feature>} */\n            var features = pushParseAndPop([], GPX_PARSERS, node, [\n                this.getReadOptions(node, opt_options),\n            ]);\n            if (features) {\n                this.handleReadExtensions_(features);\n                return features;\n            }\n            else {\n                return [];\n            }\n        }\n        return [];\n    };\n    /**\n     * Encode an array of features in the GPX format as an XML node.\n     * LineString geometries are output as routes (`<rte>`), and MultiLineString\n     * as tracks (`<trk>`).\n     *\n     * @param {Array<Feature>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Options.\n     * @return {Node} Node.\n     * @api\n     */\n    GPX.prototype.writeFeaturesNode = function (features, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        //FIXME Serialize metadata\n        var gpx = createElementNS('http://www.topografix.com/GPX/1/1', 'gpx');\n        var xmlnsUri = 'http://www.w3.org/2000/xmlns/';\n        gpx.setAttributeNS(xmlnsUri, 'xmlns:xsi', XML_SCHEMA_INSTANCE_URI);\n        gpx.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', SCHEMA_LOCATION);\n        gpx.setAttribute('version', '1.1');\n        gpx.setAttribute('creator', 'OpenLayers');\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        ({ node: gpx }), GPX_SERIALIZERS, GPX_NODE_FACTORY, features, [opt_options]);\n        return gpx;\n    };\n    return GPX;\n}(XMLFeature));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar RTE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'name': makeObjectPropertySetter(readString),\n    'cmt': makeObjectPropertySetter(readString),\n    'desc': makeObjectPropertySetter(readString),\n    'src': makeObjectPropertySetter(readString),\n    'link': parseLink,\n    'number': makeObjectPropertySetter(readNonNegativeInteger),\n    'extensions': parseExtensions,\n    'type': makeObjectPropertySetter(readString),\n    'rtept': parseRtePt,\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar RTEPT_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ele': makeObjectPropertySetter(readDecimal),\n    'time': makeObjectPropertySetter(readDateTime),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TRK_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'name': makeObjectPropertySetter(readString),\n    'cmt': makeObjectPropertySetter(readString),\n    'desc': makeObjectPropertySetter(readString),\n    'src': makeObjectPropertySetter(readString),\n    'link': parseLink,\n    'number': makeObjectPropertySetter(readNonNegativeInteger),\n    'type': makeObjectPropertySetter(readString),\n    'extensions': parseExtensions,\n    'trkseg': parseTrkSeg,\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TRKSEG_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'trkpt': parseTrkPt,\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TRKPT_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ele': makeObjectPropertySetter(readDecimal),\n    'time': makeObjectPropertySetter(readDateTime),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar WPT_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ele': makeObjectPropertySetter(readDecimal),\n    'time': makeObjectPropertySetter(readDateTime),\n    'magvar': makeObjectPropertySetter(readDecimal),\n    'geoidheight': makeObjectPropertySetter(readDecimal),\n    'name': makeObjectPropertySetter(readString),\n    'cmt': makeObjectPropertySetter(readString),\n    'desc': makeObjectPropertySetter(readString),\n    'src': makeObjectPropertySetter(readString),\n    'link': parseLink,\n    'sym': makeObjectPropertySetter(readString),\n    'type': makeObjectPropertySetter(readString),\n    'fix': makeObjectPropertySetter(readString),\n    'sat': makeObjectPropertySetter(readNonNegativeInteger),\n    'hdop': makeObjectPropertySetter(readDecimal),\n    'vdop': makeObjectPropertySetter(readDecimal),\n    'pdop': makeObjectPropertySetter(readDecimal),\n    'ageofdgpsdata': makeObjectPropertySetter(readDecimal),\n    'dgpsid': makeObjectPropertySetter(readNonNegativeInteger),\n    'extensions': parseExtensions,\n});\n/**\n * @const\n * @type {Array<string>}\n */\nvar LINK_SEQUENCE = ['text', 'type'];\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar LINK_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'text': makeChildAppender(writeStringTextNode),\n    'type': makeChildAppender(writeStringTextNode),\n});\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar RTE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'name',\n    'cmt',\n    'desc',\n    'src',\n    'link',\n    'number',\n    'type',\n    'rtept',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar RTE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'name': makeChildAppender(writeStringTextNode),\n    'cmt': makeChildAppender(writeStringTextNode),\n    'desc': makeChildAppender(writeStringTextNode),\n    'src': makeChildAppender(writeStringTextNode),\n    'link': makeChildAppender(writeLink),\n    'number': makeChildAppender(writeNonNegativeIntegerTextNode),\n    'type': makeChildAppender(writeStringTextNode),\n    'rtept': makeArraySerializer(makeChildAppender(writeWptType)),\n});\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar RTEPT_TYPE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, ['ele', 'time']);\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar TRK_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'name',\n    'cmt',\n    'desc',\n    'src',\n    'link',\n    'number',\n    'type',\n    'trkseg',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar TRK_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'name': makeChildAppender(writeStringTextNode),\n    'cmt': makeChildAppender(writeStringTextNode),\n    'desc': makeChildAppender(writeStringTextNode),\n    'src': makeChildAppender(writeStringTextNode),\n    'link': makeChildAppender(writeLink),\n    'number': makeChildAppender(writeNonNegativeIntegerTextNode),\n    'type': makeChildAppender(writeStringTextNode),\n    'trkseg': makeArraySerializer(makeChildAppender(writeTrkSeg)),\n});\n/**\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar TRKSEG_NODE_FACTORY = makeSimpleNodeFactory('trkpt');\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar TRKSEG_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'trkpt': makeChildAppender(writeWptType),\n});\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar WPT_TYPE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'ele',\n    'time',\n    'magvar',\n    'geoidheight',\n    'name',\n    'cmt',\n    'desc',\n    'src',\n    'link',\n    'sym',\n    'type',\n    'fix',\n    'sat',\n    'hdop',\n    'vdop',\n    'pdop',\n    'ageofdgpsdata',\n    'dgpsid',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar WPT_TYPE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'ele': makeChildAppender(writeDecimalTextNode),\n    'time': makeChildAppender(writeDateTimeTextNode),\n    'magvar': makeChildAppender(writeDecimalTextNode),\n    'geoidheight': makeChildAppender(writeDecimalTextNode),\n    'name': makeChildAppender(writeStringTextNode),\n    'cmt': makeChildAppender(writeStringTextNode),\n    'desc': makeChildAppender(writeStringTextNode),\n    'src': makeChildAppender(writeStringTextNode),\n    'link': makeChildAppender(writeLink),\n    'sym': makeChildAppender(writeStringTextNode),\n    'type': makeChildAppender(writeStringTextNode),\n    'fix': makeChildAppender(writeStringTextNode),\n    'sat': makeChildAppender(writeNonNegativeIntegerTextNode),\n    'hdop': makeChildAppender(writeDecimalTextNode),\n    'vdop': makeChildAppender(writeDecimalTextNode),\n    'pdop': makeChildAppender(writeDecimalTextNode),\n    'ageofdgpsdata': makeChildAppender(writeDecimalTextNode),\n    'dgpsid': makeChildAppender(writeNonNegativeIntegerTextNode),\n});\n/**\n * @const\n * @type {Object<string, string>}\n */\nvar GEOMETRY_TYPE_TO_NODENAME = {\n    'Point': 'wpt',\n    'LineString': 'rte',\n    'MultiLineString': 'trk',\n};\n/**\n * @param {*} value Value.\n * @param {Array<*>} objectStack Object stack.\n * @param {string} [opt_nodeName] Node name.\n * @return {Node|undefined} Node.\n */\nfunction GPX_NODE_FACTORY(value, objectStack, opt_nodeName) {\n    var geometry = /** @type {Feature} */ (value).getGeometry();\n    if (geometry) {\n        var nodeName = GEOMETRY_TYPE_TO_NODENAME[geometry.getType()];\n        if (nodeName) {\n            var parentNode = objectStack[objectStack.length - 1].node;\n            return createElementNS(parentNode.namespaceURI, nodeName);\n        }\n    }\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {LayoutOptions} layoutOptions Layout options.\n * @param {Element} node Node.\n * @param {!Object} values Values.\n * @return {Array<number>} Flat coordinates.\n */\nfunction appendCoordinate(flatCoordinates, layoutOptions, node, values) {\n    flatCoordinates.push(parseFloat(node.getAttribute('lon')), parseFloat(node.getAttribute('lat')));\n    if ('ele' in values) {\n        flatCoordinates.push(/** @type {number} */ (values['ele']));\n        delete values['ele'];\n        layoutOptions.hasZ = true;\n    }\n    else {\n        flatCoordinates.push(0);\n    }\n    if ('time' in values) {\n        flatCoordinates.push(/** @type {number} */ (values['time']));\n        delete values['time'];\n        layoutOptions.hasM = true;\n    }\n    else {\n        flatCoordinates.push(0);\n    }\n    return flatCoordinates;\n}\n/**\n * Choose GeometryLayout based on flags in layoutOptions and adjust flatCoordinates\n * and ends arrays by shrinking them accordingly (removing unused zero entries).\n *\n * @param {LayoutOptions} layoutOptions Layout options.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {Array<number>} [ends] Ends.\n * @return {import(\"../geom/GeometryLayout.js\").default} Layout.\n */\nfunction applyLayoutOptions(layoutOptions, flatCoordinates, ends) {\n    var layout = GeometryLayout.XY;\n    var stride = 2;\n    if (layoutOptions.hasZ && layoutOptions.hasM) {\n        layout = GeometryLayout.XYZM;\n        stride = 4;\n    }\n    else if (layoutOptions.hasZ) {\n        layout = GeometryLayout.XYZ;\n        stride = 3;\n    }\n    else if (layoutOptions.hasM) {\n        layout = GeometryLayout.XYM;\n        stride = 3;\n    }\n    if (stride !== 4) {\n        for (var i = 0, ii = flatCoordinates.length / 4; i < ii; i++) {\n            flatCoordinates[i * stride] = flatCoordinates[i * 4];\n            flatCoordinates[i * stride + 1] = flatCoordinates[i * 4 + 1];\n            if (layoutOptions.hasZ) {\n                flatCoordinates[i * stride + 2] = flatCoordinates[i * 4 + 2];\n            }\n            if (layoutOptions.hasM) {\n                flatCoordinates[i * stride + 2] = flatCoordinates[i * 4 + 3];\n            }\n        }\n        flatCoordinates.length = (flatCoordinates.length / 4) * stride;\n        if (ends) {\n            for (var i = 0, ii = ends.length; i < ii; i++) {\n                ends[i] = (ends[i] / 4) * stride;\n            }\n        }\n    }\n    return layout;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseLink(node, objectStack) {\n    var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var href = node.getAttribute('href');\n    if (href !== null) {\n        values['link'] = href;\n    }\n    parseNode(LINK_PARSERS, node, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseExtensions(node, objectStack) {\n    var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    values['extensionsNode_'] = node;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseRtePt(node, objectStack) {\n    var values = pushParseAndPop({}, RTEPT_PARSERS, node, objectStack);\n    if (values) {\n        var rteValues = /** @type {!Object} */ (objectStack[objectStack.length - 1]);\n        var flatCoordinates = /** @type {Array<number>} */ (rteValues['flatCoordinates']);\n        var layoutOptions = /** @type {LayoutOptions} */ (rteValues['layoutOptions']);\n        appendCoordinate(flatCoordinates, layoutOptions, node, values);\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseTrkPt(node, objectStack) {\n    var values = pushParseAndPop({}, TRKPT_PARSERS, node, objectStack);\n    if (values) {\n        var trkValues = /** @type {!Object} */ (objectStack[objectStack.length - 1]);\n        var flatCoordinates = /** @type {Array<number>} */ (trkValues['flatCoordinates']);\n        var layoutOptions = /** @type {LayoutOptions} */ (trkValues['layoutOptions']);\n        appendCoordinate(flatCoordinates, layoutOptions, node, values);\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseTrkSeg(node, objectStack) {\n    var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    parseNode(TRKSEG_PARSERS, node, objectStack);\n    var flatCoordinates = \n    /** @type {Array<number>} */\n    (values['flatCoordinates']);\n    var ends = /** @type {Array<number>} */ (values['ends']);\n    ends.push(flatCoordinates.length);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Feature|undefined} Track.\n */\nfunction readRte(node, objectStack) {\n    var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);\n    var values = pushParseAndPop({\n        'flatCoordinates': [],\n        'layoutOptions': {},\n    }, RTE_PARSERS, node, objectStack);\n    if (!values) {\n        return undefined;\n    }\n    var flatCoordinates = \n    /** @type {Array<number>} */\n    (values['flatCoordinates']);\n    delete values['flatCoordinates'];\n    var layoutOptions = /** @type {LayoutOptions} */ (values['layoutOptions']);\n    delete values['layoutOptions'];\n    var layout = applyLayoutOptions(layoutOptions, flatCoordinates);\n    var geometry = new LineString(flatCoordinates, layout);\n    transformGeometryWithOptions(geometry, false, options);\n    var feature = new Feature(geometry);\n    feature.setProperties(values, true);\n    return feature;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Feature|undefined} Track.\n */\nfunction readTrk(node, objectStack) {\n    var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);\n    var values = pushParseAndPop({\n        'flatCoordinates': [],\n        'ends': [],\n        'layoutOptions': {},\n    }, TRK_PARSERS, node, objectStack);\n    if (!values) {\n        return undefined;\n    }\n    var flatCoordinates = \n    /** @type {Array<number>} */\n    (values['flatCoordinates']);\n    delete values['flatCoordinates'];\n    var ends = /** @type {Array<number>} */ (values['ends']);\n    delete values['ends'];\n    var layoutOptions = /** @type {LayoutOptions} */ (values['layoutOptions']);\n    delete values['layoutOptions'];\n    var layout = applyLayoutOptions(layoutOptions, flatCoordinates, ends);\n    var geometry = new MultiLineString(flatCoordinates, layout, ends);\n    transformGeometryWithOptions(geometry, false, options);\n    var feature = new Feature(geometry);\n    feature.setProperties(values, true);\n    return feature;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Feature|undefined} Waypoint.\n */\nfunction readWpt(node, objectStack) {\n    var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);\n    var values = pushParseAndPop({}, WPT_PARSERS, node, objectStack);\n    if (!values) {\n        return undefined;\n    }\n    var layoutOptions = /** @type {LayoutOptions} */ ({});\n    var coordinates = appendCoordinate([], layoutOptions, node, values);\n    var layout = applyLayoutOptions(layoutOptions, coordinates);\n    var geometry = new Point(coordinates, layout);\n    transformGeometryWithOptions(geometry, false, options);\n    var feature = new Feature(geometry);\n    feature.setProperties(values, true);\n    return feature;\n}\n/**\n * @param {Element} node Node.\n * @param {string} value Value for the link's `href` attribute.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeLink(node, value, objectStack) {\n    node.setAttribute('href', value);\n    var context = objectStack[objectStack.length - 1];\n    var properties = context['properties'];\n    var link = [properties['linkText'], properties['linkType']];\n    pushSerializeAndPop(\n    /** @type {import(\"../xml.js\").NodeStackItem} */ ({ node: node }), LINK_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, link, objectStack, LINK_SEQUENCE);\n}\n/**\n * @param {Element} node Node.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeWptType(node, coordinate, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var parentNode = context.node;\n    var namespaceURI = parentNode.namespaceURI;\n    var properties = context['properties'];\n    //FIXME Projection handling\n    node.setAttributeNS(null, 'lat', String(coordinate[1]));\n    node.setAttributeNS(null, 'lon', String(coordinate[0]));\n    var geometryLayout = context['geometryLayout'];\n    switch (geometryLayout) {\n        case GeometryLayout.XYZM:\n            if (coordinate[3] !== 0) {\n                properties['time'] = coordinate[3];\n            }\n        // fall through\n        case GeometryLayout.XYZ:\n            if (coordinate[2] !== 0) {\n                properties['ele'] = coordinate[2];\n            }\n            break;\n        case GeometryLayout.XYM:\n            if (coordinate[2] !== 0) {\n                properties['time'] = coordinate[2];\n            }\n            break;\n        default:\n        // pass\n    }\n    var orderedKeys = node.nodeName == 'rtept'\n        ? RTEPT_TYPE_SEQUENCE[namespaceURI]\n        : WPT_TYPE_SEQUENCE[namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    ({ node: node, 'properties': properties }), WPT_TYPE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @param {Node} node Node.\n * @param {Feature} feature Feature.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeRte(node, feature, objectStack) {\n    var options = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[0]);\n    var properties = feature.getProperties();\n    var context = { node: node };\n    context['properties'] = properties;\n    var geometry = feature.getGeometry();\n    if (geometry.getType() == GeometryType.LINE_STRING) {\n        var lineString = /** @type {LineString} */ (transformGeometryWithOptions(geometry, true, options));\n        context['geometryLayout'] = lineString.getLayout();\n        properties['rtept'] = lineString.getCoordinates();\n    }\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = RTE_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, RTE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @param {Node} node Node.\n * @param {Feature} feature Feature.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeTrk(node, feature, objectStack) {\n    var options = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[0]);\n    var properties = feature.getProperties();\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    var context = { node: node };\n    context['properties'] = properties;\n    var geometry = feature.getGeometry();\n    if (geometry.getType() == GeometryType.MULTI_LINE_STRING) {\n        var multiLineString = /** @type {MultiLineString} */ (transformGeometryWithOptions(geometry, true, options));\n        properties['trkseg'] = multiLineString.getLineStrings();\n    }\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = TRK_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, TRK_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @param {Node} node Node.\n * @param {LineString} lineString LineString.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeTrkSeg(node, lineString, objectStack) {\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    var context = { node: node };\n    context['geometryLayout'] = lineString.getLayout();\n    context['properties'] = {};\n    pushSerializeAndPop(context, TRKSEG_SERIALIZERS, TRKSEG_NODE_FACTORY, lineString.getCoordinates(), objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Feature} feature Feature.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeWpt(node, feature, objectStack) {\n    var options = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[0]);\n    var context = objectStack[objectStack.length - 1];\n    context['properties'] = feature.getProperties();\n    var geometry = feature.getGeometry();\n    if (geometry.getType() == GeometryType.POINT) {\n        var point = /** @type {Point} */ (transformGeometryWithOptions(geometry, true, options));\n        context['geometryLayout'] = point.getLayout();\n        writeWptType(node, point.getCoordinates(), objectStack);\n    }\n}\nexport default GPX;\n//# sourceMappingURL=GPX.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/KML\n */\nimport Feature from '../Feature.js';\nimport Fill from '../style/Fill.js';\nimport GeometryCollection from '../geom/GeometryCollection.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport Icon from '../style/Icon.js';\nimport IconAnchorUnits from '../style/IconAnchorUnits.js';\nimport IconOrigin from '../style/IconOrigin.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport Stroke from '../style/Stroke.js';\nimport Style from '../style/Style.js';\nimport Text from '../style/Text.js';\nimport XMLFeature from './XMLFeature.js';\nimport { OBJECT_PROPERTY_NODE_FACTORY, XML_SCHEMA_INSTANCE_URI, createElementNS, getAllTextContent, isDocument, makeArrayExtender, makeArrayPusher, makeChildAppender, makeObjectPropertySetter, makeReplacer, makeSequence, makeSimpleNodeFactory, makeStructureNS, parse, parseNode, pushParseAndPop, pushSerializeAndPop, } from '../xml.js';\nimport { asArray } from '../color.js';\nimport { assert } from '../asserts.js';\nimport { extend, includes } from '../array.js';\nimport { get as getProjection } from '../proj.js';\nimport { readBoolean, readDecimal, readString, writeBooleanTextNode, writeCDATASection, writeDecimalTextNode, writeStringTextNode, } from './xsd.js';\nimport { toRadians } from '../math.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * @typedef {Object} Vec2\n * @property {number} x X coordinate.\n * @property {import(\"../style/IconAnchorUnits\").default} xunits Units of x.\n * @property {number} y Y coordinate.\n * @property {import(\"../style/IconAnchorUnits\").default} yunits Units of Y.\n * @property {import(\"../style/IconOrigin.js\").default} [origin] Origin.\n */\n/**\n * @typedef {Object} GxTrackObject\n * @property {Array<Array<number>>} coordinates Coordinates.\n * @property {Array<number>} whens Whens.\n */\n/**\n * @const\n * @type {Array<string>}\n */\nvar GX_NAMESPACE_URIS = ['http://www.google.com/kml/ext/2.2'];\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [\n    null,\n    'http://earth.google.com/kml/2.0',\n    'http://earth.google.com/kml/2.1',\n    'http://earth.google.com/kml/2.2',\n    'http://www.opengis.net/kml/2.2',\n];\n/**\n * @const\n * @type {string}\n */\nvar SCHEMA_LOCATION = 'http://www.opengis.net/kml/2.2 ' +\n    'https://developers.google.com/kml/schema/kml22gx.xsd';\n/**\n * @type {Object<string, import(\"../style/IconAnchorUnits\").default>}\n */\nvar ICON_ANCHOR_UNITS_MAP = {\n    'fraction': IconAnchorUnits.FRACTION,\n    'pixels': IconAnchorUnits.PIXELS,\n    'insetPixels': IconAnchorUnits.PIXELS,\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PLACEMARK_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ExtendedData': extendedDataParser,\n    'Region': regionParser,\n    'MultiGeometry': makeObjectPropertySetter(readMultiGeometry, 'geometry'),\n    'LineString': makeObjectPropertySetter(readLineString, 'geometry'),\n    'LinearRing': makeObjectPropertySetter(readLinearRing, 'geometry'),\n    'Point': makeObjectPropertySetter(readPoint, 'geometry'),\n    'Polygon': makeObjectPropertySetter(readPolygon, 'geometry'),\n    'Style': makeObjectPropertySetter(readStyle),\n    'StyleMap': placemarkStyleMapParser,\n    'address': makeObjectPropertySetter(readString),\n    'description': makeObjectPropertySetter(readString),\n    'name': makeObjectPropertySetter(readString),\n    'open': makeObjectPropertySetter(readBoolean),\n    'phoneNumber': makeObjectPropertySetter(readString),\n    'styleUrl': makeObjectPropertySetter(readStyleURL),\n    'visibility': makeObjectPropertySetter(readBoolean),\n}, makeStructureNS(GX_NAMESPACE_URIS, {\n    'MultiTrack': makeObjectPropertySetter(readGxMultiTrack, 'geometry'),\n    'Track': makeObjectPropertySetter(readGxTrack, 'geometry'),\n}));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar NETWORK_LINK_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ExtendedData': extendedDataParser,\n    'Region': regionParser,\n    'Link': linkParser,\n    'address': makeObjectPropertySetter(readString),\n    'description': makeObjectPropertySetter(readString),\n    'name': makeObjectPropertySetter(readString),\n    'open': makeObjectPropertySetter(readBoolean),\n    'phoneNumber': makeObjectPropertySetter(readString),\n    'visibility': makeObjectPropertySetter(readBoolean),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LINK_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'href': makeObjectPropertySetter(readURI),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar REGION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'LatLonAltBox': latLonAltBoxParser,\n    'Lod': lodParser,\n});\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar KML_SEQUENCE = makeStructureNS(NAMESPACE_URIS, ['Document', 'Placemark']);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar KML_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'Document': makeChildAppender(writeDocument),\n    'Placemark': makeChildAppender(writePlacemark),\n});\n/**\n * @type {import(\"../color.js\").Color}\n */\nvar DEFAULT_COLOR;\n/**\n * @type {Fill}\n */\nvar DEFAULT_FILL_STYLE = null;\n/**\n * Get the default fill style (or null if not yet set).\n * @return {Fill} The default fill style.\n */\nexport function getDefaultFillStyle() {\n    return DEFAULT_FILL_STYLE;\n}\n/**\n * @type {import(\"../size.js\").Size}\n */\nvar DEFAULT_IMAGE_STYLE_ANCHOR;\n/**\n * @type {import(\"../style/IconAnchorUnits\").default}\n */\nvar DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS;\n/**\n * @type {import(\"../style/IconAnchorUnits\").default}\n */\nvar DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS;\n/**\n * @type {import(\"../size.js\").Size}\n */\nvar DEFAULT_IMAGE_STYLE_SIZE;\n/**\n * @type {string}\n */\nvar DEFAULT_IMAGE_STYLE_SRC;\n/**\n * @type {number}\n */\nvar DEFAULT_IMAGE_SCALE_MULTIPLIER;\n/**\n * @type {import(\"../style/Image.js\").default}\n */\nvar DEFAULT_IMAGE_STYLE = null;\n/**\n * Get the default image style (or null if not yet set).\n * @return {import(\"../style/Image.js\").default} The default image style.\n */\nexport function getDefaultImageStyle() {\n    return DEFAULT_IMAGE_STYLE;\n}\n/**\n * @type {string}\n */\nvar DEFAULT_NO_IMAGE_STYLE;\n/**\n * @type {Stroke}\n */\nvar DEFAULT_STROKE_STYLE = null;\n/**\n * Get the default stroke style (or null if not yet set).\n * @return {Stroke} The default stroke style.\n */\nexport function getDefaultStrokeStyle() {\n    return DEFAULT_STROKE_STYLE;\n}\n/**\n * @type {Stroke}\n */\nvar DEFAULT_TEXT_STROKE_STYLE;\n/**\n * @type {Text}\n */\nvar DEFAULT_TEXT_STYLE = null;\n/**\n * Get the default text style (or null if not yet set).\n * @return {Text} The default text style.\n */\nexport function getDefaultTextStyle() {\n    return DEFAULT_TEXT_STYLE;\n}\n/**\n * @type {Style}\n */\nvar DEFAULT_STYLE = null;\n/**\n * Get the default style (or null if not yet set).\n * @return {Style} The default style.\n */\nexport function getDefaultStyle() {\n    return DEFAULT_STYLE;\n}\n/**\n * @type {Array<Style>}\n */\nvar DEFAULT_STYLE_ARRAY = null;\n/**\n * Get the default style array (or null if not yet set).\n * @return {Array<Style>} The default style.\n */\nexport function getDefaultStyleArray() {\n    return DEFAULT_STYLE_ARRAY;\n}\nfunction createStyleDefaults() {\n    DEFAULT_COLOR = [255, 255, 255, 1];\n    DEFAULT_FILL_STYLE = new Fill({\n        color: DEFAULT_COLOR,\n    });\n    DEFAULT_IMAGE_STYLE_ANCHOR = [20, 2]; // FIXME maybe [8, 32] ?\n    DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS = IconAnchorUnits.PIXELS;\n    DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS = IconAnchorUnits.PIXELS;\n    DEFAULT_IMAGE_STYLE_SIZE = [64, 64];\n    DEFAULT_IMAGE_STYLE_SRC =\n        'https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png';\n    DEFAULT_IMAGE_SCALE_MULTIPLIER = 0.5;\n    DEFAULT_IMAGE_STYLE = new Icon({\n        anchor: DEFAULT_IMAGE_STYLE_ANCHOR,\n        anchorOrigin: IconOrigin.BOTTOM_LEFT,\n        anchorXUnits: DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS,\n        anchorYUnits: DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS,\n        crossOrigin: 'anonymous',\n        rotation: 0,\n        scale: DEFAULT_IMAGE_SCALE_MULTIPLIER,\n        size: DEFAULT_IMAGE_STYLE_SIZE,\n        src: DEFAULT_IMAGE_STYLE_SRC,\n    });\n    DEFAULT_NO_IMAGE_STYLE = 'NO_IMAGE';\n    DEFAULT_STROKE_STYLE = new Stroke({\n        color: DEFAULT_COLOR,\n        width: 1,\n    });\n    DEFAULT_TEXT_STROKE_STYLE = new Stroke({\n        color: [51, 51, 51, 1],\n        width: 2,\n    });\n    DEFAULT_TEXT_STYLE = new Text({\n        font: 'bold 16px Helvetica',\n        fill: DEFAULT_FILL_STYLE,\n        stroke: DEFAULT_TEXT_STROKE_STYLE,\n        scale: 0.8,\n    });\n    DEFAULT_STYLE = new Style({\n        fill: DEFAULT_FILL_STYLE,\n        image: DEFAULT_IMAGE_STYLE,\n        text: DEFAULT_TEXT_STYLE,\n        stroke: DEFAULT_STROKE_STYLE,\n        zIndex: 0,\n    });\n    DEFAULT_STYLE_ARRAY = [DEFAULT_STYLE];\n}\n/**\n * @type {HTMLTextAreaElement}\n */\nvar TEXTAREA;\n/**\n * A function that takes a url `{string}` and returns a url `{string}`.\n * Might be used to change an icon path or to substitute a\n * data url obtained from a KMZ array buffer.\n *\n * @typedef {function(string):string} IconUrlFunction\n * @api\n */\n/**\n * Function that returns a url unchanged.\n * @param {string} href Input url.\n * @return {string} Output url.\n */\nfunction defaultIconUrlFunction(href) {\n    return href;\n}\n/**\n * @typedef {Object} Options\n * @property {boolean} [extractStyles=true] Extract styles from the KML.\n * @property {boolean} [showPointNames=true] Show names as labels for placemarks which contain points.\n * @property {Array<Style>} [defaultStyle] Default style. The\n * default default style is the same as Google Earth.\n * @property {boolean} [writeStyles=true] Write styles into KML.\n * @property {null|string} [crossOrigin='anonymous'] The `crossOrigin` attribute for loaded images. Note that you must provide a\n * `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * @property {IconUrlFunction} [iconUrlFunction] Function that takes a url string and returns a url string.\n * Might be used to change an icon path or to substitute a data url obtained from a KMZ array buffer.\n */\n/**\n * @classdesc\n * Feature format for reading and writing data in the KML format.\n *\n * {@link module:ol/format/KML~KML#readFeature} will read the first feature from\n * a KML source.\n *\n * MultiGeometries are converted into GeometryCollections if they are a mix of\n * geometry types, and into MultiPoint/MultiLineString/MultiPolygon if they are\n * all of the same type.\n *\n * Note that the KML format uses the URL() constructor. Older browsers such as IE\n * which do not support this will need a URL polyfill to be loaded before use.\n *\n * @api\n */\nvar KML = /** @class */ (function (_super) {\n    __extends(KML, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function KML(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        if (!DEFAULT_STYLE_ARRAY) {\n            createStyleDefaults();\n        }\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection('EPSG:4326');\n        /**\n         * @private\n         * @type {Array<Style>}\n         */\n        _this.defaultStyle_ = options.defaultStyle\n            ? options.defaultStyle\n            : DEFAULT_STYLE_ARRAY;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.extractStyles_ =\n            options.extractStyles !== undefined ? options.extractStyles : true;\n        /**\n         * @type {boolean}\n         */\n        _this.writeStyles_ =\n            options.writeStyles !== undefined ? options.writeStyles : true;\n        /**\n         * @private\n         * @type {!Object<string, (Array<Style>|string)>}\n         */\n        _this.sharedStyles_ = {};\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.showPointNames_ =\n            options.showPointNames !== undefined ? options.showPointNames : true;\n        /**\n         * @type {null|string}\n         */\n        _this.crossOrigin_ =\n            options.crossOrigin !== undefined ? options.crossOrigin : 'anonymous';\n        /**\n         * @type {IconUrlFunction}\n         */\n        _this.iconUrlFunction_ = options.iconUrlFunction\n            ? options.iconUrlFunction\n            : defaultIconUrlFunction;\n        return _this;\n    }\n    /**\n     * @param {Node} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @private\n     * @return {Array<Feature>|undefined} Features.\n     */\n    KML.prototype.readDocumentOrFolder_ = function (node, objectStack) {\n        // FIXME use scope somehow\n        var parsersNS = makeStructureNS(NAMESPACE_URIS, {\n            'Document': makeArrayExtender(this.readDocumentOrFolder_, this),\n            'Folder': makeArrayExtender(this.readDocumentOrFolder_, this),\n            'Placemark': makeArrayPusher(this.readPlacemark_, this),\n            'Style': this.readSharedStyle_.bind(this),\n            'StyleMap': this.readSharedStyleMap_.bind(this),\n        });\n        /** @type {Array<Feature>} */\n        // @ts-ignore\n        var features = pushParseAndPop([], parsersNS, node, objectStack, this);\n        if (features) {\n            return features;\n        }\n        else {\n            return undefined;\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @private\n     * @return {Feature|undefined} Feature.\n     */\n    KML.prototype.readPlacemark_ = function (node, objectStack) {\n        var object = pushParseAndPop({ 'geometry': null }, PLACEMARK_PARSERS, node, objectStack, this);\n        if (!object) {\n            return undefined;\n        }\n        var feature = new Feature();\n        var id = node.getAttribute('id');\n        if (id !== null) {\n            feature.setId(id);\n        }\n        var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);\n        var geometry = object['geometry'];\n        if (geometry) {\n            transformGeometryWithOptions(geometry, false, options);\n        }\n        feature.setGeometry(geometry);\n        delete object['geometry'];\n        if (this.extractStyles_) {\n            var style = object['Style'];\n            var styleUrl = object['styleUrl'];\n            var styleFunction = createFeatureStyleFunction(style, styleUrl, this.defaultStyle_, this.sharedStyles_, this.showPointNames_);\n            feature.setStyle(styleFunction);\n        }\n        delete object['Style'];\n        // we do not remove the styleUrl property from the object, so it\n        // gets stored on feature when setProperties is called\n        feature.setProperties(object, true);\n        return feature;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @private\n     */\n    KML.prototype.readSharedStyle_ = function (node, objectStack) {\n        var id = node.getAttribute('id');\n        if (id !== null) {\n            var style = readStyle.call(this, node, objectStack);\n            if (style) {\n                var styleUri = void 0;\n                var baseURI = node.baseURI;\n                if (!baseURI || baseURI == 'about:blank') {\n                    baseURI = window.location.href;\n                }\n                if (baseURI) {\n                    var url = new URL('#' + id, baseURI);\n                    styleUri = url.href;\n                }\n                else {\n                    styleUri = '#' + id;\n                }\n                this.sharedStyles_[styleUri] = style;\n            }\n        }\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @private\n     */\n    KML.prototype.readSharedStyleMap_ = function (node, objectStack) {\n        var id = node.getAttribute('id');\n        if (id === null) {\n            return;\n        }\n        var styleMapValue = readStyleMapValue.call(this, node, objectStack);\n        if (!styleMapValue) {\n            return;\n        }\n        var styleUri;\n        var baseURI = node.baseURI;\n        if (!baseURI || baseURI == 'about:blank') {\n            baseURI = window.location.href;\n        }\n        if (baseURI) {\n            var url = new URL('#' + id, baseURI);\n            styleUri = url.href;\n        }\n        else {\n            styleUri = '#' + id;\n        }\n        this.sharedStyles_[styleUri] = styleMapValue;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    KML.prototype.readFeatureFromNode = function (node, opt_options) {\n        if (!includes(NAMESPACE_URIS, node.namespaceURI)) {\n            return null;\n        }\n        var feature = this.readPlacemark_(node, [\n            this.getReadOptions(node, opt_options),\n        ]);\n        if (feature) {\n            return feature;\n        }\n        else {\n            return null;\n        }\n    };\n    /**\n     * @protected\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    KML.prototype.readFeaturesFromNode = function (node, opt_options) {\n        if (!includes(NAMESPACE_URIS, node.namespaceURI)) {\n            return [];\n        }\n        var features;\n        var localName = node.localName;\n        if (localName == 'Document' || localName == 'Folder') {\n            features = this.readDocumentOrFolder_(node, [\n                this.getReadOptions(node, opt_options),\n            ]);\n            if (features) {\n                return features;\n            }\n            else {\n                return [];\n            }\n        }\n        else if (localName == 'Placemark') {\n            var feature = this.readPlacemark_(node, [\n                this.getReadOptions(node, opt_options),\n            ]);\n            if (feature) {\n                return [feature];\n            }\n            else {\n                return [];\n            }\n        }\n        else if (localName == 'kml') {\n            features = [];\n            for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n                var fs = this.readFeaturesFromNode(n, opt_options);\n                if (fs) {\n                    extend(features, fs);\n                }\n            }\n            return features;\n        }\n        else {\n            return [];\n        }\n    };\n    /**\n     * Read the name of the KML.\n     *\n     * @param {Document|Element|string} source Source.\n     * @return {string|undefined} Name.\n     * @api\n     */\n    KML.prototype.readName = function (source) {\n        if (!source) {\n            return undefined;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readNameFromDocument(doc);\n        }\n        else if (isDocument(source)) {\n            return this.readNameFromDocument(/** @type {Document} */ (source));\n        }\n        else {\n            return this.readNameFromNode(/** @type {Element} */ (source));\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {string|undefined} Name.\n     */\n    KML.prototype.readNameFromDocument = function (doc) {\n        for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                var name_1 = this.readNameFromNode(/** @type {Element} */ (n));\n                if (name_1) {\n                    return name_1;\n                }\n            }\n        }\n        return undefined;\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {string|undefined} Name.\n     */\n    KML.prototype.readNameFromNode = function (node) {\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n            if (includes(NAMESPACE_URIS, n.namespaceURI) && n.localName == 'name') {\n                return readString(n);\n            }\n        }\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n            var localName = n.localName;\n            if (includes(NAMESPACE_URIS, n.namespaceURI) &&\n                (localName == 'Document' ||\n                    localName == 'Folder' ||\n                    localName == 'Placemark' ||\n                    localName == 'kml')) {\n                var name_2 = this.readNameFromNode(n);\n                if (name_2) {\n                    return name_2;\n                }\n            }\n        }\n        return undefined;\n    };\n    /**\n     * Read the network links of the KML.\n     *\n     * @param {Document|Element|string} source Source.\n     * @return {Array<Object>} Network links.\n     * @api\n     */\n    KML.prototype.readNetworkLinks = function (source) {\n        var networkLinks = [];\n        if (typeof source === 'string') {\n            var doc = parse(source);\n            extend(networkLinks, this.readNetworkLinksFromDocument(doc));\n        }\n        else if (isDocument(source)) {\n            extend(networkLinks, this.readNetworkLinksFromDocument(/** @type {Document} */ (source)));\n        }\n        else {\n            extend(networkLinks, this.readNetworkLinksFromNode(/** @type {Element} */ (source)));\n        }\n        return networkLinks;\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {Array<Object>} Network links.\n     */\n    KML.prototype.readNetworkLinksFromDocument = function (doc) {\n        var networkLinks = [];\n        for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                extend(networkLinks, this.readNetworkLinksFromNode(/** @type {Element} */ (n)));\n            }\n        }\n        return networkLinks;\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {Array<Object>} Network links.\n     */\n    KML.prototype.readNetworkLinksFromNode = function (node) {\n        var networkLinks = [];\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n            if (includes(NAMESPACE_URIS, n.namespaceURI) &&\n                n.localName == 'NetworkLink') {\n                var obj = pushParseAndPop({}, NETWORK_LINK_PARSERS, n, []);\n                networkLinks.push(obj);\n            }\n        }\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n            var localName = n.localName;\n            if (includes(NAMESPACE_URIS, n.namespaceURI) &&\n                (localName == 'Document' || localName == 'Folder' || localName == 'kml')) {\n                extend(networkLinks, this.readNetworkLinksFromNode(n));\n            }\n        }\n        return networkLinks;\n    };\n    /**\n     * Read the regions of the KML.\n     *\n     * @param {Document|Element|string} source Source.\n     * @return {Array<Object>} Regions.\n     * @api\n     */\n    KML.prototype.readRegion = function (source) {\n        var regions = [];\n        if (typeof source === 'string') {\n            var doc = parse(source);\n            extend(regions, this.readRegionFromDocument(doc));\n        }\n        else if (isDocument(source)) {\n            extend(regions, this.readRegionFromDocument(/** @type {Document} */ (source)));\n        }\n        else {\n            extend(regions, this.readRegionFromNode(/** @type {Element} */ (source)));\n        }\n        return regions;\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {Array<Object>} Region.\n     */\n    KML.prototype.readRegionFromDocument = function (doc) {\n        var regions = [];\n        for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                extend(regions, this.readRegionFromNode(/** @type {Element} */ (n)));\n            }\n        }\n        return regions;\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {Array<Object>} Region.\n     * @api\n     */\n    KML.prototype.readRegionFromNode = function (node) {\n        var regions = [];\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n            if (includes(NAMESPACE_URIS, n.namespaceURI) && n.localName == 'Region') {\n                var obj = pushParseAndPop({}, REGION_PARSERS, n, []);\n                regions.push(obj);\n            }\n        }\n        for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n            var localName = n.localName;\n            if (includes(NAMESPACE_URIS, n.namespaceURI) &&\n                (localName == 'Document' || localName == 'Folder' || localName == 'kml')) {\n                extend(regions, this.readRegionFromNode(n));\n            }\n        }\n        return regions;\n    };\n    /**\n     * Encode an array of features in the KML format as an XML node. GeometryCollections,\n     * MultiPoints, MultiLineStrings, and MultiPolygons are output as MultiGeometries.\n     *\n     * @param {Array<Feature>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Options.\n     * @return {Node} Node.\n     * @api\n     */\n    KML.prototype.writeFeaturesNode = function (features, opt_options) {\n        opt_options = this.adaptOptions(opt_options);\n        var kml = createElementNS(NAMESPACE_URIS[4], 'kml');\n        var xmlnsUri = 'http://www.w3.org/2000/xmlns/';\n        kml.setAttributeNS(xmlnsUri, 'xmlns:gx', GX_NAMESPACE_URIS[0]);\n        kml.setAttributeNS(xmlnsUri, 'xmlns:xsi', XML_SCHEMA_INSTANCE_URI);\n        kml.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', SCHEMA_LOCATION);\n        var /** @type {import(\"../xml.js\").NodeStackItem} */ context = {\n            node: kml,\n        };\n        /** @type {!Object<string, (Array<Feature>|Feature|undefined)>} */\n        var properties = {};\n        if (features.length > 1) {\n            properties['Document'] = features;\n        }\n        else if (features.length == 1) {\n            properties['Placemark'] = features[0];\n        }\n        var orderedKeys = KML_SEQUENCE[kml.namespaceURI];\n        var values = makeSequence(properties, orderedKeys);\n        pushSerializeAndPop(context, KML_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, [opt_options], orderedKeys, this);\n        return kml;\n    };\n    return KML;\n}(XMLFeature));\n/**\n * @param {Style|undefined} foundStyle Style.\n * @param {string} name Name.\n * @return {Style} style Style.\n */\nfunction createNameStyleFunction(foundStyle, name) {\n    var textOffset = [0, 0];\n    var textAlign = 'start';\n    var imageStyle = foundStyle.getImage();\n    if (imageStyle) {\n        var imageSize = imageStyle.getImageSize();\n        if (imageSize === null) {\n            imageSize = DEFAULT_IMAGE_STYLE_SIZE;\n        }\n        if (imageSize.length == 2) {\n            var imageScale = imageStyle.getScaleArray();\n            // Offset the label to be centered to the right of the icon,\n            // if there is one.\n            textOffset[0] = (imageScale[0] * imageSize[0]) / 2;\n            textOffset[1] = (-imageScale[1] * imageSize[1]) / 2;\n            textAlign = 'left';\n        }\n    }\n    var textStyle = foundStyle.getText();\n    if (textStyle) {\n        // clone the text style, customizing it with name, alignments and offset.\n        // Note that kml does not support many text options that OpenLayers does (rotation, textBaseline).\n        textStyle = textStyle.clone();\n        textStyle.setFont(textStyle.getFont() || DEFAULT_TEXT_STYLE.getFont());\n        textStyle.setScale(textStyle.getScale() || DEFAULT_TEXT_STYLE.getScale());\n        textStyle.setFill(textStyle.getFill() || DEFAULT_TEXT_STYLE.getFill());\n        textStyle.setStroke(textStyle.getStroke() || DEFAULT_TEXT_STROKE_STYLE);\n    }\n    else {\n        textStyle = DEFAULT_TEXT_STYLE.clone();\n    }\n    textStyle.setText(name);\n    textStyle.setOffsetX(textOffset[0]);\n    textStyle.setOffsetY(textOffset[1]);\n    textStyle.setTextAlign(textAlign);\n    var nameStyle = new Style({\n        image: imageStyle,\n        text: textStyle,\n    });\n    return nameStyle;\n}\n/**\n * @param {Array<Style>|undefined} style Style.\n * @param {string} styleUrl Style URL.\n * @param {Array<Style>} defaultStyle Default style.\n * @param {!Object<string, (Array<Style>|string)>} sharedStyles Shared styles.\n * @param {boolean|undefined} showPointNames true to show names for point placemarks.\n * @return {import(\"../style/Style.js\").StyleFunction} Feature style function.\n */\nfunction createFeatureStyleFunction(style, styleUrl, defaultStyle, sharedStyles, showPointNames) {\n    return (\n    /**\n     * @param {Feature} feature feature.\n     * @param {number} resolution Resolution.\n     * @return {Array<Style>|Style} Style.\n     */\n    function (feature, resolution) {\n        var drawName = showPointNames;\n        var name = '';\n        var multiGeometryPoints = [];\n        if (drawName) {\n            var geometry = feature.getGeometry();\n            if (geometry) {\n                var type = geometry.getType();\n                if (type === GeometryType.GEOMETRY_COLLECTION) {\n                    multiGeometryPoints = geometry\n                        .getGeometriesArrayRecursive()\n                        .filter(function (geometry) {\n                        var type = geometry.getType();\n                        return (type === GeometryType.POINT ||\n                            type === GeometryType.MULTI_POINT);\n                    });\n                    drawName = multiGeometryPoints.length > 0;\n                }\n                else {\n                    drawName =\n                        type === GeometryType.POINT || type === GeometryType.MULTI_POINT;\n                }\n            }\n        }\n        if (drawName) {\n            name = /** @type {string} */ (feature.get('name'));\n            drawName = drawName && !!name;\n            // convert any html character codes\n            if (drawName && name.search(/&[^&]+;/) > -1) {\n                if (!TEXTAREA) {\n                    TEXTAREA = document.createElement('textarea');\n                }\n                TEXTAREA.innerHTML = name;\n                name = TEXTAREA.value;\n            }\n        }\n        var featureStyle = defaultStyle;\n        if (style) {\n            featureStyle = style;\n        }\n        else if (styleUrl) {\n            featureStyle = findStyle(styleUrl, defaultStyle, sharedStyles);\n        }\n        if (drawName) {\n            var nameStyle = createNameStyleFunction(featureStyle[0], name);\n            if (multiGeometryPoints.length > 0) {\n                // in multigeometries restrict the name style to points and create a\n                // style without image or text for geometries requiring fill or stroke\n                // including any polygon specific style if there is one\n                nameStyle.setGeometry(new GeometryCollection(multiGeometryPoints));\n                var baseStyle = new Style({\n                    geometry: featureStyle[0].getGeometry(),\n                    image: null,\n                    fill: featureStyle[0].getFill(),\n                    stroke: featureStyle[0].getStroke(),\n                    text: null,\n                });\n                return [nameStyle, baseStyle].concat(featureStyle.slice(1));\n            }\n            return nameStyle;\n        }\n        return featureStyle;\n    });\n}\n/**\n * @param {Array<Style>|string|undefined} styleValue Style value.\n * @param {Array<Style>} defaultStyle Default style.\n * @param {!Object<string, (Array<Style>|string)>} sharedStyles\n * Shared styles.\n * @return {Array<Style>} Style.\n */\nfunction findStyle(styleValue, defaultStyle, sharedStyles) {\n    if (Array.isArray(styleValue)) {\n        return styleValue;\n    }\n    else if (typeof styleValue === 'string') {\n        return findStyle(sharedStyles[styleValue], defaultStyle, sharedStyles);\n    }\n    else {\n        return defaultStyle;\n    }\n}\n/**\n * @param {Node} node Node.\n * @return {import(\"../color.js\").Color|undefined} Color.\n */\nfunction readColor(node) {\n    var s = getAllTextContent(node, false);\n    // The KML specification states that colors should not include a leading `#`\n    // but we tolerate them.\n    var m = /^\\s*#?\\s*([0-9A-Fa-f]{8})\\s*$/.exec(s);\n    if (m) {\n        var hexColor = m[1];\n        return [\n            parseInt(hexColor.substr(6, 2), 16),\n            parseInt(hexColor.substr(4, 2), 16),\n            parseInt(hexColor.substr(2, 2), 16),\n            parseInt(hexColor.substr(0, 2), 16) / 255,\n        ];\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @param {Node} node Node.\n * @return {Array<number>|undefined} Flat coordinates.\n */\nexport function readFlatCoordinates(node) {\n    var s = getAllTextContent(node, false);\n    var flatCoordinates = [];\n    // The KML specification states that coordinate tuples should not include\n    // spaces, but we tolerate them.\n    s = s.replace(/\\s*,\\s*/g, ',');\n    var re = /^\\s*([+\\-]?\\d*\\.?\\d+(?:e[+\\-]?\\d+)?),([+\\-]?\\d*\\.?\\d+(?:e[+\\-]?\\d+)?)(?:\\s+|,|$)(?:([+\\-]?\\d*\\.?\\d+(?:e[+\\-]?\\d+)?)(?:\\s+|$))?\\s*/i;\n    var m;\n    while ((m = re.exec(s))) {\n        var x = parseFloat(m[1]);\n        var y = parseFloat(m[2]);\n        var z = m[3] ? parseFloat(m[3]) : 0;\n        flatCoordinates.push(x, y, z);\n        s = s.substr(m[0].length);\n    }\n    if (s !== '') {\n        return undefined;\n    }\n    return flatCoordinates;\n}\n/**\n * @param {Node} node Node.\n * @return {string} URI.\n */\nfunction readURI(node) {\n    var s = getAllTextContent(node, false).trim();\n    var baseURI = node.baseURI;\n    if (!baseURI || baseURI == 'about:blank') {\n        baseURI = window.location.href;\n    }\n    if (baseURI) {\n        var url = new URL(s, baseURI);\n        return url.href;\n    }\n    else {\n        return s;\n    }\n}\n/**\n * @param {Node} node Node.\n * @return {string} URI.\n */\nfunction readStyleURL(node) {\n    // KML files in the wild occasionally forget the leading\n    // `#` on styleUrlsdefined in the same document.\n    var s = getAllTextContent(node, false)\n        .trim()\n        .replace(/^(?!.*#)/, '#');\n    var baseURI = node.baseURI;\n    if (!baseURI || baseURI == 'about:blank') {\n        baseURI = window.location.href;\n    }\n    if (baseURI) {\n        var url = new URL(s, baseURI);\n        return url.href;\n    }\n    else {\n        return s;\n    }\n}\n/**\n * @param {Element} node Node.\n * @return {Vec2} Vec2.\n */\nfunction readVec2(node) {\n    var xunits = node.getAttribute('xunits');\n    var yunits = node.getAttribute('yunits');\n    var origin;\n    if (xunits !== 'insetPixels') {\n        if (yunits !== 'insetPixels') {\n            origin = IconOrigin.BOTTOM_LEFT;\n        }\n        else {\n            origin = IconOrigin.TOP_LEFT;\n        }\n    }\n    else {\n        if (yunits !== 'insetPixels') {\n            origin = IconOrigin.BOTTOM_RIGHT;\n        }\n        else {\n            origin = IconOrigin.TOP_RIGHT;\n        }\n    }\n    return {\n        x: parseFloat(node.getAttribute('x')),\n        xunits: ICON_ANCHOR_UNITS_MAP[xunits],\n        y: parseFloat(node.getAttribute('y')),\n        yunits: ICON_ANCHOR_UNITS_MAP[yunits],\n        origin: origin,\n    };\n}\n/**\n * @param {Node} node Node.\n * @return {number|undefined} Scale.\n */\nfunction readScale(node) {\n    return readDecimal(node);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar STYLE_MAP_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Pair': pairDataParser,\n});\n/**\n * @this {KML}\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<Style>|string|undefined} StyleMap.\n */\nfunction readStyleMapValue(node, objectStack) {\n    return pushParseAndPop(undefined, STYLE_MAP_PARSERS, node, objectStack, this);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar ICON_STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Icon': makeObjectPropertySetter(readIcon),\n    'color': makeObjectPropertySetter(readColor),\n    'heading': makeObjectPropertySetter(readDecimal),\n    'hotSpot': makeObjectPropertySetter(readVec2),\n    'scale': makeObjectPropertySetter(readScale),\n});\n/**\n * @this {KML}\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction iconStyleParser(node, objectStack) {\n    // FIXME refreshMode\n    // FIXME refreshInterval\n    // FIXME viewRefreshTime\n    // FIXME viewBoundScale\n    // FIXME viewFormat\n    // FIXME httpQuery\n    var object = pushParseAndPop({}, ICON_STYLE_PARSERS, node, objectStack);\n    if (!object) {\n        return;\n    }\n    var styleObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var IconObject = 'Icon' in object ? object['Icon'] : {};\n    var drawIcon = !('Icon' in object) || Object.keys(IconObject).length > 0;\n    var src;\n    var href = /** @type {string|undefined} */ (IconObject['href']);\n    if (href) {\n        src = href;\n    }\n    else if (drawIcon) {\n        src = DEFAULT_IMAGE_STYLE_SRC;\n    }\n    var anchor, anchorXUnits, anchorYUnits;\n    var anchorOrigin = IconOrigin.BOTTOM_LEFT;\n    var hotSpot = /** @type {Vec2|undefined} */ (object['hotSpot']);\n    if (hotSpot) {\n        anchor = [hotSpot.x, hotSpot.y];\n        anchorXUnits = hotSpot.xunits;\n        anchorYUnits = hotSpot.yunits;\n        anchorOrigin = hotSpot.origin;\n    }\n    else if (src === DEFAULT_IMAGE_STYLE_SRC) {\n        anchor = DEFAULT_IMAGE_STYLE_ANCHOR;\n        anchorXUnits = DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS;\n        anchorYUnits = DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS;\n    }\n    else if (/^http:\\/\\/maps\\.(?:google|gstatic)\\.com\\//.test(src)) {\n        anchor = [0.5, 0];\n        anchorXUnits = IconAnchorUnits.FRACTION;\n        anchorYUnits = IconAnchorUnits.FRACTION;\n    }\n    var offset;\n    var x = /** @type {number|undefined} */ (IconObject['x']);\n    var y = /** @type {number|undefined} */ (IconObject['y']);\n    if (x !== undefined && y !== undefined) {\n        offset = [x, y];\n    }\n    var size;\n    var w = /** @type {number|undefined} */ (IconObject['w']);\n    var h = /** @type {number|undefined} */ (IconObject['h']);\n    if (w !== undefined && h !== undefined) {\n        size = [w, h];\n    }\n    var rotation;\n    var heading = /** @type {number} */ (object['heading']);\n    if (heading !== undefined) {\n        rotation = toRadians(heading);\n    }\n    var scale = /** @type {number|undefined} */ (object['scale']);\n    var color = /** @type {Array<number>|undefined} */ (object['color']);\n    if (drawIcon) {\n        if (src == DEFAULT_IMAGE_STYLE_SRC) {\n            size = DEFAULT_IMAGE_STYLE_SIZE;\n            if (scale === undefined) {\n                scale = DEFAULT_IMAGE_SCALE_MULTIPLIER;\n            }\n        }\n        var imageStyle = new Icon({\n            anchor: anchor,\n            anchorOrigin: anchorOrigin,\n            anchorXUnits: anchorXUnits,\n            anchorYUnits: anchorYUnits,\n            crossOrigin: this.crossOrigin_,\n            offset: offset,\n            offsetOrigin: IconOrigin.BOTTOM_LEFT,\n            rotation: rotation,\n            scale: scale,\n            size: size,\n            src: this.iconUrlFunction_(src),\n            color: color,\n        });\n        styleObject['imageStyle'] = imageStyle;\n    }\n    else {\n        // handle the case when we explicitly want to draw no icon.\n        styleObject['imageStyle'] = DEFAULT_NO_IMAGE_STYLE;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LABEL_STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'color': makeObjectPropertySetter(readColor),\n    'scale': makeObjectPropertySetter(readScale),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction labelStyleParser(node, objectStack) {\n    // FIXME colorMode\n    var object = pushParseAndPop({}, LABEL_STYLE_PARSERS, node, objectStack);\n    if (!object) {\n        return;\n    }\n    var styleObject = objectStack[objectStack.length - 1];\n    var textStyle = new Text({\n        fill: new Fill({\n            color: \n            /** @type {import(\"../color.js\").Color} */\n            ('color' in object ? object['color'] : DEFAULT_COLOR),\n        }),\n        scale: /** @type {number|undefined} */ (object['scale']),\n    });\n    styleObject['textStyle'] = textStyle;\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LINE_STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'color': makeObjectPropertySetter(readColor),\n    'width': makeObjectPropertySetter(readDecimal),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction lineStyleParser(node, objectStack) {\n    // FIXME colorMode\n    // FIXME gx:outerColor\n    // FIXME gx:outerWidth\n    // FIXME gx:physicalWidth\n    // FIXME gx:labelVisibility\n    var object = pushParseAndPop({}, LINE_STYLE_PARSERS, node, objectStack);\n    if (!object) {\n        return;\n    }\n    var styleObject = objectStack[objectStack.length - 1];\n    var strokeStyle = new Stroke({\n        color: \n        /** @type {import(\"../color.js\").Color} */\n        ('color' in object ? object['color'] : DEFAULT_COLOR),\n        width: /** @type {number} */ ('width' in object ? object['width'] : 1),\n    });\n    styleObject['strokeStyle'] = strokeStyle;\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar POLY_STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'color': makeObjectPropertySetter(readColor),\n    'fill': makeObjectPropertySetter(readBoolean),\n    'outline': makeObjectPropertySetter(readBoolean),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction polyStyleParser(node, objectStack) {\n    // FIXME colorMode\n    var object = pushParseAndPop({}, POLY_STYLE_PARSERS, node, objectStack);\n    if (!object) {\n        return;\n    }\n    var styleObject = objectStack[objectStack.length - 1];\n    var fillStyle = new Fill({\n        color: \n        /** @type {import(\"../color.js\").Color} */\n        ('color' in object ? object['color'] : DEFAULT_COLOR),\n    });\n    styleObject['fillStyle'] = fillStyle;\n    var fill = /** @type {boolean|undefined} */ (object['fill']);\n    if (fill !== undefined) {\n        styleObject['fill'] = fill;\n    }\n    var outline = /** @type {boolean|undefined} */ (object['outline']);\n    if (outline !== undefined) {\n        styleObject['outline'] = outline;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar FLAT_LINEAR_RING_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'coordinates': makeReplacer(readFlatCoordinates),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<number>} LinearRing flat coordinates.\n */\nfunction readFlatLinearRing(node, objectStack) {\n    return pushParseAndPop(null, FLAT_LINEAR_RING_PARSERS, node, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction gxCoordParser(node, objectStack) {\n    var gxTrackObject = \n    /** @type {GxTrackObject} */\n    (objectStack[objectStack.length - 1]);\n    var coordinates = gxTrackObject.coordinates;\n    var s = getAllTextContent(node, false);\n    var re = /^\\s*([+\\-]?\\d+(?:\\.\\d*)?(?:e[+\\-]?\\d*)?)\\s+([+\\-]?\\d+(?:\\.\\d*)?(?:e[+\\-]?\\d*)?)\\s+([+\\-]?\\d+(?:\\.\\d*)?(?:e[+\\-]?\\d*)?)\\s*$/i;\n    var m = re.exec(s);\n    if (m) {\n        var x = parseFloat(m[1]);\n        var y = parseFloat(m[2]);\n        var z = parseFloat(m[3]);\n        coordinates.push([x, y, z]);\n    }\n    else {\n        coordinates.push([]);\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar GX_MULTITRACK_GEOMETRY_PARSERS = makeStructureNS(GX_NAMESPACE_URIS, {\n    'Track': makeArrayPusher(readGxTrack),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {MultiLineString|undefined} MultiLineString.\n */\nfunction readGxMultiTrack(node, objectStack) {\n    var lineStrings = pushParseAndPop([], GX_MULTITRACK_GEOMETRY_PARSERS, node, objectStack);\n    if (!lineStrings) {\n        return undefined;\n    }\n    return new MultiLineString(lineStrings);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar GX_TRACK_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'when': whenParser,\n}, makeStructureNS(GX_NAMESPACE_URIS, {\n    'coord': gxCoordParser,\n}));\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {LineString|undefined} LineString.\n */\nfunction readGxTrack(node, objectStack) {\n    var gxTrackObject = pushParseAndPop(\n    /** @type {GxTrackObject} */ ({\n        coordinates: [],\n        whens: [],\n    }), GX_TRACK_PARSERS, node, objectStack);\n    if (!gxTrackObject) {\n        return undefined;\n    }\n    var flatCoordinates = [];\n    var coordinates = gxTrackObject.coordinates;\n    var whens = gxTrackObject.whens;\n    for (var i = 0, ii = Math.min(coordinates.length, whens.length); i < ii; ++i) {\n        if (coordinates[i].length == 3) {\n            flatCoordinates.push(coordinates[i][0], coordinates[i][1], coordinates[i][2], whens[i]);\n        }\n    }\n    return new LineString(flatCoordinates, GeometryLayout.XYZM);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar ICON_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'href': makeObjectPropertySetter(readURI),\n}, makeStructureNS(GX_NAMESPACE_URIS, {\n    'x': makeObjectPropertySetter(readDecimal),\n    'y': makeObjectPropertySetter(readDecimal),\n    'w': makeObjectPropertySetter(readDecimal),\n    'h': makeObjectPropertySetter(readDecimal),\n}));\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object} Icon object.\n */\nfunction readIcon(node, objectStack) {\n    var iconObject = pushParseAndPop({}, ICON_PARSERS, node, objectStack);\n    if (iconObject) {\n        return iconObject;\n    }\n    else {\n        return null;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar GEOMETRY_FLAT_COORDINATES_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'coordinates': makeReplacer(readFlatCoordinates),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<number>} Flat coordinates.\n */\nfunction readFlatCoordinatesFromNode(node, objectStack) {\n    return pushParseAndPop(null, GEOMETRY_FLAT_COORDINATES_PARSERS, node, objectStack);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar EXTRUDE_AND_ALTITUDE_MODE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'extrude': makeObjectPropertySetter(readBoolean),\n    'tessellate': makeObjectPropertySetter(readBoolean),\n    'altitudeMode': makeObjectPropertySetter(readString),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {LineString|undefined} LineString.\n */\nfunction readLineString(node, objectStack) {\n    var properties = pushParseAndPop({}, EXTRUDE_AND_ALTITUDE_MODE_PARSERS, node, objectStack);\n    var flatCoordinates = readFlatCoordinatesFromNode(node, objectStack);\n    if (flatCoordinates) {\n        var lineString = new LineString(flatCoordinates, GeometryLayout.XYZ);\n        lineString.setProperties(properties, true);\n        return lineString;\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Polygon|undefined} Polygon.\n */\nfunction readLinearRing(node, objectStack) {\n    var properties = pushParseAndPop({}, EXTRUDE_AND_ALTITUDE_MODE_PARSERS, node, objectStack);\n    var flatCoordinates = readFlatCoordinatesFromNode(node, objectStack);\n    if (flatCoordinates) {\n        var polygon = new Polygon(flatCoordinates, GeometryLayout.XYZ, [\n            flatCoordinates.length,\n        ]);\n        polygon.setProperties(properties, true);\n        return polygon;\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar MULTI_GEOMETRY_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'LineString': makeArrayPusher(readLineString),\n    'LinearRing': makeArrayPusher(readLinearRing),\n    'MultiGeometry': makeArrayPusher(readMultiGeometry),\n    'Point': makeArrayPusher(readPoint),\n    'Polygon': makeArrayPusher(readPolygon),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\nfunction readMultiGeometry(node, objectStack) {\n    var geometries = pushParseAndPop([], MULTI_GEOMETRY_PARSERS, node, objectStack);\n    if (!geometries) {\n        return null;\n    }\n    if (geometries.length === 0) {\n        return new GeometryCollection(geometries);\n    }\n    var multiGeometry;\n    var homogeneous = true;\n    var type = geometries[0].getType();\n    var geometry;\n    for (var i = 1, ii = geometries.length; i < ii; ++i) {\n        geometry = geometries[i];\n        if (geometry.getType() != type) {\n            homogeneous = false;\n            break;\n        }\n    }\n    if (homogeneous) {\n        var layout = void 0;\n        var flatCoordinates = void 0;\n        if (type == GeometryType.POINT) {\n            var point = geometries[0];\n            layout = point.getLayout();\n            flatCoordinates = point.getFlatCoordinates();\n            for (var i = 1, ii = geometries.length; i < ii; ++i) {\n                geometry = geometries[i];\n                extend(flatCoordinates, geometry.getFlatCoordinates());\n            }\n            multiGeometry = new MultiPoint(flatCoordinates, layout);\n            setCommonGeometryProperties(multiGeometry, geometries);\n        }\n        else if (type == GeometryType.LINE_STRING) {\n            multiGeometry = new MultiLineString(geometries);\n            setCommonGeometryProperties(multiGeometry, geometries);\n        }\n        else if (type == GeometryType.POLYGON) {\n            multiGeometry = new MultiPolygon(geometries);\n            setCommonGeometryProperties(multiGeometry, geometries);\n        }\n        else if (type == GeometryType.GEOMETRY_COLLECTION) {\n            multiGeometry = new GeometryCollection(geometries);\n        }\n        else {\n            assert(false, 37); // Unknown geometry type found\n        }\n    }\n    else {\n        multiGeometry = new GeometryCollection(geometries);\n    }\n    return /** @type {import(\"../geom/Geometry.js\").default} */ (multiGeometry);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Point|undefined} Point.\n */\nfunction readPoint(node, objectStack) {\n    var properties = pushParseAndPop({}, EXTRUDE_AND_ALTITUDE_MODE_PARSERS, node, objectStack);\n    var flatCoordinates = readFlatCoordinatesFromNode(node, objectStack);\n    if (flatCoordinates) {\n        var point = new Point(flatCoordinates, GeometryLayout.XYZ);\n        point.setProperties(properties, true);\n        return point;\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar FLAT_LINEAR_RINGS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'innerBoundaryIs': innerBoundaryIsParser,\n    'outerBoundaryIs': outerBoundaryIsParser,\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Polygon|undefined} Polygon.\n */\nfunction readPolygon(node, objectStack) {\n    var properties = pushParseAndPop(\n    /** @type {Object<string,*>} */ ({}), EXTRUDE_AND_ALTITUDE_MODE_PARSERS, node, objectStack);\n    var flatLinearRings = pushParseAndPop([null], FLAT_LINEAR_RINGS_PARSERS, node, objectStack);\n    if (flatLinearRings && flatLinearRings[0]) {\n        var flatCoordinates = flatLinearRings[0];\n        var ends = [flatCoordinates.length];\n        for (var i = 1, ii = flatLinearRings.length; i < ii; ++i) {\n            extend(flatCoordinates, flatLinearRings[i]);\n            ends.push(flatCoordinates.length);\n        }\n        var polygon = new Polygon(flatCoordinates, GeometryLayout.XYZ, ends);\n        polygon.setProperties(properties, true);\n        return polygon;\n    }\n    else {\n        return undefined;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'IconStyle': iconStyleParser,\n    'LabelStyle': labelStyleParser,\n    'LineStyle': lineStyleParser,\n    'PolyStyle': polyStyleParser,\n});\n/**\n * @this {KML}\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<Style>} Style.\n */\nfunction readStyle(node, objectStack) {\n    var styleObject = pushParseAndPop({}, STYLE_PARSERS, node, objectStack, this);\n    if (!styleObject) {\n        return null;\n    }\n    var fillStyle = \n    /** @type {Fill} */\n    ('fillStyle' in styleObject ? styleObject['fillStyle'] : DEFAULT_FILL_STYLE);\n    var fill = /** @type {boolean|undefined} */ (styleObject['fill']);\n    if (fill !== undefined && !fill) {\n        fillStyle = null;\n    }\n    var imageStyle;\n    if ('imageStyle' in styleObject) {\n        if (styleObject['imageStyle'] != DEFAULT_NO_IMAGE_STYLE) {\n            imageStyle = styleObject['imageStyle'];\n        }\n    }\n    else {\n        imageStyle = DEFAULT_IMAGE_STYLE;\n    }\n    var textStyle = \n    /** @type {Text} */\n    ('textStyle' in styleObject ? styleObject['textStyle'] : DEFAULT_TEXT_STYLE);\n    var strokeStyle = \n    /** @type {Stroke} */\n    ('strokeStyle' in styleObject\n        ? styleObject['strokeStyle']\n        : DEFAULT_STROKE_STYLE);\n    var outline = /** @type {boolean|undefined} */ (styleObject['outline']);\n    if (outline !== undefined && !outline) {\n        // if the polystyle specifies no outline two styles are needed,\n        // one for non-polygon geometries where linestrings require a stroke\n        // and one for polygons where there should be no stroke\n        return [\n            new Style({\n                geometry: function (feature) {\n                    var geometry = feature.getGeometry();\n                    var type = geometry.getType();\n                    if (type === GeometryType.GEOMETRY_COLLECTION) {\n                        return new GeometryCollection(geometry\n                            .getGeometriesArrayRecursive()\n                            .filter(function (geometry) {\n                            var type = geometry.getType();\n                            return (type !== GeometryType.POLYGON &&\n                                type !== GeometryType.MULTI_POLYGON);\n                        }));\n                    }\n                    else if (type !== GeometryType.POLYGON &&\n                        type !== GeometryType.MULTI_POLYGON) {\n                        return geometry;\n                    }\n                },\n                fill: fillStyle,\n                image: imageStyle,\n                stroke: strokeStyle,\n                text: textStyle,\n                zIndex: undefined, // FIXME\n            }),\n            new Style({\n                geometry: function (feature) {\n                    var geometry = feature.getGeometry();\n                    var type = geometry.getType();\n                    if (type === GeometryType.GEOMETRY_COLLECTION) {\n                        return new GeometryCollection(geometry\n                            .getGeometriesArrayRecursive()\n                            .filter(function (geometry) {\n                            var type = geometry.getType();\n                            return (type === GeometryType.POLYGON ||\n                                type === GeometryType.MULTI_POLYGON);\n                        }));\n                    }\n                    else if (type === GeometryType.POLYGON ||\n                        type === GeometryType.MULTI_POLYGON) {\n                        return geometry;\n                    }\n                },\n                fill: fillStyle,\n                stroke: null,\n                zIndex: undefined, // FIXME\n            }),\n        ];\n    }\n    return [\n        new Style({\n            fill: fillStyle,\n            image: imageStyle,\n            stroke: strokeStyle,\n            text: textStyle,\n            zIndex: undefined, // FIXME\n        }),\n    ];\n}\n/**\n * Reads an array of geometries and creates arrays for common geometry\n * properties. Then sets them to the multi geometry.\n * @param {MultiPoint|MultiLineString|MultiPolygon} multiGeometry A multi-geometry.\n * @param {Array<import(\"../geom/Geometry.js\").default>} geometries List of geometries.\n */\nfunction setCommonGeometryProperties(multiGeometry, geometries) {\n    var ii = geometries.length;\n    var extrudes = new Array(geometries.length);\n    var tessellates = new Array(geometries.length);\n    var altitudeModes = new Array(geometries.length);\n    var hasExtrude, hasTessellate, hasAltitudeMode;\n    hasExtrude = false;\n    hasTessellate = false;\n    hasAltitudeMode = false;\n    for (var i = 0; i < ii; ++i) {\n        var geometry = geometries[i];\n        extrudes[i] = geometry.get('extrude');\n        tessellates[i] = geometry.get('tessellate');\n        altitudeModes[i] = geometry.get('altitudeMode');\n        hasExtrude = hasExtrude || extrudes[i] !== undefined;\n        hasTessellate = hasTessellate || tessellates[i] !== undefined;\n        hasAltitudeMode = hasAltitudeMode || altitudeModes[i];\n    }\n    if (hasExtrude) {\n        multiGeometry.set('extrude', extrudes);\n    }\n    if (hasTessellate) {\n        multiGeometry.set('tessellate', tessellates);\n    }\n    if (hasAltitudeMode) {\n        multiGeometry.set('altitudeMode', altitudeModes);\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar DATA_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'displayName': makeObjectPropertySetter(readString),\n    'value': makeObjectPropertySetter(readString),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction dataParser(node, objectStack) {\n    var name = node.getAttribute('name');\n    parseNode(DATA_PARSERS, node, objectStack);\n    var featureObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    if (name && featureObject.displayName) {\n        featureObject[name] = {\n            value: featureObject.value,\n            displayName: featureObject.displayName,\n            toString: function () {\n                return featureObject.value;\n            },\n        };\n    }\n    else if (name !== null) {\n        featureObject[name] = featureObject.value;\n    }\n    else if (featureObject.displayName !== null) {\n        featureObject[featureObject.displayName] = featureObject.value;\n    }\n    delete featureObject['value'];\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar EXTENDED_DATA_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Data': dataParser,\n    'SchemaData': schemaDataParser,\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction extendedDataParser(node, objectStack) {\n    parseNode(EXTENDED_DATA_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction regionParser(node, objectStack) {\n    parseNode(REGION_PARSERS, node, objectStack);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PAIR_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Style': makeObjectPropertySetter(readStyle),\n    'key': makeObjectPropertySetter(readString),\n    'styleUrl': makeObjectPropertySetter(readStyleURL),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction pairDataParser(node, objectStack) {\n    var pairObject = pushParseAndPop({}, PAIR_PARSERS, node, objectStack, this);\n    if (!pairObject) {\n        return;\n    }\n    var key = /** @type {string|undefined} */ (pairObject['key']);\n    if (key && key == 'normal') {\n        var styleUrl = /** @type {string|undefined} */ (pairObject['styleUrl']);\n        if (styleUrl) {\n            objectStack[objectStack.length - 1] = styleUrl;\n        }\n        var style = /** @type {Style} */ (pairObject['Style']);\n        if (style) {\n            objectStack[objectStack.length - 1] = style;\n        }\n    }\n}\n/**\n * @this {KML}\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction placemarkStyleMapParser(node, objectStack) {\n    var styleMapValue = readStyleMapValue.call(this, node, objectStack);\n    if (!styleMapValue) {\n        return;\n    }\n    var placemarkObject = objectStack[objectStack.length - 1];\n    if (Array.isArray(styleMapValue)) {\n        placemarkObject['Style'] = styleMapValue;\n    }\n    else if (typeof styleMapValue === 'string') {\n        placemarkObject['styleUrl'] = styleMapValue;\n    }\n    else {\n        assert(false, 38); // `styleMapValue` has an unknown type\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar SCHEMA_DATA_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'SimpleData': simpleDataParser,\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction schemaDataParser(node, objectStack) {\n    parseNode(SCHEMA_DATA_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction simpleDataParser(node, objectStack) {\n    var name = node.getAttribute('name');\n    if (name !== null) {\n        var data = readString(node);\n        var featureObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n        featureObject[name] = data;\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LAT_LON_ALT_BOX_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'altitudeMode': makeObjectPropertySetter(readString),\n    'minAltitude': makeObjectPropertySetter(readDecimal),\n    'maxAltitude': makeObjectPropertySetter(readDecimal),\n    'north': makeObjectPropertySetter(readDecimal),\n    'south': makeObjectPropertySetter(readDecimal),\n    'east': makeObjectPropertySetter(readDecimal),\n    'west': makeObjectPropertySetter(readDecimal),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction latLonAltBoxParser(node, objectStack) {\n    var object = pushParseAndPop({}, LAT_LON_ALT_BOX_PARSERS, node, objectStack);\n    if (!object) {\n        return;\n    }\n    var regionObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var extent = [\n        parseFloat(object['west']),\n        parseFloat(object['south']),\n        parseFloat(object['east']),\n        parseFloat(object['north']),\n    ];\n    regionObject['extent'] = extent;\n    regionObject['altitudeMode'] = object['altitudeMode'];\n    regionObject['minAltitude'] = parseFloat(object['minAltitude']);\n    regionObject['maxAltitude'] = parseFloat(object['maxAltitude']);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LOD_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'minLodPixels': makeObjectPropertySetter(readDecimal),\n    'maxLodPixels': makeObjectPropertySetter(readDecimal),\n    'minFadeExtent': makeObjectPropertySetter(readDecimal),\n    'maxFadeExtent': makeObjectPropertySetter(readDecimal),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction lodParser(node, objectStack) {\n    var object = pushParseAndPop({}, LOD_PARSERS, node, objectStack);\n    if (!object) {\n        return;\n    }\n    var lodObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    lodObject['minLodPixels'] = parseFloat(object['minLodPixels']);\n    lodObject['maxLodPixels'] = parseFloat(object['maxLodPixels']);\n    lodObject['minFadeExtent'] = parseFloat(object['minFadeExtent']);\n    lodObject['maxFadeExtent'] = parseFloat(object['maxFadeExtent']);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar INNER_BOUNDARY_IS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    // KML spec only allows one LinearRing  per innerBoundaryIs, but Google Earth\n    // allows multiple, so we parse multiple here too.\n    'LinearRing': makeArrayPusher(readFlatLinearRing),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction innerBoundaryIsParser(node, objectStack) {\n    var innerBoundaryFlatLinearRings = pushParseAndPop(\n    /** @type {Array<Array<number>>} */ ([]), INNER_BOUNDARY_IS_PARSERS, node, objectStack);\n    if (innerBoundaryFlatLinearRings.length > 0) {\n        var flatLinearRings = \n        /** @type {Array<Array<number>>} */\n        (objectStack[objectStack.length - 1]);\n        flatLinearRings.push.apply(flatLinearRings, innerBoundaryFlatLinearRings);\n    }\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar OUTER_BOUNDARY_IS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'LinearRing': makeReplacer(readFlatLinearRing),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction outerBoundaryIsParser(node, objectStack) {\n    /** @type {Array<number>|undefined} */\n    var flatLinearRing = pushParseAndPop(undefined, OUTER_BOUNDARY_IS_PARSERS, node, objectStack);\n    if (flatLinearRing) {\n        var flatLinearRings = \n        /** @type {Array<Array<number>>} */\n        (objectStack[objectStack.length - 1]);\n        flatLinearRings[0] = flatLinearRing;\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction linkParser(node, objectStack) {\n    parseNode(LINK_PARSERS, node, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction whenParser(node, objectStack) {\n    var gxTrackObject = \n    /** @type {GxTrackObject} */\n    (objectStack[objectStack.length - 1]);\n    var whens = gxTrackObject.whens;\n    var s = getAllTextContent(node, false);\n    var when = Date.parse(s);\n    whens.push(isNaN(when) ? 0 : when);\n}\n/**\n * @param {Node} node Node to append a TextNode with the color to.\n * @param {import(\"../color.js\").Color|string} color Color.\n */\nfunction writeColorTextNode(node, color) {\n    var rgba = asArray(color);\n    var opacity = rgba.length == 4 ? rgba[3] : 1;\n    /** @type {Array<string|number>} */\n    var abgr = [opacity * 255, rgba[2], rgba[1], rgba[0]];\n    for (var i = 0; i < 4; ++i) {\n        var hex = Math.floor(/** @type {number} */ (abgr[i])).toString(16);\n        abgr[i] = hex.length == 1 ? '0' + hex : hex;\n    }\n    writeStringTextNode(node, abgr.join(''));\n}\n/**\n * @param {Node} node Node to append a TextNode with the coordinates to.\n * @param {Array<number>} coordinates Coordinates.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeCoordinatesTextNode(node, coordinates, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var layout = context['layout'];\n    var stride = context['stride'];\n    var dimension;\n    if (layout == GeometryLayout.XY || layout == GeometryLayout.XYM) {\n        dimension = 2;\n    }\n    else if (layout == GeometryLayout.XYZ || layout == GeometryLayout.XYZM) {\n        dimension = 3;\n    }\n    else {\n        assert(false, 34); // Invalid geometry layout\n    }\n    var ii = coordinates.length;\n    var text = '';\n    if (ii > 0) {\n        text += coordinates[0];\n        for (var d = 1; d < dimension; ++d) {\n            text += ',' + coordinates[d];\n        }\n        for (var i = stride; i < ii; i += stride) {\n            text += ' ' + coordinates[i];\n            for (var d = 1; d < dimension; ++d) {\n                text += ',' + coordinates[i + d];\n            }\n        }\n    }\n    writeStringTextNode(node, text);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar EXTENDEDDATA_NODE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'Data': makeChildAppender(writeDataNode),\n    'value': makeChildAppender(writeDataNodeValue),\n    'displayName': makeChildAppender(writeDataNodeName),\n});\n/**\n * @param {Element} node Node.\n * @param {{name: *, value: *}} pair Name value pair.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeDataNode(node, pair, objectStack) {\n    node.setAttribute('name', pair.name);\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var value = pair.value;\n    if (typeof value == 'object') {\n        if (value !== null && value.displayName) {\n            pushSerializeAndPop(context, EXTENDEDDATA_NODE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, [value.displayName], objectStack, ['displayName']);\n        }\n        if (value !== null && value.value) {\n            pushSerializeAndPop(context, EXTENDEDDATA_NODE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, [value.value], objectStack, ['value']);\n        }\n    }\n    else {\n        pushSerializeAndPop(context, EXTENDEDDATA_NODE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, [value], objectStack, ['value']);\n    }\n}\n/**\n * @param {Node} node Node to append a TextNode with the name to.\n * @param {string} name DisplayName.\n */\nfunction writeDataNodeName(node, name) {\n    writeCDATASection(node, name);\n}\n/**\n * @param {Node} node Node to append a CDATA Section with the value to.\n * @param {string} value Value.\n */\nfunction writeDataNodeValue(node, value) {\n    writeStringTextNode(node, value);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar DOCUMENT_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'Placemark': makeChildAppender(writePlacemark),\n});\n/**\n * @const\n * @param {*} value Value.\n * @param {Array<*>} objectStack Object stack.\n * @param {string} [opt_nodeName] Node name.\n * @return {Node|undefined} Node.\n */\nvar DOCUMENT_NODE_FACTORY = function (value, objectStack, opt_nodeName) {\n    var parentNode = objectStack[objectStack.length - 1].node;\n    return createElementNS(parentNode.namespaceURI, 'Placemark');\n};\n/**\n * @param {Node} node Node.\n * @param {Array<Feature>} features Features.\n * @param {Array<*>} objectStack Object stack.\n * @this {KML}\n */\nfunction writeDocument(node, features, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    pushSerializeAndPop(context, DOCUMENT_SERIALIZERS, DOCUMENT_NODE_FACTORY, features, objectStack, undefined, this);\n}\n/**\n * A factory for creating Data nodes.\n * @const\n * @type {function(*, Array<*>): (Node|undefined)}\n */\nvar DATA_NODE_FACTORY = makeSimpleNodeFactory('Data');\n/**\n * @param {Node} node Node.\n * @param {{names: Array<string>, values: (Array<*>)}} namesAndValues Names and values.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeExtendedData(node, namesAndValues, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var names = namesAndValues.names;\n    var values = namesAndValues.values;\n    var length = names.length;\n    for (var i = 0; i < length; i++) {\n        pushSerializeAndPop(context, EXTENDEDDATA_NODE_SERIALIZERS, DATA_NODE_FACTORY, [{ name: names[i], value: values[i] }], objectStack);\n    }\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar ICON_SEQUENCE = makeStructureNS(NAMESPACE_URIS, ['href'], makeStructureNS(GX_NAMESPACE_URIS, ['x', 'y', 'w', 'h']));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar ICON_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'href': makeChildAppender(writeStringTextNode),\n}, makeStructureNS(GX_NAMESPACE_URIS, {\n    'x': makeChildAppender(writeDecimalTextNode),\n    'y': makeChildAppender(writeDecimalTextNode),\n    'w': makeChildAppender(writeDecimalTextNode),\n    'h': makeChildAppender(writeDecimalTextNode),\n}));\n/**\n * @const\n * @param {*} value Value.\n * @param {Array<*>} objectStack Object stack.\n * @param {string} [opt_nodeName] Node name.\n * @return {Node|undefined} Node.\n */\nvar GX_NODE_FACTORY = function (value, objectStack, opt_nodeName) {\n    return createElementNS(GX_NAMESPACE_URIS[0], 'gx:' + opt_nodeName);\n};\n/**\n * @param {Node} node Node.\n * @param {Object} icon Icon object.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeIcon(node, icon, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = ICON_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(icon, orderedKeys);\n    pushSerializeAndPop(context, ICON_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n    orderedKeys = ICON_SEQUENCE[GX_NAMESPACE_URIS[0]];\n    values = makeSequence(icon, orderedKeys);\n    pushSerializeAndPop(context, ICON_SERIALIZERS, GX_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar ICON_STYLE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'scale',\n    'heading',\n    'Icon',\n    'color',\n    'hotSpot',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar ICON_STYLE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'Icon': makeChildAppender(writeIcon),\n    'color': makeChildAppender(writeColorTextNode),\n    'heading': makeChildAppender(writeDecimalTextNode),\n    'hotSpot': makeChildAppender(writeVec2),\n    'scale': makeChildAppender(writeScaleTextNode),\n});\n/**\n * @param {Node} node Node.\n * @param {import(\"../style/Icon.js\").default} style Icon style.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeIconStyle(node, style, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var /** @type {Object<string, any>} */ properties = {};\n    var src = style.getSrc();\n    var size = style.getSize();\n    var iconImageSize = style.getImageSize();\n    var iconProperties = {\n        'href': src,\n    };\n    if (size) {\n        iconProperties['w'] = size[0];\n        iconProperties['h'] = size[1];\n        var anchor = style.getAnchor(); // top-left\n        var origin_1 = style.getOrigin(); // top-left\n        if (origin_1 && iconImageSize && origin_1[0] !== 0 && origin_1[1] !== size[1]) {\n            iconProperties['x'] = origin_1[0];\n            iconProperties['y'] = iconImageSize[1] - (origin_1[1] + size[1]);\n        }\n        if (anchor && (anchor[0] !== size[0] / 2 || anchor[1] !== size[1] / 2)) {\n            var /** @type {Vec2} */ hotSpot = {\n                x: anchor[0],\n                xunits: IconAnchorUnits.PIXELS,\n                y: size[1] - anchor[1],\n                yunits: IconAnchorUnits.PIXELS,\n            };\n            properties['hotSpot'] = hotSpot;\n        }\n    }\n    properties['Icon'] = iconProperties;\n    var scale = style.getScale();\n    if (scale !== 1) {\n        properties['scale'] = scale;\n    }\n    var rotation = style.getRotation();\n    if (rotation !== 0) {\n        properties['heading'] = rotation; // 0-360\n    }\n    var color = style.getColor();\n    if (color) {\n        properties['color'] = color;\n    }\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = ICON_STYLE_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, ICON_STYLE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar LABEL_STYLE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'color',\n    'scale',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar LABEL_STYLE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'color': makeChildAppender(writeColorTextNode),\n    'scale': makeChildAppender(writeScaleTextNode),\n});\n/**\n * @param {Node} node Node.\n * @param {Text} style style.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeLabelStyle(node, style, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var properties = {};\n    var fill = style.getFill();\n    if (fill) {\n        properties['color'] = fill.getColor();\n    }\n    var scale = style.getScale();\n    if (scale && scale !== 1) {\n        properties['scale'] = scale;\n    }\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = LABEL_STYLE_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, LABEL_STYLE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar LINE_STYLE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, ['color', 'width']);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar LINE_STYLE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'color': makeChildAppender(writeColorTextNode),\n    'width': makeChildAppender(writeDecimalTextNode),\n});\n/**\n * @param {Node} node Node.\n * @param {Stroke} style style.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeLineStyle(node, style, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var properties = {\n        'color': style.getColor(),\n        'width': Number(style.getWidth()) || 1,\n    };\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = LINE_STYLE_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, LINE_STYLE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @const\n * @type {Object<string, string>}\n */\nvar GEOMETRY_TYPE_TO_NODENAME = {\n    'Point': 'Point',\n    'LineString': 'LineString',\n    'LinearRing': 'LinearRing',\n    'Polygon': 'Polygon',\n    'MultiPoint': 'MultiGeometry',\n    'MultiLineString': 'MultiGeometry',\n    'MultiPolygon': 'MultiGeometry',\n    'GeometryCollection': 'MultiGeometry',\n};\n/**\n * @const\n * @param {*} value Value.\n * @param {Array<*>} objectStack Object stack.\n * @param {string} [opt_nodeName] Node name.\n * @return {Node|undefined} Node.\n */\nvar GEOMETRY_NODE_FACTORY = function (value, objectStack, opt_nodeName) {\n    if (value) {\n        var parentNode = objectStack[objectStack.length - 1].node;\n        return createElementNS(parentNode.namespaceURI, GEOMETRY_TYPE_TO_NODENAME[\n        /** @type {import(\"../geom/Geometry.js\").default} */ (value).getType()]);\n    }\n};\n/**\n * A factory for creating Point nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar POINT_NODE_FACTORY = makeSimpleNodeFactory('Point');\n/**\n * A factory for creating LineString nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar LINE_STRING_NODE_FACTORY = makeSimpleNodeFactory('LineString');\n/**\n * A factory for creating LinearRing nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar LINEAR_RING_NODE_FACTORY = makeSimpleNodeFactory('LinearRing');\n/**\n * A factory for creating Polygon nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar POLYGON_NODE_FACTORY = makeSimpleNodeFactory('Polygon');\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar MULTI_GEOMETRY_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'LineString': makeChildAppender(writePrimitiveGeometry),\n    'Point': makeChildAppender(writePrimitiveGeometry),\n    'Polygon': makeChildAppender(writePolygon),\n    'GeometryCollection': makeChildAppender(writeMultiGeometry),\n});\n/**\n * @param {Node} node Node.\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeMultiGeometry(node, geometry, objectStack) {\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    var context = { node: node };\n    var type = geometry.getType();\n    /** @type {Array<import(\"../geom/Geometry.js\").default>} */\n    var geometries = [];\n    /** @type {function(*, Array<*>, string=): (Node|undefined)} */\n    var factory;\n    if (type === GeometryType.GEOMETRY_COLLECTION) {\n        /** @type {GeometryCollection} */ (geometry)\n            .getGeometriesArrayRecursive()\n            .forEach(function (geometry) {\n            var type = geometry.getType();\n            if (type === GeometryType.MULTI_POINT) {\n                geometries = geometries.concat(\n                /** @type {MultiPoint} */ (geometry).getPoints());\n            }\n            else if (type === GeometryType.MULTI_LINE_STRING) {\n                geometries = geometries.concat(\n                /** @type {MultiLineString} */ (geometry).getLineStrings());\n            }\n            else if (type === GeometryType.MULTI_POLYGON) {\n                geometries = geometries.concat(\n                /** @type {MultiPolygon} */ (geometry).getPolygons());\n            }\n            else if (type === GeometryType.POINT ||\n                type === GeometryType.LINE_STRING ||\n                type === GeometryType.POLYGON) {\n                geometries.push(geometry);\n            }\n            else {\n                assert(false, 39); // Unknown geometry type\n            }\n        });\n        factory = GEOMETRY_NODE_FACTORY;\n    }\n    else if (type === GeometryType.MULTI_POINT) {\n        geometries = /** @type {MultiPoint} */ (geometry).getPoints();\n        factory = POINT_NODE_FACTORY;\n    }\n    else if (type === GeometryType.MULTI_LINE_STRING) {\n        geometries = /** @type {MultiLineString} */ (geometry).getLineStrings();\n        factory = LINE_STRING_NODE_FACTORY;\n    }\n    else if (type === GeometryType.MULTI_POLYGON) {\n        geometries = /** @type {MultiPolygon} */ (geometry).getPolygons();\n        factory = POLYGON_NODE_FACTORY;\n    }\n    else {\n        assert(false, 39); // Unknown geometry type\n    }\n    pushSerializeAndPop(context, MULTI_GEOMETRY_SERIALIZERS, factory, geometries, objectStack);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar BOUNDARY_IS_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'LinearRing': makeChildAppender(writePrimitiveGeometry),\n});\n/**\n * @param {Node} node Node.\n * @param {import(\"../geom/LinearRing.js\").default} linearRing Linear ring.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeBoundaryIs(node, linearRing, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    pushSerializeAndPop(context, BOUNDARY_IS_SERIALIZERS, LINEAR_RING_NODE_FACTORY, [linearRing], objectStack);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar PLACEMARK_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'ExtendedData': makeChildAppender(writeExtendedData),\n    'MultiGeometry': makeChildAppender(writeMultiGeometry),\n    'LineString': makeChildAppender(writePrimitiveGeometry),\n    'LinearRing': makeChildAppender(writePrimitiveGeometry),\n    'Point': makeChildAppender(writePrimitiveGeometry),\n    'Polygon': makeChildAppender(writePolygon),\n    'Style': makeChildAppender(writeStyle),\n    'address': makeChildAppender(writeStringTextNode),\n    'description': makeChildAppender(writeStringTextNode),\n    'name': makeChildAppender(writeStringTextNode),\n    'open': makeChildAppender(writeBooleanTextNode),\n    'phoneNumber': makeChildAppender(writeStringTextNode),\n    'styleUrl': makeChildAppender(writeStringTextNode),\n    'visibility': makeChildAppender(writeBooleanTextNode),\n});\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar PLACEMARK_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'name',\n    'open',\n    'visibility',\n    'address',\n    'phoneNumber',\n    'description',\n    'styleUrl',\n    'Style',\n]);\n/**\n * A factory for creating ExtendedData nodes.\n * @const\n * @type {function(*, Array<*>): (Node|undefined)}\n */\nvar EXTENDEDDATA_NODE_FACTORY = makeSimpleNodeFactory('ExtendedData');\n/**\n * FIXME currently we do serialize arbitrary/custom feature properties\n * (ExtendedData).\n * @param {Element} node Node.\n * @param {Feature} feature Feature.\n * @param {Array<*>} objectStack Object stack.\n * @this {KML}\n */\nfunction writePlacemark(node, feature, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    // set id\n    if (feature.getId()) {\n        node.setAttribute('id', /** @type {string} */ (feature.getId()));\n    }\n    // serialize properties (properties unknown to KML are not serialized)\n    var properties = feature.getProperties();\n    // don't export these to ExtendedData\n    var filter = {\n        'address': 1,\n        'description': 1,\n        'name': 1,\n        'open': 1,\n        'phoneNumber': 1,\n        'styleUrl': 1,\n        'visibility': 1,\n    };\n    filter[feature.getGeometryName()] = 1;\n    var keys = Object.keys(properties || {})\n        .sort()\n        .filter(function (v) {\n        return !filter[v];\n    });\n    var styleFunction = feature.getStyleFunction();\n    if (styleFunction) {\n        // FIXME the styles returned by the style function are supposed to be\n        // resolution-independent here\n        var styles = styleFunction(feature, 0);\n        if (styles) {\n            var styleArray = Array.isArray(styles) ? styles : [styles];\n            var pointStyles = styleArray;\n            if (feature.getGeometry()) {\n                pointStyles = styleArray.filter(function (style) {\n                    var geometry = style.getGeometryFunction()(feature);\n                    if (geometry) {\n                        var type = geometry.getType();\n                        if (type === GeometryType.GEOMETRY_COLLECTION) {\n                            return /** @type {GeometryCollection} */ (geometry)\n                                .getGeometriesArrayRecursive()\n                                .filter(function (geometry) {\n                                var type = geometry.getType();\n                                return (type === GeometryType.POINT ||\n                                    type === GeometryType.MULTI_POINT);\n                            }).length;\n                        }\n                        return (type === GeometryType.POINT || type === GeometryType.MULTI_POINT);\n                    }\n                });\n            }\n            if (this.writeStyles_) {\n                var lineStyles = styleArray;\n                var polyStyles = styleArray;\n                if (feature.getGeometry()) {\n                    lineStyles = styleArray.filter(function (style) {\n                        var geometry = style.getGeometryFunction()(feature);\n                        if (geometry) {\n                            var type = geometry.getType();\n                            if (type === GeometryType.GEOMETRY_COLLECTION) {\n                                return /** @type {GeometryCollection} */ (geometry)\n                                    .getGeometriesArrayRecursive()\n                                    .filter(function (geometry) {\n                                    var type = geometry.getType();\n                                    return (type === GeometryType.LINE_STRING ||\n                                        type === GeometryType.MULTI_LINE_STRING);\n                                }).length;\n                            }\n                            return (type === GeometryType.LINE_STRING ||\n                                type === GeometryType.MULTI_LINE_STRING);\n                        }\n                    });\n                    polyStyles = styleArray.filter(function (style) {\n                        var geometry = style.getGeometryFunction()(feature);\n                        if (geometry) {\n                            var type = geometry.getType();\n                            if (type === GeometryType.GEOMETRY_COLLECTION) {\n                                return /** @type {GeometryCollection} */ (geometry)\n                                    .getGeometriesArrayRecursive()\n                                    .filter(function (geometry) {\n                                    var type = geometry.getType();\n                                    return (type === GeometryType.POLYGON ||\n                                        type === GeometryType.MULTI_POLYGON);\n                                }).length;\n                            }\n                            return (type === GeometryType.POLYGON ||\n                                type === GeometryType.MULTI_POLYGON);\n                        }\n                    });\n                }\n                properties['Style'] = {\n                    pointStyles: pointStyles,\n                    lineStyles: lineStyles,\n                    polyStyles: polyStyles,\n                };\n            }\n            if (pointStyles.length && properties['name'] === undefined) {\n                var textStyle = pointStyles[0].getText();\n                if (textStyle) {\n                    properties['name'] = textStyle.getText();\n                }\n            }\n        }\n    }\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = PLACEMARK_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, PLACEMARK_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n    if (keys.length > 0) {\n        var sequence = makeSequence(properties, keys);\n        var namesAndValues = { names: keys, values: sequence };\n        pushSerializeAndPop(context, PLACEMARK_SERIALIZERS, EXTENDEDDATA_NODE_FACTORY, [namesAndValues], objectStack);\n    }\n    // serialize geometry\n    var options = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[0]);\n    var geometry = feature.getGeometry();\n    if (geometry) {\n        geometry = transformGeometryWithOptions(geometry, true, options);\n    }\n    pushSerializeAndPop(context, PLACEMARK_SERIALIZERS, GEOMETRY_NODE_FACTORY, [geometry], objectStack);\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar PRIMITIVE_GEOMETRY_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'extrude',\n    'tessellate',\n    'altitudeMode',\n    'coordinates',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar PRIMITIVE_GEOMETRY_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'extrude': makeChildAppender(writeBooleanTextNode),\n    'tessellate': makeChildAppender(writeBooleanTextNode),\n    'altitudeMode': makeChildAppender(writeStringTextNode),\n    'coordinates': makeChildAppender(writeCoordinatesTextNode),\n});\n/**\n * @param {Node} node Node.\n * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writePrimitiveGeometry(node, geometry, objectStack) {\n    var flatCoordinates = geometry.getFlatCoordinates();\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    context['layout'] = geometry.getLayout();\n    context['stride'] = geometry.getStride();\n    // serialize properties (properties unknown to KML are not serialized)\n    var properties = geometry.getProperties();\n    properties.coordinates = flatCoordinates;\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = PRIMITIVE_GEOMETRY_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, PRIMITIVE_GEOMETRY_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar POLY_STYLE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'color',\n    'fill',\n    'outline',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar POLYGON_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'outerBoundaryIs': makeChildAppender(writeBoundaryIs),\n    'innerBoundaryIs': makeChildAppender(writeBoundaryIs),\n});\n/**\n * A factory for creating innerBoundaryIs nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar INNER_BOUNDARY_NODE_FACTORY = makeSimpleNodeFactory('innerBoundaryIs');\n/**\n * A factory for creating outerBoundaryIs nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar OUTER_BOUNDARY_NODE_FACTORY = makeSimpleNodeFactory('outerBoundaryIs');\n/**\n * @param {Node} node Node.\n * @param {Polygon} polygon Polygon.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writePolygon(node, polygon, objectStack) {\n    var linearRings = polygon.getLinearRings();\n    var outerRing = linearRings.shift();\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    // inner rings\n    pushSerializeAndPop(context, POLYGON_SERIALIZERS, INNER_BOUNDARY_NODE_FACTORY, linearRings, objectStack);\n    // outer ring\n    pushSerializeAndPop(context, POLYGON_SERIALIZERS, OUTER_BOUNDARY_NODE_FACTORY, [outerRing], objectStack);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar POLY_STYLE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'color': makeChildAppender(writeColorTextNode),\n    'fill': makeChildAppender(writeBooleanTextNode),\n    'outline': makeChildAppender(writeBooleanTextNode),\n});\n/**\n * @param {Node} node Node.\n * @param {Style} style Style.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writePolyStyle(node, style, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var fill = style.getFill();\n    var stroke = style.getStroke();\n    var properties = {\n        'color': fill ? fill.getColor() : undefined,\n        'fill': fill ? undefined : false,\n        'outline': stroke ? undefined : false,\n    };\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = POLY_STYLE_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, POLY_STYLE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @param {Node} node Node to append a TextNode with the scale to.\n * @param {number|undefined} scale Scale.\n */\nfunction writeScaleTextNode(node, scale) {\n    // the Math is to remove any excess decimals created by float arithmetic\n    writeDecimalTextNode(node, Math.round(scale * 1e6) / 1e6);\n}\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\n// @ts-ignore\nvar STYLE_SEQUENCE = makeStructureNS(NAMESPACE_URIS, [\n    'IconStyle',\n    'LabelStyle',\n    'LineStyle',\n    'PolyStyle',\n]);\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\n// @ts-ignore\nvar STYLE_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {\n    'IconStyle': makeChildAppender(writeIconStyle),\n    'LabelStyle': makeChildAppender(writeLabelStyle),\n    'LineStyle': makeChildAppender(writeLineStyle),\n    'PolyStyle': makeChildAppender(writePolyStyle),\n});\n/**\n * @param {Node} node Node.\n * @param {Object<string, Array<Style>>} styles Styles.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeStyle(node, styles, objectStack) {\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = { node: node };\n    var properties = {};\n    if (styles.pointStyles.length) {\n        var textStyle = styles.pointStyles[0].getText();\n        if (textStyle) {\n            properties['LabelStyle'] = textStyle;\n        }\n        var imageStyle = styles.pointStyles[0].getImage();\n        if (imageStyle &&\n            typeof ( /** @type {?} */(imageStyle).getSrc) === 'function') {\n            properties['IconStyle'] = imageStyle;\n        }\n    }\n    if (styles.lineStyles.length) {\n        var strokeStyle = styles.lineStyles[0].getStroke();\n        if (strokeStyle) {\n            properties['LineStyle'] = strokeStyle;\n        }\n    }\n    if (styles.polyStyles.length) {\n        var strokeStyle = styles.polyStyles[0].getStroke();\n        if (strokeStyle && !properties['LineStyle']) {\n            properties['LineStyle'] = strokeStyle;\n        }\n        properties['PolyStyle'] = styles.polyStyles[0];\n    }\n    var parentNode = objectStack[objectStack.length - 1].node;\n    var orderedKeys = STYLE_SEQUENCE[parentNode.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, STYLE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n/**\n * @param {Element} node Node to append a TextNode with the Vec2 to.\n * @param {Vec2} vec2 Vec2.\n */\nfunction writeVec2(node, vec2) {\n    node.setAttribute('x', String(vec2.x));\n    node.setAttribute('y', String(vec2.y));\n    node.setAttribute('xunits', vec2.xunits);\n    node.setAttribute('yunits', vec2.yunits);\n}\nexport default KML;\n//# sourceMappingURL=KML.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/IGC\n */\nimport Feature from '../Feature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport TextFeature from './TextFeature.js';\nimport { get as getProjection } from '../proj.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * IGC altitude/z. One of 'barometric', 'gps', 'none'.\n * @enum {string}\n */\nvar IGCZ = {\n    BAROMETRIC: 'barometric',\n    GPS: 'gps',\n    NONE: 'none',\n};\n/**\n * @const\n * @type {RegExp}\n */\nvar B_RECORD_RE = /^B(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{5})([NS])(\\d{3})(\\d{5})([EW])([AV])(\\d{5})(\\d{5})/;\n/**\n * @const\n * @type {RegExp}\n */\nvar H_RECORD_RE = /^H.([A-Z]{3}).*?:(.*)/;\n/**\n * @const\n * @type {RegExp}\n */\nvar HFDTE_RECORD_RE = /^HFDTE(\\d{2})(\\d{2})(\\d{2})/;\n/**\n * A regular expression matching the newline characters `\\r\\n`, `\\r` and `\\n`.\n *\n * @const\n * @type {RegExp}\n */\nvar NEWLINE_RE = /\\r\\n|\\r|\\n/;\n/**\n * @typedef {Object} Options\n * @property {IGCZ|string} [altitudeMode='none'] Altitude mode. Possible\n * values are `'barometric'`, `'gps'`, and `'none'`.\n */\n/**\n * @classdesc\n * Feature format for `*.igc` flight recording files.\n *\n * As IGC sources contain a single feature,\n * {@link module:ol/format/IGC~IGC#readFeatures} will return the feature in an\n * array\n *\n * @api\n */\nvar IGC = /** @class */ (function (_super) {\n    __extends(IGC, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function IGC(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection('EPSG:4326');\n        /**\n         * @private\n         * @type {IGCZ}\n         */\n        _this.altitudeMode_ = options.altitudeMode\n            ? options.altitudeMode\n            : IGCZ.NONE;\n        return _this;\n    }\n    /**\n     * @protected\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    IGC.prototype.readFeatureFromText = function (text, opt_options) {\n        var altitudeMode = this.altitudeMode_;\n        var lines = text.split(NEWLINE_RE);\n        /** @type {Object<string, string>} */\n        var properties = {};\n        var flatCoordinates = [];\n        var year = 2000;\n        var month = 0;\n        var day = 1;\n        var lastDateTime = -1;\n        var i, ii;\n        for (i = 0, ii = lines.length; i < ii; ++i) {\n            var line = lines[i];\n            var m = void 0;\n            if (line.charAt(0) == 'B') {\n                m = B_RECORD_RE.exec(line);\n                if (m) {\n                    var hour = parseInt(m[1], 10);\n                    var minute = parseInt(m[2], 10);\n                    var second = parseInt(m[3], 10);\n                    var y = parseInt(m[4], 10) + parseInt(m[5], 10) / 60000;\n                    if (m[6] == 'S') {\n                        y = -y;\n                    }\n                    var x = parseInt(m[7], 10) + parseInt(m[8], 10) / 60000;\n                    if (m[9] == 'W') {\n                        x = -x;\n                    }\n                    flatCoordinates.push(x, y);\n                    if (altitudeMode != IGCZ.NONE) {\n                        var z = void 0;\n                        if (altitudeMode == IGCZ.GPS) {\n                            z = parseInt(m[11], 10);\n                        }\n                        else if (altitudeMode == IGCZ.BAROMETRIC) {\n                            z = parseInt(m[12], 10);\n                        }\n                        else {\n                            z = 0;\n                        }\n                        flatCoordinates.push(z);\n                    }\n                    var dateTime = Date.UTC(year, month, day, hour, minute, second);\n                    // Detect UTC midnight wrap around.\n                    if (dateTime < lastDateTime) {\n                        dateTime = Date.UTC(year, month, day + 1, hour, minute, second);\n                    }\n                    flatCoordinates.push(dateTime / 1000);\n                    lastDateTime = dateTime;\n                }\n            }\n            else if (line.charAt(0) == 'H') {\n                m = HFDTE_RECORD_RE.exec(line);\n                if (m) {\n                    day = parseInt(m[1], 10);\n                    month = parseInt(m[2], 10) - 1;\n                    year = 2000 + parseInt(m[3], 10);\n                }\n                else {\n                    m = H_RECORD_RE.exec(line);\n                    if (m) {\n                        properties[m[1]] = m[2].trim();\n                    }\n                }\n            }\n        }\n        if (flatCoordinates.length === 0) {\n            return null;\n        }\n        var layout = altitudeMode == IGCZ.NONE ? GeometryLayout.XYM : GeometryLayout.XYZM;\n        var lineString = new LineString(flatCoordinates, layout);\n        var feature = new Feature(transformGeometryWithOptions(lineString, false, opt_options));\n        feature.setProperties(properties, true);\n        return feature;\n    };\n    /**\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @protected\n     * @return {Array<Feature>} Features.\n     */\n    IGC.prototype.readFeaturesFromText = function (text, opt_options) {\n        var feature = this.readFeatureFromText(text, opt_options);\n        if (feature) {\n            return [feature];\n        }\n        else {\n            return [];\n        }\n    };\n    return IGC;\n}(TextFeature));\nexport default IGC;\n//# sourceMappingURL=IGC.js.map","/**\n * @module ol/format/XML\n */\nimport { isDocument, parse } from '../xml.js';\n/**\n * @classdesc\n * Generic format for reading non-feature XML data\n *\n * @abstract\n */\nvar XML = /** @class */ (function () {\n    function XML() {\n    }\n    /**\n     * Read the source document.\n     *\n     * @param {Document|Element|string} source The XML source.\n     * @return {Object} An object representing the source.\n     * @api\n     */\n    XML.prototype.read = function (source) {\n        if (!source) {\n            return null;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readFromDocument(doc);\n        }\n        else if (isDocument(source)) {\n            return this.readFromDocument(/** @type {Document} */ (source));\n        }\n        else {\n            return this.readFromNode(/** @type {Element} */ (source));\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {Object} Object\n     */\n    XML.prototype.readFromDocument = function (doc) {\n        for (var n = doc.firstChild; n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                return this.readFromNode(/** @type {Element} */ (n));\n            }\n        }\n        return null;\n    };\n    /**\n     * @abstract\n     * @param {Element} node Node.\n     * @return {Object} Object\n     */\n    XML.prototype.readFromNode = function (node) { };\n    return XML;\n}());\nexport default XML;\n//# sourceMappingURL=XML.js.map","/**\n * @module ol/format/xlink\n */\n/**\n * @const\n * @type {string}\n */\nvar NAMESPACE_URI = 'http://www.w3.org/1999/xlink';\n/**\n * @param {Element} node Node.\n * @return {string|undefined} href.\n */\nexport function readHref(node) {\n    return node.getAttributeNS(NAMESPACE_URI, 'href');\n}\n//# sourceMappingURL=xlink.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/OWS\n */\nimport XML from './XML.js';\nimport { makeObjectPropertyPusher, makeObjectPropertySetter, makeStructureNS, pushParseAndPop, } from '../xml.js';\nimport { readHref } from './xlink.js';\nimport { readString } from './xsd.js';\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [null, 'http://www.opengis.net/ows/1.1'];\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ServiceIdentification': makeObjectPropertySetter(readServiceIdentification),\n    'ServiceProvider': makeObjectPropertySetter(readServiceProvider),\n    'OperationsMetadata': makeObjectPropertySetter(readOperationsMetadata),\n});\nvar OWS = /** @class */ (function (_super) {\n    __extends(OWS, _super);\n    function OWS() {\n        return _super.call(this) || this;\n    }\n    /**\n     * @param {Element} node Node.\n     * @return {Object} Object\n     */\n    OWS.prototype.readFromNode = function (node) {\n        var owsObject = pushParseAndPop({}, PARSERS, node, []);\n        return owsObject ? owsObject : null;\n    };\n    return OWS;\n}(XML));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar ADDRESS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'DeliveryPoint': makeObjectPropertySetter(readString),\n    'City': makeObjectPropertySetter(readString),\n    'AdministrativeArea': makeObjectPropertySetter(readString),\n    'PostalCode': makeObjectPropertySetter(readString),\n    'Country': makeObjectPropertySetter(readString),\n    'ElectronicMailAddress': makeObjectPropertySetter(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar ALLOWED_VALUES_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Value': makeObjectPropertyPusher(readValue),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CONSTRAINT_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'AllowedValues': makeObjectPropertySetter(readAllowedValues),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CONTACT_INFO_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Phone': makeObjectPropertySetter(readPhone),\n    'Address': makeObjectPropertySetter(readAddress),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar DCP_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'HTTP': makeObjectPropertySetter(readHttp),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar HTTP_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Get': makeObjectPropertyPusher(readGet),\n    'Post': undefined, // TODO\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar OPERATION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'DCP': makeObjectPropertySetter(readDcp),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar OPERATIONS_METADATA_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Operation': readOperation,\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PHONE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Voice': makeObjectPropertySetter(readString),\n    'Facsimile': makeObjectPropertySetter(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar REQUEST_METHOD_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Constraint': makeObjectPropertyPusher(readConstraint),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar SERVICE_CONTACT_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'IndividualName': makeObjectPropertySetter(readString),\n    'PositionName': makeObjectPropertySetter(readString),\n    'ContactInfo': makeObjectPropertySetter(readContactInfo),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar SERVICE_IDENTIFICATION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Abstract': makeObjectPropertySetter(readString),\n    'AccessConstraints': makeObjectPropertySetter(readString),\n    'Fees': makeObjectPropertySetter(readString),\n    'Title': makeObjectPropertySetter(readString),\n    'ServiceTypeVersion': makeObjectPropertySetter(readString),\n    'ServiceType': makeObjectPropertySetter(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar SERVICE_PROVIDER_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ProviderName': makeObjectPropertySetter(readString),\n    'ProviderSite': makeObjectPropertySetter(readHref),\n    'ServiceContact': makeObjectPropertySetter(readServiceContact),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The address.\n */\nfunction readAddress(node, objectStack) {\n    return pushParseAndPop({}, ADDRESS_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The values.\n */\nfunction readAllowedValues(node, objectStack) {\n    return pushParseAndPop({}, ALLOWED_VALUES_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The constraint.\n */\nfunction readConstraint(node, objectStack) {\n    var name = node.getAttribute('name');\n    if (!name) {\n        return undefined;\n    }\n    return pushParseAndPop({ 'name': name }, CONSTRAINT_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The contact info.\n */\nfunction readContactInfo(node, objectStack) {\n    return pushParseAndPop({}, CONTACT_INFO_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The DCP.\n */\nfunction readDcp(node, objectStack) {\n    return pushParseAndPop({}, DCP_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The GET object.\n */\nfunction readGet(node, objectStack) {\n    var href = readHref(node);\n    if (!href) {\n        return undefined;\n    }\n    return pushParseAndPop({ 'href': href }, REQUEST_METHOD_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The HTTP object.\n */\nfunction readHttp(node, objectStack) {\n    return pushParseAndPop({}, HTTP_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The operation.\n */\nfunction readOperation(node, objectStack) {\n    var name = node.getAttribute('name');\n    var value = pushParseAndPop({}, OPERATION_PARSERS, node, objectStack);\n    if (!value) {\n        return undefined;\n    }\n    var object = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    object[name] = value;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The operations metadata.\n */\nfunction readOperationsMetadata(node, objectStack) {\n    return pushParseAndPop({}, OPERATIONS_METADATA_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The phone.\n */\nfunction readPhone(node, objectStack) {\n    return pushParseAndPop({}, PHONE_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The service identification.\n */\nfunction readServiceIdentification(node, objectStack) {\n    return pushParseAndPop({}, SERVICE_IDENTIFICATION_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The service contact.\n */\nfunction readServiceContact(node, objectStack) {\n    return pushParseAndPop({}, SERVICE_CONTACT_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The service provider.\n */\nfunction readServiceProvider(node, objectStack) {\n    return pushParseAndPop({}, SERVICE_PROVIDER_PARSERS, node, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {string|undefined} The value.\n */\nfunction readValue(node, objectStack) {\n    return readString(node);\n}\nexport default OWS;\n//# sourceMappingURL=OWS.js.map","/**\n * @module ol/geom/flat/flip\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Array<number>} [opt_dest] Destination.\n * @param {number} [opt_destOffset] Destination offset.\n * @return {Array<number>} Flat coordinates.\n */\nexport function flipXY(flatCoordinates, offset, end, stride, opt_dest, opt_destOffset) {\n    var dest, destOffset;\n    if (opt_dest !== undefined) {\n        dest = opt_dest;\n        destOffset = opt_destOffset !== undefined ? opt_destOffset : 0;\n    }\n    else {\n        dest = [];\n        destOffset = 0;\n    }\n    var j = offset;\n    while (j < end) {\n        var x = flatCoordinates[j++];\n        dest[destOffset++] = flatCoordinates[j++];\n        dest[destOffset++] = x;\n        for (var k = 2; k < stride; ++k) {\n            dest[destOffset++] = flatCoordinates[j++];\n        }\n    }\n    dest.length = destOffset;\n    return dest;\n}\n//# sourceMappingURL=flip.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/Polyline\n */\nimport Feature from '../Feature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport TextFeature from './TextFeature.js';\nimport { assert } from '../asserts.js';\nimport { flipXY } from '../geom/flat/flip.js';\nimport { get as getProjection } from '../proj.js';\nimport { getStrideForLayout } from '../geom/SimpleGeometry.js';\nimport { inflateCoordinates } from '../geom/flat/inflate.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * @typedef {Object} Options\n * @property {number} [factor=1e5] The factor by which the coordinates values will be scaled.\n * @property {GeometryLayout} [geometryLayout='XY'] Layout of the\n * feature geometries created by the format reader.\n */\n/**\n * @classdesc\n * Feature format for reading and writing data in the Encoded\n * Polyline Algorithm Format.\n *\n * When reading features, the coordinates are assumed to be in two dimensions\n * and in [latitude, longitude] order.\n *\n * As Polyline sources contain a single feature,\n * {@link module:ol/format/Polyline~Polyline#readFeatures} will return the\n * feature in an array.\n *\n * @api\n */\nvar Polyline = /** @class */ (function (_super) {\n    __extends(Polyline, _super);\n    /**\n     * @param {Options} [opt_options] Optional configuration object.\n     */\n    function Polyline(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection('EPSG:4326');\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.factor_ = options.factor ? options.factor : 1e5;\n        /**\n         * @private\n         * @type {import(\"../geom/GeometryLayout\").default}\n         */\n        _this.geometryLayout_ = options.geometryLayout\n            ? options.geometryLayout\n            : GeometryLayout.XY;\n        return _this;\n    }\n    /**\n     * @protected\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    Polyline.prototype.readFeatureFromText = function (text, opt_options) {\n        var geometry = this.readGeometryFromText(text, opt_options);\n        return new Feature(geometry);\n    };\n    /**\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @protected\n     * @return {Array<Feature>} Features.\n     */\n    Polyline.prototype.readFeaturesFromText = function (text, opt_options) {\n        var feature = this.readFeatureFromText(text, opt_options);\n        return [feature];\n    };\n    /**\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    Polyline.prototype.readGeometryFromText = function (text, opt_options) {\n        var stride = getStrideForLayout(this.geometryLayout_);\n        var flatCoordinates = decodeDeltas(text, stride, this.factor_);\n        flipXY(flatCoordinates, 0, flatCoordinates.length, stride, flatCoordinates);\n        var coordinates = inflateCoordinates(flatCoordinates, 0, flatCoordinates.length, stride);\n        var lineString = new LineString(coordinates, this.geometryLayout_);\n        return transformGeometryWithOptions(lineString, false, this.adaptOptions(opt_options));\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Features.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    Polyline.prototype.writeFeatureText = function (feature, opt_options) {\n        var geometry = feature.getGeometry();\n        if (geometry) {\n            return this.writeGeometryText(geometry, opt_options);\n        }\n        else {\n            assert(false, 40); // Expected `feature` to have a geometry\n            return '';\n        }\n    };\n    /**\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    Polyline.prototype.writeFeaturesText = function (features, opt_options) {\n        return this.writeFeatureText(features[0], opt_options);\n    };\n    /**\n     * @param {LineString} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    Polyline.prototype.writeGeometryText = function (geometry, opt_options) {\n        geometry =\n            /** @type {LineString} */\n            (transformGeometryWithOptions(geometry, true, this.adaptOptions(opt_options)));\n        var flatCoordinates = geometry.getFlatCoordinates();\n        var stride = geometry.getStride();\n        flipXY(flatCoordinates, 0, flatCoordinates.length, stride, flatCoordinates);\n        return encodeDeltas(flatCoordinates, stride, this.factor_);\n    };\n    return Polyline;\n}(TextFeature));\n/**\n * Encode a list of n-dimensional points and return an encoded string\n *\n * Attention: This function will modify the passed array!\n *\n * @param {Array<number>} numbers A list of n-dimensional points.\n * @param {number} stride The number of dimension of the points in the list.\n * @param {number} [opt_factor] The factor by which the numbers will be\n *     multiplied. The remaining decimal places will get rounded away.\n *     Default is `1e5`.\n * @return {string} The encoded string.\n * @api\n */\nexport function encodeDeltas(numbers, stride, opt_factor) {\n    var factor = opt_factor ? opt_factor : 1e5;\n    var d;\n    var lastNumbers = new Array(stride);\n    for (d = 0; d < stride; ++d) {\n        lastNumbers[d] = 0;\n    }\n    for (var i = 0, ii = numbers.length; i < ii;) {\n        for (d = 0; d < stride; ++d, ++i) {\n            var num = numbers[i];\n            var delta = num - lastNumbers[d];\n            lastNumbers[d] = num;\n            numbers[i] = delta;\n        }\n    }\n    return encodeFloats(numbers, factor);\n}\n/**\n * Decode a list of n-dimensional points from an encoded string\n *\n * @param {string} encoded An encoded string.\n * @param {number} stride The number of dimension of the points in the\n *     encoded string.\n * @param {number} [opt_factor] The factor by which the resulting numbers will\n *     be divided. Default is `1e5`.\n * @return {Array<number>} A list of n-dimensional points.\n * @api\n */\nexport function decodeDeltas(encoded, stride, opt_factor) {\n    var factor = opt_factor ? opt_factor : 1e5;\n    var d;\n    /** @type {Array<number>} */\n    var lastNumbers = new Array(stride);\n    for (d = 0; d < stride; ++d) {\n        lastNumbers[d] = 0;\n    }\n    var numbers = decodeFloats(encoded, factor);\n    for (var i = 0, ii = numbers.length; i < ii;) {\n        for (d = 0; d < stride; ++d, ++i) {\n            lastNumbers[d] += numbers[i];\n            numbers[i] = lastNumbers[d];\n        }\n    }\n    return numbers;\n}\n/**\n * Encode a list of floating point numbers and return an encoded string\n *\n * Attention: This function will modify the passed array!\n *\n * @param {Array<number>} numbers A list of floating point numbers.\n * @param {number} [opt_factor] The factor by which the numbers will be\n *     multiplied. The remaining decimal places will get rounded away.\n *     Default is `1e5`.\n * @return {string} The encoded string.\n * @api\n */\nexport function encodeFloats(numbers, opt_factor) {\n    var factor = opt_factor ? opt_factor : 1e5;\n    for (var i = 0, ii = numbers.length; i < ii; ++i) {\n        numbers[i] = Math.round(numbers[i] * factor);\n    }\n    return encodeSignedIntegers(numbers);\n}\n/**\n * Decode a list of floating point numbers from an encoded string\n *\n * @param {string} encoded An encoded string.\n * @param {number} [opt_factor] The factor by which the result will be divided.\n *     Default is `1e5`.\n * @return {Array<number>} A list of floating point numbers.\n * @api\n */\nexport function decodeFloats(encoded, opt_factor) {\n    var factor = opt_factor ? opt_factor : 1e5;\n    var numbers = decodeSignedIntegers(encoded);\n    for (var i = 0, ii = numbers.length; i < ii; ++i) {\n        numbers[i] /= factor;\n    }\n    return numbers;\n}\n/**\n * Encode a list of signed integers and return an encoded string\n *\n * Attention: This function will modify the passed array!\n *\n * @param {Array<number>} numbers A list of signed integers.\n * @return {string} The encoded string.\n */\nexport function encodeSignedIntegers(numbers) {\n    for (var i = 0, ii = numbers.length; i < ii; ++i) {\n        var num = numbers[i];\n        numbers[i] = num < 0 ? ~(num << 1) : num << 1;\n    }\n    return encodeUnsignedIntegers(numbers);\n}\n/**\n * Decode a list of signed integers from an encoded string\n *\n * @param {string} encoded An encoded string.\n * @return {Array<number>} A list of signed integers.\n */\nexport function decodeSignedIntegers(encoded) {\n    var numbers = decodeUnsignedIntegers(encoded);\n    for (var i = 0, ii = numbers.length; i < ii; ++i) {\n        var num = numbers[i];\n        numbers[i] = num & 1 ? ~(num >> 1) : num >> 1;\n    }\n    return numbers;\n}\n/**\n * Encode a list of unsigned integers and return an encoded string\n *\n * @param {Array<number>} numbers A list of unsigned integers.\n * @return {string} The encoded string.\n */\nexport function encodeUnsignedIntegers(numbers) {\n    var encoded = '';\n    for (var i = 0, ii = numbers.length; i < ii; ++i) {\n        encoded += encodeUnsignedInteger(numbers[i]);\n    }\n    return encoded;\n}\n/**\n * Decode a list of unsigned integers from an encoded string\n *\n * @param {string} encoded An encoded string.\n * @return {Array<number>} A list of unsigned integers.\n */\nexport function decodeUnsignedIntegers(encoded) {\n    var numbers = [];\n    var current = 0;\n    var shift = 0;\n    for (var i = 0, ii = encoded.length; i < ii; ++i) {\n        var b = encoded.charCodeAt(i) - 63;\n        current |= (b & 0x1f) << shift;\n        if (b < 0x20) {\n            numbers.push(current);\n            current = 0;\n            shift = 0;\n        }\n        else {\n            shift += 5;\n        }\n    }\n    return numbers;\n}\n/**\n * Encode one single unsigned integer and return an encoded string\n *\n * @param {number} num Unsigned integer that should be encoded.\n * @return {string} The encoded string.\n */\nexport function encodeUnsignedInteger(num) {\n    var value, encoded = '';\n    while (num >= 0x20) {\n        value = (0x20 | (num & 0x1f)) + 63;\n        encoded += String.fromCharCode(value);\n        num >>= 5;\n    }\n    value = num + 63;\n    encoded += String.fromCharCode(value);\n    return encoded;\n}\nexport default Polyline;\n//# sourceMappingURL=Polyline.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/TopoJSON\n */\nimport Feature from '../Feature.js';\nimport JSONFeature from './JSONFeature.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport { get as getProjection } from '../proj.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * @typedef {import(\"topojson-specification\").Topology} TopoJSONTopology\n * @typedef {import(\"topojson-specification\").GeometryCollection} TopoJSONGeometryCollection\n * @typedef {import(\"topojson-specification\").GeometryObject} TopoJSONGeometry\n * @typedef {import(\"topojson-specification\").Point} TopoJSONPoint\n * @typedef {import(\"topojson-specification\").MultiPoint} TopoJSONMultiPoint\n * @typedef {import(\"topojson-specification\").LineString} TopoJSONLineString\n * @typedef {import(\"topojson-specification\").MultiLineString} TopoJSONMultiLineString\n * @typedef {import(\"topojson-specification\").Polygon} TopoJSONPolygon\n * @typedef {import(\"topojson-specification\").MultiPolygon} TopoJSONMultiPolygon\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection='EPSG:4326'] Default data projection.\n * @property {string} [layerName] Set the name of the TopoJSON topology\n * `objects`'s children as feature property with the specified name. This means\n * that when set to `'layer'`, a topology like\n * ```\n * {\n *   \"type\": \"Topology\",\n *   \"objects\": {\n *     \"example\": {\n *       \"type\": \"GeometryCollection\",\n *       \"geometries\": []\n *     }\n *   }\n * }\n * ```\n * will result in features that have a property `'layer'` set to `'example'`.\n * When not set, no property will be added to features.\n * @property {Array<string>} [layers] Names of the TopoJSON topology's\n * `objects`'s children to read features from.  If not provided, features will\n * be read from all children.\n */\n/**\n * @classdesc\n * Feature format for reading data in the TopoJSON format.\n *\n * @api\n */\nvar TopoJSON = /** @class */ (function (_super) {\n    __extends(TopoJSON, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function TopoJSON(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.layerName_ = options.layerName;\n        /**\n         * @private\n         * @type {?Array<string>}\n         */\n        _this.layers_ = options.layers ? options.layers : null;\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.dataProjection = getProjection(options.dataProjection ? options.dataProjection : 'EPSG:4326');\n        return _this;\n    }\n    /**\n     * @param {Object} object Object.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @protected\n     * @return {Array<Feature>} Features.\n     */\n    TopoJSON.prototype.readFeaturesFromObject = function (object, opt_options) {\n        if (object.type == 'Topology') {\n            var topoJSONTopology = /** @type {TopoJSONTopology} */ (object);\n            var transform = void 0, scale = null, translate = null;\n            if (topoJSONTopology['transform']) {\n                transform = topoJSONTopology['transform'];\n                scale = transform['scale'];\n                translate = transform['translate'];\n            }\n            var arcs = topoJSONTopology['arcs'];\n            if (transform) {\n                transformArcs(arcs, scale, translate);\n            }\n            /** @type {Array<Feature>} */\n            var features = [];\n            var topoJSONFeatures = topoJSONTopology['objects'];\n            var property = this.layerName_;\n            var feature = void 0;\n            for (var objectName in topoJSONFeatures) {\n                if (this.layers_ && this.layers_.indexOf(objectName) == -1) {\n                    continue;\n                }\n                if (topoJSONFeatures[objectName].type === 'GeometryCollection') {\n                    feature = /** @type {TopoJSONGeometryCollection} */ (topoJSONFeatures[objectName]);\n                    features.push.apply(features, readFeaturesFromGeometryCollection(feature, arcs, scale, translate, property, objectName, opt_options));\n                }\n                else {\n                    feature = /** @type {TopoJSONGeometry} */ (topoJSONFeatures[objectName]);\n                    features.push(readFeatureFromGeometry(feature, arcs, scale, translate, property, objectName, opt_options));\n                }\n            }\n            return features;\n        }\n        else {\n            return [];\n        }\n    };\n    /**\n     * @param {Object} object Object.\n     * @protected\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    TopoJSON.prototype.readProjectionFromObject = function (object) {\n        return this.dataProjection;\n    };\n    return TopoJSON;\n}(JSONFeature));\n/**\n * @const\n * @type {Object<string, function(TopoJSONGeometry, Array, ...Array=): import(\"../geom/Geometry.js\").default>}\n */\nvar GEOMETRY_READERS = {\n    'Point': readPointGeometry,\n    'LineString': readLineStringGeometry,\n    'Polygon': readPolygonGeometry,\n    'MultiPoint': readMultiPointGeometry,\n    'MultiLineString': readMultiLineStringGeometry,\n    'MultiPolygon': readMultiPolygonGeometry,\n};\n/**\n * Concatenate arcs into a coordinate array.\n * @param {Array<number>} indices Indices of arcs to concatenate.  Negative\n *     values indicate arcs need to be reversed.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs (already\n *     transformed).\n * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates array.\n */\nfunction concatenateArcs(indices, arcs) {\n    /** @type {Array<import(\"../coordinate.js\").Coordinate>} */\n    var coordinates = [];\n    var index, arc;\n    for (var i = 0, ii = indices.length; i < ii; ++i) {\n        index = indices[i];\n        if (i > 0) {\n            // splicing together arcs, discard last point\n            coordinates.pop();\n        }\n        if (index >= 0) {\n            // forward arc\n            arc = arcs[index];\n        }\n        else {\n            // reverse arc\n            arc = arcs[~index].slice().reverse();\n        }\n        coordinates.push.apply(coordinates, arc);\n    }\n    // provide fresh copies of coordinate arrays\n    for (var j = 0, jj = coordinates.length; j < jj; ++j) {\n        coordinates[j] = coordinates[j].slice();\n    }\n    return coordinates;\n}\n/**\n * Create a point from a TopoJSON geometry object.\n *\n * @param {TopoJSONPoint} object TopoJSON object.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n * @return {Point} Geometry.\n */\nfunction readPointGeometry(object, scale, translate) {\n    var coordinates = object['coordinates'];\n    if (scale && translate) {\n        transformVertex(coordinates, scale, translate);\n    }\n    return new Point(coordinates);\n}\n/**\n * Create a multi-point from a TopoJSON geometry object.\n *\n * @param {TopoJSONMultiPoint} object TopoJSON object.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n * @return {MultiPoint} Geometry.\n */\nfunction readMultiPointGeometry(object, scale, translate) {\n    var coordinates = object['coordinates'];\n    if (scale && translate) {\n        for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n            transformVertex(coordinates[i], scale, translate);\n        }\n    }\n    return new MultiPoint(coordinates);\n}\n/**\n * Create a linestring from a TopoJSON geometry object.\n *\n * @param {TopoJSONLineString} object TopoJSON object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @return {LineString} Geometry.\n */\nfunction readLineStringGeometry(object, arcs) {\n    var coordinates = concatenateArcs(object['arcs'], arcs);\n    return new LineString(coordinates);\n}\n/**\n * Create a multi-linestring from a TopoJSON geometry object.\n *\n * @param {TopoJSONMultiLineString} object TopoJSON object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @return {MultiLineString} Geometry.\n */\nfunction readMultiLineStringGeometry(object, arcs) {\n    var coordinates = [];\n    for (var i = 0, ii = object['arcs'].length; i < ii; ++i) {\n        coordinates[i] = concatenateArcs(object['arcs'][i], arcs);\n    }\n    return new MultiLineString(coordinates);\n}\n/**\n * Create a polygon from a TopoJSON geometry object.\n *\n * @param {TopoJSONPolygon} object TopoJSON object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @return {Polygon} Geometry.\n */\nfunction readPolygonGeometry(object, arcs) {\n    var coordinates = [];\n    for (var i = 0, ii = object['arcs'].length; i < ii; ++i) {\n        coordinates[i] = concatenateArcs(object['arcs'][i], arcs);\n    }\n    return new Polygon(coordinates);\n}\n/**\n * Create a multi-polygon from a TopoJSON geometry object.\n *\n * @param {TopoJSONMultiPolygon} object TopoJSON object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @return {MultiPolygon} Geometry.\n */\nfunction readMultiPolygonGeometry(object, arcs) {\n    var coordinates = [];\n    for (var i = 0, ii = object['arcs'].length; i < ii; ++i) {\n        // for each polygon\n        var polyArray = object['arcs'][i];\n        var ringCoords = [];\n        for (var j = 0, jj = polyArray.length; j < jj; ++j) {\n            // for each ring\n            ringCoords[j] = concatenateArcs(polyArray[j], arcs);\n        }\n        coordinates[i] = ringCoords;\n    }\n    return new MultiPolygon(coordinates);\n}\n/**\n * Create features from a TopoJSON GeometryCollection object.\n *\n * @param {TopoJSONGeometryCollection} collection TopoJSON Geometry\n *     object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n * @param {string|undefined} property Property to set the `GeometryCollection`'s parent\n *     object to.\n * @param {string} name Name of the `Topology`'s child object.\n * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n * @return {Array<Feature>} Array of features.\n */\nfunction readFeaturesFromGeometryCollection(collection, arcs, scale, translate, property, name, opt_options) {\n    var geometries = collection['geometries'];\n    var features = [];\n    for (var i = 0, ii = geometries.length; i < ii; ++i) {\n        features[i] = readFeatureFromGeometry(geometries[i], arcs, scale, translate, property, name, opt_options);\n    }\n    return features;\n}\n/**\n * Create a feature from a TopoJSON geometry object.\n *\n * @param {TopoJSONGeometry} object TopoJSON geometry object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n * @param {string|undefined} property Property to set the `GeometryCollection`'s parent\n *     object to.\n * @param {string} name Name of the `Topology`'s child object.\n * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n * @return {Feature} Feature.\n */\nfunction readFeatureFromGeometry(object, arcs, scale, translate, property, name, opt_options) {\n    var geometry = null;\n    var type = object.type;\n    if (type) {\n        var geometryReader = GEOMETRY_READERS[type];\n        if (type === 'Point' || type === 'MultiPoint') {\n            geometry = geometryReader(object, scale, translate);\n        }\n        else {\n            geometry = geometryReader(object, arcs);\n        }\n        geometry = transformGeometryWithOptions(geometry, false, opt_options);\n    }\n    var feature = new Feature({ geometry: geometry });\n    if (object.id !== undefined) {\n        feature.setId(object.id);\n    }\n    var properties = object.properties;\n    if (property) {\n        if (!properties) {\n            properties = {};\n        }\n        properties[property] = name;\n    }\n    if (properties) {\n        feature.setProperties(properties, true);\n    }\n    return feature;\n}\n/**\n * Apply a linear transform to array of arcs.  The provided array of arcs is\n * modified in place.\n *\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n */\nfunction transformArcs(arcs, scale, translate) {\n    for (var i = 0, ii = arcs.length; i < ii; ++i) {\n        transformArc(arcs[i], scale, translate);\n    }\n}\n/**\n * Apply a linear transform to an arc.  The provided arc is modified in place.\n *\n * @param {Array<import(\"../coordinate.js\").Coordinate>} arc Arc.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n */\nfunction transformArc(arc, scale, translate) {\n    var x = 0;\n    var y = 0;\n    for (var i = 0, ii = arc.length; i < ii; ++i) {\n        var vertex = arc[i];\n        x += vertex[0];\n        y += vertex[1];\n        vertex[0] = x;\n        vertex[1] = y;\n        transformVertex(vertex, scale, translate);\n    }\n}\n/**\n * Apply a linear transform to a vertex.  The provided vertex is modified in\n * place.\n *\n * @param {import(\"../coordinate.js\").Coordinate} vertex Vertex.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n */\nfunction transformVertex(vertex, scale, translate) {\n    vertex[0] = vertex[0] * scale[0] + translate[0];\n    vertex[1] = vertex[1] * scale[1] + translate[1];\n}\nexport default TopoJSON;\n//# sourceMappingURL=TopoJSON.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/GML32\n */\nimport GML2 from './GML2.js';\nimport GML3 from './GML3.js';\nimport GMLBase from './GMLBase.js';\nimport { makeArrayPusher, makeChildAppender, makeReplacer } from '../xml.js';\nimport { writeStringTextNode } from '../format/xsd.js';\n/**\n * @classdesc Feature format for reading and writing data in the GML format\n *            version 3.2.1.\n * @api\n */\nvar GML32 = /** @class */ (function (_super) {\n    __extends(GML32, _super);\n    /**\n     * @param {import(\"./GMLBase.js\").Options} [opt_options] Optional configuration object.\n     */\n    function GML32(opt_options) {\n        var _this = this;\n        var options = /** @type {import(\"./GMLBase.js\").Options} */ (opt_options ? opt_options : {});\n        _this = _super.call(this, options) || this;\n        /**\n         * @type {string}\n         */\n        _this.schemaLocation = options.schemaLocation\n            ? options.schemaLocation\n            : _this.namespace + ' http://schemas.opengis.net/gml/3.2.1/gml.xsd';\n        return _this;\n    }\n    return GML32;\n}(GML3));\nGML32.prototype.namespace = 'http://www.opengis.net/gml/3.2';\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'pos': makeReplacer(GML3.prototype.readFlatPos),\n        'posList': makeReplacer(GML3.prototype.readFlatPosList),\n        'coordinates': makeReplacer(GML2.prototype.readFlatCoordinates),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.FLAT_LINEAR_RINGS_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'interior': GML3.prototype.interiorParser,\n        'exterior': GML3.prototype.exteriorParser,\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.GEOMETRY_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'Point': makeReplacer(GMLBase.prototype.readPoint),\n        'MultiPoint': makeReplacer(GMLBase.prototype.readMultiPoint),\n        'LineString': makeReplacer(GMLBase.prototype.readLineString),\n        'MultiLineString': makeReplacer(GMLBase.prototype.readMultiLineString),\n        'LinearRing': makeReplacer(GMLBase.prototype.readLinearRing),\n        'Polygon': makeReplacer(GMLBase.prototype.readPolygon),\n        'MultiPolygon': makeReplacer(GMLBase.prototype.readMultiPolygon),\n        'Surface': makeReplacer(GML32.prototype.readSurface),\n        'MultiSurface': makeReplacer(GML3.prototype.readMultiSurface),\n        'Curve': makeReplacer(GML32.prototype.readCurve),\n        'MultiCurve': makeReplacer(GML3.prototype.readMultiCurve),\n        'Envelope': makeReplacer(GML32.prototype.readEnvelope),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.MULTICURVE_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'curveMember': makeArrayPusher(GML3.prototype.curveMemberParser),\n        'curveMembers': makeArrayPusher(GML3.prototype.curveMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.MULTISURFACE_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'surfaceMember': makeArrayPusher(GML3.prototype.surfaceMemberParser),\n        'surfaceMembers': makeArrayPusher(GML3.prototype.surfaceMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.CURVEMEMBER_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'LineString': makeArrayPusher(GMLBase.prototype.readLineString),\n        'Curve': makeArrayPusher(GML3.prototype.readCurve),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.SURFACEMEMBER_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'Polygon': makeArrayPusher(GMLBase.prototype.readPolygon),\n        'Surface': makeArrayPusher(GML3.prototype.readSurface),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.SURFACE_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'patches': makeReplacer(GML3.prototype.readPatch),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.CURVE_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'segments': makeReplacer(GML3.prototype.readSegment),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.ENVELOPE_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'lowerCorner': makeArrayPusher(GML3.prototype.readFlatPosList),\n        'upperCorner': makeArrayPusher(GML3.prototype.readFlatPosList),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.PATCHES_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'PolygonPatch': makeReplacer(GML3.prototype.readPolygonPatch),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.SEGMENTS_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'LineStringSegment': makeReplacer(GML3.prototype.readLineStringSegment),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.MULTIPOINT_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'pointMember': makeArrayPusher(GMLBase.prototype.pointMemberParser),\n        'pointMembers': makeArrayPusher(GMLBase.prototype.pointMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.MULTILINESTRING_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'lineStringMember': makeArrayPusher(GMLBase.prototype.lineStringMemberParser),\n        'lineStringMembers': makeArrayPusher(GMLBase.prototype.lineStringMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.MULTIPOLYGON_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'polygonMember': makeArrayPusher(GMLBase.prototype.polygonMemberParser),\n        'polygonMembers': makeArrayPusher(GMLBase.prototype.polygonMemberParser),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.POINTMEMBER_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'Point': makeArrayPusher(GMLBase.prototype.readFlatCoordinatesFromNode),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.LINESTRINGMEMBER_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'LineString': makeArrayPusher(GMLBase.prototype.readLineString),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.POLYGONMEMBER_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'Polygon': makeArrayPusher(GMLBase.prototype.readPolygon),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nGML32.prototype.RING_PARSERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'LinearRing': makeReplacer(GMLBase.prototype.readFlatLinearRing),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML32.prototype.RING_SERIALIZERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'exterior': makeChildAppender(GML3.prototype.writeRing),\n        'interior': makeChildAppender(GML3.prototype.writeRing),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML32.prototype.ENVELOPE_SERIALIZERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'lowerCorner': makeChildAppender(writeStringTextNode),\n        'upperCorner': makeChildAppender(writeStringTextNode),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML32.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'surfaceMember': makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember),\n        'polygonMember': makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML32.prototype.POINTMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'pointMember': makeChildAppender(GML3.prototype.writePointMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML32.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'lineStringMember': makeChildAppender(GML3.prototype.writeLineStringOrCurveMember),\n        'curveMember': makeChildAppender(GML3.prototype.writeLineStringOrCurveMember),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nGML32.prototype.GEOMETRY_SERIALIZERS = {\n    'http://www.opengis.net/gml/3.2': {\n        'Curve': makeChildAppender(GML3.prototype.writeCurveOrLineString),\n        'MultiCurve': makeChildAppender(GML3.prototype.writeMultiCurveOrLineString),\n        'Point': makeChildAppender(GML32.prototype.writePoint),\n        'MultiPoint': makeChildAppender(GML3.prototype.writeMultiPoint),\n        'LineString': makeChildAppender(GML3.prototype.writeCurveOrLineString),\n        'MultiLineString': makeChildAppender(GML3.prototype.writeMultiCurveOrLineString),\n        'LinearRing': makeChildAppender(GML3.prototype.writeLinearRing),\n        'Polygon': makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),\n        'MultiPolygon': makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),\n        'Surface': makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),\n        'MultiSurface': makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),\n        'Envelope': makeChildAppender(GML3.prototype.writeEnvelope),\n    },\n};\nexport default GML32;\n//# sourceMappingURL=GML32.js.map","/**\n * @module ol/format/filter/Filter\n */\n/**\n * @classdesc\n * Abstract class; normally only used for creating subclasses and not instantiated in apps.\n * Base class for WFS GetFeature filters.\n *\n * @abstract\n */\nvar Filter = /** @class */ (function () {\n    /**\n     * @param {!string} tagName The XML tag name for this filter.\n     */\n    function Filter(tagName) {\n        /**\n         * @private\n         * @type {!string}\n         */\n        this.tagName_ = tagName;\n    }\n    /**\n     * The XML tag name for a filter.\n     * @return {!string} Name.\n     */\n    Filter.prototype.getTagName = function () {\n        return this.tagName_;\n    };\n    return Filter;\n}());\nexport default Filter;\n//# sourceMappingURL=Filter.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/LogicalNary\n */\nimport Filter from './Filter.js';\nimport { assert } from '../../asserts.js';\n/**\n * @classdesc\n * Abstract class; normally only used for creating subclasses and not instantiated in apps.\n * Base class for WFS GetFeature n-ary logical filters.\n *\n * @abstract\n */\nvar LogicalNary = /** @class */ (function (_super) {\n    __extends(LogicalNary, _super);\n    /**\n     * @param {!string} tagName The XML tag name for this filter.\n     * @param {Array<import(\"./Filter.js\").default>} conditions Conditions.\n     */\n    function LogicalNary(tagName, conditions) {\n        var _this = _super.call(this, tagName) || this;\n        /**\n         * @type {Array<import(\"./Filter.js\").default>}\n         */\n        _this.conditions = conditions;\n        assert(_this.conditions.length >= 2, 57); // At least 2 conditions are required.\n        return _this;\n    }\n    return LogicalNary;\n}(Filter));\nexport default LogicalNary;\n//# sourceMappingURL=LogicalNary.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/And\n */\nimport LogicalNary from './LogicalNary.js';\n/**\n * @classdesc\n * Represents a logical `<And>` operator between two or more filter conditions.\n *\n * @abstract\n */\nvar And = /** @class */ (function (_super) {\n    __extends(And, _super);\n    /**\n     * @param {...import(\"./Filter.js\").default} conditions Conditions.\n     */\n    function And(conditions) {\n        return _super.call(this, 'And', Array.prototype.slice.call(arguments)) || this;\n    }\n    return And;\n}(LogicalNary));\nexport default And;\n//# sourceMappingURL=And.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Bbox\n */\nimport Filter from './Filter.js';\n/**\n * @classdesc\n * Represents a `<BBOX>` operator to test whether a geometry-valued property\n * intersects a fixed bounding box\n *\n * @api\n */\nvar Bbox = /** @class */ (function (_super) {\n    __extends(Bbox, _super);\n    /**\n     * @param {!string} geometryName Geometry name to use.\n     * @param {!import(\"../../extent.js\").Extent} extent Extent.\n     * @param {string} [opt_srsName] SRS name. No srsName attribute will be set\n     * on geometries when this is not provided.\n     */\n    function Bbox(geometryName, extent, opt_srsName) {\n        var _this = _super.call(this, 'BBOX') || this;\n        /**\n         * @type {!string}\n         */\n        _this.geometryName = geometryName;\n        /**\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.extent = extent;\n        if (extent.length !== 4) {\n            throw new Error('Expected an extent with four values ([minX, minY, maxX, maxY])');\n        }\n        /**\n         * @type {string|undefined}\n         */\n        _this.srsName = opt_srsName;\n        return _this;\n    }\n    return Bbox;\n}(Filter));\nexport default Bbox;\n//# sourceMappingURL=Bbox.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Spatial\n */\nimport Filter from './Filter.js';\n/**\n * @classdesc\n * Abstract class; normally only used for creating subclasses and not instantiated in apps.\n * Represents a spatial operator to test whether a geometry-valued property\n * relates to a given geometry.\n *\n * @abstract\n */\nvar Spatial = /** @class */ (function (_super) {\n    __extends(Spatial, _super);\n    /**\n     * @param {!string} tagName The XML tag name for this filter.\n     * @param {!string} geometryName Geometry name to use.\n     * @param {!import(\"../../geom/Geometry.js\").default} geometry Geometry.\n     * @param {string} [opt_srsName] SRS name. No srsName attribute will be\n     *    set on geometries when this is not provided.\n     */\n    function Spatial(tagName, geometryName, geometry, opt_srsName) {\n        var _this = _super.call(this, tagName) || this;\n        /**\n         * @type {!string}\n         */\n        _this.geometryName = geometryName || 'the_geom';\n        /**\n         * @type {import(\"../../geom/Geometry.js\").default}\n         */\n        _this.geometry = geometry;\n        /**\n         * @type {string|undefined}\n         */\n        _this.srsName = opt_srsName;\n        return _this;\n    }\n    return Spatial;\n}(Filter));\nexport default Spatial;\n//# sourceMappingURL=Spatial.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Contains\n */\nimport Spatial from './Spatial.js';\n/**\n * @classdesc\n * Represents a `<Contains>` operator to test whether a geometry-valued property\n * contains a given geometry.\n * @api\n */\nvar Contains = /** @class */ (function (_super) {\n    __extends(Contains, _super);\n    /**\n     * @param {!string} geometryName Geometry name to use.\n     * @param {!import(\"../../geom/Geometry.js\").default} geometry Geometry.\n     * @param {string} [opt_srsName] SRS name. No srsName attribute will be\n     *    set on geometries when this is not provided.\n     */\n    function Contains(geometryName, geometry, opt_srsName) {\n        return _super.call(this, 'Contains', geometryName, geometry, opt_srsName) || this;\n    }\n    return Contains;\n}(Spatial));\nexport default Contains;\n//# sourceMappingURL=Contains.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/DWithin\n */\nimport Spatial from './Spatial.js';\n/**\n * @classdesc\n * Represents a `<DWithin>` operator to test whether a geometry-valued property\n * is within a distance to a given geometry.\n * @api\n */\nvar DWithin = /** @class */ (function (_super) {\n    __extends(DWithin, _super);\n    /**\n     * @param {!string} geometryName Geometry name to use.\n     * @param {!import(\"../../geom/Geometry.js\").default} geometry Geometry.\n     * @param {!number} distance Distance.\n     * @param {!string} unit Unit.\n     * @param {string} [opt_srsName] SRS name. No srsName attribute will be\n     *    set on geometries when this is not provided.\n     */\n    function DWithin(geometryName, geometry, distance, unit, opt_srsName) {\n        var _this = _super.call(this, 'DWithin', geometryName, geometry, opt_srsName) || this;\n        /**\n         * @public\n         * @type {!number}\n         */\n        _this.distance = distance;\n        /**\n         * @public\n         * @type {!string}\n         */\n        _this.unit = unit;\n        return _this;\n    }\n    return DWithin;\n}(Spatial));\nexport default DWithin;\n//# sourceMappingURL=DWithin.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Disjoint\n */\nimport Spatial from './Spatial.js';\n/**\n * @classdesc\n * Represents a `<Disjoint>` operator to test whether a geometry-valued property\n * is disjoint to a given geometry.\n * @api\n */\nvar Disjoint = /** @class */ (function (_super) {\n    __extends(Disjoint, _super);\n    /**\n     * @param {!string} geometryName Geometry name to use.\n     * @param {!import(\"../../geom/Geometry.js\").default} geometry Geometry.\n     * @param {string} [opt_srsName] SRS name. No srsName attribute will be\n     *    set on geometries when this is not provided.\n     */\n    function Disjoint(geometryName, geometry, opt_srsName) {\n        return _super.call(this, 'Disjoint', geometryName, geometry, opt_srsName) || this;\n    }\n    return Disjoint;\n}(Spatial));\nexport default Disjoint;\n//# sourceMappingURL=Disjoint.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Comparison\n */\nimport Filter from './Filter.js';\n/**\n * @classdesc\n * Abstract class; normally only used for creating subclasses and not instantiated in apps.\n * Base class for WFS GetFeature property comparison filters.\n *\n * @abstract\n */\nvar Comparison = /** @class */ (function (_super) {\n    __extends(Comparison, _super);\n    /**\n     * @param {!string} tagName The XML tag name for this filter.\n     * @param {!string} propertyName Name of the context property to compare.\n     */\n    function Comparison(tagName, propertyName) {\n        var _this = _super.call(this, tagName) || this;\n        /**\n         * @type {!string}\n         */\n        _this.propertyName = propertyName;\n        return _this;\n    }\n    return Comparison;\n}(Filter));\nexport default Comparison;\n//# sourceMappingURL=Comparison.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/During\n */\nimport Comparison from './Comparison.js';\n/**\n * @classdesc\n * Represents a `<During>` comparison operator.\n * @api\n */\nvar During = /** @class */ (function (_super) {\n    __extends(During, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!string} begin The begin date in ISO-8601 format.\n     * @param {!string} end The end date in ISO-8601 format.\n     */\n    function During(propertyName, begin, end) {\n        var _this = _super.call(this, 'During', propertyName) || this;\n        /**\n         * @type {!string}\n         */\n        _this.begin = begin;\n        /**\n         * @type {!string}\n         */\n        _this.end = end;\n        return _this;\n    }\n    return During;\n}(Comparison));\nexport default During;\n//# sourceMappingURL=During.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/ComparisonBinary\n */\nimport Comparison from './Comparison.js';\n/**\n * @classdesc\n * Abstract class; normally only used for creating subclasses and not instantiated in apps.\n * Base class for WFS GetFeature property binary comparison filters.\n *\n * @abstract\n */\nvar ComparisonBinary = /** @class */ (function (_super) {\n    __extends(ComparisonBinary, _super);\n    /**\n     * @param {!string} tagName The XML tag name for this filter.\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!(string|number)} expression The value to compare.\n     * @param {boolean} [opt_matchCase] Case-sensitive?\n     */\n    function ComparisonBinary(tagName, propertyName, expression, opt_matchCase) {\n        var _this = _super.call(this, tagName, propertyName) || this;\n        /**\n         * @type {!(string|number)}\n         */\n        _this.expression = expression;\n        /**\n         * @type {boolean|undefined}\n         */\n        _this.matchCase = opt_matchCase;\n        return _this;\n    }\n    return ComparisonBinary;\n}(Comparison));\nexport default ComparisonBinary;\n//# sourceMappingURL=ComparisonBinary.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/EqualTo\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsEqualTo>` comparison operator.\n * @api\n */\nvar EqualTo = /** @class */ (function (_super) {\n    __extends(EqualTo, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!(string|number)} expression The value to compare.\n     * @param {boolean} [opt_matchCase] Case-sensitive?\n     */\n    function EqualTo(propertyName, expression, opt_matchCase) {\n        return _super.call(this, 'PropertyIsEqualTo', propertyName, expression, opt_matchCase) || this;\n    }\n    return EqualTo;\n}(ComparisonBinary));\nexport default EqualTo;\n//# sourceMappingURL=EqualTo.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/GreaterThan\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsGreaterThan>` comparison operator.\n * @api\n */\nvar GreaterThan = /** @class */ (function (_super) {\n    __extends(GreaterThan, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!number} expression The value to compare.\n     */\n    function GreaterThan(propertyName, expression) {\n        return _super.call(this, 'PropertyIsGreaterThan', propertyName, expression) || this;\n    }\n    return GreaterThan;\n}(ComparisonBinary));\nexport default GreaterThan;\n//# sourceMappingURL=GreaterThan.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/GreaterThanOrEqualTo\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsGreaterThanOrEqualTo>` comparison operator.\n * @api\n */\nvar GreaterThanOrEqualTo = /** @class */ (function (_super) {\n    __extends(GreaterThanOrEqualTo, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!number} expression The value to compare.\n     */\n    function GreaterThanOrEqualTo(propertyName, expression) {\n        return _super.call(this, 'PropertyIsGreaterThanOrEqualTo', propertyName, expression) || this;\n    }\n    return GreaterThanOrEqualTo;\n}(ComparisonBinary));\nexport default GreaterThanOrEqualTo;\n//# sourceMappingURL=GreaterThanOrEqualTo.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Intersects\n */\nimport Spatial from './Spatial.js';\n/**\n * @classdesc\n * Represents a `<Intersects>` operator to test whether a geometry-valued property\n * intersects a given geometry.\n * @api\n */\nvar Intersects = /** @class */ (function (_super) {\n    __extends(Intersects, _super);\n    /**\n     * @param {!string} geometryName Geometry name to use.\n     * @param {!import(\"../../geom/Geometry.js\").default} geometry Geometry.\n     * @param {string} [opt_srsName] SRS name. No srsName attribute will be\n     *    set on geometries when this is not provided.\n     */\n    function Intersects(geometryName, geometry, opt_srsName) {\n        return _super.call(this, 'Intersects', geometryName, geometry, opt_srsName) || this;\n    }\n    return Intersects;\n}(Spatial));\nexport default Intersects;\n//# sourceMappingURL=Intersects.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/IsBetween\n */\nimport Comparison from './Comparison.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsBetween>` comparison operator.\n * @api\n */\nvar IsBetween = /** @class */ (function (_super) {\n    __extends(IsBetween, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!number} lowerBoundary The lower bound of the range.\n     * @param {!number} upperBoundary The upper bound of the range.\n     */\n    function IsBetween(propertyName, lowerBoundary, upperBoundary) {\n        var _this = _super.call(this, 'PropertyIsBetween', propertyName) || this;\n        /**\n         * @type {!number}\n         */\n        _this.lowerBoundary = lowerBoundary;\n        /**\n         * @type {!number}\n         */\n        _this.upperBoundary = upperBoundary;\n        return _this;\n    }\n    return IsBetween;\n}(Comparison));\nexport default IsBetween;\n//# sourceMappingURL=IsBetween.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/IsLike\n */\nimport Comparison from './Comparison.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsLike>` comparison operator.\n * @api\n */\nvar IsLike = /** @class */ (function (_super) {\n    __extends(IsLike, _super);\n    /**\n     * [constructor description]\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!string} pattern Text pattern.\n     * @param {string} [opt_wildCard] Pattern character which matches any sequence of\n     *    zero or more string characters. Default is '*'.\n     * @param {string} [opt_singleChar] pattern character which matches any single\n     *    string character. Default is '.'.\n     * @param {string} [opt_escapeChar] Escape character which can be used to escape\n     *    the pattern characters. Default is '!'.\n     * @param {boolean} [opt_matchCase] Case-sensitive?\n     */\n    function IsLike(propertyName, pattern, opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase) {\n        var _this = _super.call(this, 'PropertyIsLike', propertyName) || this;\n        /**\n         * @type {!string}\n         */\n        _this.pattern = pattern;\n        /**\n         * @type {!string}\n         */\n        _this.wildCard = opt_wildCard !== undefined ? opt_wildCard : '*';\n        /**\n         * @type {!string}\n         */\n        _this.singleChar = opt_singleChar !== undefined ? opt_singleChar : '.';\n        /**\n         * @type {!string}\n         */\n        _this.escapeChar = opt_escapeChar !== undefined ? opt_escapeChar : '!';\n        /**\n         * @type {boolean|undefined}\n         */\n        _this.matchCase = opt_matchCase;\n        return _this;\n    }\n    return IsLike;\n}(Comparison));\nexport default IsLike;\n//# sourceMappingURL=IsLike.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/IsNull\n */\nimport Comparison from './Comparison.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsNull>` comparison operator.\n * @api\n */\nvar IsNull = /** @class */ (function (_super) {\n    __extends(IsNull, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     */\n    function IsNull(propertyName) {\n        return _super.call(this, 'PropertyIsNull', propertyName) || this;\n    }\n    return IsNull;\n}(Comparison));\nexport default IsNull;\n//# sourceMappingURL=IsNull.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/LessThan\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsLessThan>` comparison operator.\n * @api\n */\nvar LessThan = /** @class */ (function (_super) {\n    __extends(LessThan, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!number} expression The value to compare.\n     */\n    function LessThan(propertyName, expression) {\n        return _super.call(this, 'PropertyIsLessThan', propertyName, expression) || this;\n    }\n    return LessThan;\n}(ComparisonBinary));\nexport default LessThan;\n//# sourceMappingURL=LessThan.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/LessThanOrEqualTo\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsLessThanOrEqualTo>` comparison operator.\n * @api\n */\nvar LessThanOrEqualTo = /** @class */ (function (_super) {\n    __extends(LessThanOrEqualTo, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!number} expression The value to compare.\n     */\n    function LessThanOrEqualTo(propertyName, expression) {\n        return _super.call(this, 'PropertyIsLessThanOrEqualTo', propertyName, expression) || this;\n    }\n    return LessThanOrEqualTo;\n}(ComparisonBinary));\nexport default LessThanOrEqualTo;\n//# sourceMappingURL=LessThanOrEqualTo.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Not\n */\nimport Filter from './Filter.js';\n/**\n * @classdesc\n * Represents a logical `<Not>` operator for a filter condition.\n * @api\n */\nvar Not = /** @class */ (function (_super) {\n    __extends(Not, _super);\n    /**\n     * @param {!import(\"./Filter.js\").default} condition Filter condition.\n     */\n    function Not(condition) {\n        var _this = _super.call(this, 'Not') || this;\n        /**\n         * @type {!import(\"./Filter.js\").default}\n         */\n        _this.condition = condition;\n        return _this;\n    }\n    return Not;\n}(Filter));\nexport default Not;\n//# sourceMappingURL=Not.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/NotEqualTo\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n/**\n * @classdesc\n * Represents a `<PropertyIsNotEqualTo>` comparison operator.\n * @api\n */\nvar NotEqualTo = /** @class */ (function (_super) {\n    __extends(NotEqualTo, _super);\n    /**\n     * @param {!string} propertyName Name of the context property to compare.\n     * @param {!(string|number)} expression The value to compare.\n     * @param {boolean} [opt_matchCase] Case-sensitive?\n     */\n    function NotEqualTo(propertyName, expression, opt_matchCase) {\n        return _super.call(this, 'PropertyIsNotEqualTo', propertyName, expression, opt_matchCase) || this;\n    }\n    return NotEqualTo;\n}(ComparisonBinary));\nexport default NotEqualTo;\n//# sourceMappingURL=NotEqualTo.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Or\n */\nimport LogicalNary from './LogicalNary.js';\n/**\n * @classdesc\n * Represents a logical `<Or>` operator between two ore more filter conditions.\n * @api\n */\nvar Or = /** @class */ (function (_super) {\n    __extends(Or, _super);\n    /**\n     * @param {...import(\"./Filter.js\").default} conditions Conditions.\n     */\n    function Or(conditions) {\n        return _super.call(this, 'Or', Array.prototype.slice.call(arguments)) || this;\n    }\n    return Or;\n}(LogicalNary));\nexport default Or;\n//# sourceMappingURL=Or.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/ResourceId\n */\nimport Filter from './Filter.js';\n/**\n * @classdesc\n *\n * @abstract\n */\nvar ResourceId = /** @class */ (function (_super) {\n    __extends(ResourceId, _super);\n    /**\n     * @param {!string} rid Resource ID.\n     */\n    function ResourceId(rid) {\n        var _this = _super.call(this, 'ResourceId') || this;\n        /**\n         * @type {!string}\n         */\n        _this.rid = rid;\n        return _this;\n    }\n    return ResourceId;\n}(Filter));\nexport default ResourceId;\n//# sourceMappingURL=ResourceId.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/filter/Within\n */\nimport Spatial from './Spatial.js';\n/**\n * @classdesc\n * Represents a `<Within>` operator to test whether a geometry-valued property\n * is within a given geometry.\n * @api\n */\nvar Within = /** @class */ (function (_super) {\n    __extends(Within, _super);\n    /**\n     * @param {!string} geometryName Geometry name to use.\n     * @param {!import(\"../../geom/Geometry.js\").default} geometry Geometry.\n     * @param {string} [opt_srsName] SRS name. No srsName attribute will be\n     *    set on geometries when this is not provided.\n     */\n    function Within(geometryName, geometry, opt_srsName) {\n        return _super.call(this, 'Within', geometryName, geometry, opt_srsName) || this;\n    }\n    return Within;\n}(Spatial));\nexport default Within;\n//# sourceMappingURL=Within.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/WFS\n */\nimport GML2 from './GML2.js';\nimport GML3 from './GML3.js';\nimport GML32 from './GML32.js';\nimport GMLBase, { GMLNS } from './GMLBase.js';\nimport XMLFeature from './XMLFeature.js';\nimport { XML_SCHEMA_INSTANCE_URI, createElementNS, isDocument, makeArrayPusher, makeChildAppender, makeObjectPropertySetter, makeSimpleNodeFactory, parse, parseNode, pushParseAndPop, pushSerializeAndPop, } from '../xml.js';\nimport { and as andFilterFn, bbox as bboxFilterFn } from './filter.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { get as getProjection } from '../proj.js';\nimport { readNonNegativeInteger, readNonNegativeIntegerString, writeStringTextNode, } from './xsd.js';\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar FEATURE_COLLECTION_PARSERS = {\n    'http://www.opengis.net/gml': {\n        'boundedBy': makeObjectPropertySetter(GMLBase.prototype.readGeometryElement, 'bounds'),\n    },\n    'http://www.opengis.net/wfs/2.0': {\n        'member': makeArrayPusher(GMLBase.prototype.readFeaturesInternal),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar TRANSACTION_SUMMARY_PARSERS = {\n    'http://www.opengis.net/wfs': {\n        'totalInserted': makeObjectPropertySetter(readNonNegativeInteger),\n        'totalUpdated': makeObjectPropertySetter(readNonNegativeInteger),\n        'totalDeleted': makeObjectPropertySetter(readNonNegativeInteger),\n    },\n    'http://www.opengis.net/wfs/2.0': {\n        'totalInserted': makeObjectPropertySetter(readNonNegativeInteger),\n        'totalUpdated': makeObjectPropertySetter(readNonNegativeInteger),\n        'totalDeleted': makeObjectPropertySetter(readNonNegativeInteger),\n    },\n};\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar TRANSACTION_RESPONSE_PARSERS = {\n    'http://www.opengis.net/wfs': {\n        'TransactionSummary': makeObjectPropertySetter(readTransactionSummary, 'transactionSummary'),\n        'InsertResults': makeObjectPropertySetter(readInsertResults, 'insertIds'),\n    },\n    'http://www.opengis.net/wfs/2.0': {\n        'TransactionSummary': makeObjectPropertySetter(readTransactionSummary, 'transactionSummary'),\n        'InsertResults': makeObjectPropertySetter(readInsertResults, 'insertIds'),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar QUERY_SERIALIZERS = {\n    'http://www.opengis.net/wfs': {\n        'PropertyName': makeChildAppender(writeStringTextNode),\n    },\n    'http://www.opengis.net/wfs/2.0': {\n        'PropertyName': makeChildAppender(writeStringTextNode),\n    },\n};\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar TRANSACTION_SERIALIZERS = {\n    'http://www.opengis.net/wfs': {\n        'Insert': makeChildAppender(writeFeature),\n        'Update': makeChildAppender(writeUpdate),\n        'Delete': makeChildAppender(writeDelete),\n        'Property': makeChildAppender(writeProperty),\n        'Native': makeChildAppender(writeNative),\n    },\n    'http://www.opengis.net/wfs/2.0': {\n        'Insert': makeChildAppender(writeFeature),\n        'Update': makeChildAppender(writeUpdate),\n        'Delete': makeChildAppender(writeDelete),\n        'Property': makeChildAppender(writeProperty),\n        'Native': makeChildAppender(writeNative),\n    },\n};\n/**\n * @typedef {Object} Options\n * @property {Object<string, string>|string} [featureNS] The namespace URI used for features.\n * @property {Array<string>|string} [featureType] The feature type to parse. Only used for read operations.\n * @property {GMLBase} [gmlFormat] The GML format to use to parse the response.\n * Default is `ol/format/GML2` for WFS 1.0.0, `ol/format/GML3` for WFS 1.1.0 and `ol/format/GML32` for WFS 2.0.0.\n * @property {string} [schemaLocation] Optional schemaLocation to use for serialization, this will override the default.\n * @property {string} [version='1.1.0'] WFS version to use. Can be either `1.0.0`, `1.1.0` or `2.0.0`.\n */\n/**\n * @typedef {Object} WriteGetFeatureOptions\n * @property {string} featureNS The namespace URI used for features.\n * @property {string} featurePrefix The prefix for the feature namespace.\n * @property {Array<string|FeatureType>} featureTypes The feature type names or FeatureType objects to\n * define a unique bbox filter per feature type name (in this case, options `bbox` and `geometryName` are\n * ignored.).\n * @property {string} [srsName] SRS name. No srsName attribute will be set on\n * geometries when this is not provided.\n * @property {string} [handle] Handle.\n * @property {string} [outputFormat] Output format.\n * @property {number} [maxFeatures] Maximum number of features to fetch.\n * @property {string} [geometryName] Geometry name to use in a BBOX filter.\n * @property {Array<string>} [propertyNames] Optional list of property names to serialize.\n * @property {string} [viewParams] viewParams GeoServer vendor parameter.\n * @property {number} [startIndex] Start index to use for WFS paging. This is a\n * WFS 2.0 feature backported to WFS 1.1.0 by some Web Feature Services.\n * @property {number} [count] Number of features to retrieve when paging. This is a\n * WFS 2.0 feature backported to WFS 1.1.0 by some Web Feature Services. Please note that some\n * Web Feature Services have repurposed `maxfeatures` instead.\n * @property {import(\"../extent.js\").Extent} [bbox] Extent to use for the BBOX filter. The `geometryName`\n * option must be set.\n * @property {import(\"./filter/Filter.js\").default} [filter] Filter condition. See\n * {@link module:ol/format/Filter} for more information.\n * @property {string} [resultType] Indicates what response should be returned,\n * E.g. `hits` only includes the `numberOfFeatures` attribute in the response and no features.\n */\n/**\n * @typedef {Object} FeatureType\n * @property {!string} name The feature type name.\n * @property {!import(\"../extent.js\").Extent} bbox Extent to use for the BBOX filter.\n * @property {!string} geometryName Geometry name to use in the BBOX filter.\n */\n/**\n * @typedef {Object} WriteTransactionOptions\n * @property {string} featureNS The namespace URI used for features.\n * @property {string} featurePrefix The prefix for the feature namespace.\n * @property {string} featureType The feature type name.\n * @property {string} [srsName] SRS name. No srsName attribute will be set on\n * geometries when this is not provided.\n * @property {string} [handle] Handle.\n * @property {boolean} [hasZ] Must be set to true if the transaction is for\n * a 3D layer. This will allow the Z coordinate to be included in the transaction.\n * @property {Array<Object>} nativeElements Native elements. Currently not supported.\n * @property {import(\"./GMLBase.js\").Options} [gmlOptions] GML options for the WFS transaction writer.\n * @property {string} [version='1.1.0'] WFS version to use for the transaction. Can be either `1.0.0`, `1.1.0` or `2.0.0`.\n */\n/**\n * Number of features; bounds/extent.\n * @typedef {Object} FeatureCollectionMetadata\n * @property {number} numberOfFeatures NumberOfFeatures.\n * @property {import(\"../extent.js\").Extent} bounds Bounds.\n */\n/**\n * Total deleted; total inserted; total updated; array of insert ids.\n * @typedef {Object} TransactionResponse\n * @property {number} totalDeleted TotalDeleted.\n * @property {number} totalInserted TotalInserted.\n * @property {number} totalUpdated TotalUpdated.\n * @property {Array<string>} insertIds InsertIds.\n */\n/**\n * @type {string}\n */\nvar FEATURE_PREFIX = 'feature';\n/**\n * @type {string}\n */\nvar XMLNS = 'http://www.w3.org/2000/xmlns/';\n/**\n * @type {Object<string, string>}\n */\nvar OGCNS = {\n    '2.0.0': 'http://www.opengis.net/ogc/1.1',\n    '1.1.0': 'http://www.opengis.net/ogc',\n    '1.0.0': 'http://www.opengis.net/ogc',\n};\n/**\n * @type {Object<string, string>}\n */\nvar WFSNS = {\n    '2.0.0': 'http://www.opengis.net/wfs/2.0',\n    '1.1.0': 'http://www.opengis.net/wfs',\n    '1.0.0': 'http://www.opengis.net/wfs',\n};\n/**\n * @type {Object<string, string>}\n */\nvar FESNS = {\n    '2.0.0': 'http://www.opengis.net/fes/2.0',\n    '1.1.0': 'http://www.opengis.net/fes',\n    '1.0.0': 'http://www.opengis.net/fes',\n};\n/**\n * @type {Object<string, string>}\n */\nvar SCHEMA_LOCATIONS = {\n    '2.0.0': 'http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd',\n    '1.1.0': 'http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd',\n    '1.0.0': 'http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd',\n};\n/**\n * @type {Object<string, object>}\n */\nvar GML_FORMATS = {\n    '2.0.0': GML32,\n    '1.1.0': GML3,\n    '1.0.0': GML2,\n};\n/**\n * @const\n * @type {string}\n */\nvar DEFAULT_VERSION = '1.1.0';\n/**\n * @classdesc\n * Feature format for reading and writing data in the WFS format.\n * By default, supports WFS version 1.1.0. You can pass a GML format\n * as option to override the default.\n * Also see {@link module:ol/format/GMLBase~GMLBase} which is used by this format.\n *\n * @api\n */\nvar WFS = /** @class */ (function (_super) {\n    __extends(WFS, _super);\n    /**\n     * @param {Options} [opt_options] Optional configuration object.\n     */\n    function WFS(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.version_ = options.version ? options.version : DEFAULT_VERSION;\n        /**\n         * @private\n         * @type {Array<string>|string|undefined}\n         */\n        _this.featureType_ = options.featureType;\n        /**\n         * @private\n         * @type {Object<string, string>|string|undefined}\n         */\n        _this.featureNS_ = options.featureNS;\n        /**\n         * @private\n         * @type {GMLBase}\n         */\n        _this.gmlFormat_ = options.gmlFormat\n            ? options.gmlFormat\n            : new GML_FORMATS[_this.version_]();\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.schemaLocation_ = options.schemaLocation\n            ? options.schemaLocation\n            : SCHEMA_LOCATIONS[_this.version_];\n        return _this;\n    }\n    /**\n     * @return {Array<string>|string|undefined} featureType\n     */\n    WFS.prototype.getFeatureType = function () {\n        return this.featureType_;\n    };\n    /**\n     * @param {Array<string>|string|undefined} featureType Feature type(s) to parse.\n     */\n    WFS.prototype.setFeatureType = function (featureType) {\n        this.featureType_ = featureType;\n    };\n    /**\n     * @protected\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    WFS.prototype.readFeaturesFromNode = function (node, opt_options) {\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        var context = {\n            node: node,\n        };\n        assign(context, {\n            'featureType': this.featureType_,\n            'featureNS': this.featureNS_,\n        });\n        assign(context, this.getReadOptions(node, opt_options ? opt_options : {}));\n        var objectStack = [context];\n        var featuresNS;\n        if (this.version_ === '2.0.0') {\n            featuresNS = FEATURE_COLLECTION_PARSERS;\n        }\n        else {\n            featuresNS = this.gmlFormat_.FEATURE_COLLECTION_PARSERS;\n        }\n        var features = pushParseAndPop([], featuresNS, node, objectStack, this.gmlFormat_);\n        if (!features) {\n            features = [];\n        }\n        return features;\n    };\n    /**\n     * Read transaction response of the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @return {TransactionResponse|undefined} Transaction response.\n     * @api\n     */\n    WFS.prototype.readTransactionResponse = function (source) {\n        if (!source) {\n            return undefined;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readTransactionResponseFromDocument(doc);\n        }\n        else if (isDocument(source)) {\n            return this.readTransactionResponseFromDocument(\n            /** @type {Document} */ (source));\n        }\n        else {\n            return this.readTransactionResponseFromNode(\n            /** @type {Element} */ (source));\n        }\n    };\n    /**\n     * Read feature collection metadata of the source.\n     *\n     * @param {Document|Element|Object|string} source Source.\n     * @return {FeatureCollectionMetadata|undefined}\n     *     FeatureCollection metadata.\n     * @api\n     */\n    WFS.prototype.readFeatureCollectionMetadata = function (source) {\n        if (!source) {\n            return undefined;\n        }\n        else if (typeof source === 'string') {\n            var doc = parse(source);\n            return this.readFeatureCollectionMetadataFromDocument(doc);\n        }\n        else if (isDocument(source)) {\n            return this.readFeatureCollectionMetadataFromDocument(\n            /** @type {Document} */ (source));\n        }\n        else {\n            return this.readFeatureCollectionMetadataFromNode(\n            /** @type {Element} */ (source));\n        }\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {FeatureCollectionMetadata|undefined}\n     *     FeatureCollection metadata.\n     */\n    WFS.prototype.readFeatureCollectionMetadataFromDocument = function (doc) {\n        for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                return this.readFeatureCollectionMetadataFromNode(\n                /** @type {Element} */ (n));\n            }\n        }\n        return undefined;\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {FeatureCollectionMetadata|undefined}\n     *     FeatureCollection metadata.\n     */\n    WFS.prototype.readFeatureCollectionMetadataFromNode = function (node) {\n        var result = {};\n        var value = readNonNegativeIntegerString(node.getAttribute('numberOfFeatures'));\n        result['numberOfFeatures'] = value;\n        return pushParseAndPop(\n        /** @type {FeatureCollectionMetadata} */ (result), FEATURE_COLLECTION_PARSERS, node, [], this.gmlFormat_);\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {TransactionResponse|undefined} Transaction response.\n     */\n    WFS.prototype.readTransactionResponseFromDocument = function (doc) {\n        for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                return this.readTransactionResponseFromNode(/** @type {Element} */ (n));\n            }\n        }\n        return undefined;\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {TransactionResponse|undefined} Transaction response.\n     */\n    WFS.prototype.readTransactionResponseFromNode = function (node) {\n        return pushParseAndPop(\n        /** @type {TransactionResponse} */ ({}), TRANSACTION_RESPONSE_PARSERS, node, []);\n    };\n    /**\n     * Encode format as WFS `GetFeature` and return the Node.\n     *\n     * @param {WriteGetFeatureOptions} options Options.\n     * @return {Node} Result.\n     * @api\n     */\n    WFS.prototype.writeGetFeature = function (options) {\n        var _this = this;\n        var node = createElementNS(WFSNS[this.version_], 'GetFeature');\n        node.setAttribute('service', 'WFS');\n        node.setAttribute('version', this.version_);\n        if (options.handle) {\n            node.setAttribute('handle', options.handle);\n        }\n        if (options.outputFormat) {\n            node.setAttribute('outputFormat', options.outputFormat);\n        }\n        if (options.maxFeatures !== undefined) {\n            node.setAttribute('maxFeatures', String(options.maxFeatures));\n        }\n        if (options.resultType) {\n            node.setAttribute('resultType', options.resultType);\n        }\n        if (options.startIndex !== undefined) {\n            node.setAttribute('startIndex', String(options.startIndex));\n        }\n        if (options.count !== undefined) {\n            node.setAttribute('count', String(options.count));\n        }\n        if (options.viewParams !== undefined) {\n            node.setAttribute('viewParams', options.viewParams);\n        }\n        node.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', this.schemaLocation_);\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        var context = {\n            node: node,\n        };\n        assign(context, {\n            'version': this.version_,\n            'srsName': options.srsName,\n            'featureNS': options.featureNS ? options.featureNS : this.featureNS_,\n            'featurePrefix': options.featurePrefix,\n            'propertyNames': options.propertyNames ? options.propertyNames : [],\n        });\n        assert(Array.isArray(options.featureTypes), 11); // `options.featureTypes` must be an Array\n        if (typeof options.featureTypes[0] === 'string') {\n            var filter = options.filter;\n            if (options.bbox) {\n                assert(options.geometryName, 12); // `options.geometryName` must also be provided when `options.bbox` is set\n                filter = this.combineBboxAndFilter(options.geometryName, options.bbox, options.srsName, filter);\n            }\n            assign(context, {\n                'geometryName': options.geometryName,\n                'filter': filter,\n            });\n            writeGetFeature(node, \n            /** @type {!Array<string>} */ (options.featureTypes), [context]);\n        }\n        else {\n            // Write one query node per element in featuresType.\n            options.featureTypes.forEach(function (/** @type {FeatureType} */ featureType) {\n                var completeFilter = _this.combineBboxAndFilter(featureType.geometryName, featureType.bbox, options.srsName, options.filter);\n                assign(context, {\n                    'geometryName': featureType.geometryName,\n                    'filter': completeFilter,\n                });\n                writeGetFeature(node, [featureType.name], [context]);\n            });\n        }\n        return node;\n    };\n    /**\n     * Create a bbox filter and combine it with another optional filter.\n     *\n     * @param {!string} geometryName Geometry name to use.\n     * @param {!import(\"../extent.js\").Extent} extent Extent.\n     * @param {string} [opt_srsName] SRS name. No srsName attribute will be\n     *    set on geometries when this is not provided.\n     * @param {import(\"./filter/Filter.js\").default} [opt_filter] Filter condition.\n     * @return {import(\"./filter/Filter.js\").default} The filter.\n     */\n    WFS.prototype.combineBboxAndFilter = function (geometryName, extent, opt_srsName, opt_filter) {\n        var bboxFilter = bboxFilterFn(geometryName, extent, opt_srsName);\n        if (opt_filter) {\n            // if bbox and filter are both set, combine the two into a single filter\n            return andFilterFn(opt_filter, bboxFilter);\n        }\n        return bboxFilter;\n    };\n    /**\n     * Encode format as WFS `Transaction` and return the Node.\n     *\n     * @param {Array<import(\"../Feature.js\").default>} inserts The features to insert.\n     * @param {Array<import(\"../Feature.js\").default>} updates The features to update.\n     * @param {Array<import(\"../Feature.js\").default>} deletes The features to delete.\n     * @param {WriteTransactionOptions} options Write options.\n     * @return {Node} Result.\n     * @api\n     */\n    WFS.prototype.writeTransaction = function (inserts, updates, deletes, options) {\n        var objectStack = [];\n        var version = options.version ? options.version : this.version_;\n        var node = createElementNS(WFSNS[version], 'Transaction');\n        node.setAttribute('service', 'WFS');\n        node.setAttribute('version', version);\n        var baseObj;\n        /** @type {import(\"../xml.js\").NodeStackItem} */\n        if (options) {\n            baseObj = options.gmlOptions ? options.gmlOptions : {};\n            if (options.handle) {\n                node.setAttribute('handle', options.handle);\n            }\n        }\n        node.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', SCHEMA_LOCATIONS[version]);\n        var request = createTransactionRequest(node, baseObj, version, options);\n        if (inserts) {\n            serializeTransactionRequest('Insert', inserts, objectStack, request);\n        }\n        if (updates) {\n            serializeTransactionRequest('Update', updates, objectStack, request);\n        }\n        if (deletes) {\n            serializeTransactionRequest('Delete', deletes, objectStack, request);\n        }\n        if (options.nativeElements) {\n            serializeTransactionRequest('Native', options.nativeElements, objectStack, request);\n        }\n        return node;\n    };\n    /**\n     * @param {Document} doc Document.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    WFS.prototype.readProjectionFromDocument = function (doc) {\n        for (var n = doc.firstChild; n; n = n.nextSibling) {\n            if (n.nodeType == Node.ELEMENT_NODE) {\n                return this.readProjectionFromNode(/** @type {Element} */ (n));\n            }\n        }\n        return null;\n    };\n    /**\n     * @param {Element} node Node.\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    WFS.prototype.readProjectionFromNode = function (node) {\n        if (node.firstElementChild && node.firstElementChild.firstElementChild) {\n            node = node.firstElementChild.firstElementChild;\n            for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n                if (!(n.childNodes.length === 0 ||\n                    (n.childNodes.length === 1 && n.firstChild.nodeType === 3))) {\n                    var objectStack = [{}];\n                    this.gmlFormat_.readGeometryElement(n, objectStack);\n                    return getProjection(objectStack.pop().srsName);\n                }\n            }\n        }\n        return null;\n    };\n    return WFS;\n}(XMLFeature));\n/**\n * @param {Element} node Node.\n * @param {*} baseObj Base object.\n * @param {string} version Version.\n * @param {WriteTransactionOptions} options Options.\n * @return {Object} Request object.\n */\nfunction createTransactionRequest(node, baseObj, version, options) {\n    var featurePrefix = options.featurePrefix\n        ? options.featurePrefix\n        : FEATURE_PREFIX;\n    var gmlVersion;\n    if (version === '1.0.0') {\n        gmlVersion = 2;\n    }\n    else if (version === '1.1.0') {\n        gmlVersion = 3;\n    }\n    else if (version === '2.0.0') {\n        gmlVersion = 3.2;\n    }\n    var obj = assign({ node: node }, {\n        version: version,\n        'featureNS': options.featureNS,\n        'featureType': options.featureType,\n        'featurePrefix': featurePrefix,\n        'gmlVersion': gmlVersion,\n        'hasZ': options.hasZ,\n        'srsName': options.srsName,\n    }, baseObj);\n    return obj;\n}\n/**\n * @param {string} type Request type.\n * @param {Array<import(\"../Feature.js\").default>} features Features.\n * @param {Array<*>} objectStack Object stack.\n * @param {Element} request Transaction Request.\n */\nfunction serializeTransactionRequest(type, features, objectStack, request) {\n    pushSerializeAndPop(request, TRANSACTION_SERIALIZERS, makeSimpleNodeFactory(type), features, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Transaction Summary.\n */\nfunction readTransactionSummary(node, objectStack) {\n    return pushParseAndPop({}, TRANSACTION_SUMMARY_PARSERS, node, objectStack);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar OGC_FID_PARSERS = {\n    'http://www.opengis.net/ogc': {\n        'FeatureId': makeArrayPusher(function (node, objectStack) {\n            return node.getAttribute('fid');\n        }),\n    },\n    'http://www.opengis.net/ogc/1.1': {\n        'FeatureId': makeArrayPusher(function (node, objectStack) {\n            return node.getAttribute('fid');\n        }),\n    },\n};\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction fidParser(node, objectStack) {\n    parseNode(OGC_FID_PARSERS, node, objectStack);\n}\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar INSERT_RESULTS_PARSERS = {\n    'http://www.opengis.net/wfs': {\n        'Feature': fidParser,\n    },\n    'http://www.opengis.net/wfs/2.0': {\n        'Feature': fidParser,\n    },\n};\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<string>|undefined} Insert results.\n */\nfunction readInsertResults(node, objectStack) {\n    return pushParseAndPop([], INSERT_RESULTS_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeFeature(node, feature, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var featureType = context['featureType'];\n    var featureNS = context['featureNS'];\n    var gmlVersion = context['gmlVersion'];\n    var child = createElementNS(featureNS, featureType);\n    node.appendChild(child);\n    if (gmlVersion === 2) {\n        GML2.prototype.writeFeatureElement(child, feature, objectStack);\n    }\n    else if (gmlVersion === 3) {\n        GML3.prototype.writeFeatureElement(child, feature, objectStack);\n    }\n    else {\n        GML32.prototype.writeFeatureElement(child, feature, objectStack);\n    }\n}\n/**\n * @param {Node} node Node.\n * @param {number|string} fid Feature identifier.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeOgcFidFilter(node, fid, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var version = context['version'];\n    var ns = OGCNS[version];\n    var filter = createElementNS(ns, 'Filter');\n    var child = createElementNS(ns, 'FeatureId');\n    filter.appendChild(child);\n    child.setAttribute('fid', /** @type {string} */ (fid));\n    node.appendChild(filter);\n}\n/**\n * @param {string|undefined} featurePrefix The prefix of the feature.\n * @param {string} featureType The type of the feature.\n * @return {string} The value of the typeName property.\n */\nfunction getTypeName(featurePrefix, featureType) {\n    featurePrefix = featurePrefix ? featurePrefix : FEATURE_PREFIX;\n    var prefix = featurePrefix + ':';\n    // The featureType already contains the prefix.\n    if (featureType.indexOf(prefix) === 0) {\n        return featureType;\n    }\n    else {\n        return prefix + featureType;\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeDelete(node, feature, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    assert(feature.getId() !== undefined, 26); // Features must have an id set\n    var featureType = context['featureType'];\n    var featurePrefix = context['featurePrefix'];\n    var featureNS = context['featureNS'];\n    var typeName = getTypeName(featurePrefix, featureType);\n    node.setAttribute('typeName', typeName);\n    node.setAttributeNS(XMLNS, 'xmlns:' + featurePrefix, featureNS);\n    var fid = feature.getId();\n    if (fid !== undefined) {\n        writeOgcFidFilter(node, fid, objectStack);\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeUpdate(node, feature, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    assert(feature.getId() !== undefined, 27); // Features must have an id set\n    var version = context['version'];\n    var featureType = context['featureType'];\n    var featurePrefix = context['featurePrefix'];\n    var featureNS = context['featureNS'];\n    var typeName = getTypeName(featurePrefix, featureType);\n    var geometryName = feature.getGeometryName();\n    node.setAttribute('typeName', typeName);\n    node.setAttributeNS(XMLNS, 'xmlns:' + featurePrefix, featureNS);\n    var fid = feature.getId();\n    if (fid !== undefined) {\n        var keys = feature.getKeys();\n        var values = [];\n        for (var i = 0, ii = keys.length; i < ii; i++) {\n            var value = feature.get(keys[i]);\n            if (value !== undefined) {\n                var name_1 = keys[i];\n                if (value &&\n                    typeof ( /** @type {?} */(value).getSimplifiedGeometry) === 'function') {\n                    name_1 = geometryName;\n                }\n                values.push({ name: name_1, value: value });\n            }\n        }\n        pushSerializeAndPop(\n        /** @type {import(\"../xml.js\").NodeStackItem} */ ({\n            version: version,\n            'gmlVersion': context['gmlVersion'],\n            node: node,\n            'hasZ': context['hasZ'],\n            'srsName': context['srsName'],\n        }), TRANSACTION_SERIALIZERS, makeSimpleNodeFactory('Property'), values, objectStack);\n        writeOgcFidFilter(node, fid, objectStack);\n    }\n}\n/**\n * @param {Node} node Node.\n * @param {Object} pair Property name and value.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeProperty(node, pair, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var version = context['version'];\n    var ns = WFSNS[version];\n    var name = createElementNS(ns, 'Name');\n    var gmlVersion = context['gmlVersion'];\n    node.appendChild(name);\n    writeStringTextNode(name, pair.name);\n    if (pair.value !== undefined && pair.value !== null) {\n        var value = createElementNS(ns, 'Value');\n        node.appendChild(value);\n        if (pair.value &&\n            typeof ( /** @type {?} */(pair.value).getSimplifiedGeometry) ===\n                'function') {\n            if (gmlVersion === 2) {\n                GML2.prototype.writeGeometryElement(value, pair.value, objectStack);\n            }\n            else if (gmlVersion === 3) {\n                GML3.prototype.writeGeometryElement(value, pair.value, objectStack);\n            }\n            else {\n                GML32.prototype.writeGeometryElement(value, pair.value, objectStack);\n            }\n        }\n        else {\n            writeStringTextNode(value, pair.value);\n        }\n    }\n}\n/**\n * @param {Element} node Node.\n * @param {{vendorId: string, safeToIgnore: boolean, value: string}} nativeElement The native element.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeNative(node, nativeElement, objectStack) {\n    if (nativeElement.vendorId) {\n        node.setAttribute('vendorId', nativeElement.vendorId);\n    }\n    if (nativeElement.safeToIgnore !== undefined) {\n        node.setAttribute('safeToIgnore', String(nativeElement.safeToIgnore));\n    }\n    if (nativeElement.value !== undefined) {\n        writeStringTextNode(node, nativeElement.value);\n    }\n}\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar GETFEATURE_SERIALIZERS = {\n    'http://www.opengis.net/wfs': {\n        'Query': makeChildAppender(writeQuery),\n    },\n    'http://www.opengis.net/wfs/2.0': {\n        'Query': makeChildAppender(writeQuery),\n    },\n    'http://www.opengis.net/ogc': {\n        'During': makeChildAppender(writeDuringFilter),\n        'And': makeChildAppender(writeLogicalFilter),\n        'Or': makeChildAppender(writeLogicalFilter),\n        'Not': makeChildAppender(writeNotFilter),\n        'BBOX': makeChildAppender(writeBboxFilter),\n        'Contains': makeChildAppender(writeSpatialFilter),\n        'Intersects': makeChildAppender(writeSpatialFilter),\n        'Within': makeChildAppender(writeSpatialFilter),\n        'DWithin': makeChildAppender(writeDWithinFilter),\n        'PropertyIsEqualTo': makeChildAppender(writeComparisonFilter),\n        'PropertyIsNotEqualTo': makeChildAppender(writeComparisonFilter),\n        'PropertyIsLessThan': makeChildAppender(writeComparisonFilter),\n        'PropertyIsLessThanOrEqualTo': makeChildAppender(writeComparisonFilter),\n        'PropertyIsGreaterThan': makeChildAppender(writeComparisonFilter),\n        'PropertyIsGreaterThanOrEqualTo': makeChildAppender(writeComparisonFilter),\n        'PropertyIsNull': makeChildAppender(writeIsNullFilter),\n        'PropertyIsBetween': makeChildAppender(writeIsBetweenFilter),\n        'PropertyIsLike': makeChildAppender(writeIsLikeFilter),\n    },\n    'http://www.opengis.net/fes/2.0': {\n        'During': makeChildAppender(writeDuringFilter),\n        'And': makeChildAppender(writeLogicalFilter),\n        'Or': makeChildAppender(writeLogicalFilter),\n        'Not': makeChildAppender(writeNotFilter),\n        'BBOX': makeChildAppender(writeBboxFilter),\n        'Contains': makeChildAppender(writeSpatialFilter),\n        'Disjoint': makeChildAppender(writeSpatialFilter),\n        'Intersects': makeChildAppender(writeSpatialFilter),\n        'ResourceId': makeChildAppender(writeResourceIdFilter),\n        'Within': makeChildAppender(writeSpatialFilter),\n        'DWithin': makeChildAppender(writeDWithinFilter),\n        'PropertyIsEqualTo': makeChildAppender(writeComparisonFilter),\n        'PropertyIsNotEqualTo': makeChildAppender(writeComparisonFilter),\n        'PropertyIsLessThan': makeChildAppender(writeComparisonFilter),\n        'PropertyIsLessThanOrEqualTo': makeChildAppender(writeComparisonFilter),\n        'PropertyIsGreaterThan': makeChildAppender(writeComparisonFilter),\n        'PropertyIsGreaterThanOrEqualTo': makeChildAppender(writeComparisonFilter),\n        'PropertyIsNull': makeChildAppender(writeIsNullFilter),\n        'PropertyIsBetween': makeChildAppender(writeIsBetweenFilter),\n        'PropertyIsLike': makeChildAppender(writeIsLikeFilter),\n    },\n};\n/**\n * @param {Element} node Node.\n * @param {string} featureType Feature type.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeQuery(node, featureType, objectStack) {\n    var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var version = context['version'];\n    var featurePrefix = context['featurePrefix'];\n    var featureNS = context['featureNS'];\n    var propertyNames = context['propertyNames'];\n    var srsName = context['srsName'];\n    var typeName;\n    // If feature prefix is not defined, we must not use the default prefix.\n    if (featurePrefix) {\n        typeName = getTypeName(featurePrefix, featureType);\n    }\n    else {\n        typeName = featureType;\n    }\n    var typeNameAttr;\n    if (version === '2.0.0') {\n        typeNameAttr = 'typeNames';\n    }\n    else {\n        typeNameAttr = 'typeName';\n    }\n    node.setAttribute(typeNameAttr, typeName);\n    if (srsName) {\n        node.setAttribute('srsName', srsName);\n    }\n    if (featureNS) {\n        node.setAttributeNS(XMLNS, 'xmlns:' + featurePrefix, featureNS);\n    }\n    var item = /** @type {import(\"../xml.js\").NodeStackItem} */ (assign({}, context));\n    item.node = node;\n    pushSerializeAndPop(item, QUERY_SERIALIZERS, makeSimpleNodeFactory('PropertyName'), propertyNames, objectStack);\n    var filter = context['filter'];\n    if (filter) {\n        var child = createElementNS(getFilterNS(version), 'Filter');\n        node.appendChild(child);\n        writeFilterCondition(child, filter, objectStack);\n    }\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Filter.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeFilterCondition(node, filter, objectStack) {\n    var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    var item = { node: node };\n    assign(item, { context: context });\n    pushSerializeAndPop(item, GETFEATURE_SERIALIZERS, makeSimpleNodeFactory(filter.getTagName()), [filter], objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Bbox.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeBboxFilter(node, filter, objectStack) {\n    var parent = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var context = parent['context'];\n    var version = context['version'];\n    parent['srsName'] = filter.srsName;\n    var format = GML_FORMATS[version];\n    writePropertyName(version, node, filter.geometryName);\n    format.prototype.writeGeometryElement(node, filter.extent, objectStack);\n}\n/**\n * @param {Element} node Element.\n * @param {import(\"./filter/ResourceId.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeResourceIdFilter(node, filter, objectStack) {\n    node.setAttribute('rid', /** @type {string} */ (filter.rid));\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Spatial.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeSpatialFilter(node, filter, objectStack) {\n    var parent = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var context = parent['context'];\n    var version = context['version'];\n    parent['srsName'] = filter.srsName;\n    var format = GML_FORMATS[version];\n    writePropertyName(version, node, filter.geometryName);\n    format.prototype.writeGeometryElement(node, filter.geometry, objectStack);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/DWithin.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeDWithinFilter(node, filter, objectStack) {\n    var parent = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var context = parent['context'];\n    var version = context['version'];\n    writeSpatialFilter(node, filter, objectStack);\n    var distance = createElementNS(getFilterNS(version), 'Distance');\n    writeStringTextNode(distance, filter.distance.toString());\n    if (version === '2.0.0') {\n        distance.setAttribute('uom', filter.unit);\n    }\n    else {\n        distance.setAttribute('units', filter.unit);\n    }\n    node.appendChild(distance);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/During.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeDuringFilter(node, filter, objectStack) {\n    var parent = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var context = parent['context'];\n    var version = context['version'];\n    writeExpression(FESNS[version], 'ValueReference', node, filter.propertyName);\n    var timePeriod = createElementNS(GMLNS, 'TimePeriod');\n    node.appendChild(timePeriod);\n    var begin = createElementNS(GMLNS, 'begin');\n    timePeriod.appendChild(begin);\n    writeTimeInstant(begin, filter.begin);\n    var end = createElementNS(GMLNS, 'end');\n    timePeriod.appendChild(end);\n    writeTimeInstant(end, filter.end);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/LogicalNary.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeLogicalFilter(node, filter, objectStack) {\n    var parent = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var context = parent['context'];\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    var item = { node: node };\n    assign(item, { context: context });\n    var conditions = filter.conditions;\n    for (var i = 0, ii = conditions.length; i < ii; ++i) {\n        var condition = conditions[i];\n        pushSerializeAndPop(item, GETFEATURE_SERIALIZERS, makeSimpleNodeFactory(condition.getTagName()), [condition], objectStack);\n    }\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Not.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeNotFilter(node, filter, objectStack) {\n    var parent = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var context = parent['context'];\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    var item = { node: node };\n    assign(item, { context: context });\n    var condition = filter.condition;\n    pushSerializeAndPop(item, GETFEATURE_SERIALIZERS, makeSimpleNodeFactory(condition.getTagName()), [condition], objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {import(\"./filter/ComparisonBinary.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeComparisonFilter(node, filter, objectStack) {\n    var parent = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var context = parent['context'];\n    var version = context['version'];\n    if (filter.matchCase !== undefined) {\n        node.setAttribute('matchCase', filter.matchCase.toString());\n    }\n    writePropertyName(version, node, filter.propertyName);\n    writeLiteral(version, node, '' + filter.expression);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/IsNull.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeIsNullFilter(node, filter, objectStack) {\n    var parent = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var context = parent['context'];\n    var version = context['version'];\n    writePropertyName(version, node, filter.propertyName);\n}\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/IsBetween.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeIsBetweenFilter(node, filter, objectStack) {\n    var parent = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var context = parent['context'];\n    var version = context['version'];\n    var ns = getFilterNS(version);\n    writePropertyName(version, node, filter.propertyName);\n    var lowerBoundary = createElementNS(ns, 'LowerBoundary');\n    node.appendChild(lowerBoundary);\n    writeLiteral(version, lowerBoundary, '' + filter.lowerBoundary);\n    var upperBoundary = createElementNS(ns, 'UpperBoundary');\n    node.appendChild(upperBoundary);\n    writeLiteral(version, upperBoundary, '' + filter.upperBoundary);\n}\n/**\n * @param {Element} node Node.\n * @param {import(\"./filter/IsLike.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeIsLikeFilter(node, filter, objectStack) {\n    var parent = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var context = parent['context'];\n    var version = context['version'];\n    node.setAttribute('wildCard', filter.wildCard);\n    node.setAttribute('singleChar', filter.singleChar);\n    node.setAttribute('escapeChar', filter.escapeChar);\n    if (filter.matchCase !== undefined) {\n        node.setAttribute('matchCase', filter.matchCase.toString());\n    }\n    writePropertyName(version, node, filter.propertyName);\n    writeLiteral(version, node, '' + filter.pattern);\n}\n/**\n * @param {string} ns Namespace.\n * @param {string} tagName Tag name.\n * @param {Node} node Node.\n * @param {string} value Value.\n */\nfunction writeExpression(ns, tagName, node, value) {\n    var property = createElementNS(ns, tagName);\n    writeStringTextNode(property, value);\n    node.appendChild(property);\n}\n/**\n * @param {string} version Version.\n * @param {Node} node Node.\n * @param {string} value PropertyName value.\n */\nfunction writeLiteral(version, node, value) {\n    writeExpression(getFilterNS(version), 'Literal', node, value);\n}\n/**\n * @param {string} version Version.\n * @param {Node} node Node.\n * @param {string} value PropertyName value.\n */\nfunction writePropertyName(version, node, value) {\n    if (version === '2.0.0') {\n        writeExpression(FESNS[version], 'ValueReference', node, value);\n    }\n    else {\n        writeExpression(OGCNS[version], 'PropertyName', node, value);\n    }\n}\n/**\n * @param {Node} node Node.\n * @param {string} time PropertyName value.\n */\nfunction writeTimeInstant(node, time) {\n    var timeInstant = createElementNS(GMLNS, 'TimeInstant');\n    node.appendChild(timeInstant);\n    var timePosition = createElementNS(GMLNS, 'timePosition');\n    timeInstant.appendChild(timePosition);\n    writeStringTextNode(timePosition, time);\n}\n/**\n * Encode filter as WFS `Filter` and return the Node.\n *\n * @param {import(\"./filter/Filter.js\").default} filter Filter.\n * @param {string} opt_version WFS version. If not provided defaults to '1.1.0'\n * @return {Node} Result.\n * @api\n */\nexport function writeFilter(filter, opt_version) {\n    var version = opt_version || '1.1.0';\n    var child = createElementNS(getFilterNS(version), 'Filter');\n    var context = {\n        node: child,\n    };\n    assign(context, {\n        'version': version,\n        'filter': filter,\n    });\n    writeFilterCondition(child, filter, [context]);\n    return child;\n}\n/**\n * @param {Node} node Node.\n * @param {Array<string>} featureTypes Feature types.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeGetFeature(node, featureTypes, objectStack) {\n    var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var item = /** @type {import(\"../xml.js\").NodeStackItem} */ (assign({}, context));\n    item.node = node;\n    pushSerializeAndPop(item, GETFEATURE_SERIALIZERS, makeSimpleNodeFactory('Query'), featureTypes, objectStack);\n}\nfunction getFilterNS(version) {\n    var ns;\n    if (version === '2.0.0') {\n        ns = FESNS[version];\n    }\n    else {\n        ns = OGCNS[version];\n    }\n    return ns;\n}\nexport default WFS;\n//# sourceMappingURL=WFS.js.map","/**\n * @module ol/format/filter\n */\nimport And from './filter/And.js';\nimport Bbox from './filter/Bbox.js';\nimport Contains from './filter/Contains.js';\nimport DWithin from './filter/DWithin.js';\nimport Disjoint from './filter/Disjoint.js';\nimport During from './filter/During.js';\nimport EqualTo from './filter/EqualTo.js';\nimport GreaterThan from './filter/GreaterThan.js';\nimport GreaterThanOrEqualTo from './filter/GreaterThanOrEqualTo.js';\nimport Intersects from './filter/Intersects.js';\nimport IsBetween from './filter/IsBetween.js';\nimport IsLike from './filter/IsLike.js';\nimport IsNull from './filter/IsNull.js';\nimport LessThan from './filter/LessThan.js';\nimport LessThanOrEqualTo from './filter/LessThanOrEqualTo.js';\nimport Not from './filter/Not.js';\nimport NotEqualTo from './filter/NotEqualTo.js';\nimport Or from './filter/Or.js';\nimport ResourceId from './filter/ResourceId.js';\nimport Within from './filter/Within.js';\n/**\n * Create a logical `<And>` operator between two or more filter conditions.\n *\n * @param {...import(\"./filter/Filter.js\").default} conditions Filter conditions.\n * @return {!And} `<And>` operator.\n * @api\n */\nexport function and(conditions) {\n    var params = [null].concat(Array.prototype.slice.call(arguments));\n    return new (Function.prototype.bind.apply(And, params))();\n}\n/**\n * Create a logical `<Or>` operator between two or more filter conditions.\n *\n * @param {...import(\"./filter/Filter.js\").default} conditions Filter conditions.\n * @return {!Or} `<Or>` operator.\n * @api\n */\nexport function or(conditions) {\n    var params = [null].concat(Array.prototype.slice.call(arguments));\n    return new (Function.prototype.bind.apply(Or, params))();\n}\n/**\n * Represents a logical `<Not>` operator for a filter condition.\n *\n * @param {!import(\"./filter/Filter.js\").default} condition Filter condition.\n * @return {!Not} `<Not>` operator.\n * @api\n */\nexport function not(condition) {\n    return new Not(condition);\n}\n/**\n * Create a `<BBOX>` operator to test whether a geometry-valued property\n * intersects a fixed bounding box\n *\n * @param {!string} geometryName Geometry name to use.\n * @param {!import(\"../extent.js\").Extent} extent Extent.\n * @param {string} [opt_srsName] SRS name. No srsName attribute will be\n *    set on geometries when this is not provided.\n * @return {!Bbox} `<BBOX>` operator.\n * @api\n */\nexport function bbox(geometryName, extent, opt_srsName) {\n    return new Bbox(geometryName, extent, opt_srsName);\n}\n/**\n * Create a `<Contains>` operator to test whether a geometry-valued property\n * contains a given geometry.\n *\n * @param {!string} geometryName Geometry name to use.\n * @param {!import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {string} [opt_srsName] SRS name. No srsName attribute will be\n *    set on geometries when this is not provided.\n * @return {!Contains} `<Contains>` operator.\n * @api\n */\nexport function contains(geometryName, geometry, opt_srsName) {\n    return new Contains(geometryName, geometry, opt_srsName);\n}\n/**\n * Create a `<Intersects>` operator to test whether a geometry-valued property\n * intersects a given geometry.\n *\n * @param {!string} geometryName Geometry name to use.\n * @param {!import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {string} [opt_srsName] SRS name. No srsName attribute will be\n *    set on geometries when this is not provided.\n * @return {!Intersects} `<Intersects>` operator.\n * @api\n */\nexport function intersects(geometryName, geometry, opt_srsName) {\n    return new Intersects(geometryName, geometry, opt_srsName);\n}\n/**\n * Create a `<Disjoint>` operator to test whether a geometry-valued property\n * is disjoint to a given geometry.\n *\n * @param {!string} geometryName Geometry name to use.\n * @param {!import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {string} [opt_srsName] SRS name. No srsName attribute will be\n *    set on geometries when this is not provided.\n * @return {!Disjoint} `<Disjoint>` operator.\n * @api\n */\nexport function disjoint(geometryName, geometry, opt_srsName) {\n    return new Disjoint(geometryName, geometry, opt_srsName);\n}\n/**\n * Create a `<Within>` operator to test whether a geometry-valued property\n * is within a given geometry.\n *\n * @param {!string} geometryName Geometry name to use.\n * @param {!import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {string} [opt_srsName] SRS name. No srsName attribute will be\n *    set on geometries when this is not provided.\n * @return {!Within} `<Within>` operator.\n * @api\n */\nexport function within(geometryName, geometry, opt_srsName) {\n    return new Within(geometryName, geometry, opt_srsName);\n}\n/**\n * Create a `<DWithin>` operator to test whether a geometry-valued property\n * is within a distance to a given geometry.\n *\n * @param {!string} geometryName Geometry name to use.\n * @param {!import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {!number} distance Distance.\n * @param {!string} unit Unit.\n * @param {string} [opt_srsName] SRS name. No srsName attribute will be\n *    set on geometries when this is not provided.\n * @return {!DWithin} `<DWithin>` operator.\n * @api\n */\nexport function dwithin(geometryName, geometry, distance, unit, opt_srsName) {\n    return new DWithin(geometryName, geometry, distance, unit, opt_srsName);\n}\n/**\n * Creates a `<PropertyIsEqualTo>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!(string|number)} expression The value to compare.\n * @param {boolean} [opt_matchCase] Case-sensitive?\n * @return {!EqualTo} `<PropertyIsEqualTo>` operator.\n * @api\n */\nexport function equalTo(propertyName, expression, opt_matchCase) {\n    return new EqualTo(propertyName, expression, opt_matchCase);\n}\n/**\n * Creates a `<PropertyIsNotEqualTo>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!(string|number)} expression The value to compare.\n * @param {boolean} [opt_matchCase] Case-sensitive?\n * @return {!NotEqualTo} `<PropertyIsNotEqualTo>` operator.\n * @api\n */\nexport function notEqualTo(propertyName, expression, opt_matchCase) {\n    return new NotEqualTo(propertyName, expression, opt_matchCase);\n}\n/**\n * Creates a `<PropertyIsLessThan>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} expression The value to compare.\n * @return {!LessThan} `<PropertyIsLessThan>` operator.\n * @api\n */\nexport function lessThan(propertyName, expression) {\n    return new LessThan(propertyName, expression);\n}\n/**\n * Creates a `<PropertyIsLessThanOrEqualTo>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} expression The value to compare.\n * @return {!LessThanOrEqualTo} `<PropertyIsLessThanOrEqualTo>` operator.\n * @api\n */\nexport function lessThanOrEqualTo(propertyName, expression) {\n    return new LessThanOrEqualTo(propertyName, expression);\n}\n/**\n * Creates a `<PropertyIsGreaterThan>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} expression The value to compare.\n * @return {!GreaterThan} `<PropertyIsGreaterThan>` operator.\n * @api\n */\nexport function greaterThan(propertyName, expression) {\n    return new GreaterThan(propertyName, expression);\n}\n/**\n * Creates a `<PropertyIsGreaterThanOrEqualTo>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} expression The value to compare.\n * @return {!GreaterThanOrEqualTo} `<PropertyIsGreaterThanOrEqualTo>` operator.\n * @api\n */\nexport function greaterThanOrEqualTo(propertyName, expression) {\n    return new GreaterThanOrEqualTo(propertyName, expression);\n}\n/**\n * Creates a `<PropertyIsNull>` comparison operator to test whether a property value\n * is null.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @return {!IsNull} `<PropertyIsNull>` operator.\n * @api\n */\nexport function isNull(propertyName) {\n    return new IsNull(propertyName);\n}\n/**\n * Creates a `<PropertyIsBetween>` comparison operator to test whether an expression\n * value lies within a range given by a lower and upper bound (inclusive).\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} lowerBoundary The lower bound of the range.\n * @param {!number} upperBoundary The upper bound of the range.\n * @return {!IsBetween} `<PropertyIsBetween>` operator.\n * @api\n */\nexport function between(propertyName, lowerBoundary, upperBoundary) {\n    return new IsBetween(propertyName, lowerBoundary, upperBoundary);\n}\n/**\n * Represents a `<PropertyIsLike>` comparison operator that matches a string property\n * value against a text pattern.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!string} pattern Text pattern.\n * @param {string} [opt_wildCard] Pattern character which matches any sequence of\n *    zero or more string characters. Default is '*'.\n * @param {string} [opt_singleChar] pattern character which matches any single\n *    string character. Default is '.'.\n * @param {string} [opt_escapeChar] Escape character which can be used to escape\n *    the pattern characters. Default is '!'.\n * @param {boolean} [opt_matchCase] Case-sensitive?\n * @return {!IsLike} `<PropertyIsLike>` operator.\n * @api\n */\nexport function like(propertyName, pattern, opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase) {\n    return new IsLike(propertyName, pattern, opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase);\n}\n/**\n * Create a `<During>` temporal operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!string} begin The begin date in ISO-8601 format.\n * @param {!string} end The end date in ISO-8601 format.\n * @return {!During} `<During>` operator.\n * @api\n */\nexport function during(propertyName, begin, end) {\n    return new During(propertyName, begin, end);\n}\nexport function resourceId(rid) {\n    return new ResourceId(rid);\n}\n//# sourceMappingURL=filter.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/WMSCapabilities\n */\nimport XML from './XML.js';\nimport { makeArrayPusher, makeObjectPropertyPusher, makeObjectPropertySetter, makeStructureNS, pushParseAndPop, } from '../xml.js';\nimport { readBooleanString, readDecimal, readDecimalString, readNonNegativeInteger, readNonNegativeIntegerString, readString, } from './xsd.js';\nimport { readHref } from './xlink.js';\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [null, 'http://www.opengis.net/wms'];\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Service': makeObjectPropertySetter(readService),\n    'Capability': makeObjectPropertySetter(readCapability),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CAPABILITY_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Request': makeObjectPropertySetter(readRequest),\n    'Exception': makeObjectPropertySetter(readException),\n    'Layer': makeObjectPropertySetter(readCapabilityLayer),\n});\n/**\n * @classdesc\n * Format for reading WMS capabilities data\n *\n * @api\n */\nvar WMSCapabilities = /** @class */ (function (_super) {\n    __extends(WMSCapabilities, _super);\n    function WMSCapabilities() {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {string|undefined}\n         */\n        _this.version = undefined;\n        return _this;\n    }\n    /**\n     * @param {Element} node Node.\n     * @return {Object} Object\n     */\n    WMSCapabilities.prototype.readFromNode = function (node) {\n        this.version = node.getAttribute('version').trim();\n        var wmsCapabilityObject = pushParseAndPop({\n            'version': this.version,\n        }, PARSERS, node, []);\n        return wmsCapabilityObject ? wmsCapabilityObject : null;\n    };\n    return WMSCapabilities;\n}(XML));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar SERVICE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Name': makeObjectPropertySetter(readString),\n    'Title': makeObjectPropertySetter(readString),\n    'Abstract': makeObjectPropertySetter(readString),\n    'KeywordList': makeObjectPropertySetter(readKeywordList),\n    'OnlineResource': makeObjectPropertySetter(readHref),\n    'ContactInformation': makeObjectPropertySetter(readContactInformation),\n    'Fees': makeObjectPropertySetter(readString),\n    'AccessConstraints': makeObjectPropertySetter(readString),\n    'LayerLimit': makeObjectPropertySetter(readNonNegativeInteger),\n    'MaxWidth': makeObjectPropertySetter(readNonNegativeInteger),\n    'MaxHeight': makeObjectPropertySetter(readNonNegativeInteger),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CONTACT_INFORMATION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ContactPersonPrimary': makeObjectPropertySetter(readContactPersonPrimary),\n    'ContactPosition': makeObjectPropertySetter(readString),\n    'ContactAddress': makeObjectPropertySetter(readContactAddress),\n    'ContactVoiceTelephone': makeObjectPropertySetter(readString),\n    'ContactFacsimileTelephone': makeObjectPropertySetter(readString),\n    'ContactElectronicMailAddress': makeObjectPropertySetter(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CONTACT_PERSON_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'ContactPerson': makeObjectPropertySetter(readString),\n    'ContactOrganization': makeObjectPropertySetter(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CONTACT_ADDRESS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'AddressType': makeObjectPropertySetter(readString),\n    'Address': makeObjectPropertySetter(readString),\n    'City': makeObjectPropertySetter(readString),\n    'StateOrProvince': makeObjectPropertySetter(readString),\n    'PostCode': makeObjectPropertySetter(readString),\n    'Country': makeObjectPropertySetter(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar EXCEPTION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Format': makeArrayPusher(readString),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LAYER_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Name': makeObjectPropertySetter(readString),\n    'Title': makeObjectPropertySetter(readString),\n    'Abstract': makeObjectPropertySetter(readString),\n    'KeywordList': makeObjectPropertySetter(readKeywordList),\n    'CRS': makeObjectPropertyPusher(readString),\n    'EX_GeographicBoundingBox': makeObjectPropertySetter(readEXGeographicBoundingBox),\n    'BoundingBox': makeObjectPropertyPusher(readBoundingBox),\n    'Dimension': makeObjectPropertyPusher(readDimension),\n    'Attribution': makeObjectPropertySetter(readAttribution),\n    'AuthorityURL': makeObjectPropertyPusher(readAuthorityURL),\n    'Identifier': makeObjectPropertyPusher(readString),\n    'MetadataURL': makeObjectPropertyPusher(readMetadataURL),\n    'DataURL': makeObjectPropertyPusher(readFormatOnlineresource),\n    'FeatureListURL': makeObjectPropertyPusher(readFormatOnlineresource),\n    'Style': makeObjectPropertyPusher(readStyle),\n    'MinScaleDenominator': makeObjectPropertySetter(readDecimal),\n    'MaxScaleDenominator': makeObjectPropertySetter(readDecimal),\n    'Layer': makeObjectPropertyPusher(readLayer),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar ATTRIBUTION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Title': makeObjectPropertySetter(readString),\n    'OnlineResource': makeObjectPropertySetter(readHref),\n    'LogoURL': makeObjectPropertySetter(readSizedFormatOnlineresource),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'westBoundLongitude': makeObjectPropertySetter(readDecimal),\n    'eastBoundLongitude': makeObjectPropertySetter(readDecimal),\n    'southBoundLatitude': makeObjectPropertySetter(readDecimal),\n    'northBoundLatitude': makeObjectPropertySetter(readDecimal),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar REQUEST_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'GetCapabilities': makeObjectPropertySetter(readOperationType),\n    'GetMap': makeObjectPropertySetter(readOperationType),\n    'GetFeatureInfo': makeObjectPropertySetter(readOperationType),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar OPERATIONTYPE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Format': makeObjectPropertyPusher(readString),\n    'DCPType': makeObjectPropertyPusher(readDCPType),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar DCPTYPE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'HTTP': makeObjectPropertySetter(readHTTP),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar HTTP_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Get': makeObjectPropertySetter(readFormatOnlineresource),\n    'Post': makeObjectPropertySetter(readFormatOnlineresource),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Name': makeObjectPropertySetter(readString),\n    'Title': makeObjectPropertySetter(readString),\n    'Abstract': makeObjectPropertySetter(readString),\n    'LegendURL': makeObjectPropertyPusher(readSizedFormatOnlineresource),\n    'StyleSheetURL': makeObjectPropertySetter(readFormatOnlineresource),\n    'StyleURL': makeObjectPropertySetter(readFormatOnlineresource),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar FORMAT_ONLINERESOURCE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Format': makeObjectPropertySetter(readString),\n    'OnlineResource': makeObjectPropertySetter(readHref),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar KEYWORDLIST_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Keyword': makeArrayPusher(readString),\n});\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Attribution object.\n */\nfunction readAttribution(node, objectStack) {\n    return pushParseAndPop({}, ATTRIBUTION_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object} Bounding box object.\n */\nfunction readBoundingBox(node, objectStack) {\n    var extent = [\n        readDecimalString(node.getAttribute('minx')),\n        readDecimalString(node.getAttribute('miny')),\n        readDecimalString(node.getAttribute('maxx')),\n        readDecimalString(node.getAttribute('maxy')),\n    ];\n    var resolutions = [\n        readDecimalString(node.getAttribute('resx')),\n        readDecimalString(node.getAttribute('resy')),\n    ];\n    return {\n        'crs': node.getAttribute('CRS'),\n        'extent': extent,\n        'res': resolutions,\n    };\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {import(\"../extent.js\").Extent|undefined} Bounding box object.\n */\nfunction readEXGeographicBoundingBox(node, objectStack) {\n    var geographicBoundingBox = pushParseAndPop({}, EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS, node, objectStack);\n    if (!geographicBoundingBox) {\n        return undefined;\n    }\n    var westBoundLongitude = \n    /** @type {number|undefined} */\n    (geographicBoundingBox['westBoundLongitude']);\n    var southBoundLatitude = \n    /** @type {number|undefined} */\n    (geographicBoundingBox['southBoundLatitude']);\n    var eastBoundLongitude = \n    /** @type {number|undefined} */\n    (geographicBoundingBox['eastBoundLongitude']);\n    var northBoundLatitude = \n    /** @type {number|undefined} */\n    (geographicBoundingBox['northBoundLatitude']);\n    if (westBoundLongitude === undefined ||\n        southBoundLatitude === undefined ||\n        eastBoundLongitude === undefined ||\n        northBoundLatitude === undefined) {\n        return undefined;\n    }\n    return [\n        westBoundLongitude,\n        southBoundLatitude,\n        eastBoundLongitude,\n        northBoundLatitude,\n    ];\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Capability object.\n */\nfunction readCapability(node, objectStack) {\n    return pushParseAndPop({}, CAPABILITY_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Service object.\n */\nfunction readService(node, objectStack) {\n    return pushParseAndPop({}, SERVICE_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Contact information object.\n */\nfunction readContactInformation(node, objectStack) {\n    return pushParseAndPop({}, CONTACT_INFORMATION_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Contact person object.\n */\nfunction readContactPersonPrimary(node, objectStack) {\n    return pushParseAndPop({}, CONTACT_PERSON_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Contact address object.\n */\nfunction readContactAddress(node, objectStack) {\n    return pushParseAndPop({}, CONTACT_ADDRESS_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<string>|undefined} Format array.\n */\nfunction readException(node, objectStack) {\n    return pushParseAndPop([], EXCEPTION_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Layer object.\n */\nfunction readCapabilityLayer(node, objectStack) {\n    var layerObject = pushParseAndPop({}, LAYER_PARSERS, node, objectStack);\n    if (layerObject['Layer'] === undefined) {\n        return Object.assign(layerObject, readLayer(node, objectStack));\n    }\n    return layerObject;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Layer object.\n */\nfunction readLayer(node, objectStack) {\n    var parentLayerObject = /**  @type {!Object<string,*>} */ (objectStack[objectStack.length - 1]);\n    var layerObject = pushParseAndPop({}, LAYER_PARSERS, node, objectStack);\n    if (!layerObject) {\n        return undefined;\n    }\n    var queryable = readBooleanString(node.getAttribute('queryable'));\n    if (queryable === undefined) {\n        queryable = parentLayerObject['queryable'];\n    }\n    layerObject['queryable'] = queryable !== undefined ? queryable : false;\n    var cascaded = readNonNegativeIntegerString(node.getAttribute('cascaded'));\n    if (cascaded === undefined) {\n        cascaded = parentLayerObject['cascaded'];\n    }\n    layerObject['cascaded'] = cascaded;\n    var opaque = readBooleanString(node.getAttribute('opaque'));\n    if (opaque === undefined) {\n        opaque = parentLayerObject['opaque'];\n    }\n    layerObject['opaque'] = opaque !== undefined ? opaque : false;\n    var noSubsets = readBooleanString(node.getAttribute('noSubsets'));\n    if (noSubsets === undefined) {\n        noSubsets = parentLayerObject['noSubsets'];\n    }\n    layerObject['noSubsets'] = noSubsets !== undefined ? noSubsets : false;\n    var fixedWidth = readDecimalString(node.getAttribute('fixedWidth'));\n    if (!fixedWidth) {\n        fixedWidth = parentLayerObject['fixedWidth'];\n    }\n    layerObject['fixedWidth'] = fixedWidth;\n    var fixedHeight = readDecimalString(node.getAttribute('fixedHeight'));\n    if (!fixedHeight) {\n        fixedHeight = parentLayerObject['fixedHeight'];\n    }\n    layerObject['fixedHeight'] = fixedHeight;\n    // See 7.2.4.8\n    var addKeys = ['Style', 'CRS', 'AuthorityURL'];\n    addKeys.forEach(function (key) {\n        if (key in parentLayerObject) {\n            var childValue = layerObject[key] || [];\n            layerObject[key] = childValue.concat(parentLayerObject[key]);\n        }\n    });\n    var replaceKeys = [\n        'EX_GeographicBoundingBox',\n        'BoundingBox',\n        'Dimension',\n        'Attribution',\n        'MinScaleDenominator',\n        'MaxScaleDenominator',\n    ];\n    replaceKeys.forEach(function (key) {\n        if (!(key in layerObject)) {\n            var parentValue = parentLayerObject[key];\n            layerObject[key] = parentValue;\n        }\n    });\n    return layerObject;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object} Dimension object.\n */\nfunction readDimension(node, objectStack) {\n    var dimensionObject = {\n        'name': node.getAttribute('name'),\n        'units': node.getAttribute('units'),\n        'unitSymbol': node.getAttribute('unitSymbol'),\n        'default': node.getAttribute('default'),\n        'multipleValues': readBooleanString(node.getAttribute('multipleValues')),\n        'nearestValue': readBooleanString(node.getAttribute('nearestValue')),\n        'current': readBooleanString(node.getAttribute('current')),\n        'values': readString(node),\n    };\n    return dimensionObject;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Online resource object.\n */\nfunction readFormatOnlineresource(node, objectStack) {\n    return pushParseAndPop({}, FORMAT_ONLINERESOURCE_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Request object.\n */\nfunction readRequest(node, objectStack) {\n    return pushParseAndPop({}, REQUEST_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} DCP type object.\n */\nfunction readDCPType(node, objectStack) {\n    return pushParseAndPop({}, DCPTYPE_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} HTTP object.\n */\nfunction readHTTP(node, objectStack) {\n    return pushParseAndPop({}, HTTP_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Operation type object.\n */\nfunction readOperationType(node, objectStack) {\n    return pushParseAndPop({}, OPERATIONTYPE_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Online resource object.\n */\nfunction readSizedFormatOnlineresource(node, objectStack) {\n    var formatOnlineresource = readFormatOnlineresource(node, objectStack);\n    if (formatOnlineresource) {\n        var size = [\n            readNonNegativeIntegerString(node.getAttribute('width')),\n            readNonNegativeIntegerString(node.getAttribute('height')),\n        ];\n        formatOnlineresource['size'] = size;\n        return formatOnlineresource;\n    }\n    return undefined;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Authority URL object.\n */\nfunction readAuthorityURL(node, objectStack) {\n    var authorityObject = readFormatOnlineresource(node, objectStack);\n    if (authorityObject) {\n        authorityObject['name'] = node.getAttribute('name');\n        return authorityObject;\n    }\n    return undefined;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Metadata URL object.\n */\nfunction readMetadataURL(node, objectStack) {\n    var metadataObject = readFormatOnlineresource(node, objectStack);\n    if (metadataObject) {\n        metadataObject['type'] = node.getAttribute('type');\n        return metadataObject;\n    }\n    return undefined;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Style object.\n */\nfunction readStyle(node, objectStack) {\n    return pushParseAndPop({}, STYLE_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<string>|undefined} Keyword list.\n */\nfunction readKeywordList(node, objectStack) {\n    return pushParseAndPop([], KEYWORDLIST_PARSERS, node, objectStack);\n}\nexport default WMSCapabilities;\n//# sourceMappingURL=WMSCapabilities.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/WMSGetFeatureInfo\n */\nimport GML2 from './GML2.js';\nimport XMLFeature from './XMLFeature.js';\nimport { assign } from '../obj.js';\nimport { extend, includes } from '../array.js';\nimport { makeArrayPusher, makeStructureNS, pushParseAndPop } from '../xml.js';\n/**\n * @typedef {Object} Options\n * @property {Array<string>} [layers] If set, only features of the given layers will be returned by the format when read.\n */\n/**\n * @const\n * @type {string}\n */\nvar featureIdentifier = '_feature';\n/**\n * @const\n * @type {string}\n */\nvar layerIdentifier = '_layer';\n/**\n * @classdesc\n * Format for reading WMSGetFeatureInfo format. It uses\n * {@link module:ol/format/GML2~GML2} to read features.\n *\n * @api\n */\nvar WMSGetFeatureInfo = /** @class */ (function (_super) {\n    __extends(WMSGetFeatureInfo, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function WMSGetFeatureInfo(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.featureNS_ = 'http://mapserver.gis.umn.edu/mapserver';\n        /**\n         * @private\n         * @type {GML2}\n         */\n        _this.gmlFormat_ = new GML2();\n        /**\n         * @private\n         * @type {Array<string>}\n         */\n        _this.layers_ = options.layers ? options.layers : null;\n        return _this;\n    }\n    /**\n     * @return {Array<string>} layers\n     */\n    WMSGetFeatureInfo.prototype.getLayers = function () {\n        return this.layers_;\n    };\n    /**\n     * @param {Array<string>} layers Layers to parse.\n     */\n    WMSGetFeatureInfo.prototype.setLayers = function (layers) {\n        this.layers_ = layers;\n    };\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     * @private\n     */\n    WMSGetFeatureInfo.prototype.readFeatures_ = function (node, objectStack) {\n        node.setAttribute('namespaceURI', this.featureNS_);\n        var localName = node.localName;\n        /** @type {Array<import(\"../Feature.js\").default>} */\n        var features = [];\n        if (node.childNodes.length === 0) {\n            return features;\n        }\n        if (localName == 'msGMLOutput') {\n            for (var i = 0, ii = node.childNodes.length; i < ii; i++) {\n                var layer = node.childNodes[i];\n                if (layer.nodeType !== Node.ELEMENT_NODE) {\n                    continue;\n                }\n                var layerElement = /** @type {Element} */ (layer);\n                var context = objectStack[0];\n                var toRemove = layerIdentifier;\n                var layerName = layerElement.localName.replace(toRemove, '');\n                if (this.layers_ && !includes(this.layers_, layerName)) {\n                    continue;\n                }\n                var featureType = layerName + featureIdentifier;\n                context['featureType'] = featureType;\n                context['featureNS'] = this.featureNS_;\n                /** @type {Object<string, import(\"../xml.js\").Parser>} */\n                var parsers = {};\n                parsers[featureType] = makeArrayPusher(this.gmlFormat_.readFeatureElement, this.gmlFormat_);\n                var parsersNS = makeStructureNS([context['featureNS'], null], parsers);\n                layerElement.setAttribute('namespaceURI', this.featureNS_);\n                var layerFeatures = pushParseAndPop([], \n                // @ts-ignore\n                parsersNS, layerElement, objectStack, this.gmlFormat_);\n                if (layerFeatures) {\n                    extend(features, layerFeatures);\n                }\n            }\n        }\n        if (localName == 'FeatureCollection') {\n            var gmlFeatures = pushParseAndPop([], this.gmlFormat_.FEATURE_COLLECTION_PARSERS, node, [{}], this.gmlFormat_);\n            if (gmlFeatures) {\n                features = gmlFeatures;\n            }\n        }\n        return features;\n    };\n    /**\n     * @protected\n     * @param {Element} node Node.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Options.\n     * @return {Array<import(\"../Feature.js\").default>} Features.\n     */\n    WMSGetFeatureInfo.prototype.readFeaturesFromNode = function (node, opt_options) {\n        var options = {};\n        if (opt_options) {\n            assign(options, this.getReadOptions(node, opt_options));\n        }\n        return this.readFeatures_(node, [options]);\n    };\n    return WMSGetFeatureInfo;\n}(XMLFeature));\nexport default WMSGetFeatureInfo;\n//# sourceMappingURL=WMSGetFeatureInfo.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/WMTSCapabilities\n */\nimport OWS from './OWS.js';\nimport XML from './XML.js';\nimport { boundingExtent } from '../extent.js';\nimport { makeArrayPusher, makeObjectPropertyPusher, makeObjectPropertySetter, makeStructureNS, pushParseAndPop, } from '../xml.js';\nimport { readDecimal, readNonNegativeInteger, readString } from './xsd.js';\nimport { readHref } from './xlink.js';\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [null, 'http://www.opengis.net/wmts/1.0'];\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar OWS_NAMESPACE_URIS = [null, 'http://www.opengis.net/ows/1.1'];\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Contents': makeObjectPropertySetter(readContents),\n});\n/**\n * @classdesc\n * Format for reading WMTS capabilities data.\n *\n * @api\n */\nvar WMTSCapabilities = /** @class */ (function (_super) {\n    __extends(WMTSCapabilities, _super);\n    function WMTSCapabilities() {\n        var _this = _super.call(this) || this;\n        /**\n         * @type {OWS}\n         * @private\n         */\n        _this.owsParser_ = new OWS();\n        return _this;\n    }\n    /**\n     * @param {Element} node Node.\n     * @return {Object} Object\n     */\n    WMTSCapabilities.prototype.readFromNode = function (node) {\n        var version = node.getAttribute('version');\n        if (version) {\n            version = version.trim();\n        }\n        var WMTSCapabilityObject = this.owsParser_.readFromNode(node);\n        if (!WMTSCapabilityObject) {\n            return null;\n        }\n        WMTSCapabilityObject['version'] = version;\n        WMTSCapabilityObject = pushParseAndPop(WMTSCapabilityObject, PARSERS, node, []);\n        return WMTSCapabilityObject ? WMTSCapabilityObject : null;\n    };\n    return WMTSCapabilities;\n}(XML));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar CONTENTS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Layer': makeObjectPropertyPusher(readLayer),\n    'TileMatrixSet': makeObjectPropertyPusher(readTileMatrixSet),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar LAYER_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Style': makeObjectPropertyPusher(readStyle),\n    'Format': makeObjectPropertyPusher(readString),\n    'TileMatrixSetLink': makeObjectPropertyPusher(readTileMatrixSetLink),\n    'Dimension': makeObjectPropertyPusher(readDimensions),\n    'ResourceURL': makeObjectPropertyPusher(readResourceUrl),\n}, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'Title': makeObjectPropertySetter(readString),\n    'Abstract': makeObjectPropertySetter(readString),\n    'WGS84BoundingBox': makeObjectPropertySetter(readBoundingBox),\n    'Identifier': makeObjectPropertySetter(readString),\n}));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar STYLE_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'LegendURL': makeObjectPropertyPusher(readLegendUrl),\n}, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'Title': makeObjectPropertySetter(readString),\n    'Identifier': makeObjectPropertySetter(readString),\n}));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TMS_LINKS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'TileMatrixSet': makeObjectPropertySetter(readString),\n    'TileMatrixSetLimits': makeObjectPropertySetter(readTileMatrixLimitsList),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TMS_LIMITS_LIST_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'TileMatrixLimits': makeArrayPusher(readTileMatrixLimits),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TMS_LIMITS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'TileMatrix': makeObjectPropertySetter(readString),\n    'MinTileRow': makeObjectPropertySetter(readNonNegativeInteger),\n    'MaxTileRow': makeObjectPropertySetter(readNonNegativeInteger),\n    'MinTileCol': makeObjectPropertySetter(readNonNegativeInteger),\n    'MaxTileCol': makeObjectPropertySetter(readNonNegativeInteger),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar DIMENSION_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'Default': makeObjectPropertySetter(readString),\n    'Value': makeObjectPropertyPusher(readString),\n}, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'Identifier': makeObjectPropertySetter(readString),\n}));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar WGS84_BBOX_READERS = makeStructureNS(OWS_NAMESPACE_URIS, {\n    'LowerCorner': makeArrayPusher(readCoordinates),\n    'UpperCorner': makeArrayPusher(readCoordinates),\n});\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TMS_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'WellKnownScaleSet': makeObjectPropertySetter(readString),\n    'TileMatrix': makeObjectPropertyPusher(readTileMatrix),\n}, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'SupportedCRS': makeObjectPropertySetter(readString),\n    'Identifier': makeObjectPropertySetter(readString),\n    'BoundingBox': makeObjectPropertySetter(readBoundingBox),\n}));\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\n// @ts-ignore\nvar TM_PARSERS = makeStructureNS(NAMESPACE_URIS, {\n    'TopLeftCorner': makeObjectPropertySetter(readCoordinates),\n    'ScaleDenominator': makeObjectPropertySetter(readDecimal),\n    'TileWidth': makeObjectPropertySetter(readNonNegativeInteger),\n    'TileHeight': makeObjectPropertySetter(readNonNegativeInteger),\n    'MatrixWidth': makeObjectPropertySetter(readNonNegativeInteger),\n    'MatrixHeight': makeObjectPropertySetter(readNonNegativeInteger),\n}, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'Identifier': makeObjectPropertySetter(readString),\n}));\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Attribution object.\n */\nfunction readContents(node, objectStack) {\n    return pushParseAndPop({}, CONTENTS_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Layers object.\n */\nfunction readLayer(node, objectStack) {\n    return pushParseAndPop({}, LAYER_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Tile Matrix Set object.\n */\nfunction readTileMatrixSet(node, objectStack) {\n    return pushParseAndPop({}, TMS_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Style object.\n */\nfunction readStyle(node, objectStack) {\n    var style = pushParseAndPop({}, STYLE_PARSERS, node, objectStack);\n    if (!style) {\n        return undefined;\n    }\n    var isDefault = node.getAttribute('isDefault') === 'true';\n    style['isDefault'] = isDefault;\n    return style;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Tile Matrix Set Link object.\n */\nfunction readTileMatrixSetLink(node, objectStack) {\n    return pushParseAndPop({}, TMS_LINKS_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Dimension object.\n */\nfunction readDimensions(node, objectStack) {\n    return pushParseAndPop({}, DIMENSION_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Resource URL object.\n */\nfunction readResourceUrl(node, objectStack) {\n    var format = node.getAttribute('format');\n    var template = node.getAttribute('template');\n    var resourceType = node.getAttribute('resourceType');\n    var resource = {};\n    if (format) {\n        resource['format'] = format;\n    }\n    if (template) {\n        resource['template'] = template;\n    }\n    if (resourceType) {\n        resource['resourceType'] = resourceType;\n    }\n    return resource;\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} BBox object.\n */\nfunction readBoundingBox(node, objectStack) {\n    var coordinates = pushParseAndPop([], WGS84_BBOX_READERS, node, objectStack);\n    if (coordinates.length != 2) {\n        return undefined;\n    }\n    return boundingExtent(coordinates);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Legend object.\n */\nfunction readLegendUrl(node, objectStack) {\n    var legend = {};\n    legend['format'] = node.getAttribute('format');\n    legend['href'] = readHref(node);\n    return legend;\n}\n/**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Coordinates object.\n */\nfunction readCoordinates(node, objectStack) {\n    var coordinates = readString(node).split(/\\s+/);\n    if (!coordinates || coordinates.length != 2) {\n        return undefined;\n    }\n    var x = +coordinates[0];\n    var y = +coordinates[1];\n    if (isNaN(x) || isNaN(y)) {\n        return undefined;\n    }\n    return [x, y];\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} TileMatrix object.\n */\nfunction readTileMatrix(node, objectStack) {\n    return pushParseAndPop({}, TM_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} TileMatrixSetLimits Object.\n */\nfunction readTileMatrixLimitsList(node, objectStack) {\n    return pushParseAndPop([], TMS_LIMITS_LIST_PARSERS, node, objectStack);\n}\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} TileMatrixLimits Array.\n */\nfunction readTileMatrixLimits(node, objectStack) {\n    return pushParseAndPop({}, TMS_LIMITS_PARSERS, node, objectStack);\n}\nexport default WMTSCapabilities;\n//# sourceMappingURL=WMTSCapabilities.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/BaseImage\n */\nimport Layer from './Layer.js';\n/**\n * @template {import(\"../source/Image.js\").default} ImageSourceType\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link import(\"../PluggableMap.js\").default#addLayer map.addLayer()}.\n * @property {ImageSourceType} [source] Source for this layer.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n/**\n * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Image.js\").default} ImageSourceType\n * @extends {Layer<ImageSourceType>}\n * @api\n */\nvar BaseImageLayer = /** @class */ (function (_super) {\n    __extends(BaseImageLayer, _super);\n    /**\n     * @param {Options<ImageSourceType>} [opt_options] Layer options.\n     */\n    function BaseImageLayer(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, options) || this;\n        return _this;\n    }\n    return BaseImageLayer;\n}(Layer));\nexport default BaseImageLayer;\n//# sourceMappingURL=BaseImage.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Image\n */\nimport BaseImageLayer from './BaseImage.js';\nimport CanvasImageLayerRenderer from '../renderer/canvas/ImageLayer.js';\n/**\n * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Image.js\").default} ImageSourceType\n * @extends {BaseImageLayer<ImageSourceType>}\n * @api\n */\nvar ImageLayer = /** @class */ (function (_super) {\n    __extends(ImageLayer, _super);\n    /**\n     * @param {import(\"./BaseImage.js\").Options<ImageSourceType>} [opt_options] Layer options.\n     */\n    function ImageLayer(opt_options) {\n        return _super.call(this, opt_options) || this;\n    }\n    /**\n     * Create a renderer for this layer.\n     * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n     */\n    ImageLayer.prototype.createRenderer = function () {\n        return new CanvasImageLayerRenderer(this);\n    };\n    return ImageLayer;\n}(BaseImageLayer));\nexport default ImageLayer;\n//# sourceMappingURL=Image.js.map","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n  return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/AssertionError\n */\nimport { VERSION } from './util.js';\n/**\n * Error object thrown when an assertion failed. This is an ECMA-262 Error,\n * extended with a `code` property.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error.\n */\nvar AssertionError = /** @class */ (function (_super) {\n    __extends(AssertionError, _super);\n    /**\n     * @param {number} code Error code.\n     */\n    function AssertionError(code) {\n        var _this = this;\n        var path = VERSION === 'latest' ? VERSION : 'v' + VERSION.split('-')[0];\n        var message = 'Assertion failed. See https://openlayers.org/en/' +\n            path +\n            '/doc/errors/#' +\n            code +\n            ' for details.';\n        _this = _super.call(this, message) || this;\n        /**\n         * Error code. The meaning of the code can be found on\n         * https://openlayers.org/en/latest/doc/errors/ (replace `latest` with\n         * the version found in the OpenLayers script's header comment if a version\n         * other than the latest is used).\n         * @type {number}\n         * @api\n         */\n        _this.code = code;\n        /**\n         * @type {string}\n         */\n        _this.name = 'AssertionError';\n        // Re-assign message, see https://github.com/Rich-Harris/buble/issues/40\n        _this.message = message;\n        return _this;\n    }\n    return AssertionError;\n}(Error));\nexport default AssertionError;\n//# sourceMappingURL=AssertionError.js.map","/**\n * @module ol/style/TextPlacement\n */\n/**\n * Text placement. One of `'point'`, `'line'`. Default is `'point'`. Note that\n * `'line'` requires the underlying geometry to be a {@link module:ol/geom/LineString~LineString},\n * {@link module:ol/geom/Polygon~Polygon}, {@link module:ol/geom/MultiLineString~MultiLineString} or\n * {@link module:ol/geom/MultiPolygon~MultiPolygon}.\n * @enum {string}\n */\nexport default {\n    POINT: 'point',\n    LINE: 'line',\n};\n//# sourceMappingURL=TextPlacement.js.map","/**\n * @module ol/render/VectorContext\n */\n/**\n * @classdesc\n * Context for drawing geometries.  A vector context is available on render\n * events and does not need to be constructed directly.\n * @api\n */\nvar VectorContext = /** @class */ (function () {\n    function VectorContext() {\n    }\n    /**\n     * Render a geometry with a custom renderer.\n     *\n     * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     * @param {Function} renderer Renderer.\n     */\n    VectorContext.prototype.drawCustom = function (geometry, feature, renderer) { };\n    /**\n     * Render a geometry.\n     *\n     * @param {import(\"../geom/Geometry.js\").default} geometry The geometry to render.\n     */\n    VectorContext.prototype.drawGeometry = function (geometry) { };\n    /**\n     * Set the rendering style.\n     *\n     * @param {import(\"../style/Style.js\").default} style The rendering style.\n     */\n    VectorContext.prototype.setStyle = function (style) { };\n    /**\n     * @param {import(\"../geom/Circle.js\").default} circleGeometry Circle geometry.\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     */\n    VectorContext.prototype.drawCircle = function (circleGeometry, feature) { };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {import(\"../style/Style.js\").default} style Style.\n     */\n    VectorContext.prototype.drawFeature = function (feature, style) { };\n    /**\n     * @param {import(\"../geom/GeometryCollection.js\").default} geometryCollectionGeometry Geometry collection.\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     */\n    VectorContext.prototype.drawGeometryCollection = function (geometryCollectionGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/LineString.js\").default|import(\"./Feature.js\").default} lineStringGeometry Line string geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.prototype.drawLineString = function (lineStringGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/MultiLineString.js\").default|import(\"./Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.prototype.drawMultiLineString = function (multiLineStringGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/MultiPoint.js\").default|import(\"./Feature.js\").default} multiPointGeometry MultiPoint geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.prototype.drawMultiPoint = function (multiPointGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.prototype.drawMultiPolygon = function (multiPolygonGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/Point.js\").default|import(\"./Feature.js\").default} pointGeometry Point geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.prototype.drawPoint = function (pointGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/Polygon.js\").default|import(\"./Feature.js\").default} polygonGeometry Polygon geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.prototype.drawPolygon = function (polygonGeometry, feature) { };\n    /**\n     * @param {import(\"../geom/SimpleGeometry.js\").default|import(\"./Feature.js\").default} geometry Geometry.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     */\n    VectorContext.prototype.drawText = function (geometry, feature) { };\n    /**\n     * @param {import(\"../style/Fill.js\").default} fillStyle Fill style.\n     * @param {import(\"../style/Stroke.js\").default} strokeStyle Stroke style.\n     */\n    VectorContext.prototype.setFillStrokeStyle = function (fillStyle, strokeStyle) { };\n    /**\n     * @param {import(\"../style/Image.js\").default} imageStyle Image style.\n     * @param {import(\"../render/canvas.js\").DeclutterImageWithText} [opt_declutterImageWithText] Shared data for combined decluttering with a text style.\n     */\n    VectorContext.prototype.setImageStyle = function (imageStyle, opt_declutterImageWithText) { };\n    /**\n     * @param {import(\"../style/Text.js\").default} textStyle Text style.\n     * @param {import(\"../render/canvas.js\").DeclutterImageWithText} [opt_declutterImageWithText] Shared data for combined decluttering with an image style.\n     */\n    VectorContext.prototype.setTextStyle = function (textStyle, opt_declutterImageWithText) { };\n    return VectorContext;\n}());\nexport default VectorContext;\n//# sourceMappingURL=VectorContext.js.map","/**\n * @module ol/geom/flat/segments\n */\n/**\n * This function calls `callback` for each segment of the flat coordinates\n * array. If the callback returns a truthy value the function returns that\n * value immediately. Otherwise the function returns `false`.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {function(import(\"../../coordinate.js\").Coordinate, import(\"../../coordinate.js\").Coordinate): T} callback Function\n *     called for each segment.\n * @return {T|boolean} Value.\n * @template T\n */\nexport function forEach(flatCoordinates, offset, end, stride, callback) {\n    var point1 = [flatCoordinates[offset], flatCoordinates[offset + 1]];\n    var point2 = [];\n    var ret;\n    for (; offset + stride < end; offset += stride) {\n        point2[0] = flatCoordinates[offset + stride];\n        point2[1] = flatCoordinates[offset + stride + 1];\n        ret = callback(point1, point2);\n        if (ret) {\n            return ret;\n        }\n        point1[0] = point2[0];\n        point1[1] = point2[1];\n    }\n    return false;\n}\n//# sourceMappingURL=segments.js.map","/**\n * @module ol/geom/flat/length\n */\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Length.\n */\nexport function lineStringLength(flatCoordinates, offset, end, stride) {\n    var x1 = flatCoordinates[offset];\n    var y1 = flatCoordinates[offset + 1];\n    var length = 0;\n    for (var i = offset + stride; i < end; i += stride) {\n        var x2 = flatCoordinates[i];\n        var y2 = flatCoordinates[i + 1];\n        length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n        x1 = x2;\n        y1 = y2;\n    }\n    return length;\n}\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Perimeter.\n */\nexport function linearRingLength(flatCoordinates, offset, end, stride) {\n    var perimeter = lineStringLength(flatCoordinates, offset, end, stride);\n    var dx = flatCoordinates[end - stride] - flatCoordinates[offset];\n    var dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];\n    perimeter += Math.sqrt(dx * dx + dy * dy);\n    return perimeter;\n}\n//# sourceMappingURL=length.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/VectorLayer\n */\nimport CanvasBuilderGroup from '../../render/canvas/BuilderGroup.js';\nimport CanvasLayerRenderer from './Layer.js';\nimport ExecutorGroup from '../../render/canvas/ExecutorGroup.js';\nimport ViewHint from '../../ViewHint.js';\nimport { HIT_DETECT_RESOLUTION, createHitDetectionImageData, hitDetect, } from '../../render/canvas/hitdetect.js';\nimport { apply, makeInverse, makeScale, toString as transformToString, } from '../../transform.js';\nimport { buffer, containsExtent, createEmpty, getWidth, intersects as intersectsExtent, wrapX as wrapExtentX, } from '../../extent.js';\nimport { defaultOrder as defaultRenderOrder, getTolerance as getRenderTolerance, getSquaredTolerance as getSquaredRenderTolerance, renderFeature, } from '../vector.js';\nimport { equals } from '../../array.js';\nimport { fromUserExtent, getTransformFromProjections, getUserProjection, toUserExtent, } from '../../proj.js';\nimport { getUid } from '../../util.js';\nimport { wrapX as wrapCoordinateX } from '../../coordinate.js';\n/**\n * @classdesc\n * Canvas renderer for vector layers.\n * @api\n */\nvar CanvasVectorLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasVectorLayerRenderer, _super);\n    /**\n     * @param {import(\"../../layer/Vector.js\").default} vectorLayer Vector layer.\n     */\n    function CanvasVectorLayerRenderer(vectorLayer) {\n        var _this = _super.call(this, vectorLayer) || this;\n        /** @private */\n        _this.boundHandleStyleImageChange_ = _this.handleStyleImageChange_.bind(_this);\n        /**\n         * @type {boolean}\n         */\n        _this.animatingOrInteracting_;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.dirty_ = false;\n        /**\n         * @type {ImageData}\n         */\n        _this.hitDetectionImageData_ = null;\n        /**\n         * @type {Array<import(\"../../Feature.js\").default>}\n         */\n        _this.renderedFeatures_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRevision_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedResolution_ = NaN;\n        /**\n         * @private\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.renderedExtent_ = createEmpty();\n        /**\n         * @private\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.wrappedRenderedExtent_ = createEmpty();\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRotation_;\n        /**\n         * @private\n         * @type {import(\"../../coordinate\").Coordinate}\n         */\n        _this.renderedCenter_ = null;\n        /**\n         * @private\n         * @type {import(\"../../proj/Projection\").default}\n         */\n        _this.renderedProjection_ = null;\n        /**\n         * @private\n         * @type {function(import(\"../../Feature.js\").default, import(\"../../Feature.js\").default): number|null}\n         */\n        _this.renderedRenderOrder_ = null;\n        /**\n         * @private\n         * @type {import(\"../../render/canvas/ExecutorGroup\").default}\n         */\n        _this.replayGroup_ = null;\n        /**\n         * A new replay group had to be created by `prepareFrame()`\n         * @type {boolean}\n         */\n        _this.replayGroupChanged = true;\n        /**\n         * @type {import(\"../../render/canvas/ExecutorGroup\").default}\n         */\n        _this.declutterExecutorGroup = null;\n        /**\n         * Clipping to be performed by `renderFrame()`\n         * @type {boolean}\n         */\n        _this.clipping = true;\n        return _this;\n    }\n    /**\n     * Get a rendering container from an existing target, if compatible.\n     * @param {HTMLElement} target Potential render target.\n     * @param {string} transform CSS Transform.\n     * @param {number} opacity Opacity.\n     */\n    CanvasVectorLayerRenderer.prototype.useContainer = function (target, transform, opacity) {\n        if (opacity < 1) {\n            target = null;\n        }\n        _super.prototype.useContainer.call(this, target, transform, opacity);\n    };\n    /**\n     * @param {ExecutorGroup} executorGroup Executor group.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {import(\"rbush\").default} [opt_declutterTree] Declutter tree.\n     */\n    CanvasVectorLayerRenderer.prototype.renderWorlds = function (executorGroup, frameState, opt_declutterTree) {\n        var extent = frameState.extent;\n        var viewState = frameState.viewState;\n        var center = viewState.center;\n        var resolution = viewState.resolution;\n        var projection = viewState.projection;\n        var rotation = viewState.rotation;\n        var projectionExtent = projection.getExtent();\n        var vectorSource = this.getLayer().getSource();\n        var pixelRatio = frameState.pixelRatio;\n        var viewHints = frameState.viewHints;\n        var snapToPixel = !(viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]);\n        var context = this.context;\n        var width = Math.round(frameState.size[0] * pixelRatio);\n        var height = Math.round(frameState.size[1] * pixelRatio);\n        var multiWorld = vectorSource.getWrapX() && projection.canWrapX();\n        var worldWidth = multiWorld ? getWidth(projectionExtent) : null;\n        var endWorld = multiWorld\n            ? Math.ceil((extent[2] - projectionExtent[2]) / worldWidth) + 1\n            : 1;\n        var world = multiWorld\n            ? Math.floor((extent[0] - projectionExtent[0]) / worldWidth)\n            : 0;\n        do {\n            var transform = this.getRenderTransform(center, resolution, rotation, pixelRatio, width, height, world * worldWidth);\n            executorGroup.execute(context, 1, transform, rotation, snapToPixel, undefined, opt_declutterTree);\n        } while (++world < endWorld);\n    };\n    /**\n     * Render declutter items for this layer\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    CanvasVectorLayerRenderer.prototype.renderDeclutter = function (frameState) {\n        if (this.declutterExecutorGroup) {\n            this.renderWorlds(this.declutterExecutorGroup, frameState, frameState.declutterTree);\n        }\n    };\n    /**\n     * Render the layer.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target that may be used to render content to.\n     * @return {HTMLElement} The rendered element.\n     */\n    CanvasVectorLayerRenderer.prototype.renderFrame = function (frameState, target) {\n        var pixelRatio = frameState.pixelRatio;\n        var layerState = frameState.layerStatesArray[frameState.layerIndex];\n        // set forward and inverse pixel transforms\n        makeScale(this.pixelTransform, 1 / pixelRatio, 1 / pixelRatio);\n        makeInverse(this.inversePixelTransform, this.pixelTransform);\n        var canvasTransform = transformToString(this.pixelTransform);\n        this.useContainer(target, canvasTransform, layerState.opacity);\n        var context = this.context;\n        var canvas = context.canvas;\n        var replayGroup = this.replayGroup_;\n        var declutterExecutorGroup = this.declutterExecutorGroup;\n        if ((!replayGroup || replayGroup.isEmpty()) &&\n            (!declutterExecutorGroup || declutterExecutorGroup.isEmpty())) {\n            if (!this.containerReused && canvas.width > 0) {\n                canvas.width = 0;\n            }\n            return this.container;\n        }\n        // resize and clear\n        var width = Math.round(frameState.size[0] * pixelRatio);\n        var height = Math.round(frameState.size[1] * pixelRatio);\n        if (canvas.width != width || canvas.height != height) {\n            canvas.width = width;\n            canvas.height = height;\n            if (canvas.style.transform !== canvasTransform) {\n                canvas.style.transform = canvasTransform;\n            }\n        }\n        else if (!this.containerReused) {\n            context.clearRect(0, 0, width, height);\n        }\n        this.preRender(context, frameState);\n        var viewState = frameState.viewState;\n        var projection = viewState.projection;\n        // clipped rendering if layer extent is set\n        var clipped = false;\n        var render = true;\n        if (layerState.extent && this.clipping) {\n            var layerExtent = fromUserExtent(layerState.extent, projection);\n            render = intersectsExtent(layerExtent, frameState.extent);\n            clipped = render && !containsExtent(layerExtent, frameState.extent);\n            if (clipped) {\n                this.clipUnrotated(context, frameState, layerExtent);\n            }\n        }\n        if (render) {\n            this.renderWorlds(replayGroup, frameState);\n        }\n        if (clipped) {\n            context.restore();\n        }\n        this.postRender(context, frameState);\n        var opacity = layerState.opacity;\n        var container = this.container;\n        if (opacity !== parseFloat(container.style.opacity)) {\n            container.style.opacity = opacity === 1 ? '' : String(opacity);\n        }\n        if (this.renderedRotation_ !== viewState.rotation) {\n            this.renderedRotation_ = viewState.rotation;\n            this.hitDetectionImageData_ = null;\n        }\n        return this.container;\n    };\n    /**\n     * Asynchronous layer level hit detection.\n     * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../../Feature\").default>>} Promise that resolves with an array of features.\n     */\n    CanvasVectorLayerRenderer.prototype.getFeatures = function (pixel) {\n        return new Promise(\n        /**\n         * @param {function(Array<import(\"../../Feature\").default|import(\"../../render/Feature\").default>): void} resolve Resolver function.\n         * @this {CanvasVectorLayerRenderer}\n         */\n        function (resolve) {\n            if (!this.hitDetectionImageData_ && !this.animatingOrInteracting_) {\n                var size = [this.context.canvas.width, this.context.canvas.height];\n                apply(this.pixelTransform, size);\n                var center = this.renderedCenter_;\n                var resolution = this.renderedResolution_;\n                var rotation = this.renderedRotation_;\n                var projection = this.renderedProjection_;\n                var extent = this.wrappedRenderedExtent_;\n                var layer = this.getLayer();\n                var transforms = [];\n                var width = size[0] * HIT_DETECT_RESOLUTION;\n                var height = size[1] * HIT_DETECT_RESOLUTION;\n                transforms.push(this.getRenderTransform(center, resolution, rotation, HIT_DETECT_RESOLUTION, width, height, 0).slice());\n                var source = layer.getSource();\n                var projectionExtent = projection.getExtent();\n                if (source.getWrapX() &&\n                    projection.canWrapX() &&\n                    !containsExtent(projectionExtent, extent)) {\n                    var startX = extent[0];\n                    var worldWidth = getWidth(projectionExtent);\n                    var world = 0;\n                    var offsetX = void 0;\n                    while (startX < projectionExtent[0]) {\n                        --world;\n                        offsetX = worldWidth * world;\n                        transforms.push(this.getRenderTransform(center, resolution, rotation, HIT_DETECT_RESOLUTION, width, height, offsetX).slice());\n                        startX += worldWidth;\n                    }\n                    world = 0;\n                    startX = extent[2];\n                    while (startX > projectionExtent[2]) {\n                        ++world;\n                        offsetX = worldWidth * world;\n                        transforms.push(this.getRenderTransform(center, resolution, rotation, HIT_DETECT_RESOLUTION, width, height, offsetX).slice());\n                        startX -= worldWidth;\n                    }\n                }\n                this.hitDetectionImageData_ = createHitDetectionImageData(size, transforms, this.renderedFeatures_, layer.getStyleFunction(), extent, resolution, rotation);\n            }\n            resolve(hitDetect(pixel, this.renderedFeatures_, this.hitDetectionImageData_));\n        }.bind(this));\n    };\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {import(\"../vector.js\").FeatureCallback<T>} callback Feature callback.\n     * @param {Array<import(\"../Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    CanvasVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, callback, matches) {\n        var _this = this;\n        if (!this.replayGroup_) {\n            return undefined;\n        }\n        var resolution = frameState.viewState.resolution;\n        var rotation = frameState.viewState.rotation;\n        var layer = this.getLayer();\n        /** @type {!Object<string, import(\"../Map.js\").HitMatch<T>|true>} */\n        var features = {};\n        /**\n         * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n         * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n         * @param {number} distanceSq The squared distance to the click position\n         * @return {T|undefined} Callback result.\n         */\n        var featureCallback = function (feature, geometry, distanceSq) {\n            var key = getUid(feature);\n            var match = features[key];\n            if (!match) {\n                if (distanceSq === 0) {\n                    features[key] = true;\n                    return callback(feature, layer, geometry);\n                }\n                matches.push((features[key] = {\n                    feature: feature,\n                    layer: layer,\n                    geometry: geometry,\n                    distanceSq: distanceSq,\n                    callback: callback,\n                }));\n            }\n            else if (match !== true && distanceSq < match.distanceSq) {\n                if (distanceSq === 0) {\n                    features[key] = true;\n                    matches.splice(matches.lastIndexOf(match), 1);\n                    return callback(feature, layer, geometry);\n                }\n                match.geometry = geometry;\n                match.distanceSq = distanceSq;\n            }\n            return undefined;\n        };\n        var result;\n        var executorGroups = [this.replayGroup_];\n        if (this.declutterExecutorGroup) {\n            executorGroups.push(this.declutterExecutorGroup);\n        }\n        executorGroups.some(function (executorGroup) {\n            return (result = executorGroup.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, featureCallback, executorGroup === _this.declutterExecutorGroup\n                ? frameState.declutterTree.all().map(function (item) { return item.value; })\n                : null));\n        });\n        return result;\n    };\n    /**\n     * Perform action necessary to get the layer rendered after new fonts have loaded\n     */\n    CanvasVectorLayerRenderer.prototype.handleFontsChanged = function () {\n        var layer = this.getLayer();\n        if (layer.getVisible() && this.replayGroup_) {\n            layer.changed();\n        }\n    };\n    /**\n     * Handle changes in image style state.\n     * @param {import(\"../../events/Event.js\").default} event Image style change event.\n     * @private\n     */\n    CanvasVectorLayerRenderer.prototype.handleStyleImageChange_ = function (event) {\n        this.renderIfReadyAndVisible();\n    };\n    /**\n     * Determine whether render should be called.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    CanvasVectorLayerRenderer.prototype.prepareFrame = function (frameState) {\n        var vectorLayer = this.getLayer();\n        var vectorSource = vectorLayer.getSource();\n        if (!vectorSource) {\n            return false;\n        }\n        var animating = frameState.viewHints[ViewHint.ANIMATING];\n        var interacting = frameState.viewHints[ViewHint.INTERACTING];\n        var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();\n        var updateWhileInteracting = vectorLayer.getUpdateWhileInteracting();\n        if ((!this.dirty_ && !updateWhileAnimating && animating) ||\n            (!updateWhileInteracting && interacting)) {\n            this.animatingOrInteracting_ = true;\n            return true;\n        }\n        this.animatingOrInteracting_ = false;\n        var frameStateExtent = frameState.extent;\n        var viewState = frameState.viewState;\n        var projection = viewState.projection;\n        var resolution = viewState.resolution;\n        var pixelRatio = frameState.pixelRatio;\n        var vectorLayerRevision = vectorLayer.getRevision();\n        var vectorLayerRenderBuffer = vectorLayer.getRenderBuffer();\n        var vectorLayerRenderOrder = vectorLayer.getRenderOrder();\n        if (vectorLayerRenderOrder === undefined) {\n            vectorLayerRenderOrder = defaultRenderOrder;\n        }\n        var center = viewState.center.slice();\n        var extent = buffer(frameStateExtent, vectorLayerRenderBuffer * resolution);\n        var renderedExtent = extent.slice();\n        var loadExtents = [extent.slice()];\n        var projectionExtent = projection.getExtent();\n        if (vectorSource.getWrapX() &&\n            projection.canWrapX() &&\n            !containsExtent(projectionExtent, frameState.extent)) {\n            // For the replay group, we need an extent that intersects the real world\n            // (-180° to +180°). To support geometries in a coordinate range from -540°\n            // to +540°, we add at least 1 world width on each side of the projection\n            // extent. If the viewport is wider than the world, we need to add half of\n            // the viewport width to make sure we cover the whole viewport.\n            var worldWidth = getWidth(projectionExtent);\n            var gutter = Math.max(getWidth(extent) / 2, worldWidth);\n            extent[0] = projectionExtent[0] - gutter;\n            extent[2] = projectionExtent[2] + gutter;\n            wrapCoordinateX(center, projection);\n            var loadExtent = wrapExtentX(loadExtents[0], projection);\n            // If the extent crosses the date line, we load data for both edges of the worlds\n            if (loadExtent[0] < projectionExtent[0] &&\n                loadExtent[2] < projectionExtent[2]) {\n                loadExtents.push([\n                    loadExtent[0] + worldWidth,\n                    loadExtent[1],\n                    loadExtent[2] + worldWidth,\n                    loadExtent[3],\n                ]);\n            }\n            else if (loadExtent[0] > projectionExtent[0] &&\n                loadExtent[2] > projectionExtent[2]) {\n                loadExtents.push([\n                    loadExtent[0] - worldWidth,\n                    loadExtent[1],\n                    loadExtent[2] - worldWidth,\n                    loadExtent[3],\n                ]);\n            }\n        }\n        if (!this.dirty_ &&\n            this.renderedResolution_ == resolution &&\n            this.renderedRevision_ == vectorLayerRevision &&\n            this.renderedRenderOrder_ == vectorLayerRenderOrder &&\n            containsExtent(this.wrappedRenderedExtent_, extent)) {\n            if (!equals(this.renderedExtent_, renderedExtent)) {\n                this.hitDetectionImageData_ = null;\n                this.renderedExtent_ = renderedExtent;\n            }\n            this.renderedCenter_ = center;\n            this.replayGroupChanged = false;\n            return true;\n        }\n        this.replayGroup_ = null;\n        this.dirty_ = false;\n        var replayGroup = new CanvasBuilderGroup(getRenderTolerance(resolution, pixelRatio), extent, resolution, pixelRatio);\n        var declutterBuilderGroup;\n        if (this.getLayer().getDeclutter()) {\n            declutterBuilderGroup = new CanvasBuilderGroup(getRenderTolerance(resolution, pixelRatio), extent, resolution, pixelRatio);\n        }\n        var userProjection = getUserProjection();\n        var userTransform;\n        if (userProjection) {\n            for (var i = 0, ii = loadExtents.length; i < ii; ++i) {\n                vectorSource.loadFeatures(toUserExtent(loadExtents[i], projection), resolution, userProjection);\n            }\n            userTransform = getTransformFromProjections(userProjection, projection);\n        }\n        else {\n            for (var i = 0, ii = loadExtents.length; i < ii; ++i) {\n                vectorSource.loadFeatures(loadExtents[i], resolution, projection);\n            }\n        }\n        var squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);\n        var render = \n        /**\n         * @param {import(\"../../Feature.js\").default} feature Feature.\n         * @this {CanvasVectorLayerRenderer}\n         */\n        function (feature) {\n            var styles;\n            var styleFunction = feature.getStyleFunction() || vectorLayer.getStyleFunction();\n            if (styleFunction) {\n                styles = styleFunction(feature, resolution);\n            }\n            if (styles) {\n                var dirty = this.renderFeature(feature, squaredTolerance, styles, replayGroup, userTransform, declutterBuilderGroup);\n                this.dirty_ = this.dirty_ || dirty;\n            }\n        }.bind(this);\n        var userExtent = toUserExtent(extent, projection);\n        /** @type {Array<import(\"../../Feature.js\").default>} */\n        var features = vectorSource.getFeaturesInExtent(userExtent);\n        if (vectorLayerRenderOrder) {\n            features.sort(vectorLayerRenderOrder);\n        }\n        for (var i = 0, ii = features.length; i < ii; ++i) {\n            render(features[i]);\n        }\n        this.renderedFeatures_ = features;\n        var replayGroupInstructions = replayGroup.finish();\n        var executorGroup = new ExecutorGroup(extent, resolution, pixelRatio, vectorSource.getOverlaps(), replayGroupInstructions, vectorLayer.getRenderBuffer());\n        if (declutterBuilderGroup) {\n            this.declutterExecutorGroup = new ExecutorGroup(extent, resolution, pixelRatio, vectorSource.getOverlaps(), declutterBuilderGroup.finish(), vectorLayer.getRenderBuffer());\n        }\n        this.renderedResolution_ = resolution;\n        this.renderedRevision_ = vectorLayerRevision;\n        this.renderedRenderOrder_ = vectorLayerRenderOrder;\n        this.renderedExtent_ = renderedExtent;\n        this.wrappedRenderedExtent_ = extent;\n        this.renderedCenter_ = center;\n        this.renderedProjection_ = projection;\n        this.replayGroup_ = executorGroup;\n        this.hitDetectionImageData_ = null;\n        this.replayGroupChanged = true;\n        return true;\n    };\n    /**\n     * @param {import(\"../../Feature.js\").default} feature Feature.\n     * @param {number} squaredTolerance Squared render tolerance.\n     * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or array of styles.\n     * @param {import(\"../../render/canvas/BuilderGroup.js\").default} builderGroup Builder group.\n     * @param {import(\"../../proj.js\").TransformFunction} [opt_transform] Transform from user to view projection.\n     * @param {import(\"../../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n     * @return {boolean} `true` if an image is loading.\n     */\n    CanvasVectorLayerRenderer.prototype.renderFeature = function (feature, squaredTolerance, styles, builderGroup, opt_transform, opt_declutterBuilderGroup) {\n        if (!styles) {\n            return false;\n        }\n        var loading = false;\n        if (Array.isArray(styles)) {\n            for (var i = 0, ii = styles.length; i < ii; ++i) {\n                loading =\n                    renderFeature(builderGroup, feature, styles[i], squaredTolerance, this.boundHandleStyleImageChange_, opt_transform, opt_declutterBuilderGroup) || loading;\n            }\n        }\n        else {\n            loading = renderFeature(builderGroup, feature, styles, squaredTolerance, this.boundHandleStyleImageChange_, opt_transform, opt_declutterBuilderGroup);\n        }\n        return loading;\n    };\n    return CanvasVectorLayerRenderer;\n}(CanvasLayerRenderer));\nexport default CanvasVectorLayerRenderer;\n//# sourceMappingURL=VectorLayer.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/Layer\n */\nimport EventType from '../events/EventType.js';\nimport ImageState from '../ImageState.js';\nimport Observable from '../Observable.js';\nimport SourceState from '../source/State.js';\nimport { abstract } from '../util.js';\n/**\n * @template {import(\"../layer/Layer.js\").default} LayerType\n */\nvar LayerRenderer = /** @class */ (function (_super) {\n    __extends(LayerRenderer, _super);\n    /**\n     * @param {LayerType} layer Layer.\n     */\n    function LayerRenderer(layer) {\n        var _this = _super.call(this) || this;\n        /** @private */\n        _this.boundHandleImageChange_ = _this.handleImageChange_.bind(_this);\n        /**\n         * @protected\n         * @type {LayerType}\n         */\n        _this.layer_ = layer;\n        /**\n         * @type {import(\"../render/canvas/ExecutorGroup\").default}\n         */\n        _this.declutterExecutorGroup = null;\n        return _this;\n    }\n    /**\n     * Asynchronous layer level hit detection.\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with\n     * an array of features.\n     */\n    LayerRenderer.prototype.getFeatures = function (pixel) {\n        return abstract();\n    };\n    /**\n     * Determine whether render should be called.\n     * @abstract\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    LayerRenderer.prototype.prepareFrame = function (frameState) {\n        return abstract();\n    };\n    /**\n     * Render the layer.\n     * @abstract\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target that may be used to render content to.\n     * @return {HTMLElement} The rendered element.\n     */\n    LayerRenderer.prototype.renderFrame = function (frameState, target) {\n        return abstract();\n    };\n    /**\n     * @param {Object<number, Object<string, import(\"../Tile.js\").default>>} tiles Lookup of loaded tiles by zoom level.\n     * @param {number} zoom Zoom level.\n     * @param {import(\"../Tile.js\").default} tile Tile.\n     * @return {boolean|void} If `false`, the tile will not be considered loaded.\n     */\n    LayerRenderer.prototype.loadedTileCallback = function (tiles, zoom, tile) {\n        if (!tiles[zoom]) {\n            tiles[zoom] = {};\n        }\n        tiles[zoom][tile.tileCoord.toString()] = tile;\n        return undefined;\n    };\n    /**\n     * Create a function that adds loaded tiles to the tile lookup.\n     * @param {import(\"../source/Tile.js\").default} source Tile source.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection of the tiles.\n     * @param {Object<number, Object<string, import(\"../Tile.js\").default>>} tiles Lookup of loaded tiles by zoom level.\n     * @return {function(number, import(\"../TileRange.js\").default):boolean} A function that can be\n     *     called with a zoom level and a tile range to add loaded tiles to the lookup.\n     * @protected\n     */\n    LayerRenderer.prototype.createLoadedTileFinder = function (source, projection, tiles) {\n        return (\n        /**\n         * @param {number} zoom Zoom level.\n         * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n         * @return {boolean} The tile range is fully loaded.\n         * @this {LayerRenderer}\n         */\n        function (zoom, tileRange) {\n            var callback = this.loadedTileCallback.bind(this, tiles, zoom);\n            return source.forEachLoadedTile(projection, zoom, tileRange, callback);\n        }.bind(this));\n    };\n    /**\n     * @abstract\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {import(\"./vector.js\").FeatureCallback<T>} callback Feature callback.\n     * @param {Array<import(\"./Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    LayerRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, callback, matches) {\n        return undefined;\n    };\n    /**\n     * @abstract\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @return {Uint8ClampedArray|Uint8Array} The result.  If there is no data at the pixel\n     *    location, null will be returned.  If there is data, but pixel values cannot be\n     *    returned, and empty array will be returned.\n     */\n    LayerRenderer.prototype.getDataAtPixel = function (pixel, frameState, hitTolerance) {\n        return abstract();\n    };\n    /**\n     * @return {LayerType} Layer.\n     */\n    LayerRenderer.prototype.getLayer = function () {\n        return this.layer_;\n    };\n    /**\n     * Perform action necessary to get the layer rendered after new fonts have loaded\n     * @abstract\n     */\n    LayerRenderer.prototype.handleFontsChanged = function () { };\n    /**\n     * Handle changes in image state.\n     * @param {import(\"../events/Event.js\").default} event Image change event.\n     * @private\n     */\n    LayerRenderer.prototype.handleImageChange_ = function (event) {\n        var image = /** @type {import(\"../Image.js\").default} */ (event.target);\n        if (image.getState() === ImageState.LOADED) {\n            this.renderIfReadyAndVisible();\n        }\n    };\n    /**\n     * Load the image if not already loaded, and register the image change\n     * listener if needed.\n     * @param {import(\"../ImageBase.js\").default} image Image.\n     * @return {boolean} `true` if the image is already loaded, `false` otherwise.\n     * @protected\n     */\n    LayerRenderer.prototype.loadImage = function (image) {\n        var imageState = image.getState();\n        if (imageState != ImageState.LOADED && imageState != ImageState.ERROR) {\n            image.addEventListener(EventType.CHANGE, this.boundHandleImageChange_);\n        }\n        if (imageState == ImageState.IDLE) {\n            image.load();\n            imageState = image.getState();\n        }\n        return imageState == ImageState.LOADED;\n    };\n    /**\n     * @protected\n     */\n    LayerRenderer.prototype.renderIfReadyAndVisible = function () {\n        var layer = this.getLayer();\n        if (layer.getVisible() && layer.getSourceState() == SourceState.READY) {\n            layer.changed();\n        }\n    };\n    return LayerRenderer;\n}(Observable));\nexport default LayerRenderer;\n//# sourceMappingURL=Layer.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Base\n */\nimport BaseObject from '../Object.js';\nimport LayerProperty from './Property.js';\nimport { abstract } from '../util.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { clamp } from '../math.js';\n/**\n * @typedef {import(\"../ObjectEventType\").Types|'change:extent'|'change:maxResolution'|'change:maxZoom'|\n *    'change:minResolution'|'change:minZoom'|'change:opacity'|'change:visible'|'change:zIndex'} BaseLayerObjectEventTypes\n */\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable\").OnSignature<BaseLayerObjectEventTypes, import(\"../Object\").ObjectEvent, Return> &\n *   import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|BaseLayerObjectEventTypes, Return>} BaseLayerOnSignature\n */\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Note that with {@link module:ol/layer/Base} and all its subclasses, any property set in\n * the options is set as a {@link module:ol/Object} property on the layer object, so\n * is observable, and has get/set accessors.\n *\n * @api\n */\nvar BaseLayer = /** @class */ (function (_super) {\n    __extends(BaseLayer, _super);\n    /**\n     * @param {Options} options Layer options.\n     */\n    function BaseLayer(options) {\n        var _this = _super.call(this) || this;\n        /***\n         * @type {BaseLayerOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {BaseLayerOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {BaseLayerOnSignature<void>}\n         */\n        _this.un;\n        /**\n         * @type {Object<string, *>}\n         */\n        var properties = assign({}, options);\n        if (typeof options.properties === 'object') {\n            delete properties.properties;\n            assign(properties, options.properties);\n        }\n        properties[LayerProperty.OPACITY] =\n            options.opacity !== undefined ? options.opacity : 1;\n        assert(typeof properties[LayerProperty.OPACITY] === 'number', 64); // Layer opacity must be a number\n        properties[LayerProperty.VISIBLE] =\n            options.visible !== undefined ? options.visible : true;\n        properties[LayerProperty.Z_INDEX] = options.zIndex;\n        properties[LayerProperty.MAX_RESOLUTION] =\n            options.maxResolution !== undefined ? options.maxResolution : Infinity;\n        properties[LayerProperty.MIN_RESOLUTION] =\n            options.minResolution !== undefined ? options.minResolution : 0;\n        properties[LayerProperty.MIN_ZOOM] =\n            options.minZoom !== undefined ? options.minZoom : -Infinity;\n        properties[LayerProperty.MAX_ZOOM] =\n            options.maxZoom !== undefined ? options.maxZoom : Infinity;\n        /**\n         * @type {string}\n         * @private\n         */\n        _this.className_ =\n            properties.className !== undefined ? options.className : 'ol-layer';\n        delete properties.className;\n        _this.setProperties(properties);\n        /**\n         * @type {import(\"./Layer.js\").State}\n         * @private\n         */\n        _this.state_ = null;\n        return _this;\n    }\n    /**\n     * @return {string} CSS class name.\n     */\n    BaseLayer.prototype.getClassName = function () {\n        return this.className_;\n    };\n    /**\n     * This method is not meant to be called by layers or layer renderers because the state\n     * is incorrect if the layer is included in a layer group.\n     *\n     * @param {boolean} [opt_managed] Layer is managed.\n     * @return {import(\"./Layer.js\").State} Layer state.\n     */\n    BaseLayer.prototype.getLayerState = function (opt_managed) {\n        /** @type {import(\"./Layer.js\").State} */\n        var state = this.state_ ||\n            /** @type {?} */ ({\n                layer: this,\n                managed: opt_managed === undefined ? true : opt_managed,\n            });\n        var zIndex = this.getZIndex();\n        state.opacity = clamp(Math.round(this.getOpacity() * 100) / 100, 0, 1);\n        state.sourceState = this.getSourceState();\n        state.visible = this.getVisible();\n        state.extent = this.getExtent();\n        state.zIndex = zIndex === undefined && !state.managed ? Infinity : zIndex;\n        state.maxResolution = this.getMaxResolution();\n        state.minResolution = Math.max(this.getMinResolution(), 0);\n        state.minZoom = this.getMinZoom();\n        state.maxZoom = this.getMaxZoom();\n        this.state_ = state;\n        return state;\n    };\n    /**\n     * @abstract\n     * @param {Array<import(\"./Layer.js\").default>} [opt_array] Array of layers (to be\n     *     modified in place).\n     * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n     */\n    BaseLayer.prototype.getLayersArray = function (opt_array) {\n        return abstract();\n    };\n    /**\n     * @abstract\n     * @param {Array<import(\"./Layer.js\").State>} [opt_states] Optional list of layer\n     *     states (to be modified in place).\n     * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n     */\n    BaseLayer.prototype.getLayerStatesArray = function (opt_states) {\n        return abstract();\n    };\n    /**\n     * Return the {@link module:ol/extent~Extent extent} of the layer or `undefined` if it\n     * will be visible regardless of extent.\n     * @return {import(\"../extent.js\").Extent|undefined} The layer extent.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getExtent = function () {\n        return /** @type {import(\"../extent.js\").Extent|undefined} */ (this.get(LayerProperty.EXTENT));\n    };\n    /**\n     * Return the maximum resolution of the layer.\n     * @return {number} The maximum resolution of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getMaxResolution = function () {\n        return /** @type {number} */ (this.get(LayerProperty.MAX_RESOLUTION));\n    };\n    /**\n     * Return the minimum resolution of the layer.\n     * @return {number} The minimum resolution of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getMinResolution = function () {\n        return /** @type {number} */ (this.get(LayerProperty.MIN_RESOLUTION));\n    };\n    /**\n     * Return the minimum zoom level of the layer.\n     * @return {number} The minimum zoom level of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getMinZoom = function () {\n        return /** @type {number} */ (this.get(LayerProperty.MIN_ZOOM));\n    };\n    /**\n     * Return the maximum zoom level of the layer.\n     * @return {number} The maximum zoom level of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getMaxZoom = function () {\n        return /** @type {number} */ (this.get(LayerProperty.MAX_ZOOM));\n    };\n    /**\n     * Return the opacity of the layer (between 0 and 1).\n     * @return {number} The opacity of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getOpacity = function () {\n        return /** @type {number} */ (this.get(LayerProperty.OPACITY));\n    };\n    /**\n     * @abstract\n     * @return {import(\"../source/State.js\").default} Source state.\n     */\n    BaseLayer.prototype.getSourceState = function () {\n        return abstract();\n    };\n    /**\n     * Return the visibility of the layer (`true` or `false`).\n     * @return {boolean} The visibility of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getVisible = function () {\n        return /** @type {boolean} */ (this.get(LayerProperty.VISIBLE));\n    };\n    /**\n     * Return the Z-index of the layer, which is used to order layers before\n     * rendering. The default Z-index is 0.\n     * @return {number} The Z-index of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.getZIndex = function () {\n        return /** @type {number} */ (this.get(LayerProperty.Z_INDEX));\n    };\n    /**\n     * Set the extent at which the layer is visible.  If `undefined`, the layer\n     * will be visible at all extents.\n     * @param {import(\"../extent.js\").Extent|undefined} extent The extent of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setExtent = function (extent) {\n        this.set(LayerProperty.EXTENT, extent);\n    };\n    /**\n     * Set the maximum resolution at which the layer is visible.\n     * @param {number} maxResolution The maximum resolution of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setMaxResolution = function (maxResolution) {\n        this.set(LayerProperty.MAX_RESOLUTION, maxResolution);\n    };\n    /**\n     * Set the minimum resolution at which the layer is visible.\n     * @param {number} minResolution The minimum resolution of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setMinResolution = function (minResolution) {\n        this.set(LayerProperty.MIN_RESOLUTION, minResolution);\n    };\n    /**\n     * Set the maximum zoom (exclusive) at which the layer is visible.\n     * Note that the zoom levels for layer visibility are based on the\n     * view zoom level, which may be different from a tile source zoom level.\n     * @param {number} maxZoom The maximum zoom of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setMaxZoom = function (maxZoom) {\n        this.set(LayerProperty.MAX_ZOOM, maxZoom);\n    };\n    /**\n     * Set the minimum zoom (inclusive) at which the layer is visible.\n     * Note that the zoom levels for layer visibility are based on the\n     * view zoom level, which may be different from a tile source zoom level.\n     * @param {number} minZoom The minimum zoom of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setMinZoom = function (minZoom) {\n        this.set(LayerProperty.MIN_ZOOM, minZoom);\n    };\n    /**\n     * Set the opacity of the layer, allowed values range from 0 to 1.\n     * @param {number} opacity The opacity of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setOpacity = function (opacity) {\n        assert(typeof opacity === 'number', 64); // Layer opacity must be a number\n        this.set(LayerProperty.OPACITY, opacity);\n    };\n    /**\n     * Set the visibility of the layer (`true` or `false`).\n     * @param {boolean} visible The visibility of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setVisible = function (visible) {\n        this.set(LayerProperty.VISIBLE, visible);\n    };\n    /**\n     * Set Z-index of the layer, which is used to order layers before rendering.\n     * The default Z-index is 0.\n     * @param {number} zindex The z-index of the layer.\n     * @observable\n     * @api\n     */\n    BaseLayer.prototype.setZIndex = function (zindex) {\n        this.set(LayerProperty.Z_INDEX, zindex);\n    };\n    /**\n     * Clean up.\n     */\n    BaseLayer.prototype.disposeInternal = function () {\n        if (this.state_) {\n            this.state_.layer = null;\n            this.state_ = null;\n        }\n        _super.prototype.disposeInternal.call(this);\n    };\n    return BaseLayer;\n}(BaseObject));\nexport default BaseLayer;\n//# sourceMappingURL=Base.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/ImageLayer\n */\nimport CanvasLayerRenderer from './Layer.js';\nimport ViewHint from '../../ViewHint.js';\nimport { ENABLE_RASTER_REPROJECTION } from '../../reproj/common.js';\nimport { assign } from '../../obj.js';\nimport { compose as composeTransform, makeInverse } from '../../transform.js';\nimport { containsExtent, intersects as intersectsExtent } from '../../extent.js';\nimport { fromUserExtent } from '../../proj.js';\nimport { getIntersection, isEmpty } from '../../extent.js';\nimport { toString as toTransformString } from '../../transform.js';\n/**\n * @classdesc\n * Canvas renderer for image layers.\n * @api\n */\nvar CanvasImageLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasImageLayerRenderer, _super);\n    /**\n     * @param {import(\"../../layer/Image.js\").default} imageLayer Image layer.\n     */\n    function CanvasImageLayerRenderer(imageLayer) {\n        var _this = _super.call(this, imageLayer) || this;\n        /**\n         * @protected\n         * @type {?import(\"../../ImageBase.js\").default}\n         */\n        _this.image_ = null;\n        return _this;\n    }\n    /**\n     * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n     */\n    CanvasImageLayerRenderer.prototype.getImage = function () {\n        return !this.image_ ? null : this.image_.getImage();\n    };\n    /**\n     * Determine whether render should be called.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    CanvasImageLayerRenderer.prototype.prepareFrame = function (frameState) {\n        var layerState = frameState.layerStatesArray[frameState.layerIndex];\n        var pixelRatio = frameState.pixelRatio;\n        var viewState = frameState.viewState;\n        var viewResolution = viewState.resolution;\n        var imageSource = this.getLayer().getSource();\n        var hints = frameState.viewHints;\n        var renderedExtent = frameState.extent;\n        if (layerState.extent !== undefined) {\n            renderedExtent = getIntersection(renderedExtent, fromUserExtent(layerState.extent, viewState.projection));\n        }\n        if (!hints[ViewHint.ANIMATING] &&\n            !hints[ViewHint.INTERACTING] &&\n            !isEmpty(renderedExtent)) {\n            if (imageSource) {\n                var projection = viewState.projection;\n                if (!ENABLE_RASTER_REPROJECTION) {\n                    var sourceProjection = imageSource.getProjection();\n                    if (sourceProjection) {\n                        projection = sourceProjection;\n                    }\n                }\n                var image = imageSource.getImage(renderedExtent, viewResolution, pixelRatio, projection);\n                if (image && this.loadImage(image)) {\n                    this.image_ = image;\n                }\n            }\n            else {\n                this.image_ = null;\n            }\n        }\n        return !!this.image_;\n    };\n    /**\n     * Render the layer.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target that may be used to render content to.\n     * @return {HTMLElement} The rendered element.\n     */\n    CanvasImageLayerRenderer.prototype.renderFrame = function (frameState, target) {\n        var image = this.image_;\n        var imageExtent = image.getExtent();\n        var imageResolution = image.getResolution();\n        var imagePixelRatio = image.getPixelRatio();\n        var layerState = frameState.layerStatesArray[frameState.layerIndex];\n        var pixelRatio = frameState.pixelRatio;\n        var viewState = frameState.viewState;\n        var viewCenter = viewState.center;\n        var viewResolution = viewState.resolution;\n        var size = frameState.size;\n        var scale = (pixelRatio * imageResolution) / (viewResolution * imagePixelRatio);\n        var width = Math.round(size[0] * pixelRatio);\n        var height = Math.round(size[1] * pixelRatio);\n        var rotation = viewState.rotation;\n        if (rotation) {\n            var size_1 = Math.round(Math.sqrt(width * width + height * height));\n            width = size_1;\n            height = size_1;\n        }\n        // set forward and inverse pixel transforms\n        composeTransform(this.pixelTransform, frameState.size[0] / 2, frameState.size[1] / 2, 1 / pixelRatio, 1 / pixelRatio, rotation, -width / 2, -height / 2);\n        makeInverse(this.inversePixelTransform, this.pixelTransform);\n        var canvasTransform = toTransformString(this.pixelTransform);\n        this.useContainer(target, canvasTransform, layerState.opacity);\n        var context = this.context;\n        var canvas = context.canvas;\n        if (canvas.width != width || canvas.height != height) {\n            canvas.width = width;\n            canvas.height = height;\n        }\n        else if (!this.containerReused) {\n            context.clearRect(0, 0, width, height);\n        }\n        // clipped rendering if layer extent is set\n        var clipped = false;\n        var render = true;\n        if (layerState.extent) {\n            var layerExtent = fromUserExtent(layerState.extent, viewState.projection);\n            render = intersectsExtent(layerExtent, frameState.extent);\n            clipped = render && !containsExtent(layerExtent, frameState.extent);\n            if (clipped) {\n                this.clipUnrotated(context, frameState, layerExtent);\n            }\n        }\n        var img = image.getImage();\n        var transform = composeTransform(this.tempTransform, width / 2, height / 2, scale, scale, 0, (imagePixelRatio * (imageExtent[0] - viewCenter[0])) / imageResolution, (imagePixelRatio * (viewCenter[1] - imageExtent[3])) / imageResolution);\n        this.renderedResolution = (imageResolution * pixelRatio) / imagePixelRatio;\n        var dw = img.width * transform[0];\n        var dh = img.height * transform[3];\n        assign(context, this.getLayer().getSource().getContextOptions());\n        this.preRender(context, frameState);\n        if (render && dw >= 0.5 && dh >= 0.5) {\n            var dx = transform[4];\n            var dy = transform[5];\n            var opacity = layerState.opacity;\n            var previousAlpha = void 0;\n            if (opacity !== 1) {\n                previousAlpha = context.globalAlpha;\n                context.globalAlpha = opacity;\n            }\n            context.drawImage(img, 0, 0, +img.width, +img.height, Math.round(dx), Math.round(dy), Math.round(dw), Math.round(dh));\n            if (opacity !== 1) {\n                context.globalAlpha = previousAlpha;\n            }\n        }\n        this.postRender(context, frameState);\n        if (clipped) {\n            context.restore();\n        }\n        if (canvasTransform !== canvas.style.transform) {\n            canvas.style.transform = canvasTransform;\n        }\n        return this.container;\n    };\n    return CanvasImageLayerRenderer;\n}(CanvasLayerRenderer));\nexport default CanvasImageLayerRenderer;\n//# sourceMappingURL=ImageLayer.js.map","var fontWeights = {\n  thin: 100,\n  hairline: 100,\n  'ultra-light': 100,\n  'extra-light': 100,\n  light: 200,\n  book: 300,\n  regular: 400,\n  normal: 400,\n  plain: 400,\n  roman: 400,\n  standard: 400,\n  medium: 500,\n  'semi-bold': 600,\n  'demi-bold': 600,\n  bold: 700,\n  heavy: 800,\n  black: 800,\n  'extra-bold': 800,\n  'ultra-black': 900,\n  'extra-black': 900,\n  'ultra-bold': 900,\n  'heavy-black': 900,\n  fat: 900,\n  poster: 900\n};\nvar sp = ' ';\nvar italicRE = /(italic|oblique)$/i;\n\nvar fontCache = {};\n\nmodule.exports = function(fonts, size, lineHeight) {\n  var cssData = fontCache[fonts];\n  if (!cssData) {\n    if (!Array.isArray(fonts)) {\n      fonts = [fonts];\n    }\n    var weight = 400;\n    var style = 'normal';\n    var fontFamilies = [];\n    var haveWeight, haveStyle;\n    for (var i = 0, ii = fonts.length; i < ii; ++i) {\n      var font = fonts[i];\n      var parts = font.split(' ');\n      var maybeWeight = parts[parts.length - 1].toLowerCase();\n      if (maybeWeight == 'normal' || maybeWeight == 'italic' || maybeWeight == 'oblique') {\n        style = haveStyle ? style : maybeWeight;\n        parts.pop();\n        maybeWeight = parts[parts.length - 1].toLowerCase();\n      } else if (italicRE.test(maybeWeight)) {\n        maybeWeight = maybeWeight.replace(italicRE, '');\n        style = haveStyle ? style : parts[parts.length - 1].replace(maybeWeight, '');\n      }\n      for (var w in fontWeights) {\n        if (maybeWeight == w || maybeWeight == w.replace('-', '') || maybeWeight == w.replace('-', sp)) {\n          weight = haveWeight ? weight : fontWeights[w];\n          parts.pop();\n          break;\n        }\n      }\n      if (!haveWeight && typeof maybeWeight == 'number') {\n        weight = maybeWeight;\n      }\n      var fontFamily = parts.join(sp)\n        .replace('Klokantech Noto Sans', 'Noto Sans');\n      if (fontFamily.indexOf(sp) !== -1) {\n        fontFamily = '\"' + fontFamily + '\"';\n      }\n      fontFamilies.push(fontFamily);\n    }\n    // CSS font property: font-style font-weight font-size/line-height font-family\n    cssData = fontCache[fonts] = [style, weight, fontFamilies];\n  }\n  return cssData[0] + sp + cssData[1] + sp + size + 'px' + (lineHeight ? '/' + lineHeight : '') + sp + cssData[2];\n};\n","/**\n * @module ol/geom/flat/center\n */\nimport { createEmpty, createOrUpdateFromFlatCoordinates } from '../../extent.js';\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @return {Array<number>} Flat centers.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n    var flatCenters = [];\n    var extent = createEmpty();\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        extent = createOrUpdateFromFlatCoordinates(flatCoordinates, offset, ends[0], stride);\n        flatCenters.push((extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2);\n        offset = ends[ends.length - 1];\n    }\n    return flatCenters;\n}\n//# sourceMappingURL=center.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/TileLayer\n */\nimport CanvasLayerRenderer from './Layer.js';\nimport TileRange from '../../TileRange.js';\nimport TileState from '../../TileState.js';\nimport { apply as applyTransform, compose as composeTransform, makeInverse, } from '../../transform.js';\nimport { assign } from '../../obj.js';\nimport { createEmpty, equals, getIntersection, getTopLeft, } from '../../extent.js';\nimport { fromUserExtent } from '../../proj.js';\nimport { getUid } from '../../util.js';\nimport { numberSafeCompareFunction } from '../../array.js';\nimport { toString as toTransformString } from '../../transform.js';\n/**\n * @classdesc\n * Canvas renderer for tile layers.\n * @api\n */\nvar CanvasTileLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasTileLayerRenderer, _super);\n    /**\n     * @param {import(\"../../layer/Tile.js\").default|import(\"../../layer/VectorTile.js\").default} tileLayer Tile layer.\n     */\n    function CanvasTileLayerRenderer(tileLayer) {\n        var _this = _super.call(this, tileLayer) || this;\n        /**\n         * Rendered extent has changed since the previous `renderFrame()` call\n         * @type {boolean}\n         */\n        _this.extentChanged = true;\n        /**\n         * @private\n         * @type {?import(\"../../extent.js\").Extent}\n         */\n        _this.renderedExtent_ = null;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.renderedPixelRatio;\n        /**\n         * @protected\n         * @type {import(\"../../proj/Projection.js\").default}\n         */\n        _this.renderedProjection = null;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.renderedRevision;\n        /**\n         * @protected\n         * @type {!Array<import(\"../../Tile.js\").default>}\n         */\n        _this.renderedTiles = [];\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.newTiles_ = false;\n        /**\n         * @protected\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.tmpExtent = createEmpty();\n        /**\n         * @private\n         * @type {import(\"../../TileRange.js\").default}\n         */\n        _this.tmpTileRange_ = new TileRange(0, 0, 0, 0);\n        return _this;\n    }\n    /**\n     * @protected\n     * @param {import(\"../../Tile.js\").default} tile Tile.\n     * @return {boolean} Tile is drawable.\n     */\n    CanvasTileLayerRenderer.prototype.isDrawableTile = function (tile) {\n        var tileLayer = this.getLayer();\n        var tileState = tile.getState();\n        var useInterimTilesOnError = tileLayer.getUseInterimTilesOnError();\n        return (tileState == TileState.LOADED ||\n            tileState == TileState.EMPTY ||\n            (tileState == TileState.ERROR && !useInterimTilesOnError));\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {!import(\"../../Tile.js\").default} Tile.\n     */\n    CanvasTileLayerRenderer.prototype.getTile = function (z, x, y, frameState) {\n        var pixelRatio = frameState.pixelRatio;\n        var projection = frameState.viewState.projection;\n        var tileLayer = this.getLayer();\n        var tileSource = tileLayer.getSource();\n        var tile = tileSource.getTile(z, x, y, pixelRatio, projection);\n        if (tile.getState() == TileState.ERROR) {\n            if (!tileLayer.getUseInterimTilesOnError()) {\n                // When useInterimTilesOnError is false, we consider the error tile as loaded.\n                tile.setState(TileState.LOADED);\n            }\n            else if (tileLayer.getPreload() > 0) {\n                // Preloaded tiles for lower resolutions might have finished loading.\n                this.newTiles_ = true;\n            }\n        }\n        if (!this.isDrawableTile(tile)) {\n            tile = tile.getInterimTile();\n        }\n        return tile;\n    };\n    /**\n     * @param {Object<number, Object<string, import(\"../../Tile.js\").default>>} tiles Lookup of loaded tiles by zoom level.\n     * @param {number} zoom Zoom level.\n     * @param {import(\"../../Tile.js\").default} tile Tile.\n     * @return {boolean|void} If `false`, the tile will not be considered loaded.\n     */\n    CanvasTileLayerRenderer.prototype.loadedTileCallback = function (tiles, zoom, tile) {\n        if (this.isDrawableTile(tile)) {\n            return _super.prototype.loadedTileCallback.call(this, tiles, zoom, tile);\n        }\n        return false;\n    };\n    /**\n     * Determine whether render should be called.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    CanvasTileLayerRenderer.prototype.prepareFrame = function (frameState) {\n        return !!this.getLayer().getSource();\n    };\n    /**\n     * Render the layer.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target that may be used to render content to.\n     * @return {HTMLElement} The rendered element.\n     */\n    CanvasTileLayerRenderer.prototype.renderFrame = function (frameState, target) {\n        var layerState = frameState.layerStatesArray[frameState.layerIndex];\n        var viewState = frameState.viewState;\n        var projection = viewState.projection;\n        var viewResolution = viewState.resolution;\n        var viewCenter = viewState.center;\n        var rotation = viewState.rotation;\n        var pixelRatio = frameState.pixelRatio;\n        var tileLayer = this.getLayer();\n        var tileSource = tileLayer.getSource();\n        var sourceRevision = tileSource.getRevision();\n        var tileGrid = tileSource.getTileGridForProjection(projection);\n        var z = tileGrid.getZForResolution(viewResolution, tileSource.zDirection);\n        var tileResolution = tileGrid.getResolution(z);\n        var extent = frameState.extent;\n        var layerExtent = layerState.extent && fromUserExtent(layerState.extent, projection);\n        if (layerExtent) {\n            extent = getIntersection(extent, fromUserExtent(layerState.extent, projection));\n        }\n        var tilePixelRatio = tileSource.getTilePixelRatio(pixelRatio);\n        // desired dimensions of the canvas in pixels\n        var width = Math.round(frameState.size[0] * tilePixelRatio);\n        var height = Math.round(frameState.size[1] * tilePixelRatio);\n        if (rotation) {\n            var size = Math.round(Math.sqrt(width * width + height * height));\n            width = size;\n            height = size;\n        }\n        var dx = (tileResolution * width) / 2 / tilePixelRatio;\n        var dy = (tileResolution * height) / 2 / tilePixelRatio;\n        var canvasExtent = [\n            viewCenter[0] - dx,\n            viewCenter[1] - dy,\n            viewCenter[0] + dx,\n            viewCenter[1] + dy,\n        ];\n        var tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n        /**\n         * @type {Object<number, Object<string, import(\"../../Tile.js\").default>>}\n         */\n        var tilesToDrawByZ = {};\n        tilesToDrawByZ[z] = {};\n        var findLoadedTiles = this.createLoadedTileFinder(tileSource, projection, tilesToDrawByZ);\n        var tmpExtent = this.tmpExtent;\n        var tmpTileRange = this.tmpTileRange_;\n        this.newTiles_ = false;\n        for (var x = tileRange.minX; x <= tileRange.maxX; ++x) {\n            for (var y = tileRange.minY; y <= tileRange.maxY; ++y) {\n                var tile = this.getTile(z, x, y, frameState);\n                if (this.isDrawableTile(tile)) {\n                    var uid = getUid(this);\n                    if (tile.getState() == TileState.LOADED) {\n                        tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;\n                        var inTransition = tile.inTransition(uid);\n                        if (!this.newTiles_ &&\n                            (inTransition || this.renderedTiles.indexOf(tile) === -1)) {\n                            this.newTiles_ = true;\n                        }\n                    }\n                    if (tile.getAlpha(uid, frameState.time) === 1) {\n                        // don't look for alt tiles if alpha is 1\n                        continue;\n                    }\n                }\n                var childTileRange = tileGrid.getTileCoordChildTileRange(tile.tileCoord, tmpTileRange, tmpExtent);\n                var covered = false;\n                if (childTileRange) {\n                    covered = findLoadedTiles(z + 1, childTileRange);\n                }\n                if (!covered) {\n                    tileGrid.forEachTileCoordParentTileRange(tile.tileCoord, findLoadedTiles, tmpTileRange, tmpExtent);\n                }\n            }\n        }\n        var canvasScale = tileResolution / viewResolution;\n        // set forward and inverse pixel transforms\n        composeTransform(this.pixelTransform, frameState.size[0] / 2, frameState.size[1] / 2, 1 / tilePixelRatio, 1 / tilePixelRatio, rotation, -width / 2, -height / 2);\n        var canvasTransform = toTransformString(this.pixelTransform);\n        this.useContainer(target, canvasTransform, layerState.opacity);\n        var context = this.context;\n        var canvas = context.canvas;\n        makeInverse(this.inversePixelTransform, this.pixelTransform);\n        // set scale transform for calculating tile positions on the canvas\n        composeTransform(this.tempTransform, width / 2, height / 2, canvasScale, canvasScale, 0, -width / 2, -height / 2);\n        if (canvas.width != width || canvas.height != height) {\n            canvas.width = width;\n            canvas.height = height;\n        }\n        else if (!this.containerReused) {\n            context.clearRect(0, 0, width, height);\n        }\n        if (layerExtent) {\n            this.clipUnrotated(context, frameState, layerExtent);\n        }\n        assign(context, tileSource.getContextOptions());\n        this.preRender(context, frameState);\n        this.renderedTiles.length = 0;\n        /** @type {Array<number>} */\n        var zs = Object.keys(tilesToDrawByZ).map(Number);\n        zs.sort(numberSafeCompareFunction);\n        var clips, clipZs, currentClip;\n        if (layerState.opacity === 1 &&\n            (!this.containerReused ||\n                tileSource.getOpaque(frameState.viewState.projection))) {\n            zs = zs.reverse();\n        }\n        else {\n            clips = [];\n            clipZs = [];\n        }\n        for (var i = zs.length - 1; i >= 0; --i) {\n            var currentZ = zs[i];\n            var currentTilePixelSize = tileSource.getTilePixelSize(currentZ, pixelRatio, projection);\n            var currentResolution = tileGrid.getResolution(currentZ);\n            var currentScale = currentResolution / tileResolution;\n            var dx_1 = currentTilePixelSize[0] * currentScale * canvasScale;\n            var dy_1 = currentTilePixelSize[1] * currentScale * canvasScale;\n            var originTileCoord = tileGrid.getTileCoordForCoordAndZ(getTopLeft(canvasExtent), currentZ);\n            var originTileExtent = tileGrid.getTileCoordExtent(originTileCoord);\n            var origin_1 = applyTransform(this.tempTransform, [\n                (tilePixelRatio * (originTileExtent[0] - canvasExtent[0])) /\n                    tileResolution,\n                (tilePixelRatio * (canvasExtent[3] - originTileExtent[3])) /\n                    tileResolution,\n            ]);\n            var tileGutter = tilePixelRatio * tileSource.getGutterForProjection(projection);\n            var tilesToDraw = tilesToDrawByZ[currentZ];\n            for (var tileCoordKey in tilesToDraw) {\n                var tile = /** @type {import(\"../../ImageTile.js\").default} */ (tilesToDraw[tileCoordKey]);\n                var tileCoord = tile.tileCoord;\n                // Calculate integer positions and sizes so that tiles align\n                var xIndex = originTileCoord[1] - tileCoord[1];\n                var nextX = Math.round(origin_1[0] - (xIndex - 1) * dx_1);\n                var yIndex = originTileCoord[2] - tileCoord[2];\n                var nextY = Math.round(origin_1[1] - (yIndex - 1) * dy_1);\n                var x = Math.round(origin_1[0] - xIndex * dx_1);\n                var y = Math.round(origin_1[1] - yIndex * dy_1);\n                var w = nextX - x;\n                var h = nextY - y;\n                var transition = z === currentZ;\n                var inTransition = transition && tile.getAlpha(getUid(this), frameState.time) !== 1;\n                if (!inTransition) {\n                    if (clips) {\n                        // Clip mask for regions in this tile that already filled by a higher z tile\n                        context.save();\n                        currentClip = [x, y, x + w, y, x + w, y + h, x, y + h];\n                        for (var i_1 = 0, ii = clips.length; i_1 < ii; ++i_1) {\n                            if (z !== currentZ && currentZ < clipZs[i_1]) {\n                                var clip = clips[i_1];\n                                context.beginPath();\n                                // counter-clockwise (outer ring) for current tile\n                                context.moveTo(currentClip[0], currentClip[1]);\n                                context.lineTo(currentClip[2], currentClip[3]);\n                                context.lineTo(currentClip[4], currentClip[5]);\n                                context.lineTo(currentClip[6], currentClip[7]);\n                                // clockwise (inner ring) for higher z tile\n                                context.moveTo(clip[6], clip[7]);\n                                context.lineTo(clip[4], clip[5]);\n                                context.lineTo(clip[2], clip[3]);\n                                context.lineTo(clip[0], clip[1]);\n                                context.clip();\n                            }\n                        }\n                        clips.push(currentClip);\n                        clipZs.push(currentZ);\n                    }\n                    else {\n                        context.clearRect(x, y, w, h);\n                    }\n                }\n                this.drawTileImage(tile, frameState, x, y, w, h, tileGutter, transition, layerState.opacity);\n                if (clips && !inTransition) {\n                    context.restore();\n                    this.renderedTiles.unshift(tile);\n                }\n                else {\n                    this.renderedTiles.push(tile);\n                }\n                this.updateUsedTiles(frameState.usedTiles, tileSource, tile);\n            }\n        }\n        this.renderedRevision = sourceRevision;\n        this.renderedResolution = tileResolution;\n        this.extentChanged =\n            !this.renderedExtent_ || !equals(this.renderedExtent_, canvasExtent);\n        this.renderedExtent_ = canvasExtent;\n        this.renderedPixelRatio = pixelRatio;\n        this.renderedProjection = projection;\n        this.manageTilePyramid(frameState, tileSource, tileGrid, pixelRatio, projection, extent, z, tileLayer.getPreload());\n        this.scheduleExpireCache(frameState, tileSource);\n        this.postRender(context, frameState);\n        if (layerState.extent) {\n            context.restore();\n        }\n        if (canvasTransform !== canvas.style.transform) {\n            canvas.style.transform = canvasTransform;\n        }\n        return this.container;\n    };\n    /**\n     * @param {import(\"../../ImageTile.js\").default} tile Tile.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} x Left of the tile.\n     * @param {number} y Top of the tile.\n     * @param {number} w Width of the tile.\n     * @param {number} h Height of the tile.\n     * @param {number} gutter Tile gutter.\n     * @param {boolean} transition Apply an alpha transition.\n     * @param {number} opacity Opacity.\n     */\n    CanvasTileLayerRenderer.prototype.drawTileImage = function (tile, frameState, x, y, w, h, gutter, transition, opacity) {\n        var image = this.getTileImage(tile);\n        if (!image) {\n            return;\n        }\n        var uid = getUid(this);\n        var tileAlpha = transition ? tile.getAlpha(uid, frameState.time) : 1;\n        var alpha = opacity * tileAlpha;\n        var alphaChanged = alpha !== this.context.globalAlpha;\n        if (alphaChanged) {\n            this.context.save();\n            this.context.globalAlpha = alpha;\n        }\n        this.context.drawImage(image, gutter, gutter, image.width - 2 * gutter, image.height - 2 * gutter, x, y, w, h);\n        if (alphaChanged) {\n            this.context.restore();\n        }\n        if (tileAlpha !== 1) {\n            frameState.animate = true;\n        }\n        else if (transition) {\n            tile.endTransition(uid);\n        }\n    };\n    /**\n     * @return {HTMLCanvasElement} Image\n     */\n    CanvasTileLayerRenderer.prototype.getImage = function () {\n        var context = this.context;\n        return context ? context.canvas : null;\n    };\n    /**\n     * Get the image from a tile.\n     * @param {import(\"../../ImageTile.js\").default} tile Tile.\n     * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n     * @protected\n     */\n    CanvasTileLayerRenderer.prototype.getTileImage = function (tile) {\n        return tile.getImage();\n    };\n    /**\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n     * @protected\n     */\n    CanvasTileLayerRenderer.prototype.scheduleExpireCache = function (frameState, tileSource) {\n        if (tileSource.canExpireCache()) {\n            /**\n             * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n             * @param {import(\"../../PluggableMap.js\").default} map Map.\n             * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n             */\n            var postRenderFunction = function (tileSource, map, frameState) {\n                var tileSourceKey = getUid(tileSource);\n                if (tileSourceKey in frameState.usedTiles) {\n                    tileSource.expireCache(frameState.viewState.projection, frameState.usedTiles[tileSourceKey]);\n                }\n            }.bind(null, tileSource);\n            frameState.postRenderFunctions.push(\n            /** @type {import(\"../../PluggableMap.js\").PostRenderFunction} */ (postRenderFunction));\n        }\n    };\n    /**\n     * @param {!Object<string, !Object<string, boolean>>} usedTiles Used tiles.\n     * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n     * @param {import('../../Tile.js').default} tile Tile.\n     * @protected\n     */\n    CanvasTileLayerRenderer.prototype.updateUsedTiles = function (usedTiles, tileSource, tile) {\n        // FIXME should we use tilesToDrawByZ instead?\n        var tileSourceKey = getUid(tileSource);\n        if (!(tileSourceKey in usedTiles)) {\n            usedTiles[tileSourceKey] = {};\n        }\n        usedTiles[tileSourceKey][tile.getKey()] = true;\n    };\n    /**\n     * Manage tile pyramid.\n     * This function performs a number of functions related to the tiles at the\n     * current zoom and lower zoom levels:\n     * - registers idle tiles in frameState.wantedTiles so that they are not\n     *   discarded by the tile queue\n     * - enqueues missing tiles\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n     * @param {import(\"../../tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n     * @param {import(\"../../extent.js\").Extent} extent Extent.\n     * @param {number} currentZ Current Z.\n     * @param {number} preload Load low resolution tiles up to 'preload' levels.\n     * @param {function(import(\"../../Tile.js\").default):void} [opt_tileCallback] Tile callback.\n     * @protected\n     */\n    CanvasTileLayerRenderer.prototype.manageTilePyramid = function (frameState, tileSource, tileGrid, pixelRatio, projection, extent, currentZ, preload, opt_tileCallback) {\n        var tileSourceKey = getUid(tileSource);\n        if (!(tileSourceKey in frameState.wantedTiles)) {\n            frameState.wantedTiles[tileSourceKey] = {};\n        }\n        var wantedTiles = frameState.wantedTiles[tileSourceKey];\n        var tileQueue = frameState.tileQueue;\n        var minZoom = tileGrid.getMinZoom();\n        var tileCount = 0;\n        var tile, tileRange, tileResolution, x, y, z;\n        for (z = minZoom; z <= currentZ; ++z) {\n            tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z, tileRange);\n            tileResolution = tileGrid.getResolution(z);\n            for (x = tileRange.minX; x <= tileRange.maxX; ++x) {\n                for (y = tileRange.minY; y <= tileRange.maxY; ++y) {\n                    if (currentZ - z <= preload) {\n                        ++tileCount;\n                        tile = tileSource.getTile(z, x, y, pixelRatio, projection);\n                        if (tile.getState() == TileState.IDLE) {\n                            wantedTiles[tile.getKey()] = true;\n                            if (!tileQueue.isKeyQueued(tile.getKey())) {\n                                tileQueue.enqueue([\n                                    tile,\n                                    tileSourceKey,\n                                    tileGrid.getTileCoordCenter(tile.tileCoord),\n                                    tileResolution,\n                                ]);\n                            }\n                        }\n                        if (opt_tileCallback !== undefined) {\n                            opt_tileCallback(tile);\n                        }\n                    }\n                    else {\n                        tileSource.useTile(z, x, y, projection);\n                    }\n                }\n            }\n        }\n        tileSource.updateCacheSize(tileCount, projection);\n    };\n    return CanvasTileLayerRenderer;\n}(CanvasLayerRenderer));\n/**\n * @function\n * @return {import(\"../../layer/Tile.js\").default|import(\"../../layer/VectorTile.js\").default}\n */\nCanvasTileLayerRenderer.prototype.getLayer;\nexport default CanvasTileLayerRenderer;\n//# sourceMappingURL=TileLayer.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/ImageTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nimport { createCanvasContext2D } from './dom.js';\nimport { listenImage } from './Image.js';\nvar ImageTile = /** @class */ (function (_super) {\n    __extends(ImageTile, _super);\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"./TileState.js\").default} state State.\n     * @param {string} src Image source URI.\n     * @param {?string} crossOrigin Cross origin.\n     * @param {import(\"./Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n     * @param {import(\"./Tile.js\").Options} [opt_options] Tile options.\n     */\n    function ImageTile(tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) {\n        var _this = _super.call(this, tileCoord, state, opt_options) || this;\n        /**\n         * @private\n         * @type {?string}\n         */\n        _this.crossOrigin_ = crossOrigin;\n        /**\n         * Image URI\n         *\n         * @private\n         * @type {string}\n         */\n        _this.src_ = src;\n        _this.key = src;\n        /**\n         * @private\n         * @type {HTMLImageElement|HTMLCanvasElement}\n         */\n        _this.image_ = new Image();\n        if (crossOrigin !== null) {\n            _this.image_.crossOrigin = crossOrigin;\n        }\n        /**\n         * @private\n         * @type {?function():void}\n         */\n        _this.unlisten_ = null;\n        /**\n         * @private\n         * @type {import(\"./Tile.js\").LoadFunction}\n         */\n        _this.tileLoadFunction_ = tileLoadFunction;\n        return _this;\n    }\n    /**\n     * Get the HTML image element for this tile (may be a Canvas, Image, or Video).\n     * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n     * @api\n     */\n    ImageTile.prototype.getImage = function () {\n        return this.image_;\n    };\n    /**\n     * Sets an HTML image element for this tile (may be a Canvas or preloaded Image).\n     * @param {HTMLCanvasElement|HTMLImageElement} element Element.\n     */\n    ImageTile.prototype.setImage = function (element) {\n        this.image_ = element;\n        this.state = TileState.LOADED;\n        this.unlistenImage_();\n        this.changed();\n    };\n    /**\n     * Tracks loading or read errors.\n     *\n     * @private\n     */\n    ImageTile.prototype.handleImageError_ = function () {\n        this.state = TileState.ERROR;\n        this.unlistenImage_();\n        this.image_ = getBlankImage();\n        this.changed();\n    };\n    /**\n     * Tracks successful image load.\n     *\n     * @private\n     */\n    ImageTile.prototype.handleImageLoad_ = function () {\n        var image = /** @type {HTMLImageElement} */ (this.image_);\n        if (image.naturalWidth && image.naturalHeight) {\n            this.state = TileState.LOADED;\n        }\n        else {\n            this.state = TileState.EMPTY;\n        }\n        this.unlistenImage_();\n        this.changed();\n    };\n    /**\n     * Load not yet loaded URI.\n     * @api\n     */\n    ImageTile.prototype.load = function () {\n        if (this.state == TileState.ERROR) {\n            this.state = TileState.IDLE;\n            this.image_ = new Image();\n            if (this.crossOrigin_ !== null) {\n                this.image_.crossOrigin = this.crossOrigin_;\n            }\n        }\n        if (this.state == TileState.IDLE) {\n            this.state = TileState.LOADING;\n            this.changed();\n            this.tileLoadFunction_(this, this.src_);\n            this.unlisten_ = listenImage(this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this));\n        }\n    };\n    /**\n     * Discards event handlers which listen for load completion or errors.\n     *\n     * @private\n     */\n    ImageTile.prototype.unlistenImage_ = function () {\n        if (this.unlisten_) {\n            this.unlisten_();\n            this.unlisten_ = null;\n        }\n    };\n    return ImageTile;\n}(Tile));\n/**\n * Get a 1-pixel blank image.\n * @return {HTMLCanvasElement} Blank image.\n */\nfunction getBlankImage() {\n    var ctx = createCanvasContext2D(1, 1);\n    ctx.fillStyle = 'rgba(0,0,0,0)';\n    ctx.fillRect(0, 0, 1, 1);\n    return ctx.canvas;\n}\nexport default ImageTile;\n//# sourceMappingURL=ImageTile.js.map","/**\n * @module ol/reproj/Triangulation\n */\nimport { boundingExtent, createEmpty, extendCoordinate, getArea, getBottomLeft, getBottomRight, getTopLeft, getTopRight, getWidth, intersects, } from '../extent.js';\nimport { getTransform } from '../proj.js';\nimport { log2, modulo } from '../math.js';\n/**\n * Single triangle; consists of 3 source points and 3 target points.\n * @typedef {Object} Triangle\n * @property {Array<import(\"../coordinate.js\").Coordinate>} source Source.\n * @property {Array<import(\"../coordinate.js\").Coordinate>} target Target.\n */\n/**\n * Maximum number of subdivision steps during raster reprojection triangulation.\n * Prevents high memory usage and large number of proj4 calls (for certain\n * transformations and areas). At most `2*(2^this)` triangles are created for\n * each triangulated extent (tile/image).\n * @type {number}\n */\nvar MAX_SUBDIVISION = 10;\n/**\n * Maximum allowed size of triangle relative to world width. When transforming\n * corners of world extent between certain projections, the resulting\n * triangulation seems to have zero error and no subdivision is performed. If\n * the triangle width is more than this (relative to world width; 0-1),\n * subdivison is forced (up to `MAX_SUBDIVISION`). Default is `0.25`.\n * @type {number}\n */\nvar MAX_TRIANGLE_WIDTH = 0.25;\n/**\n * @classdesc\n * Class containing triangulation of the given target extent.\n * Used for determining source data and the reprojection itself.\n */\nvar Triangulation = /** @class */ (function () {\n    /**\n     * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection.\n     * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n     * @param {import(\"../extent.js\").Extent} targetExtent Target extent to triangulate.\n     * @param {import(\"../extent.js\").Extent} maxSourceExtent Maximal source extent that can be used.\n     * @param {number} errorThreshold Acceptable error (in source units).\n     * @param {?number} opt_destinationResolution The (optional) resolution of the destination.\n     */\n    function Triangulation(sourceProj, targetProj, targetExtent, maxSourceExtent, errorThreshold, opt_destinationResolution) {\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         * @private\n         */\n        this.sourceProj_ = sourceProj;\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         * @private\n         */\n        this.targetProj_ = targetProj;\n        /** @type {!Object<string, import(\"../coordinate.js\").Coordinate>} */\n        var transformInvCache = {};\n        var transformInv = getTransform(this.targetProj_, this.sourceProj_);\n        /**\n         * @param {import(\"../coordinate.js\").Coordinate} c A coordinate.\n         * @return {import(\"../coordinate.js\").Coordinate} Transformed coordinate.\n         * @private\n         */\n        this.transformInv_ = function (c) {\n            var key = c[0] + '/' + c[1];\n            if (!transformInvCache[key]) {\n                transformInvCache[key] = transformInv(c);\n            }\n            return transformInvCache[key];\n        };\n        /**\n         * @type {import(\"../extent.js\").Extent}\n         * @private\n         */\n        this.maxSourceExtent_ = maxSourceExtent;\n        /**\n         * @type {number}\n         * @private\n         */\n        this.errorThresholdSquared_ = errorThreshold * errorThreshold;\n        /**\n         * @type {Array<Triangle>}\n         * @private\n         */\n        this.triangles_ = [];\n        /**\n         * Indicates that the triangulation crosses edge of the source projection.\n         * @type {boolean}\n         * @private\n         */\n        this.wrapsXInSource_ = false;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        this.canWrapXInSource_ =\n            this.sourceProj_.canWrapX() &&\n                !!maxSourceExtent &&\n                !!this.sourceProj_.getExtent() &&\n                getWidth(maxSourceExtent) == getWidth(this.sourceProj_.getExtent());\n        /**\n         * @type {?number}\n         * @private\n         */\n        this.sourceWorldWidth_ = this.sourceProj_.getExtent()\n            ? getWidth(this.sourceProj_.getExtent())\n            : null;\n        /**\n         * @type {?number}\n         * @private\n         */\n        this.targetWorldWidth_ = this.targetProj_.getExtent()\n            ? getWidth(this.targetProj_.getExtent())\n            : null;\n        var destinationTopLeft = getTopLeft(targetExtent);\n        var destinationTopRight = getTopRight(targetExtent);\n        var destinationBottomRight = getBottomRight(targetExtent);\n        var destinationBottomLeft = getBottomLeft(targetExtent);\n        var sourceTopLeft = this.transformInv_(destinationTopLeft);\n        var sourceTopRight = this.transformInv_(destinationTopRight);\n        var sourceBottomRight = this.transformInv_(destinationBottomRight);\n        var sourceBottomLeft = this.transformInv_(destinationBottomLeft);\n        /*\n         * The maxSubdivision controls how many splittings of the target area can\n         * be done. The idea here is to do a linear mapping of the target areas\n         * but the actual overal reprojection (can be) extremely non-linear. The\n         * default value of MAX_SUBDIVISION was chosen based on mapping a 256x256\n         * tile size. However this function is also called to remap canvas rendered\n         * layers which can be much larger. This calculation increases the maxSubdivision\n         * value by the right factor so that each 256x256 pixel area has\n         * MAX_SUBDIVISION divisions.\n         */\n        var maxSubdivision = MAX_SUBDIVISION +\n            (opt_destinationResolution\n                ? Math.max(0, Math.ceil(log2(getArea(targetExtent) /\n                    (opt_destinationResolution *\n                        opt_destinationResolution *\n                        256 *\n                        256))))\n                : 0);\n        this.addQuad_(destinationTopLeft, destinationTopRight, destinationBottomRight, destinationBottomLeft, sourceTopLeft, sourceTopRight, sourceBottomRight, sourceBottomLeft, maxSubdivision);\n        if (this.wrapsXInSource_) {\n            var leftBound_1 = Infinity;\n            this.triangles_.forEach(function (triangle, i, arr) {\n                leftBound_1 = Math.min(leftBound_1, triangle.source[0][0], triangle.source[1][0], triangle.source[2][0]);\n            });\n            // Shift triangles to be as close to `leftBound` as possible\n            // (if the distance is more than `worldWidth / 2` it can be closer.\n            this.triangles_.forEach(function (triangle) {\n                if (Math.max(triangle.source[0][0], triangle.source[1][0], triangle.source[2][0]) -\n                    leftBound_1 >\n                    this.sourceWorldWidth_ / 2) {\n                    var newTriangle = [\n                        [triangle.source[0][0], triangle.source[0][1]],\n                        [triangle.source[1][0], triangle.source[1][1]],\n                        [triangle.source[2][0], triangle.source[2][1]],\n                    ];\n                    if (newTriangle[0][0] - leftBound_1 > this.sourceWorldWidth_ / 2) {\n                        newTriangle[0][0] -= this.sourceWorldWidth_;\n                    }\n                    if (newTriangle[1][0] - leftBound_1 > this.sourceWorldWidth_ / 2) {\n                        newTriangle[1][0] -= this.sourceWorldWidth_;\n                    }\n                    if (newTriangle[2][0] - leftBound_1 > this.sourceWorldWidth_ / 2) {\n                        newTriangle[2][0] -= this.sourceWorldWidth_;\n                    }\n                    // Rarely (if the extent contains both the dateline and prime meridian)\n                    // the shift can in turn break some triangles.\n                    // Detect this here and don't shift in such cases.\n                    var minX = Math.min(newTriangle[0][0], newTriangle[1][0], newTriangle[2][0]);\n                    var maxX = Math.max(newTriangle[0][0], newTriangle[1][0], newTriangle[2][0]);\n                    if (maxX - minX < this.sourceWorldWidth_ / 2) {\n                        triangle.source = newTriangle;\n                    }\n                }\n            }.bind(this));\n        }\n        transformInvCache = {};\n    }\n    /**\n     * Adds triangle to the triangulation.\n     * @param {import(\"../coordinate.js\").Coordinate} a The target a coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} b The target b coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} c The target c coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} aSrc The source a coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} bSrc The source b coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} cSrc The source c coordinate.\n     * @private\n     */\n    Triangulation.prototype.addTriangle_ = function (a, b, c, aSrc, bSrc, cSrc) {\n        this.triangles_.push({\n            source: [aSrc, bSrc, cSrc],\n            target: [a, b, c],\n        });\n    };\n    /**\n     * Adds quad (points in clock-wise order) to the triangulation\n     * (and reprojects the vertices) if valid.\n     * Performs quad subdivision if needed to increase precision.\n     *\n     * @param {import(\"../coordinate.js\").Coordinate} a The target a coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} b The target b coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} c The target c coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} d The target d coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} aSrc The source a coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} bSrc The source b coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} cSrc The source c coordinate.\n     * @param {import(\"../coordinate.js\").Coordinate} dSrc The source d coordinate.\n     * @param {number} maxSubdivision Maximal allowed subdivision of the quad.\n     * @private\n     */\n    Triangulation.prototype.addQuad_ = function (a, b, c, d, aSrc, bSrc, cSrc, dSrc, maxSubdivision) {\n        var sourceQuadExtent = boundingExtent([aSrc, bSrc, cSrc, dSrc]);\n        var sourceCoverageX = this.sourceWorldWidth_\n            ? getWidth(sourceQuadExtent) / this.sourceWorldWidth_\n            : null;\n        var sourceWorldWidth = /** @type {number} */ (this.sourceWorldWidth_);\n        // when the quad is wrapped in the source projection\n        // it covers most of the projection extent, but not fully\n        var wrapsX = this.sourceProj_.canWrapX() &&\n            sourceCoverageX > 0.5 &&\n            sourceCoverageX < 1;\n        var needsSubdivision = false;\n        if (maxSubdivision > 0) {\n            if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {\n                var targetQuadExtent = boundingExtent([a, b, c, d]);\n                var targetCoverageX = getWidth(targetQuadExtent) / this.targetWorldWidth_;\n                needsSubdivision =\n                    targetCoverageX > MAX_TRIANGLE_WIDTH || needsSubdivision;\n            }\n            if (!wrapsX && this.sourceProj_.isGlobal() && sourceCoverageX) {\n                needsSubdivision =\n                    sourceCoverageX > MAX_TRIANGLE_WIDTH || needsSubdivision;\n            }\n        }\n        if (!needsSubdivision && this.maxSourceExtent_) {\n            if (isFinite(sourceQuadExtent[0]) &&\n                isFinite(sourceQuadExtent[1]) &&\n                isFinite(sourceQuadExtent[2]) &&\n                isFinite(sourceQuadExtent[3])) {\n                if (!intersects(sourceQuadExtent, this.maxSourceExtent_)) {\n                    // whole quad outside source projection extent -> ignore\n                    return;\n                }\n            }\n        }\n        var isNotFinite = 0;\n        if (!needsSubdivision) {\n            if (!isFinite(aSrc[0]) ||\n                !isFinite(aSrc[1]) ||\n                !isFinite(bSrc[0]) ||\n                !isFinite(bSrc[1]) ||\n                !isFinite(cSrc[0]) ||\n                !isFinite(cSrc[1]) ||\n                !isFinite(dSrc[0]) ||\n                !isFinite(dSrc[1])) {\n                if (maxSubdivision > 0) {\n                    needsSubdivision = true;\n                }\n                else {\n                    // It might be the case that only 1 of the points is infinite. In this case\n                    // we can draw a single triangle with the other three points\n                    isNotFinite =\n                        (!isFinite(aSrc[0]) || !isFinite(aSrc[1]) ? 8 : 0) +\n                            (!isFinite(bSrc[0]) || !isFinite(bSrc[1]) ? 4 : 0) +\n                            (!isFinite(cSrc[0]) || !isFinite(cSrc[1]) ? 2 : 0) +\n                            (!isFinite(dSrc[0]) || !isFinite(dSrc[1]) ? 1 : 0);\n                    if (isNotFinite != 1 &&\n                        isNotFinite != 2 &&\n                        isNotFinite != 4 &&\n                        isNotFinite != 8) {\n                        return;\n                    }\n                }\n            }\n        }\n        if (maxSubdivision > 0) {\n            if (!needsSubdivision) {\n                var center = [(a[0] + c[0]) / 2, (a[1] + c[1]) / 2];\n                var centerSrc = this.transformInv_(center);\n                var dx = void 0;\n                if (wrapsX) {\n                    var centerSrcEstimX = (modulo(aSrc[0], sourceWorldWidth) +\n                        modulo(cSrc[0], sourceWorldWidth)) /\n                        2;\n                    dx = centerSrcEstimX - modulo(centerSrc[0], sourceWorldWidth);\n                }\n                else {\n                    dx = (aSrc[0] + cSrc[0]) / 2 - centerSrc[0];\n                }\n                var dy = (aSrc[1] + cSrc[1]) / 2 - centerSrc[1];\n                var centerSrcErrorSquared = dx * dx + dy * dy;\n                needsSubdivision = centerSrcErrorSquared > this.errorThresholdSquared_;\n            }\n            if (needsSubdivision) {\n                if (Math.abs(a[0] - c[0]) <= Math.abs(a[1] - c[1])) {\n                    // split horizontally (top & bottom)\n                    var bc = [(b[0] + c[0]) / 2, (b[1] + c[1]) / 2];\n                    var bcSrc = this.transformInv_(bc);\n                    var da = [(d[0] + a[0]) / 2, (d[1] + a[1]) / 2];\n                    var daSrc = this.transformInv_(da);\n                    this.addQuad_(a, b, bc, da, aSrc, bSrc, bcSrc, daSrc, maxSubdivision - 1);\n                    this.addQuad_(da, bc, c, d, daSrc, bcSrc, cSrc, dSrc, maxSubdivision - 1);\n                }\n                else {\n                    // split vertically (left & right)\n                    var ab = [(a[0] + b[0]) / 2, (a[1] + b[1]) / 2];\n                    var abSrc = this.transformInv_(ab);\n                    var cd = [(c[0] + d[0]) / 2, (c[1] + d[1]) / 2];\n                    var cdSrc = this.transformInv_(cd);\n                    this.addQuad_(a, ab, cd, d, aSrc, abSrc, cdSrc, dSrc, maxSubdivision - 1);\n                    this.addQuad_(ab, b, c, cd, abSrc, bSrc, cSrc, cdSrc, maxSubdivision - 1);\n                }\n                return;\n            }\n        }\n        if (wrapsX) {\n            if (!this.canWrapXInSource_) {\n                return;\n            }\n            this.wrapsXInSource_ = true;\n        }\n        // Exactly zero or one of *Src is not finite\n        // The triangles must have the diagonal line as the first side\n        // This is to allow easy code in reproj.s to make it straight for broken\n        // browsers that can't handle diagonal clipping\n        if ((isNotFinite & 0xb) == 0) {\n            this.addTriangle_(a, c, d, aSrc, cSrc, dSrc);\n        }\n        if ((isNotFinite & 0xe) == 0) {\n            this.addTriangle_(a, c, b, aSrc, cSrc, bSrc);\n        }\n        if (isNotFinite) {\n            // Try the other two triangles\n            if ((isNotFinite & 0xd) == 0) {\n                this.addTriangle_(b, d, a, bSrc, dSrc, aSrc);\n            }\n            if ((isNotFinite & 0x7) == 0) {\n                this.addTriangle_(b, d, c, bSrc, dSrc, cSrc);\n            }\n        }\n    };\n    /**\n     * Calculates extent of the 'source' coordinates from all the triangles.\n     *\n     * @return {import(\"../extent.js\").Extent} Calculated extent.\n     */\n    Triangulation.prototype.calculateSourceExtent = function () {\n        var extent = createEmpty();\n        this.triangles_.forEach(function (triangle, i, arr) {\n            var src = triangle.source;\n            extendCoordinate(extent, src[0]);\n            extendCoordinate(extent, src[1]);\n            extendCoordinate(extent, src[2]);\n        });\n        return extent;\n    };\n    /**\n     * @return {Array<Triangle>} Array of the calculated triangles.\n     */\n    Triangulation.prototype.getTriangles = function () {\n        return this.triangles_;\n    };\n    return Triangulation;\n}());\nexport default Triangulation;\n//# sourceMappingURL=Triangulation.js.map","/**\n * @module ol/Kinetic\n */\n/**\n * @classdesc\n * Implementation of inertial deceleration for map movement.\n *\n * @api\n */\nvar Kinetic = /** @class */ (function () {\n    /**\n     * @param {number} decay Rate of decay (must be negative).\n     * @param {number} minVelocity Minimum velocity (pixels/millisecond).\n     * @param {number} delay Delay to consider to calculate the kinetic\n     *     initial values (milliseconds).\n     */\n    function Kinetic(decay, minVelocity, delay) {\n        /**\n         * @private\n         * @type {number}\n         */\n        this.decay_ = decay;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.minVelocity_ = minVelocity;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.delay_ = delay;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        this.points_ = [];\n        /**\n         * @private\n         * @type {number}\n         */\n        this.angle_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.initialVelocity_ = 0;\n    }\n    /**\n     * FIXME empty description for jsdoc\n     */\n    Kinetic.prototype.begin = function () {\n        this.points_.length = 0;\n        this.angle_ = 0;\n        this.initialVelocity_ = 0;\n    };\n    /**\n     * @param {number} x X.\n     * @param {number} y Y.\n     */\n    Kinetic.prototype.update = function (x, y) {\n        this.points_.push(x, y, Date.now());\n    };\n    /**\n     * @return {boolean} Whether we should do kinetic animation.\n     */\n    Kinetic.prototype.end = function () {\n        if (this.points_.length < 6) {\n            // at least 2 points are required (i.e. there must be at least 6 elements\n            // in the array)\n            return false;\n        }\n        var delay = Date.now() - this.delay_;\n        var lastIndex = this.points_.length - 3;\n        if (this.points_[lastIndex + 2] < delay) {\n            // the last tracked point is too old, which means that the user stopped\n            // panning before releasing the map\n            return false;\n        }\n        // get the first point which still falls into the delay time\n        var firstIndex = lastIndex - 3;\n        while (firstIndex > 0 && this.points_[firstIndex + 2] > delay) {\n            firstIndex -= 3;\n        }\n        var duration = this.points_[lastIndex + 2] - this.points_[firstIndex + 2];\n        // we don't want a duration of 0 (divide by zero)\n        // we also make sure the user panned for a duration of at least one frame\n        // (1/60s) to compute sane displacement values\n        if (duration < 1000 / 60) {\n            return false;\n        }\n        var dx = this.points_[lastIndex] - this.points_[firstIndex];\n        var dy = this.points_[lastIndex + 1] - this.points_[firstIndex + 1];\n        this.angle_ = Math.atan2(dy, dx);\n        this.initialVelocity_ = Math.sqrt(dx * dx + dy * dy) / duration;\n        return this.initialVelocity_ > this.minVelocity_;\n    };\n    /**\n     * @return {number} Total distance travelled (pixels).\n     */\n    Kinetic.prototype.getDistance = function () {\n        return (this.minVelocity_ - this.initialVelocity_) / this.decay_;\n    };\n    /**\n     * @return {number} Angle of the kinetic panning animation (radians).\n     */\n    Kinetic.prototype.getAngle = function () {\n        return this.angle_;\n    };\n    return Kinetic;\n}());\nexport default Kinetic;\n//# sourceMappingURL=Kinetic.js.map","import { Control } from 'ol/control';\r\nimport { createOlViewer } from '../viewportHelpers';\r\n\r\n/**\r\n * Displays an interface that allows the user to return to previous zoom\r\n * @param {object} opt_options Options to initialize the previous zoom control\r\n * @param {string} [opt_options.tipLabel] Label for previous zoom button\r\n * @param {ol.interaction.DragZoom} opt_options.dragZoom The dragzoom interaction of this map\r\n */\r\n\r\nexport class PrevZoom extends Control {\r\n    constructor(opt_options) {\r\n        var options = opt_options || {};\r\n        var dragZoom = options.dragZoom;\r\n\r\n\r\n        var handleClick = function (e) {\r\n            e.preventDefault();\r\n            e.stopPropagation();\r\n\r\n            if ((\" \" + element.className + \" \").indexOf(' disabled ') > -1) {\r\n                return;\r\n            }\r\n            else {\r\n                element.className += \" disabled\";\r\n            }\r\n\r\n            this.getMap().getView().setResolution(prevResolution);\r\n        };\r\n\r\n\r\n\r\n        var tipLabel = (options.tipLabel) ? options.tipLabel : 'Previous view';\r\n\r\n        var label = (options.label) ? options.label : '\\u2190';\r\n\r\n        let label_ = document.createElement('span');\r\n        label_.innerHTML = label;\r\n\r\n        var button = document.createElement('button');\r\n        button.type = 'button';\r\n        button.title = tipLabel;\r\n        button.appendChild(label_);\r\n\r\n\r\n        var prevResolution = 1;\r\n\r\n        var element = document.createElement('div');\r\n        element.className = 'ol-prevZoom ol-control ol-unselectable disabled';\r\n        element.appendChild(button);\r\n\r\n        super({\r\n            element: element,\r\n            target: options.target\r\n        });\r\n\r\n        dragZoom.on('boxstart', (function (e) {\r\n            if ((\" \" + element.className + \" \").indexOf(' disabled ') > -1) {\r\n                element.className = element.className.replace(/disabled/g, '');\r\n            }\r\n\r\n            prevResolution = this.getMap().getView().getResolution();\r\n        }).bind(this));\r\n\r\n        button.addEventListener('click', handleClick.bind(this), false);\r\n        button.addEventListener('touchstart', handleClick.bind(this), false);\r\n    }\r\n\r\n    /**\r\n    * Sets the OpenLayers map this control handles. This is automatically called by OpenLayers\r\n    * @param {ol.Map} map \r\n    */\r\n    setMap(map) {\r\n        super.setMap(map);\r\n    }\r\n}\r\n\r\n\r\n\r\n\r\n\r\n","import { Control } from 'ol/control';\r\n\r\n/**\r\n  * Displays an interface with an associated image for a slide, barcode, macro or label.\r\n * @param {object} opt_options Options to initialize\r\n * @param {Viewport} [opt_options.pmaViewport] Viewport instance this control belongs to\r\n * @param {number} [opt_options.rotation] The initial rotation for this associated image\r\n * @param {boolean} [opt_options.collapsed] Whether the control starts collapsed\r\n * @param {\"barcode\" | \"macro\" | \"label\"} [opt_options.imageType] The type of associated image to show\r\n * @param {string} [opt_options.tipLabel] The label of the button\r\n * @param {Object} [opt_options.stateManager] The state manager to keep settings in sync\r\n * @category Controls\r\n */\r\nexport class AssociatedImage extends Control {\r\n    constructor(opt_options) {\r\n        var options = opt_options || {};\r\n\r\n        var element = document.createElement('div');\r\n        super({\r\n            element: element,\r\n            target: options.target\r\n        });\r\n\r\n        this.pmaViewport = options.pmaViewport;\r\n\r\n        this.stateManager = options.stateManager ? options.stateManager : null;\r\n        if (this.stateManager) {\r\n            if (!this.stateManager.associatedImage) {\r\n                this.stateManager.associatedImage = {};\r\n                this.stateManager.associatedImage.collapsed = (options.collapsed) ? options.collapsed : false;\r\n            }\r\n\r\n            this.collapsed_ = this.stateManager.associatedImage.collapsed === true;\r\n        }\r\n        else {\r\n            this.collapsed_ = (options.collapsed) ? options.collapsed : false;\r\n        }\r\n\r\n        var className = (options.className) ? options.className : 'ol-associated-image';\r\n        var tipLabel = (options.tipLabel) ? options.tipLabel : 'Barcode';\r\n\r\n        var collapseLabel = (options.collapseLabel) ? options.collapseLabel : '\\u00AB';\r\n        this.collapseLabel_ = document.createElement('span');\r\n        this.collapseLabel_.innerHTML = collapseLabel;\r\n\r\n        var label = (options.label) ? options.label : '\\u00BB';\r\n        this.label_ = document.createElement('span');\r\n        this.label_.innerHTML = label;\r\n\r\n        var activeLabel = this.collapsed_ ? this.collapseLabel_ : this.label_;\r\n\r\n        var button = document.createElement('button');\r\n        button.type = 'button';\r\n        button.title = tipLabel;\r\n        button.appendChild(activeLabel);\r\n        if ('ontouchstart' in document.documentElement) {\r\n            button.addEventListener('touchstart', this.buttonClk.bind(this), false);\r\n        }\r\n        else {\r\n            button.addEventListener('click', this.buttonClk.bind(this), false);\r\n        }\r\n\r\n        if (this.stateManager && typeof this.stateManager.associatedImage.rotation === \"number\") {\r\n            this.rotation = this.stateManager.associatedImage.rotation;\r\n        }\r\n        else {\r\n            this.rotation = opt_options.rotation ? opt_options.rotation : 0;\r\n        }\r\n\r\n        this.imageType = opt_options.imageType.toLowerCase();\r\n\r\n        var imgEl = document.createElement(\"img\");\r\n        imgEl.src = this.getImageUrl();\r\n\r\n        var container = document.createElement('div');\r\n        container.className = \"ol-associated-image-container\";\r\n        container.appendChild(imgEl);\r\n\r\n        var cssClasses = className + ' ' + 'ol-unselectable ol-control ' +\r\n            (this.collapsed_ ? ' ol-collapsed' : '');\r\n\r\n        element.className = cssClasses;\r\n        element.appendChild(button);\r\n        element.appendChild(container);\r\n\r\n        function rotateImage(event) {\r\n            event.preventDefault();\r\n            event.stopPropagation();\r\n\r\n            this.rotation = (this.rotation + 90) % 360;\r\n            if (this.stateManager) {\r\n                this.stateManager.associatedImage.rotation = this.rotation;\r\n            }\r\n\r\n            imgEl.src = this.getImageUrl();\r\n        }\r\n\r\n        if ('ontouchstart' in document.documentElement) {\r\n            imgEl.addEventListener('touchstart', rotateImage.bind(this), false);\r\n        }\r\n        else {\r\n            imgEl.addEventListener('click', rotateImage.bind(this), false);\r\n        }\r\n\r\n        this.imageElement = imgEl;\r\n\r\n        var rotateBtn = document.createElement('button');\r\n        rotateBtn.type = 'button';\r\n        rotateBtn.title = \"Rotate\";\r\n        rotateBtn.className = \"size\";\r\n        rotateBtn.innerHTML = \"\\u2b6e\";\r\n        if ('ontouchstart' in document.documentElement) {\r\n            rotateBtn.addEventListener('touchstart', rotateImage.bind(this), false);\r\n        }\r\n        else {\r\n            rotateBtn.addEventListener('click', rotateImage.bind(this), false);\r\n        }\r\n\r\n        element.appendChild(rotateBtn);\r\n\r\n        function zoomOutCb() {\r\n            window.open(this.getImageUrl(), \"_blank\");\r\n        }\r\n        var zoomOutBtn = document.createElement('button');\r\n        zoomOutBtn.type = 'button';\r\n        zoomOutBtn.title = \"zoom out\";\r\n        zoomOutBtn.className = \"size\";\r\n        zoomOutBtn.innerHTML = \"\\u2315\";\r\n        if ('ontouchstart' in document.documentElement) {\r\n            zoomOutBtn.addEventListener('touchstart', zoomOutCb.bind(this), false);\r\n        }\r\n        else {\r\n            zoomOutBtn.addEventListener('click', zoomOutCb.bind(this), false);\r\n        }\r\n\r\n        element.appendChild(zoomOutBtn);\r\n    }\r\n\r\n    getImageUrl() {\r\n        return this.pmaViewport.getActiveServerUrl() + this.imageType + \"?sessionID=\" + encodeURIComponent(this.pmaViewport.getSessionID()) + \"&pathOrUid=\" + encodeURIComponent(this.pmaViewport.imageInfo.Filename) + \"&rotation=\" + this.rotation;\r\n    }\r\n\r\n    /** \r\n    * Sets the rotation for this image\r\n   */\r\n    setRotation(rotation) {\r\n        this.rotation = rotation;\r\n        if (this.stateManager) {\r\n            this.stateManager.associatedImage.rotation = this.rotation;\r\n        }\r\n\r\n        this.imageElement.src = this.getImageUrl();\r\n    }\r\n\r\n    /** \r\n    * Gets the current rotation for this image\r\n    * @param {Number} rotation - The current rotation for this in degrees\r\n    */\r\n    getRotation() {\r\n        return this.rotation;\r\n    }\r\n\r\n    /** \r\n     * Gets the collapsed state of the control\r\n     * @return {boolean} True if the control is currently collapsed\r\n    */\r\n    getCollapsed() {\r\n        return (\" \" + this.element.className + \" \").indexOf(' ol-collapsed ') > -1;\r\n    }\r\n\r\n    /** \r\n     * Sets the collapsed state of the control\r\n     * @param {boolean} collapsed - True to collapse the control, otherwise false\r\n    */\r\n    setCollapsed(collapsed) {\r\n        if (this.getCollapsed() != collapsed) {\r\n            this.buttonClk();\r\n        }\r\n    }\r\n\r\n    buttonClk(event) {\r\n        if (event) {\r\n            event.preventDefault();\r\n            event.stopPropagation();\r\n        }\r\n\r\n        if ((\" \" + this.element.className + \" \").indexOf(' ol-collapsed ') > -1) {\r\n            this.element.className = this.element.className.replace(/ol-collapsed/g, '');\r\n        }\r\n        else {\r\n            this.element.className += ' ol-collapsed';\r\n        }\r\n\r\n        if (!this.collapsed_) {\r\n            this.label_.parentNode.replaceChild(this.collapseLabel_, this.label_);\r\n        } else {\r\n            this.collapseLabel_.parentNode.replaceChild(this.label_, this.collapseLabel_);\r\n        }\r\n\r\n        this.collapsed_ = !this.collapsed_;\r\n        if (this.stateManager) {\r\n            this.stateManager.associatedImage.collapsed = this.collapsed_;\r\n        }\r\n    }\r\n}","import { Control } from 'ol/control';\r\n\r\n/**\r\n * Displays an interface that allows the user to take snapshot of current view\r\n * @param {object} opt_options Options to initialize the snapshot control\r\n * @param {Viewport} opt_options.pmaViewport Viewport instance this control belongs to\r\n * @param {string} [opt_options.tipLabel] Label for snapshot button\r\n */\r\nexport class Snapshot extends Control {\r\n    constructor(opt_options) {\r\n\r\n        var options = opt_options || {};\r\n        var element = document.createElement('div');\r\n        super({\r\n            element: element,\r\n            target: options.target\r\n        });\r\n\r\n        this.pmaViewport = options.pmaViewport;\r\n\r\n        var anchor = document.createElement('a');\r\n        anchor.href = '#';\r\n        anchor.innerHTML = (options.tipLabel) ? options.tipLabel : 'Snapshot';\r\n\r\n        var this_ = this;\r\n        var handleClick = function (e) {\r\n            e.preventDefault();\r\n\r\n            if (this_.pmaViewport) {\r\n                var url = this_.pmaViewport.getSnapshotUrl(false).url;\r\n                window.open(url, '_blank');\r\n            }\r\n        };\r\n\r\n        anchor.addEventListener('click', handleClick, false);\r\n        anchor.addEventListener('touchstart', handleClick, false);\r\n\r\n\r\n        element.className = 'ol-snapshot ol-unselectable';\r\n        element.appendChild(anchor);\r\n    }\r\n}","import { Control } from 'ol/control';\r\n\r\n/**\r\n * Creates a control to display the filename of a slide\r\n * @param {object} opt_options Options to initialize\r\n * @param {string | PMA.UI.View.Viewport~filenameCallback | undefined} opt_options.filename How to show the filename. If a string is passed this is displayed. \r\n * If a callback function is passed this is called to get the filaname to show. If this is ommited the filename is automatically fetched via the slide info\r\n * @param {string} opt_options.onClick The event to call when the filename is clicked\r\n * @param {boolean} [opt_options.collapsed] Whether the control starts collapsed\r\n * @param {string} [opt_options.collapseLabel] The label to show when collapsed\r\n * @param {Object} [opt_options.stateManager] The state manager to keep settings in sync\r\n */\r\nexport class Filename extends Control {\r\n    constructor(opt_options) {\r\n        var options = opt_options || {};\r\n        var element = document.createElement('div');\r\n        super({\r\n            element: element,\r\n            target: options.target\r\n        });\r\n\r\n        this.stateManager = options.stateManager ? options.stateManager : null;\r\n        if (this.stateManager) {\r\n            if (!this.stateManager.fileName) {\r\n                this.stateManager.fileName = {};\r\n                this.stateManager.fileName.collapsed = (options.collapsed) ? options.collapsed : false;\r\n            }\r\n\r\n            this.collapsed_ = this.stateManager.fileName.collapsed === true;\r\n        }\r\n        else {\r\n            this.collapsed_ = (options.collapsed) ? options.collapsed : false;\r\n        }\r\n\r\n        var collapseLabel = (options.collapseLabel) ? options.collapseLabel : '\\u00AB';\r\n        this.collapseLabel_ = document.createElement('a');\r\n        this.collapseLabel_.href = '#';\r\n        this.collapseLabel_.innerHTML = collapseLabel;\r\n\r\n        var label = (options.label) ? options.label : '\\u00BB';\r\n        this.label_ = document.createElement('a');\r\n        this.label_.href = '#';\r\n        this.label_.innerHTML = label;\r\n\r\n        var anchor = document.createElement('a');\r\n        anchor.href = '#';\r\n        var mainSpan = document.createElement('span');\r\n        mainSpan.innerHTML = options.filename;\r\n        anchor.appendChild(mainSpan);\r\n\r\n\r\n        var handleClick = function (e) {\r\n            e.preventDefault();\r\n            if (typeof options.onClick === \"function\") {\r\n                options.onClick();\r\n            }\r\n        };\r\n\r\n        anchor.addEventListener('click', handleClick, false);\r\n        anchor.addEventListener('touchstart', handleClick, false);\r\n\r\n\r\n        element.className = 'ol-filename ol-unselectable' + (this.collapsed_ ? ' ol-collapsed' : '');\r\n        element.appendChild(anchor);\r\n        element.appendChild(this.collapseLabel_);\r\n        element.appendChild(this.label_);\r\n\r\n        this.handleCollapseClick = function (e) {\r\n            if (e) {\r\n                e.preventDefault();\r\n            }\r\n\r\n            if ((\" \" + element.className + \" \").indexOf(' ol-collapsed ') > -1) {\r\n                element.className = element.className.replace(/ol-collapsed/g, '');\r\n            }\r\n            else {\r\n                element.className += ' ol-collapsed';\r\n            }\r\n        };\r\n\r\n        this.collapseLabel_.addEventListener('click', this.handleCollapseClick, false);\r\n        this.collapseLabel_.addEventListener('touchstart', this.handleCollapseClick, false);\r\n        this.label_.addEventListener('click', this.handleCollapseClick, false);\r\n        this.label_.addEventListener('touchstart', this.handleCollapseClick, false);\r\n    }\r\n\r\n    /** \r\n     * Gets the collapsed state of the control\r\n     * @return {boolean} True if the control is currently collapsed\r\n    */\r\n    getCollapsed() {\r\n        return (\" \" + this.element.className + \" \").indexOf(' ol-collapsed ') > -1;\r\n    };\r\n\r\n    /** \r\n     * Sets the collapsed state of the control\r\n     * @param {boolean} collapsed - True to collapse the control, otherwise false\r\n    */\r\n    setCollapsed(collapsed) {\r\n        if (this.getCollapsed() != collapsed) {\r\n            this.handleCollapseClick();\r\n        }\r\n    };\r\n}\r\n","import { Control } from 'ol/control';\r\nimport noUiSlider from 'nouislider';\r\nimport 'nouislider/distribute/nouislider.css';\r\nimport { guidGenerator } from '../helpers';\r\nimport { Resources } from '../../resources/resources';\r\n\r\nconst steps = [\r\n    {\r\n        step: 1,\r\n        class: \"x1\"\r\n    },\r\n    {\r\n        step: 0.5,\r\n        class: \"x2\"\r\n    },\r\n    {\r\n        step: 0.2,\r\n        class: \"x3\"\r\n    },\r\n    {\r\n        step: 0.1,\r\n        class: \"x4\"\r\n    },\r\n    {\r\n        step: 0.05,\r\n        class: \"x5\"\r\n    }\r\n];\r\n\r\n/**\r\n * Creates a new dimension selector control\r\n * @param {object} opt_options Options to initialize\r\n * @param {Viewport} opt_options.pmaViewport Viewport instance this control belongs to\r\n * @param {string} opt_options.tipLabel Label for the button\r\n * @param {boolean} opt_options.collapsed Whether the control starts collapsed\r\n * @param {Object} opt_options.stateManager The state manager to keep settings in sync\r\n */\r\nexport class DimensionSelector extends Control {\r\n    constructor(opt_options) {\r\n        var options = opt_options || {};\r\n        var element = document.createElement('div');\r\n\r\n        super({\r\n            element: element,\r\n            target: options.target\r\n        });\r\n\r\n        this.pmaViewport = options.pmaViewport;\r\n        this.stateManager = options.stateManager ? options.stateManager : null;\r\n        if (this.stateManager) {\r\n            if (!this.stateManager.dimensionSelector) {\r\n                this.stateManager.dimensionSelector = {};\r\n                this.stateManager.dimensionSelector.collapsed = (options.collapsed) ? options.collapsed : false;\r\n            }\r\n\r\n            this.collapsed_ = this.stateManager.dimensionSelector.collapsed === true;\r\n        }\r\n        else {\r\n            this.collapsed_ = (options.collapsed) ? options.collapsed : false;\r\n        }\r\n\r\n        this.sliders = [];\r\n        this.slidersValues = [];\r\n        this.currentStep = 0;\r\n\r\n        var className = (options.className) ? options.className : 'ol-dimension-selector';\r\n        this.tipLabel = (options.tipLabel) ? options.tipLabel : 'Channels';\r\n\r\n        var collapseLabel = (options.collapseLabel) ? options.collapseLabel : '\\u00BB';\r\n        this.collapseLabel_ = document.createElement('span');\r\n        this.collapseLabel_.innerHTML = collapseLabel;\r\n\r\n        var label = (options.label) ? options.label : '\\u00AB';\r\n        this.label_ = document.createElement('span');\r\n        this.label_.innerHTML = label;\r\n\r\n        var activeLabel = this.collapsed_ ? this.collapseLabel_ : this.label_;\r\n\r\n        var button = document.createElement('button');\r\n        button.type = 'button';\r\n        button.title = this.tipLabel;\r\n        button.appendChild(activeLabel);\r\n        button.className = \"collapse-button\";\r\n        button.style = \"float: left\";\r\n        this.btnEventUsed = 'click';\r\n\r\n        if ('ontouchstart' in document.documentElement) {\r\n            this.btnEventUsed = 'touchstart';\r\n        }\r\n\r\n        button.addEventListener(this.btnEventUsed, this.buttonClk.bind(this), false);\r\n\r\n        var cssClasses = className + ' ' + 'ol-unselectable ol-control ' + (this.collapsed_ ? ' ol-collapsed' : '');\r\n\r\n        this.dimensionsDiv = document.createElement(\"div\");\r\n        this.dimensionsDiv.className = \"ol-dimensions-container\";\r\n        this.renderDimensionsControl();\r\n\r\n        this.dimensionControlsDiv = document.createElement(\"div\");\r\n        this.dimensionControlsDiv.className = \"ol-dimensions-container\";\r\n        this.renderSelectors(true);\r\n\r\n        element.className = cssClasses;\r\n        if (this.dimensionsDiv && this.dimensionsDiv !== \"\") {\r\n            element.appendChild(this.dimensionsDiv);\r\n        }\r\n\r\n        if (this.dimensionControlsDiv && this.dimensionControlsDiv !== \"\") {\r\n            element.appendChild(this.dimensionControlsDiv);\r\n        }\r\n\r\n        element.appendChild(button);\r\n\r\n        var tipLabel = \"\";\r\n        var label_ = \"\";\r\n\r\n        tipLabel = \"Decrease resolution\";\r\n        label = '<i class=\"fa fa-minus\" aria-hidden=\"true\"></i>';\r\n        label_ = document.createElement(\"span\");\r\n        label_.innerHTML = label;\r\n\r\n        this.lastSelection = -1;\r\n\r\n        this.element.addEventListener(\"wheel\", this.wheelEvent.bind(this), false);\r\n\r\n        /*this.pmaViewport.listen(\"change:dimension\", function () {\r\n            _this.destroySliders();\r\n            _this.renderDimensionsControl();\r\n            _this.renderSelectors(false);\r\n            _this.renderSliders(_this.currentStep);\r\n        });*/\r\n    }\r\n\r\n    buttonClk(event) {\r\n        if (event) {\r\n            event.preventDefault();\r\n            event.stopPropagation();\r\n        }\r\n\r\n        if ((\" \" + this.element.className + \" \").indexOf(' ol-collapsed ') > -1) {\r\n            this.element.className = this.element.className.replace(/ol-collapsed/g, '');\r\n        }\r\n        else {\r\n            this.element.className += ' ol-collapsed';\r\n        }\r\n\r\n        if (this.pmaViewport.imageInfo.TimeFrames[0].Layers[0].Channels.length > 1) {\r\n            if (!this.collapsed_) {\r\n                this.label_.parentNode.replaceChild(this.collapseLabel_, this.label_);\r\n            } else {\r\n                this.collapseLabel_.parentNode.replaceChild(this.label_, this.collapseLabel_);\r\n            }\r\n        }\r\n        this.collapsed_ = !this.collapsed_;\r\n        if (this.stateManager) {\r\n            this.stateManager.dimensionSelector.collapsed = this.collapsed_;\r\n        }\r\n    };\r\n\r\n    /** \r\n     * Gets the collapsed state of the control\r\n     * @return {boolean} True if the control is currently collapsed\r\n    */\r\n    getCollapsed() {\r\n        return (\" \" + this.element.className + \" \").indexOf(' ol-collapsed ') > -1;\r\n    };\r\n\r\n    /** \r\n     * Sets the collapsed state of the control\r\n     * @param {boolean} collapsed - True to collapse the control, otherwise false\r\n    */\r\n    setCollapsed(collapsed) {\r\n        if (this.getCollapsed() != collapsed) {\r\n            this.buttonClk();\r\n        }\r\n    }\r\n\r\n    renderDimensionsControl() {\r\n        // assign change event to the channel check boxes\r\n        function chkChange(e) {\r\n            // assign the selected channels back to the viewport\r\n            var chans = [];\r\n            var chks = this.dimensionsDiv.querySelectorAll(\".ol-dimensions-container ul input[type='checkbox']\");\r\n            for (var i = 0; i < chks.length; i++) {\r\n                if (chks[i].checked) {\r\n                    chans.push(i);\r\n                    this.lastSelection = i;\r\n                }\r\n            }\r\n\r\n            if (chans.length === 0) {\r\n                chks[this.lastSelection].checked = true;\r\n                chans.push(this.lastSelection);\r\n            }\r\n\r\n            this.pmaViewport.setActiveChannels(chans);\r\n        }\r\n\r\n        this.sliders = [];\r\n        if (this.pmaViewport.imageInfo.TimeFrames[0].Layers[0].Channels.length > 1) {\r\n            var channelsHtml = \"<div id='channels'>\" + this.tipLabel + \"</div><div id='step'></div><ul>\";\r\n\r\n            for (var i = 0; i < this.pmaViewport.imageInfo.TimeFrames[0].Layers[0].Channels.length; i++) {\r\n                var c = this.pmaViewport.imageInfo.TimeFrames[0].Layers[0].Channels[i];\r\n                channelsHtml += \"<li style='background-color: #\" + c.Color.substr(2, 6) + \"'>\";\r\n                channelsHtml += \"<span class='channel-span'><label>\" + c.Name + \" <input type='checkbox' \" + (c.Active ? \"checked='checked'\" : \"\") + \" /></label></span>\";\r\n                if (c.Name !== \"Default\") {\r\n                    const channelSelectorId = `${guidGenerator()}_slider`;\r\n                    this.sliders.push(channelSelectorId);\r\n                    channelsHtml += \"<span class='slider-span' id='\" + channelSelectorId + \"'></span>\";\r\n                }\r\n\r\n                channelsHtml += \"</li>\";\r\n            }\r\n\r\n            channelsHtml += \"</ul>\";\r\n\r\n            if (this.sliders.length > 0) {\r\n                channelsHtml += \"<div style='display: block; height: 25px;'>\";\r\n                channelsHtml += \"<button id='increaseButton' type='button' title='Increase resolution' style='float: right;'>\";\r\n                channelsHtml += \"<span><i class='fa fa-plus' aria-hidden='true'></i></span>\";\r\n                channelsHtml += \"</button>\";\r\n                channelsHtml += \"<button id='decreaseButton' type='button' title='Decrease resolution' style='float: right;'>\";\r\n                channelsHtml += \"<span><i class='fa fa-minus' aria-hidden='true'></i></span>\";\r\n                channelsHtml += \"</button>\";\r\n                channelsHtml += \"</div>\";\r\n            }\r\n\r\n            this.dimensionsDiv.innerHTML = channelsHtml;\r\n\r\n            var checkboxes = this.dimensionsDiv.querySelectorAll(\".ol-dimensions-container ul input[type='checkbox']\");\r\n            for (i = 0; i < checkboxes.length; i++) {\r\n                checkboxes[i].addEventListener('change', chkChange.bind(this), false);\r\n            }\r\n\r\n            if (this.sliders.length > 0) {\r\n                var _this = this;\r\n                this.dimensionsDiv.querySelector(\"#increaseButton\").addEventListener('click', function () {\r\n                    _this.destroySliders();\r\n                    _this.renderDimensionsControl();\r\n                    _this.renderSelectors(false);\r\n                    _this.currentStep = _this.currentStep < 4 ? _this.currentStep + 1 : _this.currentStep;\r\n                    _this.renderSliders(_this.currentStep);\r\n                }, false);\r\n\r\n                this.dimensionsDiv.querySelector(\"#decreaseButton\").addEventListener('click', function () {\r\n                    _this.destroySliders();\r\n                    _this.renderDimensionsControl();\r\n                    _this.renderSelectors(false);\r\n                    _this.currentStep = _this.currentStep > 0 ? _this.currentStep - 1 : _this.currentStep;\r\n                    _this.renderSliders(_this.currentStep);\r\n                }, false);\r\n            }\r\n        }\r\n    }\r\n\r\n    renderSelectors(initialRender) {\r\n        function dimensionChange(e) {\r\n            if (e.target.name == \"timeframe\") {\r\n                this.pmaViewport.setActiveTimeFrame(e.target.value);\r\n            }\r\n            else if (e.target.name == \"zstack\") {\r\n                this.pmaViewport.setActiveLayer(e.target.value);\r\n            }\r\n            if (document.getElementById(\"zstackSlider\")) {\r\n                document.getElementById(\"zstackLabel\").innerHTML = Resources.translate(\"Z-stack: <br /> {stack} / {total}\", { stack: (this.pmaViewport.getActiveLayer() + 1), total: this.pmaViewport.imageInfo.TimeFrames[this.pmaViewport.getActiveTimeFrame()].Layers.length });\r\n            }\r\n            if (document.getElementById(\"timeframeSlider\")) {\r\n                document.getElementById(\"timeframeLabel\").innerHTML = Resources.translate(\"Time frame: <br /> {frame} / {total}\", { frame: (this.pmaViewport.getActiveTimeFrame() + 1), total: this.pmaViewport.imageInfo.TimeFrames.length });\r\n            }\r\n        }\r\n\r\n        function prevNextClicked(e) {\r\n            var tf = this.pmaViewport.getActiveTimeFrame();\r\n            var l = this.pmaViewport.getActiveLayer();\r\n            if (e.target.name == \"prev-timeframe\") {\r\n                tf--;\r\n                if (tf < 0) {\r\n                    tf = this.pmaViewport.imageInfo.TimeFrames.length - 1;\r\n                }\r\n\r\n                this.pmaViewport.setActiveTimeFrame(tf);\r\n            }\r\n            else if (e.target.name == \"next-timeframe\") {\r\n                tf++;\r\n                if (tf >= this.pmaViewport.imageInfo.TimeFrames.length) {\r\n                    tf = 0;\r\n                }\r\n                this.pmaViewport.setActiveTimeFrame(tf);\r\n            }\r\n            else if (e.target.name == \"prev-zstack\") {\r\n                l--;\r\n                if (l < 0) {\r\n                    l = this.pmaViewport.imageInfo.TimeFrames[tf].Layers.length - 1;\r\n                }\r\n                this.pmaViewport.setActiveLayer(l);\r\n            }\r\n            else if (e.target.name == \"next-zstack\") {\r\n                l++;\r\n                if (l >= this.pmaViewport.imageInfo.TimeFrames[tf].Layers.length) {\r\n                    l = 0;\r\n                }\r\n                this.pmaViewport.setActiveLayer(l);\r\n            }\r\n            if (document.getElementById(\"zstackSlider\")) {\r\n                document.getElementById(\"zstackSlider\").value = l;\r\n                document.getElementById(\"zstackLabel\").innerHTML = Resources.translate(\"Z-stack: <br /> {stack} / {total}\", { stack: (this.pmaViewport.getActiveLayer() + 1), total: this.pmaViewport.imageInfo.TimeFrames[this.pmaViewport.getActiveTimeFrame()].Layers.length });\r\n            }\r\n            if (document.getElementById(\"timeframeSlider\")) {\r\n                document.getElementById(\"timeframeSlider\").value = tf;\r\n                document.getElementById(\"timeframeLabel\").innerHTML = Resources.translate(\"Time frame: <br /> {frame} / {total}\", { frame: (this.pmaViewport.getActiveTimeFrame() + 1), total: this.pmaViewport.imageInfo.TimeFrames.length });\r\n            }\r\n        }\r\n\r\n        var HTMLstring = \"\";\r\n        if (this.pmaViewport.imageInfo.TimeFrames.length > 1) {\r\n            HTMLstring += \"<div id=\\\"timeframeLabel\\\">\" + Resources.translate(\"Time frame: <br /> {frame} / {total}\", { frame: (this.pmaViewport.getActiveTimeFrame() + 1), total: this.pmaViewport.imageInfo.TimeFrames.length }) + \"</div>\";\r\n\r\n            HTMLstring += \"<button name='prev-timeframe' class='prev-next-button'>&lt;</button>\";\r\n            HTMLstring += \"<input type=\\\"range\\\" min=\\\"0\\\" max=\\\"\" + (this.pmaViewport.imageInfo.TimeFrames.length - 1) + \"\\\" value=\\\"\" + this.pmaViewport.getActiveTimeFrame() + \"\\\" name=\\\"timeframe\\\" id=\\\"timeframeSlider\\\">\";\r\n            HTMLstring += \"<button name='next-timeframe' class='prev-next-button'>&gt;</button>\";\r\n        }\r\n\r\n        var tf = this.pmaViewport.imageInfo.TimeFrames[this.pmaViewport.getActiveTimeFrame()];\r\n        if (tf.Layers.length > 1) {\r\n            // if it's the first time we draw the control, select the middle z-stack layer\r\n            if (initialRender) {\r\n                this.pmaViewport.setActiveLayer((Math.round((tf.Layers.length - 1) / 2) | 0));\r\n            }\r\n\r\n            var selectedZStack = this.pmaViewport.getActiveLayer();\r\n\r\n            HTMLstring += \"<div id=\\\"zstackLabel\\\">\" + Resources.translate(\"Z-stack: <br /> {stack} / {total}\", { stack: (selectedZStack + 1), total: tf.Layers.length }) + \"</div>\";\r\n            HTMLstring += \"<button name='prev-zstack' class='prev-next-button'>&lt;</button>\";\r\n            HTMLstring += \"<input type=\\\"range\\\" min=\\\"0\\\" max=\\\"\" + (tf.Layers.length - 1) + \"\\\" value=\\\"\" + selectedZStack + \"\\\" name=\\\"zstack\\\" id=\\\"zstackSlider\\\">\";\r\n            HTMLstring += \"<button name='next-zstack' class='prev-next-button'>&gt;</button>\";\r\n        }\r\n\r\n        if (HTMLstring !== \"\") {\r\n            this.dimensionControlsDiv.innerHTML = \"<div>\" + HTMLstring + \"</div>\";\r\n            var selects = this.dimensionControlsDiv.querySelectorAll(\".ol-dimensions-container input[type=range]\");\r\n            for (var k = 0; k < selects.length; k++) {\r\n                selects[k].addEventListener('input', dimensionChange.bind(this), false);\r\n            }\r\n\r\n            var btns = this.dimensionControlsDiv.querySelectorAll(\".ol-dimensions-container .prev-next-button\");\r\n            for (k = 0; k < btns.length; k++) {\r\n                btns[k].addEventListener(this.btnEventUsed, prevNextClicked.bind(this), false);\r\n            }\r\n        }\r\n    }\r\n\r\n    wheelEvent(e) {\r\n        e.preventDefault();\r\n        if ((\" \" + this.element.className + \" \").indexOf(' ol-collapsed ') > -1) {\r\n            return;\r\n        }\r\n\r\n        var tf = this.pmaViewport.getActiveTimeFrame();\r\n        var l = this.pmaViewport.getActiveLayer();\r\n        if (e.deltaY && e.deltaY < 0) {\r\n            l--;\r\n            if (l < 0) {\r\n                ////l = this.pmaViewport.imageInfo.TimeFrames[tf].Layers.length - 1;\r\n                l = 0;\r\n            }\r\n\r\n            this.pmaViewport.setActiveLayer(l);\r\n        }\r\n        else if (e.deltaY && e.deltaY > 0) {\r\n            l++;\r\n            if (l >= this.pmaViewport.imageInfo.TimeFrames[tf].Layers.length) {\r\n                ////l = 0;\r\n                l = this.pmaViewport.imageInfo.TimeFrames[tf].Layers.length - 1;\r\n            }\r\n\r\n            this.pmaViewport.setActiveLayer(l);\r\n        }\r\n\r\n        if (document.getElementById(\"zstackSlider\")) {\r\n            document.getElementById(\"zstackSlider\").value = l;\r\n            document.getElementById(\"zstackLabel\").innerHTML = Resources.translate(\"Z-stack: <br /> {stack} / {total}\", { stack: (this.pmaViewport.getActiveLayer() + 1), total: this.pmaViewport.imageInfo.TimeFrames[this.pmaViewport.getActiveTimeFrame()].Layers.length });\r\n        }\r\n        if (document.getElementById(\"timeframeSlider\")) {\r\n            document.getElementById(\"timeframeSlider\").value = tf;\r\n            document.getElementById(\"timeframeLabel\").innerHTML = Resources.translate(\"Time frame: <br /> {frame} / {total}\", { frame: (this.pmaViewport.getActiveTimeFrame() + 1), total: this.pmaViewport.imageInfo.TimeFrames.length });\r\n        }\r\n    }\r\n\r\n    round(value, precision) {\r\n        var multiplier = Math.pow(10, precision || 0);\r\n        return Math.round(value * multiplier) / multiplier;\r\n    }\r\n\r\n    renderSliders(currentStep = 0) {\r\n        if (this.sliders.length === 0) {\r\n            return;\r\n        }\r\n\r\n        const self = this;\r\n\r\n        for (var i = 0; i < this.sliders.length; i++) {\r\n            var start;\r\n            if (this.slidersValues[i]) {\r\n                start = this.slidersValues[i];\r\n            }\r\n            else {\r\n                start = [0, 100];\r\n            }\r\n\r\n            var slider = document.getElementById(this.sliders[i]);\r\n            steps.forEach(s => {\r\n                slider.parentElement.classList.remove(s.class);\r\n            });\r\n            slider.parentElement.classList.add(steps[currentStep].class);\r\n\r\n            document.getElementById(\"step\").innerText = \"Step: \" + steps[currentStep].step;\r\n\r\n            noUiSlider.create(slider, {\r\n                start: start,\r\n                tooltips: [true, true],\r\n                step: steps[currentStep].step,\r\n                connect: true,\r\n                margin: steps[currentStep].step,\r\n                keyboardSupport: true,\r\n                range: {\r\n                    'min': 0,\r\n                    'max': 100\r\n                },\r\n                format: {\r\n                    to: function (value) {\r\n                        return self.round(value, 2).toFixed(2);\r\n                    },\r\n                    from: function (value) {\r\n                        return self.round(value, 2).toFixed(2);\r\n                    }\r\n                }\r\n            });\r\n\r\n            slider.noUiSlider.channelIndex = i;\r\n\r\n            slider.noUiSlider.on(\"change\", function (value) {\r\n                self.pmaViewport.setChannelRenderingOptions({ index: this.channelIndex, clipping: value });\r\n            });\r\n        }\r\n    }\r\n\r\n    destroySliders() {\r\n        for (var i = 0; i < this.sliders.length; i++) {\r\n            var slider = document.getElementById(this.sliders[i]);\r\n            this.slidersValues[i] = slider.noUiSlider.get();\r\n            slider.noUiSlider.destroy();\r\n        }\r\n\r\n        this.sliders = [];\r\n    }\r\n}","import { Control } from 'ol/control';\r\nimport { Events } from '../definitions';\r\n\r\n/**\r\n * Creates a control for managing server side annotation layers\r\n * @param {object} opt_options Options to initialize\r\n * @param {string} [opt_options.className] The css class to apply to this control\r\n * @param {string} [opt_options.tipLabel] Label for the button\r\n * @param {boolean} [opt_options.collapsed] Whether the control starts collapsed\r\n * @param {string} [opt_options.collapseLabel] The label to show when collapsed\r\n * @param {Object} [opt_options.stateManager] The state manager to keep settings in sync\r\n */\r\nexport class LayerSwitch extends Control {\r\n    constructor(opt_options) {\r\n        var options = opt_options || {};\r\n        var element = document.createElement('div');\r\n        super({\r\n            element: element,\r\n            target: options.target\r\n        });\r\n\r\n        this.pmaViewport = options.pmaViewport;\r\n        this.stateManager = options.stateManager ? options.stateManager : null;\r\n        if (this.stateManager) {\r\n            if (!this.stateManager.layerSwitch) {\r\n                this.stateManager.layerSwitch = {};\r\n                this.stateManager.layerSwitch.collapsed = (options.collapsed) ? options.collapsed : false;\r\n            }\r\n\r\n            this.collapsed_ = this.stateManager.layerSwitch.collapsed === true;\r\n        }\r\n        else {\r\n            this.collapsed_ = (options.collapsed) ? options.collapsed : false;\r\n        }\r\n\r\n        var className = (options.className) ? options.className : 'ol-layerswitch';\r\n        var tipLabel = (options.tipLabel) ? options.tipLabel : 'Channels';\r\n\r\n        var collapseLabel = (options.collapseLabel) ? options.collapseLabel : '\\u00BB';\r\n        this.collapseLabel_ = document.createElement('span');\r\n        this.collapseLabel_.innerHTML = collapseLabel;\r\n\r\n        var label = (options.label) ? options.label : '\\u00AB';\r\n        this.label_ = document.createElement('span');\r\n        this.label_.innerHTML = label;\r\n\r\n        var activeLabel = this.collapsed_ ? this.collapseLabel_ : this.label_;\r\n\r\n        var button = document.createElement('button');\r\n        button.type = 'button';\r\n        button.title = tipLabel;\r\n        button.appendChild(activeLabel);\r\n        button.className = \"collapse-button\";\r\n        this.btnEventUsed = 'click';\r\n\r\n        if ('ontouchstart' in document.documentElement) {\r\n            this.btnEventUsed = 'touchstart';\r\n        }\r\n\r\n        button.addEventListener(this.btnEventUsed, this.buttonClk.bind(this), false);\r\n\r\n        var cssClasses = className + ' ' + 'ol-unselectable ol-control ' + (this.collapsed_ ? ' ol-collapsed' : '');\r\n        element.className = cssClasses;\r\n        element.appendChild(button);\r\n\r\n        this.panel_ = document.createElement('ul');\r\n        this.panel_.className = 'panel';\r\n        element.appendChild(this.panel_);\r\n    };\r\n\r\n    /**\r\n     * Sets the OpenLayers map this control handles. This is automatically called by OpenLayers\r\n     * @param {ol.Map} map \r\n     */\r\n    setMap(map) {\r\n        super.setMap(map);\r\n        this.drawPanel();\r\n    };\r\n\r\n    /**\r\n    * Changes the visibility of the specified layers\r\n    * @param {Object[]} options - An array of options\r\n    * @param {string} options.name - The name of the layer to change the visibility\r\n    * @param {boolean} options.visible - Whether to show or hide the specified layer\r\n    * @param {number} [options.opacity] - A number between 0 and 1 that sets the opacity of the layer\r\n    */\r\n    setLayersVisibility(options) {\r\n        if (!options || options.length == 0) {\r\n            return;\r\n        }\r\n\r\n        if (!this.getMap()) {\r\n            return;\r\n        }\r\n\r\n        var layers = this.getMap().getLayers().getArray();\r\n        for (var oi = 0; oi < options.length; oi++) {\r\n            var o = options[oi];\r\n            if (!o.name) {\r\n                continue;\r\n            }\r\n\r\n            for (var j = layers.length - 1; j >= 0; j--) {\r\n                // only check for groups\r\n                if (layers[j].getLayers) {\r\n                    var groupLayers = layers[j].getLayers().getArray();\r\n                    for (var i = groupLayers.length - 1; i >= 0; i--) {\r\n                        var layer = groupLayers[i];\r\n                        let lName = layer.get(\"title\") || layer.get(\"name\");\r\n                        if (lName == o.name) {\r\n                            layer.setVisible(o.visible);\r\n                            if (!(o.opacity == null)) {\r\n                                layer.setOpacity(o.opacity);\r\n                            }\r\n                        }\r\n\r\n                        let li = this.panel_.querySelector(`li[data-name='${lName}']`);\r\n                        if (li) {\r\n                            let checkbox = li.querySelector(\"input[type=checkbox]\");\r\n                            checkbox.checked = layer.getVisible();\r\n                            let range = li.querySelector(\"input[type=range]\");\r\n                            range.value = layer.getOpacity() * 100;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    };\r\n\r\n    /**\r\n   * Gets the visibility of the specified layers\r\n   * @returns {Object[]} options - An array of options\r\n   * @returns {string} options.name - The name of the layer to change the visibility\r\n   * @returns {boolean} options.visible - Whether to show or hide the specified layer\r\n   */\r\n    getLayersVisibility() {\r\n        if (!this.getMap()) {\r\n            return;\r\n        }\r\n\r\n        let result = [];\r\n        let layers = this.getMap().getLayers().getArray();\r\n        for (let j = layers.length - 1; j >= 0; j--) {\r\n            if (layers[j].getLayers) {\r\n                let groupLayers = layers[j].getLayers().getArray();\r\n                for (let i = groupLayers.length - 1; i >= 0; i--) {\r\n                    let layer = groupLayers[i];\r\n                    let lName = layer.get(\"title\") || layer.get(\"name\");\r\n                    result.push({ name: lName, visible: layer.getVisible(), opacity: layer.getOpacity() });\r\n                }\r\n            }\r\n        }\r\n\r\n        return result;\r\n    }\r\n\r\n    //\tDraw the panel control (prevent multiple draw due to layers manipulation on the map with a delay function)\r\n    drawPanel(e) {\r\n        if (!this.getMap()) return;\r\n\r\n        var layers = this.getMap().getLayers().getArray();\r\n        this.panel_.innerHTML = '';\r\n\r\n        for (var j = layers.length - 1; j >= 0; j--) {\r\n            // only check for groups\r\n            if (layers[j].getLayers) {\r\n                var groupLayers = layers[j].getLayers().getArray();\r\n                for (var i = groupLayers.length - 1; i >= 0; i--) {\r\n                    var layer = groupLayers[i];\r\n                    // var showLayer = layer.get(\"displayInLayerSwitcher\") !== false;\r\n                    // if (!showLayer) {\r\n                    //     continue;\r\n                    // }\r\n\r\n                    var li = document.createElement('li');\r\n                    li.setAttribute('data-name', layer.get(\"title\") || layer.get(\"name\"));\r\n                    li.className = layer.getVisible() ? \"visible \" : \" \";\r\n                    this.panel_.appendChild(li);\r\n\r\n                    var liHtml = \"<input type='checkbox' \" + (layer.getVisible() ? \"checked='checked' \" : \"\") + \"/>\";\r\n                    liHtml += \"<label title='\" + (layer.get(\"title\") || layer.get(\"name\")) + \"'>\" + (layer.get(\"title\") || layer.get(\"name\")) + \"</label>\";\r\n                    liHtml += \"<input type=\\\"range\\\" min=\\\"0\\\" max=\\\"100\\\" value=\\\"\" + layer.getOpacity() * 100 + \"\\\" name=\\\"layer-opacity\\\" >\";\r\n                    li.innerHTML = liHtml;\r\n\r\n                    let checkbox = li.querySelector(\"input[type=checkbox]\");\r\n                    checkbox.addEventListener('change', switchVisibility.bind(this, layer, checkbox), false);\r\n\r\n                    let label = li.querySelector(\"label\");\r\n                    label.addEventListener(this.btnEventUsed, switchVisibility.bind(this, layer, checkbox), false);\r\n\r\n                    let range = li.querySelector(\"input[type=range]\");\r\n                    range.addEventListener('change', opacityChange.bind(this, layer, range), false);\r\n                }\r\n            }\r\n        }\r\n\r\n        function switchVisibility(layer, checkbox) {\r\n            layer.setVisible(!layer.getVisible());\r\n            checkbox.checked = layer.getVisible();\r\n            if (this.pmaViewport) {\r\n                this.pmaViewport.fireEvent(Events.AnnotationLayerChanged, this.pmaViewport);\r\n            }\r\n        }\r\n\r\n        function opacityChange(layer, range) {\r\n            layer.setOpacity(range.value / 100);\r\n            if (this.pmaViewport) {\r\n                this.pmaViewport.fireEvent(Events.AnnotationLayerChanged, this.pmaViewport);\r\n            }\r\n        }\r\n    };\r\n\r\n    /** \r\n     * Gets the collapsed state of the control\r\n     * @return {boolean} True if the control is currently collapsed\r\n    */\r\n    getCollapsed() {\r\n        return (\" \" + this.element.className + \" \").indexOf(' ol-collapsed ') > -1;\r\n    };\r\n\r\n    /** \r\n     * Sets the collapsed state of the control\r\n     * @param {boolean} collapsed - True to collapse the control, otherwise false\r\n    */\r\n    setCollapsed(collapsed) {\r\n        if (this.getCollapsed() != collapsed) {\r\n            this.buttonClk();\r\n        }\r\n    };\r\n\r\n    buttonClk(event) {\r\n        if (event) {\r\n            event.preventDefault();\r\n            event.stopPropagation();\r\n        }\r\n\r\n        if ((\" \" + this.element.className + \" \").indexOf(' ol-collapsed ') > -1) {\r\n            this.element.className = this.element.className.replace(/ol-collapsed/g, '');\r\n        }\r\n        else {\r\n            this.element.className += ' ol-collapsed';\r\n        }\r\n\r\n        if (!this.collapsed_) {\r\n            this.label_.parentNode.replaceChild(this.collapseLabel_, this.label_);\r\n        } else {\r\n            this.collapseLabel_.parentNode.replaceChild(this.label_, this.collapseLabel_);\r\n        }\r\n\r\n        this.collapsed_ = !this.collapsed_;\r\n        if (this.stateManager) {\r\n            this.stateManager.layerSwitch.collapsed = this.collapsed_;\r\n        }\r\n    }\r\n}","import { Control } from 'ol/control';\r\nimport { createOlViewer } from '../viewportHelpers';\r\nimport { Resources } from '../../resources/resources';\r\n\r\n/**\r\n * Creates a new brightness & contrast management control\r\n * @param {object} opt_options Options to initialize\r\n * @param {Viewport} opt_options.viewer Viewport instance this control belongs to\r\n * @param {ol.layer} opt_options.layer The main layer of the openlayer map\r\n * @param {Object} opt_options.stateManager The state manager to keep settings in sync\r\n */\r\nexport class ColorAdjustment extends Control {\r\n    constructor(opt_options) {\r\n\r\n        var options = opt_options || {};\r\n        var layer = options.layer;\r\n        var viewer = options.viewer;\r\n\r\n        var element = document.createElement('div');\r\n        super({\r\n            element: element,\r\n            target: options.target\r\n        });\r\n\r\n        this.brightness = 0;\r\n        this.contrast = 1;\r\n        this.gamma = 1;\r\n        var this_ = this;\r\n\r\n        if (layer) {\r\n            //    layer.on('postcompose', function (event) {\r\n            //        if (this_.brightness !== 0 || this_.contrast != 1) {\r\n            //            applyFilter(event.context, \"brightnesscontrast\", { brightness: this_.brightness, contrast: this_.contrast });\r\n            //        }\r\n            //    });\r\n        }\r\n        // <button type=\"button\" class=\"ol-zoom-in ol-has-tooltip\"><span role=\"tooltip\">Zoom in</span>+</button>\r\n        this.btnbplus = document.createElement('button');\r\n        this.btnbplus.className = \"ol-brightness-in\";\r\n        this.btnbplus.innerHTML = \"+\";\r\n        this.btnbicon = document.createElement('button');\r\n        this.btnbicon.className = \"ol-brightness-middle\";\r\n        this.btnbicon.innerHTML = \"0\";\r\n        this.btnbicon.title = Resources.translate(\"Adjust brightness\");\r\n        this.btnbminus = document.createElement('button');\r\n        this.btnbminus.className = \"ol-brightness-out\";\r\n        this.btnbminus.innerHTML = \"-\";\r\n\r\n        this.btncplus = document.createElement('button');\r\n        this.btncplus.className = \"ol-contrast-in\";\r\n        this.btncplus.innerHTML = \"+\";\r\n        this.btncicon = document.createElement('button');\r\n        this.btncicon.className = \"ol-contrast-middle\";\r\n        this.btncicon.innerHTML = \"1.00\";\r\n        this.btncicon.title = Resources.translate(\"Adjust contrast\");\r\n        this.btncminus = document.createElement('button');\r\n        this.btncminus.className = \"ol-contrast-out\";\r\n        this.btncminus.innerHTML = \"-\";\r\n\r\n        this.btngplus = document.createElement('button');\r\n        this.btngplus.className = \"ol-gamma-in\";\r\n        this.btngplus.innerHTML = \"+\";\r\n        this.btngicon = document.createElement('button');\r\n        this.btngicon.className = \"ol-gamma-middle\";\r\n        this.btngicon.innerHTML = \"1.00\";\r\n        this.btngicon.title = Resources.translate(\"Adjust gamma\");\r\n        this.btngminus = document.createElement('button');\r\n        this.btngminus.className = \"ol-gamma-out\";\r\n        this.btngminus.innerHTML = \"-\";\r\n\r\n        function updateHTML() {\r\n            this_.btnbicon.innerHTML = this_.brightness.toFixed(0);\r\n            this_.btncicon.innerHTML = this_.contrast.toFixed(2);\r\n            this_.btncicon.innerHTML = this_.gamma.toFixed(2);\r\n\r\n            viewer.setBrightnessContrastGamma(this_.brightness, this_.contrast, this_.gamma);\r\n\r\n            this_.getMap().render();\r\n        }\r\n\r\n        this.btnbplus.addEventListener('click', function () {\r\n            this_.brightness += 10;\r\n            updateHTML();\r\n        }, false);\r\n        this.btnbminus.addEventListener('click', function () {\r\n            this_.brightness -= 10;\r\n            updateHTML();\r\n        }, false);\r\n        this.btnbicon.addEventListener('click', function () {\r\n            this_.brightness = 0;\r\n            updateHTML();\r\n        }, false);\r\n\r\n        this.btncplus.addEventListener('click', function () {\r\n            this_.contrast += 0.125;\r\n            updateHTML();\r\n        }, false);\r\n        this.btncminus.addEventListener('click', function () {\r\n            this_.contrast -= 0.125;\r\n            updateHTML();\r\n        }, false);\r\n        this.btncicon.addEventListener('click', function () {\r\n            this_.contrast = 1;\r\n            updateHTML();\r\n        }, false);\r\n\r\n        this.btngplus.addEventListener('click', function () {\r\n            this_.gamma += 0.1;\r\n            updateHTML();\r\n        }, false);\r\n        this.btngminus.addEventListener('click', function () {\r\n            this_.gamma -= 0.1;\r\n            updateHTML();\r\n        }, false);\r\n        this.btngicon.addEventListener('click', function () {\r\n            this_.gamma = 1;\r\n            updateHTML();\r\n        }, false);\r\n\r\n\r\n        element.className = 'ol-brightness-contrast ol-unselectable ol-control';\r\n        element.appendChild(this.btnbminus);\r\n        element.appendChild(this.btnbicon);\r\n        element.appendChild(this.btnbplus);\r\n        element.appendChild(this.btncminus);\r\n        element.appendChild(this.btncicon);\r\n        element.appendChild(this.btncplus);\r\n        element.appendChild(this.btngminus);\r\n        element.appendChild(this.btngicon);\r\n        element.appendChild(this.btngplus);\r\n    }\r\n\r\n    /**\r\n    * Updates the color parameters\r\n    * @param {number} brightness - The brightness value\r\n    * @param {number} contrast - The contrast value\r\n    * @param {number} gamma - The gamma value\r\n    **/\r\n    update(brightness, contrast, gamma) {\r\n        this.brightness = brightness;\r\n        this.contrast = contrast;\r\n        this.gamma = gamma;\r\n\r\n        this.btnbicon.innerHTML = this.brightness.toFixed(0);\r\n        this.btncicon.innerHTML = this.contrast.toFixed(2);\r\n        this.btngicon.innerHTML = this.gamma.toFixed(2);\r\n    };\r\n}\r\n","import { Control } from 'ol/control';\r\nimport View from 'ol/View';\r\nimport Map from 'ol/Map';\r\nimport Collection from 'ol/Collection';\r\nimport TileLayer from 'ol/layer/Tile';\r\n\r\n/**\r\n* Displays an interface that shows slide at max zoom level under pointer's position\r\n* @param {object} opt_options Options to initialize the magnifier control\r\n* @param {string} [opt_options.target] Target DOM element to add magnifier control\r\n* @param {boolean} [opt_options.collapsed] Whether the control starts collapsed\r\n*/\r\nexport class Magnifier extends Control {\r\n    constructor(opt_options) {\r\n        var options = opt_options || {};\r\n        var element = document.createElement('div');\r\n        super({\r\n            element: element,\r\n            target: options.target\r\n        });\r\n\r\n        this.collapsed_ = false;\r\n\r\n        if (options.collapsed === true) {\r\n            this.collapsed_ = true;\r\n        }\r\n\r\n\r\n        element.className = \"ol-control \";\r\n        if (!options.target) {\r\n            // create inside the viewport\r\n            element.className += \" ol-magnifier\";\r\n\r\n            this.magnifierDiv = document.createElement('div');\r\n            this.magnifierDiv.className = \"magnifier-map-container\";\r\n\r\n            element.appendChild(this.magnifierDiv);\r\n            // also create grow shrink buttons\r\n\r\n            var enlargeButton = document.createElement('button');\r\n            enlargeButton.type = 'button';\r\n            enlargeButton.title = \"Enlarge\";\r\n            enlargeButton.className = \"size\";\r\n            enlargeButton.innerHTML = \"+\";\r\n            if ('ontouchstart' in document.documentElement) {\r\n                enlargeButton.addEventListener('touchstart', this.enlargeButtonClick.bind(this), false);\r\n            }\r\n            else {\r\n                enlargeButton.addEventListener('click', this.enlargeButtonClick.bind(this), false);\r\n            }\r\n\r\n            element.appendChild(enlargeButton);\r\n\r\n            var shrinkButton = document.createElement('button');\r\n            shrinkButton.type = 'button';\r\n            shrinkButton.title = \"Shrink\";\r\n            shrinkButton.className = \"size\";\r\n            shrinkButton.innerHTML = \"-\";\r\n            if ('ontouchstart' in document.documentElement) {\r\n                shrinkButton.addEventListener('touchstart', this.shrinkButtonClick.bind(this), false);\r\n            }\r\n            else {\r\n                shrinkButton.addEventListener('click', this.shrinkButtonClick.bind(this), false);\r\n            }\r\n\r\n            element.appendChild(shrinkButton);\r\n        }\r\n        else {\r\n            this.magnifierDiv = element;\r\n        }\r\n\r\n        this.magnifierMap = null;\r\n        this.mouseMoveFunc = null;\r\n    }\r\n\r\n    handleMouseMove(event) {\r\n        if (this.getCollapsed() === true) {\r\n            return;\r\n        }\r\n\r\n        var map = this.getMap();\r\n        var mousePosition = map.getEventPixel(event);\r\n        var coordinate = map.getCoordinateFromPixel(mousePosition);\r\n        if (coordinate) {\r\n            this.magnifierMap.getView().setCenter(coordinate);\r\n        }\r\n    }\r\n\r\n    /** \r\n     * Gets the collapsed state of the control\r\n     * @return {boolean} True if the control is currently collapsed\r\n    */\r\n    getCollapsed() {\r\n        return (\" \" + this.element.className + \" \").indexOf(' ol-collapsed ') > -1;\r\n    }\r\n\r\n    /** \r\n     * Sets the collapsed state of the control\r\n     * @param {boolean} collapsed - True to collapse the control, otherwise false\r\n    */\r\n    setCollapsed(collapsed) {\r\n        if (this.getCollapsed() != collapsed) {\r\n            if ((\" \" + this.element.className + \" \").indexOf(' ol-collapsed ') > -1) {\r\n                this.element.className = this.element.className.replace(/ol-collapsed/g, '');\r\n                if (this.magnifierMap) {\r\n                    this.magnifierMap.updateSize();\r\n                }\r\n            }\r\n            else {\r\n                this.element.className += ' ol-collapsed';\r\n            }\r\n        }\r\n\r\n        this.collapsed_ = collapsed;\r\n    }\r\n\r\n    /**\r\n     * Changes magnifier control size by factor\r\n     * @param {number} factor Factor to change magnifier's size\r\n     */\r\n    changeMagnifierSize(factor) {\r\n        if (this.element) {\r\n            var diagonalSize = Math.sqrt(this.element.clientHeight * this.element.clientHeight + this.element.clientWidth * this.element.clientWidth);\r\n            if (diagonalSize < 60 || diagonalSize > 600) {\r\n                return;\r\n            }\r\n\r\n            this.element.style.width = this.element.clientWidth * factor + \"px\";\r\n            this.element.style.height = this.element.clientHeight * factor + \"px\";\r\n        }\r\n        if (this.magnifierMap) {\r\n            this.magnifierMap.updateSize();\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Sets the OpenLayers map this control handles. This is automatically called by OpenLayers\r\n     * @param {ol.Map} map \r\n     */\r\n    setMap(map) {\r\n        if (!map) {\r\n            if (this.magnifierMap) {\r\n                var el = this.element;\r\n                if (el) {\r\n                    el.parentElement.removeChild(el);\r\n                }\r\n            }\r\n\r\n            if (this.getMap() && this.mouseMoveFunc) {\r\n                this.getMap().getViewport().removeEventListener('mousemove', this.mouseMoveFunc);\r\n            }\r\n\r\n            return;\r\n        }\r\n\r\n        var oldMap = this.getMap();\r\n        if (map === oldMap) {\r\n            return;\r\n        }\r\n\r\n        super.setMap(map);\r\n\r\n        var mapView = map.getView();\r\n\r\n        var newView = new View({\r\n            projection: mapView.getProjection(),\r\n            center: mapView.getCenter(),\r\n            extent: mapView.getProjection().getExtent(),\r\n            maxResolution: 1,\r\n            minResolution: 1,\r\n            zoom: 0\r\n        });\r\n\r\n        var firstLayer = map.getLayers().item(0);\r\n\r\n        // Magnifier map\r\n        this.magnifierMap = new Map({\r\n            controls: new Collection(),\r\n            interactions: new Collection(),\r\n            target: this.magnifierDiv,\r\n            view: newView,\r\n            layers: [new TileLayer({ source: firstLayer.getSource() })]\r\n        });\r\n\r\n        var changing = false;\r\n        this.magnifierMap.on(\"change:size\", (function () {\r\n            if (!changing) {\r\n                changing = true;\r\n                this.magnifierMap.updateSize();\r\n                changing = false;\r\n            }\r\n        }).bind(this));\r\n\r\n        this.mouseMoveFunc = this.handleMouseMove.bind(this);\r\n        map.getViewport().addEventListener('mousemove', this.mouseMoveFunc);\r\n        if (this.collapsed_ !== this.getCollapsed()) {\r\n            this.setCollapsed(this.collapsed_);\r\n        }\r\n    }\r\n\r\n    enlargeButtonClick(event) {\r\n        if (event) {\r\n            event.preventDefault();\r\n            event.stopPropagation();\r\n        }\r\n\r\n        this.changeMagnifierSize(1.25);\r\n    }\r\n\r\n    shrinkButtonClick(event) {\r\n        if (event) {\r\n            event.preventDefault();\r\n            event.stopPropagation();\r\n        }\r\n\r\n        this.changeMagnifierSize(0.75);\r\n    }\r\n}","import { checkBrowserCompatibility } from '../../view/helpers';\r\n\r\n/**\r\n * Holds a session ID per PMA.core server URL. Used to skip authentication, if a session ID is already available.\r\n * @typedef {Object} SessionLogin~serverSessions\r\n * @property {string} serverUrl\r\n * @property {string} sessionId\r\n */\r\n/**\r\n * Authenticates against a PMA.core server without user interaction. Upon creation, the instance will register itself automatically as an authentication provider for the given context.\r\n * @param  {Context} context\r\n * @param  {SessionLogin~serverSessions[]} serverSessions - Array of PMA.core server sessions.\r\n */\r\nexport class SessionLogin {\r\n    constructor(context, serverSessions) {\r\n        if (!checkBrowserCompatibility()) {\r\n            return;\r\n        }\r\n\r\n        if (!(serverSessions instanceof Array)) {\r\n            console.error(\"Expected array of server credentials\");\r\n            return;\r\n        }\r\n\r\n        this.serverSessions = serverSessions;\r\n        this.context = context;\r\n        this.context.registerAuthenticationProvider(this);\r\n    }\r\n    /**\r\n     * Authenticates against a PMA.core server. This method is usually invoked by the context itself and should rarely be used outside it.\r\n     * @param  {string} serverUrl - The URL of the PMA.core server to authenticate against\r\n     * @param  {function} [success]\r\n     * @param  {function} [failure]\r\n     * @returns {boolean} True or false depending on whether this instance has enough information to authenticate against this PMA.core server\r\n     */\r\n    authenticate(serverUrl, success, failure) {\r\n        for (var i = 0, max = this.serverSessions.length; i < max; i++) {\r\n            if (this.serverSessions[i].serverUrl === serverUrl) {\r\n                success(this.serverSessions[i].sessionId);\r\n                return true;\r\n            }\r\n        }\r\n\r\n        // Requested server is not handled by this provider\r\n        return false;\r\n    }\r\n    /**\r\n     * Updates the session id of a specified server\r\n     * @param {string} serverUrl - The URL of the PMA.core server to authenticate against\r\n     * @param {string} sessionId - The sessionId to update\r\n    */\r\n    updateSessionId(serverUrl, sessionId) {\r\n        for (var i = 0, max = this.serverSessions.length; i < max; i++) {\r\n            if (this.serverSessions[i].serverUrl === serverUrl) {\r\n                this.serverSessions[i].sessionId = sessionId;\r\n                break;\r\n            }\r\n        }\r\n    }\r\n}\r\n\r\n\r\n","/**\n * @module ol/MapBrowserEventHandler\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventType from './events/EventType.js';\nimport MapBrowserEvent from './MapBrowserEvent.js';\nimport MapBrowserEventType from './MapBrowserEventType.js';\nimport PointerEventType from './pointer/EventType.js';\nimport Target from './events/Target.js';\nimport { PASSIVE_EVENT_LISTENERS } from './has.js';\nimport { VOID } from './functions.js';\nimport { listen, unlistenByKey } from './events.js';\nvar MapBrowserEventHandler = /** @class */ (function (_super) {\n    __extends(MapBrowserEventHandler, _super);\n    /**\n     * @param {import(\"./PluggableMap.js\").default} map The map with the viewport to listen to events on.\n     * @param {number} [moveTolerance] The minimal distance the pointer must travel to trigger a move.\n     */\n    function MapBrowserEventHandler(map, moveTolerance) {\n        var _this = _super.call(this, map) || this;\n        /**\n         * This is the element that we will listen to the real events on.\n         * @type {import(\"./PluggableMap.js\").default}\n         * @private\n         */\n        _this.map_ = map;\n        /**\n         * @type {any}\n         * @private\n         */\n        _this.clickTimeoutId_;\n        /**\n         * Emulate dblclick and singleclick. Will be true when only one pointer is active.\n         * @type {boolean}\n         */\n        _this.emulateClicks_ = false;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.dragging_ = false;\n        /**\n         * @type {!Array<import(\"./events.js\").EventsKey>}\n         * @private\n         */\n        _this.dragListenerKeys_ = [];\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.moveTolerance_ = moveTolerance === undefined ? 1 : moveTolerance;\n        /**\n         * The most recent \"down\" type event (or null if none have occurred).\n         * Set on pointerdown.\n         * @type {PointerEvent}\n         * @private\n         */\n        _this.down_ = null;\n        var element = _this.map_.getViewport();\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.activePointers_ = 0;\n        /**\n         * @type {!Object<number, boolean>}\n         * @private\n         */\n        _this.trackedTouches_ = {};\n        _this.element_ = element;\n        /**\n         * @type {?import(\"./events.js\").EventsKey}\n         * @private\n         */\n        _this.pointerdownListenerKey_ = listen(element, PointerEventType.POINTERDOWN, _this.handlePointerDown_, _this);\n        /**\n         * @type {PointerEvent}\n         * @private\n         */\n        _this.originalPointerMoveEvent_;\n        /**\n         * @type {?import(\"./events.js\").EventsKey}\n         * @private\n         */\n        _this.relayedListenerKey_ = listen(element, PointerEventType.POINTERMOVE, _this.relayEvent_, _this);\n        /**\n         * @private\n         */\n        _this.boundHandleTouchMove_ = _this.handleTouchMove_.bind(_this);\n        _this.element_.addEventListener(EventType.TOUCHMOVE, _this.boundHandleTouchMove_, PASSIVE_EVENT_LISTENERS ? { passive: false } : false);\n        return _this;\n    }\n    /**\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.emulateClick_ = function (pointerEvent) {\n        var newEvent = new MapBrowserEvent(MapBrowserEventType.CLICK, this.map_, pointerEvent);\n        this.dispatchEvent(newEvent);\n        if (this.clickTimeoutId_ !== undefined) {\n            // double-click\n            clearTimeout(this.clickTimeoutId_);\n            this.clickTimeoutId_ = undefined;\n            newEvent = new MapBrowserEvent(MapBrowserEventType.DBLCLICK, this.map_, pointerEvent);\n            this.dispatchEvent(newEvent);\n        }\n        else {\n            // click\n            this.clickTimeoutId_ = setTimeout(\n            /** @this {MapBrowserEventHandler} */\n            function () {\n                this.clickTimeoutId_ = undefined;\n                var newEvent = new MapBrowserEvent(MapBrowserEventType.SINGLECLICK, this.map_, pointerEvent);\n                this.dispatchEvent(newEvent);\n            }.bind(this), 250);\n        }\n    };\n    /**\n     * Keeps track on how many pointers are currently active.\n     *\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.updateActivePointers_ = function (pointerEvent) {\n        var event = pointerEvent;\n        if (event.type == MapBrowserEventType.POINTERUP ||\n            event.type == MapBrowserEventType.POINTERCANCEL) {\n            delete this.trackedTouches_[event.pointerId];\n        }\n        else if (event.type == MapBrowserEventType.POINTERDOWN) {\n            this.trackedTouches_[event.pointerId] = true;\n        }\n        this.activePointers_ = Object.keys(this.trackedTouches_).length;\n    };\n    /**\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.handlePointerUp_ = function (pointerEvent) {\n        this.updateActivePointers_(pointerEvent);\n        var newEvent = new MapBrowserEvent(MapBrowserEventType.POINTERUP, this.map_, pointerEvent);\n        this.dispatchEvent(newEvent);\n        // We emulate click events on left mouse button click, touch contact, and pen\n        // contact. isMouseActionButton returns true in these cases (evt.button is set\n        // to 0).\n        // See http://www.w3.org/TR/pointerevents/#button-states\n        // We only fire click, singleclick, and doubleclick if nobody has called\n        // event.preventDefault().\n        if (this.emulateClicks_ &&\n            !newEvent.defaultPrevented &&\n            !this.dragging_ &&\n            this.isMouseActionButton_(pointerEvent)) {\n            this.emulateClick_(this.down_);\n        }\n        if (this.activePointers_ === 0) {\n            this.dragListenerKeys_.forEach(unlistenByKey);\n            this.dragListenerKeys_.length = 0;\n            this.dragging_ = false;\n            this.down_ = null;\n        }\n    };\n    /**\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @return {boolean} If the left mouse button was pressed.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.isMouseActionButton_ = function (pointerEvent) {\n        return pointerEvent.button === 0;\n    };\n    /**\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.handlePointerDown_ = function (pointerEvent) {\n        this.emulateClicks_ = this.activePointers_ === 0;\n        this.updateActivePointers_(pointerEvent);\n        var newEvent = new MapBrowserEvent(MapBrowserEventType.POINTERDOWN, this.map_, pointerEvent);\n        this.dispatchEvent(newEvent);\n        // Store a copy of the down event\n        this.down_ = /** @type {PointerEvent} */ ({});\n        for (var property in pointerEvent) {\n            var value = pointerEvent[property];\n            this.down_[property] = typeof value === 'function' ? VOID : value;\n        }\n        if (this.dragListenerKeys_.length === 0) {\n            var doc = this.map_.getOwnerDocument();\n            this.dragListenerKeys_.push(listen(doc, MapBrowserEventType.POINTERMOVE, this.handlePointerMove_, this), listen(doc, MapBrowserEventType.POINTERUP, this.handlePointerUp_, this), \n            /* Note that the listener for `pointercancel is set up on\n             * `pointerEventHandler_` and not `documentPointerEventHandler_` like\n             * the `pointerup` and `pointermove` listeners.\n             *\n             * The reason for this is the following: `TouchSource.vacuumTouches_()`\n             * issues `pointercancel` events, when there was no `touchend` for a\n             * `touchstart`. Now, let's say a first `touchstart` is registered on\n             * `pointerEventHandler_`. The `documentPointerEventHandler_` is set up.\n             * But `documentPointerEventHandler_` doesn't know about the first\n             * `touchstart`. If there is no `touchend` for the `touchstart`, we can\n             * only receive a `touchcancel` from `pointerEventHandler_`, because it is\n             * only registered there.\n             */\n            listen(this.element_, MapBrowserEventType.POINTERCANCEL, this.handlePointerUp_, this));\n            if (this.element_.getRootNode && this.element_.getRootNode() !== doc) {\n                this.dragListenerKeys_.push(listen(this.element_.getRootNode(), MapBrowserEventType.POINTERUP, this.handlePointerUp_, this));\n            }\n        }\n    };\n    /**\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.handlePointerMove_ = function (pointerEvent) {\n        // Between pointerdown and pointerup, pointermove events are triggered.\n        // To avoid a 'false' touchmove event to be dispatched, we test if the pointer\n        // moved a significant distance.\n        if (this.isMoving_(pointerEvent)) {\n            this.dragging_ = true;\n            var newEvent = new MapBrowserEvent(MapBrowserEventType.POINTERDRAG, this.map_, pointerEvent, this.dragging_);\n            this.dispatchEvent(newEvent);\n        }\n    };\n    /**\n     * Wrap and relay a pointer event.  Note that this requires that the type\n     * string for the MapBrowserEvent matches the PointerEvent type.\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.relayEvent_ = function (pointerEvent) {\n        this.originalPointerMoveEvent_ = pointerEvent;\n        var dragging = !!(this.down_ && this.isMoving_(pointerEvent));\n        this.dispatchEvent(new MapBrowserEvent(pointerEvent.type, this.map_, pointerEvent, dragging));\n    };\n    /**\n     * Flexible handling of a `touch-action: none` css equivalent: because calling\n     * `preventDefault()` on a `pointermove` event does not stop native page scrolling\n     * and zooming, we also listen for `touchmove` and call `preventDefault()` on it\n     * when an interaction (currently `DragPan` handles the event.\n     * @param {TouchEvent} event Event.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.handleTouchMove_ = function (event) {\n        // Due to https://github.com/mpizenberg/elm-pep/issues/2, `this.originalPointerMoveEvent_`\n        // may not be initialized yet when we get here on a platform without native pointer events.\n        var originalEvent = this.originalPointerMoveEvent_;\n        if ((!originalEvent || originalEvent.defaultPrevented) &&\n            (typeof event.cancelable !== 'boolean' || event.cancelable === true)) {\n            event.preventDefault();\n        }\n    };\n    /**\n     * @param {PointerEvent} pointerEvent Pointer\n     * event.\n     * @return {boolean} Is moving.\n     * @private\n     */\n    MapBrowserEventHandler.prototype.isMoving_ = function (pointerEvent) {\n        return (this.dragging_ ||\n            Math.abs(pointerEvent.clientX - this.down_.clientX) >\n                this.moveTolerance_ ||\n            Math.abs(pointerEvent.clientY - this.down_.clientY) > this.moveTolerance_);\n    };\n    /**\n     * Clean up.\n     */\n    MapBrowserEventHandler.prototype.disposeInternal = function () {\n        if (this.relayedListenerKey_) {\n            unlistenByKey(this.relayedListenerKey_);\n            this.relayedListenerKey_ = null;\n        }\n        this.element_.removeEventListener(EventType.TOUCHMOVE, this.boundHandleTouchMove_);\n        if (this.pointerdownListenerKey_) {\n            unlistenByKey(this.pointerdownListenerKey_);\n            this.pointerdownListenerKey_ = null;\n        }\n        this.dragListenerKeys_.forEach(unlistenByKey);\n        this.dragListenerKeys_.length = 0;\n        this.element_ = null;\n        _super.prototype.disposeInternal.call(this);\n    };\n    return MapBrowserEventHandler;\n}(Target));\nexport default MapBrowserEventHandler;\n//# sourceMappingURL=MapBrowserEventHandler.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/PluggableMap\n */\nimport BaseObject from './Object.js';\nimport Collection from './Collection.js';\nimport CollectionEventType from './CollectionEventType.js';\nimport EventType from './events/EventType.js';\nimport LayerGroup from './layer/Group.js';\nimport MapBrowserEvent from './MapBrowserEvent.js';\nimport MapBrowserEventHandler from './MapBrowserEventHandler.js';\nimport MapBrowserEventType from './MapBrowserEventType.js';\nimport MapEvent from './MapEvent.js';\nimport MapEventType from './MapEventType.js';\nimport MapProperty from './MapProperty.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport PointerEventType from './pointer/EventType.js';\nimport RenderEventType from './render/EventType.js';\nimport TileQueue, { getTilePriority } from './TileQueue.js';\nimport View from './View.js';\nimport ViewHint from './ViewHint.js';\nimport { DEVICE_PIXEL_RATIO, PASSIVE_EVENT_LISTENERS } from './has.js';\nimport { TRUE } from './functions.js';\nimport { apply as applyTransform, create as createTransform, } from './transform.js';\nimport { assert } from './asserts.js';\nimport { clone, createOrUpdateEmpty, equals, getForViewAndSize, isEmpty, } from './extent.js';\nimport { fromUserCoordinate, toUserCoordinate } from './proj.js';\nimport { hasArea } from './size.js';\nimport { listen, unlistenByKey } from './events.js';\nimport { removeNode } from './dom.js';\n/**\n * State of the current frame. Only `pixelRatio`, `time` and `viewState` should\n * be used in applications.\n * @typedef {Object} FrameState\n * @property {number} pixelRatio The pixel ratio of the frame.\n * @property {number} time The time when rendering of the frame was requested.\n * @property {import(\"./View.js\").State} viewState The state of the current view.\n * @property {boolean} animate Animate.\n * @property {import(\"./transform.js\").Transform} coordinateToPixelTransform CoordinateToPixelTransform.\n * @property {import(\"rbush\").default} declutterTree DeclutterTree.\n * @property {null|import(\"./extent.js\").Extent} extent Extent.\n * @property {number} index Index.\n * @property {Array<import(\"./layer/Layer.js\").State>} layerStatesArray LayerStatesArray.\n * @property {number} layerIndex LayerIndex.\n * @property {import(\"./transform.js\").Transform} pixelToCoordinateTransform PixelToCoordinateTransform.\n * @property {Array<PostRenderFunction>} postRenderFunctions PostRenderFunctions.\n * @property {import(\"./size.js\").Size} size Size.\n * @property {TileQueue} tileQueue TileQueue.\n * @property {!Object<string, Object<string, boolean>>} usedTiles UsedTiles.\n * @property {Array<number>} viewHints ViewHints.\n * @property {!Object<string, Object<string, boolean>>} wantedTiles WantedTiles.\n */\n/**\n * @typedef {function(PluggableMap, ?FrameState): any} PostRenderFunction\n */\n/**\n * @typedef {Object} AtPixelOptions\n * @property {undefined|function(import(\"./layer/Layer.js\").default): boolean} [layerFilter] Layer filter\n * function. The filter function will receive one argument, the\n * {@link module:ol/layer/Layer layer-candidate} and it should return a boolean value.\n * Only layers which are visible and for which this function returns `true`\n * will be tested for features. By default, all visible layers will be tested.\n * @property {number} [hitTolerance=0] Hit-detection tolerance in css pixels. Pixels\n * inside the radius around the given position will be checked for features.\n * @property {boolean} [checkWrapped=true] Check-Wrapped Will check for for wrapped geometries inside the range of\n *   +/- 1 world width. Works only if a projection is used that can be wrapped.\n */\n/**\n * @typedef {Object} MapOptionsInternal\n * @property {Collection<import(\"./control/Control.js\").default>} [controls] Controls.\n * @property {Collection<import(\"./interaction/Interaction.js\").default>} [interactions] Interactions.\n * @property {HTMLElement|Document} keyboardEventTarget KeyboardEventTarget.\n * @property {Collection<import(\"./Overlay.js\").default>} overlays Overlays.\n * @property {Object<string, *>} values Values.\n */\n/**\n * @typedef {import(\"./ObjectEventType\").Types|'change:layergroup'|'change:size'|'change:target'|'change:view'} MapObjectEventTypes\n */\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature<import(\"./Observable\").EventTypes, import(\"./events/Event.js\").default, Return> &\n *    import(\"./Observable\").OnSignature<MapObjectEventTypes, import(\"./Object\").ObjectEvent, Return> &\n *    import(\"./Observable\").OnSignature<import(\"./MapBrowserEventType\").Types, import(\"./MapBrowserEvent\").default, Return> &\n *    import(\"./Observable\").OnSignature<import(\"./MapEventType\").Types, import(\"./MapEvent\").default, Return> &\n *    import(\"./Observable\").OnSignature<import(\"./render/EventType\").MapRenderEventTypes, import(\"./render/Event\").default, Return> &\n *    import(\"./Observable\").CombinedOnSignature<import(\"./Observable\").EventTypes|MapObjectEventTypes|\n *      import(\"./MapBrowserEventType\").Types|import(\"./MapEventType\").Types|\n *      import(\"./render/EventType\").MapRenderEventTypes, Return>} PluggableMapOnSignature\n */\n/**\n * Object literal with config options for the map.\n * @typedef {Object} MapOptions\n * @property {Collection<import(\"./control/Control.js\").default>|Array<import(\"./control/Control.js\").default>} [controls]\n * Controls initially added to the map. If not specified,\n * {@link module:ol/control.defaults} is used.\n * @property {number} [pixelRatio=window.devicePixelRatio] The ratio between\n * physical pixels and device-independent pixels (dips) on the device.\n * @property {Collection<import(\"./interaction/Interaction.js\").default>|Array<import(\"./interaction/Interaction.js\").default>} [interactions]\n * Interactions that are initially added to the map. If not specified,\n * {@link module:ol/interaction.defaults} is used.\n * @property {HTMLElement|Document|string} [keyboardEventTarget] The element to\n * listen to keyboard events on. This determines when the `KeyboardPan` and\n * `KeyboardZoom` interactions trigger. For example, if this option is set to\n * `document` the keyboard interactions will always trigger. If this option is\n * not specified, the element the library listens to keyboard events on is the\n * map target (i.e. the user-provided div for the map). If this is not\n * `document`, the target element needs to be focused for key events to be\n * emitted, requiring that the target element has a `tabindex` attribute.\n * @property {Array<import(\"./layer/Base.js\").default>|Collection<import(\"./layer/Base.js\").default>|LayerGroup} [layers]\n * Layers. If this is not defined, a map with no layers will be rendered. Note\n * that layers are rendered in the order supplied, so if you want, for example,\n * a vector layer to appear on top of a tile layer, it must come after the tile\n * layer.\n * @property {number} [maxTilesLoading=16] Maximum number tiles to load\n * simultaneously.\n * @property {number} [moveTolerance=1] The minimum distance in pixels the\n * cursor must move to be detected as a map move event instead of a click.\n * Increasing this value can make it easier to click on the map.\n * @property {Collection<import(\"./Overlay.js\").default>|Array<import(\"./Overlay.js\").default>} [overlays]\n * Overlays initially added to the map. By default, no overlays are added.\n * @property {HTMLElement|string} [target] The container for the map, either the\n * element itself or the `id` of the element. If not specified at construction\n * time, {@link module:ol/Map~Map#setTarget} must be called for the map to be\n * rendered. If passed by element, the container can be in a secondary document.\n * @property {View} [view] The map's view.  No layer sources will be\n * fetched unless this is specified at construction time or through\n * {@link module:ol/Map~Map#setView}.\n */\n/**\n * @api\n */\nvar PluggableMap = /** @class */ (function (_super) {\n    __extends(PluggableMap, _super);\n    /**\n     * @param {MapOptions} options Map options.\n     */\n    function PluggableMap(options) {\n        var _this = _super.call(this) || this;\n        /***\n         * @type {PluggableMapOnSignature<import(\"./Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {PluggableMapOnSignature<import(\"./Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {PluggableMapOnSignature<void>}\n         */\n        _this.un;\n        var optionsInternal = createOptionsInternal(options);\n        /** @private */\n        _this.boundHandleBrowserEvent_ = _this.handleBrowserEvent.bind(_this);\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.maxTilesLoading_ =\n            options.maxTilesLoading !== undefined ? options.maxTilesLoading : 16;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.pixelRatio_ =\n            options.pixelRatio !== undefined\n                ? options.pixelRatio\n                : DEVICE_PIXEL_RATIO;\n        /**\n         * @private\n         * @type {*}\n         */\n        _this.postRenderTimeoutHandle_;\n        /**\n         * @private\n         * @type {number|undefined}\n         */\n        _this.animationDelayKey_;\n        /**\n         * @private\n         */\n        _this.animationDelay_ = /** @this {PluggableMap} */ function () {\n            this.animationDelayKey_ = undefined;\n            this.renderFrame_(Date.now());\n        }.bind(_this);\n        /**\n         * @private\n         * @type {import(\"./transform.js\").Transform}\n         */\n        _this.coordinateToPixelTransform_ = createTransform();\n        /**\n         * @private\n         * @type {import(\"./transform.js\").Transform}\n         */\n        _this.pixelToCoordinateTransform_ = createTransform();\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.frameIndex_ = 0;\n        /**\n         * @private\n         * @type {?FrameState}\n         */\n        _this.frameState_ = null;\n        /**\n         * The extent at the previous 'moveend' event.\n         * @private\n         * @type {import(\"./extent.js\").Extent}\n         */\n        _this.previousExtent_ = null;\n        /**\n         * @private\n         * @type {?import(\"./events.js\").EventsKey}\n         */\n        _this.viewPropertyListenerKey_ = null;\n        /**\n         * @private\n         * @type {?import(\"./events.js\").EventsKey}\n         */\n        _this.viewChangeListenerKey_ = null;\n        /**\n         * @private\n         * @type {?Array<import(\"./events.js\").EventsKey>}\n         */\n        _this.layerGroupPropertyListenerKeys_ = null;\n        /**\n         * @private\n         * @type {!HTMLElement}\n         */\n        _this.viewport_ = document.createElement('div');\n        _this.viewport_.className =\n            'ol-viewport' + ('ontouchstart' in window ? ' ol-touch' : '');\n        _this.viewport_.style.position = 'relative';\n        _this.viewport_.style.overflow = 'hidden';\n        _this.viewport_.style.width = '100%';\n        _this.viewport_.style.height = '100%';\n        /**\n         * @private\n         * @type {!HTMLElement}\n         */\n        _this.overlayContainer_ = document.createElement('div');\n        _this.overlayContainer_.style.position = 'absolute';\n        _this.overlayContainer_.style.zIndex = '0';\n        _this.overlayContainer_.style.width = '100%';\n        _this.overlayContainer_.style.height = '100%';\n        _this.overlayContainer_.style.pointerEvents = 'none';\n        _this.overlayContainer_.className = 'ol-overlaycontainer';\n        _this.viewport_.appendChild(_this.overlayContainer_);\n        /**\n         * @private\n         * @type {!HTMLElement}\n         */\n        _this.overlayContainerStopEvent_ = document.createElement('div');\n        _this.overlayContainerStopEvent_.style.position = 'absolute';\n        _this.overlayContainerStopEvent_.style.zIndex = '0';\n        _this.overlayContainerStopEvent_.style.width = '100%';\n        _this.overlayContainerStopEvent_.style.height = '100%';\n        _this.overlayContainerStopEvent_.style.pointerEvents = 'none';\n        _this.overlayContainerStopEvent_.className = 'ol-overlaycontainer-stopevent';\n        _this.viewport_.appendChild(_this.overlayContainerStopEvent_);\n        /**\n         * @private\n         * @type {MapBrowserEventHandler}\n         */\n        _this.mapBrowserEventHandler_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.moveTolerance_ = options.moveTolerance;\n        /**\n         * @private\n         * @type {HTMLElement|Document}\n         */\n        _this.keyboardEventTarget_ = optionsInternal.keyboardEventTarget;\n        /**\n         * @private\n         * @type {?Array<import(\"./events.js\").EventsKey>}\n         */\n        _this.keyHandlerKeys_ = null;\n        /**\n         * @type {Collection<import(\"./control/Control.js\").default>}\n         * @protected\n         */\n        _this.controls = optionsInternal.controls || new Collection();\n        /**\n         * @type {Collection<import(\"./interaction/Interaction.js\").default>}\n         * @protected\n         */\n        _this.interactions = optionsInternal.interactions || new Collection();\n        /**\n         * @type {Collection<import(\"./Overlay.js\").default>}\n         * @private\n         */\n        _this.overlays_ = optionsInternal.overlays;\n        /**\n         * A lookup of overlays by id.\n         * @private\n         * @type {Object<string, import(\"./Overlay.js\").default>}\n         */\n        _this.overlayIdIndex_ = {};\n        /**\n         * @type {import(\"./renderer/Map.js\").default}\n         * @private\n         */\n        _this.renderer_ = null;\n        /**\n         * @type {undefined|function(Event): void}\n         * @private\n         */\n        _this.handleResize_;\n        /**\n         * @private\n         * @type {!Array<PostRenderFunction>}\n         */\n        _this.postRenderFunctions_ = [];\n        /**\n         * @private\n         * @type {TileQueue}\n         */\n        _this.tileQueue_ = new TileQueue(_this.getTilePriority.bind(_this), _this.handleTileChange_.bind(_this));\n        _this.addChangeListener(MapProperty.LAYERGROUP, _this.handleLayerGroupChanged_);\n        _this.addChangeListener(MapProperty.VIEW, _this.handleViewChanged_);\n        _this.addChangeListener(MapProperty.SIZE, _this.handleSizeChanged_);\n        _this.addChangeListener(MapProperty.TARGET, _this.handleTargetChanged_);\n        // setProperties will trigger the rendering of the map if the map\n        // is \"defined\" already.\n        _this.setProperties(optionsInternal.values);\n        _this.controls.forEach(\n        /**\n         * @param {import(\"./control/Control.js\").default} control Control.\n         * @this {PluggableMap}\n         */\n        function (control) {\n            control.setMap(this);\n        }.bind(_this));\n        _this.controls.addEventListener(CollectionEventType.ADD, \n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n         */\n        function (event) {\n            event.element.setMap(this);\n        }.bind(_this));\n        _this.controls.addEventListener(CollectionEventType.REMOVE, \n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n         */\n        function (event) {\n            event.element.setMap(null);\n        }.bind(_this));\n        _this.interactions.forEach(\n        /**\n         * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction.\n         * @this {PluggableMap}\n         */\n        function (interaction) {\n            interaction.setMap(this);\n        }.bind(_this));\n        _this.interactions.addEventListener(CollectionEventType.ADD, \n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n         */\n        function (event) {\n            event.element.setMap(this);\n        }.bind(_this));\n        _this.interactions.addEventListener(CollectionEventType.REMOVE, \n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n         */\n        function (event) {\n            event.element.setMap(null);\n        }.bind(_this));\n        _this.overlays_.forEach(_this.addOverlayInternal_.bind(_this));\n        _this.overlays_.addEventListener(CollectionEventType.ADD, \n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n         */\n        function (event) {\n            this.addOverlayInternal_(\n            /** @type {import(\"./Overlay.js\").default} */ (event.element));\n        }.bind(_this));\n        _this.overlays_.addEventListener(CollectionEventType.REMOVE, \n        /**\n         * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n         */\n        function (event) {\n            var overlay = /** @type {import(\"./Overlay.js\").default} */ (event.element);\n            var id = overlay.getId();\n            if (id !== undefined) {\n                delete this.overlayIdIndex_[id.toString()];\n            }\n            event.element.setMap(null);\n        }.bind(_this));\n        return _this;\n    }\n    /**\n     * @abstract\n     * @return {import(\"./renderer/Map.js\").default} The map renderer\n     */\n    PluggableMap.prototype.createRenderer = function () {\n        throw new Error('Use a map type that has a createRenderer method');\n    };\n    /**\n     * Add the given control to the map.\n     * @param {import(\"./control/Control.js\").default} control Control.\n     * @api\n     */\n    PluggableMap.prototype.addControl = function (control) {\n        this.getControls().push(control);\n    };\n    /**\n     * Add the given interaction to the map. If you want to add an interaction\n     * at another point of the collection use `getInteraction()` and the methods\n     * available on {@link module:ol/Collection~Collection}. This can be used to\n     * stop the event propagation from the handleEvent function. The interactions\n     * get to handle the events in the reverse order of this collection.\n     * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to add.\n     * @api\n     */\n    PluggableMap.prototype.addInteraction = function (interaction) {\n        this.getInteractions().push(interaction);\n    };\n    /**\n     * Adds the given layer to the top of this map. If you want to add a layer\n     * elsewhere in the stack, use `getLayers()` and the methods available on\n     * {@link module:ol/Collection~Collection}.\n     * @param {import(\"./layer/Base.js\").default} layer Layer.\n     * @api\n     */\n    PluggableMap.prototype.addLayer = function (layer) {\n        var layers = this.getLayerGroup().getLayers();\n        layers.push(layer);\n    };\n    /**\n     * Add the given overlay to the map.\n     * @param {import(\"./Overlay.js\").default} overlay Overlay.\n     * @api\n     */\n    PluggableMap.prototype.addOverlay = function (overlay) {\n        this.getOverlays().push(overlay);\n    };\n    /**\n     * This deals with map's overlay collection changes.\n     * @param {import(\"./Overlay.js\").default} overlay Overlay.\n     * @private\n     */\n    PluggableMap.prototype.addOverlayInternal_ = function (overlay) {\n        var id = overlay.getId();\n        if (id !== undefined) {\n            this.overlayIdIndex_[id.toString()] = overlay;\n        }\n        overlay.setMap(this);\n    };\n    /**\n     *\n     * Clean up.\n     */\n    PluggableMap.prototype.disposeInternal = function () {\n        this.setTarget(null);\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * Detect features that intersect a pixel on the viewport, and execute a\n     * callback with each intersecting feature. Layers included in the detection can\n     * be configured through the `layerFilter` option in `opt_options`.\n     * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n     * @param {function(import(\"./Feature.js\").FeatureLike, import(\"./layer/Layer.js\").default, import(\"./geom/SimpleGeometry.js\").default): T} callback Feature callback. The callback will be\n     *     called with two arguments. The first argument is one\n     *     {@link module:ol/Feature feature} or\n     *     {@link module:ol/render/Feature render feature} at the pixel, the second is\n     *     the {@link module:ol/layer/Layer layer} of the feature and will be null for\n     *     unmanaged layers. To stop detection, callback functions can return a\n     *     truthy value.\n     * @param {AtPixelOptions} [opt_options] Optional options.\n     * @return {T|undefined} Callback result, i.e. the return value of last\n     * callback execution, or the first truthy callback return value.\n     * @template S,T\n     * @api\n     */\n    PluggableMap.prototype.forEachFeatureAtPixel = function (pixel, callback, opt_options) {\n        if (!this.frameState_) {\n            return;\n        }\n        var coordinate = this.getCoordinateFromPixelInternal(pixel);\n        opt_options = opt_options !== undefined ? opt_options : {};\n        var hitTolerance = opt_options.hitTolerance !== undefined ? opt_options.hitTolerance : 0;\n        var layerFilter = opt_options.layerFilter !== undefined ? opt_options.layerFilter : TRUE;\n        var checkWrapped = opt_options.checkWrapped !== false;\n        return this.renderer_.forEachFeatureAtCoordinate(coordinate, this.frameState_, hitTolerance, checkWrapped, callback, null, layerFilter, null);\n    };\n    /**\n     * Get all features that intersect a pixel on the viewport.\n     * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n     * @param {AtPixelOptions} [opt_options] Optional options.\n     * @return {Array<import(\"./Feature.js\").FeatureLike>} The detected features or\n     * an empty array if none were found.\n     * @api\n     */\n    PluggableMap.prototype.getFeaturesAtPixel = function (pixel, opt_options) {\n        var features = [];\n        this.forEachFeatureAtPixel(pixel, function (feature) {\n            features.push(feature);\n        }, opt_options);\n        return features;\n    };\n    /**\n     * Detect layers that have a color value at a pixel on the viewport, and\n     * execute a callback with each matching layer. Layers included in the\n     * detection can be configured through `opt_layerFilter`.\n     *\n     * Note: this may give false positives unless the map layers have had different `className`\n     * properties assigned to them.\n     *\n     * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n     * @param {function(this: S, import(\"./layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback\n     *     Layer callback. This callback will receive two arguments: first is the\n     *     {@link module:ol/layer/Layer layer}, second argument is an array representing\n     *     [R, G, B, A] pixel values (0 - 255) and will be `null` for layer types\n     *     that do not currently support this argument. To stop detection, callback\n     *     functions can return a truthy value.\n     * @param {AtPixelOptions} [opt_options] Configuration options.\n     * @return {T|undefined} Callback result, i.e. the return value of last\n     * callback execution, or the first truthy callback return value.\n     * @template S,T\n     * @api\n     */\n    PluggableMap.prototype.forEachLayerAtPixel = function (pixel, callback, opt_options) {\n        if (!this.frameState_) {\n            return;\n        }\n        var options = opt_options || {};\n        var hitTolerance = options.hitTolerance !== undefined ? options.hitTolerance : 0;\n        var layerFilter = options.layerFilter || TRUE;\n        return this.renderer_.forEachLayerAtPixel(pixel, this.frameState_, hitTolerance, callback, layerFilter);\n    };\n    /**\n     * Detect if features intersect a pixel on the viewport. Layers included in the\n     * detection can be configured through `opt_layerFilter`.\n     * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n     * @param {AtPixelOptions} [opt_options] Optional options.\n     * @return {boolean} Is there a feature at the given pixel?\n     * @api\n     */\n    PluggableMap.prototype.hasFeatureAtPixel = function (pixel, opt_options) {\n        if (!this.frameState_) {\n            return false;\n        }\n        var coordinate = this.getCoordinateFromPixelInternal(pixel);\n        opt_options = opt_options !== undefined ? opt_options : {};\n        var layerFilter = opt_options.layerFilter !== undefined ? opt_options.layerFilter : TRUE;\n        var hitTolerance = opt_options.hitTolerance !== undefined ? opt_options.hitTolerance : 0;\n        var checkWrapped = opt_options.checkWrapped !== false;\n        return this.renderer_.hasFeatureAtCoordinate(coordinate, this.frameState_, hitTolerance, checkWrapped, layerFilter, null);\n    };\n    /**\n     * Returns the coordinate in user projection for a browser event.\n     * @param {MouseEvent} event Event.\n     * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n     * @api\n     */\n    PluggableMap.prototype.getEventCoordinate = function (event) {\n        return this.getCoordinateFromPixel(this.getEventPixel(event));\n    };\n    /**\n     * Returns the coordinate in view projection for a browser event.\n     * @param {MouseEvent} event Event.\n     * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n     */\n    PluggableMap.prototype.getEventCoordinateInternal = function (event) {\n        return this.getCoordinateFromPixelInternal(this.getEventPixel(event));\n    };\n    /**\n     * Returns the map pixel position for a browser event relative to the viewport.\n     * @param {UIEvent} event Event.\n     * @return {import(\"./pixel.js\").Pixel} Pixel.\n     * @api\n     */\n    PluggableMap.prototype.getEventPixel = function (event) {\n        var viewportPosition = this.viewport_.getBoundingClientRect();\n        var eventPosition = \n        //FIXME Are we really calling this with a TouchEvent anywhere?\n        'changedTouches' in event\n            ? /** @type {TouchEvent} */ (event).changedTouches[0]\n            : /** @type {MouseEvent} */ (event);\n        return [\n            eventPosition.clientX - viewportPosition.left,\n            eventPosition.clientY - viewportPosition.top,\n        ];\n    };\n    /**\n     * Get the target in which this map is rendered.\n     * Note that this returns what is entered as an option or in setTarget:\n     * if that was an element, it returns an element; if a string, it returns that.\n     * @return {HTMLElement|string|undefined} The Element or id of the Element that the\n     *     map is rendered in.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.getTarget = function () {\n        return /** @type {HTMLElement|string|undefined} */ (this.get(MapProperty.TARGET));\n    };\n    /**\n     * Get the DOM element into which this map is rendered. In contrast to\n     * `getTarget` this method always return an `Element`, or `null` if the\n     * map has no target.\n     * @return {HTMLElement} The element that the map is rendered in.\n     * @api\n     */\n    PluggableMap.prototype.getTargetElement = function () {\n        var target = this.getTarget();\n        if (target !== undefined) {\n            return typeof target === 'string'\n                ? document.getElementById(target)\n                : target;\n        }\n        else {\n            return null;\n        }\n    };\n    /**\n     * Get the coordinate for a given pixel.  This returns a coordinate in the\n     * user projection.\n     * @param {import(\"./pixel.js\").Pixel} pixel Pixel position in the map viewport.\n     * @return {import(\"./coordinate.js\").Coordinate} The coordinate for the pixel position.\n     * @api\n     */\n    PluggableMap.prototype.getCoordinateFromPixel = function (pixel) {\n        return toUserCoordinate(this.getCoordinateFromPixelInternal(pixel), this.getView().getProjection());\n    };\n    /**\n     * Get the coordinate for a given pixel.  This returns a coordinate in the\n     * map view projection.\n     * @param {import(\"./pixel.js\").Pixel} pixel Pixel position in the map viewport.\n     * @return {import(\"./coordinate.js\").Coordinate} The coordinate for the pixel position.\n     */\n    PluggableMap.prototype.getCoordinateFromPixelInternal = function (pixel) {\n        var frameState = this.frameState_;\n        if (!frameState) {\n            return null;\n        }\n        else {\n            return applyTransform(frameState.pixelToCoordinateTransform, pixel.slice());\n        }\n    };\n    /**\n     * Get the map controls. Modifying this collection changes the controls\n     * associated with the map.\n     * @return {Collection<import(\"./control/Control.js\").default>} Controls.\n     * @api\n     */\n    PluggableMap.prototype.getControls = function () {\n        return this.controls;\n    };\n    /**\n     * Get the map overlays. Modifying this collection changes the overlays\n     * associated with the map.\n     * @return {Collection<import(\"./Overlay.js\").default>} Overlays.\n     * @api\n     */\n    PluggableMap.prototype.getOverlays = function () {\n        return this.overlays_;\n    };\n    /**\n     * Get an overlay by its identifier (the value returned by overlay.getId()).\n     * Note that the index treats string and numeric identifiers as the same. So\n     * `map.getOverlayById(2)` will return an overlay with id `'2'` or `2`.\n     * @param {string|number} id Overlay identifier.\n     * @return {import(\"./Overlay.js\").default} Overlay.\n     * @api\n     */\n    PluggableMap.prototype.getOverlayById = function (id) {\n        var overlay = this.overlayIdIndex_[id.toString()];\n        return overlay !== undefined ? overlay : null;\n    };\n    /**\n     * Get the map interactions. Modifying this collection changes the interactions\n     * associated with the map.\n     *\n     * Interactions are used for e.g. pan, zoom and rotate.\n     * @return {Collection<import(\"./interaction/Interaction.js\").default>} Interactions.\n     * @api\n     */\n    PluggableMap.prototype.getInteractions = function () {\n        return this.interactions;\n    };\n    /**\n     * Get the layergroup associated with this map.\n     * @return {LayerGroup} A layer group containing the layers in this map.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.getLayerGroup = function () {\n        return /** @type {LayerGroup} */ (this.get(MapProperty.LAYERGROUP));\n    };\n    /**\n     * Get the collection of layers associated with this map.\n     * @return {!Collection<import(\"./layer/Base.js\").default>} Layers.\n     * @api\n     */\n    PluggableMap.prototype.getLayers = function () {\n        var layers = this.getLayerGroup().getLayers();\n        return layers;\n    };\n    /**\n     * @return {boolean} Layers have sources that are still loading.\n     */\n    PluggableMap.prototype.getLoading = function () {\n        var layerStatesArray = this.getLayerGroup().getLayerStatesArray();\n        for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n            var layer = layerStatesArray[i].layer;\n            var source = /** @type {import(\"./layer/Layer.js\").default} */ (layer).getSource();\n            if (source && source.loading) {\n                return true;\n            }\n        }\n        return false;\n    };\n    /**\n     * Get the pixel for a coordinate.  This takes a coordinate in the user\n     * projection and returns the corresponding pixel.\n     * @param {import(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n     * @return {import(\"./pixel.js\").Pixel} A pixel position in the map viewport.\n     * @api\n     */\n    PluggableMap.prototype.getPixelFromCoordinate = function (coordinate) {\n        var viewCoordinate = fromUserCoordinate(coordinate, this.getView().getProjection());\n        return this.getPixelFromCoordinateInternal(viewCoordinate);\n    };\n    /**\n     * Get the pixel for a coordinate.  This takes a coordinate in the map view\n     * projection and returns the corresponding pixel.\n     * @param {import(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n     * @return {import(\"./pixel.js\").Pixel} A pixel position in the map viewport.\n     */\n    PluggableMap.prototype.getPixelFromCoordinateInternal = function (coordinate) {\n        var frameState = this.frameState_;\n        if (!frameState) {\n            return null;\n        }\n        else {\n            return applyTransform(frameState.coordinateToPixelTransform, coordinate.slice(0, 2));\n        }\n    };\n    /**\n     * Get the map renderer.\n     * @return {import(\"./renderer/Map.js\").default} Renderer\n     */\n    PluggableMap.prototype.getRenderer = function () {\n        return this.renderer_;\n    };\n    /**\n     * Get the size of this map.\n     * @return {import(\"./size.js\").Size|undefined} The size in pixels of the map in the DOM.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.getSize = function () {\n        return /** @type {import(\"./size.js\").Size|undefined} */ (this.get(MapProperty.SIZE));\n    };\n    /**\n     * Get the view associated with this map. A view manages properties such as\n     * center and resolution.\n     * @return {View} The view that controls this map.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.getView = function () {\n        return /** @type {View} */ (this.get(MapProperty.VIEW));\n    };\n    /**\n     * Get the element that serves as the map viewport.\n     * @return {HTMLElement} Viewport.\n     * @api\n     */\n    PluggableMap.prototype.getViewport = function () {\n        return this.viewport_;\n    };\n    /**\n     * Get the element that serves as the container for overlays.  Elements added to\n     * this container will let mousedown and touchstart events through to the map,\n     * so clicks and gestures on an overlay will trigger {@link module:ol/MapBrowserEvent~MapBrowserEvent}\n     * events.\n     * @return {!HTMLElement} The map's overlay container.\n     */\n    PluggableMap.prototype.getOverlayContainer = function () {\n        return this.overlayContainer_;\n    };\n    /**\n     * Get the element that serves as a container for overlays that don't allow\n     * event propagation. Elements added to this container won't let mousedown and\n     * touchstart events through to the map, so clicks and gestures on an overlay\n     * don't trigger any {@link module:ol/MapBrowserEvent~MapBrowserEvent}.\n     * @return {!HTMLElement} The map's overlay container that stops events.\n     */\n    PluggableMap.prototype.getOverlayContainerStopEvent = function () {\n        return this.overlayContainerStopEvent_;\n    };\n    /**\n     * @return {!Document} The document where the map is displayed.\n     */\n    PluggableMap.prototype.getOwnerDocument = function () {\n        var targetElement = this.getTargetElement();\n        return targetElement ? targetElement.ownerDocument : document;\n    };\n    /**\n     * @param {import(\"./Tile.js\").default} tile Tile.\n     * @param {string} tileSourceKey Tile source key.\n     * @param {import(\"./coordinate.js\").Coordinate} tileCenter Tile center.\n     * @param {number} tileResolution Tile resolution.\n     * @return {number} Tile priority.\n     */\n    PluggableMap.prototype.getTilePriority = function (tile, tileSourceKey, tileCenter, tileResolution) {\n        return getTilePriority(this.frameState_, tile, tileSourceKey, tileCenter, tileResolution);\n    };\n    /**\n     * @param {UIEvent} browserEvent Browser event.\n     * @param {string} [opt_type] Type.\n     */\n    PluggableMap.prototype.handleBrowserEvent = function (browserEvent, opt_type) {\n        var type = opt_type || browserEvent.type;\n        var mapBrowserEvent = new MapBrowserEvent(type, this, browserEvent);\n        this.handleMapBrowserEvent(mapBrowserEvent);\n    };\n    /**\n     * @param {MapBrowserEvent} mapBrowserEvent The event to handle.\n     */\n    PluggableMap.prototype.handleMapBrowserEvent = function (mapBrowserEvent) {\n        if (!this.frameState_) {\n            // With no view defined, we cannot translate pixels into geographical\n            // coordinates so interactions cannot be used.\n            return;\n        }\n        var originalEvent = /** @type {PointerEvent} */ (mapBrowserEvent.originalEvent);\n        var eventType = originalEvent.type;\n        if (eventType === PointerEventType.POINTERDOWN ||\n            eventType === EventType.WHEEL ||\n            eventType === EventType.KEYDOWN) {\n            var doc = this.getOwnerDocument();\n            var rootNode = this.viewport_.getRootNode\n                ? this.viewport_.getRootNode()\n                : doc;\n            var target = /** @type {Node} */ (originalEvent.target);\n            if (\n            // Abort if the target is a child of the container for elements whose events are not meant\n            // to be handled by map interactions.\n            this.overlayContainerStopEvent_.contains(target) ||\n                // Abort if the event target is a child of the container that is no longer in the page.\n                // It's possible for the target to no longer be in the page if it has been removed in an\n                // event listener, this might happen in a Control that recreates it's content based on\n                // user interaction either manually or via a render in something like https://reactjs.org/\n                !(rootNode === doc ? doc.documentElement : rootNode).contains(target)) {\n                return;\n            }\n        }\n        mapBrowserEvent.frameState = this.frameState_;\n        if (this.dispatchEvent(mapBrowserEvent) !== false) {\n            var interactionsArray = this.getInteractions().getArray().slice();\n            for (var i = interactionsArray.length - 1; i >= 0; i--) {\n                var interaction = interactionsArray[i];\n                if (interaction.getMap() !== this ||\n                    !interaction.getActive() ||\n                    !this.getTargetElement()) {\n                    continue;\n                }\n                var cont = interaction.handleEvent(mapBrowserEvent);\n                if (!cont || mapBrowserEvent.propagationStopped) {\n                    break;\n                }\n            }\n        }\n    };\n    /**\n     * @protected\n     */\n    PluggableMap.prototype.handlePostRender = function () {\n        var frameState = this.frameState_;\n        // Manage the tile queue\n        // Image loads are expensive and a limited resource, so try to use them\n        // efficiently:\n        // * When the view is static we allow a large number of parallel tile loads\n        //   to complete the frame as quickly as possible.\n        // * When animating or interacting, image loads can cause janks, so we reduce\n        //   the maximum number of loads per frame and limit the number of parallel\n        //   tile loads to remain reactive to view changes and to reduce the chance of\n        //   loading tiles that will quickly disappear from view.\n        var tileQueue = this.tileQueue_;\n        if (!tileQueue.isEmpty()) {\n            var maxTotalLoading = this.maxTilesLoading_;\n            var maxNewLoads = maxTotalLoading;\n            if (frameState) {\n                var hints = frameState.viewHints;\n                if (hints[ViewHint.ANIMATING] || hints[ViewHint.INTERACTING]) {\n                    var lowOnFrameBudget = Date.now() - frameState.time > 8;\n                    maxTotalLoading = lowOnFrameBudget ? 0 : 8;\n                    maxNewLoads = lowOnFrameBudget ? 0 : 2;\n                }\n            }\n            if (tileQueue.getTilesLoading() < maxTotalLoading) {\n                tileQueue.reprioritize(); // FIXME only call if view has changed\n                tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads);\n            }\n        }\n        if (frameState &&\n            this.hasListener(RenderEventType.RENDERCOMPLETE) &&\n            !frameState.animate &&\n            !this.tileQueue_.getTilesLoading() &&\n            !this.getLoading()) {\n            this.renderer_.dispatchRenderEvent(RenderEventType.RENDERCOMPLETE, frameState);\n        }\n        var postRenderFunctions = this.postRenderFunctions_;\n        for (var i = 0, ii = postRenderFunctions.length; i < ii; ++i) {\n            postRenderFunctions[i](this, frameState);\n        }\n        postRenderFunctions.length = 0;\n    };\n    /**\n     * @private\n     */\n    PluggableMap.prototype.handleSizeChanged_ = function () {\n        if (this.getView() && !this.getView().getAnimating()) {\n            this.getView().resolveConstraints(0);\n        }\n        this.render();\n    };\n    /**\n     * @private\n     */\n    PluggableMap.prototype.handleTargetChanged_ = function () {\n        // target may be undefined, null, a string or an Element.\n        // If it's a string we convert it to an Element before proceeding.\n        // If it's not now an Element we remove the viewport from the DOM.\n        // If it's an Element we append the viewport element to it.\n        var targetElement;\n        if (this.getTarget()) {\n            targetElement = this.getTargetElement();\n        }\n        if (this.mapBrowserEventHandler_) {\n            for (var i = 0, ii = this.keyHandlerKeys_.length; i < ii; ++i) {\n                unlistenByKey(this.keyHandlerKeys_[i]);\n            }\n            this.keyHandlerKeys_ = null;\n            this.viewport_.removeEventListener(EventType.CONTEXTMENU, this.boundHandleBrowserEvent_);\n            this.viewport_.removeEventListener(EventType.WHEEL, this.boundHandleBrowserEvent_);\n            if (this.handleResize_ !== undefined) {\n                removeEventListener(EventType.RESIZE, this.handleResize_, false);\n                this.handleResize_ = undefined;\n            }\n            this.mapBrowserEventHandler_.dispose();\n            this.mapBrowserEventHandler_ = null;\n            removeNode(this.viewport_);\n        }\n        if (!targetElement) {\n            if (this.renderer_) {\n                clearTimeout(this.postRenderTimeoutHandle_);\n                this.postRenderTimeoutHandle_ = undefined;\n                this.postRenderFunctions_.length = 0;\n                this.renderer_.dispose();\n                this.renderer_ = null;\n            }\n            if (this.animationDelayKey_) {\n                cancelAnimationFrame(this.animationDelayKey_);\n                this.animationDelayKey_ = undefined;\n            }\n        }\n        else {\n            targetElement.appendChild(this.viewport_);\n            if (!this.renderer_) {\n                this.renderer_ = this.createRenderer();\n            }\n            this.mapBrowserEventHandler_ = new MapBrowserEventHandler(this, this.moveTolerance_);\n            for (var key in MapBrowserEventType) {\n                this.mapBrowserEventHandler_.addEventListener(MapBrowserEventType[key], this.handleMapBrowserEvent.bind(this));\n            }\n            this.viewport_.addEventListener(EventType.CONTEXTMENU, this.boundHandleBrowserEvent_, false);\n            this.viewport_.addEventListener(EventType.WHEEL, this.boundHandleBrowserEvent_, PASSIVE_EVENT_LISTENERS ? { passive: false } : false);\n            var keyboardEventTarget = !this.keyboardEventTarget_\n                ? targetElement\n                : this.keyboardEventTarget_;\n            this.keyHandlerKeys_ = [\n                listen(keyboardEventTarget, EventType.KEYDOWN, this.handleBrowserEvent, this),\n                listen(keyboardEventTarget, EventType.KEYPRESS, this.handleBrowserEvent, this),\n            ];\n            if (!this.handleResize_) {\n                this.handleResize_ = this.updateSize.bind(this);\n                window.addEventListener(EventType.RESIZE, this.handleResize_, false);\n            }\n        }\n        this.updateSize();\n        // updateSize calls setSize, so no need to call this.render\n        // ourselves here.\n    };\n    /**\n     * @private\n     */\n    PluggableMap.prototype.handleTileChange_ = function () {\n        this.render();\n    };\n    /**\n     * @private\n     */\n    PluggableMap.prototype.handleViewPropertyChanged_ = function () {\n        this.render();\n    };\n    /**\n     * @private\n     */\n    PluggableMap.prototype.handleViewChanged_ = function () {\n        if (this.viewPropertyListenerKey_) {\n            unlistenByKey(this.viewPropertyListenerKey_);\n            this.viewPropertyListenerKey_ = null;\n        }\n        if (this.viewChangeListenerKey_) {\n            unlistenByKey(this.viewChangeListenerKey_);\n            this.viewChangeListenerKey_ = null;\n        }\n        var view = this.getView();\n        if (view) {\n            this.updateViewportSize_();\n            this.viewPropertyListenerKey_ = listen(view, ObjectEventType.PROPERTYCHANGE, this.handleViewPropertyChanged_, this);\n            this.viewChangeListenerKey_ = listen(view, EventType.CHANGE, this.handleViewPropertyChanged_, this);\n            view.resolveConstraints(0);\n        }\n        this.render();\n    };\n    /**\n     * @private\n     */\n    PluggableMap.prototype.handleLayerGroupChanged_ = function () {\n        if (this.layerGroupPropertyListenerKeys_) {\n            this.layerGroupPropertyListenerKeys_.forEach(unlistenByKey);\n            this.layerGroupPropertyListenerKeys_ = null;\n        }\n        var layerGroup = this.getLayerGroup();\n        if (layerGroup) {\n            this.layerGroupPropertyListenerKeys_ = [\n                listen(layerGroup, ObjectEventType.PROPERTYCHANGE, this.render, this),\n                listen(layerGroup, EventType.CHANGE, this.render, this),\n            ];\n        }\n        this.render();\n    };\n    /**\n     * @return {boolean} Is rendered.\n     */\n    PluggableMap.prototype.isRendered = function () {\n        return !!this.frameState_;\n    };\n    /**\n     * Requests an immediate render in a synchronous manner.\n     * @api\n     */\n    PluggableMap.prototype.renderSync = function () {\n        if (this.animationDelayKey_) {\n            cancelAnimationFrame(this.animationDelayKey_);\n        }\n        this.animationDelay_();\n    };\n    /**\n     * Redraws all text after new fonts have loaded\n     */\n    PluggableMap.prototype.redrawText = function () {\n        var layerStates = this.getLayerGroup().getLayerStatesArray();\n        for (var i = 0, ii = layerStates.length; i < ii; ++i) {\n            var layer = layerStates[i].layer;\n            if (layer.hasRenderer()) {\n                layer.getRenderer().handleFontsChanged();\n            }\n        }\n    };\n    /**\n     * Request a map rendering (at the next animation frame).\n     * @api\n     */\n    PluggableMap.prototype.render = function () {\n        if (this.renderer_ && this.animationDelayKey_ === undefined) {\n            this.animationDelayKey_ = requestAnimationFrame(this.animationDelay_);\n        }\n    };\n    /**\n     * Remove the given control from the map.\n     * @param {import(\"./control/Control.js\").default} control Control.\n     * @return {import(\"./control/Control.js\").default|undefined} The removed control (or undefined\n     *     if the control was not found).\n     * @api\n     */\n    PluggableMap.prototype.removeControl = function (control) {\n        return this.getControls().remove(control);\n    };\n    /**\n     * Remove the given interaction from the map.\n     * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to remove.\n     * @return {import(\"./interaction/Interaction.js\").default|undefined} The removed interaction (or\n     *     undefined if the interaction was not found).\n     * @api\n     */\n    PluggableMap.prototype.removeInteraction = function (interaction) {\n        return this.getInteractions().remove(interaction);\n    };\n    /**\n     * Removes the given layer from the map.\n     * @param {import(\"./layer/Base.js\").default} layer Layer.\n     * @return {import(\"./layer/Base.js\").default|undefined} The removed layer (or undefined if the\n     *     layer was not found).\n     * @api\n     */\n    PluggableMap.prototype.removeLayer = function (layer) {\n        var layers = this.getLayerGroup().getLayers();\n        return layers.remove(layer);\n    };\n    /**\n     * Remove the given overlay from the map.\n     * @param {import(\"./Overlay.js\").default} overlay Overlay.\n     * @return {import(\"./Overlay.js\").default|undefined} The removed overlay (or undefined\n     *     if the overlay was not found).\n     * @api\n     */\n    PluggableMap.prototype.removeOverlay = function (overlay) {\n        return this.getOverlays().remove(overlay);\n    };\n    /**\n     * @param {number} time Time.\n     * @private\n     */\n    PluggableMap.prototype.renderFrame_ = function (time) {\n        var _this = this;\n        var size = this.getSize();\n        var view = this.getView();\n        var previousFrameState = this.frameState_;\n        /** @type {?FrameState} */\n        var frameState = null;\n        if (size !== undefined && hasArea(size) && view && view.isDef()) {\n            var viewHints = view.getHints(this.frameState_ ? this.frameState_.viewHints : undefined);\n            var viewState = view.getState();\n            frameState = {\n                animate: false,\n                coordinateToPixelTransform: this.coordinateToPixelTransform_,\n                declutterTree: null,\n                extent: getForViewAndSize(viewState.center, viewState.resolution, viewState.rotation, size),\n                index: this.frameIndex_++,\n                layerIndex: 0,\n                layerStatesArray: this.getLayerGroup().getLayerStatesArray(),\n                pixelRatio: this.pixelRatio_,\n                pixelToCoordinateTransform: this.pixelToCoordinateTransform_,\n                postRenderFunctions: [],\n                size: size,\n                tileQueue: this.tileQueue_,\n                time: time,\n                usedTiles: {},\n                viewState: viewState,\n                viewHints: viewHints,\n                wantedTiles: {},\n            };\n        }\n        this.frameState_ = frameState;\n        this.renderer_.renderFrame(frameState);\n        if (frameState) {\n            if (frameState.animate) {\n                this.render();\n            }\n            Array.prototype.push.apply(this.postRenderFunctions_, frameState.postRenderFunctions);\n            if (previousFrameState) {\n                var moveStart = !this.previousExtent_ ||\n                    (!isEmpty(this.previousExtent_) &&\n                        !equals(frameState.extent, this.previousExtent_));\n                if (moveStart) {\n                    this.dispatchEvent(new MapEvent(MapEventType.MOVESTART, this, previousFrameState));\n                    this.previousExtent_ = createOrUpdateEmpty(this.previousExtent_);\n                }\n            }\n            var idle = this.previousExtent_ &&\n                !frameState.viewHints[ViewHint.ANIMATING] &&\n                !frameState.viewHints[ViewHint.INTERACTING] &&\n                !equals(frameState.extent, this.previousExtent_);\n            if (idle) {\n                this.dispatchEvent(new MapEvent(MapEventType.MOVEEND, this, frameState));\n                clone(frameState.extent, this.previousExtent_);\n            }\n        }\n        this.dispatchEvent(new MapEvent(MapEventType.POSTRENDER, this, frameState));\n        if (!this.postRenderTimeoutHandle_) {\n            this.postRenderTimeoutHandle_ = setTimeout(function () {\n                _this.postRenderTimeoutHandle_ = undefined;\n                _this.handlePostRender();\n            }, 0);\n        }\n    };\n    /**\n     * Sets the layergroup of this map.\n     * @param {LayerGroup} layerGroup A layer group containing the layers in this map.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.setLayerGroup = function (layerGroup) {\n        this.set(MapProperty.LAYERGROUP, layerGroup);\n    };\n    /**\n     * Set the size of this map.\n     * @param {import(\"./size.js\").Size|undefined} size The size in pixels of the map in the DOM.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.setSize = function (size) {\n        this.set(MapProperty.SIZE, size);\n    };\n    /**\n     * Set the target element to render this map into.\n     * @param {HTMLElement|string} [target] The Element or id of the Element\n     *     that the map is rendered in.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.setTarget = function (target) {\n        this.set(MapProperty.TARGET, target);\n    };\n    /**\n     * Set the view for this map.\n     * @param {View} view The view that controls this map.\n     * @observable\n     * @api\n     */\n    PluggableMap.prototype.setView = function (view) {\n        this.set(MapProperty.VIEW, view);\n    };\n    /**\n     * Force a recalculation of the map viewport size.  This should be called when\n     * third-party code changes the size of the map viewport.\n     * @api\n     */\n    PluggableMap.prototype.updateSize = function () {\n        var targetElement = this.getTargetElement();\n        var size = undefined;\n        if (targetElement) {\n            var computedStyle = getComputedStyle(targetElement);\n            var width = targetElement.offsetWidth -\n                parseFloat(computedStyle['borderLeftWidth']) -\n                parseFloat(computedStyle['paddingLeft']) -\n                parseFloat(computedStyle['paddingRight']) -\n                parseFloat(computedStyle['borderRightWidth']);\n            var height = targetElement.offsetHeight -\n                parseFloat(computedStyle['borderTopWidth']) -\n                parseFloat(computedStyle['paddingTop']) -\n                parseFloat(computedStyle['paddingBottom']) -\n                parseFloat(computedStyle['borderBottomWidth']);\n            if (!isNaN(width) && !isNaN(height)) {\n                size = [width, height];\n                if (!hasArea(size)) {\n                    // eslint-disable-next-line\n                    console.warn(\"No map visible because the map container's width or height are 0.\");\n                }\n            }\n        }\n        this.setSize(size);\n        this.updateViewportSize_();\n    };\n    /**\n     * Recomputes the viewport size and save it on the view object (if any)\n     * @private\n     */\n    PluggableMap.prototype.updateViewportSize_ = function () {\n        var view = this.getView();\n        if (view) {\n            var size = undefined;\n            var computedStyle = getComputedStyle(this.viewport_);\n            if (computedStyle.width && computedStyle.height) {\n                size = [\n                    parseInt(computedStyle.width, 10),\n                    parseInt(computedStyle.height, 10),\n                ];\n            }\n            view.setViewportSize(size);\n        }\n    };\n    return PluggableMap;\n}(BaseObject));\n/**\n * @param {MapOptions} options Map options.\n * @return {MapOptionsInternal} Internal map options.\n */\nfunction createOptionsInternal(options) {\n    /**\n     * @type {HTMLElement|Document}\n     */\n    var keyboardEventTarget = null;\n    if (options.keyboardEventTarget !== undefined) {\n        keyboardEventTarget =\n            typeof options.keyboardEventTarget === 'string'\n                ? document.getElementById(options.keyboardEventTarget)\n                : options.keyboardEventTarget;\n    }\n    /**\n     * @type {Object<string, *>}\n     */\n    var values = {};\n    var layerGroup = options.layers &&\n        typeof ( /** @type {?} */(options.layers).getLayers) === 'function'\n        ? /** @type {LayerGroup} */ (options.layers)\n        : new LayerGroup({ layers: /** @type {Collection} */ (options.layers) });\n    values[MapProperty.LAYERGROUP] = layerGroup;\n    values[MapProperty.TARGET] = options.target;\n    values[MapProperty.VIEW] =\n        options.view !== undefined ? options.view : new View();\n    var controls;\n    if (options.controls !== undefined) {\n        if (Array.isArray(options.controls)) {\n            controls = new Collection(options.controls.slice());\n        }\n        else {\n            assert(typeof ( /** @type {?} */(options.controls).getArray) === 'function', 47); // Expected `controls` to be an array or an `import(\"./Collection.js\").Collection`\n            controls = /** @type {Collection} */ (options.controls);\n        }\n    }\n    var interactions;\n    if (options.interactions !== undefined) {\n        if (Array.isArray(options.interactions)) {\n            interactions = new Collection(options.interactions.slice());\n        }\n        else {\n            assert(typeof ( /** @type {?} */(options.interactions).getArray) ===\n                'function', 48); // Expected `interactions` to be an array or an `import(\"./Collection.js\").Collection`\n            interactions = /** @type {Collection} */ (options.interactions);\n        }\n    }\n    var overlays;\n    if (options.overlays !== undefined) {\n        if (Array.isArray(options.overlays)) {\n            overlays = new Collection(options.overlays.slice());\n        }\n        else {\n            assert(typeof ( /** @type {?} */(options.overlays).getArray) === 'function', 49); // Expected `overlays` to be an array or an `import(\"./Collection.js\").Collection`\n            overlays = options.overlays;\n        }\n    }\n    else {\n        overlays = new Collection();\n    }\n    return {\n        controls: controls,\n        interactions: interactions,\n        keyboardEventTarget: keyboardEventTarget,\n        overlays: overlays,\n        values: values,\n    };\n}\nexport default PluggableMap;\n//# sourceMappingURL=PluggableMap.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/Map\n */\nimport Disposable from '../Disposable.js';\nimport { TRUE } from '../functions.js';\nimport { abstract } from '../util.js';\nimport { compose as composeTransform, makeInverse } from '../transform.js';\nimport { getWidth } from '../extent.js';\nimport { shared as iconImageCache } from '../style/IconImageCache.js';\nimport { inView } from '../layer/Layer.js';\nimport { wrapX } from '../coordinate.js';\n/**\n * @typedef HitMatch\n * @property {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @property {import(\"../layer/Layer.js\").default} layer Layer.\n * @property {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @property {number} distanceSq Squared distance.\n * @property {import(\"./vector.js\").FeatureCallback<T>} callback Callback.\n * @template T\n */\n/**\n * @abstract\n */\nvar MapRenderer = /** @class */ (function (_super) {\n    __extends(MapRenderer, _super);\n    /**\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    function MapRenderer(map) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {import(\"../PluggableMap.js\").default}\n         */\n        _this.map_ = map;\n        return _this;\n    }\n    /**\n     * @abstract\n     * @param {import(\"../render/EventType.js\").default} type Event type.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    MapRenderer.prototype.dispatchRenderEvent = function (type, frameState) {\n        abstract();\n    };\n    /**\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @protected\n     */\n    MapRenderer.prototype.calculateMatrices2D = function (frameState) {\n        var viewState = frameState.viewState;\n        var coordinateToPixelTransform = frameState.coordinateToPixelTransform;\n        var pixelToCoordinateTransform = frameState.pixelToCoordinateTransform;\n        composeTransform(coordinateToPixelTransform, frameState.size[0] / 2, frameState.size[1] / 2, 1 / viewState.resolution, -1 / viewState.resolution, -viewState.rotation, -viewState.center[0], -viewState.center[1]);\n        makeInverse(pixelToCoordinateTransform, coordinateToPixelTransform);\n    };\n    /**\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {boolean} checkWrapped Check for wrapped geometries.\n     * @param {import(\"./vector.js\").FeatureCallback<T>} callback Feature callback.\n     * @param {S} thisArg Value to use as `this` when executing `callback`.\n     * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n     *     function, only layers which are visible and for which this function\n     *     returns `true` will be tested for features.  By default, all visible\n     *     layers will be tested.\n     * @param {U} thisArg2 Value to use as `this` when executing `layerFilter`.\n     * @return {T|undefined} Callback result.\n     * @template S,T,U\n     */\n    MapRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, checkWrapped, callback, thisArg, layerFilter, thisArg2) {\n        var result;\n        var viewState = frameState.viewState;\n        /**\n         * @param {boolean} managed Managed layer.\n         * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n         * @param {import(\"../layer/Layer.js\").default} layer Layer.\n         * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n         * @return {T|undefined} Callback result.\n         */\n        function forEachFeatureAtCoordinate(managed, feature, layer, geometry) {\n            return callback.call(thisArg, feature, managed ? layer : null, geometry);\n        }\n        var projection = viewState.projection;\n        var translatedCoordinate = wrapX(coordinate.slice(), projection);\n        var offsets = [[0, 0]];\n        if (projection.canWrapX() && checkWrapped) {\n            var projectionExtent = projection.getExtent();\n            var worldWidth = getWidth(projectionExtent);\n            offsets.push([-worldWidth, 0], [worldWidth, 0]);\n        }\n        var layerStates = frameState.layerStatesArray;\n        var numLayers = layerStates.length;\n        var matches = /** @type {Array<HitMatch<T>>} */ ([]);\n        var tmpCoord = [];\n        for (var i = 0; i < offsets.length; i++) {\n            for (var j = numLayers - 1; j >= 0; --j) {\n                var layerState = layerStates[j];\n                var layer = layerState.layer;\n                if (layer.hasRenderer() &&\n                    inView(layerState, viewState) &&\n                    layerFilter.call(thisArg2, layer)) {\n                    var layerRenderer = layer.getRenderer();\n                    var source = layer.getSource();\n                    if (layerRenderer && source) {\n                        var coordinates = source.getWrapX()\n                            ? translatedCoordinate\n                            : coordinate;\n                        var callback_1 = forEachFeatureAtCoordinate.bind(null, layerState.managed);\n                        tmpCoord[0] = coordinates[0] + offsets[i][0];\n                        tmpCoord[1] = coordinates[1] + offsets[i][1];\n                        result = layerRenderer.forEachFeatureAtCoordinate(tmpCoord, frameState, hitTolerance, callback_1, matches);\n                    }\n                    if (result) {\n                        return result;\n                    }\n                }\n            }\n        }\n        if (matches.length === 0) {\n            return undefined;\n        }\n        var order = 1 / matches.length;\n        matches.forEach(function (m, i) { return (m.distanceSq += i * order); });\n        matches.sort(function (a, b) { return a.distanceSq - b.distanceSq; });\n        matches.some(function (m) {\n            return (result = m.callback(m.feature, m.layer, m.geometry));\n        });\n        return result;\n    };\n    /**\n     * @abstract\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer\n     *     callback.\n     * @param {function(import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n     *     function, only layers which are visible and for which this function\n     *     returns `true` will be tested for features.  By default, all visible\n     *     layers will be tested.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    MapRenderer.prototype.forEachLayerAtPixel = function (pixel, frameState, hitTolerance, callback, layerFilter) {\n        return abstract();\n    };\n    /**\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {boolean} checkWrapped Check for wrapped geometries.\n     * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n     *     function, only layers which are visible and for which this function\n     *     returns `true` will be tested for features.  By default, all visible\n     *     layers will be tested.\n     * @param {U} thisArg Value to use as `this` when executing `layerFilter`.\n     * @return {boolean} Is there a feature at the given coordinate?\n     * @template U\n     */\n    MapRenderer.prototype.hasFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, checkWrapped, layerFilter, thisArg) {\n        var hasFeature = this.forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, checkWrapped, TRUE, this, layerFilter, thisArg);\n        return hasFeature !== undefined;\n    };\n    /**\n     * @return {import(\"../PluggableMap.js\").default} Map.\n     */\n    MapRenderer.prototype.getMap = function () {\n        return this.map_;\n    };\n    /**\n     * Render.\n     * @abstract\n     * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    MapRenderer.prototype.renderFrame = function (frameState) {\n        abstract();\n    };\n    /**\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @protected\n     */\n    MapRenderer.prototype.scheduleExpireIconCache = function (frameState) {\n        if (iconImageCache.canExpireCache()) {\n            frameState.postRenderFunctions.push(expireIconCache);\n        }\n    };\n    return MapRenderer;\n}(Disposable));\n/**\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n */\nfunction expireIconCache(map, frameState) {\n    iconImageCache.expire();\n}\nexport default MapRenderer;\n//# sourceMappingURL=Map.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/Composite\n */\nimport MapRenderer from './Map.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport RenderEvent from '../render/Event.js';\nimport RenderEventType from '../render/EventType.js';\nimport SourceState from '../source/State.js';\nimport { CLASS_UNSELECTABLE } from '../css.js';\nimport { checkedFonts } from '../render/canvas.js';\nimport { inView } from '../layer/Layer.js';\nimport { listen, unlistenByKey } from '../events.js';\nimport { replaceChildren } from '../dom.js';\n/**\n * @classdesc\n * Canvas map renderer.\n * @api\n */\nvar CompositeMapRenderer = /** @class */ (function (_super) {\n    __extends(CompositeMapRenderer, _super);\n    /**\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    function CompositeMapRenderer(map) {\n        var _this = _super.call(this, map) || this;\n        /**\n         * @type {import(\"../events.js\").EventsKey}\n         */\n        _this.fontChangeListenerKey_ = listen(checkedFonts, ObjectEventType.PROPERTYCHANGE, map.redrawText.bind(map));\n        /**\n         * @private\n         * @type {HTMLDivElement}\n         */\n        _this.element_ = document.createElement('div');\n        var style = _this.element_.style;\n        style.position = 'absolute';\n        style.width = '100%';\n        style.height = '100%';\n        style.zIndex = '0';\n        _this.element_.className = CLASS_UNSELECTABLE + ' ol-layers';\n        var container = map.getViewport();\n        container.insertBefore(_this.element_, container.firstChild || null);\n        /**\n         * @private\n         * @type {Array<HTMLElement>}\n         */\n        _this.children_ = [];\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.renderedVisible_ = true;\n        return _this;\n    }\n    /**\n     * @param {import(\"../render/EventType.js\").default} type Event type.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    CompositeMapRenderer.prototype.dispatchRenderEvent = function (type, frameState) {\n        var map = this.getMap();\n        if (map.hasListener(type)) {\n            var event_1 = new RenderEvent(type, undefined, frameState);\n            map.dispatchEvent(event_1);\n        }\n    };\n    CompositeMapRenderer.prototype.disposeInternal = function () {\n        unlistenByKey(this.fontChangeListenerKey_);\n        this.element_.parentNode.removeChild(this.element_);\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * Render.\n     * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    CompositeMapRenderer.prototype.renderFrame = function (frameState) {\n        if (!frameState) {\n            if (this.renderedVisible_) {\n                this.element_.style.display = 'none';\n                this.renderedVisible_ = false;\n            }\n            return;\n        }\n        this.calculateMatrices2D(frameState);\n        this.dispatchRenderEvent(RenderEventType.PRECOMPOSE, frameState);\n        var layerStatesArray = frameState.layerStatesArray.sort(function (a, b) {\n            return a.zIndex - b.zIndex;\n        });\n        var viewState = frameState.viewState;\n        this.children_.length = 0;\n        /**\n         * @type {Array<import(\"../layer/BaseVector.js\").default>}\n         */\n        var declutterLayers = [];\n        var previousElement = null;\n        for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n            var layerState = layerStatesArray[i];\n            frameState.layerIndex = i;\n            if (!inView(layerState, viewState) ||\n                (layerState.sourceState != SourceState.READY &&\n                    layerState.sourceState != SourceState.UNDEFINED)) {\n                continue;\n            }\n            var layer = layerState.layer;\n            var element = layer.render(frameState, previousElement);\n            if (!element) {\n                continue;\n            }\n            if (element !== previousElement) {\n                this.children_.push(element);\n                previousElement = element;\n            }\n            if ('getDeclutter' in layer) {\n                declutterLayers.push(\n                /** @type {import(\"../layer/BaseVector.js\").default} */ (layer));\n            }\n        }\n        for (var i = declutterLayers.length - 1; i >= 0; --i) {\n            declutterLayers[i].renderDeclutter(frameState);\n        }\n        replaceChildren(this.element_, this.children_);\n        this.dispatchRenderEvent(RenderEventType.POSTCOMPOSE, frameState);\n        if (!this.renderedVisible_) {\n            this.element_.style.display = '';\n            this.renderedVisible_ = true;\n        }\n        this.scheduleExpireIconCache(frameState);\n    };\n    /**\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer\n     *     callback.\n     * @param {function(import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n     *     function, only layers which are visible and for which this function\n     *     returns `true` will be tested for features.  By default, all visible\n     *     layers will be tested.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    CompositeMapRenderer.prototype.forEachLayerAtPixel = function (pixel, frameState, hitTolerance, callback, layerFilter) {\n        var viewState = frameState.viewState;\n        var layerStates = frameState.layerStatesArray;\n        var numLayers = layerStates.length;\n        for (var i = numLayers - 1; i >= 0; --i) {\n            var layerState = layerStates[i];\n            var layer = layerState.layer;\n            if (layer.hasRenderer() &&\n                inView(layerState, viewState) &&\n                layerFilter(layer)) {\n                var layerRenderer = layer.getRenderer();\n                var data = layerRenderer.getDataAtPixel(pixel, frameState, hitTolerance);\n                if (data) {\n                    var result = callback(layer, data);\n                    if (result) {\n                        return result;\n                    }\n                }\n            }\n        }\n        return undefined;\n    };\n    return CompositeMapRenderer;\n}(MapRenderer));\nexport default CompositeMapRenderer;\n//# sourceMappingURL=Composite.js.map","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","/**\n * @module ol/geom/flat/geodesic\n */\nimport { get as getProjection, getTransform } from '../../proj.js';\nimport { squaredSegmentDistance, toDegrees, toRadians } from '../../math.js';\n/**\n * @param {function(number): import(\"../../coordinate.js\").Coordinate} interpolate Interpolate function.\n * @param {import(\"../../proj.js\").TransformFunction} transform Transform from longitude/latitude to\n *     projected coordinates.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nfunction line(interpolate, transform, squaredTolerance) {\n    // FIXME reduce garbage generation\n    // FIXME optimize stack operations\n    /** @type {Array<number>} */\n    var flatCoordinates = [];\n    var geoA = interpolate(0);\n    var geoB = interpolate(1);\n    var a = transform(geoA);\n    var b = transform(geoB);\n    /** @type {Array<import(\"../../coordinate.js\").Coordinate>} */\n    var geoStack = [geoB, geoA];\n    /** @type {Array<import(\"../../coordinate.js\").Coordinate>} */\n    var stack = [b, a];\n    /** @type {Array<number>} */\n    var fractionStack = [1, 0];\n    /** @type {!Object<string, boolean>} */\n    var fractions = {};\n    var maxIterations = 1e5;\n    var geoM, m, fracA, fracB, fracM, key;\n    while (--maxIterations > 0 && fractionStack.length > 0) {\n        // Pop the a coordinate off the stack\n        fracA = fractionStack.pop();\n        geoA = geoStack.pop();\n        a = stack.pop();\n        // Add the a coordinate if it has not been added yet\n        key = fracA.toString();\n        if (!(key in fractions)) {\n            flatCoordinates.push(a[0], a[1]);\n            fractions[key] = true;\n        }\n        // Pop the b coordinate off the stack\n        fracB = fractionStack.pop();\n        geoB = geoStack.pop();\n        b = stack.pop();\n        // Find the m point between the a and b coordinates\n        fracM = (fracA + fracB) / 2;\n        geoM = interpolate(fracM);\n        m = transform(geoM);\n        if (squaredSegmentDistance(m[0], m[1], a[0], a[1], b[0], b[1]) <\n            squaredTolerance) {\n            // If the m point is sufficiently close to the straight line, then we\n            // discard it.  Just use the b coordinate and move on to the next line\n            // segment.\n            flatCoordinates.push(b[0], b[1]);\n            key = fracB.toString();\n            fractions[key] = true;\n        }\n        else {\n            // Otherwise, we need to subdivide the current line segment.  Split it\n            // into two and push the two line segments onto the stack.\n            fractionStack.push(fracB, fracM, fracM, fracA);\n            stack.push(b, m, m, a);\n            geoStack.push(geoB, geoM, geoM, geoA);\n        }\n    }\n    return flatCoordinates;\n}\n/**\n * Generate a great-circle arcs between two lat/lon points.\n * @param {number} lon1 Longitude 1 in degrees.\n * @param {number} lat1 Latitude 1 in degrees.\n * @param {number} lon2 Longitude 2 in degrees.\n * @param {number} lat2 Latitude 2 in degrees.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nexport function greatCircleArc(lon1, lat1, lon2, lat2, projection, squaredTolerance) {\n    var geoProjection = getProjection('EPSG:4326');\n    var cosLat1 = Math.cos(toRadians(lat1));\n    var sinLat1 = Math.sin(toRadians(lat1));\n    var cosLat2 = Math.cos(toRadians(lat2));\n    var sinLat2 = Math.sin(toRadians(lat2));\n    var cosDeltaLon = Math.cos(toRadians(lon2 - lon1));\n    var sinDeltaLon = Math.sin(toRadians(lon2 - lon1));\n    var d = sinLat1 * sinLat2 + cosLat1 * cosLat2 * cosDeltaLon;\n    return line(\n    /**\n     * @param {number} frac Fraction.\n     * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n     */\n    function (frac) {\n        if (1 <= d) {\n            return [lon2, lat2];\n        }\n        var D = frac * Math.acos(d);\n        var cosD = Math.cos(D);\n        var sinD = Math.sin(D);\n        var y = sinDeltaLon * cosLat2;\n        var x = cosLat1 * sinLat2 - sinLat1 * cosLat2 * cosDeltaLon;\n        var theta = Math.atan2(y, x);\n        var lat = Math.asin(sinLat1 * cosD + cosLat1 * sinD * Math.cos(theta));\n        var lon = toRadians(lon1) +\n            Math.atan2(Math.sin(theta) * sinD * cosLat1, cosD - sinLat1 * Math.sin(lat));\n        return [toDegrees(lon), toDegrees(lat)];\n    }, getTransform(geoProjection, projection), squaredTolerance);\n}\n/**\n * Generate a meridian (line at constant longitude).\n * @param {number} lon Longitude.\n * @param {number} lat1 Latitude 1.\n * @param {number} lat2 Latitude 2.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nexport function meridian(lon, lat1, lat2, projection, squaredTolerance) {\n    var epsg4326Projection = getProjection('EPSG:4326');\n    return line(\n    /**\n     * @param {number} frac Fraction.\n     * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n     */\n    function (frac) {\n        return [lon, lat1 + (lat2 - lat1) * frac];\n    }, getTransform(epsg4326Projection, projection), squaredTolerance);\n}\n/**\n * Generate a parallel (line at constant latitude).\n * @param {number} lat Latitude.\n * @param {number} lon1 Longitude 1.\n * @param {number} lon2 Longitude 2.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nexport function parallel(lat, lon1, lon2, projection, squaredTolerance) {\n    var epsg4326Projection = getProjection('EPSG:4326');\n    return line(\n    /**\n     * @param {number} frac Fraction.\n     * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n     */\n    function (frac) {\n        return [lon1 + (lon2 - lon1) * frac, lat];\n    }, getTransform(epsg4326Projection, projection), squaredTolerance);\n}\n//# sourceMappingURL=geodesic.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Graticule\n */\nimport Collection from '../Collection.js';\nimport EventType from '../render/EventType.js';\nimport Feature from '../Feature.js';\nimport Fill from '../style/Fill.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport Point from '../geom/Point.js';\nimport Stroke from '../style/Stroke.js';\nimport Style from '../style/Style.js';\nimport Text from '../style/Text.js';\nimport VectorLayer from './Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport { applyTransform, approximatelyEquals, containsCoordinate, containsExtent, equals, getCenter, getHeight, getIntersection, getWidth, intersects, isEmpty, wrapX as wrapExtentX, } from '../extent.js';\nimport { assign } from '../obj.js';\nimport { clamp } from '../math.js';\nimport { degreesToStringHDMS } from '../coordinate.js';\nimport { equivalent as equivalentProjection, get as getProjection, getTransform, } from '../proj.js';\nimport { getVectorContext } from '../render.js';\nimport { meridian, parallel } from '../geom/flat/geodesic.js';\n/**\n * @type {Stroke}\n * @private\n * @const\n */\nvar DEFAULT_STROKE_STYLE = new Stroke({\n    color: 'rgba(0,0,0,0.2)',\n});\n/**\n * @type {Array<number>}\n * @private\n */\nvar INTERVALS = [\n    90, 45, 30, 20, 10, 5, 2, 1, 0.5, 0.2, 0.1, 0.05, 0.01, 0.005, 0.002, 0.001,\n];\n/**\n * @typedef {Object} GraticuleLabelDataType\n * @property {Point} geom Geometry.\n * @property {string} text Text.\n */\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {number} [maxLines=100] The maximum number of meridians and\n * parallels from the center of the map. The default value of 100 means that at\n * most 200 meridians and 200 parallels will be displayed. The default value is\n * appropriate for conformal projections like Spherical Mercator. If you\n * increase the value, more lines will be drawn and the drawing performance will\n * decrease.\n * @property {Stroke} [strokeStyle='rgba(0,0,0,0.2)'] The\n * stroke style to use for drawing the graticule. If not provided, a not fully\n * opaque black will be used.\n * @property {number} [targetSize=100] The target size of the graticule cells,\n * in pixels.\n * @property {boolean} [showLabels=false] Render a label with the respective\n * latitude/longitude for each graticule line.\n * @property {function(number):string} [lonLabelFormatter] Label formatter for\n * longitudes. This function is called with the longitude as argument, and\n * should return a formatted string representing the longitude. By default,\n * labels are formatted as degrees, minutes, seconds and hemisphere.\n * @property {function(number):string} [latLabelFormatter] Label formatter for\n * latitudes. This function is called with the latitude as argument, and\n * should return a formatted string representing the latitude. By default,\n * labels are formatted as degrees, minutes, seconds and hemisphere.\n * @property {number} [lonLabelPosition=0] Longitude label position in fractions\n * (0..1) of view extent. 0 means at the bottom of the viewport, 1 means at the\n * top.\n * @property {number} [latLabelPosition=1] Latitude label position in fractions\n * (0..1) of view extent. 0 means at the left of the viewport, 1 means at the\n * right.\n * @property {Text} [lonLabelStyle] Longitude label text\n * style. If not provided, the following style will be used:\n * ```js\n * new Text({\n *   font: '12px Calibri,sans-serif',\n *   textBaseline: 'bottom',\n *   fill: new Fill({\n *     color: 'rgba(0,0,0,1)'\n *   }),\n *   stroke: new Stroke({\n *     color: 'rgba(255,255,255,1)',\n *     width: 3\n *   })\n * });\n * ```\n * Note that the default's `textBaseline` configuration will not work well for\n * `lonLabelPosition` configurations that position labels close to the top of\n * the viewport.\n * @property {Text} [latLabelStyle] Latitude label text style.\n * If not provided, the following style will be used:\n * ```js\n * new Text({\n *   font: '12px Calibri,sans-serif',\n *   textAlign: 'end',\n *   fill: new Fill({\n *     color: 'rgba(0,0,0,1)'\n *   }),\n *   stroke: Stroke({\n *     color: 'rgba(255,255,255,1)',\n *     width: 3\n *   })\n * });\n * ```\n * Note that the default's `textAlign` configuration will not work well for\n * `latLabelPosition` configurations that position labels close to the left of\n * the viewport.\n * @property {Array<number>} [intervals=[90, 45, 30, 20, 10, 5, 2, 1, 0.5, 0.2, 0.1, 0.05, 0.01, 0.005, 0.002, 0.001]]\n * Intervals (in degrees) for the graticule. Example to limit graticules to 30 and 10 degrees intervals:\n * ```js\n * [30, 10]\n * ```\n * @property {boolean} [wrapX=true] Whether to repeat the graticule horizontally.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n/**\n * @classdesc\n * Layer that renders a grid for a coordinate system (currently only EPSG:4326 is supported).\n * Note that the view projection must define both extent and worldExtent.\n *\n * @fires import(\"../render/Event.js\").RenderEvent\n * @extends {VectorLayer<import(\"../source/Vector.js\").default>}\n * @api\n */\nvar Graticule = /** @class */ (function (_super) {\n    __extends(Graticule, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function Graticule(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var baseOptions = assign({\n            updateWhileAnimating: true,\n            updateWhileInteracting: true,\n            renderBuffer: 0,\n        }, options);\n        delete baseOptions.maxLines;\n        delete baseOptions.strokeStyle;\n        delete baseOptions.targetSize;\n        delete baseOptions.showLabels;\n        delete baseOptions.lonLabelFormatter;\n        delete baseOptions.latLabelFormatter;\n        delete baseOptions.lonLabelPosition;\n        delete baseOptions.latLabelPosition;\n        delete baseOptions.lonLabelStyle;\n        delete baseOptions.latLabelStyle;\n        delete baseOptions.intervals;\n        _this = _super.call(this, baseOptions) || this;\n        /**\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.projection_ = null;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.maxLat_ = Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.maxLon_ = Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.minLat_ = -Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.minLon_ = -Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.maxX_ = Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.maxY_ = Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.minX_ = -Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.minY_ = -Infinity;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.targetSize_ =\n            options.targetSize !== undefined ? options.targetSize : 100;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.maxLines_ = options.maxLines !== undefined ? options.maxLines : 100;\n        /**\n         * @type {Array<LineString>}\n         * @private\n         */\n        _this.meridians_ = [];\n        /**\n         * @type {Array<LineString>}\n         * @private\n         */\n        _this.parallels_ = [];\n        /**\n         * @type {Stroke}\n         * @private\n         */\n        _this.strokeStyle_ =\n            options.strokeStyle !== undefined\n                ? options.strokeStyle\n                : DEFAULT_STROKE_STYLE;\n        /**\n         * @type {import(\"../proj.js\").TransformFunction|undefined}\n         * @private\n         */\n        _this.fromLonLatTransform_ = undefined;\n        /**\n         * @type {import(\"../proj.js\").TransformFunction|undefined}\n         * @private\n         */\n        _this.toLonLatTransform_ = undefined;\n        /**\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.projectionCenterLonLat_ = null;\n        /**\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.bottomLeft_ = null;\n        /**\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.bottomRight_ = null;\n        /**\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.topLeft_ = null;\n        /**\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.topRight_ = null;\n        /**\n         * @type {Array<GraticuleLabelDataType>}\n         * @private\n         */\n        _this.meridiansLabels_ = null;\n        /**\n         * @type {Array<GraticuleLabelDataType>}\n         * @private\n         */\n        _this.parallelsLabels_ = null;\n        if (options.showLabels) {\n            /**\n             * @type {null|function(number):string}\n             * @private\n             */\n            _this.lonLabelFormatter_ =\n                options.lonLabelFormatter == undefined\n                    ? degreesToStringHDMS.bind(_this, 'EW')\n                    : options.lonLabelFormatter;\n            /**\n             * @type {function(number):string}\n             * @private\n             */\n            _this.latLabelFormatter_ =\n                options.latLabelFormatter == undefined\n                    ? degreesToStringHDMS.bind(_this, 'NS')\n                    : options.latLabelFormatter;\n            /**\n             * Longitude label position in fractions (0..1) of view extent. 0 means\n             * bottom, 1 means top.\n             * @type {number}\n             * @private\n             */\n            _this.lonLabelPosition_ =\n                options.lonLabelPosition == undefined ? 0 : options.lonLabelPosition;\n            /**\n             * Latitude Label position in fractions (0..1) of view extent. 0 means left, 1\n             * means right.\n             * @type {number}\n             * @private\n             */\n            _this.latLabelPosition_ =\n                options.latLabelPosition == undefined ? 1 : options.latLabelPosition;\n            /**\n             * @type {Style}\n             * @private\n             */\n            _this.lonLabelStyleBase_ = new Style({\n                text: options.lonLabelStyle !== undefined\n                    ? options.lonLabelStyle.clone()\n                    : new Text({\n                        font: '12px Calibri,sans-serif',\n                        textBaseline: 'bottom',\n                        fill: new Fill({\n                            color: 'rgba(0,0,0,1)',\n                        }),\n                        stroke: new Stroke({\n                            color: 'rgba(255,255,255,1)',\n                            width: 3,\n                        }),\n                    }),\n            });\n            /**\n             * @private\n             * @param {import(\"../Feature\").default} feature Feature\n             * @return {Style} style\n             */\n            _this.lonLabelStyle_ = function (feature) {\n                var label = feature.get('graticule_label');\n                this.lonLabelStyleBase_.getText().setText(label);\n                return this.lonLabelStyleBase_;\n            }.bind(_this);\n            /**\n             * @type {Style}\n             * @private\n             */\n            _this.latLabelStyleBase_ = new Style({\n                text: options.latLabelStyle !== undefined\n                    ? options.latLabelStyle.clone()\n                    : new Text({\n                        font: '12px Calibri,sans-serif',\n                        textAlign: 'right',\n                        fill: new Fill({\n                            color: 'rgba(0,0,0,1)',\n                        }),\n                        stroke: new Stroke({\n                            color: 'rgba(255,255,255,1)',\n                            width: 3,\n                        }),\n                    }),\n            });\n            /**\n             * @private\n             * @param {import(\"../Feature\").default} feature Feature\n             * @return {Style} style\n             */\n            _this.latLabelStyle_ = function (feature) {\n                var label = feature.get('graticule_label');\n                this.latLabelStyleBase_.getText().setText(label);\n                return this.latLabelStyleBase_;\n            }.bind(_this);\n            _this.meridiansLabels_ = [];\n            _this.parallelsLabels_ = [];\n            _this.addEventListener(EventType.POSTRENDER, _this.drawLabels_.bind(_this));\n        }\n        /**\n         * @type {Array<number>}\n         * @private\n         */\n        _this.intervals_ =\n            options.intervals !== undefined ? options.intervals : INTERVALS;\n        // use a source with a custom loader for lines & text\n        _this.setSource(new VectorSource({\n            loader: _this.loaderFunction.bind(_this),\n            strategy: _this.strategyFunction.bind(_this),\n            features: new Collection(),\n            overlaps: false,\n            useSpatialIndex: false,\n            wrapX: options.wrapX,\n        }));\n        /**\n         * feature pool to use when updating graticule\n         * @type {Array<Feature>}\n         * @private\n         */\n        _this.featurePool_ = [];\n        /**\n         * @type {Style}\n         * @private\n         */\n        _this.lineStyle_ = new Style({\n            stroke: _this.strokeStyle_,\n        });\n        /**\n         * @type {?import(\"../extent.js\").Extent}\n         * @private\n         */\n        _this.loadedExtent_ = null;\n        /**\n         * @type {?import(\"../extent.js\").Extent}\n         */\n        _this.renderedExtent_ = null;\n        _this.setRenderOrder(null);\n        return _this;\n    }\n    /**\n     * Strategy function for loading features based on the view's extent and\n     * resolution.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @return {Array<import(\"../extent.js\").Extent>} Extents.\n     */\n    Graticule.prototype.strategyFunction = function (extent, resolution) {\n        // extents may be passed in different worlds, to avoid endless loop we use only one\n        var realWorldExtent = extent.slice();\n        if (this.projection_ && this.getSource().getWrapX()) {\n            wrapExtentX(realWorldExtent, this.projection_);\n        }\n        if (this.loadedExtent_) {\n            if (approximatelyEquals(this.loadedExtent_, realWorldExtent, resolution)) {\n                // make sure result is exactly equal to previous extent\n                realWorldExtent = this.loadedExtent_.slice();\n            }\n            else {\n                // we should not keep track of loaded extents\n                this.getSource().removeLoadedExtent(this.loadedExtent_);\n            }\n        }\n        return [realWorldExtent];\n    };\n    /**\n     * Update geometries in the source based on current view\n     * @param {import(\"../extent\").Extent} extent Extent\n     * @param {number} resolution Resolution\n     * @param {import(\"../proj/Projection.js\").default} projection Projection\n     */\n    Graticule.prototype.loaderFunction = function (extent, resolution, projection) {\n        this.loadedExtent_ = extent;\n        var source = this.getSource();\n        // only consider the intersection between our own extent & the requested one\n        var layerExtent = this.getExtent() || [\n            -Infinity,\n            -Infinity,\n            Infinity,\n            Infinity,\n        ];\n        var renderExtent = getIntersection(layerExtent, extent);\n        if (this.renderedExtent_ && equals(this.renderedExtent_, renderExtent)) {\n            return;\n        }\n        this.renderedExtent_ = renderExtent;\n        // bail out if nothing to render\n        if (isEmpty(renderExtent)) {\n            return;\n        }\n        // update projection info\n        var center = getCenter(renderExtent);\n        var squaredTolerance = (resolution * resolution) / 4;\n        var updateProjectionInfo = !this.projection_ || !equivalentProjection(this.projection_, projection);\n        if (updateProjectionInfo) {\n            this.updateProjectionInfo_(projection);\n        }\n        this.createGraticule_(renderExtent, center, resolution, squaredTolerance);\n        // first make sure we have enough features in the pool\n        var featureCount = this.meridians_.length + this.parallels_.length;\n        if (this.meridiansLabels_) {\n            featureCount += this.meridians_.length;\n        }\n        if (this.parallelsLabels_) {\n            featureCount += this.parallels_.length;\n        }\n        var feature;\n        while (featureCount > this.featurePool_.length) {\n            feature = new Feature();\n            this.featurePool_.push(feature);\n        }\n        var featuresColl = source.getFeaturesCollection();\n        featuresColl.clear();\n        var poolIndex = 0;\n        // add features for the lines & labels\n        var i, l;\n        for (i = 0, l = this.meridians_.length; i < l; ++i) {\n            feature = this.featurePool_[poolIndex++];\n            feature.setGeometry(this.meridians_[i]);\n            feature.setStyle(this.lineStyle_);\n            featuresColl.push(feature);\n        }\n        for (i = 0, l = this.parallels_.length; i < l; ++i) {\n            feature = this.featurePool_[poolIndex++];\n            feature.setGeometry(this.parallels_[i]);\n            feature.setStyle(this.lineStyle_);\n            featuresColl.push(feature);\n        }\n    };\n    /**\n     * @param {number} lon Longitude.\n     * @param {number} minLat Minimal latitude.\n     * @param {number} maxLat Maximal latitude.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} index Index.\n     * @return {number} Index.\n     * @private\n     */\n    Graticule.prototype.addMeridian_ = function (lon, minLat, maxLat, squaredTolerance, extent, index) {\n        var lineString = this.getMeridian_(lon, minLat, maxLat, squaredTolerance, index);\n        if (intersects(lineString.getExtent(), extent)) {\n            if (this.meridiansLabels_) {\n                var text = this.lonLabelFormatter_(lon);\n                if (index in this.meridiansLabels_) {\n                    this.meridiansLabels_[index].text = text;\n                }\n                else {\n                    this.meridiansLabels_[index] = {\n                        geom: new Point([]),\n                        text: text,\n                    };\n                }\n            }\n            this.meridians_[index++] = lineString;\n        }\n        return index;\n    };\n    /**\n     * @param {number} lat Latitude.\n     * @param {number} minLon Minimal longitude.\n     * @param {number} maxLon Maximal longitude.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} index Index.\n     * @return {number} Index.\n     * @private\n     */\n    Graticule.prototype.addParallel_ = function (lat, minLon, maxLon, squaredTolerance, extent, index) {\n        var lineString = this.getParallel_(lat, minLon, maxLon, squaredTolerance, index);\n        if (intersects(lineString.getExtent(), extent)) {\n            if (this.parallelsLabels_) {\n                var text = this.latLabelFormatter_(lat);\n                if (index in this.parallelsLabels_) {\n                    this.parallelsLabels_[index].text = text;\n                }\n                else {\n                    this.parallelsLabels_[index] = {\n                        geom: new Point([]),\n                        text: text,\n                    };\n                }\n            }\n            this.parallels_[index++] = lineString;\n        }\n        return index;\n    };\n    /**\n     * @param {import(\"../render/Event.js\").default} event Render event.\n     * @private\n     */\n    Graticule.prototype.drawLabels_ = function (event) {\n        var rotation = event.frameState.viewState.rotation;\n        var extent = event.frameState.extent;\n        var rotationCenter = getCenter(extent);\n        var rotationExtent = extent;\n        if (rotation) {\n            var width = getWidth(extent);\n            var height = getHeight(extent);\n            var cr = Math.abs(Math.cos(rotation));\n            var sr = Math.abs(Math.sin(rotation));\n            var unrotatedWidth = (sr * height - cr * width) / (sr * sr - cr * cr);\n            var unrotatedHeight = (sr * width - cr * height) / (sr * sr - cr * cr);\n            rotationExtent = [\n                rotationCenter[0] - unrotatedWidth / 2,\n                rotationCenter[1] - unrotatedHeight / 2,\n                rotationCenter[0] + unrotatedWidth / 2,\n                rotationCenter[1] + unrotatedHeight / 2,\n            ];\n        }\n        var startWorld = 0;\n        var endWorld = 0;\n        var labelsAtStart = this.latLabelPosition_ < 0.5;\n        var projectionExtent = this.projection_.getExtent();\n        var worldWidth = getWidth(projectionExtent);\n        if (this.getSource().getWrapX() &&\n            this.projection_.canWrapX() &&\n            !containsExtent(projectionExtent, extent)) {\n            startWorld = Math.floor((extent[0] - projectionExtent[0]) / worldWidth);\n            endWorld = Math.ceil((extent[2] - projectionExtent[2]) / worldWidth);\n            var inverted = Math.abs(rotation) > Math.PI / 2;\n            labelsAtStart = labelsAtStart !== inverted;\n        }\n        var vectorContext = getVectorContext(event);\n        for (var world = startWorld; world <= endWorld; ++world) {\n            var poolIndex = this.meridians_.length + this.parallels_.length;\n            var feature = void 0, index = void 0, l = void 0, textPoint = void 0;\n            if (this.meridiansLabels_) {\n                for (index = 0, l = this.meridiansLabels_.length; index < l; ++index) {\n                    var lineString = this.meridians_[index];\n                    if (!rotation && world === 0) {\n                        textPoint = this.getMeridianPoint_(lineString, extent, index);\n                    }\n                    else {\n                        var clone = lineString.clone();\n                        clone.translate(world * worldWidth, 0);\n                        clone.rotate(-rotation, rotationCenter);\n                        textPoint = this.getMeridianPoint_(clone, rotationExtent, index);\n                        textPoint.rotate(rotation, rotationCenter);\n                    }\n                    feature = this.featurePool_[poolIndex++];\n                    feature.setGeometry(textPoint);\n                    feature.set('graticule_label', this.meridiansLabels_[index].text);\n                    vectorContext.drawFeature(feature, this.lonLabelStyle_(feature));\n                }\n            }\n            if (this.parallelsLabels_) {\n                if ((world === startWorld && labelsAtStart) ||\n                    (world === endWorld && !labelsAtStart)) {\n                    for (index = 0, l = this.parallels_.length; index < l; ++index) {\n                        var lineString = this.parallels_[index];\n                        if (!rotation && world === 0) {\n                            textPoint = this.getParallelPoint_(lineString, extent, index);\n                        }\n                        else {\n                            var clone = lineString.clone();\n                            clone.translate(world * worldWidth, 0);\n                            clone.rotate(-rotation, rotationCenter);\n                            textPoint = this.getParallelPoint_(clone, rotationExtent, index);\n                            textPoint.rotate(rotation, rotationCenter);\n                        }\n                        feature = this.featurePool_[poolIndex++];\n                        feature.setGeometry(textPoint);\n                        feature.set('graticule_label', this.parallelsLabels_[index].text);\n                        vectorContext.drawFeature(feature, this.latLabelStyle_(feature));\n                    }\n                }\n            }\n        }\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {import(\"../coordinate.js\").Coordinate} center Center.\n     * @param {number} resolution Resolution.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @private\n     */\n    Graticule.prototype.createGraticule_ = function (extent, center, resolution, squaredTolerance) {\n        var interval = this.getInterval_(resolution);\n        if (interval == -1) {\n            this.meridians_.length = 0;\n            this.parallels_.length = 0;\n            if (this.meridiansLabels_) {\n                this.meridiansLabels_.length = 0;\n            }\n            if (this.parallelsLabels_) {\n                this.parallelsLabels_.length = 0;\n            }\n            return;\n        }\n        var wrapX = false;\n        var projectionExtent = this.projection_.getExtent();\n        var worldWidth = getWidth(projectionExtent);\n        if (this.getSource().getWrapX() &&\n            this.projection_.canWrapX() &&\n            !containsExtent(projectionExtent, extent)) {\n            if (getWidth(extent) >= worldWidth) {\n                extent[0] = projectionExtent[0];\n                extent[2] = projectionExtent[2];\n            }\n            else {\n                wrapX = true;\n            }\n        }\n        // Constrain the center to fit into the extent available to the graticule\n        var validCenterP = [\n            clamp(center[0], this.minX_, this.maxX_),\n            clamp(center[1], this.minY_, this.maxY_),\n        ];\n        // Transform the center to lon lat\n        // Some projections may have a void area at the poles\n        // so replace any NaN latitudes with the min or max value closest to a pole\n        var centerLonLat = this.toLonLatTransform_(validCenterP);\n        if (isNaN(centerLonLat[1])) {\n            centerLonLat[1] =\n                Math.abs(this.maxLat_) >= Math.abs(this.minLat_)\n                    ? this.maxLat_\n                    : this.minLat_;\n        }\n        var centerLon = clamp(centerLonLat[0], this.minLon_, this.maxLon_);\n        var centerLat = clamp(centerLonLat[1], this.minLat_, this.maxLat_);\n        var maxLines = this.maxLines_;\n        var cnt, idx, lat, lon;\n        // Limit the extent to fit into the extent available to the graticule\n        var validExtentP = extent;\n        if (!wrapX) {\n            validExtentP = [\n                clamp(extent[0], this.minX_, this.maxX_),\n                clamp(extent[1], this.minY_, this.maxY_),\n                clamp(extent[2], this.minX_, this.maxX_),\n                clamp(extent[3], this.minY_, this.maxY_),\n            ];\n        }\n        // Transform the extent to get the lon lat ranges for the edges of the extent\n        var validExtent = applyTransform(validExtentP, this.toLonLatTransform_, undefined, 8);\n        var maxLat = validExtent[3];\n        var maxLon = validExtent[2];\n        var minLat = validExtent[1];\n        var minLon = validExtent[0];\n        if (!wrapX) {\n            // Check if extremities of the world extent lie inside the extent\n            // (for example the pole in a polar projection)\n            // and extend the extent as appropriate\n            if (containsCoordinate(validExtentP, this.bottomLeft_)) {\n                minLon = this.minLon_;\n                minLat = this.minLat_;\n            }\n            if (containsCoordinate(validExtentP, this.bottomRight_)) {\n                maxLon = this.maxLon_;\n                minLat = this.minLat_;\n            }\n            if (containsCoordinate(validExtentP, this.topLeft_)) {\n                minLon = this.minLon_;\n                maxLat = this.maxLat_;\n            }\n            if (containsCoordinate(validExtentP, this.topRight_)) {\n                maxLon = this.maxLon_;\n                maxLat = this.maxLat_;\n            }\n            // The transformed center may also extend the lon lat ranges used for rendering\n            maxLat = clamp(maxLat, centerLat, this.maxLat_);\n            maxLon = clamp(maxLon, centerLon, this.maxLon_);\n            minLat = clamp(minLat, this.minLat_, centerLat);\n            minLon = clamp(minLon, this.minLon_, centerLon);\n        }\n        // Create meridians\n        centerLon = Math.floor(centerLon / interval) * interval;\n        lon = clamp(centerLon, this.minLon_, this.maxLon_);\n        idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, 0);\n        cnt = 0;\n        if (wrapX) {\n            while ((lon -= interval) >= minLon && cnt++ < maxLines) {\n                idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx);\n            }\n        }\n        else {\n            while (lon != this.minLon_ && cnt++ < maxLines) {\n                lon = Math.max(lon - interval, this.minLon_);\n                idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx);\n            }\n        }\n        lon = clamp(centerLon, this.minLon_, this.maxLon_);\n        cnt = 0;\n        if (wrapX) {\n            while ((lon += interval) <= maxLon && cnt++ < maxLines) {\n                idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx);\n            }\n        }\n        else {\n            while (lon != this.maxLon_ && cnt++ < maxLines) {\n                lon = Math.min(lon + interval, this.maxLon_);\n                idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx);\n            }\n        }\n        this.meridians_.length = idx;\n        if (this.meridiansLabels_) {\n            this.meridiansLabels_.length = idx;\n        }\n        // Create parallels\n        centerLat = Math.floor(centerLat / interval) * interval;\n        lat = clamp(centerLat, this.minLat_, this.maxLat_);\n        idx = this.addParallel_(lat, minLon, maxLon, squaredTolerance, extent, 0);\n        cnt = 0;\n        while (lat != this.minLat_ && cnt++ < maxLines) {\n            lat = Math.max(lat - interval, this.minLat_);\n            idx = this.addParallel_(lat, minLon, maxLon, squaredTolerance, extent, idx);\n        }\n        lat = clamp(centerLat, this.minLat_, this.maxLat_);\n        cnt = 0;\n        while (lat != this.maxLat_ && cnt++ < maxLines) {\n            lat = Math.min(lat + interval, this.maxLat_);\n            idx = this.addParallel_(lat, minLon, maxLon, squaredTolerance, extent, idx);\n        }\n        this.parallels_.length = idx;\n        if (this.parallelsLabels_) {\n            this.parallelsLabels_.length = idx;\n        }\n    };\n    /**\n     * @param {number} resolution Resolution.\n     * @return {number} The interval in degrees.\n     * @private\n     */\n    Graticule.prototype.getInterval_ = function (resolution) {\n        var centerLon = this.projectionCenterLonLat_[0];\n        var centerLat = this.projectionCenterLonLat_[1];\n        var interval = -1;\n        var target = Math.pow(this.targetSize_ * resolution, 2);\n        /** @type {Array<number>} **/\n        var p1 = [];\n        /** @type {Array<number>} **/\n        var p2 = [];\n        for (var i = 0, ii = this.intervals_.length; i < ii; ++i) {\n            var delta = clamp(this.intervals_[i] / 2, 0, 90);\n            // Don't attempt to transform latitudes beyond the poles!\n            var clampedLat = clamp(centerLat, -90 + delta, 90 - delta);\n            p1[0] = centerLon - delta;\n            p1[1] = clampedLat - delta;\n            p2[0] = centerLon + delta;\n            p2[1] = clampedLat + delta;\n            this.fromLonLatTransform_(p1, p1);\n            this.fromLonLatTransform_(p2, p2);\n            var dist = Math.pow(p2[0] - p1[0], 2) + Math.pow(p2[1] - p1[1], 2);\n            if (dist <= target) {\n                break;\n            }\n            interval = this.intervals_[i];\n        }\n        return interval;\n    };\n    /**\n     * @param {number} lon Longitude.\n     * @param {number} minLat Minimal latitude.\n     * @param {number} maxLat Maximal latitude.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {LineString} The meridian line string.\n     * @param {number} index Index.\n     * @private\n     */\n    Graticule.prototype.getMeridian_ = function (lon, minLat, maxLat, squaredTolerance, index) {\n        var flatCoordinates = meridian(lon, minLat, maxLat, this.projection_, squaredTolerance);\n        var lineString = this.meridians_[index];\n        if (!lineString) {\n            lineString = new LineString(flatCoordinates, GeometryLayout.XY);\n            this.meridians_[index] = lineString;\n        }\n        else {\n            lineString.setFlatCoordinates(GeometryLayout.XY, flatCoordinates);\n            lineString.changed();\n        }\n        return lineString;\n    };\n    /**\n     * @param {LineString} lineString Meridian\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} index Index.\n     * @return {Point} Meridian point.\n     * @private\n     */\n    Graticule.prototype.getMeridianPoint_ = function (lineString, extent, index) {\n        var flatCoordinates = lineString.getFlatCoordinates();\n        var bottom = 1;\n        var top = flatCoordinates.length - 1;\n        if (flatCoordinates[bottom] > flatCoordinates[top]) {\n            bottom = top;\n            top = 1;\n        }\n        var clampedBottom = Math.max(extent[1], flatCoordinates[bottom]);\n        var clampedTop = Math.min(extent[3], flatCoordinates[top]);\n        var lat = clamp(extent[1] + Math.abs(extent[1] - extent[3]) * this.lonLabelPosition_, clampedBottom, clampedTop);\n        var coordinate0 = flatCoordinates[bottom - 1] +\n            ((flatCoordinates[top - 1] - flatCoordinates[bottom - 1]) *\n                (lat - flatCoordinates[bottom])) /\n                (flatCoordinates[top] - flatCoordinates[bottom]);\n        var coordinate = [coordinate0, lat];\n        var point = this.meridiansLabels_[index].geom;\n        point.setCoordinates(coordinate);\n        return point;\n    };\n    /**\n     * Get the list of meridians.  Meridians are lines of equal longitude.\n     * @return {Array<LineString>} The meridians.\n     * @api\n     */\n    Graticule.prototype.getMeridians = function () {\n        return this.meridians_;\n    };\n    /**\n     * @param {number} lat Latitude.\n     * @param {number} minLon Minimal longitude.\n     * @param {number} maxLon Maximal longitude.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @return {LineString} The parallel line string.\n     * @param {number} index Index.\n     * @private\n     */\n    Graticule.prototype.getParallel_ = function (lat, minLon, maxLon, squaredTolerance, index) {\n        var flatCoordinates = parallel(lat, minLon, maxLon, this.projection_, squaredTolerance);\n        var lineString = this.parallels_[index];\n        if (!lineString) {\n            lineString = new LineString(flatCoordinates, GeometryLayout.XY);\n        }\n        else {\n            lineString.setFlatCoordinates(GeometryLayout.XY, flatCoordinates);\n            lineString.changed();\n        }\n        return lineString;\n    };\n    /**\n     * @param {LineString} lineString Parallels.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} index Index.\n     * @return {Point} Parallel point.\n     * @private\n     */\n    Graticule.prototype.getParallelPoint_ = function (lineString, extent, index) {\n        var flatCoordinates = lineString.getFlatCoordinates();\n        var left = 0;\n        var right = flatCoordinates.length - 2;\n        if (flatCoordinates[left] > flatCoordinates[right]) {\n            left = right;\n            right = 0;\n        }\n        var clampedLeft = Math.max(extent[0], flatCoordinates[left]);\n        var clampedRight = Math.min(extent[2], flatCoordinates[right]);\n        var lon = clamp(extent[0] + Math.abs(extent[0] - extent[2]) * this.latLabelPosition_, clampedLeft, clampedRight);\n        var coordinate1 = flatCoordinates[left + 1] +\n            ((flatCoordinates[right + 1] - flatCoordinates[left + 1]) *\n                (lon - flatCoordinates[left])) /\n                (flatCoordinates[right] - flatCoordinates[left]);\n        var coordinate = [lon, coordinate1];\n        var point = this.parallelsLabels_[index].geom;\n        point.setCoordinates(coordinate);\n        return point;\n    };\n    /**\n     * Get the list of parallels.  Parallels are lines of equal latitude.\n     * @return {Array<LineString>} The parallels.\n     * @api\n     */\n    Graticule.prototype.getParallels = function () {\n        return this.parallels_;\n    };\n    /**\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @private\n     */\n    Graticule.prototype.updateProjectionInfo_ = function (projection) {\n        var epsg4326Projection = getProjection('EPSG:4326');\n        var worldExtent = projection.getWorldExtent();\n        this.maxLat_ = worldExtent[3];\n        this.maxLon_ = worldExtent[2];\n        this.minLat_ = worldExtent[1];\n        this.minLon_ = worldExtent[0];\n        // If the world extent crosses the dateline define a custom transform to\n        // return longitudes which wrap the dateline\n        var toLonLatTransform = getTransform(projection, epsg4326Projection);\n        if (this.minLon_ < this.maxLon_) {\n            this.toLonLatTransform_ = toLonLatTransform;\n        }\n        else {\n            var split_1 = this.minLon_ + this.maxLon_ / 2;\n            this.maxLon_ += 360;\n            this.toLonLatTransform_ = function (coordinates, opt_output, opt_dimension) {\n                var dimension = opt_dimension || 2;\n                var lonLatCoordinates = toLonLatTransform(coordinates, opt_output, dimension);\n                for (var i = 0, l = lonLatCoordinates.length; i < l; i += dimension) {\n                    if (lonLatCoordinates[i] < split_1) {\n                        lonLatCoordinates[i] += 360;\n                    }\n                }\n                return lonLatCoordinates;\n            };\n        }\n        // Transform the extent to get the limits of the view projection extent\n        // which should be available to the graticule\n        this.fromLonLatTransform_ = getTransform(epsg4326Projection, projection);\n        var worldExtentP = applyTransform([this.minLon_, this.minLat_, this.maxLon_, this.maxLat_], this.fromLonLatTransform_, undefined, 8);\n        this.minX_ = worldExtentP[0];\n        this.maxX_ = worldExtentP[2];\n        this.minY_ = worldExtentP[1];\n        this.maxY_ = worldExtentP[3];\n        // Determine the view projection coordinates of the extremities of the world extent\n        // as these may lie inside a view extent (for example the pole in a polar projection)\n        this.bottomLeft_ = this.fromLonLatTransform_([this.minLon_, this.minLat_]);\n        this.bottomRight_ = this.fromLonLatTransform_([this.maxLon_, this.minLat_]);\n        this.topLeft_ = this.fromLonLatTransform_([this.minLon_, this.maxLat_]);\n        this.topRight_ = this.fromLonLatTransform_([this.maxLon_, this.maxLat_]);\n        // Transform the projection center to lon lat\n        // Some projections may have a void area at the poles\n        // so replace any NaN latitudes with the min or max value closest to a pole\n        this.projectionCenterLonLat_ = this.toLonLatTransform_(getCenter(projection.getExtent()));\n        if (isNaN(this.projectionCenterLonLat_[1])) {\n            this.projectionCenterLonLat_[1] =\n                Math.abs(this.maxLat_) >= Math.abs(this.minLat_)\n                    ? this.maxLat_\n                    : this.minLat_;\n        }\n        this.projection_ = projection;\n    };\n    return Graticule;\n}(VectorLayer));\nexport default Graticule;\n//# sourceMappingURL=Graticule.js.map","/**\n * @module ol/webgl\n */\n/**\n * Constants taken from goog.webgl\n */\n/**\n * Used by {@link module:ol/webgl/Helper~WebGLHelper} for buffers containing vertices data, such as\n * position, color, texture coordinate, etc. These vertices are then referenced by an index buffer\n * to be drawn on screen (see {@link module:ol/webgl.ELEMENT_ARRAY_BUFFER}).\n * @const\n * @type {number}\n * @api\n */\nexport var ARRAY_BUFFER = 0x8892;\n/**\n * Used by {@link module:ol/webgl/Helper~WebGLHelper} for buffers containing indices data.\n * Index buffers are essentially lists of references to vertices defined in a vertex buffer\n * (see {@link module:ol/webgl.ARRAY_BUFFER}), and define the primitives (triangles) to be drawn.\n * @const\n * @type {number}\n * @api\n */\nexport var ELEMENT_ARRAY_BUFFER = 0x8893;\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport var STREAM_DRAW = 0x88e0;\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport var STATIC_DRAW = 0x88e4;\n/**\n * Used by {link module:ol/webgl/Buffer~WebGLArrayBuffer}.\n * @const\n * @type {number}\n * @api\n */\nexport var DYNAMIC_DRAW = 0x88e8;\n/**\n * @const\n * @type {number}\n */\nexport var UNSIGNED_BYTE = 0x1401;\n/**\n * @const\n * @type {number}\n */\nexport var UNSIGNED_SHORT = 0x1403;\n/**\n * @const\n * @type {number}\n */\nexport var UNSIGNED_INT = 0x1405;\n/**\n * @const\n * @type {number}\n */\nexport var FLOAT = 0x1406;\n/** end of goog.webgl constants\n */\n/**\n * @const\n * @type {Array<string>}\n */\nvar CONTEXT_IDS = ['experimental-webgl', 'webgl', 'webkit-3d', 'moz-webgl'];\n/**\n * @param {HTMLCanvasElement} canvas Canvas.\n * @param {Object} [opt_attributes] Attributes.\n * @return {WebGLRenderingContext} WebGL rendering context.\n */\nexport function getContext(canvas, opt_attributes) {\n    var ii = CONTEXT_IDS.length;\n    for (var i = 0; i < ii; ++i) {\n        try {\n            var context = canvas.getContext(CONTEXT_IDS[i], opt_attributes);\n            if (context) {\n                return /** @type {!WebGLRenderingContext} */ (context);\n            }\n        }\n        catch (e) {\n            // pass\n        }\n    }\n    return null;\n}\n/**\n * @type {Array<string>}\n */\nvar supportedExtensions;\n/**\n * @return {Array<string>} List of supported WebGL extensions.\n */\nexport function getSupportedExtensions() {\n    if (!supportedExtensions) {\n        var canvas = document.createElement('canvas');\n        var gl = getContext(canvas);\n        if (gl) {\n            supportedExtensions = gl.getSupportedExtensions();\n        }\n    }\n    return supportedExtensions;\n}\n//# sourceMappingURL=webgl.js.map","/**\n * @module ol/render\n */\nimport CanvasImmediateRenderer from './render/canvas/Immediate.js';\nimport { DEVICE_PIXEL_RATIO } from './has.js';\nimport { apply as applyTransform, create as createTransform, multiply as multiplyTransform, scale as scaleTransform, } from './transform.js';\nimport { getSquaredTolerance } from './renderer/vector.js';\nimport { getTransformFromProjections, getUserProjection } from './proj.js';\n/**\n * @typedef {Object} State\n * @property {CanvasRenderingContext2D} context Canvas context that the layer is being rendered to.\n * @property {import(\"./Feature.js\").FeatureLike} feature Feature.\n * @property {import(\"./geom/SimpleGeometry.js\").default} geometry Geometry.\n * @property {number} pixelRatio Pixel ratio used by the layer renderer.\n * @property {number} resolution Resolution that the render batch was created and optimized for.\n * This is not the view's resolution that is being rendered.\n * @property {number} rotation Rotation of the rendered layer in radians.\n */\n/**\n * A function to be used when sorting features before rendering.\n * It takes two instances of {@link module:ol/Feature} or\n * {@link module:ol/render/Feature} and returns a `{number}`.\n *\n * @typedef {function(import(\"./Feature.js\").FeatureLike, import(\"./Feature.js\").FeatureLike):number} OrderFunction\n */\n/**\n * @typedef {Object} ToContextOptions\n * @property {import(\"./size.js\").Size} [size] Desired size of the canvas in css\n * pixels. When provided, both canvas and css size will be set according to the\n * `pixelRatio`. If not provided, the current canvas and css sizes will not be\n * altered.\n * @property {number} [pixelRatio=window.devicePixelRatio] Pixel ratio (canvas\n * pixel to css pixel ratio) for the canvas.\n */\n/**\n * Binds a Canvas Immediate API to a canvas context, to allow drawing geometries\n * to the context's canvas.\n *\n * The units for geometry coordinates are css pixels relative to the top left\n * corner of the canvas element.\n * ```js\n * import {toContext} from 'ol/render';\n * import Fill from 'ol/style/Fill';\n * import Polygon from 'ol/geom/Polygon';\n *\n * var canvas = document.createElement('canvas');\n * var render = toContext(canvas.getContext('2d'),\n *     { size: [100, 100] });\n * render.setFillStrokeStyle(new Fill({ color: blue }));\n * render.drawPolygon(\n *     new Polygon([[[0, 0], [100, 100], [100, 0], [0, 0]]]));\n * ```\n *\n * @param {CanvasRenderingContext2D} context Canvas context.\n * @param {ToContextOptions} [opt_options] Options.\n * @return {CanvasImmediateRenderer} Canvas Immediate.\n * @api\n */\nexport function toContext(context, opt_options) {\n    var canvas = context.canvas;\n    var options = opt_options ? opt_options : {};\n    var pixelRatio = options.pixelRatio || DEVICE_PIXEL_RATIO;\n    var size = options.size;\n    if (size) {\n        canvas.width = size[0] * pixelRatio;\n        canvas.height = size[1] * pixelRatio;\n        canvas.style.width = size[0] + 'px';\n        canvas.style.height = size[1] + 'px';\n    }\n    var extent = [0, 0, canvas.width, canvas.height];\n    var transform = scaleTransform(createTransform(), pixelRatio, pixelRatio);\n    return new CanvasImmediateRenderer(context, pixelRatio, extent, transform, 0);\n}\n/**\n * Gets a vector context for drawing to the event's canvas.\n * @param {import(\"./render/Event.js\").default} event Render event.\n * @return {CanvasImmediateRenderer} Vector context.\n * @api\n */\nexport function getVectorContext(event) {\n    // canvas may be at a different pixel ratio than frameState.pixelRatio\n    var canvasPixelRatio = event.inversePixelTransform[0];\n    var frameState = event.frameState;\n    var transform = multiplyTransform(event.inversePixelTransform.slice(), frameState.coordinateToPixelTransform);\n    var squaredTolerance = getSquaredTolerance(frameState.viewState.resolution, canvasPixelRatio);\n    var userTransform;\n    var userProjection = getUserProjection();\n    if (userProjection) {\n        userTransform = getTransformFromProjections(userProjection, frameState.viewState.projection);\n    }\n    return new CanvasImmediateRenderer(event.context, canvasPixelRatio, frameState.extent, transform, frameState.viewState.rotation, squaredTolerance, userTransform);\n}\n/**\n * Gets the pixel of the event's canvas context from the map viewport's CSS pixel.\n * @param {import(\"./render/Event.js\").default} event Render event.\n * @param {import(\"./pixel.js\").Pixel} pixel CSS pixel relative to the top-left\n * corner of the map viewport.\n * @return {import(\"./pixel.js\").Pixel} Pixel on the event's canvas context.\n * @api\n */\nexport function getRenderPixel(event, pixel) {\n    var result = pixel.slice(0);\n    applyTransform(event.inversePixelTransform.slice(), result);\n    return result;\n}\n//# sourceMappingURL=render.js.map","/**\n * @module ol/webgl/Buffer\n */\nimport { ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER } from '../webgl.js';\nimport { DYNAMIC_DRAW, STATIC_DRAW, STREAM_DRAW } from '../webgl.js';\nimport { assert } from '../asserts.js';\n/**\n * Used to describe the intended usage for the data: `STATIC_DRAW`, `STREAM_DRAW`\n * or `DYNAMIC_DRAW`.\n * @enum {number}\n */\nexport var BufferUsage = {\n    STATIC_DRAW: STATIC_DRAW,\n    STREAM_DRAW: STREAM_DRAW,\n    DYNAMIC_DRAW: DYNAMIC_DRAW,\n};\n/**\n * @classdesc\n * Object used to store an array of data as well as usage information for that data.\n * Stores typed arrays internally, either Float32Array or Uint16/32Array depending on\n * the buffer type (ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER) and available extensions.\n *\n * To populate the array, you can either use:\n * * A size using `#ofSize(buffer)`\n * * An `ArrayBuffer` object using `#fromArrayBuffer(buffer)`\n * * A plain array using `#fromArray(array)`\n *\n * Note:\n * See the documentation of [WebGLRenderingContext.bufferData](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bufferData)\n * for more info on buffer usage.\n * @api\n */\nvar WebGLArrayBuffer = /** @class */ (function () {\n    /**\n     * @param {number} type Buffer type, either ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.\n     * @param {number} [opt_usage] Intended usage, either `STATIC_DRAW`, `STREAM_DRAW` or `DYNAMIC_DRAW`.\n     * Default is `DYNAMIC_DRAW`.\n     */\n    function WebGLArrayBuffer(type, opt_usage) {\n        /**\n         * @private\n         * @type {Float32Array|Uint32Array}\n         */\n        this.array = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        this.type = type;\n        assert(type === ARRAY_BUFFER || type === ELEMENT_ARRAY_BUFFER, 62);\n        /**\n         * @private\n         * @type {number}\n         */\n        this.usage = opt_usage !== undefined ? opt_usage : BufferUsage.STATIC_DRAW;\n    }\n    /**\n     * Populates the buffer with an array of the given size (all values will be zeroes).\n     * @param {number} size Array size\n     */\n    WebGLArrayBuffer.prototype.ofSize = function (size) {\n        this.array = new (getArrayClassForType(this.type))(size);\n    };\n    /**\n     * Populates the buffer with an array of the given size (all values will be zeroes).\n     * @param {Array<number>} array Numerical array\n     */\n    WebGLArrayBuffer.prototype.fromArray = function (array) {\n        this.array = getArrayClassForType(this.type).from(array);\n    };\n    /**\n     * Populates the buffer with a raw binary array buffer.\n     * @param {ArrayBuffer} buffer Raw binary buffer to populate the array with. Note that this buffer must have been\n     * initialized for the same typed array class.\n     */\n    WebGLArrayBuffer.prototype.fromArrayBuffer = function (buffer) {\n        this.array = new (getArrayClassForType(this.type))(buffer);\n    };\n    /**\n     * @return {number} Buffer type.\n     */\n    WebGLArrayBuffer.prototype.getType = function () {\n        return this.type;\n    };\n    /**\n     * Will return null if the buffer was not initialized\n     * @return {Float32Array|Uint32Array} Array.\n     */\n    WebGLArrayBuffer.prototype.getArray = function () {\n        return this.array;\n    };\n    /**\n     * @return {number} Usage.\n     */\n    WebGLArrayBuffer.prototype.getUsage = function () {\n        return this.usage;\n    };\n    /**\n     * Will return 0 if the buffer is not initialized\n     * @return {number} Array size\n     */\n    WebGLArrayBuffer.prototype.getSize = function () {\n        return this.array ? this.array.length : 0;\n    };\n    return WebGLArrayBuffer;\n}());\n/**\n * Returns a typed array constructor based on the given buffer type\n * @param {number} type Buffer type, either ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.\n * @return {Float32ArrayConstructor|Uint32ArrayConstructor} The typed array class to use for this buffer.\n */\nexport function getArrayClassForType(type) {\n    switch (type) {\n        case ARRAY_BUFFER:\n            return Float32Array;\n        case ELEMENT_ARRAY_BUFFER:\n            return Uint32Array;\n        default:\n            return Float32Array;\n    }\n}\nexport default WebGLArrayBuffer;\n//# sourceMappingURL=Buffer.js.map","/**\n * @module ol/webgl/ContextEventType\n */\n/**\n * @enum {string}\n */\nexport default {\n    LOST: 'webglcontextlost',\n    RESTORED: 'webglcontextrestored',\n};\n//# sourceMappingURL=ContextEventType.js.map","/**\n * @module ol/webgl/PostProcessingPass\n */\nvar DEFAULT_VERTEX_SHADER = \"\\n  precision mediump float;\\n  \\n  attribute vec2 a_position;\\n  varying vec2 v_texCoord;\\n  varying vec2 v_screenCoord;\\n  \\n  uniform vec2 u_screenSize;\\n   \\n  void main() {\\n    v_texCoord = a_position * 0.5 + 0.5;\\n    v_screenCoord = v_texCoord * u_screenSize;\\n    gl_Position = vec4(a_position, 0.0, 1.0);\\n  }\\n\";\nvar DEFAULT_FRAGMENT_SHADER = \"\\n  precision mediump float;\\n   \\n  uniform sampler2D u_image;\\n   \\n  varying vec2 v_texCoord;\\n   \\n  void main() {\\n    gl_FragColor = texture2D(u_image, v_texCoord);\\n  }\\n\";\n/**\n * @typedef {Object} Options\n * @property {WebGLRenderingContext} webGlContext WebGL context; mandatory.\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas that will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object<string,import(\"./Helper\").UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n/**\n * @typedef {Object} UniformInternalDescription\n * @property {import(\"./Helper\").UniformValue} value Value\n * @property {number} location Location\n * @property {WebGLTexture} [texture] Texture\n * @private\n */\n/**\n * @classdesc\n * This class is used to define Post Processing passes with custom shaders and uniforms.\n * This is used internally by {@link module:ol/webgl/Helper~WebGLHelper}.\n *\n * Please note that the final output on the DOM canvas is expected to have premultiplied alpha, which means that\n * a pixel which is 100% red with an opacity of 50% must have a color of (r=0.5, g=0, b=0, a=0.5).\n * Failing to provide pixel colors with premultiplied alpha will result in render anomalies.\n *\n * The default post-processing pass does *not* multiply color values with alpha value, it expects color values to be\n * premultiplied.\n *\n * Default shaders are shown hereafter:\n *\n * * Vertex shader:\n *\n *   ```\n *   precision mediump float;\n *\n *   attribute vec2 a_position;\n *   varying vec2 v_texCoord;\n *   varying vec2 v_screenCoord;\n *\n *   uniform vec2 u_screenSize;\n *\n *   void main() {\n *     v_texCoord = a_position * 0.5 + 0.5;\n *     v_screenCoord = v_texCoord * u_screenSize;\n *     gl_Position = vec4(a_position, 0.0, 1.0);\n *   }\n *   ```\n *\n * * Fragment shader:\n *\n *   ```\n *   precision mediump float;\n *\n *   uniform sampler2D u_image;\n *\n *   varying vec2 v_texCoord;\n *\n *   void main() {\n *     gl_FragColor = texture2D(u_image, v_texCoord);\n *   }\n *   ```\n *\n * @api\n */\nvar WebGLPostProcessingPass = /** @class */ (function () {\n    /**\n     * @param {Options} options Options.\n     */\n    function WebGLPostProcessingPass(options) {\n        this.gl_ = options.webGlContext;\n        var gl = this.gl_;\n        this.scaleRatio_ = options.scaleRatio || 1;\n        this.renderTargetTexture_ = gl.createTexture();\n        this.renderTargetTextureSize_ = null;\n        this.frameBuffer_ = gl.createFramebuffer();\n        // compile the program for the frame buffer\n        // TODO: make compilation errors show up\n        var vertexShader = gl.createShader(gl.VERTEX_SHADER);\n        gl.shaderSource(vertexShader, options.vertexShader || DEFAULT_VERTEX_SHADER);\n        gl.compileShader(vertexShader);\n        var fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);\n        gl.shaderSource(fragmentShader, options.fragmentShader || DEFAULT_FRAGMENT_SHADER);\n        gl.compileShader(fragmentShader);\n        this.renderTargetProgram_ = gl.createProgram();\n        gl.attachShader(this.renderTargetProgram_, vertexShader);\n        gl.attachShader(this.renderTargetProgram_, fragmentShader);\n        gl.linkProgram(this.renderTargetProgram_);\n        // bind the vertices buffer for the frame buffer\n        this.renderTargetVerticesBuffer_ = gl.createBuffer();\n        var verticesArray = [-1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1];\n        gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);\n        gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(verticesArray), gl.STATIC_DRAW);\n        this.renderTargetAttribLocation_ = gl.getAttribLocation(this.renderTargetProgram_, 'a_position');\n        this.renderTargetUniformLocation_ = gl.getUniformLocation(this.renderTargetProgram_, 'u_screenSize');\n        this.renderTargetTextureLocation_ = gl.getUniformLocation(this.renderTargetProgram_, 'u_image');\n        /**\n         * Holds info about custom uniforms used in the post processing pass\n         * @type {Array<UniformInternalDescription>}\n         * @private\n         */\n        this.uniforms_ = [];\n        options.uniforms &&\n            Object.keys(options.uniforms).forEach(function (name) {\n                this.uniforms_.push({\n                    value: options.uniforms[name],\n                    location: gl.getUniformLocation(this.renderTargetProgram_, name),\n                });\n            }.bind(this));\n    }\n    /**\n     * Get the WebGL rendering context\n     * @return {WebGLRenderingContext} The rendering context.\n     * @api\n     */\n    WebGLPostProcessingPass.prototype.getGL = function () {\n        return this.gl_;\n    };\n    /**\n     * Initialize the render target texture of the post process, make sure it is at the\n     * right size and bind it as a render target for the next draw calls.\n     * The last step to be initialized will be the one where the primitives are rendered.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n     * @api\n     */\n    WebGLPostProcessingPass.prototype.init = function (frameState) {\n        var gl = this.getGL();\n        var textureSize = [\n            gl.drawingBufferWidth * this.scaleRatio_,\n            gl.drawingBufferHeight * this.scaleRatio_,\n        ];\n        // rendering goes to my buffer\n        gl.bindFramebuffer(gl.FRAMEBUFFER, this.getFrameBuffer());\n        gl.viewport(0, 0, textureSize[0], textureSize[1]);\n        // if size has changed: adjust canvas & render target texture\n        if (!this.renderTargetTextureSize_ ||\n            this.renderTargetTextureSize_[0] !== textureSize[0] ||\n            this.renderTargetTextureSize_[1] !== textureSize[1]) {\n            this.renderTargetTextureSize_ = textureSize;\n            // create a new texture\n            var level = 0;\n            var internalFormat = gl.RGBA;\n            var border = 0;\n            var format = gl.RGBA;\n            var type = gl.UNSIGNED_BYTE;\n            var data = null;\n            gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);\n            gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, textureSize[0], textureSize[1], border, format, type, data);\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n            gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n            // bind the texture to the framebuffer\n            gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.renderTargetTexture_, 0);\n        }\n    };\n    /**\n     * Render to the next postprocessing pass (or to the canvas if final pass).\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n     * @param {WebGLPostProcessingPass} [nextPass] Next pass, optional\n     * @api\n     */\n    WebGLPostProcessingPass.prototype.apply = function (frameState, nextPass) {\n        var gl = this.getGL();\n        var size = frameState.size;\n        gl.bindFramebuffer(gl.FRAMEBUFFER, nextPass ? nextPass.getFrameBuffer() : null);\n        gl.activeTexture(gl.TEXTURE0);\n        gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);\n        // render the frame buffer to the canvas\n        gl.clearColor(0.0, 0.0, 0.0, 0.0);\n        gl.clear(gl.COLOR_BUFFER_BIT);\n        gl.enable(gl.BLEND);\n        gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n        gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n        gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);\n        gl.useProgram(this.renderTargetProgram_);\n        gl.enableVertexAttribArray(this.renderTargetAttribLocation_);\n        gl.vertexAttribPointer(this.renderTargetAttribLocation_, 2, gl.FLOAT, false, 0, 0);\n        gl.uniform2f(this.renderTargetUniformLocation_, size[0], size[1]);\n        gl.uniform1i(this.renderTargetTextureLocation_, 0);\n        this.applyUniforms(frameState);\n        gl.drawArrays(gl.TRIANGLES, 0, 6);\n    };\n    /**\n     * @return {WebGLFramebuffer} Frame buffer\n     * @api\n     */\n    WebGLPostProcessingPass.prototype.getFrameBuffer = function () {\n        return this.frameBuffer_;\n    };\n    /**\n     * Sets the custom uniforms based on what was given in the constructor.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @private\n     */\n    WebGLPostProcessingPass.prototype.applyUniforms = function (frameState) {\n        var gl = this.getGL();\n        var value;\n        var textureSlot = 1;\n        this.uniforms_.forEach(function (uniform) {\n            value =\n                typeof uniform.value === 'function'\n                    ? uniform.value(frameState)\n                    : uniform.value;\n            // apply value based on type\n            if (value instanceof HTMLCanvasElement || value instanceof ImageData) {\n                // create a texture & put data\n                if (!uniform.texture) {\n                    uniform.texture = gl.createTexture();\n                }\n                gl.activeTexture(gl[\"TEXTURE\" + textureSlot]);\n                gl.bindTexture(gl.TEXTURE_2D, uniform.texture);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n                if (value instanceof ImageData) {\n                    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, value.width, value.height, 0, gl.UNSIGNED_BYTE, new Uint8Array(value.data));\n                }\n                else {\n                    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, value);\n                }\n                // fill texture slots\n                gl.uniform1i(uniform.location, textureSlot++);\n            }\n            else if (Array.isArray(value)) {\n                switch (value.length) {\n                    case 2:\n                        gl.uniform2f(uniform.location, value[0], value[1]);\n                        return;\n                    case 3:\n                        gl.uniform3f(uniform.location, value[0], value[1], value[2]);\n                        return;\n                    case 4:\n                        gl.uniform4f(uniform.location, value[0], value[1], value[2], value[3]);\n                        return;\n                    default:\n                        return;\n                }\n            }\n            else if (typeof value === 'number') {\n                gl.uniform1f(uniform.location, value);\n            }\n        });\n    };\n    return WebGLPostProcessingPass;\n}());\nexport default WebGLPostProcessingPass;\n//# sourceMappingURL=PostProcessingPass.js.map","/**\n * @module ol/vec/mat4\n */\n/**\n * @return {Array<number>} \"4x4 matrix representing a 3D identity transform.\"\n */\nexport function create() {\n    return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n/**\n * @param {Array<number>} mat4 Flattened 4x4 matrix receiving the result.\n * @param {import(\"../transform.js\").Transform} transform Transformation matrix.\n * @return {Array<number>} \"2D transformation matrix as flattened 4x4 matrix.\"\n */\nexport function fromTransform(mat4, transform) {\n    mat4[0] = transform[0];\n    mat4[1] = transform[1];\n    mat4[4] = transform[2];\n    mat4[5] = transform[3];\n    mat4[12] = transform[4];\n    mat4[13] = transform[5];\n    return mat4;\n}\n//# sourceMappingURL=mat4.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/webgl/Helper\n */\nimport ContextEventType from '../webgl/ContextEventType.js';\nimport Disposable from '../Disposable.js';\nimport WebGLPostProcessingPass from './PostProcessingPass.js';\nimport { FLOAT, UNSIGNED_BYTE, UNSIGNED_INT, UNSIGNED_SHORT, getContext, getSupportedExtensions, } from '../webgl.js';\nimport { assert } from '../asserts.js';\nimport { clear } from '../obj.js';\nimport { compose as composeTransform, create as createTransform, reset as resetTransform, rotate as rotateTransform, scale as scaleTransform, } from '../transform.js';\nimport { create, fromTransform } from '../vec/mat4.js';\nimport { getUid } from '../util.js';\nimport { includes } from '../array.js';\n/**\n * @typedef {Object} BufferCacheEntry\n * @property {import(\"./Buffer.js\").default} buffer Buffer.\n * @property {WebGLBuffer} webGlBuffer WebGlBuffer.\n */\n/**\n * Shader types, either `FRAGMENT_SHADER` or `VERTEX_SHADER`.\n * @enum {number}\n */\nexport var ShaderType = {\n    FRAGMENT_SHADER: 0x8b30,\n    VERTEX_SHADER: 0x8b31,\n};\n/**\n * Uniform names used in the default shaders: `PROJECTION_MATRIX`, `OFFSET_SCALE_MATRIX`.\n * and `OFFSET_ROTATION_MATRIX`.\n * @enum {string}\n */\nexport var DefaultUniform = {\n    PROJECTION_MATRIX: 'u_projectionMatrix',\n    OFFSET_SCALE_MATRIX: 'u_offsetScaleMatrix',\n    OFFSET_ROTATION_MATRIX: 'u_offsetRotateMatrix',\n    TIME: 'u_time',\n    ZOOM: 'u_zoom',\n    RESOLUTION: 'u_resolution',\n};\n/**\n * Attribute types, either `UNSIGNED_BYTE`, `UNSIGNED_SHORT`, `UNSIGNED_INT` or `FLOAT`\n * Note: an attribute stored in a `Float32Array` should be of type `FLOAT`.\n * @enum {number}\n */\nexport var AttributeType = {\n    UNSIGNED_BYTE: UNSIGNED_BYTE,\n    UNSIGNED_SHORT: UNSIGNED_SHORT,\n    UNSIGNED_INT: UNSIGNED_INT,\n    FLOAT: FLOAT,\n};\n/**\n * Description of an attribute in a buffer\n * @typedef {Object} AttributeDescription\n * @property {string} name Attribute name to use in shaders\n * @property {number} size Number of components per attributes\n * @property {AttributeType} [type] Attribute type, i.e. number of bytes used to store the value. This is\n * determined by the class of typed array which the buffer uses (eg. `Float32Array` for a `FLOAT` attribute).\n * Default is `FLOAT`.\n */\n/**\n * @typedef {number|Array<number>|HTMLCanvasElement|HTMLImageElement|ImageData|import(\"../transform\").Transform} UniformLiteralValue\n */\n/**\n * Uniform value can be a number, array of numbers (2 to 4), canvas element or a callback returning\n * one of the previous types.\n * @typedef {UniformLiteralValue|function(import(\"../PluggableMap.js\").FrameState):UniformLiteralValue} UniformValue\n */\n/**\n * @typedef {Object} PostProcessesOptions\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas which will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object<string,UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n/**\n * @typedef {Object} Options\n * @property {Object<string,UniformValue>} [uniforms] Uniform definitions; property names must match the uniform\n * names in the provided or default shaders.\n * @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions\n */\n/**\n * @typedef {Object} UniformInternalDescription\n * @property {string} name Name\n * @property {UniformValue} [value] Value\n * @property {WebGLTexture} [texture] Texture\n * @private\n */\n/**\n * @classdesc\n * This class is intended to provide low-level functions related to WebGL rendering, so that accessing\n * directly the WebGL API should not be required anymore.\n *\n * Several operations are handled by the `WebGLHelper` class:\n *\n * ### Define custom shaders and uniforms\n *\n *   *Shaders* are low-level programs executed on the GPU and written in GLSL. There are two types of shaders:\n *\n *   Vertex shaders are used to manipulate the position and attribute of *vertices* of rendered primitives (ie. corners of a square).\n *   Outputs are:\n *\n *   * `gl_Position`: position of the vertex in screen space\n *\n *   * Varyings usually prefixed with `v_` are passed on to the fragment shader\n *\n *   Fragment shaders are used to control the actual color of the pixels drawn on screen. Their only output is `gl_FragColor`.\n *\n *   Both shaders can take *uniforms* or *attributes* as input. Attributes are explained later. Uniforms are common, read-only values that\n *   can be changed at every frame and can be of type float, arrays of float or images.\n *\n *   Shaders must be compiled and assembled into a program like so:\n *   ```js\n *   // here we simply create two shaders and assemble them in a program which is then used\n *   // for subsequent rendering calls\n *   const vertexShader = new WebGLVertex(VERTEX_SHADER);\n *   const fragmentShader = new WebGLFragment(FRAGMENT_SHADER);\n *   const program = this.context.getProgram(fragmentShader, vertexShader);\n *   helper.useProgram(this.program);\n *   ```\n *\n *   Uniforms are defined using the `uniforms` option and can either be explicit values or callbacks taking the frame state as argument.\n *   You can also change their value along the way like so:\n *   ```js\n *   helper.setUniformFloatValue('u_value', valueAsNumber);\n *   ```\n *\n * ### Defining post processing passes\n *\n *   *Post processing* describes the act of rendering primitives to a texture, and then rendering this texture to the final canvas\n *   while applying special effects in screen space.\n *   Typical uses are: blurring, color manipulation, depth of field, filtering...\n *\n *   The `WebGLHelper` class offers the possibility to define post processes at creation time using the `postProcesses` option.\n *   A post process step accepts the following options:\n *\n *   * `fragmentShader` and `vertexShader`: text literals in GLSL language that will be compiled and used in the post processing step.\n *   * `uniforms`: uniforms can be defined for the post processing steps just like for the main render.\n *   * `scaleRatio`: allows using an intermediate texture smaller or higher than the final canvas in the post processing step.\n *     This is typically used in blur steps to reduce the performance overhead by using an already downsampled texture as input.\n *\n *   The {@link module:ol/webgl/PostProcessingPass~WebGLPostProcessingPass} class is used internally, refer to its documentation for more info.\n *\n * ### Binding WebGL buffers and flushing data into them\n *\n *   Data that must be passed to the GPU has to be transferred using {@link module:ol/webgl/Buffer~WebGLArrayBuffer} objects.\n *   A buffer has to be created only once, but must be bound every time the buffer content will be used for rendering.\n *   This is done using {@link bindBuffer}.\n *   When the buffer's array content has changed, the new data has to be flushed to the GPU memory; this is done using\n *   {@link flushBufferData}. Note: this operation is expensive and should be done as infrequently as possible.\n *\n *   When binding an array buffer, a `target` parameter must be given: it should be either {@link module:ol/webgl.ARRAY_BUFFER}\n *   (if the buffer contains vertices data) or {@link module:ol/webgl.ELEMENT_ARRAY_BUFFER} (if the buffer contains indices data).\n *\n *   Examples below:\n *   ```js\n *   // at initialization phase\n *   const verticesBuffer = new WebGLArrayBuffer([], DYNAMIC_DRAW);\n *   const indicesBuffer = new WebGLArrayBuffer([], DYNAMIC_DRAW);\n *\n *   // when array values have changed\n *   helper.flushBufferData(ARRAY_BUFFER, this.verticesBuffer);\n *   helper.flushBufferData(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n *\n *   // at rendering phase\n *   helper.bindBuffer(ARRAY_BUFFER, this.verticesBuffer);\n *   helper.bindBuffer(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n *   ```\n *\n * ### Specifying attributes\n *\n *   The GPU only receives the data as arrays of numbers. These numbers must be handled differently depending on what it describes (position, texture coordinate...).\n *   Attributes are used to specify these uses. Use {@link enableAttributeArray_} and either\n *   the default attribute names in {@link module:ol/webgl/Helper.DefaultAttrib} or custom ones.\n *\n *   Please note that you will have to specify the type and offset of the attributes in the data array. You can refer to the documentation of [WebGLRenderingContext.vertexAttribPointer](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer) for more explanation.\n *   ```js\n *   // here we indicate that the data array has the following structure:\n *   // [posX, posY, offsetX, offsetY, texCoordU, texCoordV, posX, posY, ...]\n *   helper.enableAttributes([\n *     {\n *        name: 'a_position',\n *        size: 2\n *     },\n *     {\n *       name: 'a_offset',\n *       size: 2\n *     },\n *     {\n *       name: 'a_texCoord',\n *       size: 2\n *     }\n *   ])\n *   ```\n *\n * ### Rendering primitives\n *\n *   Once all the steps above have been achieved, rendering primitives to the screen is done using {@link prepareDraw}, {@link drawElements} and {@link finalizeDraw}.\n *   ```js\n *   // frame preparation step\n *   helper.prepareDraw(frameState);\n *\n *   // call this for every data array that has to be rendered on screen\n *   helper.drawElements(0, this.indicesBuffer.getArray().length);\n *\n *   // finalize the rendering by applying post processes\n *   helper.finalizeDraw(frameState);\n *   ```\n *\n * For an example usage of this class, refer to {@link module:ol/renderer/webgl/PointsLayer~WebGLPointsLayerRenderer}.\n *\n *\n * @api\n */\nvar WebGLHelper = /** @class */ (function (_super) {\n    __extends(WebGLHelper, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function WebGLHelper(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options || {};\n        /** @private */\n        _this.boundHandleWebGLContextLost_ = _this.handleWebGLContextLost.bind(_this);\n        /** @private */\n        _this.boundHandleWebGLContextRestored_ =\n            _this.handleWebGLContextRestored.bind(_this);\n        /**\n         * @private\n         * @type {HTMLCanvasElement}\n         */\n        _this.canvas_ = document.createElement('canvas');\n        _this.canvas_.style.position = 'absolute';\n        _this.canvas_.style.left = '0';\n        /**\n         * @private\n         * @type {WebGLRenderingContext}\n         */\n        _this.gl_ = getContext(_this.canvas_);\n        var gl = _this.getGL();\n        /**\n         * @private\n         * @type {!Object<string, BufferCacheEntry>}\n         */\n        _this.bufferCache_ = {};\n        /**\n         * @private\n         * @type {WebGLProgram}\n         */\n        _this.currentProgram_ = null;\n        assert(includes(getSupportedExtensions(), 'OES_element_index_uint'), 63);\n        gl.getExtension('OES_element_index_uint');\n        _this.canvas_.addEventListener(ContextEventType.LOST, _this.boundHandleWebGLContextLost_);\n        _this.canvas_.addEventListener(ContextEventType.RESTORED, _this.boundHandleWebGLContextRestored_);\n        /**\n         * @private\n         * @type {import(\"../transform.js\").Transform}\n         */\n        _this.offsetRotateMatrix_ = createTransform();\n        /**\n         * @private\n         * @type {import(\"../transform.js\").Transform}\n         */\n        _this.offsetScaleMatrix_ = createTransform();\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.tmpMat4_ = create();\n        /**\n         * @private\n         * @type {Object<string, WebGLUniformLocation>}\n         */\n        _this.uniformLocations_ = {};\n        /**\n         * @private\n         * @type {Object<string, number>}\n         */\n        _this.attribLocations_ = {};\n        /**\n         * Holds info about custom uniforms used in the post processing pass.\n         * If the uniform is a texture, the WebGL Texture object will be stored here.\n         * @type {Array<UniformInternalDescription>}\n         * @private\n         */\n        _this.uniforms_ = [];\n        if (options.uniforms) {\n            for (var name_1 in options.uniforms) {\n                _this.uniforms_.push({\n                    name: name_1,\n                    value: options.uniforms[name_1],\n                });\n            }\n        }\n        /**\n         * An array of PostProcessingPass objects is kept in this variable, built from the steps provided in the\n         * options. If no post process was given, a default one is used (so as not to have to make an exception to\n         * the frame buffer logic).\n         * @type {Array<WebGLPostProcessingPass>}\n         * @private\n         */\n        _this.postProcessPasses_ = options.postProcesses\n            ? options.postProcesses.map(function (options) {\n                return new WebGLPostProcessingPass({\n                    webGlContext: gl,\n                    scaleRatio: options.scaleRatio,\n                    vertexShader: options.vertexShader,\n                    fragmentShader: options.fragmentShader,\n                    uniforms: options.uniforms,\n                });\n            })\n            : [new WebGLPostProcessingPass({ webGlContext: gl })];\n        /**\n         * @type {string|null}\n         * @private\n         */\n        _this.shaderCompileErrors_ = null;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.startTime_ = Date.now();\n        return _this;\n    }\n    /**\n     * Just bind the buffer if it's in the cache. Otherwise create\n     * the WebGL buffer, bind it, populate it, and add an entry to\n     * the cache.\n     * @param {import(\"./Buffer\").default} buffer Buffer.\n     * @api\n     */\n    WebGLHelper.prototype.bindBuffer = function (buffer) {\n        var gl = this.getGL();\n        var bufferKey = getUid(buffer);\n        var bufferCache = this.bufferCache_[bufferKey];\n        if (!bufferCache) {\n            var webGlBuffer = gl.createBuffer();\n            bufferCache = {\n                buffer: buffer,\n                webGlBuffer: webGlBuffer,\n            };\n            this.bufferCache_[bufferKey] = bufferCache;\n        }\n        gl.bindBuffer(buffer.getType(), bufferCache.webGlBuffer);\n    };\n    /**\n     * Update the data contained in the buffer array; this is required for the\n     * new data to be rendered\n     * @param {import(\"./Buffer\").default} buffer Buffer.\n     * @api\n     */\n    WebGLHelper.prototype.flushBufferData = function (buffer) {\n        var gl = this.getGL();\n        this.bindBuffer(buffer);\n        gl.bufferData(buffer.getType(), buffer.getArray(), buffer.getUsage());\n    };\n    /**\n     * @param {import(\"./Buffer.js\").default} buf Buffer.\n     */\n    WebGLHelper.prototype.deleteBuffer = function (buf) {\n        var gl = this.getGL();\n        var bufferKey = getUid(buf);\n        var bufferCacheEntry = this.bufferCache_[bufferKey];\n        if (bufferCacheEntry && !gl.isContextLost()) {\n            gl.deleteBuffer(bufferCacheEntry.webGlBuffer);\n        }\n        delete this.bufferCache_[bufferKey];\n    };\n    /**\n     * Clean up.\n     */\n    WebGLHelper.prototype.disposeInternal = function () {\n        this.canvas_.removeEventListener(ContextEventType.LOST, this.boundHandleWebGLContextLost_);\n        this.canvas_.removeEventListener(ContextEventType.RESTORED, this.boundHandleWebGLContextRestored_);\n    };\n    /**\n     * Clear the buffer & set the viewport to draw.\n     * Post process passes will be initialized here, the first one being bound as a render target for\n     * subsequent draw calls.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n     * @api\n     */\n    WebGLHelper.prototype.prepareDraw = function (frameState) {\n        var gl = this.getGL();\n        var canvas = this.getCanvas();\n        var size = frameState.size;\n        var pixelRatio = frameState.pixelRatio;\n        canvas.width = size[0] * pixelRatio;\n        canvas.height = size[1] * pixelRatio;\n        canvas.style.width = size[0] + 'px';\n        canvas.style.height = size[1] + 'px';\n        gl.useProgram(this.currentProgram_);\n        // loop backwards in post processes list\n        for (var i = this.postProcessPasses_.length - 1; i >= 0; i--) {\n            this.postProcessPasses_[i].init(frameState);\n        }\n        gl.bindTexture(gl.TEXTURE_2D, null);\n        gl.clearColor(0.0, 0.0, 0.0, 0.0);\n        gl.clear(gl.COLOR_BUFFER_BIT);\n        gl.enable(gl.BLEND);\n        gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n        gl.useProgram(this.currentProgram_);\n        this.applyFrameState(frameState);\n        this.applyUniforms(frameState);\n    };\n    /**\n     * Clear the render target & bind it for future draw operations.\n     * This is similar to `prepareDraw`, only post processes will not be applied.\n     * Note: the whole viewport will be drawn to the render target, regardless of its size.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n     * @param {import(\"./RenderTarget.js\").default} renderTarget Render target to draw to\n     * @param {boolean} [opt_disableAlphaBlend] If true, no alpha blending will happen.\n     */\n    WebGLHelper.prototype.prepareDrawToRenderTarget = function (frameState, renderTarget, opt_disableAlphaBlend) {\n        var gl = this.getGL();\n        var size = renderTarget.getSize();\n        gl.bindFramebuffer(gl.FRAMEBUFFER, renderTarget.getFramebuffer());\n        gl.viewport(0, 0, size[0], size[1]);\n        gl.bindTexture(gl.TEXTURE_2D, renderTarget.getTexture());\n        gl.clearColor(0.0, 0.0, 0.0, 0.0);\n        gl.clear(gl.COLOR_BUFFER_BIT);\n        gl.enable(gl.BLEND);\n        gl.blendFunc(gl.ONE, opt_disableAlphaBlend ? gl.ZERO : gl.ONE_MINUS_SRC_ALPHA);\n        gl.useProgram(this.currentProgram_);\n        this.applyFrameState(frameState);\n        this.applyUniforms(frameState);\n    };\n    /**\n     * Execute a draw call based on the currently bound program, texture, buffers, attributes.\n     * @param {number} start Start index.\n     * @param {number} end End index.\n     * @api\n     */\n    WebGLHelper.prototype.drawElements = function (start, end) {\n        var gl = this.getGL();\n        var elementType = gl.UNSIGNED_INT;\n        var elementSize = 4;\n        var numItems = end - start;\n        var offsetInBytes = start * elementSize;\n        gl.drawElements(gl.TRIANGLES, numItems, elementType, offsetInBytes);\n    };\n    /**\n     * Apply the successive post process passes which will eventually render to the actual canvas.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState current frame state\n     * @api\n     */\n    WebGLHelper.prototype.finalizeDraw = function (frameState) {\n        // apply post processes using the next one as target\n        for (var i = 0; i < this.postProcessPasses_.length; i++) {\n            this.postProcessPasses_[i].apply(frameState, this.postProcessPasses_[i + 1] || null);\n        }\n    };\n    /**\n     * @return {HTMLCanvasElement} Canvas.\n     * @api\n     */\n    WebGLHelper.prototype.getCanvas = function () {\n        return this.canvas_;\n    };\n    /**\n     * Get the WebGL rendering context\n     * @return {WebGLRenderingContext} The rendering context.\n     * @api\n     */\n    WebGLHelper.prototype.getGL = function () {\n        return this.gl_;\n    };\n    /**\n     * Sets the default matrix uniforms for a given frame state. This is called internally in `prepareDraw`.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @private\n     */\n    WebGLHelper.prototype.applyFrameState = function (frameState) {\n        var size = frameState.size;\n        var rotation = frameState.viewState.rotation;\n        var offsetScaleMatrix = resetTransform(this.offsetScaleMatrix_);\n        scaleTransform(offsetScaleMatrix, 2 / size[0], 2 / size[1]);\n        var offsetRotateMatrix = resetTransform(this.offsetRotateMatrix_);\n        if (rotation !== 0) {\n            rotateTransform(offsetRotateMatrix, -rotation);\n        }\n        this.setUniformMatrixValue(DefaultUniform.OFFSET_SCALE_MATRIX, fromTransform(this.tmpMat4_, offsetScaleMatrix));\n        this.setUniformMatrixValue(DefaultUniform.OFFSET_ROTATION_MATRIX, fromTransform(this.tmpMat4_, offsetRotateMatrix));\n        this.setUniformFloatValue(DefaultUniform.TIME, (Date.now() - this.startTime_) * 0.001);\n        this.setUniformFloatValue(DefaultUniform.ZOOM, frameState.viewState.zoom);\n        this.setUniformFloatValue(DefaultUniform.RESOLUTION, frameState.viewState.resolution);\n    };\n    /**\n     * Sets the custom uniforms based on what was given in the constructor. This is called internally in `prepareDraw`.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @private\n     */\n    WebGLHelper.prototype.applyUniforms = function (frameState) {\n        var gl = this.getGL();\n        var value;\n        var textureSlot = 0;\n        this.uniforms_.forEach(function (uniform) {\n            value =\n                typeof uniform.value === 'function'\n                    ? uniform.value(frameState)\n                    : uniform.value;\n            // apply value based on type\n            if (value instanceof HTMLCanvasElement ||\n                value instanceof HTMLImageElement ||\n                value instanceof ImageData) {\n                // create a texture & put data\n                if (!uniform.texture) {\n                    uniform.prevValue = undefined;\n                    uniform.texture = gl.createTexture();\n                }\n                gl.activeTexture(gl[\"TEXTURE\" + textureSlot]);\n                gl.bindTexture(gl.TEXTURE_2D, uniform.texture);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n                gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n                var imageReady = !(value instanceof HTMLImageElement) ||\n                    /** @type {HTMLImageElement} */ (value).complete;\n                if (imageReady && uniform.prevValue !== value) {\n                    uniform.prevValue = value;\n                    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, value);\n                }\n                // fill texture slots by increasing index\n                gl.uniform1i(this.getUniformLocation(uniform.name), textureSlot++);\n            }\n            else if (Array.isArray(value) && value.length === 6) {\n                this.setUniformMatrixValue(uniform.name, fromTransform(this.tmpMat4_, value));\n            }\n            else if (Array.isArray(value) && value.length <= 4) {\n                switch (value.length) {\n                    case 2:\n                        gl.uniform2f(this.getUniformLocation(uniform.name), value[0], value[1]);\n                        return;\n                    case 3:\n                        gl.uniform3f(this.getUniformLocation(uniform.name), value[0], value[1], value[2]);\n                        return;\n                    case 4:\n                        gl.uniform4f(this.getUniformLocation(uniform.name), value[0], value[1], value[2], value[3]);\n                        return;\n                    default:\n                        return;\n                }\n            }\n            else if (typeof value === 'number') {\n                gl.uniform1f(this.getUniformLocation(uniform.name), value);\n            }\n        }.bind(this));\n    };\n    /**\n     * Use a program.  If the program is already in use, this will return `false`.\n     * @param {WebGLProgram} program Program.\n     * @return {boolean} Changed.\n     * @api\n     */\n    WebGLHelper.prototype.useProgram = function (program) {\n        if (program == this.currentProgram_) {\n            return false;\n        }\n        else {\n            var gl = this.getGL();\n            gl.useProgram(program);\n            this.currentProgram_ = program;\n            this.uniformLocations_ = {};\n            this.attribLocations_ = {};\n            return true;\n        }\n    };\n    /**\n     * Will attempt to compile a vertex or fragment shader based on source\n     * On error, the shader will be returned but\n     * `gl.getShaderParameter(shader, gl.COMPILE_STATUS)` will return `true`\n     * Use `gl.getShaderInfoLog(shader)` to have details\n     * @param {string} source Shader source\n     * @param {ShaderType} type VERTEX_SHADER or FRAGMENT_SHADER\n     * @return {WebGLShader} Shader object\n     */\n    WebGLHelper.prototype.compileShader = function (source, type) {\n        var gl = this.getGL();\n        var shader = gl.createShader(type);\n        gl.shaderSource(shader, source);\n        gl.compileShader(shader);\n        return shader;\n    };\n    /**\n     * Create a program for a vertex and fragment shader.  Throws if shader compilation fails.\n     * @param {string} fragmentShaderSource Fragment shader source.\n     * @param {string} vertexShaderSource Vertex shader source.\n     * @return {WebGLProgram} Program\n     * @api\n     */\n    WebGLHelper.prototype.getProgram = function (fragmentShaderSource, vertexShaderSource) {\n        var gl = this.getGL();\n        var fragmentShader = this.compileShader(fragmentShaderSource, gl.FRAGMENT_SHADER);\n        var vertexShader = this.compileShader(vertexShaderSource, gl.VERTEX_SHADER);\n        var program = gl.createProgram();\n        gl.attachShader(program, fragmentShader);\n        gl.attachShader(program, vertexShader);\n        gl.linkProgram(program);\n        if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {\n            var message = \"Fragment shader compliation failed: \" + gl.getShaderInfoLog(fragmentShader);\n            throw new Error(message);\n        }\n        gl.deleteShader(fragmentShader);\n        if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {\n            var message = \"Vertex shader compilation failed: \" + gl.getShaderInfoLog(vertexShader);\n            throw new Error(message);\n        }\n        gl.deleteShader(vertexShader);\n        if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n            var message = \"GL program linking failed: \" + gl.getShaderInfoLog(vertexShader);\n            throw new Error(message);\n        }\n        return program;\n    };\n    /**\n     * Will get the location from the shader or the cache\n     * @param {string} name Uniform name\n     * @return {WebGLUniformLocation} uniformLocation\n     * @api\n     */\n    WebGLHelper.prototype.getUniformLocation = function (name) {\n        if (this.uniformLocations_[name] === undefined) {\n            this.uniformLocations_[name] = this.getGL().getUniformLocation(this.currentProgram_, name);\n        }\n        return this.uniformLocations_[name];\n    };\n    /**\n     * Will get the location from the shader or the cache\n     * @param {string} name Attribute name\n     * @return {number} attribLocation\n     * @api\n     */\n    WebGLHelper.prototype.getAttributeLocation = function (name) {\n        if (this.attribLocations_[name] === undefined) {\n            this.attribLocations_[name] = this.getGL().getAttribLocation(this.currentProgram_, name);\n        }\n        return this.attribLocations_[name];\n    };\n    /**\n     * Modifies the given transform to apply the rotation/translation/scaling of the given frame state.\n     * The resulting transform can be used to convert world space coordinates to view coordinates.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {import(\"../transform\").Transform} transform Transform to update.\n     * @return {import(\"../transform\").Transform} The updated transform object.\n     * @api\n     */\n    WebGLHelper.prototype.makeProjectionTransform = function (frameState, transform) {\n        var size = frameState.size;\n        var rotation = frameState.viewState.rotation;\n        var resolution = frameState.viewState.resolution;\n        var center = frameState.viewState.center;\n        resetTransform(transform);\n        composeTransform(transform, 0, 0, 2 / (resolution * size[0]), 2 / (resolution * size[1]), -rotation, -center[0], -center[1]);\n        return transform;\n    };\n    /**\n     * Give a value for a standard float uniform\n     * @param {string} uniform Uniform name\n     * @param {number} value Value\n     * @api\n     */\n    WebGLHelper.prototype.setUniformFloatValue = function (uniform, value) {\n        this.getGL().uniform1f(this.getUniformLocation(uniform), value);\n    };\n    /**\n     * Give a value for a standard matrix4 uniform\n     * @param {string} uniform Uniform name\n     * @param {Array<number>} value Matrix value\n     * @api\n     */\n    WebGLHelper.prototype.setUniformMatrixValue = function (uniform, value) {\n        this.getGL().uniformMatrix4fv(this.getUniformLocation(uniform), false, value);\n    };\n    /**\n     * Will set the currently bound buffer to an attribute of the shader program. Used by `#enableAttributes`\n     * internally.\n     * @param {string} attribName Attribute name\n     * @param {number} size Number of components per attributes\n     * @param {number} type UNSIGNED_INT, UNSIGNED_BYTE, UNSIGNED_SHORT or FLOAT\n     * @param {number} stride Stride in bytes (0 means attribs are packed)\n     * @param {number} offset Offset in bytes\n     * @private\n     */\n    WebGLHelper.prototype.enableAttributeArray_ = function (attribName, size, type, stride, offset) {\n        var location = this.getAttributeLocation(attribName);\n        // the attribute has not been found in the shaders; do not enable it\n        if (location < 0) {\n            return;\n        }\n        this.getGL().enableVertexAttribArray(location);\n        this.getGL().vertexAttribPointer(location, size, type, false, stride, offset);\n    };\n    /**\n     * Will enable the following attributes to be read from the currently bound buffer,\n     * i.e. tell the GPU where to read the different attributes in the buffer. An error in the\n     * size/type/order of attributes will most likely break the rendering and throw a WebGL exception.\n     * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer\n     * @api\n     */\n    WebGLHelper.prototype.enableAttributes = function (attributes) {\n        var stride = computeAttributesStride(attributes);\n        var offset = 0;\n        for (var i = 0; i < attributes.length; i++) {\n            var attr = attributes[i];\n            this.enableAttributeArray_(attr.name, attr.size, attr.type || FLOAT, stride, offset);\n            offset += attr.size * getByteSizeFromType(attr.type);\n        }\n    };\n    /**\n     * WebGL context was lost\n     * @private\n     */\n    WebGLHelper.prototype.handleWebGLContextLost = function () {\n        clear(this.bufferCache_);\n        this.currentProgram_ = null;\n    };\n    /**\n     * WebGL context was restored\n     * @private\n     */\n    WebGLHelper.prototype.handleWebGLContextRestored = function () { };\n    /**\n     * Will create or reuse a given webgl texture and apply the given size. If no image data\n     * specified, the texture will be empty, otherwise image data will be used and the `size`\n     * parameter will be ignored.\n     * Note: wrap parameters are set to clamp to edge, min filter is set to linear.\n     * @param {Array<number>} size Expected size of the texture\n     * @param {ImageData|HTMLImageElement|HTMLCanvasElement} [opt_data] Image data/object to bind to the texture\n     * @param {WebGLTexture} [opt_texture] Existing texture to reuse\n     * @return {WebGLTexture} The generated texture\n     * @api\n     */\n    WebGLHelper.prototype.createTexture = function (size, opt_data, opt_texture) {\n        var gl = this.getGL();\n        var texture = opt_texture || gl.createTexture();\n        // set params & size\n        var level = 0;\n        var internalFormat = gl.RGBA;\n        var border = 0;\n        var format = gl.RGBA;\n        var type = gl.UNSIGNED_BYTE;\n        gl.bindTexture(gl.TEXTURE_2D, texture);\n        if (opt_data) {\n            gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, format, type, opt_data);\n        }\n        else {\n            gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, size[0], size[1], border, format, type, null);\n        }\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n        return texture;\n    };\n    return WebGLHelper;\n}(Disposable));\n/**\n * Compute a stride in bytes based on a list of attributes\n * @param {Array<AttributeDescription>} attributes Ordered list of attributes\n * @return {number} Stride, ie amount of values for each vertex in the vertex buffer\n * @api\n */\nexport function computeAttributesStride(attributes) {\n    var stride = 0;\n    for (var i = 0; i < attributes.length; i++) {\n        var attr = attributes[i];\n        stride += attr.size * getByteSizeFromType(attr.type);\n    }\n    return stride;\n}\n/**\n * Computes the size in byte of an attribute type.\n * @param {AttributeType} type Attribute type\n * @return {number} The size in bytes\n */\nfunction getByteSizeFromType(type) {\n    switch (type) {\n        case AttributeType.UNSIGNED_BYTE:\n            return Uint8Array.BYTES_PER_ELEMENT;\n        case AttributeType.UNSIGNED_SHORT:\n            return Uint16Array.BYTES_PER_ELEMENT;\n        case AttributeType.UNSIGNED_INT:\n            return Uint32Array.BYTES_PER_ELEMENT;\n        case AttributeType.FLOAT:\n        default:\n            return Float32Array.BYTES_PER_ELEMENT;\n    }\n}\nexport default WebGLHelper;\n//# sourceMappingURL=Helper.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/webgl/Layer\n */\nimport LayerRenderer from '../Layer.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport WebGLHelper from '../../webgl/Helper.js';\n/**\n * @enum {string}\n */\nexport var WebGLWorkerMessageType = {\n    GENERATE_BUFFERS: 'GENERATE_BUFFERS',\n};\n/**\n * @typedef {Object} WebGLWorkerGenerateBuffersMessage\n * This message will trigger the generation of a vertex and an index buffer based on the given render instructions.\n * When the buffers are generated, the worked will send a message of the same type to the main thread, with\n * the generated buffers in it.\n * Note that any addition properties present in the message *will* be sent back to the main thread.\n * @property {WebGLWorkerMessageType} type Message type\n * @property {ArrayBuffer} renderInstructions Render instructions raw binary buffer.\n * @property {ArrayBuffer} [vertexBuffer] Vertices array raw binary buffer (sent by the worker).\n * @property {ArrayBuffer} [indexBuffer] Indices array raw binary buffer (sent by the worker).\n * @property {number} [customAttributesCount] Amount of custom attributes count in the render instructions.\n */\n/**\n * @typedef {Object} PostProcessesOptions\n * @property {number} [scaleRatio] Scale ratio; if < 1, the post process will render to a texture smaller than\n * the main canvas that will then be sampled up (useful for saving resource on blur steps).\n * @property {string} [vertexShader] Vertex shader source\n * @property {string} [fragmentShader] Fragment shader source\n * @property {Object<string,import(\"../../webgl/Helper\").UniformValue>} [uniforms] Uniform definitions for the post process step\n */\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the canvas element.\n * @property {Object<string,import(\"../../webgl/Helper\").UniformValue>} [uniforms] Uniform definitions for the post process steps\n * @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions\n */\n/**\n * @classdesc\n * Base WebGL renderer class.\n * Holds all logic related to data manipulation & some common rendering logic\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n */\nvar WebGLLayerRenderer = /** @class */ (function (_super) {\n    __extends(WebGLLayerRenderer, _super);\n    /**\n     * @param {LayerType} layer Layer.\n     * @param {Options} [opt_options] Options.\n     */\n    function WebGLLayerRenderer(layer, opt_options) {\n        var _this = _super.call(this, layer) || this;\n        var options = opt_options || {};\n        /**\n         * @type {WebGLHelper}\n         * @protected\n         */\n        _this.helper = new WebGLHelper({\n            postProcesses: options.postProcesses,\n            uniforms: options.uniforms,\n        });\n        if (options.className !== undefined) {\n            _this.helper.getCanvas().className = options.className;\n        }\n        return _this;\n    }\n    /**\n     * Clean up.\n     */\n    WebGLLayerRenderer.prototype.disposeInternal = function () {\n        this.helper.dispose();\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * @param {import(\"../../render/EventType.js\").default} type Event type.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @private\n     */\n    WebGLLayerRenderer.prototype.dispatchRenderEvent_ = function (type, frameState) {\n        var layer = this.getLayer();\n        if (layer.hasListener(type)) {\n            // RenderEvent does not get a context or an inversePixelTransform, because WebGL allows much less direct editing than Canvas2d does.\n            var event_1 = new RenderEvent(type, null, frameState, null);\n            layer.dispatchEvent(event_1);\n        }\n    };\n    /**\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @protected\n     */\n    WebGLLayerRenderer.prototype.preRender = function (frameState) {\n        this.dispatchRenderEvent_(RenderEventType.PRERENDER, frameState);\n    };\n    /**\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @protected\n     */\n    WebGLLayerRenderer.prototype.postRender = function (frameState) {\n        this.dispatchRenderEvent_(RenderEventType.POSTRENDER, frameState);\n    };\n    return WebGLLayerRenderer;\n}(LayerRenderer));\nvar tmpArray_ = [];\nvar bufferPositions_ = { vertexPosition: 0, indexPosition: 0 };\nfunction writePointVertex(buffer, pos, x, y, index) {\n    buffer[pos + 0] = x;\n    buffer[pos + 1] = y;\n    buffer[pos + 2] = index;\n}\n/**\n * An object holding positions both in an index and a vertex buffer.\n * @typedef {Object} BufferPositions\n * @property {number} vertexPosition Position in the vertex buffer\n * @property {number} indexPosition Position in the index buffer\n */\n/**\n * Pushes a quad (two triangles) based on a point geometry\n * @param {Float32Array} instructions Array of render instructions for points.\n * @param {number} elementIndex Index from which render instructions will be read.\n * @param {Float32Array} vertexBuffer Buffer in the form of a typed array.\n * @param {Uint32Array} indexBuffer Buffer in the form of a typed array.\n * @param {number} customAttributesCount Amount of custom attributes for each element.\n * @param {BufferPositions} [bufferPositions] Buffer write positions; if not specified, positions will be set at 0.\n * @return {BufferPositions} New buffer positions where to write next\n * @property {number} vertexPosition New position in the vertex buffer where future writes should start.\n * @property {number} indexPosition New position in the index buffer where future writes should start.\n * @private\n */\nexport function writePointFeatureToBuffers(instructions, elementIndex, vertexBuffer, indexBuffer, customAttributesCount, bufferPositions) {\n    // This is for x, y and index\n    var baseVertexAttrsCount = 3;\n    var baseInstructionsCount = 2;\n    var stride = baseVertexAttrsCount + customAttributesCount;\n    var x = instructions[elementIndex + 0];\n    var y = instructions[elementIndex + 1];\n    // read custom numerical attributes on the feature\n    var customAttrs = tmpArray_;\n    customAttrs.length = customAttributesCount;\n    for (var i = 0; i < customAttrs.length; i++) {\n        customAttrs[i] = instructions[elementIndex + baseInstructionsCount + i];\n    }\n    var vPos = bufferPositions ? bufferPositions.vertexPosition : 0;\n    var iPos = bufferPositions ? bufferPositions.indexPosition : 0;\n    var baseIndex = vPos / stride;\n    // push vertices for each of the four quad corners (first standard then custom attributes)\n    writePointVertex(vertexBuffer, vPos, x, y, 0);\n    customAttrs.length &&\n        vertexBuffer.set(customAttrs, vPos + baseVertexAttrsCount);\n    vPos += stride;\n    writePointVertex(vertexBuffer, vPos, x, y, 1);\n    customAttrs.length &&\n        vertexBuffer.set(customAttrs, vPos + baseVertexAttrsCount);\n    vPos += stride;\n    writePointVertex(vertexBuffer, vPos, x, y, 2);\n    customAttrs.length &&\n        vertexBuffer.set(customAttrs, vPos + baseVertexAttrsCount);\n    vPos += stride;\n    writePointVertex(vertexBuffer, vPos, x, y, 3);\n    customAttrs.length &&\n        vertexBuffer.set(customAttrs, vPos + baseVertexAttrsCount);\n    vPos += stride;\n    indexBuffer[iPos++] = baseIndex;\n    indexBuffer[iPos++] = baseIndex + 1;\n    indexBuffer[iPos++] = baseIndex + 3;\n    indexBuffer[iPos++] = baseIndex + 1;\n    indexBuffer[iPos++] = baseIndex + 2;\n    indexBuffer[iPos++] = baseIndex + 3;\n    bufferPositions_.vertexPosition = vPos;\n    bufferPositions_.indexPosition = iPos;\n    return bufferPositions_;\n}\n/**\n * Returns a texture of 1x1 pixel, white\n * @private\n * @return {ImageData} Image data.\n */\nexport function getBlankImageData() {\n    var canvas = document.createElement('canvas');\n    var image = canvas.getContext('2d').createImageData(1, 1);\n    image.data[0] = 255;\n    image.data[1] = 255;\n    image.data[2] = 255;\n    image.data[3] = 255;\n    return image;\n}\n/**\n * Generates a color array based on a numerical id\n * Note: the range for each component is 0 to 1 with 256 steps\n * @param {number} id Id\n * @param {Array<number>} [opt_array] Reusable array\n * @return {Array<number>} Color array containing the encoded id\n */\nexport function colorEncodeId(id, opt_array) {\n    var array = opt_array || [];\n    var radix = 256;\n    var divide = radix - 1;\n    array[0] = Math.floor(id / radix / radix / radix) / divide;\n    array[1] = (Math.floor(id / radix / radix) % radix) / divide;\n    array[2] = (Math.floor(id / radix) % radix) / divide;\n    array[3] = (id % radix) / divide;\n    return array;\n}\n/**\n * Reads an id from a color-encoded array\n * Note: the expected range for each component is 0 to 1 with 256 steps.\n * @param {Array<number>} color Color array containing the encoded id\n * @return {number} Decoded id\n */\nexport function colorDecodeId(color) {\n    var id = 0;\n    var radix = 256;\n    var mult = radix - 1;\n    id += Math.round(color[0] * radix * radix * radix * mult);\n    id += Math.round(color[1] * radix * radix * mult);\n    id += Math.round(color[2] * radix * mult);\n    id += Math.round(color[3] * mult);\n    return id;\n}\nexport default WebGLLayerRenderer;\n//# sourceMappingURL=Layer.js.map","/**\n * A wrapper class to simplify rendering to a texture instead of the final canvas\n * @module ol/webgl/RenderTarget\n */\nimport { equals } from '../array.js';\n// for pixel color reading\nvar tmpArray4 = new Uint8Array(4);\n/**\n * @classdesc\n * This class is a wrapper around the association of both a `WebGLTexture` and a `WebGLFramebuffer` instances,\n * simplifying initialization and binding for rendering.\n * @api\n */\nvar WebGLRenderTarget = /** @class */ (function () {\n    /**\n     * @param {import(\"./Helper.js\").default} helper WebGL helper; mandatory.\n     * @param {Array<number>} [opt_size] Expected size of the render target texture; note: this can be changed later on.\n     */\n    function WebGLRenderTarget(helper, opt_size) {\n        /**\n         * @private\n         * @type {import(\"./Helper.js\").default}\n         */\n        this.helper_ = helper;\n        var gl = helper.getGL();\n        /**\n         * @private\n         * @type {WebGLTexture}\n         */\n        this.texture_ = gl.createTexture();\n        /**\n         * @private\n         * @type {WebGLFramebuffer}\n         */\n        this.framebuffer_ = gl.createFramebuffer();\n        /**\n         * @type {Array<number>}\n         * @private\n         */\n        this.size_ = opt_size || [1, 1];\n        /**\n         * @type {Uint8Array}\n         * @private\n         */\n        this.data_ = new Uint8Array(0);\n        /**\n         * @type {boolean}\n         * @private\n         */\n        this.dataCacheDirty_ = true;\n        this.updateSize_();\n    }\n    /**\n     * Changes the size of the render target texture. Note: will do nothing if the size\n     * is already the same.\n     * @param {Array<number>} size Expected size of the render target texture\n     * @api\n     */\n    WebGLRenderTarget.prototype.setSize = function (size) {\n        if (equals(size, this.size_)) {\n            return;\n        }\n        this.size_[0] = size[0];\n        this.size_[1] = size[1];\n        this.updateSize_();\n    };\n    /**\n     * Returns the size of the render target texture\n     * @return {Array<number>} Size of the render target texture\n     * @api\n     */\n    WebGLRenderTarget.prototype.getSize = function () {\n        return this.size_;\n    };\n    /**\n     * This will cause following calls to `#readAll` or `#readPixel` to download the content of the\n     * render target into memory, which is an expensive operation.\n     * This content will be kept in cache but should be cleared after each new render.\n     * @api\n     */\n    WebGLRenderTarget.prototype.clearCachedData = function () {\n        this.dataCacheDirty_ = true;\n    };\n    /**\n     * Returns the full content of the frame buffer as a series of r, g, b, a components\n     * in the 0-255 range (unsigned byte).\n     * @return {Uint8Array} Integer array of color values\n     * @api\n     */\n    WebGLRenderTarget.prototype.readAll = function () {\n        if (this.dataCacheDirty_) {\n            var size = this.size_;\n            var gl = this.helper_.getGL();\n            gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer_);\n            gl.readPixels(0, 0, size[0], size[1], gl.RGBA, gl.UNSIGNED_BYTE, this.data_);\n            this.dataCacheDirty_ = false;\n        }\n        return this.data_;\n    };\n    /**\n     * Reads one pixel of the frame buffer as an array of r, g, b, a components\n     * in the 0-255 range (unsigned byte).\n     * If x and/or y are outside of existing data, an array filled with 0 is returned.\n     * @param {number} x Pixel coordinate\n     * @param {number} y Pixel coordinate\n     * @return {Uint8Array} Integer array with one color value (4 components)\n     * @api\n     */\n    WebGLRenderTarget.prototype.readPixel = function (x, y) {\n        if (x < 0 || y < 0 || x > this.size_[0] || y >= this.size_[1]) {\n            tmpArray4[0] = 0;\n            tmpArray4[1] = 0;\n            tmpArray4[2] = 0;\n            tmpArray4[3] = 0;\n            return tmpArray4;\n        }\n        this.readAll();\n        var index = Math.floor(x) + (this.size_[1] - Math.floor(y) - 1) * this.size_[0];\n        tmpArray4[0] = this.data_[index * 4];\n        tmpArray4[1] = this.data_[index * 4 + 1];\n        tmpArray4[2] = this.data_[index * 4 + 2];\n        tmpArray4[3] = this.data_[index * 4 + 3];\n        return tmpArray4;\n    };\n    /**\n     * @return {WebGLTexture} Texture to render to\n     */\n    WebGLRenderTarget.prototype.getTexture = function () {\n        return this.texture_;\n    };\n    /**\n     * @return {WebGLFramebuffer} Frame buffer of the render target\n     */\n    WebGLRenderTarget.prototype.getFramebuffer = function () {\n        return this.framebuffer_;\n    };\n    /**\n     * @private\n     */\n    WebGLRenderTarget.prototype.updateSize_ = function () {\n        var size = this.size_;\n        var gl = this.helper_.getGL();\n        this.texture_ = this.helper_.createTexture(size, null, this.texture_);\n        gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer_);\n        gl.viewport(0, 0, size[0], size[1]);\n        gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture_, 0);\n        this.data_ = new Uint8Array(size[0] * size[1] * 4);\n    };\n    return WebGLRenderTarget;\n}());\nexport default WebGLRenderTarget;\n//# sourceMappingURL=RenderTarget.js.map","var source = \"var e=\\\"function\\\"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError(\\\"Cannot convert undefined or null to object\\\");for(var t=Object(e),r=1,o=arguments.length;r<o;++r){var i=arguments[r];if(null!=i)for(var f in i)i.hasOwnProperty(f)&&(t[f]=i[f])}return t},n=\\\"GENERATE_BUFFERS\\\",t=[],r={vertexPosition:0,indexPosition:0};function o(e,n,t,r,o){e[n+0]=t,e[n+1]=r,e[n+2]=o}function i(e,n,i,f,s,u){var a=3+s,l=e[n+0],v=e[n+1],c=t;c.length=s;for(var g=0;g<c.length;g++)c[g]=e[n+2+g];var b=u?u.vertexPosition:0,h=u?u.indexPosition:0,d=b/a;return o(i,b,l,v,0),c.length&&i.set(c,b+3),o(i,b+=a,l,v,1),c.length&&i.set(c,b+3),o(i,b+=a,l,v,2),c.length&&i.set(c,b+3),o(i,b+=a,l,v,3),c.length&&i.set(c,b+3),b+=a,f[h++]=d,f[h++]=d+1,f[h++]=d+3,f[h++]=d+1,f[h++]=d+2,f[h++]=d+3,r.vertexPosition=b,r.indexPosition=h,r}var f=self;f.onmessage=function(t){var r=t.data;if(r.type===n){for(var o=r.customAttributesCount,s=2+o,u=new Float32Array(r.renderInstructions),a=u.length/s,l=4*a*(o+3),v=new Uint32Array(6*a),c=new Float32Array(l),g=null,b=0;b<u.length;b+=s)g=i(u,b,c,v,o,g);var h=e({vertexBuffer:c.buffer,indexBuffer:v.buffer,renderInstructions:u.buffer},r);f.postMessage(h,[c.buffer,v.buffer,u.buffer])}};\";\nvar blob = new Blob([source], { type: 'application/javascript' });\nvar url = URL.createObjectURL(blob);\nexport function create() {\n    return new Worker(url);\n}\n//# sourceMappingURL=webgl.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/webgl/PointsLayer\n */\nimport BaseVector from '../../layer/BaseVector.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport VectorEventType from '../../source/VectorEventType.js';\nimport ViewHint from '../../ViewHint.js';\nimport WebGLArrayBuffer from '../../webgl/Buffer.js';\nimport WebGLLayerRenderer, { WebGLWorkerMessageType, colorDecodeId, colorEncodeId, } from './Layer.js';\nimport WebGLRenderTarget from '../../webgl/RenderTarget.js';\nimport { ARRAY_BUFFER, DYNAMIC_DRAW, ELEMENT_ARRAY_BUFFER } from '../../webgl.js';\nimport { AttributeType, DefaultUniform } from '../../webgl/Helper.js';\nimport { apply as applyTransform, create as createTransform, makeInverse as makeInverseTransform, multiply as multiplyTransform, } from '../../transform.js';\nimport { assert } from '../../asserts.js';\nimport { buffer, createEmpty, equals } from '../../extent.js';\nimport { create as createWebGLWorker } from '../../worker/webgl.js';\nimport { getUid } from '../../util.js';\nimport { listen, unlistenByKey } from '../../events.js';\n/**\n * @typedef {Object} CustomAttribute A description of a custom attribute to be passed on to the GPU, with a value different\n * for each feature.\n * @property {string} name Attribute name.\n * @property {function(import(\"../../Feature\").default, Object<string, *>):number} callback This callback computes the numerical value of the\n * attribute for a given feature (properties are available as 2nd arg for quicker access).\n */\n/**\n * @typedef {Object} FeatureCacheItem Object that holds a reference to a feature, its geometry and properties. Used to optimize\n * rebuildBuffers by accessing these objects quicker.\n * @property {import(\"../../Feature\").default} feature Feature\n * @property {Object<string, *>} properties Feature properties\n * @property {import(\"../../geom\").Geometry} geometry Feature geometry\n */\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the canvas element.\n * @property {Array<CustomAttribute>} [attributes] These attributes will be read from the features in the source and then\n * passed to the GPU. The `name` property of each attribute will serve as its identifier:\n *  * In the vertex shader as an `attribute` by prefixing it with `a_`\n *  * In the fragment shader as a `varying` by prefixing it with `v_`\n * Please note that these can only be numerical values.\n * @property {string} vertexShader Vertex shader source, mandatory.\n * @property {string} fragmentShader Fragment shader source, mandatory.\n * @property {string} [hitVertexShader] Vertex shader source for hit detection rendering.\n * @property {string} [hitFragmentShader] Fragment shader source for hit detection rendering.\n * @property {Object<string,import(\"../../webgl/Helper\").UniformValue>} [uniforms] Uniform definitions for the post process steps\n * Please note that `u_texture` is reserved for the main texture slot.\n * @property {Array<import(\"./Layer\").PostProcessesOptions>} [postProcesses] Post-processes definitions\n */\n/**\n * @classdesc\n * WebGL vector renderer optimized for points.\n * All features will be rendered as quads (two triangles forming a square). New data will be flushed to the GPU\n * every time the vector source changes.\n *\n * You need to provide vertex and fragment shaders for rendering. This can be done using\n * {@link module:ol/webgl/ShaderBuilder} utilities. These shaders shall expect a `a_position` attribute\n * containing the screen-space projected center of the quad, as well as a `a_index` attribute\n * whose value (0, 1, 2 or 3) indicates which quad vertex is currently getting processed (see structure below).\n *\n * To include variable attributes in the shaders, you need to declare them using the `attributes` property of\n * the options object like so:\n * ```js\n * new WebGLPointsLayerRenderer(layer, {\n *   attributes: [\n *     {\n *       name: 'size',\n *       callback: function(feature) {\n *         // compute something with the feature\n *       }\n *     },\n *     {\n *       name: 'weight',\n *       callback: function(feature) {\n *         // compute something with the feature\n *       }\n *     },\n *   ],\n *   vertexShader:\n *     // shader using attribute a_weight and a_size\n *   fragmentShader:\n *     // shader using varying v_weight and v_size\n * ```\n *\n * To enable hit detection, you must as well provide dedicated shaders using the `hitVertexShader`\n * and `hitFragmentShader` properties. These shall expect the `a_hitColor` attribute to contain\n * the final color that will have to be output for hit detection to work.\n *\n * The following uniform is used for the main texture: `u_texture`.\n *\n * Please note that the main shader output should have premultiplied alpha, otherwise visual anomalies may occur.\n *\n * Points are rendered as quads with the following structure:\n *\n * ```\n *   (u0, v1)      (u1, v1)\n *  [3]----------[2]\n *   |`           |\n *   |  `         |\n *   |    `       |\n *   |      `     |\n *   |        `   |\n *   |          ` |\n *  [0]----------[1]\n *   (u0, v0)      (u1, v0)\n *  ```\n *\n * This uses {@link module:ol/webgl/Helper~WebGLHelper} internally.\n *\n * @api\n */\nvar WebGLPointsLayerRenderer = /** @class */ (function (_super) {\n    __extends(WebGLPointsLayerRenderer, _super);\n    /**\n     * @param {import(\"../../layer/Layer.js\").default} layer Layer.\n     * @param {Options} options Options.\n     */\n    function WebGLPointsLayerRenderer(layer, options) {\n        var _this = this;\n        var uniforms = options.uniforms || {};\n        var projectionMatrixTransform = createTransform();\n        uniforms[DefaultUniform.PROJECTION_MATRIX] = projectionMatrixTransform;\n        _this = _super.call(this, layer, {\n            className: options.className,\n            uniforms: uniforms,\n            postProcesses: options.postProcesses,\n        }) || this;\n        _this.sourceRevision_ = -1;\n        _this.verticesBuffer_ = new WebGLArrayBuffer(ARRAY_BUFFER, DYNAMIC_DRAW);\n        _this.hitVerticesBuffer_ = new WebGLArrayBuffer(ARRAY_BUFFER, DYNAMIC_DRAW);\n        _this.indicesBuffer_ = new WebGLArrayBuffer(ELEMENT_ARRAY_BUFFER, DYNAMIC_DRAW);\n        _this.program_ = _this.helper.getProgram(options.fragmentShader, options.vertexShader);\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.hitDetectionEnabled_ =\n            options.hitFragmentShader && options.hitVertexShader ? true : false;\n        _this.hitProgram_ =\n            _this.hitDetectionEnabled_ &&\n                _this.helper.getProgram(options.hitFragmentShader, options.hitVertexShader);\n        var customAttributes = options.attributes\n            ? options.attributes.map(function (attribute) {\n                return {\n                    name: 'a_' + attribute.name,\n                    size: 1,\n                    type: AttributeType.FLOAT,\n                };\n            })\n            : [];\n        /**\n         * A list of attributes used by the renderer. By default only the position and\n         * index of the vertex (0 to 3) are required.\n         * @type {Array<import('../../webgl/Helper.js').AttributeDescription>}\n         */\n        _this.attributes = [\n            {\n                name: 'a_position',\n                size: 2,\n                type: AttributeType.FLOAT,\n            },\n            {\n                name: 'a_index',\n                size: 1,\n                type: AttributeType.FLOAT,\n            },\n        ].concat(customAttributes);\n        /**\n         * A list of attributes used for hit detection.\n         * @type {Array<import('../../webgl/Helper.js').AttributeDescription>}\n         */\n        _this.hitDetectionAttributes = [\n            {\n                name: 'a_position',\n                size: 2,\n                type: AttributeType.FLOAT,\n            },\n            {\n                name: 'a_index',\n                size: 1,\n                type: AttributeType.FLOAT,\n            },\n            {\n                name: 'a_hitColor',\n                size: 4,\n                type: AttributeType.FLOAT,\n            },\n            {\n                name: 'a_featureUid',\n                size: 1,\n                type: AttributeType.FLOAT,\n            },\n        ].concat(customAttributes);\n        _this.customAttributes = options.attributes ? options.attributes : [];\n        _this.previousExtent_ = createEmpty();\n        /**\n         * This transform is updated on every frame and is the composition of:\n         * - invert of the world->screen transform that was used when rebuilding buffers (see `this.renderTransform_`)\n         * - current world->screen transform\n         * @type {import(\"../../transform.js\").Transform}\n         * @private\n         */\n        _this.currentTransform_ = projectionMatrixTransform;\n        /**\n         * This transform is updated when buffers are rebuilt and converts world space coordinates to screen space\n         * @type {import(\"../../transform.js\").Transform}\n         * @private\n         */\n        _this.renderTransform_ = createTransform();\n        /**\n         * @type {import(\"../../transform.js\").Transform}\n         * @private\n         */\n        _this.invertRenderTransform_ = createTransform();\n        /**\n         * @type {Float32Array}\n         * @private\n         */\n        _this.renderInstructions_ = new Float32Array(0);\n        /**\n         * These instructions are used for hit detection\n         * @type {Float32Array}\n         * @private\n         */\n        _this.hitRenderInstructions_ = new Float32Array(0);\n        /**\n         * @type {WebGLRenderTarget}\n         * @private\n         */\n        _this.hitRenderTarget_ =\n            _this.hitDetectionEnabled_ && new WebGLRenderTarget(_this.helper);\n        _this.worker_ = createWebGLWorker();\n        _this.worker_.addEventListener('message', \n        /**\n         * @param {*} event Event.\n         * @this {WebGLPointsLayerRenderer}\n         */\n        function (event) {\n            var received = event.data;\n            if (received.type === WebGLWorkerMessageType.GENERATE_BUFFERS) {\n                var projectionTransform = received.projectionTransform;\n                if (received.hitDetection) {\n                    this.hitVerticesBuffer_.fromArrayBuffer(received.vertexBuffer);\n                    this.helper.flushBufferData(this.hitVerticesBuffer_);\n                }\n                else {\n                    this.verticesBuffer_.fromArrayBuffer(received.vertexBuffer);\n                    this.helper.flushBufferData(this.verticesBuffer_);\n                }\n                this.indicesBuffer_.fromArrayBuffer(received.indexBuffer);\n                this.helper.flushBufferData(this.indicesBuffer_);\n                this.renderTransform_ = projectionTransform;\n                makeInverseTransform(this.invertRenderTransform_, this.renderTransform_);\n                if (received.hitDetection) {\n                    this.hitRenderInstructions_ = new Float32Array(event.data.renderInstructions);\n                }\n                else {\n                    this.renderInstructions_ = new Float32Array(event.data.renderInstructions);\n                }\n                this.getLayer().changed();\n            }\n        }.bind(_this));\n        /**\n         * This object will be updated when the source changes. Key is uid.\n         * @type {Object<string, FeatureCacheItem>}\n         * @private\n         */\n        _this.featureCache_ = {};\n        /**\n         * Amount of features in the cache.\n         * @type {number}\n         * @private\n         */\n        _this.featureCount_ = 0;\n        var source = _this.getLayer().getSource();\n        _this.sourceListenKeys_ = [\n            listen(source, VectorEventType.ADDFEATURE, _this.handleSourceFeatureAdded_, _this),\n            listen(source, VectorEventType.CHANGEFEATURE, _this.handleSourceFeatureChanged_, _this),\n            listen(source, VectorEventType.REMOVEFEATURE, _this.handleSourceFeatureDelete_, _this),\n            listen(source, VectorEventType.CLEAR, _this.handleSourceFeatureClear_, _this),\n        ];\n        source.forEachFeature(function (feature) {\n            this.featureCache_[getUid(feature)] = {\n                feature: feature,\n                properties: feature.getProperties(),\n                geometry: feature.getGeometry(),\n            };\n            this.featureCount_++;\n        }.bind(_this));\n        return _this;\n    }\n    /**\n     * @param {import(\"../../source/Vector.js\").VectorSourceEvent} event Event.\n     * @private\n     */\n    WebGLPointsLayerRenderer.prototype.handleSourceFeatureAdded_ = function (event) {\n        var feature = event.feature;\n        this.featureCache_[getUid(feature)] = {\n            feature: feature,\n            properties: feature.getProperties(),\n            geometry: feature.getGeometry(),\n        };\n        this.featureCount_++;\n    };\n    /**\n     * @param {import(\"../../source/Vector.js\").VectorSourceEvent} event Event.\n     * @private\n     */\n    WebGLPointsLayerRenderer.prototype.handleSourceFeatureChanged_ = function (event) {\n        var feature = event.feature;\n        this.featureCache_[getUid(feature)] = {\n            feature: feature,\n            properties: feature.getProperties(),\n            geometry: feature.getGeometry(),\n        };\n    };\n    /**\n     * @param {import(\"../../source/Vector.js\").VectorSourceEvent} event Event.\n     * @private\n     */\n    WebGLPointsLayerRenderer.prototype.handleSourceFeatureDelete_ = function (event) {\n        var feature = event.feature;\n        delete this.featureCache_[getUid(feature)];\n        this.featureCount_--;\n    };\n    /**\n     * @private\n     */\n    WebGLPointsLayerRenderer.prototype.handleSourceFeatureClear_ = function () {\n        this.featureCache_ = {};\n        this.featureCount_ = 0;\n    };\n    /**\n     * Render the layer.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {HTMLElement} The rendered element.\n     */\n    WebGLPointsLayerRenderer.prototype.renderFrame = function (frameState) {\n        this.preRender(frameState);\n        var renderCount = this.indicesBuffer_.getSize();\n        this.helper.drawElements(0, renderCount);\n        this.helper.finalizeDraw(frameState);\n        var canvas = this.helper.getCanvas();\n        var layerState = frameState.layerStatesArray[frameState.layerIndex];\n        var opacity = layerState.opacity;\n        if (opacity !== parseFloat(canvas.style.opacity)) {\n            canvas.style.opacity = String(opacity);\n        }\n        if (this.hitDetectionEnabled_) {\n            this.renderHitDetection(frameState);\n            this.hitRenderTarget_.clearCachedData();\n        }\n        this.postRender(frameState);\n        return canvas;\n    };\n    /**\n     * Determine whether render should be called.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    WebGLPointsLayerRenderer.prototype.prepareFrame = function (frameState) {\n        var layer = this.getLayer();\n        var vectorSource = layer.getSource();\n        var viewState = frameState.viewState;\n        var viewNotMoving = !frameState.viewHints[ViewHint.ANIMATING] &&\n            !frameState.viewHints[ViewHint.INTERACTING];\n        var extentChanged = !equals(this.previousExtent_, frameState.extent);\n        var sourceChanged = this.sourceRevision_ < vectorSource.getRevision();\n        if (sourceChanged) {\n            this.sourceRevision_ = vectorSource.getRevision();\n        }\n        if (viewNotMoving && (extentChanged || sourceChanged)) {\n            var projection = viewState.projection;\n            var resolution = viewState.resolution;\n            var renderBuffer = layer instanceof BaseVector ? layer.getRenderBuffer() : 0;\n            var extent = buffer(frameState.extent, renderBuffer * resolution);\n            vectorSource.loadFeatures(extent, resolution, projection);\n            this.rebuildBuffers_(frameState);\n            this.previousExtent_ = frameState.extent.slice();\n        }\n        // apply the current projection transform with the invert of the one used to fill buffers\n        this.helper.makeProjectionTransform(frameState, this.currentTransform_);\n        multiplyTransform(this.currentTransform_, this.invertRenderTransform_);\n        this.helper.useProgram(this.program_);\n        this.helper.prepareDraw(frameState);\n        // write new data\n        this.helper.bindBuffer(this.verticesBuffer_);\n        this.helper.bindBuffer(this.indicesBuffer_);\n        this.helper.enableAttributes(this.attributes);\n        return true;\n    };\n    /**\n     * Rebuild internal webgl buffers based on current view extent; costly, should not be called too much\n     * @param {import(\"../../PluggableMap\").FrameState} frameState Frame state.\n     * @private\n     */\n    WebGLPointsLayerRenderer.prototype.rebuildBuffers_ = function (frameState) {\n        // saves the projection transform for the current frame state\n        var projectionTransform = createTransform();\n        this.helper.makeProjectionTransform(frameState, projectionTransform);\n        // here we anticipate the amount of render instructions that we well generate\n        // this can be done since we know that for normal render we only have x, y as base instructions,\n        // and x, y, r, g, b, a and featureUid for hit render instructions\n        // and we also know the amount of custom attributes to append to these\n        var totalInstructionsCount = (2 + this.customAttributes.length) * this.featureCount_;\n        if (!this.renderInstructions_ ||\n            this.renderInstructions_.length !== totalInstructionsCount) {\n            this.renderInstructions_ = new Float32Array(totalInstructionsCount);\n        }\n        if (this.hitDetectionEnabled_) {\n            var totalHitInstructionsCount = (7 + this.customAttributes.length) * this.featureCount_;\n            if (!this.hitRenderInstructions_ ||\n                this.hitRenderInstructions_.length !== totalHitInstructionsCount) {\n                this.hitRenderInstructions_ = new Float32Array(totalHitInstructionsCount);\n            }\n        }\n        // loop on features to fill the buffer\n        var featureCache, geometry;\n        var tmpCoords = [];\n        var tmpColor = [];\n        var renderIndex = 0;\n        var hitIndex = 0;\n        var hitColor;\n        for (var featureUid in this.featureCache_) {\n            featureCache = this.featureCache_[featureUid];\n            geometry = /** @type {import(\"../../geom\").Point} */ (featureCache.geometry);\n            if (!geometry || geometry.getType() !== GeometryType.POINT) {\n                continue;\n            }\n            tmpCoords[0] = geometry.getFlatCoordinates()[0];\n            tmpCoords[1] = geometry.getFlatCoordinates()[1];\n            applyTransform(projectionTransform, tmpCoords);\n            hitColor = colorEncodeId(hitIndex + 6, tmpColor);\n            this.renderInstructions_[renderIndex++] = tmpCoords[0];\n            this.renderInstructions_[renderIndex++] = tmpCoords[1];\n            // for hit detection, the feature uid is saved in the opacity value\n            // and the index of the opacity value is encoded in the color values\n            if (this.hitDetectionEnabled_) {\n                this.hitRenderInstructions_[hitIndex++] = tmpCoords[0];\n                this.hitRenderInstructions_[hitIndex++] = tmpCoords[1];\n                this.hitRenderInstructions_[hitIndex++] = hitColor[0];\n                this.hitRenderInstructions_[hitIndex++] = hitColor[1];\n                this.hitRenderInstructions_[hitIndex++] = hitColor[2];\n                this.hitRenderInstructions_[hitIndex++] = hitColor[3];\n                this.hitRenderInstructions_[hitIndex++] = Number(featureUid);\n            }\n            // pushing custom attributes\n            var value = void 0;\n            for (var j = 0; j < this.customAttributes.length; j++) {\n                value = this.customAttributes[j].callback(featureCache.feature, featureCache.properties);\n                this.renderInstructions_[renderIndex++] = value;\n                if (this.hitDetectionEnabled_) {\n                    this.hitRenderInstructions_[hitIndex++] = value;\n                }\n            }\n        }\n        /** @type {import('./Layer').WebGLWorkerGenerateBuffersMessage} */\n        var message = {\n            type: WebGLWorkerMessageType.GENERATE_BUFFERS,\n            renderInstructions: this.renderInstructions_.buffer,\n            customAttributesCount: this.customAttributes.length,\n        };\n        // additional properties will be sent back as-is by the worker\n        message['projectionTransform'] = projectionTransform;\n        this.worker_.postMessage(message, [this.renderInstructions_.buffer]);\n        this.renderInstructions_ = null;\n        /** @type {import('./Layer').WebGLWorkerGenerateBuffersMessage} */\n        if (this.hitDetectionEnabled_) {\n            var hitMessage = {\n                type: WebGLWorkerMessageType.GENERATE_BUFFERS,\n                renderInstructions: this.hitRenderInstructions_.buffer,\n                customAttributesCount: 5 + this.customAttributes.length,\n            };\n            hitMessage['projectionTransform'] = projectionTransform;\n            hitMessage['hitDetection'] = true;\n            this.worker_.postMessage(hitMessage, [\n                this.hitRenderInstructions_.buffer,\n            ]);\n            this.hitRenderInstructions_ = null;\n        }\n    };\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {import(\"../vector.js\").FeatureCallback<T>} callback Feature callback.\n     * @param {Array<import(\"../Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    WebGLPointsLayerRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, callback, matches) {\n        assert(this.hitDetectionEnabled_, 66);\n        if (!this.hitRenderInstructions_) {\n            return undefined;\n        }\n        var pixel = applyTransform(frameState.coordinateToPixelTransform, coordinate.slice());\n        var data = this.hitRenderTarget_.readPixel(pixel[0] / 2, pixel[1] / 2);\n        var color = [data[0] / 255, data[1] / 255, data[2] / 255, data[3] / 255];\n        var index = colorDecodeId(color);\n        var opacity = this.hitRenderInstructions_[index];\n        var uid = Math.floor(opacity).toString();\n        var source = this.getLayer().getSource();\n        var feature = source.getFeatureByUid(uid);\n        if (feature) {\n            return callback(feature, this.getLayer(), null);\n        }\n        return undefined;\n    };\n    /**\n     * Render the hit detection data to the corresponding render target\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState current frame state\n     */\n    WebGLPointsLayerRenderer.prototype.renderHitDetection = function (frameState) {\n        // skip render entirely if vertex buffers not ready/generated yet\n        if (!this.hitVerticesBuffer_.getSize()) {\n            return;\n        }\n        this.hitRenderTarget_.setSize([\n            Math.floor(frameState.size[0] / 2),\n            Math.floor(frameState.size[1] / 2),\n        ]);\n        this.helper.useProgram(this.hitProgram_);\n        this.helper.prepareDrawToRenderTarget(frameState, this.hitRenderTarget_, true);\n        this.helper.bindBuffer(this.hitVerticesBuffer_);\n        this.helper.bindBuffer(this.indicesBuffer_);\n        this.helper.enableAttributes(this.hitDetectionAttributes);\n        var renderCount = this.indicesBuffer_.getSize();\n        this.helper.drawElements(0, renderCount);\n    };\n    /**\n     * Clean up.\n     */\n    WebGLPointsLayerRenderer.prototype.disposeInternal = function () {\n        this.worker_.terminate();\n        this.layer_ = null;\n        this.sourceListenKeys_.forEach(function (key) {\n            unlistenByKey(key);\n        });\n        this.sourceListenKeys_ = null;\n        _super.prototype.disposeInternal.call(this);\n    };\n    return WebGLPointsLayerRenderer;\n}(WebGLLayerRenderer));\nexport default WebGLPointsLayerRenderer;\n//# sourceMappingURL=PointsLayer.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/Heatmap\n */\nimport VectorLayer from './Vector.js';\nimport WebGLPointsLayerRenderer from '../renderer/webgl/PointsLayer.js';\nimport { assign } from '../obj.js';\nimport { clamp } from '../math.js';\nimport { createCanvasContext2D } from '../dom.js';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {Array<string>} [gradient=['#00f', '#0ff', '#0f0', '#ff0', '#f00']] The color gradient\n * of the heatmap, specified as an array of CSS color strings.\n * @property {number} [radius=8] Radius size in pixels.\n * @property {number} [blur=15] Blur size in pixels.\n * @property {string|function(import(\"../Feature.js\").default):number} [weight='weight'] The feature\n * attribute to use for the weight or a function that returns a weight from a feature. Weight values\n * should range from 0 to 1 (and values outside will be clamped to that range).\n * @property {import(\"../source/Vector.js\").default} [source] Source.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n    BLUR: 'blur',\n    GRADIENT: 'gradient',\n    RADIUS: 'radius',\n};\n/**\n * @const\n * @type {Array<string>}\n */\nvar DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00'];\n/**\n * @classdesc\n * Layer for rendering vector data as a heatmap.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @fires import(\"../render/Event.js\").RenderEvent\n * @extends {VectorLayer<import(\"../source/Vector.js\").default>}\n * @api\n */\nvar Heatmap = /** @class */ (function (_super) {\n    __extends(Heatmap, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function Heatmap(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var baseOptions = assign({}, options);\n        delete baseOptions.gradient;\n        delete baseOptions.radius;\n        delete baseOptions.blur;\n        delete baseOptions.weight;\n        _this = _super.call(this, baseOptions) || this;\n        /**\n         * @private\n         * @type {HTMLCanvasElement}\n         */\n        _this.gradient_ = null;\n        _this.addChangeListener(Property.GRADIENT, _this.handleGradientChanged_);\n        _this.setGradient(options.gradient ? options.gradient : DEFAULT_GRADIENT);\n        _this.setBlur(options.blur !== undefined ? options.blur : 15);\n        _this.setRadius(options.radius !== undefined ? options.radius : 8);\n        var weight = options.weight ? options.weight : 'weight';\n        if (typeof weight === 'string') {\n            _this.weightFunction_ = function (feature) {\n                return feature.get(weight);\n            };\n        }\n        else {\n            _this.weightFunction_ = weight;\n        }\n        // For performance reasons, don't sort the features before rendering.\n        // The render order is not relevant for a heatmap representation.\n        _this.setRenderOrder(null);\n        return _this;\n    }\n    /**\n     * Return the blur size in pixels.\n     * @return {number} Blur size in pixels.\n     * @api\n     * @observable\n     */\n    Heatmap.prototype.getBlur = function () {\n        return /** @type {number} */ (this.get(Property.BLUR));\n    };\n    /**\n     * Return the gradient colors as array of strings.\n     * @return {Array<string>} Colors.\n     * @api\n     * @observable\n     */\n    Heatmap.prototype.getGradient = function () {\n        return /** @type {Array<string>} */ (this.get(Property.GRADIENT));\n    };\n    /**\n     * Return the size of the radius in pixels.\n     * @return {number} Radius size in pixel.\n     * @api\n     * @observable\n     */\n    Heatmap.prototype.getRadius = function () {\n        return /** @type {number} */ (this.get(Property.RADIUS));\n    };\n    /**\n     * @private\n     */\n    Heatmap.prototype.handleGradientChanged_ = function () {\n        this.gradient_ = createGradient(this.getGradient());\n    };\n    /**\n     * Set the blur size in pixels.\n     * @param {number} blur Blur size in pixels.\n     * @api\n     * @observable\n     */\n    Heatmap.prototype.setBlur = function (blur) {\n        this.set(Property.BLUR, blur);\n    };\n    /**\n     * Set the gradient colors as array of strings.\n     * @param {Array<string>} colors Gradient.\n     * @api\n     * @observable\n     */\n    Heatmap.prototype.setGradient = function (colors) {\n        this.set(Property.GRADIENT, colors);\n    };\n    /**\n     * Set the size of the radius in pixels.\n     * @param {number} radius Radius size in pixel.\n     * @api\n     * @observable\n     */\n    Heatmap.prototype.setRadius = function (radius) {\n        this.set(Property.RADIUS, radius);\n    };\n    /**\n     * Create a renderer for this layer.\n     * @return {WebGLPointsLayerRenderer} A layer renderer.\n     */\n    Heatmap.prototype.createRenderer = function () {\n        return new WebGLPointsLayerRenderer(this, {\n            className: this.getClassName(),\n            attributes: [\n                {\n                    name: 'weight',\n                    callback: function (feature) {\n                        var weight = this.weightFunction_(feature);\n                        return weight !== undefined ? clamp(weight, 0, 1) : 1;\n                    }.bind(this),\n                },\n            ],\n            vertexShader: \"\\n        precision mediump float;\\n        uniform mat4 u_projectionMatrix;\\n        uniform mat4 u_offsetScaleMatrix;\\n        uniform float u_size;\\n        attribute vec2 a_position;\\n        attribute float a_index;\\n        attribute float a_weight;\\n\\n        varying vec2 v_texCoord;\\n        varying float v_weight;\\n\\n        void main(void) {\\n          mat4 offsetMatrix = u_offsetScaleMatrix;\\n          float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\\n          v_texCoord = vec2(u, v);\\n          v_weight = a_weight;\\n        }\",\n            fragmentShader: \"\\n        precision mediump float;\\n        uniform float u_blurSlope;\\n\\n        varying vec2 v_texCoord;\\n        varying float v_weight;\\n\\n        void main(void) {\\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\\n          float alpha = smoothstep(0.0, 1.0, value) * v_weight;\\n          gl_FragColor = vec4(alpha, alpha, alpha, alpha);\\n        }\",\n            hitVertexShader: \"\\n        precision mediump float;\\n        uniform mat4 u_projectionMatrix;\\n        uniform mat4 u_offsetScaleMatrix;\\n        uniform float u_size;\\n        attribute vec2 a_position;\\n        attribute float a_index;\\n        attribute float a_weight;\\n        attribute vec4 a_hitColor;\\n\\n        varying vec2 v_texCoord;\\n        varying float v_weight;\\n        varying vec4 v_hitColor;\\n\\n        void main(void) {\\n          mat4 offsetMatrix = u_offsetScaleMatrix;\\n          float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\\n          float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\\n          vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\\n          gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\\n          float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\\n          float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\\n          v_texCoord = vec2(u, v);\\n          v_hitColor = a_hitColor;\\n          v_weight = a_weight;\\n        }\",\n            hitFragmentShader: \"\\n        precision mediump float;\\n        uniform float u_blurSlope;\\n\\n        varying vec2 v_texCoord;\\n        varying float v_weight;\\n        varying vec4 v_hitColor;\\n\\n        void main(void) {\\n          vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\\n          float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\\n          float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\\n          float alpha = smoothstep(0.0, 1.0, value) * v_weight;\\n          if (alpha < 0.05) {\\n            discard;\\n          }\\n\\n          gl_FragColor = v_hitColor;\\n        }\",\n            uniforms: {\n                u_size: function () {\n                    return (this.get(Property.RADIUS) + this.get(Property.BLUR)) * 2;\n                }.bind(this),\n                u_blurSlope: function () {\n                    return (this.get(Property.RADIUS) / Math.max(1, this.get(Property.BLUR)));\n                }.bind(this),\n            },\n            postProcesses: [\n                {\n                    fragmentShader: \"\\n            precision mediump float;\\n\\n            uniform sampler2D u_image;\\n            uniform sampler2D u_gradientTexture;\\n\\n            varying vec2 v_texCoord;\\n\\n            void main() {\\n              vec4 color = texture2D(u_image, v_texCoord);\\n              gl_FragColor.a = color.a;\\n              gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\\n              gl_FragColor.rgb *= gl_FragColor.a;\\n            }\",\n                    uniforms: {\n                        u_gradientTexture: function () {\n                            return this.gradient_;\n                        }.bind(this),\n                    },\n                },\n            ],\n        });\n    };\n    Heatmap.prototype.renderDeclutter = function () { };\n    return Heatmap;\n}(VectorLayer));\n/**\n * @param {Array<string>} colors A list of colored.\n * @return {HTMLCanvasElement} canvas with gradient texture.\n */\nfunction createGradient(colors) {\n    var width = 1;\n    var height = 256;\n    var context = createCanvasContext2D(width, height);\n    var gradient = context.createLinearGradient(0, 0, width, height);\n    var step = 1 / (colors.length - 1);\n    for (var i = 0, ii = colors.length; i < ii; ++i) {\n        gradient.addColorStop(i * step, colors[i]);\n    }\n    context.fillStyle = gradient;\n    context.fillRect(0, 0, width, height);\n    return context.canvas;\n}\nexport default Heatmap;\n//# sourceMappingURL=Heatmap.js.map","/**\n * @module ol/layer/VectorTileRenderType\n */\n/**\n * @enum {string}\n * Render mode for vector tiles:\n * @api\n */\nexport default {\n    /**\n     * Vector tiles are rendered as images. Great performance, but\n     * point symbols and texts are always rotated with the view and pixels are\n     * scaled during zoom animations\n     * @api\n     * @deprecated\n     */\n    IMAGE: 'image',\n    /**\n     * Polygon and line elements are rendered as images, so pixels\n     * are scaled during zoom animations. Point symbols and texts are accurately\n     * rendered as vectors and can stay upright on rotated views.\n     * @api\n     */\n    HYBRID: 'hybrid',\n    /**\n     * Everything is rendered as vectors. Use this mode for improved\n     * performance on vector tile layers with only a few rendered features (e.g.\n     * for highlighting a subset of features of another layer with the same\n     * source).\n     * @api\n     */\n    VECTOR: 'vector',\n};\n//# sourceMappingURL=VectorTileRenderType.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/VectorTileLayer\n */\nimport CanvasBuilderGroup from '../../render/canvas/BuilderGroup.js';\nimport CanvasExecutorGroup from '../../render/canvas/ExecutorGroup.js';\nimport CanvasTileLayerRenderer from './TileLayer.js';\nimport EventType from '../../events/EventType.js';\nimport ReplayType from '../../render/canvas/BuilderType.js';\nimport TileState from '../../TileState.js';\nimport VectorTileRenderType from '../../layer/VectorTileRenderType.js';\nimport ViewHint from '../../ViewHint.js';\nimport { HIT_DETECT_RESOLUTION, createHitDetectionImageData, hitDetect, } from '../../render/canvas/hitdetect.js';\nimport { apply as applyTransform, create as createTransform, multiply, reset as resetTransform, scale, scale as scaleTransform, translate as translateTransform, } from '../../transform.js';\nimport { boundingExtent, buffer, containsExtent, equals, getIntersection, getTopLeft, intersects, } from '../../extent.js';\nimport { clear } from '../../obj.js';\nimport { getSquaredTolerance as getSquaredRenderTolerance, renderFeature, } from '../vector.js';\nimport { getUid } from '../../util.js';\nimport { listen, unlistenByKey } from '../../events.js';\nimport { toSize } from '../../size.js';\nimport { wrapX } from '../../coordinate.js';\n/**\n * @type {!Object<string, Array<import(\"../../render/canvas/BuilderType.js\").default>>}\n */\nvar IMAGE_REPLAYS = {\n    'image': [\n        ReplayType.POLYGON,\n        ReplayType.CIRCLE,\n        ReplayType.LINE_STRING,\n        ReplayType.IMAGE,\n        ReplayType.TEXT,\n    ],\n    'hybrid': [ReplayType.POLYGON, ReplayType.LINE_STRING],\n    'vector': [],\n};\n/**\n * @type {!Object<string, Array<import(\"../../render/canvas/BuilderType.js\").default>>}\n */\nvar VECTOR_REPLAYS = {\n    'hybrid': [ReplayType.IMAGE, ReplayType.TEXT, ReplayType.DEFAULT],\n    'vector': [\n        ReplayType.POLYGON,\n        ReplayType.CIRCLE,\n        ReplayType.LINE_STRING,\n        ReplayType.IMAGE,\n        ReplayType.TEXT,\n        ReplayType.DEFAULT,\n    ],\n};\n/**\n * @classdesc\n * Canvas renderer for vector tile layers.\n * @api\n */\nvar CanvasVectorTileLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasVectorTileLayerRenderer, _super);\n    /**\n     * @param {import(\"../../layer/VectorTile.js\").default} layer VectorTile layer.\n     */\n    function CanvasVectorTileLayerRenderer(layer) {\n        var _this = _super.call(this, layer) || this;\n        /** @private */\n        _this.boundHandleStyleImageChange_ = _this.handleStyleImageChange_.bind(_this);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.dirty_ = false;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedLayerRevision_;\n        /**\n         * @private\n         * @type {import(\"../../transform\").Transform}\n         */\n        _this.renderedPixelToCoordinateTransform_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRotation_;\n        /**\n         * @private\n         * @type {!Object<string, import(\"../../VectorRenderTile.js\").default>}\n         */\n        _this.renderTileImageQueue_ = {};\n        /**\n         * @type {Object<string, import(\"../../events.js\").EventsKey>}\n         */\n        _this.tileListenerKeys_ = {};\n        /**\n         * @private\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.tmpTransform_ = createTransform();\n        return _this;\n    }\n    /**\n     * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../../proj/Projection\").default} projection Projection.\n     * @param {boolean} queue Queue tile for rendering.\n     * @return {boolean|undefined} Tile needs to be rendered.\n     */\n    CanvasVectorTileLayerRenderer.prototype.prepareTile = function (tile, pixelRatio, projection, queue) {\n        var render;\n        var tileUid = getUid(tile);\n        var state = tile.getState();\n        if ((state === TileState.LOADED || state === TileState.ERROR) &&\n            tileUid in this.tileListenerKeys_) {\n            unlistenByKey(this.tileListenerKeys_[tileUid]);\n            delete this.tileListenerKeys_[tileUid];\n        }\n        if (state === TileState.LOADED || state === TileState.ERROR) {\n            this.updateExecutorGroup_(tile, pixelRatio, projection);\n            if (this.tileImageNeedsRender_(tile)) {\n                render = true;\n                if (queue) {\n                    this.renderTileImageQueue_[tileUid] = tile;\n                }\n            }\n        }\n        return render;\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {!import(\"../../Tile.js\").default} Tile.\n     */\n    CanvasVectorTileLayerRenderer.prototype.getTile = function (z, x, y, frameState) {\n        var pixelRatio = frameState.pixelRatio;\n        var viewState = frameState.viewState;\n        var resolution = viewState.resolution;\n        var projection = viewState.projection;\n        var layer = this.getLayer();\n        var tile = layer.getSource().getTile(z, x, y, pixelRatio, projection);\n        if (tile.getState() < TileState.LOADED) {\n            tile.wantedResolution = resolution;\n            var tileUid = getUid(tile);\n            if (!(tileUid in this.tileListenerKeys_)) {\n                var listenerKey = listen(tile, EventType.CHANGE, this.prepareTile.bind(this, tile, pixelRatio, projection, true));\n                this.tileListenerKeys_[tileUid] = listenerKey;\n            }\n        }\n        else {\n            var viewHints = frameState.viewHints;\n            var hifi = !(viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]);\n            if (hifi || !tile.wantedResolution) {\n                tile.wantedResolution = resolution;\n            }\n            var render = this.prepareTile(tile, pixelRatio, projection, false);\n            if (render && layer.getRenderMode() !== VectorTileRenderType.VECTOR) {\n                this.renderTileImage_(tile, frameState);\n            }\n        }\n        return _super.prototype.getTile.call(this, z, x, y, frameState);\n    };\n    /**\n     * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n     * @return {boolean} Tile is drawable.\n     */\n    CanvasVectorTileLayerRenderer.prototype.isDrawableTile = function (tile) {\n        var layer = this.getLayer();\n        return (_super.prototype.isDrawableTile.call(this, tile) &&\n            (layer.getRenderMode() === VectorTileRenderType.VECTOR\n                ? getUid(layer) in tile.executorGroups\n                : tile.hasContext(layer)));\n    };\n    /**\n     * @inheritDoc\n     */\n    CanvasVectorTileLayerRenderer.prototype.getTileImage = function (tile) {\n        return tile.getImage(this.getLayer());\n    };\n    /**\n     * Determine whether render should be called.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    CanvasVectorTileLayerRenderer.prototype.prepareFrame = function (frameState) {\n        var layerRevision = this.getLayer().getRevision();\n        if (this.renderedLayerRevision_ != layerRevision) {\n            this.renderedTiles.length = 0;\n        }\n        this.renderedLayerRevision_ = layerRevision;\n        return _super.prototype.prepareFrame.call(this, frameState);\n    };\n    /**\n     * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n     * @private\n     */\n    CanvasVectorTileLayerRenderer.prototype.updateExecutorGroup_ = function (tile, pixelRatio, projection) {\n        var layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n        var revision = layer.getRevision();\n        var renderOrder = layer.getRenderOrder() || null;\n        var resolution = tile.wantedResolution;\n        var builderState = tile.getReplayState(layer);\n        if (!builderState.dirty &&\n            builderState.renderedResolution === resolution &&\n            builderState.renderedRevision == revision &&\n            builderState.renderedRenderOrder == renderOrder) {\n            return;\n        }\n        var source = layer.getSource();\n        var declutter = layer.getDeclutter();\n        var sourceTileGrid = source.getTileGrid();\n        var tileGrid = source.getTileGridForProjection(projection);\n        var tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n        var sourceTiles = source.getSourceTiles(pixelRatio, projection, tile);\n        var layerUid = getUid(layer);\n        delete tile.hitDetectionImageData[layerUid];\n        tile.executorGroups[layerUid] = [];\n        if (declutter) {\n            tile.declutterExecutorGroups[layerUid] = [];\n        }\n        var _loop_1 = function (t, tt) {\n            var sourceTile = sourceTiles[t];\n            if (sourceTile.getState() != TileState.LOADED) {\n                return \"continue\";\n            }\n            var sourceTileCoord = sourceTile.tileCoord;\n            var sourceTileExtent = sourceTileGrid.getTileCoordExtent(sourceTileCoord);\n            var sharedExtent = getIntersection(tileExtent, sourceTileExtent);\n            var builderExtent = buffer(sharedExtent, layer.getRenderBuffer() * resolution, this_1.tmpExtent);\n            var bufferedExtent = equals(sourceTileExtent, sharedExtent)\n                ? null\n                : builderExtent;\n            builderState.dirty = false;\n            var builderGroup = new CanvasBuilderGroup(0, builderExtent, resolution, pixelRatio);\n            var declutterBuilderGroup = declutter\n                ? new CanvasBuilderGroup(0, sharedExtent, resolution, pixelRatio)\n                : undefined;\n            var squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);\n            /**\n             * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n             * @this {CanvasVectorTileLayerRenderer}\n             */\n            var render = function (feature) {\n                var styles;\n                var styleFunction = feature.getStyleFunction() || layer.getStyleFunction();\n                if (styleFunction) {\n                    styles = styleFunction(feature, resolution);\n                }\n                if (styles) {\n                    var dirty = this.renderFeature(feature, squaredTolerance, styles, builderGroup, declutterBuilderGroup);\n                    this.dirty_ = this.dirty_ || dirty;\n                    builderState.dirty = builderState.dirty || dirty;\n                }\n            };\n            var features = sourceTile.getFeatures();\n            if (renderOrder && renderOrder !== builderState.renderedRenderOrder) {\n                features.sort(renderOrder);\n            }\n            for (var i = 0, ii = features.length; i < ii; ++i) {\n                var feature = features[i];\n                if (!bufferedExtent ||\n                    intersects(bufferedExtent, feature.getGeometry().getExtent())) {\n                    render.call(this_1, feature);\n                }\n            }\n            var executorGroupInstructions = builderGroup.finish();\n            // no need to clip when the render tile is covered by a single source tile\n            var replayExtent = layer.getRenderMode() !== VectorTileRenderType.VECTOR &&\n                declutter &&\n                sourceTiles.length === 1\n                ? null\n                : sharedExtent;\n            var renderingReplayGroup = new CanvasExecutorGroup(replayExtent, resolution, pixelRatio, source.getOverlaps(), executorGroupInstructions, layer.getRenderBuffer());\n            tile.executorGroups[layerUid].push(renderingReplayGroup);\n            if (declutterBuilderGroup) {\n                var declutterExecutorGroup = new CanvasExecutorGroup(null, resolution, pixelRatio, source.getOverlaps(), declutterBuilderGroup.finish(), layer.getRenderBuffer());\n                tile.declutterExecutorGroups[layerUid].push(declutterExecutorGroup);\n            }\n        };\n        var this_1 = this;\n        for (var t = 0, tt = sourceTiles.length; t < tt; ++t) {\n            _loop_1(t, tt);\n        }\n        builderState.renderedRevision = revision;\n        builderState.renderedRenderOrder = renderOrder;\n        builderState.renderedResolution = resolution;\n    };\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {import(\"../vector.js\").FeatureCallback<T>} callback Feature callback.\n     * @param {Array<import(\"../Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, callback, matches) {\n        var resolution = frameState.viewState.resolution;\n        var rotation = frameState.viewState.rotation;\n        hitTolerance = hitTolerance == undefined ? 0 : hitTolerance;\n        var layer = this.getLayer();\n        var source = layer.getSource();\n        var tileGrid = source.getTileGridForProjection(frameState.viewState.projection);\n        var hitExtent = boundingExtent([coordinate]);\n        buffer(hitExtent, resolution * hitTolerance, hitExtent);\n        /** @type {!Object<string, import(\"../Map.js\").HitMatch<T>|true>} */\n        var features = {};\n        /**\n         * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n         * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n         * @param {number} distanceSq The squared distance to the click position.\n         * @return {T|undefined} Callback result.\n         */\n        var featureCallback = function (feature, geometry, distanceSq) {\n            var key = feature.getId();\n            if (key === undefined) {\n                key = getUid(feature);\n            }\n            var match = features[key];\n            if (!match) {\n                if (distanceSq === 0) {\n                    features[key] = true;\n                    return callback(feature, layer, geometry);\n                }\n                matches.push((features[key] = {\n                    feature: feature,\n                    layer: layer,\n                    geometry: geometry,\n                    distanceSq: distanceSq,\n                    callback: callback,\n                }));\n            }\n            else if (match !== true && distanceSq < match.distanceSq) {\n                if (distanceSq === 0) {\n                    features[key] = true;\n                    matches.splice(matches.lastIndexOf(match), 1);\n                    return callback(feature, layer, geometry);\n                }\n                match.geometry = geometry;\n                match.distanceSq = distanceSq;\n            }\n            return undefined;\n        };\n        var renderedTiles = \n        /** @type {Array<import(\"../../VectorRenderTile.js\").default>} */ (this.renderedTiles);\n        var found;\n        var _loop_2 = function (i, ii) {\n            var tile = renderedTiles[i];\n            var tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n            if (!intersects(tileExtent, hitExtent)) {\n                return \"continue\";\n            }\n            var layerUid = getUid(layer);\n            var executorGroups = [tile.executorGroups[layerUid]];\n            var declutterExecutorGroups = tile.declutterExecutorGroups[layerUid];\n            if (declutterExecutorGroups) {\n                executorGroups.push(declutterExecutorGroups);\n            }\n            executorGroups.some(function (executorGroups) {\n                var declutteredFeatures = executorGroups === declutterExecutorGroups\n                    ? frameState.declutterTree.all().map(function (item) { return item.value; })\n                    : null;\n                for (var t = 0, tt = executorGroups.length; t < tt; ++t) {\n                    var executorGroup = executorGroups[t];\n                    found = executorGroup.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, featureCallback, declutteredFeatures);\n                    if (found) {\n                        return true;\n                    }\n                }\n            });\n        };\n        for (var i = 0, ii = renderedTiles.length; !found && i < ii; ++i) {\n            _loop_2(i, ii);\n        }\n        return found;\n    };\n    /**\n     * Asynchronous layer level hit detection.\n     * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../../Feature\").default>>} Promise that resolves with an array of features.\n     */\n    CanvasVectorTileLayerRenderer.prototype.getFeatures = function (pixel) {\n        return new Promise(function (resolve, reject) {\n            var layer = \n            /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n            var layerUid = getUid(layer);\n            var source = layer.getSource();\n            var projection = this.renderedProjection;\n            var projectionExtent = projection.getExtent();\n            var resolution = this.renderedResolution;\n            var tileGrid = source.getTileGridForProjection(projection);\n            var coordinate = applyTransform(this.renderedPixelToCoordinateTransform_, pixel.slice());\n            var tileCoord = tileGrid.getTileCoordForCoordAndResolution(coordinate, resolution);\n            var tile;\n            for (var i = 0, ii = this.renderedTiles.length; i < ii; ++i) {\n                if (tileCoord.toString() === this.renderedTiles[i].tileCoord.toString()) {\n                    tile = this.renderedTiles[i];\n                    if (tile.getState() === TileState.LOADED) {\n                        var extent_1 = tileGrid.getTileCoordExtent(tile.tileCoord);\n                        if (source.getWrapX() &&\n                            projection.canWrapX() &&\n                            !containsExtent(projectionExtent, extent_1)) {\n                            wrapX(coordinate, projection);\n                        }\n                        break;\n                    }\n                    tile = undefined;\n                }\n            }\n            if (!tile || tile.loadingSourceTiles > 0) {\n                resolve([]);\n                return;\n            }\n            var extent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n            var corner = getTopLeft(extent);\n            var tilePixel = [\n                (coordinate[0] - corner[0]) / resolution,\n                (corner[1] - coordinate[1]) / resolution,\n            ];\n            var features = tile\n                .getSourceTiles()\n                .reduce(function (accumulator, sourceTile) {\n                return accumulator.concat(sourceTile.getFeatures());\n            }, []);\n            var hitDetectionImageData = tile.hitDetectionImageData[layerUid];\n            if (!hitDetectionImageData && !this.animatingOrInteracting_) {\n                var tileSize = toSize(tileGrid.getTileSize(tileGrid.getZForResolution(resolution)));\n                var rotation = this.renderedRotation_;\n                var transforms = [\n                    this.getRenderTransform(tileGrid.getTileCoordCenter(tile.wrappedTileCoord), resolution, 0, HIT_DETECT_RESOLUTION, tileSize[0] * HIT_DETECT_RESOLUTION, tileSize[1] * HIT_DETECT_RESOLUTION, 0),\n                ];\n                hitDetectionImageData = createHitDetectionImageData(tileSize, transforms, features, layer.getStyleFunction(), tileGrid.getTileCoordExtent(tile.wrappedTileCoord), tile.getReplayState(layer).renderedResolution, rotation);\n                tile.hitDetectionImageData[layerUid] = hitDetectionImageData;\n            }\n            resolve(hitDetect(tilePixel, features, hitDetectionImageData));\n        }.bind(this));\n    };\n    /**\n     * Perform action necessary to get the layer rendered after new fonts have loaded\n     */\n    CanvasVectorTileLayerRenderer.prototype.handleFontsChanged = function () {\n        clear(this.renderTileImageQueue_);\n        var layer = this.getLayer();\n        if (layer.getVisible() && this.renderedLayerRevision_ !== undefined) {\n            layer.changed();\n        }\n    };\n    /**\n     * Handle changes in image style state.\n     * @param {import(\"../../events/Event.js\").default} event Image style change event.\n     * @private\n     */\n    CanvasVectorTileLayerRenderer.prototype.handleStyleImageChange_ = function (event) {\n        this.renderIfReadyAndVisible();\n    };\n    /**\n     * Render declutter items for this layer\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    CanvasVectorTileLayerRenderer.prototype.renderDeclutter = function (frameState) {\n        var context = this.context;\n        var alpha = context.globalAlpha;\n        context.globalAlpha = this.getLayer().getOpacity();\n        var viewHints = frameState.viewHints;\n        var hifi = !(viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]);\n        var tiles = \n        /** @type {Array<import(\"../../VectorRenderTile.js\").default>} */ (this.renderedTiles);\n        for (var i = 0, ii = tiles.length; i < ii; ++i) {\n            var tile = tiles[i];\n            var declutterExecutorGroups = tile.declutterExecutorGroups[getUid(this.getLayer())];\n            if (declutterExecutorGroups) {\n                for (var j = declutterExecutorGroups.length - 1; j >= 0; --j) {\n                    declutterExecutorGroups[j].execute(this.context, 1, this.getTileRenderTransform(tile, frameState), frameState.viewState.rotation, hifi, undefined, frameState.declutterTree);\n                }\n            }\n        }\n        context.globalAlpha = alpha;\n    };\n    CanvasVectorTileLayerRenderer.prototype.getTileRenderTransform = function (tile, frameState) {\n        var pixelRatio = frameState.pixelRatio;\n        var viewState = frameState.viewState;\n        var center = viewState.center;\n        var resolution = viewState.resolution;\n        var rotation = viewState.rotation;\n        var size = frameState.size;\n        var width = Math.round(size[0] * pixelRatio);\n        var height = Math.round(size[1] * pixelRatio);\n        var source = this.getLayer().getSource();\n        var tileGrid = source.getTileGridForProjection(frameState.viewState.projection);\n        var tileCoord = tile.tileCoord;\n        var tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);\n        var worldOffset = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent)[0] - tileExtent[0];\n        var transform = multiply(scale(this.inversePixelTransform.slice(), 1 / pixelRatio, 1 / pixelRatio), this.getRenderTransform(center, resolution, rotation, pixelRatio, width, height, worldOffset));\n        return transform;\n    };\n    /**\n     * Render the layer.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target that may be used to render content to.\n     * @return {HTMLElement} The rendered element.\n     */\n    CanvasVectorTileLayerRenderer.prototype.renderFrame = function (frameState, target) {\n        var viewHints = frameState.viewHints;\n        var hifi = !(viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]);\n        this.renderQueuedTileImages_(hifi, frameState);\n        _super.prototype.renderFrame.call(this, frameState, target);\n        this.renderedPixelToCoordinateTransform_ =\n            frameState.pixelToCoordinateTransform.slice();\n        this.renderedRotation_ = frameState.viewState.rotation;\n        var layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n        var renderMode = layer.getRenderMode();\n        var source = layer.getSource();\n        // Unqueue tiles from the image queue when we don't need any more\n        var usedTiles = frameState.usedTiles[getUid(source)];\n        for (var tileUid in this.renderTileImageQueue_) {\n            if (!usedTiles || !(tileUid in usedTiles)) {\n                delete this.renderTileImageQueue_[tileUid];\n            }\n        }\n        var context = this.context;\n        var alpha = context.globalAlpha;\n        context.globalAlpha = layer.getOpacity();\n        var replayTypes = VECTOR_REPLAYS[renderMode];\n        var viewState = frameState.viewState;\n        var rotation = viewState.rotation;\n        var tiles = this.renderedTiles;\n        var clips = [];\n        var clipZs = [];\n        for (var i = tiles.length - 1; i >= 0; --i) {\n            var tile = /** @type {import(\"../../VectorRenderTile.js\").default} */ (tiles[i]);\n            var transform = this.getTileRenderTransform(tile, frameState);\n            var executorGroups = tile.executorGroups[getUid(layer)];\n            var clipped = false;\n            for (var t = 0, tt = executorGroups.length; t < tt; ++t) {\n                var executorGroup = executorGroups[t];\n                if (!executorGroup.hasExecutors(replayTypes)) {\n                    // sourceTile has no instructions of the types we want to render\n                    continue;\n                }\n                var currentZ = tile.tileCoord[0];\n                var currentClip = void 0;\n                if (!clipped) {\n                    currentClip = executorGroup.getClipCoords(transform);\n                    if (currentClip) {\n                        context.save();\n                        // Create a clip mask for regions in this low resolution tile that are\n                        // already filled by a higher resolution tile\n                        for (var j = 0, jj = clips.length; j < jj; ++j) {\n                            var clip = clips[j];\n                            if (currentZ < clipZs[j]) {\n                                context.beginPath();\n                                // counter-clockwise (outer ring) for current tile\n                                context.moveTo(currentClip[0], currentClip[1]);\n                                context.lineTo(currentClip[2], currentClip[3]);\n                                context.lineTo(currentClip[4], currentClip[5]);\n                                context.lineTo(currentClip[6], currentClip[7]);\n                                // clockwise (inner ring) for higher resolution tile\n                                context.moveTo(clip[6], clip[7]);\n                                context.lineTo(clip[4], clip[5]);\n                                context.lineTo(clip[2], clip[3]);\n                                context.lineTo(clip[0], clip[1]);\n                                context.clip();\n                            }\n                        }\n                    }\n                }\n                executorGroup.execute(context, 1, transform, rotation, hifi, replayTypes);\n                if (!clipped && currentClip) {\n                    context.restore();\n                    clips.push(currentClip);\n                    clipZs.push(currentZ);\n                    clipped = true;\n                }\n            }\n        }\n        context.globalAlpha = alpha;\n        return this.container;\n    };\n    /**\n     * @param {boolean} hifi We have time to render a high fidelity map image.\n     * @param {import('../../PluggableMap.js').FrameState} frameState Frame state.\n     */\n    CanvasVectorTileLayerRenderer.prototype.renderQueuedTileImages_ = function (hifi, frameState) {\n        // When we don't have time to render hifi, only render tiles until we have used up\n        // half of the frame budget of 16 ms\n        for (var uid in this.renderTileImageQueue_) {\n            if (!hifi && Date.now() - frameState.time > 8) {\n                frameState.animate = true;\n                break;\n            }\n            var tile = this.renderTileImageQueue_[uid];\n            delete this.renderTileImageQueue_[uid];\n            this.renderTileImage_(tile, frameState);\n        }\n    };\n    /**\n     * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n     * @param {number} squaredTolerance Squared tolerance.\n     * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or array of styles.\n     * @param {import(\"../../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n     * @param {import(\"../../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder group for decluttering.\n     * @return {boolean} `true` if an image is loading.\n     */\n    CanvasVectorTileLayerRenderer.prototype.renderFeature = function (feature, squaredTolerance, styles, builderGroup, opt_declutterBuilderGroup) {\n        if (!styles) {\n            return false;\n        }\n        var loading = false;\n        if (Array.isArray(styles)) {\n            for (var i = 0, ii = styles.length; i < ii; ++i) {\n                loading =\n                    renderFeature(builderGroup, feature, styles[i], squaredTolerance, this.boundHandleStyleImageChange_, undefined, opt_declutterBuilderGroup) || loading;\n            }\n        }\n        else {\n            loading = renderFeature(builderGroup, feature, styles, squaredTolerance, this.boundHandleStyleImageChange_, undefined, opt_declutterBuilderGroup);\n        }\n        return loading;\n    };\n    /**\n     * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n     * @return {boolean} A new tile image was rendered.\n     * @private\n     */\n    CanvasVectorTileLayerRenderer.prototype.tileImageNeedsRender_ = function (tile) {\n        var layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n        if (layer.getRenderMode() === VectorTileRenderType.VECTOR) {\n            return false;\n        }\n        var replayState = tile.getReplayState(layer);\n        var revision = layer.getRevision();\n        var resolution = tile.wantedResolution;\n        return (replayState.renderedTileResolution !== resolution ||\n            replayState.renderedTileRevision !== revision);\n    };\n    /**\n     * @param {import(\"../../VectorRenderTile.js\").default} tile Tile.\n     * @param {import(\"../../PluggableMap\").FrameState} frameState Frame state.\n     * @private\n     */\n    CanvasVectorTileLayerRenderer.prototype.renderTileImage_ = function (tile, frameState) {\n        var layer = /** @type {import(\"../../layer/VectorTile.js\").default} */ (this.getLayer());\n        var replayState = tile.getReplayState(layer);\n        var revision = layer.getRevision();\n        var executorGroups = tile.executorGroups[getUid(layer)];\n        replayState.renderedTileRevision = revision;\n        var tileCoord = tile.wrappedTileCoord;\n        var z = tileCoord[0];\n        var source = layer.getSource();\n        var pixelRatio = frameState.pixelRatio;\n        var viewState = frameState.viewState;\n        var projection = viewState.projection;\n        var tileGrid = source.getTileGridForProjection(projection);\n        var tileResolution = tileGrid.getResolution(tile.tileCoord[0]);\n        var renderPixelRatio = (frameState.pixelRatio / tile.wantedResolution) * tileResolution;\n        var resolution = tileGrid.getResolution(z);\n        var context = tile.getContext(layer);\n        // Increase tile size when overzooming for low pixel ratio, to avoid blurry tiles\n        pixelRatio = Math.round(Math.max(pixelRatio, renderPixelRatio / pixelRatio));\n        var size = source.getTilePixelSize(z, pixelRatio, projection);\n        context.canvas.width = size[0];\n        context.canvas.height = size[1];\n        var renderScale = pixelRatio / renderPixelRatio;\n        if (renderScale !== 1) {\n            var canvasTransform = resetTransform(this.tmpTransform_);\n            scaleTransform(canvasTransform, renderScale, renderScale);\n            context.setTransform.apply(context, canvasTransform);\n        }\n        var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent);\n        var pixelScale = renderPixelRatio / resolution;\n        var transform = resetTransform(this.tmpTransform_);\n        scaleTransform(transform, pixelScale, -pixelScale);\n        translateTransform(transform, -tileExtent[0], -tileExtent[3]);\n        for (var i = 0, ii = executorGroups.length; i < ii; ++i) {\n            var executorGroup = executorGroups[i];\n            executorGroup.execute(context, renderScale, transform, 0, true, IMAGE_REPLAYS[layer.getRenderMode()]);\n        }\n        replayState.renderedTileResolution = tile.wantedResolution;\n    };\n    return CanvasVectorTileLayerRenderer;\n}(CanvasTileLayerRenderer));\nexport default CanvasVectorTileLayerRenderer;\n//# sourceMappingURL=VectorTileLayer.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/VectorTile\n */\nimport BaseVectorLayer from './BaseVector.js';\nimport CanvasVectorTileLayerRenderer from '../renderer/canvas/VectorTileLayer.js';\nimport TileProperty from './TileProperty.js';\nimport VectorTileRenderType from './VectorTileRenderType.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable\").OnSignature<import(\"./Base\").BaseLayerObjectEventTypes|\n *     'change:source'|'change:preload'|'change:useInterimTilesOnError', import(\"../Object\").ObjectEvent, Return> &\n *   import(\"../Observable\").OnSignature<import(\"../render/EventType\").LayerRenderEventTypes, import(\"../render/Event\").default, Return> &\n *   import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"./Base\").BaseLayerObjectEventTypes|\n *     'change:source'|'change:preload'|'change:useInterimTilesOnError'|import(\"../render/EventType\").LayerRenderEventTypes, Return>} VectorTileLayerOnSignature\n */\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the\n * renderer when getting features from the vector tile for the rendering or hit-detection.\n * Recommended value: Vector tiles are usually generated with a buffer, so this value should match\n * the largest possible buffer of the used tiles. It should be at least the size of the largest\n * point symbol or line width.\n * @property {import(\"./VectorTileRenderType.js\").default|string} [renderMode='hybrid'] Render mode for vector tiles:\n *  * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom\n *    animations. Point symbols and texts are accurately rendered as vectors and can stay upright on\n *    rotated views.\n *  * `'vector'`: Everything is rendered as vectors. Use this mode for improved performance on vector\n *    tile layers with only a few rendered features (e.g. for highlighting a subset of features of\n *    another layer with the same source).\n * @property {import(\"../source/VectorTile.js\").default} [source] Source.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link import(\"../PluggableMap.js\").default#addLayer map.addLayer()}.\n * @property {boolean} [declutter=false] Declutter images and text. Decluttering is applied to all\n * image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority\n * is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.\n * Higher z-index means higher priority. Within the same z-index, a feature rendered before another has\n * higher priority.\n * @property {import(\"../style/Style.js\").StyleLike} [style] Layer style. See\n * {@link import(\"../style/Style.js\").default the style docs} for the default style that will be used if\n * this is not defined.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be\n * recreated during animations. This means that no vectors will be shown clipped, but the setting\n * will have a performance impact for large amounts of vector data. When set to `false`, batches\n * will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be\n * recreated during interactions. See also `updateWhileAnimating`.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n/**\n * @classdesc\n * Layer for vector tile data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @param {Options} [opt_options] Options.\n * @extends {BaseVectorLayer<import(\"../source/VectorTile.js\").default>}\n * @api\n */\nvar VectorTileLayer = /** @class */ (function (_super) {\n    __extends(VectorTileLayer, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function VectorTileLayer(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var baseOptions = /** @type {Object} */ (assign({}, options));\n        delete baseOptions.preload;\n        delete baseOptions.useInterimTilesOnError;\n        _this = _super.call(this, \n        /** @type {import(\"./BaseVector.js\").Options<import(\"../source/VectorTile.js\").default>} */ (baseOptions)) || this;\n        /***\n         * @type {VectorTileLayerOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {VectorTileLayerOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {VectorTileLayerOnSignature<void>}\n         */\n        _this.un;\n        if (options.renderMode === VectorTileRenderType.IMAGE) {\n            //FIXME deprecated - remove this check in v7.\n            //eslint-disable-next-line\n            console.warn('renderMode: \"image\" is deprecated. Option ignored.');\n            options.renderMode = undefined;\n        }\n        var renderMode = options.renderMode || VectorTileRenderType.HYBRID;\n        assert(renderMode == VectorTileRenderType.HYBRID ||\n            renderMode == VectorTileRenderType.VECTOR, 28); // `renderMode` must be `'hybrid'` or `'vector'`.\n        /**\n         * @private\n         * @type {import(\"./VectorTileRenderType.js\").default}\n         */\n        _this.renderMode_ = renderMode;\n        _this.setPreload(options.preload ? options.preload : 0);\n        _this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined\n            ? options.useInterimTilesOnError\n            : true);\n        return _this;\n    }\n    /**\n     * Create a renderer for this layer.\n     * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n     * @protected\n     */\n    VectorTileLayer.prototype.createRenderer = function () {\n        return new CanvasVectorTileLayerRenderer(this);\n    };\n    /**\n     * Get the topmost feature that intersects the given pixel on the viewport. Returns a promise\n     * that resolves with an array of features. The array will either contain the topmost feature\n     * when a hit was detected, or it will be empty.\n     *\n     * The hit detection algorithm used for this method is optimized for performance, but is less\n     * accurate than the one used in {@link import(\"../PluggableMap.js\").default#getFeaturesAtPixel map.getFeaturesAtPixel()}: Text\n     * is not considered, and icons are only represented by their bounding box instead of the exact\n     * image.\n     *\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with an array of features.\n     * @api\n     */\n    VectorTileLayer.prototype.getFeatures = function (pixel) {\n        return _super.prototype.getFeatures.call(this, pixel);\n    };\n    /**\n     * @return {import(\"./VectorTileRenderType.js\").default} The render mode.\n     */\n    VectorTileLayer.prototype.getRenderMode = function () {\n        return this.renderMode_;\n    };\n    /**\n     * Return the level as number to which we will preload tiles up to.\n     * @return {number} The level to preload tiles up to.\n     * @observable\n     * @api\n     */\n    VectorTileLayer.prototype.getPreload = function () {\n        return /** @type {number} */ (this.get(TileProperty.PRELOAD));\n    };\n    /**\n     * Whether we use interim tiles on error.\n     * @return {boolean} Use interim tiles on error.\n     * @observable\n     * @api\n     */\n    VectorTileLayer.prototype.getUseInterimTilesOnError = function () {\n        return /** @type {boolean} */ (this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR));\n    };\n    /**\n     * Set the level as number to which we will preload tiles up to.\n     * @param {number} preload The level to preload tiles up to.\n     * @observable\n     * @api\n     */\n    VectorTileLayer.prototype.setPreload = function (preload) {\n        this.set(TileProperty.PRELOAD, preload);\n    };\n    /**\n     * Set whether we use interim tiles on error.\n     * @param {boolean} useInterimTilesOnError Use interim tiles on error.\n     * @observable\n     * @api\n     */\n    VectorTileLayer.prototype.setUseInterimTilesOnError = function (useInterimTilesOnError) {\n        this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n    };\n    return VectorTileLayer;\n}(BaseVectorLayer));\nexport default VectorTileLayer;\n//# sourceMappingURL=VectorTile.js.map","import EventType from 'ol/events/EventType.js';\nimport { labelCache } from 'ol/render/canvas.js';\nimport { listen } from 'ol/events.js';\n/**\n * Polyfill for Object.assign().  Assigns enumerable and own properties from\n * one or more source objects to a target object.\n * See https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign.\n *\n * @param {!Object} target The target object.\n * @param {...Object} var_sources The source object(s).\n * @return {!Object} The modified target object.\n */\nexport var assign = typeof Object.assign === 'function'\n    ? Object.assign\n    : function (target, var_sources) {\n        if (target === undefined || target === null) {\n            throw new TypeError('Cannot convert undefined or null to object');\n        }\n        var output = Object(target);\n        for (var i = 1, ii = arguments.length; i < ii; ++i) {\n            var source = arguments[i];\n            if (source !== undefined && source !== null) {\n                for (var key in source) {\n                    if (source.hasOwnProperty(key)) {\n                        output[key] = source[key];\n                    }\n                }\n            }\n        }\n        return output;\n    };\nexport function deg2rad(degrees) {\n    return (degrees * Math.PI) / 180;\n}\nexport var defaultResolutions = (function () {\n    var resolutions = [];\n    for (var res = 78271.51696402048; resolutions.length <= 24; res /= 2) {\n        resolutions.push(res);\n    }\n    return resolutions;\n})();\n/**\n * @param {number} width Width of the canvas.\n * @param {number} height Height of the canvas.\n * @return {HTMLCanvasElement} Canvas.\n */\nexport function createCanvas(width, height) {\n    if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope && typeof OffscreenCanvas !== 'undefined') { // eslint-disable-line\n        return /** @type {?} */ (new OffscreenCanvas(width, height));\n    }\n    else {\n        var canvas = document.createElement('canvas');\n        canvas.width = width;\n        canvas.height = height;\n        return canvas;\n    }\n}\nexport function getZoomForResolution(resolution, resolutions) {\n    var i = 0;\n    var ii = resolutions.length;\n    for (; i < ii; ++i) {\n        var candidate = resolutions[i];\n        if (candidate < resolution && i + 1 < ii) {\n            var zoomFactor = resolutions[i] / resolutions[i + 1];\n            return i + Math.log(resolutions[i] / resolution) / Math.log(zoomFactor);\n        }\n    }\n    return ii - 1;\n}\nvar hairSpacePool = Array(256).join('\\u200A');\nexport function applyLetterSpacing(text, letterSpacing) {\n    if (letterSpacing >= 0.05) {\n        var textWithLetterSpacing = '';\n        var lines = text.split('\\n');\n        var joinSpaceString = hairSpacePool.slice(0, Math.round(letterSpacing / 0.1));\n        for (var l = 0, ll = lines.length; l < ll; ++l) {\n            if (l > 0) {\n                textWithLetterSpacing += '\\n';\n            }\n            textWithLetterSpacing += lines[l].split('').join(joinSpaceString);\n        }\n        return textWithLetterSpacing;\n    }\n    return text;\n}\nvar measureContext;\nfunction getMeasureContext() {\n    if (!measureContext) {\n        measureContext = createCanvas(1, 1).getContext('2d');\n    }\n    return measureContext;\n}\nfunction measureText(text, letterSpacing) {\n    return (getMeasureContext().measureText(text).width +\n        (text.length - 1) * letterSpacing);\n}\nvar measureCache = {};\nif (labelCache) {\n    // Only available when using ES modules\n    listen(labelCache, EventType.CLEAR, function () {\n        measureCache = {};\n    });\n}\nexport function wrapText(text, font, em, letterSpacing) {\n    if (text.indexOf('\\n') !== -1) {\n        var hardLines = text.split('\\n');\n        var lines = [];\n        for (var i = 0, ii = hardLines.length; i < ii; ++i) {\n            lines.push(wrapText(hardLines[i], font, em, letterSpacing));\n        }\n        return lines.join('\\n');\n    }\n    var key = em + ',' + font + ',' + text + ',' + letterSpacing;\n    var wrappedText = measureCache[key];\n    if (!wrappedText) {\n        var words = text.split(' ');\n        if (words.length > 1) {\n            var ctx = getMeasureContext();\n            ctx.font = font;\n            var oneEm = ctx.measureText('M').width;\n            var maxWidth = oneEm * em;\n            var line = '';\n            var lines = [];\n            // Pass 1 - wrap lines to not exceed maxWidth\n            for (var i = 0, ii = words.length; i < ii; ++i) {\n                var word = words[i];\n                var testLine = line + (line ? ' ' : '') + word;\n                if (measureText(testLine, letterSpacing) <= maxWidth) {\n                    line = testLine;\n                }\n                else {\n                    if (line) {\n                        lines.push(line);\n                    }\n                    line = word;\n                }\n            }\n            if (line) {\n                lines.push(line);\n            }\n            // Pass 2 - add lines with a width of less than 30% of maxWidth to the previous or next line\n            for (var i = 0, ii = lines.length; i < ii && ii > 1; ++i) {\n                var line_1 = lines[i];\n                if (measureText(line_1, letterSpacing) < maxWidth * 0.35) {\n                    var prevWidth = i > 0 ? measureText(lines[i - 1], letterSpacing) : Infinity;\n                    var nextWidth = i < ii - 1 ? measureText(lines[i + 1], letterSpacing) : Infinity;\n                    lines.splice(i, 1);\n                    ii -= 1;\n                    if (prevWidth < nextWidth) {\n                        lines[i - 1] += ' ' + line_1;\n                        i -= 1;\n                    }\n                    else {\n                        lines[i] = line_1 + ' ' + lines[i];\n                    }\n                }\n            }\n            // Pass 3 - try to fill 80% of maxWidth for each line\n            for (var i = 0, ii = lines.length - 1; i < ii; ++i) {\n                var line_2 = lines[i];\n                var next = lines[i + 1];\n                if (measureText(line_2, letterSpacing) > maxWidth * 0.7 &&\n                    measureText(next, letterSpacing) < maxWidth * 0.6) {\n                    var lineWords = line_2.split(' ');\n                    var lastWord = lineWords.pop();\n                    if (measureText(lastWord, letterSpacing) < maxWidth * 0.2) {\n                        lines[i] = lineWords.join(' ');\n                        lines[i + 1] = lastWord + ' ' + next;\n                    }\n                    ii -= 1;\n                }\n            }\n            wrappedText = lines.join('\\n');\n        }\n        else {\n            wrappedText = text;\n        }\n        wrappedText = applyLetterSpacing(wrappedText, letterSpacing);\n        measureCache[key] = wrappedText;\n    }\n    return wrappedText;\n}\n//# sourceMappingURL=util.js.map","/*\nol-mapbox-style - Use Mapbox Style objects with OpenLayers\nCopyright 2016-present ol-mapbox-style contributors\nLicense: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LICENSE\n*/\nimport Circle from 'ol/style/Circle.js';\nimport Fill from 'ol/style/Fill.js';\nimport Icon from 'ol/style/Icon.js';\nimport RenderFeature from 'ol/render/Feature.js';\nimport Stroke from 'ol/style/Stroke.js';\nimport Style from 'ol/style/Style.js';\nimport Text from 'ol/style/Text.js';\nimport mb2css from 'mapbox-to-css-font';\nimport { Color, featureFilter as createFilter, derefLayers, expression, function as fn, latest as spec, } from '@mapbox/mapbox-gl-style-spec/dist/index.es.js';\nimport { applyLetterSpacing, createCanvas, defaultResolutions, deg2rad, getZoomForResolution, wrapText, } from './util.js';\n/**\n * @typedef {import(\"ol/layer/Vector\").default} VectorLayer\n * @typedef {import(\"ol/layer/VectorTile\").default} VectorTileLayer\n * @typedef {import(\"ol/style/Style\").StyleFunction} StyleFunction\n */\nvar isFunction = fn.isFunction;\nvar convertFunction = fn.convertFunction;\nvar isExpression = expression.isExpression;\nvar createPropertyExpression = expression.createPropertyExpression;\nvar types = {\n    'Point': 1,\n    'MultiPoint': 1,\n    'LineString': 2,\n    'MultiLineString': 2,\n    'Polygon': 3,\n    'MultiPolygon': 3,\n};\nvar anchor = {\n    'center': [0.5, 0.5],\n    'left': [0, 0.5],\n    'right': [1, 0.5],\n    'top': [0.5, 0],\n    'bottom': [0.5, 1],\n    'top-left': [0, 0],\n    'top-right': [1, 0],\n    'bottom-left': [0, 1],\n    'bottom-right': [1, 1],\n};\nvar expressionData = function (rawExpression, propertySpec) {\n    var compiledExpression = createPropertyExpression(rawExpression, propertySpec);\n    if (compiledExpression.result === 'error') {\n        throw new Error(compiledExpression.value\n            .map(function (err) { return err.key + \": \" + err.message; })\n            .join(', '));\n    }\n    return compiledExpression.value;\n};\nvar emptyObj = {};\nvar zoomObj = { zoom: 0 };\n/** @private */\nvar functionCache = {};\nvar renderFeatureCoordinates, renderFeature;\n/**\n * @private\n * @param {Object} layer Gl object layer.\n * @param {string} layoutOrPaint 'layout' or 'paint'.\n * @param {string} property Feature property.\n * @param {number} zoom Zoom.\n * @param {Object} feature Gl feature.\n * @return {?} Value.\n */\nexport function getValue(layer, layoutOrPaint, property, zoom, feature) {\n    var layerId = layer.id;\n    if (!functionCache[layerId]) {\n        functionCache[layerId] = {};\n    }\n    var functions = functionCache[layerId];\n    if (!functions[property]) {\n        var value_1 = (layer[layoutOrPaint] || emptyObj)[property];\n        var propertySpec = spec[layoutOrPaint + \"_\" + layer.type][property];\n        if (value_1 === undefined) {\n            value_1 = propertySpec.default;\n        }\n        var isExpr = isExpression(value_1);\n        if (!isExpr && isFunction(value_1)) {\n            value_1 = convertFunction(value_1, propertySpec);\n            isExpr = true;\n        }\n        if (isExpr) {\n            var compiledExpression = expressionData(value_1, propertySpec);\n            functions[property] =\n                compiledExpression.evaluate.bind(compiledExpression);\n        }\n        else {\n            if (propertySpec.type == 'color') {\n                value_1 = Color.parse(value_1);\n            }\n            functions[property] = function () {\n                return value_1;\n            };\n        }\n    }\n    zoomObj.zoom = zoom;\n    return functions[property](zoomObj, feature);\n}\n/** @private */\nvar filterCache = {};\n/**\n * @private\n * @param {string} layerId Layer id.\n * @param {?} filter Filter.\n * @param {Object} feature Feature.\n * @param {number} zoom Zoom.\n * @return {boolean} Filter result.\n */\nfunction evaluateFilter(layerId, filter, feature, zoom) {\n    if (!(layerId in filterCache)) {\n        filterCache[layerId] = createFilter(filter).filter;\n    }\n    zoomObj.zoom = zoom;\n    return filterCache[layerId](zoomObj, feature);\n}\n/**\n * @private\n * @param {?} color Color.\n * @param {number} opacity Opacity.\n * @return {string} Color.\n */\nfunction colorWithOpacity(color, opacity) {\n    if (color) {\n        if (color.a === 0 || opacity === 0) {\n            return undefined;\n        }\n        var a = color.a;\n        opacity = opacity === undefined ? 1 : opacity;\n        return ('rgba(' +\n            Math.round((color.r * 255) / a) +\n            ',' +\n            Math.round((color.g * 255) / a) +\n            ',' +\n            Math.round((color.b * 255) / a) +\n            ',' +\n            a * opacity +\n            ')');\n    }\n    return color;\n}\nvar templateRegEx = /^([^]*)\\{(.*)\\}([^]*)$/;\n/**\n * @private\n * @param {string} text Text.\n * @param {Object} properties Properties.\n * @return {string} Text.\n */\nfunction fromTemplate(text, properties) {\n    var parts;\n    do {\n        parts = text.match(templateRegEx);\n        if (parts) {\n            var value = properties[parts[2]] || '';\n            text = parts[1] + value + parts[3];\n        }\n    } while (parts);\n    return text;\n}\nvar recordLayer = false;\n/**\n * ```js\n * import {recordStyleLayer} from 'ol-mapbox-style/dist/stylefunction';\n * ```\n * Turns recording of the Mapbox Style's `layer` on and off. When turned on,\n * the layer that a rendered feature belongs to will be set as the feature's\n * `mapbox-layer` property.\n * @param {boolean} [record=false] Recording of the style layer is on.\n */\nexport function recordStyleLayer(record) {\n    recordLayer = record;\n}\n/**\n * ```js\n * import stylefunction from 'ol-mapbox-style/dist/stylefunction';\n * ```\n * Creates a style function from the `glStyle` object for all layers that use\n * the specified `source`, which needs to be a `\"type\": \"vector\"` or\n * `\"type\": \"geojson\"` source and applies it to the specified OpenLayers layer.\n *\n * Two additional properties will be set on the provided layer:\n *\n *  * `mapbox-source`: The `id` of the Mapbox Style document's source that the\n *    OpenLayers layer was created from. Usually `apply()` creates one\n *    OpenLayers layer per Mapbox Style source, unless the layer stack has\n *    layers from different sources in between.\n *  * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are\n *    included in the OpenLayers layer.\n *\n * This function also works in a web worker. In worker mode, the main thread needs\n * to listen to messages from the worker and respond with another message to make\n * sure that sprite image loading works:\n *\n * ```js\n *  worker.addEventListener('message', event => {\n *   if (event.data.action === 'loadImage') {\n *     const image = new Image();\n *     image.crossOrigin = 'anonymous';\n *     image.addEventListener('load', function() {\n *       createImageBitmap(image, 0, 0, image.width, image.height).then(imageBitmap => {\n *         worker.postMessage({\n *           action: 'imageLoaded',\n *           image: imageBitmap,\n *           src: event.data.src\n *         }, [imageBitmap]);\n *       });\n *     });\n *     image.src = event.data.src;\n *   }\n * });\n * ```\n *\n * @param {VectorLayer|VectorTileLayer} olLayer OpenLayers layer to\n * apply the style to. In addition to the style, the layer will get two\n * properties: `mapbox-source` will be the `id` of the `glStyle`'s source used\n * for the layer, and `mapbox-layers` will be an array of the `id`s of the\n * `glStyle`'s layers.\n * @param {string|Object} glStyle Mapbox Style object.\n * @param {string|Array<string>} source `source` key or an array of layer `id`s\n * from the Mapbox Style object. When a `source` key is provided, all layers for\n * the specified source will be included in the style function. When layer `id`s\n * are provided, they must be from layers that use the same source.\n * @param {Array<number>} [resolutions=[78271.51696402048, 39135.75848201024, 19567.87924100512, 9783.93962050256, 4891.96981025128, 2445.98490512564, 1222.99245256282, 611.49622628141, 305.748113140705, 152.8740565703525, 76.43702828517625, 38.21851414258813, 19.109257071294063, 9.554628535647032, 4.777314267823516, 2.388657133911758, 1.194328566955879, 0.5971642834779395, 0.29858214173896974, 0.14929107086948487, 0.07464553543474244]]\n * Resolutions for mapping resolution to zoom level.\n * @param {Object} [spriteData=undefined] Sprite data from the url specified in\n * the Mapbox Style object's `sprite` property. Only required if a `sprite`\n * property is specified in the Mapbox Style object.\n * @param {Object} [spriteImageUrl=undefined] Sprite image url for the sprite\n * specified in the Mapbox Style object's `sprite` property. Only required if a\n * `sprite` property is specified in the Mapbox Style object.\n * @param {function(Array<string>):Array<string>} [getFonts=undefined] Function that\n * receives a font stack as arguments, and returns a (modified) font stack that\n * is available. Font names are the names used in the Mapbox Style object. If\n * not provided, the font stack will be used as-is. This function can also be\n * used for loading web fonts.\n * @return {StyleFunction} Style function for use in\n * `ol.layer.Vector` or `ol.layer.VectorTile`.\n */\nexport default function (olLayer, glStyle, source, resolutions, spriteData, spriteImageUrl, getFonts) {\n    if (resolutions === void 0) { resolutions = defaultResolutions; }\n    if (typeof glStyle == 'string') {\n        glStyle = JSON.parse(glStyle);\n    }\n    if (glStyle.version != 8) {\n        throw new Error('glStyle version 8 required.');\n    }\n    var spriteImage, spriteImgSize;\n    if (spriteImageUrl) {\n        if (typeof Image !== 'undefined') {\n            var img_1 = new Image();\n            img_1.crossOrigin = 'anonymous';\n            img_1.onload = function () {\n                spriteImage = img_1;\n                spriteImgSize = [img_1.width, img_1.height];\n                olLayer.changed();\n                img_1.onload = null;\n            };\n            img_1.src = spriteImageUrl;\n        }\n        else if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { //eslint-disable-line\n            var worker = /** @type {*} */ (self);\n            // Main thread needs to handle 'loadImage' and dispatch 'imageLoaded'\n            worker.postMessage({\n                action: 'loadImage',\n                src: spriteImageUrl,\n            });\n            worker.addEventListener('message', function handler(event) {\n                if (event.data.action === 'imageLoaded' &&\n                    event.data.src === spriteImageUrl) {\n                    spriteImage = event.data.image;\n                    spriteImgSize = [spriteImage.width, spriteImage.height];\n                }\n            });\n        }\n    }\n    var allLayers = derefLayers(glStyle.layers);\n    var layersBySourceLayer = {};\n    var mapboxLayers = [];\n    var mapboxSource;\n    for (var i = 0, ii = allLayers.length; i < ii; ++i) {\n        var layer = allLayers[i];\n        var layerId = layer.id;\n        if ((typeof source == 'string' && layer.source == source) ||\n            source.indexOf(layerId) !== -1) {\n            var sourceLayer = layer['source-layer'];\n            if (!mapboxSource) {\n                mapboxSource = layer.source;\n                var source_1 = glStyle.sources[mapboxSource];\n                if (!source_1) {\n                    throw new Error(\"Source \\\"\" + mapboxSource + \"\\\" is not defined\");\n                }\n                var type = source_1.type;\n                if (type !== 'vector' && type !== 'geojson') {\n                    throw new Error(\"Source \\\"\" + mapboxSource + \"\\\" is not of type \\\"vector\\\" or \\\"geojson\\\", but \\\"\" + type + \"\\\"\");\n                }\n            }\n            var layers = layersBySourceLayer[sourceLayer];\n            if (!layers) {\n                layers = [];\n                layersBySourceLayer[sourceLayer] = layers;\n            }\n            layers.push({\n                layer: layer,\n                index: i,\n            });\n            mapboxLayers.push(layerId);\n        }\n        // TODO revisit when diffing gets added\n        delete functionCache[layerId];\n        delete filterCache[layerId];\n    }\n    var textHalo = new Stroke();\n    var textColor = new Fill();\n    var iconImageCache = {};\n    var patternCache = {};\n    var styles = [];\n    var styleFunction = function (feature, resolution) {\n        var properties = feature.getProperties();\n        var layers = layersBySourceLayer[properties.layer];\n        if (!layers) {\n            return;\n        }\n        var zoom = resolutions.indexOf(resolution);\n        if (zoom == -1) {\n            zoom = getZoomForResolution(resolution, resolutions);\n        }\n        var type = types[feature.getGeometry().getType()];\n        var f = {\n            properties: properties,\n            type: type,\n        };\n        var stylesLength = -1;\n        var featureBelongsToLayer;\n        var _loop_1 = function (i, ii) {\n            var layerData = layers[i];\n            var layer = layerData.layer;\n            var layerId = layer.id;\n            var layout = layer.layout || emptyObj;\n            var paint = layer.paint || emptyObj;\n            if (layout.visibility === 'none' ||\n                ('minzoom' in layer && zoom < layer.minzoom) ||\n                ('maxzoom' in layer && zoom >= layer.maxzoom)) {\n                return \"continue\";\n            }\n            var filter = layer.filter;\n            if (!filter || evaluateFilter(layerId, filter, f, zoom)) {\n                featureBelongsToLayer = layer;\n                var color = void 0, opacity = void 0, fill = void 0, stroke = void 0, strokeColor = void 0, style = void 0;\n                var index = layerData.index;\n                if (type == 3 &&\n                    (layer.type == 'fill' || layer.type == 'fill-extrusion')) {\n                    opacity = getValue(layer, 'paint', layer.type + '-opacity', zoom, f);\n                    if (layer.type + '-pattern' in paint) {\n                        var fillIcon = getValue(layer, 'paint', layer.type + '-pattern', zoom, f);\n                        if (fillIcon) {\n                            var icon_1 = typeof fillIcon === 'string'\n                                ? fromTemplate(fillIcon, properties)\n                                : fillIcon.toString();\n                            if (spriteImage && spriteData && spriteData[icon_1]) {\n                                ++stylesLength;\n                                style = styles[stylesLength];\n                                if (!style ||\n                                    !style.getFill() ||\n                                    style.getStroke() ||\n                                    style.getText()) {\n                                    style = new Style({\n                                        fill: new Fill(),\n                                    });\n                                    styles[stylesLength] = style;\n                                }\n                                fill = style.getFill();\n                                style.setZIndex(index);\n                                var icon_cache_key = icon_1 + '.' + opacity;\n                                var pattern = patternCache[icon_cache_key];\n                                if (!pattern) {\n                                    var spriteImageData = spriteData[icon_1];\n                                    var canvas = createCanvas(spriteImageData.width, spriteImageData.height);\n                                    var ctx = /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d'));\n                                    ctx.globalAlpha = opacity;\n                                    ctx.drawImage(spriteImage, spriteImageData.x, spriteImageData.y, spriteImageData.width, spriteImageData.height, 0, 0, spriteImageData.width, spriteImageData.height);\n                                    pattern = ctx.createPattern(canvas, 'repeat');\n                                    patternCache[icon_cache_key] = pattern;\n                                }\n                                fill.setColor(pattern);\n                            }\n                        }\n                    }\n                    else {\n                        color = colorWithOpacity(getValue(layer, 'paint', layer.type + '-color', zoom, f), opacity);\n                        if (color) {\n                            if (layer.type + '-outline-color' in paint) {\n                                strokeColor = colorWithOpacity(getValue(layer, 'paint', layer.type + '-outline-color', zoom, f), opacity);\n                            }\n                            if (!strokeColor) {\n                                strokeColor = color;\n                            }\n                            ++stylesLength;\n                            style = styles[stylesLength];\n                            if (!style ||\n                                !(style.getFill() && style.getStroke()) ||\n                                style.getText()) {\n                                style = new Style({\n                                    fill: new Fill(),\n                                    stroke: new Stroke(),\n                                });\n                                styles[stylesLength] = style;\n                            }\n                            fill = style.getFill();\n                            fill.setColor(color);\n                            stroke = style.getStroke();\n                            stroke.setColor(strokeColor);\n                            stroke.setWidth(1);\n                            style.setZIndex(index);\n                        }\n                    }\n                }\n                if (type != 1 && layer.type == 'line') {\n                    color =\n                        !('line-pattern' in paint) && 'line-color' in paint\n                            ? colorWithOpacity(getValue(layer, 'paint', 'line-color', zoom, f), getValue(layer, 'paint', 'line-opacity', zoom, f))\n                            : undefined;\n                    var width_1 = getValue(layer, 'paint', 'line-width', zoom, f);\n                    if (color && width_1 > 0) {\n                        ++stylesLength;\n                        style = styles[stylesLength];\n                        if (!style ||\n                            !style.getStroke() ||\n                            style.getFill() ||\n                            style.getText()) {\n                            style = new Style({\n                                stroke: new Stroke(),\n                            });\n                            styles[stylesLength] = style;\n                        }\n                        stroke = style.getStroke();\n                        stroke.setLineCap(getValue(layer, 'layout', 'line-cap', zoom, f));\n                        stroke.setLineJoin(getValue(layer, 'layout', 'line-join', zoom, f));\n                        stroke.setMiterLimit(getValue(layer, 'layout', 'line-miter-limit', zoom, f));\n                        stroke.setColor(color);\n                        stroke.setWidth(width_1);\n                        stroke.setLineDash(paint['line-dasharray']\n                            ? getValue(layer, 'paint', 'line-dasharray', zoom, f).map(function (x) {\n                                return x * width_1;\n                            })\n                            : null);\n                        style.setZIndex(index);\n                    }\n                }\n                var hasImage = false;\n                var text = null;\n                var placementAngle = 0;\n                var icon = void 0, iconImg = void 0, skipLabel = void 0;\n                if ((type == 1 || type == 2) && 'icon-image' in layout) {\n                    var iconImage = getValue(layer, 'layout', 'icon-image', zoom, f);\n                    if (iconImage) {\n                        icon =\n                            typeof iconImage === 'string'\n                                ? fromTemplate(iconImage, properties)\n                                : iconImage.toString();\n                        var styleGeom = undefined;\n                        if (spriteImage && spriteData && spriteData[icon]) {\n                            var iconRotationAlignment = getValue(layer, 'layout', 'icon-rotation-alignment', zoom, f);\n                            if (type == 2) {\n                                var geom = feature.getGeometry();\n                                // ol package and ol-debug.js only\n                                if (geom.getFlatMidpoint || geom.getFlatMidpoints) {\n                                    var extent = geom.getExtent();\n                                    var size = Math.sqrt(Math.max(Math.pow((extent[2] - extent[0]) / resolution, 2), Math.pow((extent[3] - extent[1]) / resolution, 2)));\n                                    if (size > 150) {\n                                        //FIXME Do not hard-code a size of 150\n                                        var midpoint = geom.getType() === 'MultiLineString'\n                                            ? geom.getFlatMidpoints()\n                                            : geom.getFlatMidpoint();\n                                        if (!renderFeature) {\n                                            renderFeatureCoordinates = [NaN, NaN];\n                                            renderFeature = new RenderFeature('Point', renderFeatureCoordinates, [], {}, null);\n                                        }\n                                        styleGeom = renderFeature;\n                                        renderFeatureCoordinates[0] = midpoint[0];\n                                        renderFeatureCoordinates[1] = midpoint[1];\n                                        var placement = getValue(layer, 'layout', 'symbol-placement', zoom, f);\n                                        if (placement === 'line' &&\n                                            iconRotationAlignment === 'map') {\n                                            var stride = geom.getStride();\n                                            var coordinates = geom.getFlatCoordinates();\n                                            for (var i_1 = 0, ii_1 = coordinates.length - stride; i_1 < ii_1; i_1 += stride) {\n                                                var x1 = coordinates[i_1];\n                                                var y1 = coordinates[i_1 + 1];\n                                                var x2 = coordinates[i_1 + stride];\n                                                var y2 = coordinates[i_1 + stride + 1];\n                                                var minX = Math.min(x1, x2);\n                                                var minY = Math.min(y1, y2);\n                                                var maxX = Math.max(x1, x2);\n                                                var maxY = Math.max(y1, y2);\n                                                if (midpoint[0] >= minX &&\n                                                    midpoint[0] <= maxX &&\n                                                    midpoint[1] >= minY &&\n                                                    midpoint[1] <= maxY) {\n                                                    placementAngle = Math.atan2(y1 - y2, x2 - x1);\n                                                    break;\n                                                }\n                                            }\n                                        }\n                                    }\n                                }\n                            }\n                            if (type !== 2 || styleGeom) {\n                                var iconSize = getValue(layer, 'layout', 'icon-size', zoom, f);\n                                var iconColor = paint['icon-color'] !== undefined\n                                    ? getValue(layer, 'paint', 'icon-color', zoom, f)\n                                    : null;\n                                if (!iconColor || iconColor.a !== 0) {\n                                    var icon_cache_key = icon + '.' + iconSize;\n                                    if (iconColor !== null) {\n                                        icon_cache_key += '.' + iconColor;\n                                    }\n                                    iconImg = iconImageCache[icon_cache_key];\n                                    if (!iconImg) {\n                                        var spriteImageData = spriteData[icon];\n                                        if (iconColor !== null) {\n                                            // cut out the sprite and color it\n                                            var canvas = createCanvas(spriteImageData.width, spriteImageData.height);\n                                            var ctx = /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d'));\n                                            ctx.drawImage(spriteImage, spriteImageData.x, spriteImageData.y, spriteImageData.width, spriteImageData.height, 0, 0, spriteImageData.width, spriteImageData.height);\n                                            var data = ctx.getImageData(0, 0, canvas.width, canvas.height);\n                                            for (var c = 0, cc = data.data.length; c < cc; c += 4) {\n                                                var a = iconColor.a;\n                                                if (a !== 0) {\n                                                    data.data[c] = (iconColor.r * 255) / a;\n                                                    data.data[c + 1] = (iconColor.g * 255) / a;\n                                                    data.data[c + 2] = (iconColor.b * 255) / a;\n                                                }\n                                                data.data[c + 3] = a;\n                                            }\n                                            ctx.putImageData(data, 0, 0);\n                                            iconImg = new Icon({\n                                                img: canvas,\n                                                imgSize: [canvas.width, canvas.height],\n                                                scale: iconSize / spriteImageData.pixelRatio,\n                                            });\n                                            iconImageCache[icon_cache_key] = iconImg;\n                                        }\n                                        else {\n                                            iconImg = new Icon({\n                                                img: spriteImage,\n                                                imgSize: spriteImgSize,\n                                                size: [spriteImageData.width, spriteImageData.height],\n                                                offset: [spriteImageData.x, spriteImageData.y],\n                                                rotateWithView: iconRotationAlignment === 'map',\n                                                scale: iconSize / spriteImageData.pixelRatio,\n                                            });\n                                            iconImageCache[icon_cache_key] = iconImg;\n                                        }\n                                    }\n                                }\n                                if (iconImg) {\n                                    ++stylesLength;\n                                    style = styles[stylesLength];\n                                    if (!style ||\n                                        !style.getImage() ||\n                                        style.getFill() ||\n                                        style.getStroke()) {\n                                        style = new Style();\n                                        styles[stylesLength] = style;\n                                    }\n                                    style.setGeometry(styleGeom);\n                                    iconImg.setRotation(placementAngle +\n                                        deg2rad(getValue(layer, 'layout', 'icon-rotate', zoom, f)));\n                                    iconImg.setOpacity(getValue(layer, 'paint', 'icon-opacity', zoom, f));\n                                    iconImg.setAnchor(anchor[getValue(layer, 'layout', 'icon-anchor', zoom, f)]);\n                                    style.setImage(iconImg);\n                                    text = style.getText();\n                                    style.setText(undefined);\n                                    style.setZIndex(index);\n                                    hasImage = true;\n                                    skipLabel = false;\n                                }\n                            }\n                            else {\n                                skipLabel = true;\n                            }\n                        }\n                    }\n                }\n                if (type == 1 && 'circle-radius' in paint) {\n                    ++stylesLength;\n                    style = styles[stylesLength];\n                    if (!style ||\n                        !style.getImage() ||\n                        style.getFill() ||\n                        style.getStroke()) {\n                        style = new Style();\n                        styles[stylesLength] = style;\n                    }\n                    var circleRadius = getValue(layer, 'paint', 'circle-radius', zoom, f);\n                    var circleStrokeColor = colorWithOpacity(getValue(layer, 'paint', 'circle-stroke-color', zoom, f), getValue(layer, 'paint', 'circle-stroke-opacity', zoom, f));\n                    var circleColor = colorWithOpacity(getValue(layer, 'paint', 'circle-color', zoom, f), getValue(layer, 'paint', 'circle-opacity', zoom, f));\n                    var circleStrokeWidth = getValue(layer, 'paint', 'circle-stroke-width', zoom, f);\n                    var cache_key = circleRadius +\n                        '.' +\n                        circleStrokeColor +\n                        '.' +\n                        circleColor +\n                        '.' +\n                        circleStrokeWidth;\n                    iconImg = iconImageCache[cache_key];\n                    if (!iconImg) {\n                        iconImg = new Circle({\n                            radius: circleRadius,\n                            stroke: circleStrokeColor && circleStrokeWidth > 0\n                                ? new Stroke({\n                                    width: circleStrokeWidth,\n                                    color: circleStrokeColor,\n                                })\n                                : undefined,\n                            fill: circleColor\n                                ? new Fill({\n                                    color: circleColor,\n                                })\n                                : undefined,\n                        });\n                        iconImageCache[cache_key] = iconImg;\n                    }\n                    style.setImage(iconImg);\n                    text = style.getText();\n                    style.setText(undefined);\n                    style.setGeometry(undefined);\n                    style.setZIndex(index);\n                    hasImage = true;\n                }\n                var label = void 0;\n                if ('text-field' in layout) {\n                    var textField = getValue(layer, 'layout', 'text-field', zoom, f).toString();\n                    label = fromTemplate(textField, properties).trim();\n                    opacity = getValue(layer, 'paint', 'text-opacity', zoom, f);\n                }\n                if (label && opacity && !skipLabel) {\n                    if (!hasImage) {\n                        ++stylesLength;\n                        style = styles[stylesLength];\n                        if (!style ||\n                            !style.getText() ||\n                            style.getFill() ||\n                            style.getStroke()) {\n                            style = new Style();\n                            styles[stylesLength] = style;\n                        }\n                        style.setImage(undefined);\n                        style.setGeometry(undefined);\n                    }\n                    if (!style.getText()) {\n                        style.setText(text ||\n                            new Text({\n                                padding: [2, 2, 2, 2],\n                            }));\n                    }\n                    text = style.getText();\n                    var textSize = Math.round(getValue(layer, 'layout', 'text-size', zoom, f));\n                    var fontArray = getValue(layer, 'layout', 'text-font', zoom, f);\n                    var textLineHeight = getValue(layer, 'layout', 'text-line-height', zoom, f);\n                    var font = mb2css(getFonts ? getFonts(fontArray) : fontArray, textSize, textLineHeight);\n                    var textTransform = layout['text-transform'];\n                    if (textTransform == 'uppercase') {\n                        label = label.toUpperCase();\n                    }\n                    else if (textTransform == 'lowercase') {\n                        label = label.toLowerCase();\n                    }\n                    var maxTextWidth = getValue(layer, 'layout', 'text-max-width', zoom, f);\n                    var letterSpacing = getValue(layer, 'layout', 'text-letter-spacing', zoom, f);\n                    var wrappedLabel = type == 2\n                        ? applyLetterSpacing(label, letterSpacing)\n                        : wrapText(label, font, maxTextWidth, letterSpacing);\n                    text.setText(wrappedLabel);\n                    text.setFont(font);\n                    text.setRotation(deg2rad(getValue(layer, 'layout', 'text-rotate', zoom, f)));\n                    var textAnchor = getValue(layer, 'layout', 'text-anchor', zoom, f);\n                    var placement = hasImage || type == 1\n                        ? 'point'\n                        : getValue(layer, 'layout', 'symbol-placement', zoom, f);\n                    text.setPlacement(placement);\n                    var textHaloWidth = getValue(layer, 'paint', 'text-halo-width', zoom, f);\n                    var textOffset = getValue(layer, 'layout', 'text-offset', zoom, f);\n                    var textTranslate = getValue(layer, 'paint', 'text-translate', zoom, f);\n                    // Text offset has to take halo width and line height into account\n                    var vOffset = 0;\n                    var hOffset = 0;\n                    if (placement == 'point') {\n                        var textAlign = 'center';\n                        if (textAnchor.indexOf('left') !== -1) {\n                            textAlign = 'left';\n                            hOffset = textHaloWidth;\n                        }\n                        else if (textAnchor.indexOf('right') !== -1) {\n                            textAlign = 'right';\n                            hOffset = -textHaloWidth;\n                        }\n                        text.setTextAlign(textAlign);\n                        var textRotationAlignment = getValue(layer, 'layout', 'text-rotation-alignment', zoom, f);\n                        text.setRotateWithView(textRotationAlignment == 'map');\n                    }\n                    else {\n                        text.setMaxAngle((deg2rad(getValue(layer, 'layout', 'text-max-angle', zoom, f)) *\n                            label.length) /\n                            wrappedLabel.length);\n                        text.setTextAlign();\n                        text.setRotateWithView(false);\n                    }\n                    var textBaseline = 'middle';\n                    if (textAnchor.indexOf('bottom') == 0) {\n                        textBaseline = 'bottom';\n                        vOffset = -textHaloWidth - 0.5 * (textLineHeight - 1) * textSize;\n                    }\n                    else if (textAnchor.indexOf('top') == 0) {\n                        textBaseline = 'top';\n                        vOffset = textHaloWidth + 0.5 * (textLineHeight - 1) * textSize;\n                    }\n                    text.setTextBaseline(textBaseline);\n                    text.setOffsetX(textOffset[0] * textSize + hOffset + textTranslate[0]);\n                    text.setOffsetY(textOffset[1] * textSize + vOffset + textTranslate[1]);\n                    textColor.setColor(colorWithOpacity(getValue(layer, 'paint', 'text-color', zoom, f), opacity));\n                    text.setFill(textColor);\n                    var haloColor = colorWithOpacity(getValue(layer, 'paint', 'text-halo-color', zoom, f), opacity);\n                    if (haloColor) {\n                        textHalo.setColor(haloColor);\n                        // spec here : https://docs.mapbox.com/mapbox-gl-js/style-spec/#paint-symbol-text-halo-width\n                        // Halo width must be doubled because it is applied around the center of the text outline\n                        textHaloWidth *= 2;\n                        // 1/4 of text size (spec) x 2\n                        var halfTextSize = 0.5 * textSize;\n                        textHalo.setWidth(textHaloWidth <= halfTextSize ? textHaloWidth : halfTextSize);\n                        text.setStroke(textHalo);\n                    }\n                    else {\n                        text.setStroke(undefined);\n                    }\n                    var textPadding = getValue(layer, 'layout', 'text-padding', zoom, f);\n                    var padding = text.getPadding();\n                    if (textPadding !== padding[0]) {\n                        padding[0] = textPadding;\n                        padding[1] = textPadding;\n                        padding[2] = textPadding;\n                        padding[3] = textPadding;\n                    }\n                    style.setZIndex(index);\n                }\n            }\n        };\n        for (var i = 0, ii = layers.length; i < ii; ++i) {\n            _loop_1(i, ii);\n        }\n        if (stylesLength > -1) {\n            styles.length = stylesLength + 1;\n            if (recordLayer) {\n                if (typeof feature.set === 'function') {\n                    // ol/Feature\n                    feature.set('mapbox-layer', featureBelongsToLayer);\n                }\n                else {\n                    // ol/render/Feature\n                    feature.getProperties()['mapbox-layer'] = featureBelongsToLayer;\n                }\n            }\n            return styles;\n        }\n    };\n    olLayer.setStyle(styleFunction);\n    olLayer.set('mapbox-source', mapboxSource);\n    olLayer.set('mapbox-layers', mapboxLayers);\n    return styleFunction;\n}\nexport { colorWithOpacity as _colorWithOpacity, filterCache as _filterCache, evaluateFilter as _evaluateFilter, fromTemplate as _fromTemplate, getValue as _getValue, functionCache as _functionCache, };\n//# sourceMappingURL=stylefunction.js.map","/*\nol-mapbox-style - Use Mapbox Style objects with OpenLayers\nCopyright 2016-present ol-mapbox-style contributors\nLicense: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LICENSE\n*/\nimport GeoJSON from 'ol/format/GeoJSON.js';\nimport MVT from 'ol/format/MVT.js';\nimport Map from 'ol/Map.js';\nimport TileGrid from 'ol/tilegrid/TileGrid.js';\nimport TileJSON from 'ol/source/TileJSON.js';\nimport TileLayer from 'ol/layer/Tile.js';\nimport VectorLayer from 'ol/layer/Vector.js';\nimport VectorSource from 'ol/source/Vector.js';\nimport VectorTileLayer from 'ol/layer/VectorTile.js';\nimport VectorTileSource from 'ol/source/VectorTile.js';\nimport View from 'ol/View.js';\nimport applyStyleFunction, { getValue } from './stylefunction.js';\nimport googleFonts from 'webfont-matcher/lib/fonts/google.js';\nimport mb2css from 'mapbox-to-css-font';\nimport { Color } from '@mapbox/mapbox-gl-style-spec/dist/index.es.js';\nimport { assign, defaultResolutions } from './util.js';\nimport { createXYZ } from 'ol/tilegrid.js';\nimport { fromLonLat } from 'ol/proj.js';\nimport { unByKey } from 'ol/Observable.js';\n/**\n * @typedef {import(\"ol/Map\").default} PluggableMap\n * @typedef {import(\"ol/layer/Layer\").default} Layer\n * @typedef {import(\"ol/source/Source\").default} Source\n * @private\n */\nvar tilejsonCache = {};\nvar fontFamilyRegEx = /font-family: ?([^;]*);/;\nvar stripQuotesRegEx = /(\"|')/g;\nvar loadedFontFamilies;\nfunction hasFontFamily(family) {\n    if (!loadedFontFamilies) {\n        loadedFontFamilies = {};\n        var styleSheets = document.styleSheets;\n        for (var i = 0, ii = styleSheets.length; i < ii; ++i) {\n            var styleSheet = /** @type {CSSStyleSheet} */ (styleSheets[i]);\n            try {\n                var cssRules = styleSheet.rules || styleSheet.cssRules;\n                if (cssRules) {\n                    for (var j = 0, jj = cssRules.length; j < jj; ++j) {\n                        var cssRule = cssRules[j];\n                        if (cssRule.type == 5) {\n                            var match = cssRule.cssText.match(fontFamilyRegEx);\n                            loadedFontFamilies[match[1].replace(stripQuotesRegEx, '')] = true;\n                        }\n                    }\n                }\n            }\n            catch (e) {\n                // empty catch block\n            }\n        }\n    }\n    return family in loadedFontFamilies;\n}\nvar processedFontFamilies = {};\nvar googleFamilies = googleFonts.getNames();\n/**\n * @private\n * @param {Array} fonts Fonts.\n * @return {Array} Processed fonts.\n */\nfunction getFonts(fonts) {\n    var fontsKey = fonts.toString();\n    if (fontsKey in processedFontFamilies) {\n        return fonts;\n    }\n    var googleFontDescriptions = fonts.map(function (font) {\n        var parts = mb2css(font, 1).split(' ');\n        return [parts.slice(3).join(' ').replace(/\"/g, ''), parts[1] + parts[0]];\n    });\n    for (var i = 0, ii = googleFontDescriptions.length; i < ii; ++i) {\n        var googleFontDescription = googleFontDescriptions[i];\n        var family = googleFontDescription[0];\n        if (!hasFontFamily(family) && googleFamilies.indexOf(family) !== -1) {\n            var fontUrl = 'https://fonts.googleapis.com/css?family=' +\n                family.replace(/ /g, '+') +\n                ':' +\n                googleFontDescription[1];\n            if (!document.querySelector('link[href=\"' + fontUrl + '\"]')) {\n                var markup = document.createElement('link');\n                markup.href = fontUrl;\n                markup.rel = 'stylesheet';\n                document.head.appendChild(markup);\n            }\n        }\n    }\n    processedFontFamilies[fontsKey] = true;\n    return fonts;\n}\nvar spriteRegEx = /^(.*)(\\?.*)$/;\nfunction withPath(url, path) {\n    if (path && url.indexOf('.') === 0) {\n        url = path + url;\n    }\n    return url;\n}\nfunction toSpriteUrl(url, path, extension) {\n    url = withPath(url, path);\n    var parts = url.match(spriteRegEx);\n    return parts\n        ? parts[1] + extension + (parts.length > 2 ? parts[2] : '')\n        : url + extension;\n}\n/**\n * ```js\n * import {applyStyle} from 'ol-mapbox-style';\n * ```\n *\n * Applies a style function to an `ol.layer.VectorTile` or `ol.layer.Vector`\n * with an `ol.source.VectorTile` or an `ol.source.Vector`. The style function\n * will render all layers from the `glStyle` object that use the specified\n * `source`, or a subset of layers from the same source. The source needs to be\n * a `\"type\": \"vector\"` or `\"type\": \"geojson\"` source.\n *\n * Two additional properties will be set on the provided layer:\n *\n *  * `mapbox-source`: The `id` of the Mapbox Style document's source that the\n *    OpenLayers layer was created from. Usually `apply()` creates one\n *    OpenLayers layer per Mapbox Style source, unless the layer stack has\n *    layers from different sources in between.\n *  * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are\n *    included in the OpenLayers layer.\n *\n * @param {VectorTileLayer|VectorLayer} layer OpenLayers layer.\n * @param {string|Object} glStyle Mapbox Style object.\n * @param {string|Array<string>} source `source` key or an array of layer `id`s from the\n * Mapbox Style object. When a `source` key is provided, all layers for the\n * specified source will be included in the style function. When layer `id`s\n * are provided, they must be from layers that use the same source.\n * @param {string} [path=undefined] Path of the style file. Only required when\n * a relative path is used with the `\"sprite\"` property of the style.\n * @param {Array<number>} [resolutions=undefined] Resolutions for mapping resolution to zoom level.\n * @return {Promise} Promise which will be resolved when the style can be used\n * for rendering.\n */\nexport function applyStyle(layer, glStyle, source, path, resolutions) {\n    return new Promise(function (resolve, reject) {\n        // TODO: figure out where best place to check source type is\n        // Note that the source arg is an array of gl layer ids and each must be\n        // dereferenced to get source type to validate\n        if (typeof glStyle != 'object') {\n            glStyle = JSON.parse(glStyle);\n        }\n        if (glStyle.version != 8) {\n            return reject(new Error('glStyle version 8 required.'));\n        }\n        if (!(layer instanceof VectorLayer || layer instanceof VectorTileLayer)) {\n            return reject(new Error('Can only apply to VectorLayer or VectorTileLayer'));\n        }\n        var spriteScale, spriteData, spriteImageUrl, style;\n        function onChange() {\n            if (!style && (!glStyle.sprite || spriteData)) {\n                style = applyStyleFunction(layer, glStyle, source, resolutions, spriteData, spriteImageUrl, getFonts);\n                if (!layer.getStyle()) {\n                    reject(new Error(\"Nothing to show for source [\" + source + \"]\"));\n                }\n                else {\n                    resolve();\n                }\n            }\n            else if (style) {\n                layer.setStyle(style);\n                resolve();\n            }\n            else {\n                reject(new Error('Something went wrong trying to apply style.'));\n            }\n        }\n        if (glStyle.sprite) {\n            spriteScale = window.devicePixelRatio >= 1.5 ? 0.5 : 1;\n            var sizeFactor_1 = spriteScale == 0.5 ? '@2x' : '';\n            var spriteUrl_1 = toSpriteUrl(glStyle.sprite, path, sizeFactor_1 + '.json');\n            fetch(spriteUrl_1, { credentials: 'same-origin' })\n                .then(function (response) {\n                if (!response.ok && sizeFactor_1 !== '') {\n                    spriteUrl_1 = toSpriteUrl(glStyle.sprite, path, '.json');\n                    return fetch(spriteUrl_1, { credentials: 'same-origin' });\n                }\n                else {\n                    return response;\n                }\n            })\n                .then(function (response) {\n                if (response.ok) {\n                    return response.json();\n                }\n                else {\n                    reject(new Error(\"Problem fetching sprite from \" + spriteUrl_1 + \": \" + response.statusText));\n                }\n            })\n                .then(function (spritesJson) {\n                if (spritesJson === undefined) {\n                    return reject(new Error('No sprites found.'));\n                }\n                spriteData = spritesJson;\n                spriteImageUrl = toSpriteUrl(glStyle.sprite, path, sizeFactor_1 + '.png');\n                onChange();\n            })\n                .catch(function (err) {\n                reject(new Error(\"Sprites cannot be loaded: \" + spriteUrl_1 + \": \" + err.message));\n            });\n        }\n        else {\n            onChange();\n        }\n    });\n}\nvar emptyObj = {};\nfunction setBackground(map, layer) {\n    var background = {\n        type: layer.type,\n    };\n    function updateStyle() {\n        var element = map.getTargetElement();\n        if (!element) {\n            return;\n        }\n        var layout = layer.layout || {};\n        var paint = layer.paint || {};\n        background['paint'] = paint;\n        background.id =\n            'olms-bg-' + paint['background-opacity'] + paint['background-color'];\n        var zoom = map.getView().getZoom();\n        if (paint['background-color'] !== undefined) {\n            var bg = getValue(background, 'paint', 'background-color', zoom, emptyObj);\n            element.style.background = Color.parse(bg).toString();\n        }\n        if (paint['background-opacity'] !== undefined) {\n            element.style.opacity = getValue(background, 'paint', 'background-opacity', zoom, emptyObj);\n        }\n        if (layout.visibility == 'none') {\n            element.style.backgroundColor = '';\n            element.style.opacity = '';\n        }\n    }\n    if (map.getTargetElement()) {\n        updateStyle();\n    }\n    map.on(['change:resolution', 'change:target'], updateStyle);\n}\n/**\n * ```js\n * import {applyBackground} from 'ol-mapbox-style';\n * ```\n * Applies properties of the Mapbox Style's first `background` layer to the map.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {Object} glStyle Mapbox Style object.\n */\nexport function applyBackground(map, glStyle) {\n    glStyle.layers.some(function (l) {\n        if (l.type == 'background') {\n            setBackground(map, l);\n            return true;\n        }\n    });\n}\nfunction getSourceIdByRef(layers, ref) {\n    var sourceId;\n    layers.some(function (layer) {\n        if (layer.id == ref) {\n            sourceId = layer.source;\n            return true;\n        }\n    });\n    return sourceId;\n}\nfunction extentFromTileJSON(tileJSON) {\n    var bounds = tileJSON.bounds;\n    if (bounds) {\n        var ll = fromLonLat([bounds[0], bounds[1]]);\n        var tr = fromLonLat([bounds[2], bounds[3]]);\n        return [ll[0], ll[1], tr[0], tr[1]];\n    }\n}\nfunction setupVectorLayer(glSource, accessToken, url) {\n    glSource = assign({}, glSource);\n    var layer = new VectorTileLayer({\n        declutter: true,\n        visible: false,\n    });\n    var cacheKey = JSON.stringify(glSource);\n    var tilejson = tilejsonCache[cacheKey];\n    if (!tilejson) {\n        tilejson = new TileJSON({\n            url: glSource.tiles ? undefined : url,\n            tileJSON: glSource.tiles ? glSource : undefined,\n        });\n        tilejsonCache[cacheKey] = tilejson;\n    }\n    var key = tilejson.on('change', function () {\n        var state = tilejson.getState();\n        if (state === 'ready') {\n            var tileJSONDoc = tilejson.getTileJSON();\n            var tiles = Array.isArray(tileJSONDoc.tiles)\n                ? tileJSONDoc.tiles\n                : [tileJSONDoc.tiles];\n            if (url) {\n                for (var i = 0, ii = tiles.length; i < ii; ++i) {\n                    var tile = tiles[i];\n                    if (tile.indexOf('http') != 0) {\n                        tiles[i] = url.replace(/\\/?$/, '/') + tile.replace(/^\\//, '');\n                    }\n                }\n            }\n            var tileGrid = tilejson.getTileGrid();\n            var extent = extentFromTileJSON(tileJSONDoc);\n            var minZoom = tileJSONDoc.minzoom || 0;\n            var maxZoom = tileJSONDoc.maxzoom || 22;\n            var source = tilejson.get('ol-source');\n            if (source === undefined) {\n                source = new VectorTileSource({\n                    attributions: tilejson.getAttributions(),\n                    format: new MVT(),\n                    tileGrid: new TileGrid({\n                        origin: tileGrid.getOrigin(0),\n                        extent: extent || tileGrid.getExtent(),\n                        minZoom: minZoom,\n                        resolutions: defaultResolutions.slice(0, maxZoom + 1),\n                        tileSize: 512,\n                    }),\n                    urls: tiles,\n                });\n                tilejson.set('ol-source', source);\n            }\n            unByKey(key);\n            layer.setSource(source);\n        }\n        else if (state === 'error') {\n            tilejson.set('ol-source', null);\n            unByKey(key);\n            layer.setSource(undefined);\n        }\n    });\n    if (tilejson.getState() === 'ready') {\n        tilejson.changed();\n    }\n    return layer;\n}\nfunction setupRasterLayer(glSource, url) {\n    var layer = new TileLayer();\n    var source = new TileJSON({\n        transition: 0,\n        url: glSource.tiles ? undefined : url,\n        tileJSON: glSource.tiles ? glSource : undefined,\n        crossOrigin: 'anonymous',\n    });\n    var key = source.on('change', function () {\n        var state = source.getState();\n        if (state === 'ready') {\n            unByKey(key);\n            var tileJSONDoc = /** @type {Object} */ (source.getTileJSON());\n            var extent = extentFromTileJSON(tileJSONDoc);\n            var tileGrid = source.getTileGrid();\n            var tileSize = glSource.tileSize || tileJSONDoc.tileSize || 512;\n            var minZoom = tileJSONDoc.minzoom || 0;\n            var maxZoom = tileJSONDoc.maxzoom || 22;\n            // Only works when using ES modules\n            source.tileGrid = new TileGrid({\n                origin: tileGrid.getOrigin(0),\n                extent: extent || tileGrid.getExtent(),\n                minZoom: minZoom,\n                resolutions: createXYZ({\n                    maxZoom: maxZoom,\n                    tileSize: tileSize,\n                }).getResolutions(),\n                tileSize: tileSize,\n            });\n            layer.setSource(source);\n        }\n        else if (state === 'error') {\n            unByKey(key);\n            layer.setSource(undefined);\n        }\n    });\n    source.setTileLoadFunction(function (tile, src) {\n        if (src.indexOf('{bbox-epsg-3857}') != -1) {\n            var bbox = source.getTileGrid().getTileCoordExtent(tile.getTileCoord());\n            src = src.replace('{bbox-epsg-3857}', bbox.toString());\n        }\n        var img = /** @type {import(\"ol/ImageTile\").default} */ (tile).getImage();\n        /** @type {HTMLImageElement} */ (img).src = src;\n    });\n    return layer;\n}\nvar geoJsonFormat = new GeoJSON();\nfunction setupGeoJSONLayer(glSource, path) {\n    var data = glSource.data;\n    var features, geoJsonUrl;\n    if (typeof data == 'string') {\n        geoJsonUrl = withPath(data, path);\n    }\n    else {\n        features = geoJsonFormat.readFeatures(data, {\n            featureProjection: 'EPSG:3857',\n        });\n    }\n    return new VectorLayer({\n        source: new VectorSource({\n            attributions: glSource.attribution,\n            features: features,\n            format: geoJsonFormat,\n            url: geoJsonUrl,\n        }),\n        visible: false,\n    });\n}\nfunction updateRasterLayerProperties(glLayer, layer, view) {\n    var zoom = view.getZoom();\n    var opacity = getValue(glLayer, 'paint', 'raster-opacity', zoom, emptyObj);\n    layer.setOpacity(opacity);\n}\nfunction processStyle(glStyle, map, baseUrl, host, path, accessToken) {\n    if (accessToken === void 0) { accessToken = ''; }\n    var promises = [];\n    var view = map.getView();\n    if (!view.isDef() && !view.getRotation() && !view.getResolutions()) {\n        view = new View({\n            maxResolution: defaultResolutions[0],\n        });\n        map.setView(view);\n    }\n    if ('center' in glStyle && !view.getCenter()) {\n        view.setCenter(fromLonLat(glStyle.center));\n    }\n    if ('zoom' in glStyle && view.getZoom() === undefined) {\n        view.setResolution(defaultResolutions[0] / Math.pow(2, glStyle.zoom));\n    }\n    if (!view.getCenter() || view.getZoom() === undefined) {\n        view.fit(view.getProjection().getExtent(), {\n            nearest: true,\n            size: map.getSize(),\n        });\n    }\n    if (glStyle.sprite) {\n        if (glStyle.sprite.indexOf('mapbox://') == 0) {\n            glStyle.sprite = baseUrl + '/sprite' + accessToken;\n        }\n        else if (glStyle.sprite.indexOf('http') != 0) {\n            glStyle.sprite = (host ? host + path : '') + glStyle.sprite + accessToken;\n        }\n    }\n    var glLayers = glStyle.layers;\n    var layerIds = [];\n    var glLayer, glSource, glSourceId, id, layer, url;\n    var _loop_1 = function (i, ii) {\n        glLayer = glLayers[i];\n        var type = glLayer.type;\n        if (type == 'heatmap' || type == 'hillshade') {\n            //FIXME Unsupported layer type\n        }\n        else if (type == 'background') {\n            setBackground(map, glLayer);\n        }\n        else {\n            id = glLayer.source || getSourceIdByRef(glLayers, glLayer.ref);\n            // this technique assumes gl layers will be in a particular order\n            if (id != glSourceId) {\n                if (layerIds.length) {\n                    promises.push(finalizeLayer(layer, layerIds, glStyle, path, map));\n                    layerIds = [];\n                }\n                glSource = glStyle.sources[id];\n                url = glSource.url;\n                if (url) {\n                    url = withPath(url, path);\n                    if (url.indexOf('mapbox://') == 0) {\n                        var mapid_1 = url.replace('mapbox://', '');\n                        glSource.tiles = ['a', 'b', 'c', 'd'].map(function (host) {\n                            return ('https://' +\n                                host +\n                                '.tiles.mapbox.com/v4/' +\n                                mapid_1 +\n                                '/{z}/{x}/{y}.' +\n                                (glSource.type == 'vector' ? 'vector.pbf' : 'png') +\n                                accessToken);\n                        });\n                    }\n                    else if (url.indexOf('/') === 0 && host.indexOf('http') === 0) {\n                        url = host + url;\n                    }\n                }\n                if (glSource.tiles) {\n                    glSource.tiles = glSource.tiles.map(function (url) { return withPath(url, path); });\n                }\n                if (glSource.type == 'vector') {\n                    layer = setupVectorLayer(glSource, accessToken, url);\n                }\n                else if (glSource.type == 'raster') {\n                    layer = setupRasterLayer(glSource, url);\n                    layer.setVisible(glLayer.layout ? glLayer.layout.visibility !== 'none' : true);\n                    view.on('change:resolution', updateRasterLayerProperties.bind(this_1, glLayer, layer, view));\n                    updateRasterLayerProperties(glLayer, layer, view);\n                }\n                else if (glSource.type == 'geojson') {\n                    layer = setupGeoJSONLayer(glSource, path);\n                }\n                glSourceId = id;\n                if (layer) {\n                    layer.set('mapbox-source', glSourceId);\n                }\n            }\n            layerIds.push(glLayer.id);\n        }\n    };\n    var this_1 = this;\n    for (var i = 0, ii = glLayers.length; i < ii; ++i) {\n        _loop_1(i, ii);\n    }\n    promises.push(finalizeLayer(layer, layerIds, glStyle, path, map));\n    map.set('mapbox-style', glStyle);\n    return Promise.all(promises);\n}\n/**\n * ```js\n * import olms from 'ol-mapbox-style';\n * ```\n *\n * Loads and applies a Mapbox Style object to an OpenLayers Map. This includes\n * the map background, the layers, the center and the zoom.\n *\n * The center and zoom will only be set if present in the Mapbox Style document,\n * and if not already set on the OpenLayers map.\n *\n * Layers will be added to the OpenLayers map, without affecting any layers that\n * might already be set on the map.\n *\n * Layers added by `apply()` will have two additional properties:\n *\n *  * `mapbox-source`: The `id` of the Mapbox Style document's source that the\n *    OpenLayers layer was created from. Usually `apply()` creates one\n *    OpenLayers layer per Mapbox Style source, unless the layer stack has\n *    layers from different sources in between.\n *  * `mapbox-layers`: The `id`s of the Mapbox Style document's layers that are\n *    included in the OpenLayers layer.\n *\n * This function sets an additional `mapbox-style` property on the OpenLayers\n * map instance, which holds the Mapbox Style object.\n *\n * @param {PluggableMap|HTMLElement|string} map Either an existing OpenLayers Map\n * instance, or a HTML element, or the id of a HTML element that will be the\n * target of a new OpenLayers Map.\n * @param {string|Object} style JSON style object or style url pointing to a\n * Mapbox Style object. When using Mapbox APIs, the url must contain an access\n * token and look like\n * `https://api.mapbox.com/styles/v1/mapbox/bright-v9?access_token=[your_access_token_here]`.\n * When passed as JSON style object, all OpenLayers layers created by `apply()`\n * will be immediately available, but they may not have a source yet (i.e. when\n * they are defined by a TileJSON url in the Mapbox Style document). When passed\n * as style url, layers will be added to the map when the Mapbox Style document\n * is loaded and parsed.\n * @return {Promise} A promise that resolves after all layers have been added to\n * the OpenLayers Map instance, their sources set, and their styles applied. the\n * `resolve` callback will be called with the OpenLayers Map instance as\n * argument.\n */\nexport default function olms(map, style) {\n    var promise, accessToken = '', baseUrl = '', host = '', path = '';\n    if (typeof map === 'string' || map instanceof HTMLElement) {\n        map = new Map({\n            target: map,\n        });\n    }\n    if (typeof style === 'string') {\n        var parts = style.match(spriteRegEx);\n        if (parts) {\n            baseUrl = parts[1];\n            accessToken = parts.length > 2 ? parts[2] : '';\n        }\n        promise = new Promise(function (resolve, reject) {\n            fetch(style, {\n                credentials: 'same-origin',\n            })\n                .then(function (response) {\n                return response.json();\n            })\n                .then(function (glStyle) {\n                var a = /** @type {HTMLAnchorElement} */ (document.createElement('A'));\n                a.href = style;\n                var href = a.href;\n                path = a.pathname.split('/').slice(0, -1).join('/') + '/';\n                host = href.substr(0, href.indexOf(path));\n                processStyle(glStyle, map, baseUrl, host, path, accessToken)\n                    .then(function () {\n                    resolve(map);\n                })\n                    .catch(reject);\n            })\n                .catch(function (err) {\n                reject(new Error(\"Could not load \" + style + \": \" + err.message));\n            });\n        });\n    }\n    else {\n        promise = new Promise(function (resolve, reject) {\n            processStyle(style, map)\n                .then(function () {\n                resolve(map);\n            })\n                .catch(reject);\n        });\n    }\n    return promise;\n}\n/**\n * ```js\n * import {apply} from 'ol-mapbox-style';\n * ```\n * Like `olms`, but returns an `ol/Map` instance instead of a `Promise`.\n *\n * @param {PluggableMap|HTMLElement|string} map Either an existing OpenLayers Map\n * instance, or a HTML element, or the id of a HTML element that will be the\n * target of a new OpenLayers Map.\n * @param {string|Object} style JSON style object or style url pointing to a\n * Mapbox Style object. When using Mapbox APIs, the url must contain an access\n * token and look like\n * `https://api.mapbox.com/styles/v1/mapbox/bright-v9?access_token=[your_access_token_here]`.\n * When passed as JSON style object, all OpenLayers layers created by `apply()`\n * will be immediately available, but they may not have a source yet (i.e. when\n * they are defined by a TileJSON url in the Mapbox Style document). When passed\n * as style url, layers will be added to the map when the Mapbox Style document\n * is loaded and parsed.\n * @return {PluggableMap} The OpenLayers Map instance that will be populated with the\n * contents described in the Mapbox Style object.\n */\nexport function apply(map, style) {\n    if (typeof map === 'string' || map instanceof HTMLElement) {\n        map = new Map({\n            target: map,\n        });\n    }\n    setTimeout(function () {\n        olms(map, style);\n    }, 0);\n    return map;\n}\n/**\n * If layerIds is not empty, applies the style specified in glStyle to the layer,\n * and adds the layer to the map.\n *\n * The layer may not yet have a source when the function is called.  If so, the style\n * is applied to the layer via a once listener on the 'change:source' event.\n *\n * @param {Layer} layer An OpenLayers layer instance.\n * @param {Array<string>} layerIds Array containing layer ids of already-processed layers.\n * @param {Object} glStyle Style as a JSON object.\n * @param {string|undefined} path The path part of the style URL. Only required\n * when a relative path is used with the `\"sprite\"` property of the style.\n * @param {PluggableMap} map OpenLayers Map.\n * @return {Promise} Returns a promise that resolves after the source has\n * been set on the specified layer, and the style has been applied.\n * @private\n */\nfunction finalizeLayer(layer, layerIds, glStyle, path, map) {\n    var minZoom = 24;\n    var maxZoom = 0;\n    var glLayers = glStyle.layers;\n    for (var i = 0, ii = glLayers.length; i < ii; ++i) {\n        var glLayer = glLayers[i];\n        if (layerIds.indexOf(glLayer.id) !== -1) {\n            minZoom = Math.min('minzoom' in glLayer ? glLayer.minzoom : 0, minZoom);\n            maxZoom = Math.max('maxzoom' in glLayer ? glLayer.maxzoom : 24, maxZoom);\n        }\n    }\n    return new Promise(function (resolve, reject) {\n        var setStyle = function () {\n            var source = layer.getSource();\n            if (!source || source.getState() === 'error') {\n                reject(new Error('Error accessing data for source ' + layer.get('mapbox-source')));\n                return;\n            }\n            if (typeof source.getTileGrid === 'function') {\n                var tileGrid = source.getTileGrid();\n                if (tileGrid) {\n                    var sourceMinZoom = tileGrid.getMinZoom();\n                    if (minZoom > 0 || sourceMinZoom > 0) {\n                        layer.setMaxResolution(Math.min(defaultResolutions[minZoom], tileGrid.getResolution(sourceMinZoom)) + 1e-9);\n                    }\n                    if (maxZoom < 24) {\n                        layer.setMinResolution(defaultResolutions[maxZoom] + 1e-9);\n                    }\n                }\n            }\n            if (source instanceof VectorSource ||\n                source instanceof VectorTileSource) {\n                applyStyle(\n                /** @type {import(\"ol/layer/Vector\").default|import(\"ol/layer/VectorTile\").default} */ (layer), glStyle, layerIds, path).then(function () {\n                    layer.setVisible(true);\n                    resolve();\n                }, function (e) {\n                    reject(e);\n                });\n            }\n            else {\n                resolve();\n            }\n        };\n        layer.set('mapbox-layers', layerIds);\n        if (map.getLayers().getArray().indexOf(layer) === -1) {\n            map.addLayer(layer);\n        }\n        if (layer.getSource()) {\n            setStyle();\n        }\n        else {\n            layer.once('change:source', setStyle);\n        }\n    });\n}\n/**\n * ```js\n * import {getLayer} from 'ol-mapbox-style';\n * ```\n * Get the OpenLayers layer instance that contains the provided Mapbox Style\n * `layer`. Note that multiple Mapbox Style layers are combined in a single\n * OpenLayers layer instance when they use the same Mapbox Style `source`.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {string} layerId Mapbox Style layer id.\n * @return {Layer} OpenLayers layer instance.\n */\nexport function getLayer(map, layerId) {\n    var layers = map.getLayers().getArray();\n    for (var i = 0, ii = layers.length; i < ii; ++i) {\n        var mapboxLayers = layers[i].get('mapbox-layers');\n        if (mapboxLayers && mapboxLayers.indexOf(layerId) !== -1) {\n            return /** @type {Layer} */ (layers[i]);\n        }\n    }\n}\n/**\n * ```js\n * import {getLayers} from 'ol-mapbox-style';\n * ```\n * Get the OpenLayers layer instances for the provided Mapbox Style `source`.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Array<Layer>} OpenLayers layer instances.\n */\nexport function getLayers(map, sourceId) {\n    var result = [];\n    var layers = map.getLayers().getArray();\n    for (var i = 0, ii = layers.length; i < ii; ++i) {\n        if (layers[i].get('mapbox-source') === sourceId) {\n            result.push(/** @type {Layer} */ (layers[i]));\n        }\n    }\n    return result;\n}\n/**\n * ```js\n * import {getSource} from 'ol-mapbox-style';\n * ```\n * Get the OpenLayers source instance for the provided Mapbox Style `source`.\n * @param {PluggableMap} map OpenLayers Map.\n * @param {string} sourceId Mapbox Style source id.\n * @return {Source} OpenLayers source instance.\n */\nexport function getSource(map, sourceId) {\n    var layers = map.getLayers().getArray();\n    for (var i = 0, ii = layers.length; i < ii; ++i) {\n        var source = /** @type {Layer} */ (layers[i]).getSource();\n        if (layers[i].get('mapbox-source') === sourceId) {\n            return source;\n        }\n    }\n}\nexport { finalizeLayer as _finalizeLayer, getFonts as _getFonts };\n//# sourceMappingURL=index.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/MapboxVector\n */\nimport BaseEvent from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport MVT from '../format/MVT.js';\nimport SourceState from '../source/State.js';\nimport VectorTileLayer from '../layer/VectorTile.js';\nimport VectorTileSource from '../source/VectorTile.js';\nimport { applyStyle } from 'ol-mapbox-style';\nvar mapboxBaseUrl = 'https://api.mapbox.com';\n/**\n * Gets the path from a mapbox:// URL.\n * @param {string} url The Mapbox URL.\n * @return {string} The path.\n * @private\n */\nexport function getMapboxPath(url) {\n    var startsWith = 'mapbox://';\n    if (url.indexOf(startsWith) !== 0) {\n        return '';\n    }\n    return url.slice(startsWith.length);\n}\n/**\n * Turns mapbox:// sprite URLs into resolvable URLs.\n * @param {string} url The sprite URL.\n * @param {string} token The access token.\n * @return {string} A resolvable URL.\n * @private\n */\nexport function normalizeSpriteUrl(url, token) {\n    var mapboxPath = getMapboxPath(url);\n    if (!mapboxPath) {\n        return url;\n    }\n    var startsWith = 'sprites/';\n    if (mapboxPath.indexOf(startsWith) !== 0) {\n        throw new Error(\"unexpected sprites url: \" + url);\n    }\n    var sprite = mapboxPath.slice(startsWith.length);\n    return mapboxBaseUrl + \"/styles/v1/\" + sprite + \"/sprite?access_token=\" + token;\n}\n/**\n * Turns mapbox:// glyphs URLs into resolvable URLs.\n * @param {string} url The glyphs URL.\n * @param {string} token The access token.\n * @return {string} A resolvable URL.\n * @private\n */\nexport function normalizeGlyphsUrl(url, token) {\n    var mapboxPath = getMapboxPath(url);\n    if (!mapboxPath) {\n        return url;\n    }\n    var startsWith = 'fonts/';\n    if (mapboxPath.indexOf(startsWith) !== 0) {\n        throw new Error(\"unexpected fonts url: \" + url);\n    }\n    var font = mapboxPath.slice(startsWith.length);\n    return mapboxBaseUrl + \"/fonts/v1/\" + font + \"/0-255.pbf?access_token=\" + token;\n}\n/**\n * Turns mapbox:// style URLs into resolvable URLs.\n * @param {string} url The style URL.\n * @param {string} token The access token.\n * @return {string} A resolvable URL.\n * @private\n */\nexport function normalizeStyleUrl(url, token) {\n    var mapboxPath = getMapboxPath(url);\n    if (!mapboxPath) {\n        return url;\n    }\n    var startsWith = 'styles/';\n    if (mapboxPath.indexOf(startsWith) !== 0) {\n        throw new Error(\"unexpected style url: \" + url);\n    }\n    var style = mapboxPath.slice(startsWith.length);\n    return mapboxBaseUrl + \"/styles/v1/\" + style + \"?&access_token=\" + token;\n}\n/**\n * Turns mapbox:// source URLs into vector tile URL templates.\n * @param {string} url The source URL.\n * @param {string} token The access token.\n * @return {string} A vector tile template.\n * @private\n */\nexport function normalizeSourceUrl(url, token) {\n    var mapboxPath = getMapboxPath(url);\n    if (!mapboxPath) {\n        return url;\n    }\n    return \"https://{a-d}.tiles.mapbox.com/v4/\" + mapboxPath + \"/{z}/{x}/{y}.vector.pbf?access_token=\" + token;\n}\n/**\n * @classdesc\n * Event emitted on configuration or loading error.\n */\nvar ErrorEvent = /** @class */ (function (_super) {\n    __extends(ErrorEvent, _super);\n    /**\n     * @param {Error} error error object.\n     */\n    function ErrorEvent(error) {\n        var _this = _super.call(this, EventType.ERROR) || this;\n        /**\n         * @type {Error}\n         */\n        _this.error = error;\n        return _this;\n    }\n    return ErrorEvent;\n}(BaseEvent));\n/**\n * @typedef {Object} StyleObject\n * @property {Object<string, SourceObject>} sources The style sources.\n * @property {string} sprite The sprite URL.\n * @property {string} glyphs The glyphs URL.\n * @property {Array<LayerObject>} layers The style layers.\n */\n/**\n * @typedef {Object} SourceObject\n * @property {string} url The source URL.\n * @property {SourceType} type The source type.\n */\n/**\n * The Mapbox source type.\n * @enum {string}\n */\nvar SourceType = {\n    VECTOR: 'vector',\n};\n/**\n * @typedef {Object} LayerObject\n * @property {string} id The layer id.\n * @property {string} source The source id.\n */\n/**\n * @typedef {Object} Options\n * @property {string} styleUrl The URL of the Mapbox style object to use for this layer.  For a\n * style created with Mapbox Studio and hosted on Mapbox, this will look like\n * 'mapbox://styles/you/your-style'.\n * @property {string} accessToken The access token for your Mapbox style.\n * @property {string} [source] If your style uses more than one source, you need to use either the\n * `source` property or the `layers` property to limit rendering to a single vector source.  The\n * `source` property corresponds to the id of a vector source in your Mapbox style.\n * @property {Array<string>} [layers] Limit rendering to the list of included layers.  All layers\n * must share the same vector source.  If your style uses more than one source, you need to use\n * either the `source` property or the `layers` property to limit rendering to a single vector\n * source.\n * @property {boolean} [declutter=true] Declutter images and text. Decluttering is applied to all\n * image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority\n * is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.\n * Higher z-index means higher priority. Within the same z-index, a feature rendered before another has\n * higher priority.\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the\n * renderer when getting features from the vector tile for the rendering or hit-detection.\n * Recommended value: Vector tiles are usually generated with a buffer, so this value should match\n * the largest possible buffer of the used tiles. It should be at least the size of the largest\n * point symbol or line width.\n * @property {import(\"./VectorTileRenderType.js\").default|string} [renderMode='hybrid'] Render mode for vector tiles:\n *  * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom\n *    animations. Point symbols and texts are accurately rendered as vectors and can stay upright on\n *    rotated views.\n *  * `'vector'`: Everything is rendered as vectors. Use this mode for improved performance on vector\n *    tile layers with only a few rendered features (e.g. for highlighting a subset of features of\n *    another layer with the same source).\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link import(\"../PluggableMap.js\").default#addLayer map.addLayer()}.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be\n * recreated during animations. This means that no vectors will be shown clipped, but the setting\n * will have a performance impact for large amounts of vector data. When set to `false`, batches\n * will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be\n * recreated during interactions. See also `updateWhileAnimating`.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n/**\n * @classdesc\n * A vector tile layer based on a Mapbox style that uses a single vector source.  Configure\n * the layer with the `styleUrl` and `accessToken` shown in Mapbox Studio's share panel.\n * If the style uses more than one source, use the `source` property to choose a single\n * vector source.  If you want to render a subset of the layers in the style, use the `layers`\n * property (all layers must share the same vector source).  See the constructor options for\n * more detail.\n *\n *     var map = new Map({\n *       view: new View({\n *         center: [0, 0],\n *         zoom: 1\n *       }),\n *       layers: [\n *         new MapboxVectorLayer({\n *           styleUrl: 'mapbox://styles/mapbox/bright-v9',\n *           accessToken: 'your-mapbox-access-token-here'\n *         })\n *       ],\n *       target: 'map'\n *     });\n *\n * On configuration or loading error, the layer will trigger an `'error'` event.  Listeners\n * will receive an object with an `error` property that can be used to diagnose the problem.\n *\n * @param {Options} options Options.\n * @extends {VectorTileLayer}\n * @fires module:ol/events/Event~BaseEvent#event:error\n * @api\n */\nvar MapboxVectorLayer = /** @class */ (function (_super) {\n    __extends(MapboxVectorLayer, _super);\n    /**\n     * @param {Options} options Layer options.  At a minimum, `styleUrl` and `accessToken`\n     * must be provided.\n     */\n    function MapboxVectorLayer(options) {\n        var _this = this;\n        var declutter = 'declutter' in options ? options.declutter : true;\n        var source = new VectorTileSource({\n            state: SourceState.LOADING,\n            format: new MVT(),\n        });\n        _this = _super.call(this, {\n            source: source,\n            declutter: declutter,\n            className: options.className,\n            opacity: options.opacity,\n            visible: options.visible,\n            zIndex: options.zIndex,\n            minResolution: options.minResolution,\n            maxResolution: options.maxResolution,\n            minZoom: options.minZoom,\n            maxZoom: options.maxZoom,\n            renderOrder: options.renderOrder,\n            renderBuffer: options.renderBuffer,\n            renderMode: options.renderMode,\n            map: options.map,\n            updateWhileAnimating: options.updateWhileAnimating,\n            updateWhileInteracting: options.updateWhileInteracting,\n            preload: options.preload,\n            useInterimTilesOnError: options.useInterimTilesOnError,\n            properties: options.properties,\n        }) || this;\n        _this.sourceId = options.source;\n        _this.layers = options.layers;\n        _this.accessToken = options.accessToken;\n        _this.fetchStyle(options.styleUrl);\n        return _this;\n    }\n    /**\n     * Fetch the style object.\n     * @param {string} styleUrl The URL of the style to load.\n     * @protected\n     */\n    MapboxVectorLayer.prototype.fetchStyle = function (styleUrl) {\n        var _this = this;\n        var url = normalizeStyleUrl(styleUrl, this.accessToken);\n        fetch(url)\n            .then(function (response) {\n            if (!response.ok) {\n                throw new Error(\"unexpected response when fetching style: \" + response.status);\n            }\n            return response.json();\n        })\n            .then(function (style) {\n            _this.onStyleLoad(style);\n        })\n            .catch(function (error) {\n            _this.handleError(error);\n        });\n    };\n    /**\n     * Handle the loaded style object.\n     * @param {StyleObject} style The loaded style.\n     * @protected\n     */\n    MapboxVectorLayer.prototype.onStyleLoad = function (style) {\n        var _this = this;\n        var sourceId;\n        var sourceIdOrLayersList;\n        if (this.layers) {\n            // confirm all layers share the same source\n            var lookup = {};\n            for (var i = 0; i < style.layers.length; ++i) {\n                var layer = style.layers[i];\n                if (layer.source) {\n                    lookup[layer.id] = layer.source;\n                }\n            }\n            var firstSource = void 0;\n            for (var i = 0; i < this.layers.length; ++i) {\n                var candidate = lookup[this.layers[i]];\n                if (!candidate) {\n                    this.handleError(new Error(\"could not find source for \" + this.layers[i]));\n                    return;\n                }\n                if (!firstSource) {\n                    firstSource = candidate;\n                }\n                else if (firstSource !== candidate) {\n                    this.handleError(new Error(\"layers can only use a single source, found \" + firstSource + \" and \" + candidate));\n                    return;\n                }\n            }\n            sourceId = firstSource;\n            sourceIdOrLayersList = this.layers;\n        }\n        else {\n            sourceId = this.sourceId;\n            sourceIdOrLayersList = sourceId;\n        }\n        if (!sourceIdOrLayersList) {\n            // default to the first source in the style\n            sourceId = Object.keys(style.sources)[0];\n            sourceIdOrLayersList = sourceId;\n        }\n        if (style.sprite) {\n            style.sprite = normalizeSpriteUrl(style.sprite, this.accessToken);\n        }\n        if (style.glyphs) {\n            style.glyphs = normalizeGlyphsUrl(style.glyphs, this.accessToken);\n        }\n        var styleSource = style.sources[sourceId];\n        if (styleSource.type !== SourceType.VECTOR) {\n            this.handleError(new Error(\"only works for vector sources, found \" + styleSource.type));\n            return;\n        }\n        var source = this.getSource();\n        source.setUrl(normalizeSourceUrl(styleSource.url, this.accessToken));\n        applyStyle(this, style, sourceIdOrLayersList)\n            .then(function () {\n            source.setState(SourceState.READY);\n        })\n            .catch(function (error) {\n            _this.handleError(error);\n        });\n    };\n    /**\n     * Handle configuration or loading error.\n     * @param {Error} error The error.\n     * @protected\n     */\n    MapboxVectorLayer.prototype.handleError = function (error) {\n        this.dispatchEvent(new ErrorEvent(error));\n        var source = this.getSource();\n        source.setState(SourceState.ERROR);\n    };\n    return MapboxVectorLayer;\n}(VectorTileLayer));\nexport default MapboxVectorLayer;\n//# sourceMappingURL=MapboxVector.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/VectorImageLayer\n */\nimport CanvasImageLayerRenderer from './ImageLayer.js';\nimport CanvasVectorLayerRenderer from './VectorLayer.js';\nimport EventType from '../../events/EventType.js';\nimport ImageCanvas from '../../ImageCanvas.js';\nimport ImageState from '../../ImageState.js';\nimport RBush from 'rbush';\nimport ViewHint from '../../ViewHint.js';\nimport { apply, compose, create } from '../../transform.js';\nimport { assign } from '../../obj.js';\nimport { getHeight, getWidth, isEmpty, scaleFromCenter } from '../../extent.js';\n/**\n * @classdesc\n * Canvas renderer for image layers.\n * @api\n */\nvar CanvasVectorImageLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasVectorImageLayerRenderer, _super);\n    /**\n     * @param {import(\"../../layer/VectorImage.js\").default} layer Vector image layer.\n     */\n    function CanvasVectorImageLayerRenderer(layer) {\n        var _this = _super.call(this, layer) || this;\n        /**\n         * @private\n         * @type {import(\"./VectorLayer.js\").default}\n         */\n        _this.vectorRenderer_ = new CanvasVectorLayerRenderer(layer);\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.layerImageRatio_ = layer.getImageRatio();\n        /**\n         * @private\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.coordinateToVectorPixelTransform_ = create();\n        /**\n         * @private\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.renderedPixelToCoordinateTransform_ = null;\n        return _this;\n    }\n    /**\n     * Clean up.\n     */\n    CanvasVectorImageLayerRenderer.prototype.disposeInternal = function () {\n        this.vectorRenderer_.dispose();\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * Asynchronous layer level hit detection.\n     * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../../Feature\").default>>} Promise that resolves with an array of features.\n     */\n    CanvasVectorImageLayerRenderer.prototype.getFeatures = function (pixel) {\n        if (!this.vectorRenderer_) {\n            return new Promise(function (resolve) { return resolve([]); });\n        }\n        var vectorPixel = apply(this.coordinateToVectorPixelTransform_, apply(this.renderedPixelToCoordinateTransform_, pixel.slice()));\n        return this.vectorRenderer_.getFeatures(vectorPixel);\n    };\n    /**\n     * Perform action necessary to get the layer rendered after new fonts have loaded\n     */\n    CanvasVectorImageLayerRenderer.prototype.handleFontsChanged = function () {\n        this.vectorRenderer_.handleFontsChanged();\n    };\n    /**\n     * Determine whether render should be called.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    CanvasVectorImageLayerRenderer.prototype.prepareFrame = function (frameState) {\n        var pixelRatio = frameState.pixelRatio;\n        var viewState = frameState.viewState;\n        var viewResolution = viewState.resolution;\n        var hints = frameState.viewHints;\n        var vectorRenderer = this.vectorRenderer_;\n        var renderedExtent = frameState.extent;\n        if (this.layerImageRatio_ !== 1) {\n            renderedExtent = renderedExtent.slice(0);\n            scaleFromCenter(renderedExtent, this.layerImageRatio_);\n        }\n        var width = getWidth(renderedExtent) / viewResolution;\n        var height = getHeight(renderedExtent) / viewResolution;\n        if (!hints[ViewHint.ANIMATING] &&\n            !hints[ViewHint.INTERACTING] &&\n            !isEmpty(renderedExtent)) {\n            vectorRenderer.useContainer(null, null, 1);\n            var context = vectorRenderer.context;\n            var imageFrameState_1 = \n            /** @type {import(\"../../PluggableMap.js\").FrameState} */ (assign({}, frameState, {\n                declutterTree: new RBush(9),\n                extent: renderedExtent,\n                size: [width, height],\n                viewState: /** @type {import(\"../../View.js\").State} */ (assign({}, frameState.viewState, {\n                    rotation: 0,\n                })),\n            }));\n            var image_1 = new ImageCanvas(renderedExtent, viewResolution, pixelRatio, context.canvas, function (callback) {\n                if (vectorRenderer.prepareFrame(imageFrameState_1) &&\n                    vectorRenderer.replayGroupChanged) {\n                    vectorRenderer.clipping = false;\n                    vectorRenderer.renderFrame(imageFrameState_1, null);\n                    vectorRenderer.renderDeclutter(imageFrameState_1);\n                    callback();\n                }\n            });\n            image_1.addEventListener(EventType.CHANGE, function () {\n                if (image_1.getState() === ImageState.LOADED) {\n                    this.image_ = image_1;\n                    var imageResolution = image_1.getResolution();\n                    var imagePixelRatio = image_1.getPixelRatio();\n                    var renderedResolution = (imageResolution * pixelRatio) / imagePixelRatio;\n                    this.renderedResolution = renderedResolution;\n                    this.coordinateToVectorPixelTransform_ = compose(this.coordinateToVectorPixelTransform_, width / 2, height / 2, 1 / renderedResolution, -1 / renderedResolution, 0, -viewState.center[0], -viewState.center[1]);\n                }\n            }.bind(this));\n            image_1.load();\n        }\n        if (this.image_) {\n            this.renderedPixelToCoordinateTransform_ =\n                frameState.pixelToCoordinateTransform.slice();\n        }\n        return !!this.image_;\n    };\n    /**\n     */\n    CanvasVectorImageLayerRenderer.prototype.preRender = function () { };\n    /**\n     */\n    CanvasVectorImageLayerRenderer.prototype.postRender = function () { };\n    /**\n     */\n    CanvasVectorImageLayerRenderer.prototype.renderDeclutter = function () { };\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {import(\"../vector.js\").FeatureCallback<T>} callback Feature callback.\n     * @param {Array<import(\"../Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    CanvasVectorImageLayerRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, callback, matches) {\n        if (this.vectorRenderer_) {\n            return this.vectorRenderer_.forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, callback, matches);\n        }\n        else {\n            return _super.prototype.forEachFeatureAtCoordinate.call(this, coordinate, frameState, hitTolerance, callback, matches);\n        }\n    };\n    return CanvasVectorImageLayerRenderer;\n}(CanvasImageLayerRenderer));\nexport default CanvasVectorImageLayerRenderer;\n//# sourceMappingURL=VectorImageLayer.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/VectorImage\n */\nimport BaseVectorLayer from './BaseVector.js';\nimport CanvasVectorImageLayerRenderer from '../renderer/canvas/VectorImageLayer.js';\nimport { assign } from '../obj.js';\n/**\n * @template {import(\"../source/Vector.js\").default} VectorSourceType\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the\n * renderer when getting features from the vector source for the rendering or hit-detection.\n * Recommended value: the size of the largest symbol, line width or label.\n * @property {VectorSourceType} [source] Source.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link import(\"../PluggableMap.js\").default#addLayer map.addLayer()}.\n * @property {boolean} [declutter=false] Declutter images and text on this layer. The priority is defined\n * by the `zIndex` of the style and the render order of features. Higher z-index means higher priority.\n * Within the same z-index, a feature rendered before another has higher priority.\n * @property {import(\"../style/Style.js\").StyleLike} [style] Layer style. See\n * {@link import(\"../style/Style.js\").default the style docs} for the default style that will be used if\n * this is not defined.\n * @property {number} [imageRatio=1] Ratio by which the rendered extent should be larger than the\n * viewport extent. A larger ratio avoids cut images during panning, but will cause a decrease in performance.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n/**\n * @classdesc\n * Vector data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Vector.js\").default} VectorSourceType\n * @extends {BaseVectorLayer<VectorSourceType>}\n * @api\n */\nvar VectorImageLayer = /** @class */ (function (_super) {\n    __extends(VectorImageLayer, _super);\n    /**\n     * @param {Options<VectorSourceType>} [opt_options] Options.\n     */\n    function VectorImageLayer(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var baseOptions = assign({}, options);\n        delete baseOptions.imageRatio;\n        _this = _super.call(this, baseOptions) || this;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.imageRatio_ =\n            options.imageRatio !== undefined ? options.imageRatio : 1;\n        return _this;\n    }\n    /**\n     * @return {number} Ratio between rendered extent size and viewport extent size.\n     */\n    VectorImageLayer.prototype.getImageRatio = function () {\n        return this.imageRatio_;\n    };\n    /**\n     * Create a renderer for this layer.\n     * @return {import(\"../renderer/Layer.js\").default} A layer renderer.\n     */\n    VectorImageLayer.prototype.createRenderer = function () {\n        return new CanvasVectorImageLayerRenderer(this);\n    };\n    return VectorImageLayer;\n}(BaseVectorLayer));\nexport default VectorImageLayer;\n//# sourceMappingURL=VectorImage.js.map","/**\n * Operators and utilities used for style expressions\n * @module ol/style/expressions\n */\nimport { asArray, isStringColor } from '../color.js';\n/**\n * Base type used for literal style parameters; can be a number literal or the output of an operator,\n * which in turns takes {@link ExpressionValue} arguments.\n *\n * The following operators can be used:\n *\n * * Reading operators:\n *   * `['get', 'attributeName']` fetches a feature attribute (it will be prefixed by `a_` in the shader)\n *     Note: those will be taken from the attributes provided to the renderer\n *   * `['var', 'varName']` fetches a value from the style variables, or 0 if undefined\n *   * `['time']` returns the time in seconds since the creation of the layer\n *   * `['zoom']` returns the current zoom level\n *   * `['resolution']` returns the current resolution\n *\n * * Math operators:\n *   * `['*', value1, value2]` multiplies `value1` by `value2`\n *   * `['/', value1, value2]` divides `value1` by `value2`\n *   * `['+', value1, value2]` adds `value1` and `value2`\n *   * `['-', value1, value2]` subtracts `value2` from `value1`\n *   * `['clamp', value, low, high]` clamps `value` between `low` and `high`\n *   * `['%', value1, value2]` returns the result of `value1 % value2` (modulo)\n *   * `['^', value1, value2]` returns the value of `value1` raised to the `value2` power\n *\n * * Transform operators:\n *   * `['case', condition1, output1, ...conditionN, outputN, fallback]` selects the first output whose corresponding\n *     condition evaluates to `true`. If no match is found, returns the `fallback` value.\n *     All conditions should be `boolean`, output and fallback can be any kind.\n *   * `['match', input, match1, output1, ...matchN, outputN, fallback]` compares the `input` value against all\n *     provided `matchX` values, returning the output associated with the first valid match. If no match is found,\n *     returns the `fallback` value.\n *     `input` and `matchX` values must all be of the same type, and can be `number` or `string`. `outputX` and\n *     `fallback` values must be of the same type, and can be of any kind.\n *   * `['interpolate', interpolation, input, stop1, output1, ...stopN, outputN]` returns a value by interpolating between\n *     pairs of inputs and outputs; `interpolation` can either be `['linear']` or `['exponential', base]` where `base` is\n *     the rate of increase from stop A to stop B (i.e. power to which the interpolation ratio is raised); a value\n *     of 1 is equivalent to `['linear']`.\n *     `input` and `stopX` values must all be of type `number`. `outputX` values can be `number` or `color` values.\n *     Note: `input` will be clamped between `stop1` and `stopN`, meaning that all output values will be comprised\n *     between `output1` and `outputN`.\n *\n * * Logical operators:\n *   * `['<', value1, value2]` returns `true` if `value1` is strictly lower than `value2`, or `false` otherwise.\n *   * `['<=', value1, value2]` returns `true` if `value1` is lower than or equals `value2`, or `false` otherwise.\n *   * `['>', value1, value2]` returns `true` if `value1` is strictly greater than `value2`, or `false` otherwise.\n *   * `['>=', value1, value2]` returns `true` if `value1` is greater than or equals `value2`, or `false` otherwise.\n *   * `['==', value1, value2]` returns `true` if `value1` equals `value2`, or `false` otherwise.\n *   * `['!=', value1, value2]` returns `true` if `value1` does not equal `value2`, or `false` otherwise.\n *   * `['!', value1]` returns `false` if `value1` is `true` or greater than `0`, or `true` otherwise.\n *   * `['all', value1, value2, ...]` returns `true` if all the inputs are `true`, `false` otherwise.\n *   * `['any', value1, value2, ...]` returns `true` if any of the inputs are `true`, `false` otherwise.\n *   * `['between', value1, value2, value3]` returns `true` if `value1` is contained between `value2` and `value3`\n *     (inclusively), or `false` otherwise.\n *\n * * Conversion operators:\n *   * `['array', value1, ...valueN]` creates a numerical array from `number` values; please note that the amount of\n *     values can currently only be 2, 3 or 4.\n *   * `['color', red, green, blue, alpha]` creates a `color` value from `number` values; the `alpha` parameter is\n *     optional; if not specified, it will be set to 1.\n *     Note: `red`, `green` and `blue` components must be values between 0 and 255; `alpha` between 0 and 1.\n *\n * Values can either be literals or another operator, as they will be evaluated recursively.\n * Literal values can be of the following types:\n * * `boolean`\n * * `number`\n * * `string`\n * * {@link module:ol/color~Color}\n *\n * @typedef {Array<*>|import(\"../color.js\").Color|string|number|boolean} ExpressionValue\n */\n/**\n * Possible inferred types from a given value or expression.\n * Note: these are binary flags.\n * @enum {number}\n */\nexport var ValueTypes = {\n    NUMBER: 1,\n    STRING: 2,\n    COLOR: 4,\n    BOOLEAN: 8,\n    NUMBER_ARRAY: 16,\n    ANY: 31,\n    NONE: 0,\n};\n/**\n * An operator declaration must contain two methods: `getReturnType` which returns a type based on\n * the operator arguments, and `toGlsl` which returns a GLSL-compatible string.\n * Note: both methods can process arguments recursively.\n * @typedef {Object} Operator\n * @property {function(Array<ExpressionValue>): ValueTypes|number} getReturnType Returns one or several types\n * @property {function(ParsingContext, Array<ExpressionValue>, ValueTypes=): string} toGlsl Returns a GLSL-compatible string\n * Note: takes in an optional type hint as 3rd parameter\n */\n/**\n * Operator declarations\n * @type {Object<string, Operator>}\n */\nexport var Operators = {};\n/**\n * Returns the possible types for a given value (each type being a binary flag)\n * To test a value use e.g. `getValueType(v) & ValueTypes.BOOLEAN`\n * @param {ExpressionValue} value Value\n * @return {ValueTypes|number} Type or types inferred from the value\n */\nexport function getValueType(value) {\n    if (typeof value === 'number') {\n        return ValueTypes.NUMBER;\n    }\n    if (typeof value === 'boolean') {\n        return ValueTypes.BOOLEAN;\n    }\n    if (typeof value === 'string') {\n        if (isStringColor(value)) {\n            return ValueTypes.COLOR | ValueTypes.STRING;\n        }\n        return ValueTypes.STRING;\n    }\n    if (!Array.isArray(value)) {\n        throw new Error(\"Unhandled value type: \" + JSON.stringify(value));\n    }\n    var valueArr = /** @type {Array<*>} */ (value);\n    var onlyNumbers = valueArr.every(function (v) {\n        return typeof v === 'number';\n    });\n    if (onlyNumbers) {\n        if (valueArr.length === 3 || valueArr.length === 4) {\n            return ValueTypes.COLOR | ValueTypes.NUMBER_ARRAY;\n        }\n        return ValueTypes.NUMBER_ARRAY;\n    }\n    if (typeof valueArr[0] !== 'string') {\n        throw new Error(\"Expected an expression operator but received: \" + JSON.stringify(valueArr));\n    }\n    var operator = Operators[valueArr[0]];\n    if (operator === undefined) {\n        throw new Error(\"Unrecognized expression operator: \" + JSON.stringify(valueArr));\n    }\n    return operator.getReturnType(valueArr.slice(1));\n}\n/**\n * Checks if only one value type is enabled in the input number.\n * @param {ValueTypes|number} valueType Number containing value type binary flags\n * @return {boolean} True if only one type flag is enabled, false if zero or multiple\n */\nexport function isTypeUnique(valueType) {\n    return Math.log2(valueType) % 1 === 0;\n}\n/**\n * Context available during the parsing of an expression.\n * @typedef {Object} ParsingContext\n * @property {boolean} [inFragmentShader] If false, means the expression output should be made for a vertex shader\n * @property {Array<string>} variables List of variables used in the expression; contains **unprefixed names**\n * @property {Array<string>} attributes List of attributes used in the expression; contains **unprefixed names**\n * @property {Object<string, number>} stringLiteralsMap This object maps all encountered string values to a number\n */\n/**\n * Will return the number as a float with a dot separator, which is required by GLSL.\n * @param {number} v Numerical value.\n * @return {string} The value as string.\n */\nexport function numberToGlsl(v) {\n    var s = v.toString();\n    return s.indexOf('.') === -1 ? s + '.0' : s;\n}\n/**\n * Will return the number array as a float with a dot separator, concatenated with ', '.\n * @param {Array<number>} array Numerical values array.\n * @return {string} The array as a vector, e. g.: `vec3(1.0, 2.0, 3.0)`.\n */\nexport function arrayToGlsl(array) {\n    if (array.length < 2 || array.length > 4) {\n        throw new Error('`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.');\n    }\n    return \"vec\" + array.length + \"(\" + array.map(numberToGlsl).join(', ') + \")\";\n}\n/**\n * Will normalize and converts to string a `vec4` color array compatible with GLSL.\n * @param {string|import(\"../color.js\").Color} color Color either in string format or [r, g, b, a] array format,\n * with RGB components in the 0..255 range and the alpha component in the 0..1 range.\n * Note that the final array will always have 4 components.\n * @return {string} The color expressed in the `vec4(1.0, 1.0, 1.0, 1.0)` form.\n */\nexport function colorToGlsl(color) {\n    var array = asArray(color).slice();\n    if (array.length < 4) {\n        array.push(1);\n    }\n    return arrayToGlsl(array.map(function (c, i) {\n        return i < 3 ? c / 255 : c;\n    }));\n}\n/**\n * Returns a stable equivalent number for the string literal.\n * @param {ParsingContext} context Parsing context\n * @param {string} string String literal value\n * @return {number} Number equivalent\n */\nexport function getStringNumberEquivalent(context, string) {\n    if (context.stringLiteralsMap[string] === undefined) {\n        context.stringLiteralsMap[string] = Object.keys(context.stringLiteralsMap).length;\n    }\n    return context.stringLiteralsMap[string];\n}\n/**\n * Returns a stable equivalent number for the string literal, for use in shaders. This number is then\n * converted to be a GLSL-compatible string.\n * @param {ParsingContext} context Parsing context\n * @param {string} string String literal value\n * @return {string} GLSL-compatible string containing a number\n */\nexport function stringToGlsl(context, string) {\n    return numberToGlsl(getStringNumberEquivalent(context, string));\n}\n/**\n * Recursively parses a style expression and outputs a GLSL-compatible string. Takes in a parsing context that\n * will be read and modified during the parsing operation.\n * @param {ParsingContext} context Parsing context\n * @param {ExpressionValue} value Value\n * @param {ValueTypes|number} [typeHint] Hint for the expected final type (can be several types combined)\n * @return {string} GLSL-compatible output\n */\nexport function expressionToGlsl(context, value, typeHint) {\n    // operator\n    if (Array.isArray(value) && typeof value[0] === 'string') {\n        var operator = Operators[value[0]];\n        if (operator === undefined) {\n            throw new Error(\"Unrecognized expression operator: \" + JSON.stringify(value));\n        }\n        return operator.toGlsl(context, value.slice(1), typeHint);\n    }\n    var valueType = getValueType(value);\n    if ((valueType & ValueTypes.NUMBER) > 0) {\n        return numberToGlsl(/** @type {number} */ (value));\n    }\n    if ((valueType & ValueTypes.BOOLEAN) > 0) {\n        return value.toString();\n    }\n    if ((valueType & ValueTypes.STRING) > 0 &&\n        (typeHint === undefined || typeHint == ValueTypes.STRING)) {\n        return stringToGlsl(context, value.toString());\n    }\n    if ((valueType & ValueTypes.COLOR) > 0 &&\n        (typeHint === undefined || typeHint == ValueTypes.COLOR)) {\n        return colorToGlsl(/** @type {Array<number> | string} */ (value));\n    }\n    if ((valueType & ValueTypes.NUMBER_ARRAY) > 0) {\n        return arrayToGlsl(/** @type {Array<number>} */ (value));\n    }\n    throw new Error(\"Unexpected expression \" + value + \" (expected type \" + typeHint + \")\");\n}\nfunction assertNumber(value) {\n    if (!(getValueType(value) & ValueTypes.NUMBER)) {\n        throw new Error(\"A numeric value was expected, got \" + JSON.stringify(value) + \" instead\");\n    }\n}\nfunction assertNumbers(values) {\n    for (var i = 0; i < values.length; i++) {\n        assertNumber(values[i]);\n    }\n}\nfunction assertString(value) {\n    if (!(getValueType(value) & ValueTypes.STRING)) {\n        throw new Error(\"A string value was expected, got \" + JSON.stringify(value) + \" instead\");\n    }\n}\nfunction assertBoolean(value) {\n    if (!(getValueType(value) & ValueTypes.BOOLEAN)) {\n        throw new Error(\"A boolean value was expected, got \" + JSON.stringify(value) + \" instead\");\n    }\n}\nfunction assertArgsCount(args, count) {\n    if (args.length !== count) {\n        throw new Error(\"Exactly \" + count + \" arguments were expected, got \" + args.length + \" instead\");\n    }\n}\nfunction assertArgsMinCount(args, count) {\n    if (args.length < count) {\n        throw new Error(\"At least \" + count + \" arguments were expected, got \" + args.length + \" instead\");\n    }\n}\nfunction assertArgsMaxCount(args, count) {\n    if (args.length > count) {\n        throw new Error(\"At most \" + count + \" arguments were expected, got \" + args.length + \" instead\");\n    }\n}\nfunction assertArgsEven(args) {\n    if (args.length % 2 !== 0) {\n        throw new Error(\"An even amount of arguments was expected, got \" + args + \" instead\");\n    }\n}\nfunction assertArgsOdd(args) {\n    if (args.length % 2 === 0) {\n        throw new Error(\"An odd amount of arguments was expected, got \" + args + \" instead\");\n    }\n}\nfunction assertUniqueInferredType(args, types) {\n    if (!isTypeUnique(types)) {\n        throw new Error(\"Could not infer only one type from the following expression: \" + JSON.stringify(args));\n    }\n}\nOperators['get'] = {\n    getReturnType: function (args) {\n        return ValueTypes.ANY;\n    },\n    toGlsl: function (context, args) {\n        assertArgsCount(args, 1);\n        assertString(args[0]);\n        var value = args[0].toString();\n        if (context.attributes.indexOf(value) === -1) {\n            context.attributes.push(value);\n        }\n        var prefix = context.inFragmentShader ? 'v_' : 'a_';\n        return prefix + value;\n    },\n};\n/**\n * Get the uniform name given a variable name.\n * @param {string} variableName The variable name.\n * @return {string} The uniform name.\n */\nexport function uniformNameForVariable(variableName) {\n    return 'u_var_' + variableName;\n}\nOperators['var'] = {\n    getReturnType: function (args) {\n        return ValueTypes.ANY;\n    },\n    toGlsl: function (context, args) {\n        assertArgsCount(args, 1);\n        assertString(args[0]);\n        var value = args[0].toString();\n        if (context.variables.indexOf(value) === -1) {\n            context.variables.push(value);\n        }\n        return uniformNameForVariable(value);\n    },\n};\nOperators['time'] = {\n    getReturnType: function (args) {\n        return ValueTypes.NUMBER;\n    },\n    toGlsl: function (context, args) {\n        assertArgsCount(args, 0);\n        return 'u_time';\n    },\n};\nOperators['zoom'] = {\n    getReturnType: function (args) {\n        return ValueTypes.NUMBER;\n    },\n    toGlsl: function (context, args) {\n        assertArgsCount(args, 0);\n        return 'u_zoom';\n    },\n};\nOperators['resolution'] = {\n    getReturnType: function (args) {\n        return ValueTypes.NUMBER;\n    },\n    toGlsl: function (context, args) {\n        assertArgsCount(args, 0);\n        return 'u_resolution';\n    },\n};\nOperators['*'] = {\n    getReturnType: function (args) {\n        return ValueTypes.NUMBER;\n    },\n    toGlsl: function (context, args) {\n        assertArgsCount(args, 2);\n        assertNumbers(args);\n        return \"(\" + expressionToGlsl(context, args[0]) + \" * \" + expressionToGlsl(context, args[1]) + \")\";\n    },\n};\nOperators['/'] = {\n    getReturnType: function (args) {\n        return ValueTypes.NUMBER;\n    },\n    toGlsl: function (context, args) {\n        assertArgsCount(args, 2);\n        assertNumbers(args);\n        return \"(\" + expressionToGlsl(context, args[0]) + \" / \" + expressionToGlsl(context, args[1]) + \")\";\n    },\n};\nOperators['+'] = {\n    getReturnType: function (args) {\n        return ValueTypes.NUMBER;\n    },\n    toGlsl: function (context, args) {\n        assertArgsCount(args, 2);\n        assertNumbers(args);\n        return \"(\" + expressionToGlsl(context, args[0]) + \" + \" + expressionToGlsl(context, args[1]) + \")\";\n    },\n};\nOperators['-'] = {\n    getReturnType: function (args) {\n        return ValueTypes.NUMBER;\n    },\n    toGlsl: function (context, args) {\n        assertArgsCount(args, 2);\n        assertNumbers(args);\n        return \"(\" + expressionToGlsl(context, args[0]) + \" - \" + expressionToGlsl(context, args[1]) + \")\";\n    },\n};\nOperators['clamp'] = {\n    getReturnType: function (args) {\n        return ValueTypes.NUMBER;\n    },\n    toGlsl: function (context, args) {\n        assertArgsCount(args, 3);\n        assertNumbers(args);\n        var min = expressionToGlsl(context, args[1]);\n        var max = expressionToGlsl(context, args[2]);\n        return \"clamp(\" + expressionToGlsl(context, args[0]) + \", \" + min + \", \" + max + \")\";\n    },\n};\nOperators['%'] = {\n    getReturnType: function (args) {\n        return ValueTypes.NUMBER;\n    },\n    toGlsl: function (context, args) {\n        assertArgsCount(args, 2);\n        assertNumbers(args);\n        return \"mod(\" + expressionToGlsl(context, args[0]) + \", \" + expressionToGlsl(context, args[1]) + \")\";\n    },\n};\nOperators['^'] = {\n    getReturnType: function (args) {\n        return ValueTypes.NUMBER;\n    },\n    toGlsl: function (context, args) {\n        assertArgsCount(args, 2);\n        assertNumbers(args);\n        return \"pow(\" + expressionToGlsl(context, args[0]) + \", \" + expressionToGlsl(context, args[1]) + \")\";\n    },\n};\nOperators['>'] = {\n    getReturnType: function (args) {\n        return ValueTypes.BOOLEAN;\n    },\n    toGlsl: function (context, args) {\n        assertArgsCount(args, 2);\n        assertNumbers(args);\n        return \"(\" + expressionToGlsl(context, args[0]) + \" > \" + expressionToGlsl(context, args[1]) + \")\";\n    },\n};\nOperators['>='] = {\n    getReturnType: function (args) {\n        return ValueTypes.BOOLEAN;\n    },\n    toGlsl: function (context, args) {\n        assertArgsCount(args, 2);\n        assertNumbers(args);\n        return \"(\" + expressionToGlsl(context, args[0]) + \" >= \" + expressionToGlsl(context, args[1]) + \")\";\n    },\n};\nOperators['<'] = {\n    getReturnType: function (args) {\n        return ValueTypes.BOOLEAN;\n    },\n    toGlsl: function (context, args) {\n        assertArgsCount(args, 2);\n        assertNumbers(args);\n        return \"(\" + expressionToGlsl(context, args[0]) + \" < \" + expressionToGlsl(context, args[1]) + \")\";\n    },\n};\nOperators['<='] = {\n    getReturnType: function (args) {\n        return ValueTypes.BOOLEAN;\n    },\n    toGlsl: function (context, args) {\n        assertArgsCount(args, 2);\n        assertNumbers(args);\n        return \"(\" + expressionToGlsl(context, args[0]) + \" <= \" + expressionToGlsl(context, args[1]) + \")\";\n    },\n};\nfunction getEqualOperator(operator) {\n    return {\n        getReturnType: function (args) {\n            return ValueTypes.BOOLEAN;\n        },\n        toGlsl: function (context, args) {\n            assertArgsCount(args, 2);\n            // find common type\n            var type = ValueTypes.ANY;\n            for (var i = 0; i < args.length; i++) {\n                type = type & getValueType(args[i]);\n            }\n            if (type === 0) {\n                throw new Error(\"All arguments should be of compatible type, got \" + JSON.stringify(args) + \" instead\");\n            }\n            return \"(\" + expressionToGlsl(context, args[0], type) + \" \" + operator + \" \" + expressionToGlsl(context, args[1], type) + \")\";\n        },\n    };\n}\nOperators['=='] = getEqualOperator('==');\nOperators['!='] = getEqualOperator('!=');\nOperators['!'] = {\n    getReturnType: function (args) {\n        return ValueTypes.BOOLEAN;\n    },\n    toGlsl: function (context, args) {\n        assertArgsCount(args, 1);\n        assertBoolean(args[0]);\n        return \"(!\" + expressionToGlsl(context, args[0]) + \")\";\n    },\n};\nfunction getDecisionOperator(operator) {\n    return {\n        getReturnType: function (args) {\n            return ValueTypes.BOOLEAN;\n        },\n        toGlsl: function (context, args) {\n            assertArgsMinCount(args, 2);\n            for (var i = 0; i < args.length; i++) {\n                assertBoolean(args[i]);\n            }\n            var result = '';\n            result = args\n                .map(function (arg) { return expressionToGlsl(context, arg); })\n                .join(\" \" + operator + \" \");\n            result = \"(\" + result + \")\";\n            return result;\n        },\n    };\n}\nOperators['all'] = getDecisionOperator('&&');\nOperators['any'] = getDecisionOperator('||');\nOperators['between'] = {\n    getReturnType: function (args) {\n        return ValueTypes.BOOLEAN;\n    },\n    toGlsl: function (context, args) {\n        assertArgsCount(args, 3);\n        assertNumbers(args);\n        var min = expressionToGlsl(context, args[1]);\n        var max = expressionToGlsl(context, args[2]);\n        var value = expressionToGlsl(context, args[0]);\n        return \"(\" + value + \" >= \" + min + \" && \" + value + \" <= \" + max + \")\";\n    },\n};\nOperators['array'] = {\n    getReturnType: function (args) {\n        return ValueTypes.NUMBER_ARRAY;\n    },\n    toGlsl: function (context, args) {\n        assertArgsMinCount(args, 2);\n        assertArgsMaxCount(args, 4);\n        assertNumbers(args);\n        var parsedArgs = args.map(function (val) {\n            return expressionToGlsl(context, val, ValueTypes.NUMBER);\n        });\n        return \"vec\" + args.length + \"(\" + parsedArgs.join(', ') + \")\";\n    },\n};\nOperators['color'] = {\n    getReturnType: function (args) {\n        return ValueTypes.COLOR;\n    },\n    toGlsl: function (context, args) {\n        assertArgsMinCount(args, 3);\n        assertArgsMaxCount(args, 4);\n        assertNumbers(args);\n        var array = /** @type {Array<number>} */ (args);\n        if (args.length === 3) {\n            array.push(1);\n        }\n        var parsedArgs = args.map(function (val, i) {\n            return (expressionToGlsl(context, val, ValueTypes.NUMBER) +\n                (i < 3 ? ' / 255.0' : ''));\n        });\n        return \"vec\" + args.length + \"(\" + parsedArgs.join(', ') + \")\";\n    },\n};\nOperators['interpolate'] = {\n    getReturnType: function (args) {\n        var type = ValueTypes.COLOR | ValueTypes.NUMBER;\n        for (var i = 3; i < args.length; i += 2) {\n            type = type & getValueType(args[i]);\n        }\n        return type;\n    },\n    toGlsl: function (context, args, opt_typeHint) {\n        assertArgsEven(args);\n        assertArgsMinCount(args, 6);\n        // validate interpolation type\n        var type = args[0];\n        var interpolation;\n        switch (type[0]) {\n            case 'linear':\n                interpolation = 1;\n                break;\n            case 'exponential':\n                interpolation = type[1];\n                break;\n            default:\n                interpolation = null;\n        }\n        if (!interpolation) {\n            throw new Error(\"Invalid interpolation type for \\\"interpolate\\\" operator, received: \" + JSON.stringify(type));\n        }\n        // compute input/output types\n        var typeHint = opt_typeHint !== undefined ? opt_typeHint : ValueTypes.ANY;\n        var outputType = Operators['interpolate'].getReturnType(args) & typeHint;\n        assertUniqueInferredType(args, outputType);\n        var input = expressionToGlsl(context, args[1]);\n        var result = null;\n        for (var i = 2; i < args.length - 2; i += 2) {\n            var stop1 = expressionToGlsl(context, args[i]);\n            var output1 = expressionToGlsl(context, args[i + 1], outputType);\n            var stop2 = expressionToGlsl(context, args[i + 2]);\n            var output2 = expressionToGlsl(context, args[i + 3], outputType);\n            result = \"mix(\" + (result || output1) + \", \" + output2 + \", pow(clamp((\" + input + \" - \" + stop1 + \") / (\" + stop2 + \" - \" + stop1 + \"), 0.0, 1.0), \" + numberToGlsl(interpolation) + \"))\";\n        }\n        return result;\n    },\n};\nOperators['match'] = {\n    getReturnType: function (args) {\n        var type = ValueTypes.ANY;\n        for (var i = 2; i < args.length; i += 2) {\n            type = type & getValueType(args[i]);\n        }\n        type = type & getValueType(args[args.length - 1]);\n        return type;\n    },\n    toGlsl: function (context, args, opt_typeHint) {\n        assertArgsEven(args);\n        assertArgsMinCount(args, 4);\n        var typeHint = opt_typeHint !== undefined ? opt_typeHint : ValueTypes.ANY;\n        var outputType = Operators['match'].getReturnType(args) & typeHint;\n        assertUniqueInferredType(args, outputType);\n        var input = expressionToGlsl(context, args[0]);\n        var fallback = expressionToGlsl(context, args[args.length - 1], outputType);\n        var result = null;\n        for (var i = args.length - 3; i >= 1; i -= 2) {\n            var match = expressionToGlsl(context, args[i]);\n            var output = expressionToGlsl(context, args[i + 1], outputType);\n            result = \"(\" + input + \" == \" + match + \" ? \" + output + \" : \" + (result || fallback) + \")\";\n        }\n        return result;\n    },\n};\nOperators['case'] = {\n    getReturnType: function (args) {\n        var type = ValueTypes.ANY;\n        for (var i = 1; i < args.length; i += 2) {\n            type = type & getValueType(args[i]);\n        }\n        type = type & getValueType(args[args.length - 1]);\n        return type;\n    },\n    toGlsl: function (context, args, opt_typeHint) {\n        assertArgsOdd(args);\n        assertArgsMinCount(args, 3);\n        var typeHint = opt_typeHint !== undefined ? opt_typeHint : ValueTypes.ANY;\n        var outputType = Operators['case'].getReturnType(args) & typeHint;\n        assertUniqueInferredType(args, outputType);\n        for (var i = 0; i < args.length - 1; i += 2) {\n            assertBoolean(args[i]);\n        }\n        var fallback = expressionToGlsl(context, args[args.length - 1], outputType);\n        var result = null;\n        for (var i = args.length - 3; i >= 0; i -= 2) {\n            var condition = expressionToGlsl(context, args[i]);\n            var output = expressionToGlsl(context, args[i + 1], outputType);\n            result = \"(\" + condition + \" ? \" + output + \" : \" + (result || fallback) + \")\";\n        }\n        return result;\n    },\n};\n//# sourceMappingURL=expressions.js.map","/**\n * Classes and utilities for generating shaders from literal style objects\n * @module ol/webgl/ShaderBuilder\n */\nimport { ValueTypes, expressionToGlsl, getStringNumberEquivalent, uniformNameForVariable, } from '../style/expressions.js';\n/**\n * @typedef {Object} VaryingDescription\n * @property {string} name Varying name, as will be declared in the header.\n * @property {string} type Varying type, either `float`, `vec2`, `vec4`...\n * @property {string} expression Expression which will be assigned to the varying in the vertex shader, and\n * passed on to the fragment shader.\n */\n/**\n * @classdesc\n * This class implements a classic builder pattern for generating many different types of shaders.\n * Methods can be chained, e. g.:\n *\n * ```js\n * const shader = new ShaderBuilder()\n *   .addVarying('v_width', 'float', 'a_width')\n *   .addUniform('u_time')\n *   .setColorExpression('...')\n *   .setSizeExpression('...')\n *   .outputSymbolFragmentShader();\n * ```\n */\nvar ShaderBuilder = /** @class */ (function () {\n    function ShaderBuilder() {\n        /**\n         * Uniforms; these will be declared in the header (should include the type).\n         * @type {Array<string>}\n         * @private\n         */\n        this.uniforms = [];\n        /**\n         * Attributes; these will be declared in the header (should include the type).\n         * @type {Array<string>}\n         * @private\n         */\n        this.attributes = [];\n        /**\n         * Varyings with a name, a type and an expression.\n         * @type {Array<VaryingDescription>}\n         * @private\n         */\n        this.varyings = [];\n        /**\n         * @type {string}\n         * @private\n         */\n        this.sizeExpression = 'vec2(1.0)';\n        /**\n         * @type {string}\n         * @private\n         */\n        this.rotationExpression = '0.0';\n        /**\n         * @type {string}\n         * @private\n         */\n        this.offsetExpression = 'vec2(0.0)';\n        /**\n         * @type {string}\n         * @private\n         */\n        this.colorExpression = 'vec4(1.0)';\n        /**\n         * @type {string}\n         * @private\n         */\n        this.texCoordExpression = 'vec4(0.0, 0.0, 1.0, 1.0)';\n        /**\n         * @type {string}\n         * @private\n         */\n        this.discardExpression = 'false';\n        /**\n         * @type {boolean}\n         * @private\n         */\n        this.rotateWithView = false;\n    }\n    /**\n     * Adds a uniform accessible in both fragment and vertex shaders.\n     * The given name should include a type, such as `sampler2D u_texture`.\n     * @param {string} name Uniform name\n     * @return {ShaderBuilder} the builder object\n     */\n    ShaderBuilder.prototype.addUniform = function (name) {\n        this.uniforms.push(name);\n        return this;\n    };\n    /**\n     * Adds an attribute accessible in the vertex shader, read from the geometry buffer.\n     * The given name should include a type, such as `vec2 a_position`.\n     * @param {string} name Attribute name\n     * @return {ShaderBuilder} the builder object\n     */\n    ShaderBuilder.prototype.addAttribute = function (name) {\n        this.attributes.push(name);\n        return this;\n    };\n    /**\n     * Adds a varying defined in the vertex shader and accessible from the fragment shader.\n     * The type and expression of the varying have to be specified separately.\n     * @param {string} name Varying name\n     * @param {'float'|'vec2'|'vec3'|'vec4'} type Type\n     * @param {string} expression Expression used to assign a value to the varying.\n     * @return {ShaderBuilder} the builder object\n     */\n    ShaderBuilder.prototype.addVarying = function (name, type, expression) {\n        this.varyings.push({\n            name: name,\n            type: type,\n            expression: expression,\n        });\n        return this;\n    };\n    /**\n     * Sets an expression to compute the size of the shape.\n     * This expression can use all the uniforms and attributes available\n     * in the vertex shader, and should evaluate to a `vec2` value.\n     * @param {string} expression Size expression\n     * @return {ShaderBuilder} the builder object\n     */\n    ShaderBuilder.prototype.setSizeExpression = function (expression) {\n        this.sizeExpression = expression;\n        return this;\n    };\n    /**\n     * Sets an expression to compute the rotation of the shape.\n     * This expression can use all the uniforms and attributes available\n     * in the vertex shader, and should evaluate to a `float` value in radians.\n     * @param {string} expression Size expression\n     * @return {ShaderBuilder} the builder object\n     */\n    ShaderBuilder.prototype.setRotationExpression = function (expression) {\n        this.rotationExpression = expression;\n        return this;\n    };\n    /**\n     * Sets an expression to compute the offset of the symbol from the point center.\n     * This expression can use all the uniforms and attributes available\n     * in the vertex shader, and should evaluate to a `vec2` value.\n     * Note: will only be used for point geometry shaders.\n     * @param {string} expression Offset expression\n     * @return {ShaderBuilder} the builder object\n     */\n    ShaderBuilder.prototype.setSymbolOffsetExpression = function (expression) {\n        this.offsetExpression = expression;\n        return this;\n    };\n    /**\n     * Sets an expression to compute the color of the shape.\n     * This expression can use all the uniforms, varyings and attributes available\n     * in the fragment shader, and should evaluate to a `vec4` value.\n     * @param {string} expression Color expression\n     * @return {ShaderBuilder} the builder object\n     */\n    ShaderBuilder.prototype.setColorExpression = function (expression) {\n        this.colorExpression = expression;\n        return this;\n    };\n    /**\n     * Sets an expression to compute the texture coordinates of the vertices.\n     * This expression can use all the uniforms and attributes available\n     * in the vertex shader, and should evaluate to a `vec4` value.\n     * @param {string} expression Texture coordinate expression\n     * @return {ShaderBuilder} the builder object\n     */\n    ShaderBuilder.prototype.setTextureCoordinateExpression = function (expression) {\n        this.texCoordExpression = expression;\n        return this;\n    };\n    /**\n     * Sets an expression to determine whether a fragment (pixel) should be discarded,\n     * i.e. not drawn at all.\n     * This expression can use all the uniforms, varyings and attributes available\n     * in the fragment shader, and should evaluate to a `bool` value (it will be\n     * used in an `if` statement)\n     * @param {string} expression Fragment discard expression\n     * @return {ShaderBuilder} the builder object\n     */\n    ShaderBuilder.prototype.setFragmentDiscardExpression = function (expression) {\n        this.discardExpression = expression;\n        return this;\n    };\n    /**\n     * Sets whether the symbols should rotate with the view or stay aligned with the map.\n     * Note: will only be used for point geometry shaders.\n     * @param {boolean} rotateWithView Rotate with view\n     * @return {ShaderBuilder} the builder object\n     */\n    ShaderBuilder.prototype.setSymbolRotateWithView = function (rotateWithView) {\n        this.rotateWithView = rotateWithView;\n        return this;\n    };\n    /**\n     * @return {string} Previously set size expression\n     */\n    ShaderBuilder.prototype.getSizeExpression = function () {\n        return this.sizeExpression;\n    };\n    /**\n     * @return {string} Previously set symbol offset expression\n     */\n    ShaderBuilder.prototype.getOffsetExpression = function () {\n        return this.offsetExpression;\n    };\n    /**\n     * @return {string} Previously set color expression\n     */\n    ShaderBuilder.prototype.getColorExpression = function () {\n        return this.colorExpression;\n    };\n    /**\n     * @return {string} Previously set texture coordinate expression\n     */\n    ShaderBuilder.prototype.getTextureCoordinateExpression = function () {\n        return this.texCoordExpression;\n    };\n    /**\n     * @return {string} Previously set fragment discard expression\n     */\n    ShaderBuilder.prototype.getFragmentDiscardExpression = function () {\n        return this.discardExpression;\n    };\n    /**\n     * Generates a symbol vertex shader from the builder parameters,\n     * intended to be used on point geometries.\n     *\n     * Three uniforms are hardcoded in all shaders: `u_projectionMatrix`, `u_offsetScaleMatrix`,\n     * `u_offsetRotateMatrix`, `u_time`.\n     *\n     * The following attributes are hardcoded and expected to be present in the vertex buffers:\n     * `vec2 a_position`, `float a_index` (being the index of the vertex in the quad, 0 to 3).\n     *\n     * The following varyings are hardcoded and gives the coordinate of the pixel both in the quad and on the texture:\n     * `vec2 v_quadCoord`, `vec2 v_texCoord`\n     *\n     * @param {boolean} [forHitDetection] If true, the shader will be modified to include hit detection variables\n     * (namely, hit color with encoded feature id).\n     * @return {string} The full shader as a string.\n     */\n    ShaderBuilder.prototype.getSymbolVertexShader = function (forHitDetection) {\n        var offsetMatrix = this.rotateWithView\n            ? 'u_offsetScaleMatrix * u_offsetRotateMatrix'\n            : 'u_offsetScaleMatrix';\n        var attributes = this.attributes;\n        var varyings = this.varyings;\n        if (forHitDetection) {\n            attributes = attributes.concat('vec4 a_hitColor');\n            varyings = varyings.concat({\n                name: 'v_hitColor',\n                type: 'vec4',\n                expression: 'a_hitColor',\n            });\n        }\n        return \"precision mediump float;\\nuniform mat4 u_projectionMatrix;\\nuniform mat4 u_offsetScaleMatrix;\\nuniform mat4 u_offsetRotateMatrix;\\nuniform float u_time;\\nuniform float u_zoom;\\nuniform float u_resolution;\\n\" + this.uniforms\n            .map(function (uniform) {\n            return 'uniform ' + uniform + ';';\n        })\n            .join('\\n') + \"\\nattribute vec2 a_position;\\nattribute float a_index;\\n\" + attributes\n            .map(function (attribute) {\n            return 'attribute ' + attribute + ';';\n        })\n            .join('\\n') + \"\\nvarying vec2 v_texCoord;\\nvarying vec2 v_quadCoord;\\n\" + varyings\n            .map(function (varying) {\n            return 'varying ' + varying.type + ' ' + varying.name + ';';\n        })\n            .join('\\n') + \"\\nvoid main(void) {\\n  mat4 offsetMatrix = \" + offsetMatrix + \";\\n  vec2 halfSize = \" + this.sizeExpression + \" * 0.5;\\n  vec2 offset = \" + this.offsetExpression + \";\\n  float angle = \" + this.rotationExpression + \";\\n  float offsetX;\\n  float offsetY;\\n  if (a_index == 0.0) {\\n    offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\\n    offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\\n  } else if (a_index == 1.0) {\\n    offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);\\n    offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\\n  } else if (a_index == 2.0) {\\n    offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\\n    offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);\\n  } else {\\n    offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);\\n    offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);\\n  }\\n  vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\\n  gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\\n  vec4 texCoord = \" + this.texCoordExpression + \";\\n  float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;\\n  float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;\\n  v_texCoord = vec2(u, v);\\n  u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\\n  v = a_index == 2.0 || a_index == 3.0 ? 0.0 : 1.0;\\n  v_quadCoord = vec2(u, v);\\n\" + varyings\n            .map(function (varying) {\n            return '  ' + varying.name + ' = ' + varying.expression + ';';\n        })\n            .join('\\n') + \"\\n}\";\n    };\n    /**\n     * Generates a symbol fragment shader from the builder parameters,\n     * intended to be used on point geometries.\n     *\n     * Expects the following varyings to be transmitted by the vertex shader:\n     * `vec2 v_quadCoord`, `vec2 v_texCoord`\n     *\n     * @param {boolean} [forHitDetection] If true, the shader will be modified to include hit detection variables\n     * (namely, hit color with encoded feature id).\n     * @return {string} The full shader as a string.\n     */\n    ShaderBuilder.prototype.getSymbolFragmentShader = function (forHitDetection) {\n        var hitDetectionBypass = forHitDetection\n            ? '  if (gl_FragColor.a < 0.1) { discard; } gl_FragColor = v_hitColor;'\n            : '';\n        var varyings = this.varyings;\n        if (forHitDetection) {\n            varyings = varyings.concat({\n                name: 'v_hitColor',\n                type: 'vec4',\n                expression: 'a_hitColor',\n            });\n        }\n        return \"precision mediump float;\\nuniform float u_time;\\nuniform float u_zoom;\\nuniform float u_resolution;\\n\" + this.uniforms\n            .map(function (uniform) {\n            return 'uniform ' + uniform + ';';\n        })\n            .join('\\n') + \"\\nvarying vec2 v_texCoord;\\nvarying vec2 v_quadCoord;\\n\" + varyings\n            .map(function (varying) {\n            return 'varying ' + varying.type + ' ' + varying.name + ';';\n        })\n            .join('\\n') + \"\\nvoid main(void) {\\n  if (\" + this.discardExpression + \") { discard; }\\n  gl_FragColor = \" + this.colorExpression + \";\\n  gl_FragColor.rgb *= gl_FragColor.a;\\n\" + hitDetectionBypass + \"\\n}\";\n    };\n    return ShaderBuilder;\n}());\nexport { ShaderBuilder };\n/**\n * @typedef {Object} StyleParseResult\n * @property {ShaderBuilder} builder Shader builder pre-configured according to a given style\n * @property {Object<string,import(\"./Helper\").UniformValue>} uniforms Uniform definitions.\n * @property {Array<import(\"../renderer/webgl/PointsLayer\").CustomAttribute>} attributes Attribute descriptions.\n */\n/**\n * Parses a {@link import(\"../style/literal\").LiteralStyle} object and returns a {@link ShaderBuilder}\n * object that has been configured according to the given style, as well as `attributes` and `uniforms`\n * arrays to be fed to the `WebGLPointsRenderer` class.\n *\n * Also returns `uniforms` and `attributes` properties as expected by the\n * {@link module:ol/renderer/webgl/PointsLayer~WebGLPointsLayerRenderer}.\n *\n * @param {import(\"../style/literal\").LiteralStyle} style Literal style.\n * @return {StyleParseResult} Result containing shader params, attributes and uniforms.\n */\nexport function parseLiteralStyle(style) {\n    var symbStyle = style.symbol;\n    var size = symbStyle.size !== undefined ? symbStyle.size : 1;\n    var color = symbStyle.color || 'white';\n    var texCoord = symbStyle.textureCoord || [0, 0, 1, 1];\n    var offset = symbStyle.offset || [0, 0];\n    var opacity = symbStyle.opacity !== undefined ? symbStyle.opacity : 1;\n    var rotation = symbStyle.rotation !== undefined ? symbStyle.rotation : 0;\n    /**\n     * @type {import(\"../style/expressions.js\").ParsingContext}\n     */\n    var vertContext = {\n        inFragmentShader: false,\n        variables: [],\n        attributes: [],\n        stringLiteralsMap: {},\n    };\n    var parsedSize = expressionToGlsl(vertContext, size, ValueTypes.NUMBER_ARRAY | ValueTypes.NUMBER);\n    var parsedOffset = expressionToGlsl(vertContext, offset, ValueTypes.NUMBER_ARRAY);\n    var parsedTexCoord = expressionToGlsl(vertContext, texCoord, ValueTypes.NUMBER_ARRAY);\n    var parsedRotation = expressionToGlsl(vertContext, rotation, ValueTypes.NUMBER);\n    /**\n     * @type {import(\"../style/expressions.js\").ParsingContext}\n     */\n    var fragContext = {\n        inFragmentShader: true,\n        variables: vertContext.variables,\n        attributes: [],\n        stringLiteralsMap: vertContext.stringLiteralsMap,\n    };\n    var parsedColor = expressionToGlsl(fragContext, color, ValueTypes.COLOR);\n    var parsedOpacity = expressionToGlsl(fragContext, opacity, ValueTypes.NUMBER);\n    var opacityFilter = '1.0';\n    var visibleSize = \"vec2(\" + expressionToGlsl(fragContext, size, ValueTypes.NUMBER_ARRAY | ValueTypes.NUMBER) + \").x\";\n    switch (symbStyle.symbolType) {\n        case 'square':\n            break;\n        case 'image':\n            break;\n        // taken from https://thebookofshaders.com/07/\n        case 'circle':\n            opacityFilter = \"(1.0-smoothstep(1.-4./\" + visibleSize + \",1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))\";\n            break;\n        case 'triangle':\n            var st = '(v_quadCoord*2.-1.)';\n            var a = \"(atan(\" + st + \".x,\" + st + \".y))\";\n            opacityFilter = \"(1.0-smoothstep(.5-3./\" + visibleSize + \",.5,cos(floor(.5+\" + a + \"/2.094395102)*2.094395102-\" + a + \")*length(\" + st + \")))\";\n            break;\n        default:\n            throw new Error('Unexpected symbol type: ' + symbStyle.symbolType);\n    }\n    var builder = new ShaderBuilder()\n        .setSizeExpression(\"vec2(\" + parsedSize + \")\")\n        .setRotationExpression(parsedRotation)\n        .setSymbolOffsetExpression(parsedOffset)\n        .setTextureCoordinateExpression(parsedTexCoord)\n        .setSymbolRotateWithView(!!symbStyle.rotateWithView)\n        .setColorExpression(\"vec4(\" + parsedColor + \".rgb, \" + parsedColor + \".a * \" + parsedOpacity + \" * \" + opacityFilter + \")\");\n    if (style.filter) {\n        var parsedFilter = expressionToGlsl(fragContext, style.filter, ValueTypes.BOOLEAN);\n        builder.setFragmentDiscardExpression(\"!\" + parsedFilter);\n    }\n    /** @type {Object<string,import(\"../webgl/Helper\").UniformValue>} */\n    var uniforms = {};\n    // define one uniform per variable\n    fragContext.variables.forEach(function (varName) {\n        var uniformName = uniformNameForVariable(varName);\n        builder.addUniform(\"float \" + uniformName);\n        uniforms[uniformName] = function () {\n            if (!style.variables || style.variables[varName] === undefined) {\n                throw new Error(\"The following variable is missing from the style: \" + varName);\n            }\n            var value = style.variables[varName];\n            if (typeof value === 'string') {\n                value = getStringNumberEquivalent(vertContext, value);\n            }\n            return value !== undefined ? value : -9999999; // to avoid matching with the first string literal\n        };\n    });\n    if (symbStyle.symbolType === 'image' && symbStyle.src) {\n        var texture = new Image();\n        texture.src = symbStyle.src;\n        builder\n            .addUniform('sampler2D u_texture')\n            .setColorExpression(builder.getColorExpression() + ' * texture2D(u_texture, v_texCoord)');\n        uniforms['u_texture'] = texture;\n    }\n    // for each feature attribute used in the fragment shader, define a varying that will be used to pass data\n    // from the vertex to the fragment shader, as well as an attribute in the vertex shader (if not already present)\n    fragContext.attributes.forEach(function (attrName) {\n        if (vertContext.attributes.indexOf(attrName) === -1) {\n            vertContext.attributes.push(attrName);\n        }\n        builder.addVarying(\"v_\" + attrName, 'float', \"a_\" + attrName);\n    });\n    // for each feature attribute used in the vertex shader, define an attribute in the vertex shader.\n    vertContext.attributes.forEach(function (attrName) {\n        builder.addAttribute(\"float a_\" + attrName);\n    });\n    return {\n        builder: builder,\n        attributes: vertContext.attributes.map(function (attributeName) {\n            return {\n                name: attributeName,\n                callback: function (feature, props) {\n                    var value = props[attributeName];\n                    if (typeof value === 'string') {\n                        value = getStringNumberEquivalent(vertContext, value);\n                    }\n                    return value !== undefined ? value : -9999999; // to avoid matching with the first string literal\n                },\n            };\n        }),\n        uniforms: uniforms,\n    };\n}\n//# sourceMappingURL=ShaderBuilder.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/layer/WebGLPoints\n */\nimport Layer from './Layer.js';\nimport WebGLPointsLayerRenderer from '../renderer/webgl/PointsLayer.js';\nimport { assign } from '../obj.js';\nimport { parseLiteralStyle } from '../webgl/ShaderBuilder.js';\n/**\n * @template {import(\"../source/Vector.js\").default} VectorSourceType\n * @typedef {Object} Options\n * @property {import('../style/literal.js').LiteralStyle} style Literal style to apply to the layer features.\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {VectorSourceType} [source] Source.\n * @property {boolean} [disableHitDetection=false] Setting this to true will provide a slight performance boost, but will\n * prevent all hit detection on the layer.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n/**\n * @classdesc\n * Layer optimized for rendering large point datasets. Takes a `style` property which\n * is a serializable JSON object describing how the layer should be rendered.\n *\n * Here are a few samples of literal style objects:\n * ```js\n * const style = {\n *   symbol: {\n *     symbolType: 'circle',\n *     size: 8,\n *     color: '#33AAFF',\n *     opacity: 0.9\n *   }\n * }\n * ```\n *\n * ```js\n * const style = {\n *   symbol: {\n *     symbolType: 'image',\n *     offset: [0, 12],\n *     size: [4, 8],\n *     src: '../static/exclamation-mark.png'\n *   }\n * }\n * ```\n *\n * **Important: a `WebGLPoints` layer must be manually disposed when removed, otherwise the underlying WebGL context\n * will not be garbage collected.**\n *\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Vector.js\").default} VectorSourceType\n * @extends {Layer<VectorSourceType>}\n * @fires import(\"../render/Event.js\").RenderEvent\n */\nvar WebGLPointsLayer = /** @class */ (function (_super) {\n    __extends(WebGLPointsLayer, _super);\n    /**\n     * @param {Options<VectorSourceType>} options Options.\n     */\n    function WebGLPointsLayer(options) {\n        var _this = this;\n        var baseOptions = assign({}, options);\n        _this = _super.call(this, baseOptions) || this;\n        /**\n         * @private\n         * @type {import('../webgl/ShaderBuilder.js').StyleParseResult}\n         */\n        _this.parseResult_ = parseLiteralStyle(options.style);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hitDetectionDisabled_ = !!options.disableHitDetection;\n        return _this;\n    }\n    /**\n     * Create a renderer for this layer.\n     * @return {WebGLPointsLayerRenderer} A layer renderer.\n     */\n    WebGLPointsLayer.prototype.createRenderer = function () {\n        return new WebGLPointsLayerRenderer(this, {\n            className: this.getClassName(),\n            vertexShader: this.parseResult_.builder.getSymbolVertexShader(),\n            fragmentShader: this.parseResult_.builder.getSymbolFragmentShader(),\n            hitVertexShader: !this.hitDetectionDisabled_ &&\n                this.parseResult_.builder.getSymbolVertexShader(true),\n            hitFragmentShader: !this.hitDetectionDisabled_ &&\n                this.parseResult_.builder.getSymbolFragmentShader(true),\n            uniforms: this.parseResult_.uniforms,\n            attributes: this.parseResult_.attributes,\n        });\n    };\n    /**\n     * Clean up.\n     */\n    WebGLPointsLayer.prototype.disposeInternal = function () {\n        this.getRenderer().disposeInternal();\n        _super.prototype.disposeInternal.call(this);\n    };\n    return WebGLPointsLayer;\n}(Layer));\nexport default WebGLPointsLayer;\n//# sourceMappingURL=WebGLPoints.js.map","/**\n * @module ol/source/BingMaps\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport SourceState from './State.js';\nimport TileImage from './TileImage.js';\nimport { applyTransform, intersects } from '../extent.js';\nimport { createFromTileUrlFunctions } from '../tileurlfunction.js';\nimport { createOrUpdate } from '../tilecoord.js';\nimport { createXYZ, extentFromProjection } from '../tilegrid.js';\nimport { get as getProjection, getTransformFromProjections } from '../proj.js';\nimport { jsonp as requestJSONP } from '../net.js';\n/**\n * @param {import('../tilecoord.js').TileCoord} tileCoord Tile coord.\n * @return {string} Quad key.\n */\nexport function quadKey(tileCoord) {\n    var z = tileCoord[0];\n    var digits = new Array(z);\n    var mask = 1 << (z - 1);\n    var i, charCode;\n    for (i = 0; i < z; ++i) {\n        // 48 is charCode for 0 - '0'.charCodeAt(0)\n        charCode = 48;\n        if (tileCoord[1] & mask) {\n            charCode += 1;\n        }\n        if (tileCoord[2] & mask) {\n            charCode += 2;\n        }\n        digits[i] = String.fromCharCode(charCode);\n        mask >>= 1;\n    }\n    return digits.join('');\n}\n/**\n * The attribution containing a link to the Microsoft® Bing™ Maps Platform APIs’\n * Terms Of Use.\n * @const\n * @type {string}\n */\nvar TOS_ATTRIBUTION = '<a class=\"ol-attribution-bing-tos\" ' +\n    'href=\"https://www.microsoft.com/maps/product/terms.html\" target=\"_blank\">' +\n    'Terms of Use</a>';\n/**\n * @typedef {Object} Options\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {boolean} [hidpi=false] If `true` hidpi tiles will be requested.\n * @property {string} [culture='en-us'] Culture code.\n * @property {string} key Bing Maps API key. Get yours at https://www.bingmapsportal.com/.\n * @property {string} imagerySet Type of imagery.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {number} [maxZoom=21] Max zoom. Default is what's advertized by the BingMaps service.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n/**\n * @typedef {Object} BingMapsImageryMetadataResponse\n * @property {number} statusCode The response status code\n * @property {string} statusDescription The response status description\n * @property {string} authenticationResultCode The authentication result code\n * @property {Array<ResourceSet>} resourceSets The array of resource sets\n */\n/**\n * @typedef {Object} ResourceSet\n * @property {Array<Resource>} resources Resources.\n */\n/**\n * @typedef {Object} Resource\n * @property {number} imageHeight The image height\n * @property {number} imageWidth The image width\n * @property {number} zoomMin The minimum zoom level\n * @property {number} zoomMax The maximum zoom level\n * @property {string} imageUrl The image URL\n * @property {Array<string>} imageUrlSubdomains The image URL subdomains for rotation\n * @property {Array<ImageryProvider>} [imageryProviders] The array of ImageryProviders\n */\n/**\n * @typedef {Object} ImageryProvider\n * @property {Array<CoverageArea>} coverageAreas The coverage areas\n * @property {string} [attribution] The attribution\n */\n/**\n * @typedef {Object} CoverageArea\n * @property {number} zoomMin The minimum zoom\n * @property {number} zoomMax The maximum zoom\n * @property {Array<number>} bbox The coverage bounding box\n */\n/**\n * @classdesc\n * Layer source for Bing Maps tile data.\n * @api\n */\nvar BingMaps = /** @class */ (function (_super) {\n    __extends(BingMaps, _super);\n    /**\n     * @param {Options} options Bing Maps options.\n     */\n    function BingMaps(options) {\n        var _this = this;\n        var hidpi = options.hidpi !== undefined ? options.hidpi : false;\n        _this = _super.call(this, {\n            cacheSize: options.cacheSize,\n            crossOrigin: 'anonymous',\n            imageSmoothing: options.imageSmoothing,\n            opaque: true,\n            projection: getProjection('EPSG:3857'),\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            state: SourceState.LOADING,\n            tileLoadFunction: options.tileLoadFunction,\n            tilePixelRatio: hidpi ? 2 : 1,\n            wrapX: options.wrapX !== undefined ? options.wrapX : true,\n            transition: options.transition,\n            zDirection: options.zDirection,\n        }) || this;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hidpi_ = hidpi;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.culture_ = options.culture !== undefined ? options.culture : 'en-us';\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.maxZoom_ = options.maxZoom !== undefined ? options.maxZoom : -1;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.apiKey_ = options.key;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.imagerySet_ = options.imagerySet;\n        var url = 'https://dev.virtualearth.net/REST/v1/Imagery/Metadata/' +\n            _this.imagerySet_ +\n            '?uriScheme=https&include=ImageryProviders&key=' +\n            _this.apiKey_ +\n            '&c=' +\n            _this.culture_;\n        requestJSONP(url, _this.handleImageryMetadataResponse.bind(_this), undefined, 'jsonp');\n        return _this;\n    }\n    /**\n     * Get the api key used for this source.\n     *\n     * @return {string} The api key.\n     * @api\n     */\n    BingMaps.prototype.getApiKey = function () {\n        return this.apiKey_;\n    };\n    /**\n     * Get the imagery set associated with this source.\n     *\n     * @return {string} The imagery set.\n     * @api\n     */\n    BingMaps.prototype.getImagerySet = function () {\n        return this.imagerySet_;\n    };\n    /**\n     * @param {BingMapsImageryMetadataResponse} response Response.\n     */\n    BingMaps.prototype.handleImageryMetadataResponse = function (response) {\n        if (response.statusCode != 200 ||\n            response.statusDescription != 'OK' ||\n            response.authenticationResultCode != 'ValidCredentials' ||\n            response.resourceSets.length != 1 ||\n            response.resourceSets[0].resources.length != 1) {\n            this.setState(SourceState.ERROR);\n            return;\n        }\n        var resource = response.resourceSets[0].resources[0];\n        var maxZoom = this.maxZoom_ == -1 ? resource.zoomMax : this.maxZoom_;\n        var sourceProjection = this.getProjection();\n        var extent = extentFromProjection(sourceProjection);\n        var scale = this.hidpi_ ? 2 : 1;\n        var tileSize = resource.imageWidth == resource.imageHeight\n            ? resource.imageWidth / scale\n            : [resource.imageWidth / scale, resource.imageHeight / scale];\n        var tileGrid = createXYZ({\n            extent: extent,\n            minZoom: resource.zoomMin,\n            maxZoom: maxZoom,\n            tileSize: tileSize,\n        });\n        this.tileGrid = tileGrid;\n        var culture = this.culture_;\n        var hidpi = this.hidpi_;\n        this.tileUrlFunction = createFromTileUrlFunctions(resource.imageUrlSubdomains.map(function (subdomain) {\n            /** @type {import('../tilecoord.js').TileCoord} */\n            var quadKeyTileCoord = [0, 0, 0];\n            var imageUrl = resource.imageUrl\n                .replace('{subdomain}', subdomain)\n                .replace('{culture}', culture);\n            return (\n            /**\n             * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n             * @param {number} pixelRatio Pixel ratio.\n             * @param {import(\"../proj/Projection.js\").default} projection Projection.\n             * @return {string|undefined} Tile URL.\n             */\n            function (tileCoord, pixelRatio, projection) {\n                if (!tileCoord) {\n                    return undefined;\n                }\n                else {\n                    createOrUpdate(tileCoord[0], tileCoord[1], tileCoord[2], quadKeyTileCoord);\n                    var url = imageUrl;\n                    if (hidpi) {\n                        url += '&dpi=d1&device=mobile';\n                    }\n                    return url.replace('{quadkey}', quadKey(quadKeyTileCoord));\n                }\n            });\n        }));\n        if (resource.imageryProviders) {\n            var transform_1 = getTransformFromProjections(getProjection('EPSG:4326'), this.getProjection());\n            this.setAttributions(function (frameState) {\n                var attributions = [];\n                var viewState = frameState.viewState;\n                var tileGrid = this.getTileGrid();\n                var z = tileGrid.getZForResolution(viewState.resolution, this.zDirection);\n                var tileCoord = tileGrid.getTileCoordForCoordAndZ(viewState.center, z);\n                var zoom = tileCoord[0];\n                resource.imageryProviders.map(function (imageryProvider) {\n                    var intersecting = false;\n                    var coverageAreas = imageryProvider.coverageAreas;\n                    for (var i = 0, ii = coverageAreas.length; i < ii; ++i) {\n                        var coverageArea = coverageAreas[i];\n                        if (zoom >= coverageArea.zoomMin &&\n                            zoom <= coverageArea.zoomMax) {\n                            var bbox = coverageArea.bbox;\n                            var epsg4326Extent = [bbox[1], bbox[0], bbox[3], bbox[2]];\n                            var extent_1 = applyTransform(epsg4326Extent, transform_1);\n                            if (intersects(extent_1, frameState.extent)) {\n                                intersecting = true;\n                                break;\n                            }\n                        }\n                    }\n                    if (intersecting) {\n                        attributions.push(imageryProvider.attribution);\n                    }\n                });\n                attributions.push(TOS_ATTRIBUTION);\n                return attributions;\n            }.bind(this));\n        }\n        this.setState(SourceState.READY);\n    };\n    return BingMaps;\n}(TileImage));\nexport default BingMaps;\n//# sourceMappingURL=BingMaps.js.map","/**\n * @module ol/source/XYZ\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport TileImage from './TileImage.js';\nimport { createXYZ, extentFromProjection } from '../tilegrid.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {boolean} [opaque=false] Whether the layer is opaque.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {number} [maxZoom=42] Optional max zoom level. Not used if `tileGrid` is provided.\n * @property {number} [minZoom=0] Optional min zoom level. Not used if `tileGrid` is provided.\n * @property {number} [maxResolution] Optional tile grid resolution at level zero. Not used if `tileGrid` is provided.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service.\n * For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {number|import(\"../size.js\").Size} [tileSize=[256, 256]] The tile size used by the tile service.\n * Not used if `tileGrid` is provided.\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Optional function to get\n * tile URL given a tile coordinate and the projection.\n * Required if `url` or `urls` are not provided.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`,\n * and `{z}` placeholders. A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`,\n * may be used instead of defining each one separately in the `urls` option.\n * @property {Array<string>} [urls] An array of URL templates.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n/**\n * @classdesc\n * Layer source for tile data with URLs in a set XYZ format that are\n * defined in a URL template. By default, this follows the widely-used\n * Google grid where `x` 0 and `y` 0 are in the top left. Grids like\n * TMS where `x` 0 and `y` 0 are in the bottom left can be used by\n * using the `{-y}` placeholder in the URL template, so long as the\n * source does not have a custom tile grid. In this case\n * a `tileUrlFunction` can be used, such as:\n * ```js\n *  tileUrlFunction: function(coordinate) {\n *    return 'http://mapserver.com/' + coordinate[0] + '/' +\n *      coordinate[1] + '/' + (-coordinate[2] - 1) + '.png';\n *  }\n * ```\n * @api\n */\nvar XYZ = /** @class */ (function (_super) {\n    __extends(XYZ, _super);\n    /**\n     * @param {Options} [opt_options] XYZ options.\n     */\n    function XYZ(opt_options) {\n        var _this = this;\n        var options = opt_options || {};\n        var projection = options.projection !== undefined ? options.projection : 'EPSG:3857';\n        var tileGrid = options.tileGrid !== undefined\n            ? options.tileGrid\n            : createXYZ({\n                extent: extentFromProjection(projection),\n                maxResolution: options.maxResolution,\n                maxZoom: options.maxZoom,\n                minZoom: options.minZoom,\n                tileSize: options.tileSize,\n            });\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            opaque: options.opaque,\n            projection: projection,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileGrid: tileGrid,\n            tileLoadFunction: options.tileLoadFunction,\n            tilePixelRatio: options.tilePixelRatio,\n            tileUrlFunction: options.tileUrlFunction,\n            url: options.url,\n            urls: options.urls,\n            wrapX: options.wrapX !== undefined ? options.wrapX : true,\n            transition: options.transition,\n            attributionsCollapsible: options.attributionsCollapsible,\n            zDirection: options.zDirection,\n        }) || this;\n        return _this;\n    }\n    return XYZ;\n}(TileImage));\nexport default XYZ;\n//# sourceMappingURL=XYZ.js.map","/**\n * @module ol/source/CartoDB\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport SourceState from './State.js';\nimport XYZ from './XYZ.js';\nimport { assign } from '../obj.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Projection.\n * @property {number} [maxZoom=18] Max zoom.\n * @property {number} [minZoom] Minimum zoom.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {Object} [config] If using anonymous maps, the CartoDB config to use. See\n * https://carto.com/developers/maps-api/guides/anonymous-maps/\n * for more detail.\n * If using named maps, a key-value lookup with the template parameters.\n * See https://carto.com/developers/maps-api/guides/named-maps/\n * for more detail.\n * @property {string} [map] If using named maps, this will be the name of the template to load.\n * See https://carto.com/developers/maps-api/guides/named-maps/\n * for more detail.\n * @property {string} [account] Username as used to access public Carto dashboard at https://{username}.carto.com/.\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n/**\n * @typedef {Object} CartoDBLayerInfo\n * @property {string} layergroupid The layer group ID\n * @property {{https: string}} cdn_url The CDN URL\n */\n/**\n * @classdesc\n * Layer source for the CartoDB Maps API.\n * @api\n */\nvar CartoDB = /** @class */ (function (_super) {\n    __extends(CartoDB, _super);\n    /**\n     * @param {Options} options CartoDB options.\n     */\n    function CartoDB(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            maxZoom: options.maxZoom !== undefined ? options.maxZoom : 18,\n            minZoom: options.minZoom,\n            projection: options.projection,\n            transition: options.transition,\n            wrapX: options.wrapX,\n            zDirection: options.zDirection,\n        }) || this;\n        /**\n         * @type {string}\n         * @private\n         */\n        _this.account_ = options.account;\n        /**\n         * @type {string}\n         * @private\n         */\n        _this.mapId_ = options.map || '';\n        /**\n         * @type {!Object}\n         * @private\n         */\n        _this.config_ = options.config || {};\n        /**\n         * @type {!Object<string, CartoDBLayerInfo>}\n         * @private\n         */\n        _this.templateCache_ = {};\n        _this.initializeMap_();\n        return _this;\n    }\n    /**\n     * Returns the current config.\n     * @return {!Object} The current configuration.\n     * @api\n     */\n    CartoDB.prototype.getConfig = function () {\n        return this.config_;\n    };\n    /**\n     * Updates the carto db config.\n     * @param {Object} config a key-value lookup. Values will replace current values\n     *     in the config.\n     * @api\n     */\n    CartoDB.prototype.updateConfig = function (config) {\n        assign(this.config_, config);\n        this.initializeMap_();\n    };\n    /**\n     * Sets the CartoDB config\n     * @param {Object} config In the case of anonymous maps, a CartoDB configuration\n     *     object.\n     * If using named maps, a key-value lookup with the template parameters.\n     * @api\n     */\n    CartoDB.prototype.setConfig = function (config) {\n        this.config_ = config || {};\n        this.initializeMap_();\n    };\n    /**\n     * Issue a request to initialize the CartoDB map.\n     * @private\n     */\n    CartoDB.prototype.initializeMap_ = function () {\n        var paramHash = JSON.stringify(this.config_);\n        if (this.templateCache_[paramHash]) {\n            this.applyTemplate_(this.templateCache_[paramHash]);\n            return;\n        }\n        var mapUrl = 'https://' + this.account_ + '.carto.com/api/v1/map';\n        if (this.mapId_) {\n            mapUrl += '/named/' + this.mapId_;\n        }\n        var client = new XMLHttpRequest();\n        client.addEventListener('load', this.handleInitResponse_.bind(this, paramHash));\n        client.addEventListener('error', this.handleInitError_.bind(this));\n        client.open('POST', mapUrl);\n        client.setRequestHeader('Content-type', 'application/json');\n        client.send(JSON.stringify(this.config_));\n    };\n    /**\n     * Handle map initialization response.\n     * @param {string} paramHash a hash representing the parameter set that was used\n     *     for the request\n     * @param {Event} event Event.\n     * @private\n     */\n    CartoDB.prototype.handleInitResponse_ = function (paramHash, event) {\n        var client = /** @type {XMLHttpRequest} */ (event.target);\n        // status will be 0 for file:// urls\n        if (!client.status || (client.status >= 200 && client.status < 300)) {\n            var response = void 0;\n            try {\n                response = /** @type {CartoDBLayerInfo} */ (JSON.parse(client.responseText));\n            }\n            catch (err) {\n                this.setState(SourceState.ERROR);\n                return;\n            }\n            this.applyTemplate_(response);\n            this.templateCache_[paramHash] = response;\n            this.setState(SourceState.READY);\n        }\n        else {\n            this.setState(SourceState.ERROR);\n        }\n    };\n    /**\n     * @private\n     * @param {Event} event Event.\n     */\n    CartoDB.prototype.handleInitError_ = function (event) {\n        this.setState(SourceState.ERROR);\n    };\n    /**\n     * Apply the new tile urls returned by carto db\n     * @param {CartoDBLayerInfo} data Result of carto db call.\n     * @private\n     */\n    CartoDB.prototype.applyTemplate_ = function (data) {\n        var tilesUrl = 'https://' +\n            data.cdn_url.https +\n            '/' +\n            this.account_ +\n            '/api/v1/map/' +\n            data.layergroupid +\n            '/{z}/{x}/{y}.png';\n        this.setUrl(tilesUrl);\n    };\n    return CartoDB;\n}(XYZ));\nexport default CartoDB;\n//# sourceMappingURL=CartoDB.js.map","/**\n * @module ol/source/Cluster\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventType from '../events/EventType.js';\nimport Feature from '../Feature.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport Point from '../geom/Point.js';\nimport VectorSource from './Vector.js';\nimport { add as addCoordinate, scale as scaleCoordinate } from '../coordinate.js';\nimport { assert } from '../asserts.js';\nimport { buffer, createEmpty, createOrUpdateFromCoordinate, getCenter, } from '../extent.js';\nimport { getUid } from '../util.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [distance=20] Distance in pixels within which features will\n * be clustered together.\n * @property {number} [minDistance=0] Minimum distance in pixels between clusters.\n * Will be capped at the configured distance.\n * By default no minimum distance is guaranteed. This config can be used to avoid\n * overlapping icons. As a tradoff, the cluster feature's position will no longer be\n * the center of all its features.\n * @property {function(Feature):Point} [geometryFunction]\n * Function that takes an {@link module:ol/Feature} as argument and returns an\n * {@link module:ol/geom/Point} as cluster calculation point for the feature. When a\n * feature should not be considered for clustering, the function should return\n * `null`. The default, which works when the underlying source contains point\n * features only, is\n * ```js\n * function(feature) {\n *   return feature.getGeometry();\n * }\n * ```\n * See {@link module:ol/geom/Polygon~Polygon#getInteriorPoint} for a way to get a cluster\n * calculation point for polygons.\n * @property {VectorSource} [source] Source.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n */\n/**\n * @classdesc\n * Layer source to cluster vector data. Works out of the box with point\n * geometries. For other geometry types, or if not all geometries should be\n * considered for clustering, a custom `geometryFunction` can be defined.\n *\n * If the instance is disposed without also disposing the underlying\n * source `setSource(null)` has to be called to remove the listener reference\n * from the wrapped source.\n * @api\n */\nvar Cluster = /** @class */ (function (_super) {\n    __extends(Cluster, _super);\n    /**\n     * @param {Options} options Cluster options.\n     */\n    function Cluster(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            wrapX: options.wrapX,\n        }) || this;\n        /**\n         * @type {number|undefined}\n         * @protected\n         */\n        _this.resolution = undefined;\n        /**\n         * @type {number}\n         * @protected\n         */\n        _this.distance = options.distance !== undefined ? options.distance : 20;\n        /**\n         * @type {number}\n         * @protected\n         */\n        _this.minDistance = options.minDistance || 0;\n        /**\n         * @type {number}\n         * @protected\n         */\n        _this.interpolationRatio = 0;\n        /**\n         * @type {Array<Feature>}\n         * @protected\n         */\n        _this.features = [];\n        /**\n         * @param {Feature} feature Feature.\n         * @return {Point} Cluster calculation point.\n         * @protected\n         */\n        _this.geometryFunction =\n            options.geometryFunction ||\n                function (feature) {\n                    var geometry = feature.getGeometry();\n                    assert(geometry.getType() == GeometryType.POINT, 10); // The default `geometryFunction` can only handle `Point` geometries\n                    return geometry;\n                };\n        /**\n         * @type {VectorSource}\n         * @protected\n         */\n        _this.source = null;\n        _this.boundRefresh_ = _this.refresh.bind(_this);\n        _this.updateDistance(_this.distance, _this.minDistance);\n        _this.setSource(options.source || null);\n        return _this;\n    }\n    /**\n     * Remove all features from the source.\n     * @param {boolean} [opt_fast] Skip dispatching of {@link module:ol/source/Vector.VectorSourceEvent#removefeature} events.\n     * @api\n     */\n    Cluster.prototype.clear = function (opt_fast) {\n        this.features.length = 0;\n        _super.prototype.clear.call(this, opt_fast);\n    };\n    /**\n     * Get the distance in pixels between clusters.\n     * @return {number} Distance.\n     * @api\n     */\n    Cluster.prototype.getDistance = function () {\n        return this.distance;\n    };\n    /**\n     * Get a reference to the wrapped source.\n     * @return {VectorSource} Source.\n     * @api\n     */\n    Cluster.prototype.getSource = function () {\n        return this.source;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     */\n    Cluster.prototype.loadFeatures = function (extent, resolution, projection) {\n        this.source.loadFeatures(extent, resolution, projection);\n        if (resolution !== this.resolution) {\n            this.resolution = resolution;\n            this.refresh();\n        }\n    };\n    /**\n     * Set the distance within which features will be clusterd together.\n     * @param {number} distance The distance in pixels.\n     * @api\n     */\n    Cluster.prototype.setDistance = function (distance) {\n        this.updateDistance(distance, this.minDistance);\n    };\n    /**\n     * Set the minimum distance between clusters. Will be capped at the\n     * configured distance.\n     * @param {number} minDistance The minimum distance in pixels.\n     * @api\n     */\n    Cluster.prototype.setMinDistance = function (minDistance) {\n        this.updateDistance(this.distance, minDistance);\n    };\n    /**\n     * The configured minimum distance between clusters.\n     * @return {number} The minimum distance in pixels.\n     * @api\n     */\n    Cluster.prototype.getMinDistance = function () {\n        return this.minDistance;\n    };\n    /**\n     * Replace the wrapped source.\n     * @param {VectorSource} source The new source for this instance.\n     * @api\n     */\n    Cluster.prototype.setSource = function (source) {\n        if (this.source) {\n            this.source.removeEventListener(EventType.CHANGE, this.boundRefresh_);\n        }\n        this.source = source;\n        if (source) {\n            source.addEventListener(EventType.CHANGE, this.boundRefresh_);\n        }\n        this.refresh();\n    };\n    /**\n     * Handle the source changing.\n     */\n    Cluster.prototype.refresh = function () {\n        this.clear();\n        this.cluster();\n        this.addFeatures(this.features);\n    };\n    /**\n     * Update the distances and refresh the source if necessary.\n     * @param {number} distance The new distance.\n     * @param {number} minDistance The new minimum distance.\n     */\n    Cluster.prototype.updateDistance = function (distance, minDistance) {\n        var ratio = distance === 0 ? 0 : Math.min(minDistance, distance) / distance;\n        var changed = distance !== this.distance || this.interpolationRatio !== ratio;\n        this.distance = distance;\n        this.minDistance = minDistance;\n        this.interpolationRatio = ratio;\n        if (changed) {\n            this.refresh();\n        }\n    };\n    /**\n     * @protected\n     */\n    Cluster.prototype.cluster = function () {\n        if (this.resolution === undefined || !this.source) {\n            return;\n        }\n        var extent = createEmpty();\n        var mapDistance = this.distance * this.resolution;\n        var features = this.source.getFeatures();\n        /** @type {Object<string, true>} */\n        var clustered = {};\n        for (var i = 0, ii = features.length; i < ii; i++) {\n            var feature = features[i];\n            if (!(getUid(feature) in clustered)) {\n                var geometry = this.geometryFunction(feature);\n                if (geometry) {\n                    var coordinates = geometry.getCoordinates();\n                    createOrUpdateFromCoordinate(coordinates, extent);\n                    buffer(extent, mapDistance, extent);\n                    var neighbors = this.source\n                        .getFeaturesInExtent(extent)\n                        .filter(function (neighbor) {\n                        var uid = getUid(neighbor);\n                        if (uid in clustered) {\n                            return false;\n                        }\n                        clustered[uid] = true;\n                        return true;\n                    });\n                    this.features.push(this.createCluster(neighbors, extent));\n                }\n            }\n        }\n    };\n    /**\n     * @param {Array<Feature>} features Features\n     * @param {import(\"../extent.js\").Extent} extent The searched extent for these features.\n     * @return {Feature} The cluster feature.\n     * @protected\n     */\n    Cluster.prototype.createCluster = function (features, extent) {\n        var centroid = [0, 0];\n        for (var i = features.length - 1; i >= 0; --i) {\n            var geometry_1 = this.geometryFunction(features[i]);\n            if (geometry_1) {\n                addCoordinate(centroid, geometry_1.getCoordinates());\n            }\n            else {\n                features.splice(i, 1);\n            }\n        }\n        scaleCoordinate(centroid, 1 / features.length);\n        var searchCenter = getCenter(extent);\n        var ratio = this.interpolationRatio;\n        var geometry = new Point([\n            centroid[0] * (1 - ratio) + searchCenter[0] * ratio,\n            centroid[1] * (1 - ratio) + searchCenter[1] * ratio,\n        ]);\n        var cluster = new Feature(geometry);\n        cluster.set('features', features, true);\n        return cluster;\n    };\n    return Cluster;\n}(VectorSource));\nexport default Cluster;\n//# sourceMappingURL=Cluster.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/source/Zoomify\n */\nimport { DEFAULT_TILE_SIZE } from '../tilegrid/common.js';\nimport ImageTile from '../ImageTile.js';\nimport TileGrid from '../tilegrid/TileGrid.js';\nimport TileImage from './TileImage.js';\nimport TileState from '../TileState.js';\nimport { assert } from '../asserts.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { createFromTileUrlFunctions, expandUrl } from '../tileurlfunction.js';\nimport { getCenter } from '../extent.js';\nimport { toSize } from '../size.js';\n/**\n * @enum {string}\n */\nvar TierSizeCalculation = {\n    DEFAULT: 'default',\n    TRUNCATED: 'truncated',\n};\nvar CustomTile = /** @class */ (function (_super) {\n    __extends(CustomTile, _super);\n    /**\n     * @param {import(\"../size.js\").Size} tileSize Full tile size.\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../TileState.js\").default} state State.\n     * @param {string} src Image source URI.\n     * @param {?string} crossOrigin Cross origin.\n     * @param {import(\"../Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n     * @param {import(\"../Tile.js\").Options} [opt_options] Tile options.\n     */\n    function CustomTile(tileSize, tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) {\n        var _this = _super.call(this, tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) || this;\n        /**\n         * @private\n         * @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement}\n         */\n        _this.zoomifyImage_ = null;\n        /**\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.tileSize_ = tileSize;\n        return _this;\n    }\n    /**\n     * Get the image element for this tile.\n     * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n     */\n    CustomTile.prototype.getImage = function () {\n        if (this.zoomifyImage_) {\n            return this.zoomifyImage_;\n        }\n        var image = _super.prototype.getImage.call(this);\n        if (this.state == TileState.LOADED) {\n            var tileSize = this.tileSize_;\n            if (image.width == tileSize[0] && image.height == tileSize[1]) {\n                this.zoomifyImage_ = image;\n                return image;\n            }\n            else {\n                var context = createCanvasContext2D(tileSize[0], tileSize[1]);\n                context.drawImage(image, 0, 0);\n                this.zoomifyImage_ = context.canvas;\n                return context.canvas;\n            }\n        }\n        else {\n            return image;\n        }\n    };\n    return CustomTile;\n}(ImageTile));\nexport { CustomTile };\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value  you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {number} [tilePixelRatio] The pixel ratio used by the tile service. For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px by 512px images (for retina/hidpi devices) then `tilePixelRatio` should be set to `2`\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {string} url URL template or base URL of the Zoomify service.\n * A base URL is the fixed part\n * of the URL, excluding the tile group, z, x, and y folder structure, e.g.\n * `http://my.zoomify.info/IMAGE.TIF/`. A URL template must include\n * `{TileGroup}`, `{x}`, `{y}`, and `{z}` placeholders, e.g.\n * `http://my.zoomify.info/IMAGE.TIF/{TileGroup}/{z}-{x}-{y}.jpg`.\n * Internet Imaging Protocol (IIP) with JTL extension can be also used with\n * `{tileIndex}` and `{z}` placeholders, e.g.\n * `http://my.zoomify.info?FIF=IMAGE.TIF&JTL={z},{tileIndex}`.\n * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be\n * used instead of defining each one separately in the `urls` option.\n * @property {string} [tierSizeCalculation] Tier size calculation method: `default` or `truncated`.\n * @property {import(\"../size.js\").Size} size Size.\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the TileGrid that is created.\n * Default sets the TileGrid in the\n * fourth quadrant, meaning extent is `[0, -height, width, 0]`. To change the\n * extent to the first quadrant (the default for OpenLayers 2) set the extent\n * as `[0, 0, width, height]`.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number} [tileSize=256] Tile size. Same tile size is used for all zoom levels.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n/**\n * @classdesc\n * Layer source for tile data in Zoomify format (both Zoomify and Internet\n * Imaging Protocol are supported).\n * @api\n */\nvar Zoomify = /** @class */ (function (_super) {\n    __extends(Zoomify, _super);\n    /**\n     * @param {Options} opt_options Options.\n     */\n    function Zoomify(opt_options) {\n        var _this = this;\n        var options = opt_options;\n        var size = options.size;\n        var tierSizeCalculation = options.tierSizeCalculation !== undefined\n            ? options.tierSizeCalculation\n            : TierSizeCalculation.DEFAULT;\n        var tilePixelRatio = options.tilePixelRatio || 1;\n        var imageWidth = size[0];\n        var imageHeight = size[1];\n        var tierSizeInTiles = [];\n        var tileSize = options.tileSize || DEFAULT_TILE_SIZE;\n        var tileSizeForTierSizeCalculation = tileSize * tilePixelRatio;\n        switch (tierSizeCalculation) {\n            case TierSizeCalculation.DEFAULT:\n                while (imageWidth > tileSizeForTierSizeCalculation ||\n                    imageHeight > tileSizeForTierSizeCalculation) {\n                    tierSizeInTiles.push([\n                        Math.ceil(imageWidth / tileSizeForTierSizeCalculation),\n                        Math.ceil(imageHeight / tileSizeForTierSizeCalculation),\n                    ]);\n                    tileSizeForTierSizeCalculation += tileSizeForTierSizeCalculation;\n                }\n                break;\n            case TierSizeCalculation.TRUNCATED:\n                var width = imageWidth;\n                var height = imageHeight;\n                while (width > tileSizeForTierSizeCalculation ||\n                    height > tileSizeForTierSizeCalculation) {\n                    tierSizeInTiles.push([\n                        Math.ceil(width / tileSizeForTierSizeCalculation),\n                        Math.ceil(height / tileSizeForTierSizeCalculation),\n                    ]);\n                    width >>= 1;\n                    height >>= 1;\n                }\n                break;\n            default:\n                assert(false, 53); // Unknown `tierSizeCalculation` configured\n                break;\n        }\n        tierSizeInTiles.push([1, 1]);\n        tierSizeInTiles.reverse();\n        var resolutions = [tilePixelRatio];\n        var tileCountUpToTier = [0];\n        for (var i = 1, ii = tierSizeInTiles.length; i < ii; i++) {\n            resolutions.push(tilePixelRatio << i);\n            tileCountUpToTier.push(tierSizeInTiles[i - 1][0] * tierSizeInTiles[i - 1][1] +\n                tileCountUpToTier[i - 1]);\n        }\n        resolutions.reverse();\n        var tileGrid = new TileGrid({\n            tileSize: tileSize,\n            extent: options.extent || [0, -imageHeight, imageWidth, 0],\n            resolutions: resolutions,\n        });\n        var url = options.url;\n        if (url &&\n            url.indexOf('{TileGroup}') == -1 &&\n            url.indexOf('{tileIndex}') == -1) {\n            url += '{TileGroup}/{z}-{x}-{y}.jpg';\n        }\n        var urls = expandUrl(url);\n        var tileWidth = tileSize * tilePixelRatio;\n        /**\n         * @param {string} template Template.\n         * @return {import(\"../Tile.js\").UrlFunction} Tile URL function.\n         */\n        function createFromTemplate(template) {\n            return (\n            /**\n             * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n             * @param {number} pixelRatio Pixel ratio.\n             * @param {import(\"../proj/Projection.js\").default} projection Projection.\n             * @return {string|undefined} Tile URL.\n             */\n            function (tileCoord, pixelRatio, projection) {\n                if (!tileCoord) {\n                    return undefined;\n                }\n                else {\n                    var tileCoordZ = tileCoord[0];\n                    var tileCoordX = tileCoord[1];\n                    var tileCoordY = tileCoord[2];\n                    var tileIndex = tileCoordX + tileCoordY * tierSizeInTiles[tileCoordZ][0];\n                    var tileGroup = ((tileIndex + tileCountUpToTier[tileCoordZ]) / tileWidth) | 0;\n                    var localContext_1 = {\n                        'z': tileCoordZ,\n                        'x': tileCoordX,\n                        'y': tileCoordY,\n                        'tileIndex': tileIndex,\n                        'TileGroup': 'TileGroup' + tileGroup,\n                    };\n                    return template.replace(/\\{(\\w+?)\\}/g, function (m, p) {\n                        return localContext_1[p];\n                    });\n                }\n            });\n        }\n        var tileUrlFunction = createFromTileUrlFunctions(urls.map(createFromTemplate));\n        var ZoomifyTileClass = CustomTile.bind(null, toSize(tileSize * tilePixelRatio));\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            tilePixelRatio: tilePixelRatio,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileClass: ZoomifyTileClass,\n            tileGrid: tileGrid,\n            tileUrlFunction: tileUrlFunction,\n            transition: options.transition,\n        }) || this;\n        /**\n         * @type {number|import(\"../array.js\").NearestDirectionFunction}\n         */\n        _this.zDirection = options.zDirection;\n        // Server retina tile detection (non-standard):\n        // Try loading the center tile for the highest resolution. If it is not\n        // available, we are dealing with retina tiles, and need to adjust the\n        // tile url calculation.\n        var tileUrl = tileGrid.getTileCoordForCoordAndResolution(getCenter(tileGrid.getExtent()), resolutions[resolutions.length - 1]);\n        var testTileUrl = tileUrlFunction(tileUrl, 1, null);\n        var image = new Image();\n        image.addEventListener('error', function () {\n            tileWidth = tileSize;\n            this.changed();\n        }.bind(_this));\n        image.src = testTileUrl;\n        return _this;\n    }\n    return Zoomify;\n}(TileImage));\nexport default Zoomify;\n//# sourceMappingURL=Zoomify.js.map","/**\n * @module ol/source/IIIF\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport TileGrid from '../tilegrid/TileGrid.js';\nimport TileImage from './TileImage.js';\nimport { CustomTile } from './Zoomify.js';\nimport { DEFAULT_TILE_SIZE } from '../tilegrid/common.js';\nimport { Versions } from '../format/IIIFInfo.js';\nimport { assert } from '../asserts.js';\nimport { getTopLeft } from '../extent.js';\nimport { includes } from '../array.js';\nimport { toSize } from '../size.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Size of the cache.\n * @property {null|string} [crossOrigin] The value for the crossOrigin option of the request.\n * @property {import(\"../extent.js\").Extent} [extent=[0, -height, width, 0]] The extent.\n * @property {string} [format='jpg'] Requested image format.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {string} [quality] Requested IIIF image quality. Default is 'native'\n * for version 1, 'default' for versions 2 and 3.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {Array<number>} [resolutions] Supported resolutions as given in IIIF 'scaleFactors'\n * @property {import(\"../size.js\").Size} size Size of the image [width, height].\n * @property {Array<import(\"../size.js\").Size>} [sizes] Supported scaled image sizes.\n * Content of the IIIF info.json 'sizes' property, but as array of Size objects.\n * @property {import(\"./State.js\").default} [state] Source state.\n * @property {Array<string>} [supports=[]] Supported IIIF region and size calculation\n * features.\n * @property {number} [tilePixelRatio] Tile pixel ratio.\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * Same tile size is used for all zoom levels. If tile size is a number,\n * a square tile is assumed. If the IIIF image service supports arbitrary\n * tiling (sizeByH, sizeByW, sizeByWh or sizeByPct as well as regionByPx or regionByPct\n * are supported), the default tilesize is 256.\n * @property {number} [transition] Transition.\n * @property {string} [url] Base URL of the IIIF Image service.\n * This should be the same as the IIIF Image ID.\n * @property {import(\"../format/IIIFInfo.js\").Versions} [version=Versions.VERSION2] Service's IIIF Image API version.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\nfunction formatPercentage(percentage) {\n    return percentage.toLocaleString('en', { maximumFractionDigits: 10 });\n}\n/**\n * @classdesc\n * Layer source for IIIF Image API services.\n * @api\n */\nvar IIIF = /** @class */ (function (_super) {\n    __extends(IIIF, _super);\n    /**\n     * @param {Options} [opt_options] Tile source options. Use {@link import(\"../format/IIIFInfo.js\").IIIFInfo}\n     * to parse Image API service information responses into constructor options.\n     * @api\n     */\n    function IIIF(opt_options) {\n        var _this = this;\n        /**\n         * @type {Partial<Options>}\n         */\n        var options = opt_options || {};\n        var baseUrl = options.url || '';\n        baseUrl =\n            baseUrl +\n                (baseUrl.lastIndexOf('/') === baseUrl.length - 1 || baseUrl === ''\n                    ? ''\n                    : '/');\n        var version = options.version || Versions.VERSION2;\n        var sizes = options.sizes || [];\n        var size = options.size;\n        assert(size != undefined &&\n            Array.isArray(size) &&\n            size.length == 2 &&\n            !isNaN(size[0]) &&\n            size[0] > 0 &&\n            !isNaN(size[1]) &&\n            size[1] > 0, 60);\n        var width = size[0];\n        var height = size[1];\n        var tileSize = options.tileSize;\n        var tilePixelRatio = options.tilePixelRatio || 1;\n        var format = options.format || 'jpg';\n        var quality = options.quality ||\n            (options.version == Versions.VERSION1 ? 'native' : 'default');\n        var resolutions = options.resolutions || [];\n        var supports = options.supports || [];\n        var extent = options.extent || [0, -height, width, 0];\n        var supportsListedSizes = sizes != undefined && Array.isArray(sizes) && sizes.length > 0;\n        var supportsListedTiles = tileSize !== undefined &&\n            ((typeof tileSize === 'number' &&\n                Number.isInteger(tileSize) &&\n                tileSize > 0) ||\n                (Array.isArray(tileSize) && tileSize.length > 0));\n        var supportsArbitraryTiling = supports != undefined &&\n            Array.isArray(supports) &&\n            (includes(supports, 'regionByPx') || includes(supports, 'regionByPct')) &&\n            (includes(supports, 'sizeByWh') ||\n                includes(supports, 'sizeByH') ||\n                includes(supports, 'sizeByW') ||\n                includes(supports, 'sizeByPct'));\n        var tileWidth, tileHeight, maxZoom;\n        resolutions.sort(function (a, b) {\n            return b - a;\n        });\n        if (supportsListedTiles || supportsArbitraryTiling) {\n            if (tileSize != undefined) {\n                if (typeof tileSize === 'number' &&\n                    Number.isInteger(tileSize) &&\n                    tileSize > 0) {\n                    tileWidth = tileSize;\n                    tileHeight = tileSize;\n                }\n                else if (Array.isArray(tileSize) && tileSize.length > 0) {\n                    if (tileSize.length == 1 ||\n                        (tileSize[1] == undefined && Number.isInteger(tileSize[0]))) {\n                        tileWidth = tileSize[0];\n                        tileHeight = tileSize[0];\n                    }\n                    if (tileSize.length == 2) {\n                        if (Number.isInteger(tileSize[0]) &&\n                            Number.isInteger(tileSize[1])) {\n                            tileWidth = tileSize[0];\n                            tileHeight = tileSize[1];\n                        }\n                        else if (tileSize[0] == undefined &&\n                            Number.isInteger(tileSize[1])) {\n                            tileWidth = tileSize[1];\n                            tileHeight = tileSize[1];\n                        }\n                    }\n                }\n            }\n            if (tileWidth === undefined || tileHeight === undefined) {\n                tileWidth = DEFAULT_TILE_SIZE;\n                tileHeight = DEFAULT_TILE_SIZE;\n            }\n            if (resolutions.length == 0) {\n                maxZoom = Math.max(Math.ceil(Math.log(width / tileWidth) / Math.LN2), Math.ceil(Math.log(height / tileHeight) / Math.LN2));\n                for (var i = maxZoom; i >= 0; i--) {\n                    resolutions.push(Math.pow(2, i));\n                }\n            }\n            else {\n                var maxScaleFactor = Math.max.apply(Math, resolutions);\n                // TODO maxScaleFactor might not be a power to 2\n                maxZoom = Math.round(Math.log(maxScaleFactor) / Math.LN2);\n            }\n        }\n        else {\n            // No tile support.\n            tileWidth = width;\n            tileHeight = height;\n            resolutions = [];\n            if (supportsListedSizes) {\n                /*\n                 * 'sizes' provided. Use full region in different resolutions. Every\n                 * resolution has only one tile.\n                 */\n                sizes.sort(function (a, b) {\n                    return a[0] - b[0];\n                });\n                maxZoom = -1;\n                var ignoredSizesIndex = [];\n                for (var i = 0; i < sizes.length; i++) {\n                    var resolution = width / sizes[i][0];\n                    if (resolutions.length > 0 &&\n                        resolutions[resolutions.length - 1] == resolution) {\n                        ignoredSizesIndex.push(i);\n                        continue;\n                    }\n                    resolutions.push(resolution);\n                    maxZoom++;\n                }\n                if (ignoredSizesIndex.length > 0) {\n                    for (var i = 0; i < ignoredSizesIndex.length; i++) {\n                        sizes.splice(ignoredSizesIndex[i] - i, 1);\n                    }\n                }\n            }\n            else {\n                // No useful image information at all. Try pseudo tile with full image.\n                resolutions.push(1);\n                sizes.push([width, height]);\n                maxZoom = 0;\n            }\n        }\n        var tileGrid = new TileGrid({\n            tileSize: [tileWidth, tileHeight],\n            extent: extent,\n            origin: getTopLeft(extent),\n            resolutions: resolutions,\n        });\n        var tileUrlFunction = function (tileCoord, pixelRatio, projection) {\n            var regionParam, sizeParam;\n            var zoom = tileCoord[0];\n            if (zoom > maxZoom) {\n                return;\n            }\n            var tileX = tileCoord[1], tileY = tileCoord[2], scale = resolutions[zoom];\n            if (tileX === undefined ||\n                tileY === undefined ||\n                scale === undefined ||\n                tileX < 0 ||\n                Math.ceil(width / scale / tileWidth) <= tileX ||\n                tileY < 0 ||\n                Math.ceil(height / scale / tileHeight) <= tileY) {\n                return;\n            }\n            if (supportsArbitraryTiling || supportsListedTiles) {\n                var regionX = tileX * tileWidth * scale, regionY = tileY * tileHeight * scale;\n                var regionW = tileWidth * scale, regionH = tileHeight * scale, sizeW = tileWidth, sizeH = tileHeight;\n                if (regionX + regionW > width) {\n                    regionW = width - regionX;\n                }\n                if (regionY + regionH > height) {\n                    regionH = height - regionY;\n                }\n                if (regionX + tileWidth * scale > width) {\n                    sizeW = Math.floor((width - regionX + scale - 1) / scale);\n                }\n                if (regionY + tileHeight * scale > height) {\n                    sizeH = Math.floor((height - regionY + scale - 1) / scale);\n                }\n                if (regionX == 0 &&\n                    regionW == width &&\n                    regionY == 0 &&\n                    regionH == height) {\n                    // canonical full image region parameter is 'full', not 'x,y,w,h'\n                    regionParam = 'full';\n                }\n                else if (!supportsArbitraryTiling ||\n                    includes(supports, 'regionByPx')) {\n                    regionParam = regionX + ',' + regionY + ',' + regionW + ',' + regionH;\n                }\n                else if (includes(supports, 'regionByPct')) {\n                    var pctX = formatPercentage((regionX / width) * 100), pctY = formatPercentage((regionY / height) * 100), pctW = formatPercentage((regionW / width) * 100), pctH = formatPercentage((regionH / height) * 100);\n                    regionParam = 'pct:' + pctX + ',' + pctY + ',' + pctW + ',' + pctH;\n                }\n                if (version == Versions.VERSION3 &&\n                    (!supportsArbitraryTiling || includes(supports, 'sizeByWh'))) {\n                    sizeParam = sizeW + ',' + sizeH;\n                }\n                else if (!supportsArbitraryTiling || includes(supports, 'sizeByW')) {\n                    sizeParam = sizeW + ',';\n                }\n                else if (includes(supports, 'sizeByH')) {\n                    sizeParam = ',' + sizeH;\n                }\n                else if (includes(supports, 'sizeByWh')) {\n                    sizeParam = sizeW + ',' + sizeH;\n                }\n                else if (includes(supports, 'sizeByPct')) {\n                    sizeParam = 'pct:' + formatPercentage(100 / scale);\n                }\n            }\n            else {\n                regionParam = 'full';\n                if (supportsListedSizes) {\n                    var regionWidth = sizes[zoom][0], regionHeight = sizes[zoom][1];\n                    if (version == Versions.VERSION3) {\n                        if (regionWidth == width && regionHeight == height) {\n                            sizeParam = 'max';\n                        }\n                        else {\n                            sizeParam = regionWidth + ',' + regionHeight;\n                        }\n                    }\n                    else {\n                        if (regionWidth == width) {\n                            sizeParam = 'full';\n                        }\n                        else {\n                            sizeParam = regionWidth + ',';\n                        }\n                    }\n                }\n                else {\n                    sizeParam = version == Versions.VERSION3 ? 'max' : 'full';\n                }\n            }\n            return (baseUrl + regionParam + '/' + sizeParam + '/0/' + quality + '.' + format);\n        };\n        var IiifTileClass = CustomTile.bind(null, toSize(tileSize || 256).map(function (size) {\n            return size * tilePixelRatio;\n        }));\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            attributionsCollapsible: options.attributionsCollapsible,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            state: options.state,\n            tileClass: IiifTileClass,\n            tileGrid: tileGrid,\n            tilePixelRatio: options.tilePixelRatio,\n            tileUrlFunction: tileUrlFunction,\n            transition: options.transition,\n        }) || this;\n        /**\n         * @type {number|import(\"../array.js\").NearestDirectionFunction}\n         */\n        _this.zDirection = options.zDirection;\n        return _this;\n    }\n    return IIIF;\n}(TileImage));\nexport default IIIF;\n//# sourceMappingURL=IIIF.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/reproj/Image\n */\nimport { ERROR_THRESHOLD } from './common.js';\nimport EventType from '../events/EventType.js';\nimport ImageBase from '../ImageBase.js';\nimport ImageState from '../ImageState.js';\nimport Triangulation from './Triangulation.js';\nimport { calculateSourceResolution, render as renderReprojected, } from '../reproj.js';\nimport { getCenter, getHeight, getIntersection, getWidth } from '../extent.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @typedef {function(import(\"../extent.js\").Extent, number, number) : import(\"../ImageBase.js\").default} FunctionType\n */\n/**\n * @classdesc\n * Class encapsulating single reprojected image.\n * See {@link module:ol/source/Image~ImageSource}.\n */\nvar ReprojImage = /** @class */ (function (_super) {\n    __extends(ReprojImage, _super);\n    /**\n     * @param {import(\"../proj/Projection.js\").default} sourceProj Source projection (of the data).\n     * @param {import(\"../proj/Projection.js\").default} targetProj Target projection.\n     * @param {import(\"../extent.js\").Extent} targetExtent Target extent.\n     * @param {number} targetResolution Target resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {FunctionType} getImageFunction\n     *     Function returning source images (extent, resolution, pixelRatio).\n     * @param {object} [opt_contextOptions] Properties to set on the canvas context.\n     */\n    function ReprojImage(sourceProj, targetProj, targetExtent, targetResolution, pixelRatio, getImageFunction, opt_contextOptions) {\n        var _this = this;\n        var maxSourceExtent = sourceProj.getExtent();\n        var maxTargetExtent = targetProj.getExtent();\n        var limitedTargetExtent = maxTargetExtent\n            ? getIntersection(targetExtent, maxTargetExtent)\n            : targetExtent;\n        var targetCenter = getCenter(limitedTargetExtent);\n        var sourceResolution = calculateSourceResolution(sourceProj, targetProj, targetCenter, targetResolution);\n        var errorThresholdInPixels = ERROR_THRESHOLD;\n        var triangulation = new Triangulation(sourceProj, targetProj, limitedTargetExtent, maxSourceExtent, sourceResolution * errorThresholdInPixels, targetResolution);\n        var sourceExtent = triangulation.calculateSourceExtent();\n        var sourceImage = getImageFunction(sourceExtent, sourceResolution, pixelRatio);\n        var state = sourceImage ? ImageState.IDLE : ImageState.EMPTY;\n        var sourcePixelRatio = sourceImage ? sourceImage.getPixelRatio() : 1;\n        _this = _super.call(this, targetExtent, targetResolution, sourcePixelRatio, state) || this;\n        /**\n         * @private\n         * @type {import(\"../proj/Projection.js\").default}\n         */\n        _this.targetProj_ = targetProj;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        _this.maxSourceExtent_ = maxSourceExtent;\n        /**\n         * @private\n         * @type {!import(\"./Triangulation.js\").default}\n         */\n        _this.triangulation_ = triangulation;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.targetResolution_ = targetResolution;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        _this.targetExtent_ = targetExtent;\n        /**\n         * @private\n         * @type {import(\"../ImageBase.js\").default}\n         */\n        _this.sourceImage_ = sourceImage;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.sourcePixelRatio_ = sourcePixelRatio;\n        /**\n         * @private\n         * @type {object}\n         */\n        _this.contextOptions_ = opt_contextOptions;\n        /**\n         * @private\n         * @type {HTMLCanvasElement}\n         */\n        _this.canvas_ = null;\n        /**\n         * @private\n         * @type {?import(\"../events.js\").EventsKey}\n         */\n        _this.sourceListenerKey_ = null;\n        return _this;\n    }\n    /**\n     * Clean up.\n     */\n    ReprojImage.prototype.disposeInternal = function () {\n        if (this.state == ImageState.LOADING) {\n            this.unlistenSource_();\n        }\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * @return {HTMLCanvasElement} Image.\n     */\n    ReprojImage.prototype.getImage = function () {\n        return this.canvas_;\n    };\n    /**\n     * @return {import(\"../proj/Projection.js\").default} Projection.\n     */\n    ReprojImage.prototype.getProjection = function () {\n        return this.targetProj_;\n    };\n    /**\n     * @private\n     */\n    ReprojImage.prototype.reproject_ = function () {\n        var sourceState = this.sourceImage_.getState();\n        if (sourceState == ImageState.LOADED) {\n            var width = getWidth(this.targetExtent_) / this.targetResolution_;\n            var height = getHeight(this.targetExtent_) / this.targetResolution_;\n            this.canvas_ = renderReprojected(width, height, this.sourcePixelRatio_, this.sourceImage_.getResolution(), this.maxSourceExtent_, this.targetResolution_, this.targetExtent_, this.triangulation_, [\n                {\n                    extent: this.sourceImage_.getExtent(),\n                    image: this.sourceImage_.getImage(),\n                },\n            ], 0, undefined, this.contextOptions_);\n        }\n        this.state = sourceState;\n        this.changed();\n    };\n    /**\n     * Load not yet loaded URI.\n     */\n    ReprojImage.prototype.load = function () {\n        if (this.state == ImageState.IDLE) {\n            this.state = ImageState.LOADING;\n            this.changed();\n            var sourceState = this.sourceImage_.getState();\n            if (sourceState == ImageState.LOADED || sourceState == ImageState.ERROR) {\n                this.reproject_();\n            }\n            else {\n                this.sourceListenerKey_ = listen(this.sourceImage_, EventType.CHANGE, function (e) {\n                    var sourceState = this.sourceImage_.getState();\n                    if (sourceState == ImageState.LOADED ||\n                        sourceState == ImageState.ERROR) {\n                        this.unlistenSource_();\n                        this.reproject_();\n                    }\n                }, this);\n                this.sourceImage_.load();\n            }\n        }\n    };\n    /**\n     * @private\n     */\n    ReprojImage.prototype.unlistenSource_ = function () {\n        unlistenByKey(\n        /** @type {!import(\"../events.js\").EventsKey} */ (this.sourceListenerKey_));\n        this.sourceListenerKey_ = null;\n    };\n    return ReprojImage;\n}(ImageBase));\nexport default ReprojImage;\n//# sourceMappingURL=Image.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/source/Image\n */\nimport Event from '../events/Event.js';\nimport ImageState from '../ImageState.js';\nimport ReprojImage from '../reproj/Image.js';\nimport Source from './Source.js';\nimport { ENABLE_RASTER_REPROJECTION } from '../reproj/common.js';\nimport { IMAGE_SMOOTHING_DISABLED } from './common.js';\nimport { abstract } from '../util.js';\nimport { equals } from '../extent.js';\nimport { equivalent } from '../proj.js';\nimport { linearFindNearest } from '../array.js';\n/**\n * @enum {string}\n */\nexport var ImageSourceEventType = {\n    /**\n     * Triggered when an image starts loading.\n     * @event module:ol/source/Image.ImageSourceEvent#imageloadstart\n     * @api\n     */\n    IMAGELOADSTART: 'imageloadstart',\n    /**\n     * Triggered when an image finishes loading.\n     * @event module:ol/source/Image.ImageSourceEvent#imageloadend\n     * @api\n     */\n    IMAGELOADEND: 'imageloadend',\n    /**\n     * Triggered if image loading results in an error.\n     * @event module:ol/source/Image.ImageSourceEvent#imageloaderror\n     * @api\n     */\n    IMAGELOADERROR: 'imageloaderror',\n};\n/**\n * @typedef {'imageloadend'|'imageloaderror'|'imageloadstart'} ImageSourceEventTypes\n */\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Image~ImageSource} instances are instances of this\n * type.\n */\nvar ImageSourceEvent = /** @class */ (function (_super) {\n    __extends(ImageSourceEvent, _super);\n    /**\n     * @param {string} type Type.\n     * @param {import(\"../Image.js\").default} image The image.\n     */\n    function ImageSourceEvent(type, image) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The image related to the event.\n         * @type {import(\"../Image.js\").default}\n         * @api\n         */\n        _this.image = image;\n        return _this;\n    }\n    return ImageSourceEvent;\n}(Event));\nexport { ImageSourceEvent };\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types, import(\"../Object\").ObjectEvent, Return> &\n *   import(\"../Observable\").OnSignature<ImageSourceEventTypes, ImageSourceEvent, Return> &\n *   import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"../ObjectEventType\").Types\n *     |ImageSourceEventTypes, Return>} ImageSourceOnSignature\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {Array<number>} [resolutions] Resolutions.\n * @property {import(\"./State.js\").default} [state] State.\n */\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for sources providing a single image.\n * @abstract\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nvar ImageSource = /** @class */ (function (_super) {\n    __extends(ImageSource, _super);\n    /**\n     * @param {Options} options Single image source options.\n     */\n    function ImageSource(options) {\n        var _this = _super.call(this, {\n            attributions: options.attributions,\n            projection: options.projection,\n            state: options.state,\n        }) || this;\n        /***\n         * @type {ImageSourceOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {ImageSourceOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {ImageSourceOnSignature<void>}\n         */\n        _this.un;\n        /**\n         * @private\n         * @type {Array<number>}\n         */\n        _this.resolutions_ =\n            options.resolutions !== undefined ? options.resolutions : null;\n        /**\n         * @private\n         * @type {import(\"../reproj/Image.js\").default}\n         */\n        _this.reprojectedImage_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.reprojectedRevision_ = 0;\n        /**\n         * @private\n         * @type {object|undefined}\n         */\n        _this.contextOptions_ =\n            options.imageSmoothing === false ? IMAGE_SMOOTHING_DISABLED : undefined;\n        return _this;\n    }\n    /**\n     * @return {Array<number>} Resolutions.\n     */\n    ImageSource.prototype.getResolutions = function () {\n        return this.resolutions_;\n    };\n    /**\n     * @return {Object|undefined} Context options.\n     */\n    ImageSource.prototype.getContextOptions = function () {\n        return this.contextOptions_;\n    };\n    /**\n     * @protected\n     * @param {number} resolution Resolution.\n     * @return {number} Resolution.\n     */\n    ImageSource.prototype.findNearestResolution = function (resolution) {\n        if (this.resolutions_) {\n            var idx = linearFindNearest(this.resolutions_, resolution, 0);\n            resolution = this.resolutions_[idx];\n        }\n        return resolution;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../ImageBase.js\").default} Single image.\n     */\n    ImageSource.prototype.getImage = function (extent, resolution, pixelRatio, projection) {\n        var sourceProjection = this.getProjection();\n        if (!ENABLE_RASTER_REPROJECTION ||\n            !sourceProjection ||\n            !projection ||\n            equivalent(sourceProjection, projection)) {\n            if (sourceProjection) {\n                projection = sourceProjection;\n            }\n            return this.getImageInternal(extent, resolution, pixelRatio, projection);\n        }\n        else {\n            if (this.reprojectedImage_) {\n                if (this.reprojectedRevision_ == this.getRevision() &&\n                    equivalent(this.reprojectedImage_.getProjection(), projection) &&\n                    this.reprojectedImage_.getResolution() == resolution &&\n                    equals(this.reprojectedImage_.getExtent(), extent)) {\n                    return this.reprojectedImage_;\n                }\n                this.reprojectedImage_.dispose();\n                this.reprojectedImage_ = null;\n            }\n            this.reprojectedImage_ = new ReprojImage(sourceProjection, projection, extent, resolution, pixelRatio, function (extent, resolution, pixelRatio) {\n                return this.getImageInternal(extent, resolution, pixelRatio, sourceProjection);\n            }.bind(this), this.contextOptions_);\n            this.reprojectedRevision_ = this.getRevision();\n            return this.reprojectedImage_;\n        }\n    };\n    /**\n     * @abstract\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../ImageBase.js\").default} Single image.\n     * @protected\n     */\n    ImageSource.prototype.getImageInternal = function (extent, resolution, pixelRatio, projection) {\n        return abstract();\n    };\n    /**\n     * Handle image change events.\n     * @param {import(\"../events/Event.js\").default} event Event.\n     * @protected\n     */\n    ImageSource.prototype.handleImageChange = function (event) {\n        var image = /** @type {import(\"../Image.js\").default} */ (event.target);\n        switch (image.getState()) {\n            case ImageState.LOADING:\n                this.loading = true;\n                this.dispatchEvent(new ImageSourceEvent(ImageSourceEventType.IMAGELOADSTART, image));\n                break;\n            case ImageState.LOADED:\n                this.loading = false;\n                this.dispatchEvent(new ImageSourceEvent(ImageSourceEventType.IMAGELOADEND, image));\n                break;\n            case ImageState.ERROR:\n                this.loading = false;\n                this.dispatchEvent(new ImageSourceEvent(ImageSourceEventType.IMAGELOADERROR, image));\n                break;\n            default:\n            // pass\n        }\n    };\n    return ImageSource;\n}(Source));\n/**\n * Default image load function for image sources that use import(\"../Image.js\").Image image\n * instances.\n * @param {import(\"../Image.js\").default} image Image.\n * @param {string} src Source.\n */\nexport function defaultImageLoadFunction(image, src) {\n    /** @type {HTMLImageElement|HTMLVideoElement} */ (image.getImage()).src = src;\n}\nexport default ImageSource;\n//# sourceMappingURL=Image.js.map","/**\n * @module ol/uri\n */\n/**\n * Appends query parameters to a URI.\n *\n * @param {string} uri The original URI, which may already have query data.\n * @param {!Object} params An object where keys are URI-encoded parameter keys,\n *     and the values are arbitrary types or arrays.\n * @return {string} The new URI.\n */\nexport function appendParams(uri, params) {\n    var keyParams = [];\n    // Skip any null or undefined parameter values\n    Object.keys(params).forEach(function (k) {\n        if (params[k] !== null && params[k] !== undefined) {\n            keyParams.push(k + '=' + encodeURIComponent(params[k]));\n        }\n    });\n    var qs = keyParams.join('&');\n    // remove any trailing ? or &\n    uri = uri.replace(/[?&]$/, '');\n    // append ? or & depending on whether uri has existing parameters\n    uri = uri.indexOf('?') === -1 ? uri + '?' : uri + '&';\n    return uri + qs;\n}\n//# sourceMappingURL=uri.js.map","/**\n * @module ol/source/ImageArcGISRest\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventType from '../events/EventType.js';\nimport ImageSource, { defaultImageLoadFunction } from './Image.js';\nimport ImageWrapper from '../Image.js';\nimport { appendParams } from '../uri.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { containsExtent, getHeight, getWidth } from '../extent.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting the image from\n * the remote server.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given\n * a URL.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {Object<string,*>} [params] ArcGIS Rest parameters. This field is optional. Service\n * defaults will be used for any fields not specified. `FORMAT` is `PNG32` by default. `F` is\n * `IMAGE` by default. `TRANSPARENT` is `true` by default.  `BBOX`, `SIZE`, `BBOXSR`, and `IMAGESR`\n * will be set dynamically. Set `LAYERS` to override the default service layer visibility. See\n * https://developers.arcgis.com/rest/services-reference/export-map.htm\n * for further reference.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * The projection code must contain a numeric end portion separated by :\n * or the entire code must form a valid ArcGIS SpatialReference definition.\n * @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport,\n * `2` means twice the size of the map viewport, and so on.\n * @property {Array<number>} [resolutions] Resolutions. If specified, requests will be made for\n * these resolutions only.\n * @property {string} [url] ArcGIS Rest service URL for a Map Service or Image Service. The url\n * should include /MapServer or /ImageServer.\n */\n/**\n * @classdesc\n * Source for data from ArcGIS Rest services providing single, untiled images.\n * Useful when underlying map service has labels.\n *\n * If underlying map service is not using labels,\n * take advantage of ol image caching and use\n * {@link module:ol/source/TileArcGISRest} data source.\n *\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nvar ImageArcGISRest = /** @class */ (function (_super) {\n    __extends(ImageArcGISRest, _super);\n    /**\n     * @param {Options} [opt_options] Image ArcGIS Rest Options.\n     */\n    function ImageArcGISRest(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            resolutions: options.resolutions,\n        }) || this;\n        /**\n         * @private\n         * @type {?string}\n         */\n        _this.crossOrigin_ =\n            options.crossOrigin !== undefined ? options.crossOrigin : null;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.url_ = options.url;\n        /**\n         * @private\n         * @type {import(\"../Image.js\").LoadFunction}\n         */\n        _this.imageLoadFunction_ =\n            options.imageLoadFunction !== undefined\n                ? options.imageLoadFunction\n                : defaultImageLoadFunction;\n        /**\n         * @private\n         * @type {!Object}\n         */\n        _this.params_ = options.params || {};\n        /**\n         * @private\n         * @type {import(\"../Image.js\").default}\n         */\n        _this.image_ = null;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.imageSize_ = [0, 0];\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRevision_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;\n        return _this;\n    }\n    /**\n     * Get the user-provided params, i.e. those passed to the constructor through\n     * the \"params\" option, and possibly updated using the updateParams method.\n     * @return {Object} Params.\n     * @api\n     */\n    ImageArcGISRest.prototype.getParams = function () {\n        return this.params_;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../Image.js\").default} Single image.\n     */\n    ImageArcGISRest.prototype.getImageInternal = function (extent, resolution, pixelRatio, projection) {\n        if (this.url_ === undefined) {\n            return null;\n        }\n        resolution = this.findNearestResolution(resolution);\n        pixelRatio = this.hidpi_ ? pixelRatio : 1;\n        var image = this.image_;\n        if (image &&\n            this.renderedRevision_ == this.getRevision() &&\n            image.getResolution() == resolution &&\n            image.getPixelRatio() == pixelRatio &&\n            containsExtent(image.getExtent(), extent)) {\n            return image;\n        }\n        var params = {\n            'F': 'image',\n            'FORMAT': 'PNG32',\n            'TRANSPARENT': true,\n        };\n        assign(params, this.params_);\n        extent = extent.slice();\n        var centerX = (extent[0] + extent[2]) / 2;\n        var centerY = (extent[1] + extent[3]) / 2;\n        if (this.ratio_ != 1) {\n            var halfWidth = (this.ratio_ * getWidth(extent)) / 2;\n            var halfHeight = (this.ratio_ * getHeight(extent)) / 2;\n            extent[0] = centerX - halfWidth;\n            extent[1] = centerY - halfHeight;\n            extent[2] = centerX + halfWidth;\n            extent[3] = centerY + halfHeight;\n        }\n        var imageResolution = resolution / pixelRatio;\n        // Compute an integer width and height.\n        var width = Math.ceil(getWidth(extent) / imageResolution);\n        var height = Math.ceil(getHeight(extent) / imageResolution);\n        // Modify the extent to match the integer width and height.\n        extent[0] = centerX - (imageResolution * width) / 2;\n        extent[2] = centerX + (imageResolution * width) / 2;\n        extent[1] = centerY - (imageResolution * height) / 2;\n        extent[3] = centerY + (imageResolution * height) / 2;\n        this.imageSize_[0] = width;\n        this.imageSize_[1] = height;\n        var url = this.getRequestUrl_(extent, this.imageSize_, pixelRatio, projection, params);\n        this.image_ = new ImageWrapper(extent, resolution, pixelRatio, url, this.crossOrigin_, this.imageLoadFunction_);\n        this.renderedRevision_ = this.getRevision();\n        this.image_.addEventListener(EventType.CHANGE, this.handleImageChange.bind(this));\n        return this.image_;\n    };\n    /**\n     * Return the image load function of the source.\n     * @return {import(\"../Image.js\").LoadFunction} The image load function.\n     * @api\n     */\n    ImageArcGISRest.prototype.getImageLoadFunction = function () {\n        return this.imageLoadFunction_;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {import(\"../size.js\").Size} size Size.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {Object} params Params.\n     * @return {string} Request URL.\n     * @private\n     */\n    ImageArcGISRest.prototype.getRequestUrl_ = function (extent, size, pixelRatio, projection, params) {\n        // ArcGIS Server only wants the numeric portion of the projection ID.\n        // (if there is no numeric portion the entire projection code must\n        // form a valid ArcGIS SpatialReference definition).\n        var srid = projection\n            .getCode()\n            .split(/:(?=\\d+$)/)\n            .pop();\n        params['SIZE'] = size[0] + ',' + size[1];\n        params['BBOX'] = extent.join(',');\n        params['BBOXSR'] = srid;\n        params['IMAGESR'] = srid;\n        params['DPI'] = Math.round(90 * pixelRatio);\n        var url = this.url_;\n        var modifiedUrl = url\n            .replace(/MapServer\\/?$/, 'MapServer/export')\n            .replace(/ImageServer\\/?$/, 'ImageServer/exportImage');\n        if (modifiedUrl == url) {\n            assert(false, 50); // `options.featureTypes` should be an Array\n        }\n        return appendParams(modifiedUrl, params);\n    };\n    /**\n     * Return the URL used for this ArcGIS source.\n     * @return {string|undefined} URL.\n     * @api\n     */\n    ImageArcGISRest.prototype.getUrl = function () {\n        return this.url_;\n    };\n    /**\n     * Set the image load function of the source.\n     * @param {import(\"../Image.js\").LoadFunction} imageLoadFunction Image load function.\n     * @api\n     */\n    ImageArcGISRest.prototype.setImageLoadFunction = function (imageLoadFunction) {\n        this.image_ = null;\n        this.imageLoadFunction_ = imageLoadFunction;\n        this.changed();\n    };\n    /**\n     * Set the URL to use for requests.\n     * @param {string|undefined} url URL.\n     * @api\n     */\n    ImageArcGISRest.prototype.setUrl = function (url) {\n        if (url != this.url_) {\n            this.url_ = url;\n            this.image_ = null;\n            this.changed();\n        }\n    };\n    /**\n     * Update the user-provided params.\n     * @param {Object} params Params.\n     * @api\n     */\n    ImageArcGISRest.prototype.updateParams = function (params) {\n        assign(this.params_, params);\n        this.image_ = null;\n        this.changed();\n    };\n    return ImageArcGISRest;\n}(ImageSource));\nexport default ImageArcGISRest;\n//# sourceMappingURL=ImageArcGISRest.js.map","/**\n * @module ol/source/ImageCanvas\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport ImageCanvas from '../ImageCanvas.js';\nimport ImageSource from './Image.js';\nimport { containsExtent, getHeight, getWidth, scaleFromCenter, } from '../extent.js';\n/**\n * A function returning the canvas element (`{HTMLCanvasElement}`)\n * used by the source as an image. The arguments passed to the function are:\n * {@link module:ol/extent~Extent} the image extent, `{number}` the image resolution,\n * `{number}` the pixel ratio of the map, {@link module:ol/size~Size} the image size,\n * and {@link module:ol/proj/Projection} the image projection. The canvas returned by\n * this function is cached by the source. The this keyword inside the function\n * references the {@link module:ol/source/ImageCanvas}.\n *\n * @typedef {function(this:import(\"../ImageCanvas.js\").default, import(\"../extent.js\").Extent, number,\n *     number, import(\"../size.js\").Size, import(\"../proj/Projection.js\").default): HTMLCanvasElement} FunctionType\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {FunctionType} [canvasFunction] Canvas function.\n * The function returning the canvas element used by the source\n * as an image. The arguments passed to the function are: `{import(\"../extent.js\").Extent}` the\n * image extent, `{number}` the image resolution, `{number}` the pixel ratio of the map,\n * `{import(\"../size.js\").Size}` the image size, and `{import(\"../proj/Projection.js\").Projection}` the image\n * projection. The canvas returned by this function is cached by the source. If\n * the value returned by the function is later changed then\n * `changed` should be called on the source for the source to\n * invalidate the current cached image. See: {@link module:ol/Observable~Observable#changed}\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [ratio=1.5] Ratio. 1 means canvases are the size of the map viewport, 2 means twice the\n * width and height of the map viewport, and so on. Must be `1` or higher.\n * @property {Array<number>} [resolutions] Resolutions.\n * If specified, new canvases will be created for these resolutions\n * @property {import(\"./State.js\").default} [state] Source state.\n */\n/**\n * @classdesc\n * Base class for image sources where a canvas element is the image.\n * @api\n */\nvar ImageCanvasSource = /** @class */ (function (_super) {\n    __extends(ImageCanvasSource, _super);\n    /**\n     * @param {Options} [opt_options] ImageCanvas options.\n     */\n    function ImageCanvasSource(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            resolutions: options.resolutions,\n            state: options.state,\n        }) || this;\n        /**\n         * @private\n         * @type {FunctionType}\n         */\n        _this.canvasFunction_ = options.canvasFunction;\n        /**\n         * @private\n         * @type {import(\"../ImageCanvas.js\").default}\n         */\n        _this.canvas_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRevision_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;\n        return _this;\n    }\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../ImageCanvas.js\").default} Single image.\n     */\n    ImageCanvasSource.prototype.getImageInternal = function (extent, resolution, pixelRatio, projection) {\n        resolution = this.findNearestResolution(resolution);\n        var canvas = this.canvas_;\n        if (canvas &&\n            this.renderedRevision_ == this.getRevision() &&\n            canvas.getResolution() == resolution &&\n            canvas.getPixelRatio() == pixelRatio &&\n            containsExtent(canvas.getExtent(), extent)) {\n            return canvas;\n        }\n        extent = extent.slice();\n        scaleFromCenter(extent, this.ratio_);\n        var width = getWidth(extent) / resolution;\n        var height = getHeight(extent) / resolution;\n        var size = [width * pixelRatio, height * pixelRatio];\n        var canvasElement = this.canvasFunction_.call(this, extent, resolution, pixelRatio, size, projection);\n        if (canvasElement) {\n            canvas = new ImageCanvas(extent, resolution, pixelRatio, canvasElement);\n        }\n        this.canvas_ = canvas;\n        this.renderedRevision_ = this.getRevision();\n        return canvas;\n    };\n    return ImageCanvasSource;\n}(ImageSource));\nexport default ImageCanvasSource;\n//# sourceMappingURL=ImageCanvas.js.map","/**\n * @module ol/source/ImageMapGuide\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventType from '../events/EventType.js';\nimport ImageSource, { defaultImageLoadFunction } from './Image.js';\nimport ImageWrapper from '../Image.js';\nimport { appendParams } from '../uri.js';\nimport { assign } from '../obj.js';\nimport { containsExtent, getCenter, getHeight, getWidth, scaleFromCenter, } from '../extent.js';\n/**\n * @typedef {Object} Options\n * @property {string} [url] The mapagent url.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {number} [displayDpi=96] The display resolution.\n * @property {number} [metersPerUnit=1] The meters-per-unit value.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {boolean} [useOverlay] If `true`, will use `GETDYNAMICMAPOVERLAYIMAGE`.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [ratio=1] Ratio. `1` means image requests are the size of the map viewport, `2` means\n * twice the width and height of the map viewport, and so on. Must be `1` or higher.\n * @property {Array<number>} [resolutions] Resolutions.\n * If specified, requests will be made for these resolutions only.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {Object} [params] Additional parameters.\n */\n/**\n * @classdesc\n * Source for images from Mapguide servers\n *\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nvar ImageMapGuide = /** @class */ (function (_super) {\n    __extends(ImageMapGuide, _super);\n    /**\n     * @param {Options} options ImageMapGuide options.\n     */\n    function ImageMapGuide(options) {\n        var _this = _super.call(this, {\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            resolutions: options.resolutions,\n        }) || this;\n        /**\n         * @private\n         * @type {?string}\n         */\n        _this.crossOrigin_ =\n            options.crossOrigin !== undefined ? options.crossOrigin : null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.displayDpi_ =\n            options.displayDpi !== undefined ? options.displayDpi : 96;\n        /**\n         * @private\n         * @type {!Object}\n         */\n        _this.params_ = options.params || {};\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.url_ = options.url;\n        /**\n         * @private\n         * @type {import(\"../Image.js\").LoadFunction}\n         */\n        _this.imageLoadFunction_ =\n            options.imageLoadFunction !== undefined\n                ? options.imageLoadFunction\n                : defaultImageLoadFunction;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.metersPerUnit_ =\n            options.metersPerUnit !== undefined ? options.metersPerUnit : 1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.ratio_ = options.ratio !== undefined ? options.ratio : 1;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.useOverlay_ =\n            options.useOverlay !== undefined ? options.useOverlay : false;\n        /**\n         * @private\n         * @type {import(\"../Image.js\").default}\n         */\n        _this.image_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRevision_ = 0;\n        return _this;\n    }\n    /**\n     * Get the user-provided params, i.e. those passed to the constructor through\n     * the \"params\" option, and possibly updated using the updateParams method.\n     * @return {Object} Params.\n     * @api\n     */\n    ImageMapGuide.prototype.getParams = function () {\n        return this.params_;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../Image.js\").default} Single image.\n     */\n    ImageMapGuide.prototype.getImageInternal = function (extent, resolution, pixelRatio, projection) {\n        resolution = this.findNearestResolution(resolution);\n        pixelRatio = this.hidpi_ ? pixelRatio : 1;\n        var image = this.image_;\n        if (image &&\n            this.renderedRevision_ == this.getRevision() &&\n            image.getResolution() == resolution &&\n            image.getPixelRatio() == pixelRatio &&\n            containsExtent(image.getExtent(), extent)) {\n            return image;\n        }\n        if (this.ratio_ != 1) {\n            extent = extent.slice();\n            scaleFromCenter(extent, this.ratio_);\n        }\n        var width = getWidth(extent) / resolution;\n        var height = getHeight(extent) / resolution;\n        var size = [width * pixelRatio, height * pixelRatio];\n        if (this.url_ !== undefined) {\n            var imageUrl = this.getUrl(this.url_, this.params_, extent, size, projection);\n            image = new ImageWrapper(extent, resolution, pixelRatio, imageUrl, this.crossOrigin_, this.imageLoadFunction_);\n            image.addEventListener(EventType.CHANGE, this.handleImageChange.bind(this));\n        }\n        else {\n            image = null;\n        }\n        this.image_ = image;\n        this.renderedRevision_ = this.getRevision();\n        return image;\n    };\n    /**\n     * Return the image load function of the source.\n     * @return {import(\"../Image.js\").LoadFunction} The image load function.\n     * @api\n     */\n    ImageMapGuide.prototype.getImageLoadFunction = function () {\n        return this.imageLoadFunction_;\n    };\n    /**\n     * Update the user-provided params.\n     * @param {Object} params Params.\n     * @api\n     */\n    ImageMapGuide.prototype.updateParams = function (params) {\n        assign(this.params_, params);\n        this.changed();\n    };\n    /**\n     * @param {string} baseUrl The mapagent url.\n     * @param {Object<string, string|number>} params Request parameters.\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {import(\"../size.js\").Size} size Size.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {string} The mapagent map image request URL.\n     */\n    ImageMapGuide.prototype.getUrl = function (baseUrl, params, extent, size, projection) {\n        var scale = getScale(extent, size, this.metersPerUnit_, this.displayDpi_);\n        var center = getCenter(extent);\n        var baseParams = {\n            'OPERATION': this.useOverlay_\n                ? 'GETDYNAMICMAPOVERLAYIMAGE'\n                : 'GETMAPIMAGE',\n            'VERSION': '2.0.0',\n            'LOCALE': 'en',\n            'CLIENTAGENT': 'ol/source/ImageMapGuide source',\n            'CLIP': '1',\n            'SETDISPLAYDPI': this.displayDpi_,\n            'SETDISPLAYWIDTH': Math.round(size[0]),\n            'SETDISPLAYHEIGHT': Math.round(size[1]),\n            'SETVIEWSCALE': scale,\n            'SETVIEWCENTERX': center[0],\n            'SETVIEWCENTERY': center[1],\n        };\n        assign(baseParams, params);\n        return appendParams(baseUrl, baseParams);\n    };\n    /**\n     * Set the image load function of the MapGuide source.\n     * @param {import(\"../Image.js\").LoadFunction} imageLoadFunction Image load function.\n     * @api\n     */\n    ImageMapGuide.prototype.setImageLoadFunction = function (imageLoadFunction) {\n        this.image_ = null;\n        this.imageLoadFunction_ = imageLoadFunction;\n        this.changed();\n    };\n    return ImageMapGuide;\n}(ImageSource));\n/**\n * @param {import(\"../extent.js\").Extent} extent The map extents.\n * @param {import(\"../size.js\").Size} size The viewport size.\n * @param {number} metersPerUnit The meters-per-unit value.\n * @param {number} dpi The display resolution.\n * @return {number} The computed map scale.\n */\nfunction getScale(extent, size, metersPerUnit, dpi) {\n    var mcsW = getWidth(extent);\n    var mcsH = getHeight(extent);\n    var devW = size[0];\n    var devH = size[1];\n    var mpp = 0.0254 / dpi;\n    if (devH * mcsW > devW * mcsH) {\n        return (mcsW * metersPerUnit) / (devW * mpp); // width limited\n    }\n    else {\n        return (mcsH * metersPerUnit) / (devH * mpp); // height limited\n    }\n}\nexport default ImageMapGuide;\n//# sourceMappingURL=ImageMapGuide.js.map","/**\n * @module ol/source/ImageStatic\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventType from '../events/EventType.js';\nimport ImageSource, { defaultImageLoadFunction } from './Image.js';\nimport ImageState from '../ImageState.js';\nimport ImageWrapper from '../Image.js';\nimport { assign } from '../obj.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { getHeight, getWidth, intersects } from '../extent.js';\nimport { get as getProjection } from '../proj.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {import(\"../extent.js\").Extent} [imageExtent] Extent of the image in map coordinates.\n * This is the [left, bottom, right, top] map coordinates of your image.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {import(\"../size.js\").Size} [imageSize] Size of the image in pixels. Usually the image size is auto-detected, so this\n * only needs to be set if auto-detection fails for some reason.\n * @property {string} url Image URL.\n */\n/**\n * @classdesc\n * A layer source for displaying a single, static image.\n * @api\n */\nvar Static = /** @class */ (function (_super) {\n    __extends(Static, _super);\n    /**\n     * @param {Options} options ImageStatic options.\n     */\n    function Static(options) {\n        var _this = this;\n        var crossOrigin = options.crossOrigin !== undefined ? options.crossOrigin : null;\n        var /** @type {import(\"../Image.js\").LoadFunction} */ imageLoadFunction = options.imageLoadFunction !== undefined\n            ? options.imageLoadFunction\n            : defaultImageLoadFunction;\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            imageSmoothing: options.imageSmoothing,\n            projection: getProjection(options.projection),\n        }) || this;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.url_ = options.url;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        _this.imageExtent_ = options.imageExtent;\n        /**\n         * @private\n         * @type {import(\"../Image.js\").default}\n         */\n        _this.image_ = new ImageWrapper(_this.imageExtent_, undefined, 1, _this.url_, crossOrigin, imageLoadFunction);\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.imageSize_ = options.imageSize ? options.imageSize : null;\n        _this.image_.addEventListener(EventType.CHANGE, _this.handleImageChange.bind(_this));\n        return _this;\n    }\n    /**\n     * Returns the image extent\n     * @return {import(\"../extent.js\").Extent} image extent.\n     * @api\n     */\n    Static.prototype.getImageExtent = function () {\n        return this.imageExtent_;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../Image.js\").default} Single image.\n     */\n    Static.prototype.getImageInternal = function (extent, resolution, pixelRatio, projection) {\n        if (intersects(extent, this.image_.getExtent())) {\n            return this.image_;\n        }\n        return null;\n    };\n    /**\n     * Return the URL used for this image source.\n     * @return {string} URL.\n     * @api\n     */\n    Static.prototype.getUrl = function () {\n        return this.url_;\n    };\n    /**\n     * @param {import(\"../events/Event.js\").default} evt Event.\n     */\n    Static.prototype.handleImageChange = function (evt) {\n        if (this.image_.getState() == ImageState.LOADED) {\n            var imageExtent = this.image_.getExtent();\n            var image = this.image_.getImage();\n            var imageWidth = void 0, imageHeight = void 0;\n            if (this.imageSize_) {\n                imageWidth = this.imageSize_[0];\n                imageHeight = this.imageSize_[1];\n            }\n            else {\n                imageWidth = image.width;\n                imageHeight = image.height;\n            }\n            var extentWidth = getWidth(imageExtent);\n            var extentHeight = getHeight(imageExtent);\n            var xResolution = extentWidth / imageWidth;\n            var yResolution = extentHeight / imageHeight;\n            var targetWidth = imageWidth;\n            var targetHeight = imageHeight;\n            if (xResolution > yResolution) {\n                targetWidth = Math.round(extentWidth / yResolution);\n            }\n            else {\n                targetHeight = Math.round(extentHeight / xResolution);\n            }\n            if (targetWidth !== imageWidth || targetHeight !== imageHeight) {\n                var context = createCanvasContext2D(targetWidth, targetHeight);\n                assign(context, this.getContextOptions());\n                var canvas = context.canvas;\n                context.drawImage(image, 0, 0, imageWidth, imageHeight, 0, 0, canvas.width, canvas.height);\n                this.image_.setImage(canvas);\n            }\n        }\n        _super.prototype.handleImageChange.call(this, evt);\n    };\n    return Static;\n}(ImageSource));\nexport default Static;\n//# sourceMappingURL=ImageStatic.js.map","/**\n * @module ol/source/WMSServerType\n */\n/**\n * Available server types: `'carmentaserver'`, `'geoserver'`, `'mapserver'`,\n *     `'qgis'`. These are servers that have vendor parameters beyond the WMS\n *     specification that OpenLayers can make use of.\n * @enum {string}\n */\nexport default {\n    /**\n     * HiDPI support for [Carmenta Server](https://www.carmenta.com/en/products/carmenta-server)\n     * @api\n     */\n    CARMENTA_SERVER: 'carmentaserver',\n    /**\n     * HiDPI support for [GeoServer](https://geoserver.org/)\n     * @api\n     */\n    GEOSERVER: 'geoserver',\n    /**\n     * HiDPI support for [MapServer](https://mapserver.org/)\n     * @api\n     */\n    MAPSERVER: 'mapserver',\n    /**\n     * HiDPI support for [QGIS](https://qgis.org/)\n     * @api\n     */\n    QGIS: 'qgis',\n};\n//# sourceMappingURL=WMSServerType.js.map","/**\n * @module ol/source/ImageWMS\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport { DEFAULT_WMS_VERSION } from './common.js';\nimport EventType from '../events/EventType.js';\nimport ImageSource, { defaultImageLoadFunction } from './Image.js';\nimport ImageWrapper from '../Image.js';\nimport WMSServerType from './WMSServerType.js';\nimport { appendParams } from '../uri.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { calculateSourceResolution } from '../reproj.js';\nimport { compareVersions } from '../string.js';\nimport { containsExtent, getCenter, getForViewAndSize, getHeight, getWidth, } from '../extent.js';\nimport { get as getProjection, transform } from '../proj.js';\n/**\n * @const\n * @type {import(\"../size.js\").Size}\n */\nvar GETFEATUREINFO_IMAGE_SIZE = [101, 101];\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {import(\"./WMSServerType.js\").default|string} [serverType] The type of\n * the remote WMS server: `mapserver`, `geoserver` or `qgis`. Only needed if `hidpi` is `true`.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {Object<string,*>} params WMS request parameters.\n * At least a `LAYERS` param is required. `STYLES` is\n * `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`\n * and `CRS` (`SRS` for WMS version < 1.3.0) will be set dynamically.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport, `2` means\n * twice the width and height of the map viewport, and so on. Must be `1` or\n * higher.\n * @property {Array<number>} [resolutions] Resolutions.\n * If specified, requests will be made for these resolutions only.\n * @property {string} url WMS service URL.\n */\n/**\n * @classdesc\n * Source for WMS servers providing single, untiled images.\n *\n * @fires module:ol/source/Image.ImageSourceEvent\n * @api\n */\nvar ImageWMS = /** @class */ (function (_super) {\n    __extends(ImageWMS, _super);\n    /**\n     * @param {Options} [opt_options] ImageWMS options.\n     */\n    function ImageWMS(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            resolutions: options.resolutions,\n        }) || this;\n        /**\n         * @private\n         * @type {?string}\n         */\n        _this.crossOrigin_ =\n            options.crossOrigin !== undefined ? options.crossOrigin : null;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.url_ = options.url;\n        /**\n         * @private\n         * @type {import(\"../Image.js\").LoadFunction}\n         */\n        _this.imageLoadFunction_ =\n            options.imageLoadFunction !== undefined\n                ? options.imageLoadFunction\n                : defaultImageLoadFunction;\n        /**\n         * @private\n         * @type {!Object}\n         */\n        _this.params_ = options.params || {};\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.v13_ = true;\n        _this.updateV13_();\n        /**\n         * @private\n         * @type {import(\"./WMSServerType.js\").default|undefined}\n         */\n        _this.serverType_ =\n            /** @type {import(\"./WMSServerType.js\").default|undefined} */ (options.serverType);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n        /**\n         * @private\n         * @type {import(\"../Image.js\").default}\n         */\n        _this.image_ = null;\n        /**\n         * @private\n         * @type {import(\"../size.js\").Size}\n         */\n        _this.imageSize_ = [0, 0];\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRevision_ = 0;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;\n        return _this;\n    }\n    /**\n     * Return the GetFeatureInfo URL for the passed coordinate, resolution, and\n     * projection. Return `undefined` if the GetFeatureInfo URL cannot be\n     * constructed.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {number} resolution Resolution.\n     * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n     * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should\n     *     be provided. If `QUERY_LAYERS` is not provided then the layers specified\n     *     in the `LAYERS` parameter will be used. `VERSION` should not be\n     *     specified here.\n     * @return {string|undefined} GetFeatureInfo URL.\n     * @api\n     */\n    ImageWMS.prototype.getFeatureInfoUrl = function (coordinate, resolution, projection, params) {\n        if (this.url_ === undefined) {\n            return undefined;\n        }\n        var projectionObj = getProjection(projection);\n        var sourceProjectionObj = this.getProjection();\n        if (sourceProjectionObj && sourceProjectionObj !== projectionObj) {\n            resolution = calculateSourceResolution(sourceProjectionObj, projectionObj, coordinate, resolution);\n            coordinate = transform(coordinate, projectionObj, sourceProjectionObj);\n        }\n        var extent = getForViewAndSize(coordinate, resolution, 0, GETFEATUREINFO_IMAGE_SIZE);\n        var baseParams = {\n            'SERVICE': 'WMS',\n            'VERSION': DEFAULT_WMS_VERSION,\n            'REQUEST': 'GetFeatureInfo',\n            'FORMAT': 'image/png',\n            'TRANSPARENT': true,\n            'QUERY_LAYERS': this.params_['LAYERS'],\n        };\n        assign(baseParams, this.params_, params);\n        var x = Math.floor((coordinate[0] - extent[0]) / resolution);\n        var y = Math.floor((extent[3] - coordinate[1]) / resolution);\n        baseParams[this.v13_ ? 'I' : 'X'] = x;\n        baseParams[this.v13_ ? 'J' : 'Y'] = y;\n        return this.getRequestUrl_(extent, GETFEATUREINFO_IMAGE_SIZE, 1, sourceProjectionObj || projectionObj, baseParams);\n    };\n    /**\n     * Return the GetLegendGraphic URL, optionally optimized for the passed\n     * resolution and possibly including any passed specific parameters. Returns\n     * `undefined` if the GetLegendGraphic URL cannot be constructed.\n     *\n     * @param {number} [resolution] Resolution. If set to undefined, `SCALE`\n     *     will not be calculated and included in URL.\n     * @param {Object} [params] GetLegendGraphic params. If `LAYER` is set, the\n     *     request is generated for this wms layer, else it will try to use the\n     *     configured wms layer. Default `FORMAT` is `image/png`.\n     *     `VERSION` should not be specified here.\n     * @return {string|undefined} GetLegendGraphic URL.\n     * @api\n     */\n    ImageWMS.prototype.getLegendUrl = function (resolution, params) {\n        if (this.url_ === undefined) {\n            return undefined;\n        }\n        var baseParams = {\n            'SERVICE': 'WMS',\n            'VERSION': DEFAULT_WMS_VERSION,\n            'REQUEST': 'GetLegendGraphic',\n            'FORMAT': 'image/png',\n        };\n        if (params === undefined || params['LAYER'] === undefined) {\n            var layers = this.params_.LAYERS;\n            var isSingleLayer = !Array.isArray(layers) || layers.length === 1;\n            if (!isSingleLayer) {\n                return undefined;\n            }\n            baseParams['LAYER'] = layers;\n        }\n        if (resolution !== undefined) {\n            var mpu = this.getProjection()\n                ? this.getProjection().getMetersPerUnit()\n                : 1;\n            var pixelSize = 0.00028;\n            baseParams['SCALE'] = (resolution * mpu) / pixelSize;\n        }\n        assign(baseParams, params);\n        return appendParams(/** @type {string} */ (this.url_), baseParams);\n    };\n    /**\n     * Get the user-provided params, i.e. those passed to the constructor through\n     * the \"params\" option, and possibly updated using the updateParams method.\n     * @return {Object} Params.\n     * @api\n     */\n    ImageWMS.prototype.getParams = function () {\n        return this.params_;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../Image.js\").default} Single image.\n     */\n    ImageWMS.prototype.getImageInternal = function (extent, resolution, pixelRatio, projection) {\n        if (this.url_ === undefined) {\n            return null;\n        }\n        resolution = this.findNearestResolution(resolution);\n        if (pixelRatio != 1 && (!this.hidpi_ || this.serverType_ === undefined)) {\n            pixelRatio = 1;\n        }\n        var imageResolution = resolution / pixelRatio;\n        var center = getCenter(extent);\n        var viewWidth = Math.ceil(getWidth(extent) / imageResolution);\n        var viewHeight = Math.ceil(getHeight(extent) / imageResolution);\n        var viewExtent = getForViewAndSize(center, imageResolution, 0, [\n            viewWidth,\n            viewHeight,\n        ]);\n        var requestWidth = Math.ceil((this.ratio_ * getWidth(extent)) / imageResolution);\n        var requestHeight = Math.ceil((this.ratio_ * getHeight(extent)) / imageResolution);\n        var requestExtent = getForViewAndSize(center, imageResolution, 0, [\n            requestWidth,\n            requestHeight,\n        ]);\n        var image = this.image_;\n        if (image &&\n            this.renderedRevision_ == this.getRevision() &&\n            image.getResolution() == resolution &&\n            image.getPixelRatio() == pixelRatio &&\n            containsExtent(image.getExtent(), viewExtent)) {\n            return image;\n        }\n        var params = {\n            'SERVICE': 'WMS',\n            'VERSION': DEFAULT_WMS_VERSION,\n            'REQUEST': 'GetMap',\n            'FORMAT': 'image/png',\n            'TRANSPARENT': true,\n        };\n        assign(params, this.params_);\n        this.imageSize_[0] = Math.round(getWidth(requestExtent) / imageResolution);\n        this.imageSize_[1] = Math.round(getHeight(requestExtent) / imageResolution);\n        var url = this.getRequestUrl_(requestExtent, this.imageSize_, pixelRatio, projection, params);\n        this.image_ = new ImageWrapper(requestExtent, resolution, pixelRatio, url, this.crossOrigin_, this.imageLoadFunction_);\n        this.renderedRevision_ = this.getRevision();\n        this.image_.addEventListener(EventType.CHANGE, this.handleImageChange.bind(this));\n        return this.image_;\n    };\n    /**\n     * Return the image load function of the source.\n     * @return {import(\"../Image.js\").LoadFunction} The image load function.\n     * @api\n     */\n    ImageWMS.prototype.getImageLoadFunction = function () {\n        return this.imageLoadFunction_;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {import(\"../size.js\").Size} size Size.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {Object} params Params.\n     * @return {string} Request URL.\n     * @private\n     */\n    ImageWMS.prototype.getRequestUrl_ = function (extent, size, pixelRatio, projection, params) {\n        assert(this.url_ !== undefined, 9); // `url` must be configured or set using `#setUrl()`\n        params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();\n        if (!('STYLES' in this.params_)) {\n            params['STYLES'] = '';\n        }\n        if (pixelRatio != 1) {\n            switch (this.serverType_) {\n                case WMSServerType.GEOSERVER:\n                    var dpi = (90 * pixelRatio + 0.5) | 0;\n                    if ('FORMAT_OPTIONS' in params) {\n                        params['FORMAT_OPTIONS'] += ';dpi:' + dpi;\n                    }\n                    else {\n                        params['FORMAT_OPTIONS'] = 'dpi:' + dpi;\n                    }\n                    break;\n                case WMSServerType.MAPSERVER:\n                    params['MAP_RESOLUTION'] = 90 * pixelRatio;\n                    break;\n                case WMSServerType.CARMENTA_SERVER:\n                case WMSServerType.QGIS:\n                    params['DPI'] = 90 * pixelRatio;\n                    break;\n                default:\n                    assert(false, 8); // Unknown `serverType` configured\n                    break;\n            }\n        }\n        params['WIDTH'] = size[0];\n        params['HEIGHT'] = size[1];\n        var axisOrientation = projection.getAxisOrientation();\n        var bbox;\n        if (this.v13_ && axisOrientation.substr(0, 2) == 'ne') {\n            bbox = [extent[1], extent[0], extent[3], extent[2]];\n        }\n        else {\n            bbox = extent;\n        }\n        params['BBOX'] = bbox.join(',');\n        return appendParams(/** @type {string} */ (this.url_), params);\n    };\n    /**\n     * Return the URL used for this WMS source.\n     * @return {string|undefined} URL.\n     * @api\n     */\n    ImageWMS.prototype.getUrl = function () {\n        return this.url_;\n    };\n    /**\n     * Set the image load function of the source.\n     * @param {import(\"../Image.js\").LoadFunction} imageLoadFunction Image load function.\n     * @api\n     */\n    ImageWMS.prototype.setImageLoadFunction = function (imageLoadFunction) {\n        this.image_ = null;\n        this.imageLoadFunction_ = imageLoadFunction;\n        this.changed();\n    };\n    /**\n     * Set the URL to use for requests.\n     * @param {string|undefined} url URL.\n     * @api\n     */\n    ImageWMS.prototype.setUrl = function (url) {\n        if (url != this.url_) {\n            this.url_ = url;\n            this.image_ = null;\n            this.changed();\n        }\n    };\n    /**\n     * Update the user-provided params.\n     * @param {Object} params Params.\n     * @api\n     */\n    ImageWMS.prototype.updateParams = function (params) {\n        assign(this.params_, params);\n        this.updateV13_();\n        this.image_ = null;\n        this.changed();\n    };\n    /**\n     * @private\n     */\n    ImageWMS.prototype.updateV13_ = function () {\n        var version = this.params_['VERSION'] || DEFAULT_WMS_VERSION;\n        this.v13_ = compareVersions(version, '1.3') >= 0;\n    };\n    return ImageWMS;\n}(ImageSource));\nexport default ImageWMS;\n//# sourceMappingURL=ImageWMS.js.map","/**\n * @module ol/source/OSM\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport XYZ from './XYZ.js';\n/**\n * The attribution containing a link to the OpenStreetMap Copyright and License\n * page.\n * @const\n * @type {string}\n * @api\n */\nexport var ATTRIBUTION = '&#169; ' +\n    '<a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">OpenStreetMap</a> ' +\n    'contributors.';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin='anonymous'] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {number} [maxZoom=19] Max zoom.\n * @property {boolean} [opaque=true] Whether the layer is opaque.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {string} [url='https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png'] URL template.\n * Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n/**\n * @classdesc\n * Layer source for the OpenStreetMap tile server.\n * @api\n */\nvar OSM = /** @class */ (function (_super) {\n    __extends(OSM, _super);\n    /**\n     * @param {Options} [opt_options] Open Street Map options.\n     */\n    function OSM(opt_options) {\n        var _this = this;\n        var options = opt_options || {};\n        var attributions;\n        if (options.attributions !== undefined) {\n            attributions = options.attributions;\n        }\n        else {\n            attributions = [ATTRIBUTION];\n        }\n        var crossOrigin = options.crossOrigin !== undefined ? options.crossOrigin : 'anonymous';\n        var url = options.url !== undefined\n            ? options.url\n            : 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png';\n        _this = _super.call(this, {\n            attributions: attributions,\n            attributionsCollapsible: false,\n            cacheSize: options.cacheSize,\n            crossOrigin: crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            maxZoom: options.maxZoom !== undefined ? options.maxZoom : 19,\n            opaque: options.opaque !== undefined ? options.opaque : true,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileLoadFunction: options.tileLoadFunction,\n            transition: options.transition,\n            url: url,\n            wrapX: options.wrapX,\n            zDirection: options.zDirection,\n        }) || this;\n        return _this;\n    }\n    return OSM;\n}(XYZ));\nexport default OSM;\n//# sourceMappingURL=OSM.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/source/Raster\n */\nimport Disposable from '../Disposable.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport ImageCanvas from '../ImageCanvas.js';\nimport ImageLayer from '../layer/Image.js';\nimport ImageSource from './Image.js';\nimport Source from './Source.js';\nimport SourceState from './State.js';\nimport TileLayer from '../layer/Tile.js';\nimport TileQueue from '../TileQueue.js';\nimport TileSource from './Tile.js';\nimport { assign } from '../obj.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { create as createTransform } from '../transform.js';\nimport { equals, getCenter, getHeight, getWidth } from '../extent.js';\nvar hasImageData = true;\ntry {\n    new ImageData(10, 10);\n}\ncatch (_) {\n    hasImageData = false;\n}\nvar context = document.createElement('canvas').getContext('2d');\n/**\n * @param {Uint8ClampedArray} data Image data.\n * @param {number} width Number of columns.\n * @param {number} height Number of rows.\n * @return {ImageData} Image data.\n */\nexport function newImageData(data, width, height) {\n    if (hasImageData) {\n        return new ImageData(data, width, height);\n    }\n    else {\n        var imageData = context.createImageData(width, height);\n        imageData.data.set(data);\n        return imageData;\n    }\n}\n/* istanbul ignore next */\n/**\n * Create a function for running operations.  This function is serialized for\n * use in a worker.\n * @param {function(Array, Object):*} operation The operation.\n * @return {function(Object):ArrayBuffer} A function that takes an object with\n * buffers, meta, imageOps, width, and height properties and returns an array\n * buffer.\n */\nfunction createMinion(operation) {\n    var workerHasImageData = true;\n    try {\n        new ImageData(10, 10);\n    }\n    catch (_) {\n        workerHasImageData = false;\n    }\n    function newWorkerImageData(data, width, height) {\n        if (workerHasImageData) {\n            return new ImageData(data, width, height);\n        }\n        else {\n            return { data: data, width: width, height: height };\n        }\n    }\n    return function (data) {\n        // bracket notation for minification support\n        var buffers = data['buffers'];\n        var meta = data['meta'];\n        var imageOps = data['imageOps'];\n        var width = data['width'];\n        var height = data['height'];\n        var numBuffers = buffers.length;\n        var numBytes = buffers[0].byteLength;\n        var output, b;\n        if (imageOps) {\n            var images = new Array(numBuffers);\n            for (b = 0; b < numBuffers; ++b) {\n                images[b] = newWorkerImageData(new Uint8ClampedArray(buffers[b]), width, height);\n            }\n            output = operation(images, meta).data;\n        }\n        else {\n            output = new Uint8ClampedArray(numBytes);\n            var arrays = new Array(numBuffers);\n            var pixels = new Array(numBuffers);\n            for (b = 0; b < numBuffers; ++b) {\n                arrays[b] = new Uint8ClampedArray(buffers[b]);\n                pixels[b] = [0, 0, 0, 0];\n            }\n            for (var i = 0; i < numBytes; i += 4) {\n                for (var j = 0; j < numBuffers; ++j) {\n                    var array = arrays[j];\n                    pixels[j][0] = array[i];\n                    pixels[j][1] = array[i + 1];\n                    pixels[j][2] = array[i + 2];\n                    pixels[j][3] = array[i + 3];\n                }\n                var pixel = operation(pixels, meta);\n                output[i] = pixel[0];\n                output[i + 1] = pixel[1];\n                output[i + 2] = pixel[2];\n                output[i + 3] = pixel[3];\n            }\n        }\n        return output.buffer;\n    };\n}\n/**\n * Create a worker for running operations.\n * @param {Object} config Configuration.\n * @param {function(MessageEvent): void} onMessage Called with a message event.\n * @return {Worker} The worker.\n */\nfunction createWorker(config, onMessage) {\n    var lib = Object.keys(config.lib || {}).map(function (name) {\n        return 'var ' + name + ' = ' + config.lib[name].toString() + ';';\n    });\n    var lines = lib.concat([\n        'var __minion__ = (' + createMinion.toString() + ')(',\n        config.operation.toString(),\n        ');',\n        'self.addEventListener(\"message\", function(event) {',\n        '  var buffer = __minion__(event.data);',\n        '  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);',\n        '});',\n    ]);\n    var blob = new Blob(lines, { type: 'text/javascript' });\n    var source = URL.createObjectURL(blob);\n    var worker = new Worker(source);\n    worker.addEventListener('message', onMessage);\n    return worker;\n}\n/**\n * @typedef {Object} FauxMessageEvent\n * @property {Object} data Message data.\n */\n/**\n * Create a faux worker for running operations.\n * @param {ProcessorOptions} config Configuration.\n * @param {function(FauxMessageEvent): void} onMessage Called with a message event.\n * @return {Object} The faux worker.\n */\nfunction createFauxWorker(config, onMessage) {\n    var minion = createMinion(config.operation);\n    var terminated = false;\n    return {\n        postMessage: function (data) {\n            setTimeout(function () {\n                if (terminated) {\n                    return;\n                }\n                onMessage({ data: { buffer: minion(data), meta: data['meta'] } });\n            }, 0);\n        },\n        terminate: function () {\n            terminated = true;\n        },\n    };\n}\n/**\n * @typedef {Object} ProcessorOptions\n * @property {number} threads Number of workers to spawn.\n * @property {function(Array, Object):*} operation The operation.\n * @property {Object} [lib] Functions that will be made available to operations run in a worker.\n * @property {number} queue The number of queued jobs to allow.\n * @property {boolean} [imageOps=false] Pass all the image data to the operation instead of a single pixel.\n */\n/**\n * @classdesc\n * A processor runs pixel or image operations in workers.\n */\nvar Processor = /** @class */ (function (_super) {\n    __extends(Processor, _super);\n    /**\n     * @param {ProcessorOptions} config Configuration.\n     */\n    function Processor(config) {\n        var _this = _super.call(this) || this;\n        _this._imageOps = !!config.imageOps;\n        var threads;\n        if (config.threads === 0) {\n            threads = 0;\n        }\n        else if (_this._imageOps) {\n            threads = 1;\n        }\n        else {\n            threads = config.threads || 1;\n        }\n        var workers = [];\n        if (threads) {\n            for (var i = 0; i < threads; ++i) {\n                workers[i] = createWorker(config, _this._onWorkerMessage.bind(_this, i));\n            }\n        }\n        else {\n            workers[0] = createFauxWorker(config, _this._onWorkerMessage.bind(_this, 0));\n        }\n        _this._workers = workers;\n        _this._queue = [];\n        _this._maxQueueLength = config.queue || Infinity;\n        _this._running = 0;\n        _this._dataLookup = {};\n        _this._job = null;\n        return _this;\n    }\n    /**\n     * Run operation on input data.\n     * @param {Array<Array|ImageData>} inputs Array of pixels or image data\n     *     (depending on the operation type).\n     * @param {Object} meta A user data object.  This is passed to all operations\n     *     and must be serializable.\n     * @param {function(Error, ImageData, Object): void} callback Called when work\n     *     completes.  The first argument is any error.  The second is the ImageData\n     *     generated by operations.  The third is the user data object.\n     */\n    Processor.prototype.process = function (inputs, meta, callback) {\n        this._enqueue({\n            inputs: inputs,\n            meta: meta,\n            callback: callback,\n        });\n        this._dispatch();\n    };\n    /**\n     * Add a job to the queue.\n     * @param {Object} job The job.\n     */\n    Processor.prototype._enqueue = function (job) {\n        this._queue.push(job);\n        while (this._queue.length > this._maxQueueLength) {\n            this._queue.shift().callback(null, null);\n        }\n    };\n    /**\n     * Dispatch a job.\n     */\n    Processor.prototype._dispatch = function () {\n        if (this._running === 0 && this._queue.length > 0) {\n            var job = this._queue.shift();\n            this._job = job;\n            var width = job.inputs[0].width;\n            var height = job.inputs[0].height;\n            var buffers = job.inputs.map(function (input) {\n                return input.data.buffer;\n            });\n            var threads = this._workers.length;\n            this._running = threads;\n            if (threads === 1) {\n                this._workers[0].postMessage({\n                    buffers: buffers,\n                    meta: job.meta,\n                    imageOps: this._imageOps,\n                    width: width,\n                    height: height,\n                }, buffers);\n            }\n            else {\n                var length_1 = job.inputs[0].data.length;\n                var segmentLength = 4 * Math.ceil(length_1 / 4 / threads);\n                for (var i = 0; i < threads; ++i) {\n                    var offset = i * segmentLength;\n                    var slices = [];\n                    for (var j = 0, jj = buffers.length; j < jj; ++j) {\n                        slices.push(buffers[j].slice(offset, offset + segmentLength));\n                    }\n                    this._workers[i].postMessage({\n                        buffers: slices,\n                        meta: job.meta,\n                        imageOps: this._imageOps,\n                        width: width,\n                        height: height,\n                    }, slices);\n                }\n            }\n        }\n    };\n    /**\n     * Handle messages from the worker.\n     * @param {number} index The worker index.\n     * @param {MessageEvent} event The message event.\n     */\n    Processor.prototype._onWorkerMessage = function (index, event) {\n        if (this.disposed) {\n            return;\n        }\n        this._dataLookup[index] = event.data;\n        --this._running;\n        if (this._running === 0) {\n            this._resolveJob();\n        }\n    };\n    /**\n     * Resolve a job.  If there are no more worker threads, the processor callback\n     * will be called.\n     */\n    Processor.prototype._resolveJob = function () {\n        var job = this._job;\n        var threads = this._workers.length;\n        var data, meta;\n        if (threads === 1) {\n            data = new Uint8ClampedArray(this._dataLookup[0]['buffer']);\n            meta = this._dataLookup[0]['meta'];\n        }\n        else {\n            var length_2 = job.inputs[0].data.length;\n            data = new Uint8ClampedArray(length_2);\n            meta = new Array(length_2);\n            var segmentLength = 4 * Math.ceil(length_2 / 4 / threads);\n            for (var i = 0; i < threads; ++i) {\n                var buffer = this._dataLookup[i]['buffer'];\n                var offset = i * segmentLength;\n                data.set(new Uint8ClampedArray(buffer), offset);\n                meta[i] = this._dataLookup[i]['meta'];\n            }\n        }\n        this._job = null;\n        this._dataLookup = {};\n        job.callback(null, newImageData(data, job.inputs[0].width, job.inputs[0].height), meta);\n        this._dispatch();\n    };\n    /**\n     * Terminate all workers associated with the processor.\n     */\n    Processor.prototype.disposeInternal = function () {\n        for (var i = 0; i < this._workers.length; ++i) {\n            this._workers[i].terminate();\n        }\n        this._workers.length = 0;\n    };\n    return Processor;\n}(Disposable));\nexport { Processor };\n/**\n * A function that takes an array of input data, performs some operation, and\n * returns an array of output data.\n * For `pixel` type operations, the function will be called with an array of\n * pixels, where each pixel is an array of four numbers (`[r, g, b, a]`) in the\n * range of 0 - 255. It should return a single pixel array.\n * For `'image'` type operations, functions will be called with an array of\n * [ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData)\n * and should return a single\n * [ImageData](https://developer.mozilla.org/en-US/docs/Web/API/ImageData).\n * The operations\n * are called with a second \"data\" argument, which can be used for storage.  The\n * data object is accessible from raster events, where it can be initialized in\n * \"beforeoperations\" and accessed again in \"afteroperations\".\n *\n * @typedef {function((Array<Array<number>>|Array<ImageData>), Object):\n *     (Array<number>|ImageData)} Operation\n */\n/**\n * @enum {string}\n */\nvar RasterEventType = {\n    /**\n     * Triggered before operations are run.\n     * @event module:ol/source/Raster.RasterSourceEvent#beforeoperations\n     * @api\n     */\n    BEFOREOPERATIONS: 'beforeoperations',\n    /**\n     * Triggered after operations are run.\n     * @event module:ol/source/Raster.RasterSourceEvent#afteroperations\n     * @api\n     */\n    AFTEROPERATIONS: 'afteroperations',\n};\n/**\n * Raster operation type. Supported values are `'pixel'` and `'image'`.\n * @enum {string}\n */\nvar RasterOperationType = {\n    PIXEL: 'pixel',\n    IMAGE: 'image',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Raster} instances are instances of this\n * type.\n */\nvar RasterSourceEvent = /** @class */ (function (_super) {\n    __extends(RasterSourceEvent, _super);\n    /**\n     * @param {string} type Type.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState The frame state.\n     * @param {Object} data An object made available to operations.\n     */\n    function RasterSourceEvent(type, frameState, data) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The raster extent.\n         * @type {import(\"../extent.js\").Extent}\n         * @api\n         */\n        _this.extent = frameState.extent;\n        /**\n         * The pixel resolution (map units per pixel).\n         * @type {number}\n         * @api\n         */\n        _this.resolution = frameState.viewState.resolution / frameState.pixelRatio;\n        /**\n         * An object made available to all operations.  This can be used by operations\n         * as a storage object (e.g. for calculating statistics).\n         * @type {Object}\n         * @api\n         */\n        _this.data = data;\n        return _this;\n    }\n    return RasterSourceEvent;\n}(Event));\nexport { RasterSourceEvent };\n/**\n * @typedef {Object} Options\n * @property {Array<import(\"./Source.js\").default|import(\"../layer/Layer.js\").default>} sources Input\n * sources or layers.  For vector data, use an VectorImage layer.\n * @property {Operation} [operation] Raster operation.\n * The operation will be called with data from input sources\n * and the output will be assigned to the raster source.\n * @property {Object} [lib] Functions that will be made available to operations run in a worker.\n * @property {number} [threads] By default, operations will be run in a single worker thread.\n * To avoid using workers altogether, set `threads: 0`.  For pixel operations, operations can\n * be run in multiple worker threads.  Note that there is additional overhead in\n * transferring data to multiple workers, and that depending on the user's\n * system, it may not be possible to parallelize the work.\n * @property {RasterOperationType} [operationType='pixel'] Operation type.\n * Supported values are `'pixel'` and `'image'`.  By default,\n * `'pixel'` operations are assumed, and operations will be called with an\n * array of pixels from input sources.  If set to `'image'`, operations will\n * be called with an array of ImageData objects from input sources.\n */\n/**\n * @classdesc\n * A source that transforms data from any number of input sources using an\n * {@link module:ol/source/Raster~Operation} function to transform input pixel values into\n * output pixel values.\n *\n * @fires module:ol/source/Raster.RasterSourceEvent\n * @api\n */\nvar RasterSource = /** @class */ (function (_super) {\n    __extends(RasterSource, _super);\n    /**\n     * @param {Options} options Options.\n     */\n    function RasterSource(options) {\n        var _this = _super.call(this, {\n            projection: null,\n        }) || this;\n        /**\n         * @private\n         * @type {Processor}\n         */\n        _this.processor_ = null;\n        /**\n         * @private\n         * @type {RasterOperationType}\n         */\n        _this.operationType_ =\n            options.operationType !== undefined\n                ? options.operationType\n                : RasterOperationType.PIXEL;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.threads_ = options.threads !== undefined ? options.threads : 1;\n        /**\n         * @private\n         * @type {Array<import(\"../layer/Layer.js\").default>}\n         */\n        _this.layers_ = createLayers(options.sources);\n        var changed = _this.changed.bind(_this);\n        for (var i = 0, ii = _this.layers_.length; i < ii; ++i) {\n            _this.layers_[i].addEventListener(EventType.CHANGE, changed);\n        }\n        /**\n         * @private\n         * @type {import(\"../TileQueue.js\").default}\n         */\n        _this.tileQueue_ = new TileQueue(function () {\n            return 1;\n        }, _this.changed.bind(_this));\n        /**\n         * The most recently requested frame state.\n         * @type {import(\"../PluggableMap.js\").FrameState}\n         * @private\n         */\n        _this.requestedFrameState_;\n        /**\n         * The most recently rendered image canvas.\n         * @type {import(\"../ImageCanvas.js\").default}\n         * @private\n         */\n        _this.renderedImageCanvas_ = null;\n        /**\n         * The most recently rendered revision.\n         * @type {number}\n         */\n        _this.renderedRevision_;\n        /**\n         * @private\n         * @type {import(\"../PluggableMap.js\").FrameState}\n         */\n        _this.frameState_ = {\n            animate: false,\n            coordinateToPixelTransform: createTransform(),\n            declutterTree: null,\n            extent: null,\n            index: 0,\n            layerIndex: 0,\n            layerStatesArray: getLayerStatesArray(_this.layers_),\n            pixelRatio: 1,\n            pixelToCoordinateTransform: createTransform(),\n            postRenderFunctions: [],\n            size: [0, 0],\n            tileQueue: _this.tileQueue_,\n            time: Date.now(),\n            usedTiles: {},\n            viewState: /** @type {import(\"../View.js\").State} */ ({\n                rotation: 0,\n            }),\n            viewHints: [],\n            wantedTiles: {},\n        };\n        _this.setAttributions(function (frameState) {\n            var attributions = [];\n            for (var index = 0, iMax = options.sources.length; index < iMax; ++index) {\n                var sourceOrLayer = options.sources[index];\n                var source = sourceOrLayer instanceof Source\n                    ? sourceOrLayer\n                    : sourceOrLayer.getSource();\n                var attributionGetter = source.getAttributions();\n                if (typeof attributionGetter === 'function') {\n                    var sourceAttribution = attributionGetter(frameState);\n                    attributions.push.apply(attributions, sourceAttribution);\n                }\n            }\n            return attributions.length !== 0 ? attributions : null;\n        });\n        if (options.operation !== undefined) {\n            _this.setOperation(options.operation, options.lib);\n        }\n        return _this;\n    }\n    /**\n     * Set the operation.\n     * @param {Operation} operation New operation.\n     * @param {Object} [opt_lib] Functions that will be available to operations run\n     *     in a worker.\n     * @api\n     */\n    RasterSource.prototype.setOperation = function (operation, opt_lib) {\n        if (this.processor_) {\n            this.processor_.dispose();\n        }\n        this.processor_ = new Processor({\n            operation: operation,\n            imageOps: this.operationType_ === RasterOperationType.IMAGE,\n            queue: 1,\n            lib: opt_lib,\n            threads: this.threads_,\n        });\n        this.changed();\n    };\n    /**\n     * Update the stored frame state.\n     * @param {import(\"../extent.js\").Extent} extent The view extent (in map units).\n     * @param {number} resolution The view resolution.\n     * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n     * @return {import(\"../PluggableMap.js\").FrameState} The updated frame state.\n     * @private\n     */\n    RasterSource.prototype.updateFrameState_ = function (extent, resolution, projection) {\n        var frameState = /** @type {import(\"../PluggableMap.js\").FrameState} */ (assign({}, this.frameState_));\n        frameState.viewState = /** @type {import(\"../View.js\").State} */ (assign({}, frameState.viewState));\n        var center = getCenter(extent);\n        frameState.extent = extent.slice();\n        frameState.size[0] = Math.round(getWidth(extent) / resolution);\n        frameState.size[1] = Math.round(getHeight(extent) / resolution);\n        frameState.time = Infinity;\n        var viewState = frameState.viewState;\n        viewState.center = center;\n        viewState.projection = projection;\n        viewState.resolution = resolution;\n        return frameState;\n    };\n    /**\n     * Determine if all sources are ready.\n     * @return {boolean} All sources are ready.\n     * @private\n     */\n    RasterSource.prototype.allSourcesReady_ = function () {\n        var ready = true;\n        var source;\n        for (var i = 0, ii = this.layers_.length; i < ii; ++i) {\n            source = this.layers_[i].getSource();\n            if (source.getState() !== SourceState.READY) {\n                ready = false;\n                break;\n            }\n        }\n        return ready;\n    };\n    /**\n     * @param {import(\"../extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {import(\"../ImageCanvas.js\").default} Single image.\n     */\n    RasterSource.prototype.getImage = function (extent, resolution, pixelRatio, projection) {\n        if (!this.allSourcesReady_()) {\n            return null;\n        }\n        var frameState = this.updateFrameState_(extent, resolution, projection);\n        this.requestedFrameState_ = frameState;\n        // check if we can't reuse the existing ol/ImageCanvas\n        if (this.renderedImageCanvas_) {\n            var renderedResolution = this.renderedImageCanvas_.getResolution();\n            var renderedExtent = this.renderedImageCanvas_.getExtent();\n            if (resolution !== renderedResolution ||\n                !equals(extent, renderedExtent)) {\n                this.renderedImageCanvas_ = null;\n            }\n        }\n        if (!this.renderedImageCanvas_ ||\n            this.getRevision() !== this.renderedRevision_) {\n            this.processSources_();\n        }\n        frameState.tileQueue.loadMoreTiles(16, 16);\n        if (frameState.animate) {\n            requestAnimationFrame(this.changed.bind(this));\n        }\n        return this.renderedImageCanvas_;\n    };\n    /**\n     * Start processing source data.\n     * @private\n     */\n    RasterSource.prototype.processSources_ = function () {\n        var frameState = this.requestedFrameState_;\n        var len = this.layers_.length;\n        var imageDatas = new Array(len);\n        for (var i = 0; i < len; ++i) {\n            frameState.layerIndex = i;\n            var imageData = getImageData(this.layers_[i], frameState);\n            if (imageData) {\n                imageDatas[i] = imageData;\n            }\n            else {\n                return;\n            }\n        }\n        var data = {};\n        this.dispatchEvent(new RasterSourceEvent(RasterEventType.BEFOREOPERATIONS, frameState, data));\n        this.processor_.process(imageDatas, data, this.onWorkerComplete_.bind(this, frameState));\n    };\n    /**\n     * Called when pixel processing is complete.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState The frame state.\n     * @param {Error} err Any error during processing.\n     * @param {ImageData} output The output image data.\n     * @param {Object} data The user data.\n     * @private\n     */\n    RasterSource.prototype.onWorkerComplete_ = function (frameState, err, output, data) {\n        if (err || !output) {\n            return;\n        }\n        // do nothing if extent or resolution changed\n        var extent = frameState.extent;\n        var resolution = frameState.viewState.resolution;\n        if (resolution !== this.requestedFrameState_.viewState.resolution ||\n            !equals(extent, this.requestedFrameState_.extent)) {\n            return;\n        }\n        var context;\n        if (this.renderedImageCanvas_) {\n            context = this.renderedImageCanvas_.getImage().getContext('2d');\n        }\n        else {\n            var width = Math.round(getWidth(extent) / resolution);\n            var height = Math.round(getHeight(extent) / resolution);\n            context = createCanvasContext2D(width, height);\n            this.renderedImageCanvas_ = new ImageCanvas(extent, resolution, 1, context.canvas);\n        }\n        context.putImageData(output, 0, 0);\n        this.changed();\n        this.renderedRevision_ = this.getRevision();\n        this.dispatchEvent(new RasterSourceEvent(RasterEventType.AFTEROPERATIONS, frameState, data));\n    };\n    /**\n     * @return {null} not implemented\n     */\n    RasterSource.prototype.getImageInternal = function () {\n        return null; // not implemented\n    };\n    RasterSource.prototype.disposeInternal = function () {\n        if (this.processor_) {\n            this.processor_.dispose();\n        }\n        _super.prototype.disposeInternal.call(this);\n    };\n    return RasterSource;\n}(ImageSource));\n/**\n * Clean up and unregister the worker.\n * @function\n * @api\n */\nRasterSource.prototype.dispose;\n/**\n * A reusable canvas context.\n * @type {CanvasRenderingContext2D}\n * @private\n */\nvar sharedContext = null;\n/**\n * Get image data from a layer.\n * @param {import(\"../layer/Layer.js\").default} layer Layer to render.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState The frame state.\n * @return {ImageData} The image data.\n */\nfunction getImageData(layer, frameState) {\n    var renderer = layer.getRenderer();\n    if (!renderer) {\n        throw new Error('Unsupported layer type: ' + layer);\n    }\n    if (!renderer.prepareFrame(frameState)) {\n        return null;\n    }\n    var width = frameState.size[0];\n    var height = frameState.size[1];\n    if (width === 0 || height === 0) {\n        return null;\n    }\n    var container = renderer.renderFrame(frameState, null);\n    var element;\n    if (container) {\n        element = container.firstElementChild;\n    }\n    if (!(element instanceof HTMLCanvasElement)) {\n        throw new Error('Unsupported rendered element: ' + element);\n    }\n    if (element.width === width && element.height === height) {\n        var context_1 = element.getContext('2d');\n        return context_1.getImageData(0, 0, width, height);\n    }\n    if (!sharedContext) {\n        sharedContext = createCanvasContext2D(width, height);\n    }\n    else {\n        var canvas = sharedContext.canvas;\n        if (canvas.width !== width || canvas.height !== height) {\n            sharedContext = createCanvasContext2D(width, height);\n        }\n        else {\n            sharedContext.clearRect(0, 0, width, height);\n        }\n    }\n    sharedContext.drawImage(element, 0, 0, width, height);\n    return sharedContext.getImageData(0, 0, width, height);\n}\n/**\n * Get a list of layer states from a list of layers.\n * @param {Array<import(\"../layer/Layer.js\").default>} layers Layers.\n * @return {Array<import(\"../layer/Layer.js\").State>} The layer states.\n */\nfunction getLayerStatesArray(layers) {\n    return layers.map(function (layer) {\n        return layer.getLayerState();\n    });\n}\n/**\n * Create layers for all sources.\n * @param {Array<import(\"./Source.js\").default|import(\"../layer/Layer.js\").default>} sources The sources.\n * @return {Array<import(\"../layer/Layer.js\").default>} Array of layers.\n */\nfunction createLayers(sources) {\n    var len = sources.length;\n    var layers = new Array(len);\n    for (var i = 0; i < len; ++i) {\n        layers[i] = createLayer(sources[i]);\n    }\n    return layers;\n}\n/**\n * Create a layer for the provided source.\n * @param {import(\"./Source.js\").default|import(\"../layer/Layer.js\").default} layerOrSource The layer or source.\n * @return {import(\"../layer/Layer.js\").default} The layer.\n */\nfunction createLayer(layerOrSource) {\n    // @type {import(\"../layer/Layer.js\").default}\n    var layer;\n    if (layerOrSource instanceof Source) {\n        if (layerOrSource instanceof TileSource) {\n            layer = new TileLayer({ source: layerOrSource });\n        }\n        else if (layerOrSource instanceof ImageSource) {\n            layer = new ImageLayer({ source: layerOrSource });\n        }\n    }\n    else {\n        layer = layerOrSource;\n    }\n    return layer;\n}\nexport default RasterSource;\n//# sourceMappingURL=Raster.js.map","/**\n * @module ol/source/Stamen\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport XYZ from './XYZ.js';\nimport { ATTRIBUTION as OSM_ATTRIBUTION } from './OSM.js';\n/**\n * @const\n * @type {Array<string>}\n */\nvar ATTRIBUTIONS = [\n    'Map tiles by <a href=\"https://stamen.com/\" target=\"_blank\">Stamen Design</a>, ' +\n        'under <a href=\"https://creativecommons.org/licenses/by/3.0/\" target=\"_blank\">CC BY' +\n        ' 3.0</a>.',\n    OSM_ATTRIBUTION,\n];\n/**\n * @type {Object<string, {extension: string, opaque: boolean}>}\n */\nvar LayerConfig = {\n    'terrain': {\n        extension: 'jpg',\n        opaque: true,\n    },\n    'terrain-background': {\n        extension: 'jpg',\n        opaque: true,\n    },\n    'terrain-labels': {\n        extension: 'png',\n        opaque: false,\n    },\n    'terrain-lines': {\n        extension: 'png',\n        opaque: false,\n    },\n    'toner-background': {\n        extension: 'png',\n        opaque: true,\n    },\n    'toner': {\n        extension: 'png',\n        opaque: true,\n    },\n    'toner-hybrid': {\n        extension: 'png',\n        opaque: false,\n    },\n    'toner-labels': {\n        extension: 'png',\n        opaque: false,\n    },\n    'toner-lines': {\n        extension: 'png',\n        opaque: false,\n    },\n    'toner-lite': {\n        extension: 'png',\n        opaque: true,\n    },\n    'watercolor': {\n        extension: 'jpg',\n        opaque: true,\n    },\n};\n/**\n * @type {Object<string, {minZoom: number, maxZoom: number}>}\n */\nvar ProviderConfig = {\n    'terrain': {\n        minZoom: 0,\n        maxZoom: 18,\n    },\n    'toner': {\n        minZoom: 0,\n        maxZoom: 20,\n    },\n    'watercolor': {\n        minZoom: 0,\n        maxZoom: 18,\n    },\n};\n/**\n * @typedef {Object} Options\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {string} layer Layer name.\n * @property {number} [minZoom] Minimum zoom.\n * @property {number} [maxZoom] Maximum zoom.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction]\n * Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [transition=250] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n/**\n * @classdesc\n * Layer source for the Stamen tile server.\n * @api\n */\nvar Stamen = /** @class */ (function (_super) {\n    __extends(Stamen, _super);\n    /**\n     * @param {Options} options Stamen options.\n     */\n    function Stamen(options) {\n        var _this = this;\n        var i = options.layer.indexOf('-');\n        var provider = i == -1 ? options.layer : options.layer.slice(0, i);\n        var providerConfig = ProviderConfig[provider];\n        var layerConfig = LayerConfig[options.layer];\n        var url = options.url !== undefined\n            ? options.url\n            : 'https://stamen-tiles-{a-d}.a.ssl.fastly.net/' +\n                options.layer +\n                '/{z}/{x}/{y}.' +\n                layerConfig.extension;\n        _this = _super.call(this, {\n            attributions: ATTRIBUTIONS,\n            cacheSize: options.cacheSize,\n            crossOrigin: 'anonymous',\n            imageSmoothing: options.imageSmoothing,\n            maxZoom: options.maxZoom != undefined ? options.maxZoom : providerConfig.maxZoom,\n            minZoom: options.minZoom != undefined ? options.minZoom : providerConfig.minZoom,\n            opaque: layerConfig.opaque,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileLoadFunction: options.tileLoadFunction,\n            transition: options.transition,\n            url: url,\n            wrapX: options.wrapX,\n            zDirection: options.zDirection,\n        }) || this;\n        return _this;\n    }\n    return Stamen;\n}(XYZ));\nexport default Stamen;\n//# sourceMappingURL=Stamen.js.map","/**\n * @module ol/source/TileArcGISRest\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport TileImage from './TileImage.js';\nimport { appendParams } from '../uri.js';\nimport { assign } from '../obj.js';\nimport { createEmpty } from '../extent.js';\nimport { modulo } from '../math.js';\nimport { scale as scaleSize, toSize } from '../size.js';\nimport { hash as tileCoordHash } from '../tilecoord.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {Object<string,*>} [params] ArcGIS Rest parameters. This field is optional. Service defaults will be\n * used for any fields not specified. `FORMAT` is `PNG32` by default. `F` is `IMAGE` by\n * default. `TRANSPARENT` is `true` by default.  `BBOX`, `SIZE`, `BBOXSR`,\n * and `IMAGESR` will be set dynamically. Set `LAYERS` to\n * override the default service layer visibility. See\n * https://developers.arcgis.com/rest/services-reference/export-map.htm\n * for further reference.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid. Base this on the resolutions,\n * tilesize and extent supported by the server.\n * If this is not defined, a default grid will be used: if there is a projection\n * extent, the grid will be based on that; if not, a grid based on a global\n * extent with origin at 0,0 will be used.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * The projection code must contain a numeric end portion separated by :\n * or the entire code must form a valid ArcGIS SpatialReference definition.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL.\n * The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {string} [url] ArcGIS Rest service URL for a Map Service or Image Service. The\n * url should include /MapServer or /ImageServer.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.  To disable the opacity\n * transition, pass `transition: 0`.\n * @property {Array<string>} [urls] ArcGIS Rest service urls. Use this instead of `url` when the ArcGIS\n * Service supports multiple urls for export requests.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n/**\n * @classdesc\n * Layer source for tile data from ArcGIS Rest services. Map and Image\n * Services are supported.\n *\n * For cached ArcGIS services, better performance is available using the\n * {@link module:ol/source/XYZ~XYZ} data source.\n * @api\n */\nvar TileArcGISRest = /** @class */ (function (_super) {\n    __extends(TileArcGISRest, _super);\n    /**\n     * @param {Options} [opt_options] Tile ArcGIS Rest options.\n     */\n    function TileArcGISRest(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileGrid: options.tileGrid,\n            tileLoadFunction: options.tileLoadFunction,\n            url: options.url,\n            urls: options.urls,\n            wrapX: options.wrapX !== undefined ? options.wrapX : true,\n            transition: options.transition,\n            zDirection: options.zDirection,\n        }) || this;\n        /**\n         * @private\n         * @type {!Object}\n         */\n        _this.params_ = options.params || {};\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        _this.tmpExtent_ = createEmpty();\n        _this.setKey(_this.getKeyForParams_());\n        return _this;\n    }\n    /**\n     * @private\n     * @return {string} The key for the current params.\n     */\n    TileArcGISRest.prototype.getKeyForParams_ = function () {\n        var i = 0;\n        var res = [];\n        for (var key in this.params_) {\n            res[i++] = key + '-' + this.params_[key];\n        }\n        return res.join('/');\n    };\n    /**\n     * Get the user-provided params, i.e. those passed to the constructor through\n     * the \"params\" option, and possibly updated using the updateParams method.\n     * @return {Object} Params.\n     * @api\n     */\n    TileArcGISRest.prototype.getParams = function () {\n        return this.params_;\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../size.js\").Size} tileSize Tile size.\n     * @param {import(\"../extent.js\").Extent} tileExtent Tile extent.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {Object} params Params.\n     * @return {string|undefined} Request URL.\n     * @private\n     */\n    TileArcGISRest.prototype.getRequestUrl_ = function (tileCoord, tileSize, tileExtent, pixelRatio, projection, params) {\n        var urls = this.urls;\n        if (!urls) {\n            return undefined;\n        }\n        // ArcGIS Server only wants the numeric portion of the projection ID.\n        // (if there is no numeric portion the entire projection code must\n        // form a valid ArcGIS SpatialReference definition).\n        var srid = projection\n            .getCode()\n            .split(/:(?=\\d+$)/)\n            .pop();\n        params['SIZE'] = tileSize[0] + ',' + tileSize[1];\n        params['BBOX'] = tileExtent.join(',');\n        params['BBOXSR'] = srid;\n        params['IMAGESR'] = srid;\n        params['DPI'] = Math.round(params['DPI'] ? params['DPI'] * pixelRatio : 90 * pixelRatio);\n        var url;\n        if (urls.length == 1) {\n            url = urls[0];\n        }\n        else {\n            var index = modulo(tileCoordHash(tileCoord), urls.length);\n            url = urls[index];\n        }\n        var modifiedUrl = url\n            .replace(/MapServer\\/?$/, 'MapServer/export')\n            .replace(/ImageServer\\/?$/, 'ImageServer/exportImage');\n        return appendParams(modifiedUrl, params);\n    };\n    /**\n     * Get the tile pixel ratio for this source.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} Tile pixel ratio.\n     */\n    TileArcGISRest.prototype.getTilePixelRatio = function (pixelRatio) {\n        return this.hidpi_ ? pixelRatio : 1;\n    };\n    /**\n     * Update the user-provided params.\n     * @param {Object} params Params.\n     * @api\n     */\n    TileArcGISRest.prototype.updateParams = function (params) {\n        assign(this.params_, params);\n        this.setKey(this.getKeyForParams_());\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord The tile coordinate\n     * @param {number} pixelRatio The pixel ratio\n     * @param {import(\"../proj/Projection.js\").default} projection The projection\n     * @return {string|undefined} The tile URL\n     * @override\n     */\n    TileArcGISRest.prototype.tileUrlFunction = function (tileCoord, pixelRatio, projection) {\n        var tileGrid = this.getTileGrid();\n        if (!tileGrid) {\n            tileGrid = this.getTileGridForProjection(projection);\n        }\n        if (tileGrid.getResolutions().length <= tileCoord[0]) {\n            return undefined;\n        }\n        if (pixelRatio != 1 && !this.hidpi_) {\n            pixelRatio = 1;\n        }\n        var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);\n        var tileSize = toSize(tileGrid.getTileSize(tileCoord[0]), this.tmpSize);\n        if (pixelRatio != 1) {\n            tileSize = scaleSize(tileSize, pixelRatio, this.tmpSize);\n        }\n        // Apply default params and override with user specified values.\n        var baseParams = {\n            'F': 'image',\n            'FORMAT': 'PNG32',\n            'TRANSPARENT': true,\n        };\n        assign(baseParams, this.params_);\n        return this.getRequestUrl_(tileCoord, tileSize, tileExtent, pixelRatio, projection, baseParams);\n    };\n    return TileArcGISRest;\n}(TileImage));\nexport default TileArcGISRest;\n//# sourceMappingURL=TileArcGISRest.js.map","/**\n * @module ol/source/TileDebug\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport XYZ from './XYZ.js';\nimport { createCanvasContext2D } from '../dom.js';\nimport { toSize } from '../size.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Optional projection.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Set to `1` when debugging `VectorTile` sources with a default configuration.\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n * @property {string} [template='z:{z} x:{x} y:{y}'] Template for labeling the tiles.\n * Should include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n */\n/**\n * @classdesc\n * A pseudo tile source, which does not fetch tiles from a server, but renders\n * a grid outline for the tile grid/projection along with the coordinates for\n * each tile. See examples/canvas-tiles for an example.\n * @api\n */\nvar TileDebug = /** @class */ (function (_super) {\n    __extends(TileDebug, _super);\n    /**\n     * @param {Options} [opt_options] Debug tile options.\n     */\n    function TileDebug(opt_options) {\n        var _this = this;\n        /**\n         * @type {Options}\n         */\n        var options = opt_options || {};\n        _this = _super.call(this, {\n            opaque: false,\n            projection: options.projection,\n            tileGrid: options.tileGrid,\n            wrapX: options.wrapX !== undefined ? options.wrapX : true,\n            zDirection: options.zDirection,\n            url: options.template || 'z:{z} x:{x} y:{y}',\n            tileLoadFunction: function (tile, text) {\n                var z = tile.getTileCoord()[0];\n                var tileSize = toSize(_this.tileGrid.getTileSize(z));\n                var context = createCanvasContext2D(tileSize[0], tileSize[1]);\n                context.strokeStyle = 'grey';\n                context.strokeRect(0.5, 0.5, tileSize[0] + 0.5, tileSize[1] + 0.5);\n                context.fillStyle = 'grey';\n                context.strokeStyle = 'white';\n                context.textAlign = 'center';\n                context.textBaseline = 'middle';\n                context.font = '24px sans-serif';\n                context.lineWidth = 4;\n                context.strokeText(text, tileSize[0] / 2, tileSize[1] / 2, tileSize[0]);\n                context.fillText(text, tileSize[0] / 2, tileSize[1] / 2, tileSize[0]);\n                /** @type {import(\"../ImageTile.js\").default} */ (tile).setImage(context.canvas);\n            },\n        }) || this;\n        return _this;\n    }\n    return TileDebug;\n}(XYZ));\nexport default TileDebug;\n//# sourceMappingURL=TileDebug.js.map","/**\n * @module ol/source/TileWMS\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport { DEFAULT_WMS_VERSION } from './common.js';\nimport TileImage from './TileImage.js';\nimport WMSServerType from './WMSServerType.js';\nimport { appendParams } from '../uri.js';\nimport { assert } from '../asserts.js';\nimport { assign } from '../obj.js';\nimport { buffer, createEmpty } from '../extent.js';\nimport { buffer as bufferSize, scale as scaleSize, toSize } from '../size.js';\nimport { calculateSourceResolution } from '../reproj.js';\nimport { compareVersions } from '../string.js';\nimport { get as getProjection, transform, transformExtent } from '../proj.js';\nimport { modulo } from '../math.js';\nimport { hash as tileCoordHash } from '../tilecoord.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {Object<string,*>} params WMS request parameters.\n * At least a `LAYERS` param is required. `STYLES` is\n * `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`\n * and `CRS` (`SRS` for WMS version < 1.3.0) will be set dynamically.\n * @property {number} [gutter=0]\n * The size in pixels of the gutter around image tiles to ignore. By setting\n * this property to a non-zero value, images will be requested that are wider\n * and taller than the tile size by a value of `2 x gutter`.\n * Using a non-zero value allows artifacts of rendering at tile edges to be\n * ignored. If you control the WMS service it is recommended to address\n * \"artifacts at tile edges\" issues by properly configuring the WMS service. For\n * example, MapServer has a `tile_map_edge_buffer` configuration parameter for\n * this. See https://mapserver.org/output/tile_mode.html.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {typeof import(\"../ImageTile.js\").default} [tileClass] Class used to instantiate image tiles.\n * Default is {@link module:ol/ImageTile~ImageTile}.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid. Base this on the resolutions,\n * tilesize and extent supported by the server.\n * If this is not defined, a default grid will be used: if there is a projection\n * extent, the grid will be based on that; if not, a grid based on a global\n * extent with origin at 0,0 will be used..\n * @property {import(\"./WMSServerType.js\").default|string} [serverType]\n * The type of the remote WMS server. Currently only used when `hidpi` is\n * `true`.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {string} [url] WMS service URL.\n * @property {Array<string>} [urls] WMS service urls.\n * Use this instead of `url` when the WMS supports multiple urls for GetMap requests.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * When set to `false`, only one world\n * will be rendered. When `true`, tiles will be requested for one world only,\n * but they will be wrapped horizontally to render multiple worlds.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n/**\n * @classdesc\n * Layer source for tile data from WMS servers.\n * @api\n */\nvar TileWMS = /** @class */ (function (_super) {\n    __extends(TileWMS, _super);\n    /**\n     * @param {Options} [opt_options] Tile WMS options.\n     */\n    function TileWMS(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : /** @type {Options} */ ({});\n        var params = options.params || {};\n        var transparent = 'TRANSPARENT' in params ? params['TRANSPARENT'] : true;\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            attributionsCollapsible: options.attributionsCollapsible,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            opaque: !transparent,\n            projection: options.projection,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileClass: options.tileClass,\n            tileGrid: options.tileGrid,\n            tileLoadFunction: options.tileLoadFunction,\n            url: options.url,\n            urls: options.urls,\n            wrapX: options.wrapX !== undefined ? options.wrapX : true,\n            transition: options.transition,\n            zDirection: options.zDirection,\n        }) || this;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.gutter_ = options.gutter !== undefined ? options.gutter : 0;\n        /**\n         * @private\n         * @type {!Object}\n         */\n        _this.params_ = params;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.v13_ = true;\n        /**\n         * @private\n         * @type {import(\"./WMSServerType.js\").default|undefined}\n         */\n        _this.serverType_ =\n            /** @type {import(\"./WMSServerType.js\").default|undefined} */ (options.serverType);\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        _this.tmpExtent_ = createEmpty();\n        _this.updateV13_();\n        _this.setKey(_this.getKeyForParams_());\n        return _this;\n    }\n    /**\n     * Return the GetFeatureInfo URL for the passed coordinate, resolution, and\n     * projection. Return `undefined` if the GetFeatureInfo URL cannot be\n     * constructed.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {number} resolution Resolution.\n     * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n     * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should\n     *     be provided. If `QUERY_LAYERS` is not provided then the layers specified\n     *     in the `LAYERS` parameter will be used. `VERSION` should not be\n     *     specified here.\n     * @return {string|undefined} GetFeatureInfo URL.\n     * @api\n     */\n    TileWMS.prototype.getFeatureInfoUrl = function (coordinate, resolution, projection, params) {\n        var projectionObj = getProjection(projection);\n        var sourceProjectionObj = this.getProjection();\n        var tileGrid = this.getTileGrid();\n        if (!tileGrid) {\n            tileGrid = this.getTileGridForProjection(projectionObj);\n        }\n        var z = tileGrid.getZForResolution(resolution, this.zDirection);\n        var tileCoord = tileGrid.getTileCoordForCoordAndZ(coordinate, z);\n        if (tileGrid.getResolutions().length <= tileCoord[0]) {\n            return undefined;\n        }\n        var tileResolution = tileGrid.getResolution(tileCoord[0]);\n        var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);\n        var tileSize = toSize(tileGrid.getTileSize(tileCoord[0]), this.tmpSize);\n        var gutter = this.gutter_;\n        if (gutter !== 0) {\n            tileSize = bufferSize(tileSize, gutter, this.tmpSize);\n            tileExtent = buffer(tileExtent, tileResolution * gutter, tileExtent);\n        }\n        if (sourceProjectionObj && sourceProjectionObj !== projectionObj) {\n            tileResolution = calculateSourceResolution(sourceProjectionObj, projectionObj, coordinate, tileResolution);\n            tileExtent = transformExtent(tileExtent, projectionObj, sourceProjectionObj);\n            coordinate = transform(coordinate, projectionObj, sourceProjectionObj);\n        }\n        var baseParams = {\n            'SERVICE': 'WMS',\n            'VERSION': DEFAULT_WMS_VERSION,\n            'REQUEST': 'GetFeatureInfo',\n            'FORMAT': 'image/png',\n            'TRANSPARENT': true,\n            'QUERY_LAYERS': this.params_['LAYERS'],\n        };\n        assign(baseParams, this.params_, params);\n        var x = Math.floor((coordinate[0] - tileExtent[0]) / tileResolution);\n        var y = Math.floor((tileExtent[3] - coordinate[1]) / tileResolution);\n        baseParams[this.v13_ ? 'I' : 'X'] = x;\n        baseParams[this.v13_ ? 'J' : 'Y'] = y;\n        return this.getRequestUrl_(tileCoord, tileSize, tileExtent, 1, sourceProjectionObj || projectionObj, baseParams);\n    };\n    /**\n     * Return the GetLegendGraphic URL, optionally optimized for the passed\n     * resolution and possibly including any passed specific parameters. Returns\n     * `undefined` if the GetLegendGraphic URL cannot be constructed.\n     *\n     * @param {number} [resolution] Resolution. If set to undefined, `SCALE`\n     *     will not be calculated and included in URL.\n     * @param {Object} [params] GetLegendGraphic params. If `LAYER` is set, the\n     *     request is generated for this wms layer, else it will try to use the\n     *     configured wms layer. Default `FORMAT` is `image/png`.\n     *     `VERSION` should not be specified here.\n     * @return {string|undefined} GetLegendGraphic URL.\n     * @api\n     */\n    TileWMS.prototype.getLegendUrl = function (resolution, params) {\n        if (this.urls[0] === undefined) {\n            return undefined;\n        }\n        var baseParams = {\n            'SERVICE': 'WMS',\n            'VERSION': DEFAULT_WMS_VERSION,\n            'REQUEST': 'GetLegendGraphic',\n            'FORMAT': 'image/png',\n        };\n        if (params === undefined || params['LAYER'] === undefined) {\n            var layers = this.params_.LAYERS;\n            var isSingleLayer = !Array.isArray(layers) || layers.length === 1;\n            if (!isSingleLayer) {\n                return undefined;\n            }\n            baseParams['LAYER'] = layers;\n        }\n        if (resolution !== undefined) {\n            var mpu = this.getProjection()\n                ? this.getProjection().getMetersPerUnit()\n                : 1;\n            var pixelSize = 0.00028;\n            baseParams['SCALE'] = (resolution * mpu) / pixelSize;\n        }\n        assign(baseParams, params);\n        return appendParams(/** @type {string} */ (this.urls[0]), baseParams);\n    };\n    /**\n     * @return {number} Gutter.\n     */\n    TileWMS.prototype.getGutter = function () {\n        return this.gutter_;\n    };\n    /**\n     * Get the user-provided params, i.e. those passed to the constructor through\n     * the \"params\" option, and possibly updated using the updateParams method.\n     * @return {Object} Params.\n     * @api\n     */\n    TileWMS.prototype.getParams = function () {\n        return this.params_;\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../size.js\").Size} tileSize Tile size.\n     * @param {import(\"../extent.js\").Extent} tileExtent Tile extent.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @param {Object} params Params.\n     * @return {string|undefined} Request URL.\n     * @private\n     */\n    TileWMS.prototype.getRequestUrl_ = function (tileCoord, tileSize, tileExtent, pixelRatio, projection, params) {\n        var urls = this.urls;\n        if (!urls) {\n            return undefined;\n        }\n        params['WIDTH'] = tileSize[0];\n        params['HEIGHT'] = tileSize[1];\n        params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();\n        if (!('STYLES' in this.params_)) {\n            params['STYLES'] = '';\n        }\n        if (pixelRatio != 1) {\n            switch (this.serverType_) {\n                case WMSServerType.GEOSERVER:\n                    var dpi = (90 * pixelRatio + 0.5) | 0;\n                    if ('FORMAT_OPTIONS' in params) {\n                        params['FORMAT_OPTIONS'] += ';dpi:' + dpi;\n                    }\n                    else {\n                        params['FORMAT_OPTIONS'] = 'dpi:' + dpi;\n                    }\n                    break;\n                case WMSServerType.MAPSERVER:\n                    params['MAP_RESOLUTION'] = 90 * pixelRatio;\n                    break;\n                case WMSServerType.CARMENTA_SERVER:\n                case WMSServerType.QGIS:\n                    params['DPI'] = 90 * pixelRatio;\n                    break;\n                default:\n                    assert(false, 52); // Unknown `serverType` configured\n                    break;\n            }\n        }\n        var axisOrientation = projection.getAxisOrientation();\n        var bbox = tileExtent;\n        if (this.v13_ && axisOrientation.substr(0, 2) == 'ne') {\n            var tmp = void 0;\n            tmp = tileExtent[0];\n            bbox[0] = tileExtent[1];\n            bbox[1] = tmp;\n            tmp = tileExtent[2];\n            bbox[2] = tileExtent[3];\n            bbox[3] = tmp;\n        }\n        params['BBOX'] = bbox.join(',');\n        var url;\n        if (urls.length == 1) {\n            url = urls[0];\n        }\n        else {\n            var index = modulo(tileCoordHash(tileCoord), urls.length);\n            url = urls[index];\n        }\n        return appendParams(url, params);\n    };\n    /**\n     * Get the tile pixel ratio for this source.\n     * @param {number} pixelRatio Pixel ratio.\n     * @return {number} Tile pixel ratio.\n     */\n    TileWMS.prototype.getTilePixelRatio = function (pixelRatio) {\n        return !this.hidpi_ || this.serverType_ === undefined ? 1 : pixelRatio;\n    };\n    /**\n     * @private\n     * @return {string} The key for the current params.\n     */\n    TileWMS.prototype.getKeyForParams_ = function () {\n        var i = 0;\n        var res = [];\n        for (var key in this.params_) {\n            res[i++] = key + '-' + this.params_[key];\n        }\n        return res.join('/');\n    };\n    /**\n     * Update the user-provided params.\n     * @param {Object} params Params.\n     * @api\n     */\n    TileWMS.prototype.updateParams = function (params) {\n        assign(this.params_, params);\n        this.updateV13_();\n        this.setKey(this.getKeyForParams_());\n    };\n    /**\n     * @private\n     */\n    TileWMS.prototype.updateV13_ = function () {\n        var version = this.params_['VERSION'] || DEFAULT_WMS_VERSION;\n        this.v13_ = compareVersions(version, '1.3') >= 0;\n    };\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord The tile coordinate\n     * @param {number} pixelRatio The pixel ratio\n     * @param {import(\"../proj/Projection.js\").default} projection The projection\n     * @return {string|undefined} The tile URL\n     * @override\n     */\n    TileWMS.prototype.tileUrlFunction = function (tileCoord, pixelRatio, projection) {\n        var tileGrid = this.getTileGrid();\n        if (!tileGrid) {\n            tileGrid = this.getTileGridForProjection(projection);\n        }\n        if (tileGrid.getResolutions().length <= tileCoord[0]) {\n            return undefined;\n        }\n        if (pixelRatio != 1 && (!this.hidpi_ || this.serverType_ === undefined)) {\n            pixelRatio = 1;\n        }\n        var tileResolution = tileGrid.getResolution(tileCoord[0]);\n        var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);\n        var tileSize = toSize(tileGrid.getTileSize(tileCoord[0]), this.tmpSize);\n        var gutter = this.gutter_;\n        if (gutter !== 0) {\n            tileSize = bufferSize(tileSize, gutter, this.tmpSize);\n            tileExtent = buffer(tileExtent, tileResolution * gutter, tileExtent);\n        }\n        if (pixelRatio != 1) {\n            tileSize = scaleSize(tileSize, pixelRatio, this.tmpSize);\n        }\n        var baseParams = {\n            'SERVICE': 'WMS',\n            'VERSION': DEFAULT_WMS_VERSION,\n            'REQUEST': 'GetMap',\n            'FORMAT': 'image/png',\n            'TRANSPARENT': true,\n        };\n        assign(baseParams, this.params_);\n        return this.getRequestUrl_(tileCoord, tileSize, tileExtent, pixelRatio, projection, baseParams);\n    };\n    return TileWMS;\n}(TileImage));\nexport default TileWMS;\n//# sourceMappingURL=TileWMS.js.map","/**\n * @module ol/source/UTFGrid\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport EventType from '../events/EventType.js';\nimport SourceState from './State.js';\nimport Tile from '../Tile.js';\nimport TileSource from './Tile.js';\nimport TileState from '../TileState.js';\nimport { applyTransform, intersects } from '../extent.js';\nimport { assert } from '../asserts.js';\nimport { createFromTemplates, nullTileUrlFunction } from '../tileurlfunction.js';\nimport { createXYZ, extentFromProjection } from '../tilegrid.js';\nimport { getKeyZXY } from '../tilecoord.js';\nimport { get as getProjection, getTransformFromProjections } from '../proj.js';\nimport { listenOnce } from '../events.js';\nimport { jsonp as requestJSONP } from '../net.js';\n/**\n * @typedef {Object} UTFGridJSON\n * @property {Array<string>} grid The grid.\n * @property {Array<string>} keys The keys.\n * @property {Object<string, Object>} [data] Optional data.\n */\nvar CustomTile = /** @class */ (function (_super) {\n    __extends(CustomTile, _super);\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {import(\"../TileState.js\").default} state State.\n     * @param {string} src Image source URI.\n     * @param {import(\"../extent.js\").Extent} extent Extent of the tile.\n     * @param {boolean} preemptive Load the tile when visible (before it's needed).\n     * @param {boolean} jsonp Load the tile as a script.\n     */\n    function CustomTile(tileCoord, state, src, extent, preemptive, jsonp) {\n        var _this = _super.call(this, tileCoord, state) || this;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.src_ = src;\n        /**\n         * @private\n         * @type {import(\"../extent.js\").Extent}\n         */\n        _this.extent_ = extent;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.preemptive_ = preemptive;\n        /**\n         * @private\n         * @type {Array<string>}\n         */\n        _this.grid_ = null;\n        /**\n         * @private\n         * @type {Array<string>}\n         */\n        _this.keys_ = null;\n        /**\n         * @private\n         * @type {Object<string, Object>|undefined}\n         */\n        _this.data_ = null;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.jsonp_ = jsonp;\n        return _this;\n    }\n    /**\n     * Get the image element for this tile.\n     * @return {HTMLImageElement} Image.\n     */\n    CustomTile.prototype.getImage = function () {\n        return null;\n    };\n    /**\n     * Synchronously returns data at given coordinate (if available).\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @return {*} The data.\n     */\n    CustomTile.prototype.getData = function (coordinate) {\n        if (!this.grid_ || !this.keys_) {\n            return null;\n        }\n        var xRelative = (coordinate[0] - this.extent_[0]) / (this.extent_[2] - this.extent_[0]);\n        var yRelative = (coordinate[1] - this.extent_[1]) / (this.extent_[3] - this.extent_[1]);\n        var row = this.grid_[Math.floor((1 - yRelative) * this.grid_.length)];\n        if (typeof row !== 'string') {\n            return null;\n        }\n        var code = row.charCodeAt(Math.floor(xRelative * row.length));\n        if (code >= 93) {\n            code--;\n        }\n        if (code >= 35) {\n            code--;\n        }\n        code -= 32;\n        var data = null;\n        if (code in this.keys_) {\n            var id = this.keys_[code];\n            if (this.data_ && id in this.data_) {\n                data = this.data_[id];\n            }\n            else {\n                data = id;\n            }\n        }\n        return data;\n    };\n    /**\n     * Calls the callback (synchronously by default) with the available data\n     * for given coordinate (or `null` if not yet loaded).\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {function(*): void} callback Callback.\n     * @param {boolean} [opt_request] If `true` the callback is always async.\n     *                               The tile data is requested if not yet loaded.\n     */\n    CustomTile.prototype.forDataAtCoordinate = function (coordinate, callback, opt_request) {\n        if (this.state == TileState.EMPTY && opt_request === true) {\n            this.state = TileState.IDLE;\n            listenOnce(this, EventType.CHANGE, function (e) {\n                callback(this.getData(coordinate));\n            }, this);\n            this.loadInternal_();\n        }\n        else {\n            if (opt_request === true) {\n                setTimeout(function () {\n                    callback(this.getData(coordinate));\n                }.bind(this), 0);\n            }\n            else {\n                callback(this.getData(coordinate));\n            }\n        }\n    };\n    /**\n     * Return the key to be used for all tiles in the source.\n     * @return {string} The key for all tiles.\n     */\n    CustomTile.prototype.getKey = function () {\n        return this.src_;\n    };\n    /**\n     * @private\n     */\n    CustomTile.prototype.handleError_ = function () {\n        this.state = TileState.ERROR;\n        this.changed();\n    };\n    /**\n     * @param {!UTFGridJSON} json UTFGrid data.\n     * @private\n     */\n    CustomTile.prototype.handleLoad_ = function (json) {\n        this.grid_ = json['grid'];\n        this.keys_ = json['keys'];\n        this.data_ = json['data'];\n        this.state = TileState.LOADED;\n        this.changed();\n    };\n    /**\n     * @private\n     */\n    CustomTile.prototype.loadInternal_ = function () {\n        if (this.state == TileState.IDLE) {\n            this.state = TileState.LOADING;\n            if (this.jsonp_) {\n                requestJSONP(this.src_, this.handleLoad_.bind(this), this.handleError_.bind(this));\n            }\n            else {\n                var client = new XMLHttpRequest();\n                client.addEventListener('load', this.onXHRLoad_.bind(this));\n                client.addEventListener('error', this.onXHRError_.bind(this));\n                client.open('GET', this.src_);\n                client.send();\n            }\n        }\n    };\n    /**\n     * @private\n     * @param {Event} event The load event.\n     */\n    CustomTile.prototype.onXHRLoad_ = function (event) {\n        var client = /** @type {XMLHttpRequest} */ (event.target);\n        // status will be 0 for file:// urls\n        if (!client.status || (client.status >= 200 && client.status < 300)) {\n            var response = void 0;\n            try {\n                response = /** @type {!UTFGridJSON} */ (JSON.parse(client.responseText));\n            }\n            catch (err) {\n                this.handleError_();\n                return;\n            }\n            this.handleLoad_(response);\n        }\n        else {\n            this.handleError_();\n        }\n    };\n    /**\n     * @private\n     * @param {Event} event The error event.\n     */\n    CustomTile.prototype.onXHRError_ = function (event) {\n        this.handleError_();\n    };\n    /**\n     */\n    CustomTile.prototype.load = function () {\n        if (this.preemptive_) {\n            this.loadInternal_();\n        }\n        else {\n            this.setState(TileState.EMPTY);\n        }\n    };\n    return CustomTile;\n}(Tile));\nexport { CustomTile };\n/**\n * @typedef {Object} Options\n * @property {boolean} [preemptive=true]\n * If `true` the UTFGrid source loads the tiles based on their \"visibility\".\n * This improves the speed of response, but increases traffic.\n * Note that if set to `false` (lazy loading), you need to pass `true` as\n * `opt_request` to the `forDataAtCoordinateAndResolution` method otherwise no\n * data will ever be loaded.\n * @property {boolean} [jsonp=false] Use JSONP with callback to load the TileJSON.\n * Useful when the server does not support CORS..\n * @property {import(\"./TileJSON.js\").Config} [tileJSON] TileJSON configuration for this source.\n * If not provided, `url` must be configured.\n * @property {string} [url] TileJSON endpoint that provides the configuration for this source.\n * Request will be made through JSONP. If not provided, `tileJSON` must be configured.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n/**\n * @classdesc\n * Layer source for UTFGrid interaction data loaded from TileJSON format.\n * @api\n */\nvar UTFGrid = /** @class */ (function (_super) {\n    __extends(UTFGrid, _super);\n    /**\n     * @param {Options} options Source options.\n     */\n    function UTFGrid(options) {\n        var _this = _super.call(this, {\n            projection: getProjection('EPSG:3857'),\n            state: SourceState.LOADING,\n            zDirection: options.zDirection,\n        }) || this;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.preemptive_ =\n            options.preemptive !== undefined ? options.preemptive : true;\n        /**\n         * @private\n         * @type {!import(\"../Tile.js\").UrlFunction}\n         */\n        _this.tileUrlFunction_ = nullTileUrlFunction;\n        /**\n         * @private\n         * @type {string|undefined}\n         */\n        _this.template_ = undefined;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.jsonp_ = options.jsonp || false;\n        if (options.url) {\n            if (_this.jsonp_) {\n                requestJSONP(options.url, _this.handleTileJSONResponse.bind(_this), _this.handleTileJSONError.bind(_this));\n            }\n            else {\n                var client = new XMLHttpRequest();\n                client.addEventListener('load', _this.onXHRLoad_.bind(_this));\n                client.addEventListener('error', _this.onXHRError_.bind(_this));\n                client.open('GET', options.url);\n                client.send();\n            }\n        }\n        else if (options.tileJSON) {\n            _this.handleTileJSONResponse(options.tileJSON);\n        }\n        else {\n            assert(false, 51); // Either `url` or `tileJSON` options must be provided\n        }\n        return _this;\n    }\n    /**\n     * @private\n     * @param {Event} event The load event.\n     */\n    UTFGrid.prototype.onXHRLoad_ = function (event) {\n        var client = /** @type {XMLHttpRequest} */ (event.target);\n        // status will be 0 for file:// urls\n        if (!client.status || (client.status >= 200 && client.status < 300)) {\n            var response = void 0;\n            try {\n                response = /** @type {import(\"./TileJSON.js\").Config} */ (JSON.parse(client.responseText));\n            }\n            catch (err) {\n                this.handleTileJSONError();\n                return;\n            }\n            this.handleTileJSONResponse(response);\n        }\n        else {\n            this.handleTileJSONError();\n        }\n    };\n    /**\n     * @private\n     * @param {Event} event The error event.\n     */\n    UTFGrid.prototype.onXHRError_ = function (event) {\n        this.handleTileJSONError();\n    };\n    /**\n     * Return the template from TileJSON.\n     * @return {string|undefined} The template from TileJSON.\n     * @api\n     */\n    UTFGrid.prototype.getTemplate = function () {\n        return this.template_;\n    };\n    /**\n     * Calls the callback (synchronously by default) with the available data\n     * for given coordinate and resolution (or `null` if not yet loaded or\n     * in case of an error).\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {number} resolution Resolution.\n     * @param {function(*): void} callback Callback.\n     * @param {boolean} [opt_request] If `true` the callback is always async.\n     *                               The tile data is requested if not yet loaded.\n     * @api\n     */\n    UTFGrid.prototype.forDataAtCoordinateAndResolution = function (coordinate, resolution, callback, opt_request) {\n        if (this.tileGrid) {\n            var z = this.tileGrid.getZForResolution(resolution, this.zDirection);\n            var tileCoord = this.tileGrid.getTileCoordForCoordAndZ(coordinate, z);\n            var tile = /** @type {!CustomTile} */ (this.getTile(tileCoord[0], tileCoord[1], tileCoord[2], 1, this.getProjection()));\n            tile.forDataAtCoordinate(coordinate, callback, opt_request);\n        }\n        else {\n            if (opt_request === true) {\n                setTimeout(function () {\n                    callback(null);\n                }, 0);\n            }\n            else {\n                callback(null);\n            }\n        }\n    };\n    /**\n     * @protected\n     */\n    UTFGrid.prototype.handleTileJSONError = function () {\n        this.setState(SourceState.ERROR);\n    };\n    /**\n     * TODO: very similar to ol/source/TileJSON#handleTileJSONResponse\n     * @protected\n     * @param {import(\"./TileJSON.js\").Config} tileJSON Tile JSON.\n     */\n    UTFGrid.prototype.handleTileJSONResponse = function (tileJSON) {\n        var epsg4326Projection = getProjection('EPSG:4326');\n        var sourceProjection = this.getProjection();\n        var extent;\n        if (tileJSON['bounds'] !== undefined) {\n            var transform = getTransformFromProjections(epsg4326Projection, sourceProjection);\n            extent = applyTransform(tileJSON['bounds'], transform);\n        }\n        var gridExtent = extentFromProjection(sourceProjection);\n        var minZoom = tileJSON['minzoom'] || 0;\n        var maxZoom = tileJSON['maxzoom'] || 22;\n        var tileGrid = createXYZ({\n            extent: gridExtent,\n            maxZoom: maxZoom,\n            minZoom: minZoom,\n        });\n        this.tileGrid = tileGrid;\n        this.template_ = tileJSON['template'];\n        var grids = tileJSON['grids'];\n        if (!grids) {\n            this.setState(SourceState.ERROR);\n            return;\n        }\n        this.tileUrlFunction_ = createFromTemplates(grids, tileGrid);\n        if (tileJSON['attribution'] !== undefined) {\n            var attributionExtent_1 = extent !== undefined ? extent : gridExtent;\n            this.setAttributions(function (frameState) {\n                if (intersects(attributionExtent_1, frameState.extent)) {\n                    return [tileJSON['attribution']];\n                }\n                return null;\n            });\n        }\n        this.setState(SourceState.READY);\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {!CustomTile} Tile.\n     */\n    UTFGrid.prototype.getTile = function (z, x, y, pixelRatio, projection) {\n        var tileCoordKey = getKeyZXY(z, x, y);\n        if (this.tileCache.containsKey(tileCoordKey)) {\n            return this.tileCache.get(tileCoordKey);\n        }\n        else {\n            var tileCoord = [z, x, y];\n            var urlTileCoord = this.getTileCoordForTileUrlFunction(tileCoord, projection);\n            var tileUrl = this.tileUrlFunction_(urlTileCoord, pixelRatio, projection);\n            var tile = new CustomTile(tileCoord, tileUrl !== undefined ? TileState.IDLE : TileState.EMPTY, tileUrl !== undefined ? tileUrl : '', this.tileGrid.getTileCoordExtent(tileCoord), this.preemptive_, this.jsonp_);\n            this.tileCache.set(tileCoordKey, tile);\n            return tile;\n        }\n    };\n    /**\n     * Marks a tile coord as being used, without triggering a load.\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     */\n    UTFGrid.prototype.useTile = function (z, x, y) {\n        var tileCoordKey = getKeyZXY(z, x, y);\n        if (this.tileCache.containsKey(tileCoordKey)) {\n            this.tileCache.get(tileCoordKey);\n        }\n    };\n    return UTFGrid;\n}(TileSource));\nexport default UTFGrid;\n//# sourceMappingURL=UTFGrid.js.map","/**\n * @module ol/source/WMTSRequestEncoding\n */\n/**\n * Request encoding. One of 'KVP', 'REST'.\n * @enum {string}\n */\nexport default {\n    KVP: 'KVP',\n    REST: 'REST', // see spec §10\n};\n//# sourceMappingURL=WMTSRequestEncoding.js.map","/**\n * @module ol/tilegrid/WMTS\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport TileGrid from './TileGrid.js';\nimport { find } from '../array.js';\nimport { get as getProjection } from '../proj.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the tile grid. No tiles\n * outside this extent will be requested by {@link module:ol/source/Tile} sources.\n * When no `origin` or `origins` are configured, the `origin` will be set to the\n * top-left corner of the extent.\n * @property {import(\"../coordinate.js\").Coordinate} [origin] The tile grid origin, i.e.\n * where the `x` and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left\n * to right and downwards. If not specified, `extent` or `origins` must be provided.\n * @property {Array<import(\"../coordinate.js\").Coordinate>} [origins] Tile grid origins,\n * i.e. where the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If\n * given, the array length should match the length of the `resolutions` array, i.e.\n * each resolution can have a different origin. Tile coordinates increase left to\n * right and downwards. If not specified, `extent` or `origin` must be provided.\n * @property {!Array<number>} resolutions Resolutions. The array index of each\n * resolution needs to match the zoom level. This means that even if a `minZoom`\n * is configured, the resolutions array will have a length of `maxZoom + 1`\n * @property {!Array<string>} matrixIds matrix IDs. The length of this array needs\n * to match the length of the `resolutions` array.\n * @property {Array<import(\"../size.js\").Size>} [sizes] Number of tile rows and columns\n * of the grid for each zoom level. The values here are the `TileMatrixWidth` and\n * `TileMatrixHeight` advertised in the GetCapabilities response of the WMTS, and\n * define each zoom level's extent together with the `origin` or `origins`.\n * A grid `extent` can be configured in addition, and will further limit the extent for\n * which tile requests are made by sources. If the bottom-left corner of\n * an extent is used as `origin` or `origins`, then the `y` value must be\n * negative because OpenLayers tile coordinates use the top left as the origin.\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * @property {Array<import(\"../size.js\").Size>} [tileSizes] Tile sizes. The length of\n * this array needs to match the length of the `resolutions` array.\n */\n/**\n * @classdesc\n * Set the grid pattern for sources accessing WMTS tiled-image servers.\n * @api\n */\nvar WMTSTileGrid = /** @class */ (function (_super) {\n    __extends(WMTSTileGrid, _super);\n    /**\n     * @param {Options} options WMTS options.\n     */\n    function WMTSTileGrid(options) {\n        var _this = _super.call(this, {\n            extent: options.extent,\n            origin: options.origin,\n            origins: options.origins,\n            resolutions: options.resolutions,\n            tileSize: options.tileSize,\n            tileSizes: options.tileSizes,\n            sizes: options.sizes,\n        }) || this;\n        /**\n         * @private\n         * @type {!Array<string>}\n         */\n        _this.matrixIds_ = options.matrixIds;\n        return _this;\n    }\n    /**\n     * @param {number} z Z.\n     * @return {string} MatrixId..\n     */\n    WMTSTileGrid.prototype.getMatrixId = function (z) {\n        return this.matrixIds_[z];\n    };\n    /**\n     * Get the list of matrix identifiers.\n     * @return {Array<string>} MatrixIds.\n     * @api\n     */\n    WMTSTileGrid.prototype.getMatrixIds = function () {\n        return this.matrixIds_;\n    };\n    return WMTSTileGrid;\n}(TileGrid));\nexport default WMTSTileGrid;\n/**\n * Create a tile grid from a WMTS capabilities matrix set and an\n * optional TileMatrixSetLimits.\n * @param {Object} matrixSet An object representing a matrixSet in the\n *     capabilities document.\n * @param {import(\"../extent.js\").Extent} [opt_extent] An optional extent to restrict the tile\n *     ranges the server provides.\n * @param {Array<Object>} [opt_matrixLimits] An optional object representing\n *     the available matrices for tileGrid.\n * @return {WMTSTileGrid} WMTS tileGrid instance.\n * @api\n */\nexport function createFromCapabilitiesMatrixSet(matrixSet, opt_extent, opt_matrixLimits) {\n    /** @type {!Array<number>} */\n    var resolutions = [];\n    /** @type {!Array<string>} */\n    var matrixIds = [];\n    /** @type {!Array<import(\"../coordinate.js\").Coordinate>} */\n    var origins = [];\n    /** @type {!Array<import(\"../size.js\").Size>} */\n    var tileSizes = [];\n    /** @type {!Array<import(\"../size.js\").Size>} */\n    var sizes = [];\n    var matrixLimits = opt_matrixLimits !== undefined ? opt_matrixLimits : [];\n    var supportedCRSPropName = 'SupportedCRS';\n    var matrixIdsPropName = 'TileMatrix';\n    var identifierPropName = 'Identifier';\n    var scaleDenominatorPropName = 'ScaleDenominator';\n    var topLeftCornerPropName = 'TopLeftCorner';\n    var tileWidthPropName = 'TileWidth';\n    var tileHeightPropName = 'TileHeight';\n    var code = matrixSet[supportedCRSPropName];\n    var projection = getProjection(code);\n    var metersPerUnit = projection.getMetersPerUnit();\n    // swap origin x and y coordinates if axis orientation is lat/long\n    var switchOriginXY = projection.getAxisOrientation().substr(0, 2) == 'ne';\n    matrixSet[matrixIdsPropName].sort(function (a, b) {\n        return b[scaleDenominatorPropName] - a[scaleDenominatorPropName];\n    });\n    matrixSet[matrixIdsPropName].forEach(function (elt) {\n        var matrixAvailable;\n        // use of matrixLimits to filter TileMatrices from GetCapabilities\n        // TileMatrixSet from unavailable matrix levels.\n        if (matrixLimits.length > 0) {\n            matrixAvailable = find(matrixLimits, function (elt_ml) {\n                if (elt[identifierPropName] == elt_ml[matrixIdsPropName]) {\n                    return true;\n                }\n                // Fallback for tileMatrix identifiers that don't get prefixed\n                // by their tileMatrixSet identifiers.\n                if (elt[identifierPropName].indexOf(':') === -1) {\n                    return (matrixSet[identifierPropName] + ':' + elt[identifierPropName] ===\n                        elt_ml[matrixIdsPropName]);\n                }\n                return false;\n            });\n        }\n        else {\n            matrixAvailable = true;\n        }\n        if (matrixAvailable) {\n            matrixIds.push(elt[identifierPropName]);\n            var resolution = (elt[scaleDenominatorPropName] * 0.28e-3) / metersPerUnit;\n            var tileWidth = elt[tileWidthPropName];\n            var tileHeight = elt[tileHeightPropName];\n            if (switchOriginXY) {\n                origins.push([\n                    elt[topLeftCornerPropName][1],\n                    elt[topLeftCornerPropName][0],\n                ]);\n            }\n            else {\n                origins.push(elt[topLeftCornerPropName]);\n            }\n            resolutions.push(resolution);\n            tileSizes.push(tileWidth == tileHeight ? tileWidth : [tileWidth, tileHeight]);\n            sizes.push([elt['MatrixWidth'], elt['MatrixHeight']]);\n        }\n    });\n    return new WMTSTileGrid({\n        extent: opt_extent,\n        origins: origins,\n        resolutions: resolutions,\n        matrixIds: matrixIds,\n        tileSizes: tileSizes,\n        sizes: sizes,\n    });\n}\n//# sourceMappingURL=WMTS.js.map","/**\n * @module ol/source/WMTS\n */\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nimport TileImage from './TileImage.js';\nimport WMTSRequestEncoding from './WMTSRequestEncoding.js';\nimport { appendParams } from '../uri.js';\nimport { assign } from '../obj.js';\nimport { containsExtent } from '../extent.js';\nimport { createFromCapabilitiesMatrixSet } from '../tilegrid/WMTS.js';\nimport { createFromTileUrlFunctions, expandUrl } from '../tileurlfunction.js';\nimport { equivalent, get as getProjection, transformExtent } from '../proj.js';\nimport { find, findIndex, includes } from '../array.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [imageSmoothing=true] Enable image smoothing.\n * @property {import(\"../tilegrid/WMTS.js\").default} tileGrid Tile grid.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"./WMTSRequestEncoding.js\").default|string} [requestEncoding='KVP'] Request encoding.\n * @property {string} layer Layer name as advertised in the WMTS capabilities.\n * @property {string} style Style name as advertised in the WMTS capabilities.\n * @property {typeof import(\"../ImageTile.js\").default} [tileClass]  Class used to instantiate image tiles. Default is {@link module:ol/ImageTile~ImageTile}.\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service.\n * For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {string} [format='image/jpeg'] Image format. Only used when `requestEncoding` is `'KVP'`.\n * @property {string} [version='1.0.0'] WMTS version.\n * @property {string} matrixSet Matrix set.\n * @property {!Object} [dimensions] Additional \"dimensions\" for tile requests.\n * This is an object with properties named like the advertised WMTS dimensions.\n * @property {string} [url]  A URL for the service.\n * For the RESTful request encoding, this is a URL\n * template.  For KVP encoding, it is normal URL. A `{?-?}` template pattern,\n * for example `subdomain{a-f}.domain.com`, may be used instead of defining\n * each one separately in the `urls` option.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {Array<string>} [urls] An array of URLs.\n * Requests will be distributed among the URLs in this array.\n * @property {boolean} [wrapX=false] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number|import(\"../array.js\").NearestDirectionFunction} [zDirection=0]\n * Choose whether to use tiles with a higher or lower zoom level when between integer\n * zoom levels. See {@link module:ol/tilegrid/TileGrid~TileGrid#getZForResolution}.\n */\n/**\n * @classdesc\n * Layer source for tile data from WMTS servers.\n * @api\n */\nvar WMTS = /** @class */ (function (_super) {\n    __extends(WMTS, _super);\n    /**\n     * @param {Options} options WMTS options.\n     */\n    function WMTS(options) {\n        // TODO: add support for TileMatrixLimits\n        var _this = this;\n        var requestEncoding = options.requestEncoding !== undefined\n            ? /** @type {import(\"./WMTSRequestEncoding.js\").default} */ (options.requestEncoding)\n            : WMTSRequestEncoding.KVP;\n        // FIXME: should we create a default tileGrid?\n        // we could issue a getCapabilities xhr to retrieve missing configuration\n        var tileGrid = options.tileGrid;\n        var urls = options.urls;\n        if (urls === undefined && options.url !== undefined) {\n            urls = expandUrl(options.url);\n        }\n        _this = _super.call(this, {\n            attributions: options.attributions,\n            attributionsCollapsible: options.attributionsCollapsible,\n            cacheSize: options.cacheSize,\n            crossOrigin: options.crossOrigin,\n            imageSmoothing: options.imageSmoothing,\n            projection: options.projection,\n            reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n            tileClass: options.tileClass,\n            tileGrid: tileGrid,\n            tileLoadFunction: options.tileLoadFunction,\n            tilePixelRatio: options.tilePixelRatio,\n            urls: urls,\n            wrapX: options.wrapX !== undefined ? options.wrapX : false,\n            transition: options.transition,\n            zDirection: options.zDirection,\n        }) || this;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.version_ = options.version !== undefined ? options.version : '1.0.0';\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.format_ = options.format !== undefined ? options.format : 'image/jpeg';\n        /**\n         * @private\n         * @type {!Object}\n         */\n        _this.dimensions_ =\n            options.dimensions !== undefined ? options.dimensions : {};\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.layer_ = options.layer;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.matrixSet_ = options.matrixSet;\n        /**\n         * @private\n         * @type {string}\n         */\n        _this.style_ = options.style;\n        // FIXME: should we guess this requestEncoding from options.url(s)\n        //        structure? that would mean KVP only if a template is not provided.\n        /**\n         * @private\n         * @type {import(\"./WMTSRequestEncoding.js\").default}\n         */\n        _this.requestEncoding_ = requestEncoding;\n        _this.setKey(_this.getKeyForDimensions_());\n        if (urls && urls.length > 0) {\n            _this.tileUrlFunction = createFromTileUrlFunctions(urls.map(_this.createFromWMTSTemplate.bind(_this)));\n        }\n        return _this;\n    }\n    /**\n     * Set the URLs to use for requests.\n     * URLs may contain OGC conform URL Template Variables: {TileMatrix}, {TileRow}, {TileCol}.\n     * @param {Array<string>} urls URLs.\n     */\n    WMTS.prototype.setUrls = function (urls) {\n        this.urls = urls;\n        var key = urls.join('\\n');\n        this.setTileUrlFunction(createFromTileUrlFunctions(urls.map(this.createFromWMTSTemplate.bind(this))), key);\n    };\n    /**\n     * Get the dimensions, i.e. those passed to the constructor through the\n     * \"dimensions\" option, and possibly updated using the updateDimensions\n     * method.\n     * @return {!Object} Dimensions.\n     * @api\n     */\n    WMTS.prototype.getDimensions = function () {\n        return this.dimensions_;\n    };\n    /**\n     * Return the image format of the WMTS source.\n     * @return {string} Format.\n     * @api\n     */\n    WMTS.prototype.getFormat = function () {\n        return this.format_;\n    };\n    /**\n     * Return the layer of the WMTS source.\n     * @return {string} Layer.\n     * @api\n     */\n    WMTS.prototype.getLayer = function () {\n        return this.layer_;\n    };\n    /**\n     * Return the matrix set of the WMTS source.\n     * @return {string} MatrixSet.\n     * @api\n     */\n    WMTS.prototype.getMatrixSet = function () {\n        return this.matrixSet_;\n    };\n    /**\n     * Return the request encoding, either \"KVP\" or \"REST\".\n     * @return {import(\"./WMTSRequestEncoding.js\").default} Request encoding.\n     * @api\n     */\n    WMTS.prototype.getRequestEncoding = function () {\n        return this.requestEncoding_;\n    };\n    /**\n     * Return the style of the WMTS source.\n     * @return {string} Style.\n     * @api\n     */\n    WMTS.prototype.getStyle = function () {\n        return this.style_;\n    };\n    /**\n     * Return the version of the WMTS source.\n     * @return {string} Version.\n     * @api\n     */\n    WMTS.prototype.getVersion = function () {\n        return this.version_;\n    };\n    /**\n     * @private\n     * @return {string} The key for the current dimensions.\n     */\n    WMTS.prototype.getKeyForDimensions_ = function () {\n        var i = 0;\n        var res = [];\n        for (var key in this.dimensions_) {\n            res[i++] = key + '-' + this.dimensions_[key];\n        }\n        return res.join('/');\n    };\n    /**\n     * Update the dimensions.\n     * @param {Object} dimensions Dimensions.\n     * @api\n     */\n    WMTS.prototype.updateDimensions = function (dimensions) {\n        assign(this.dimensions_, dimensions);\n        this.setKey(this.getKeyForDimensions_());\n    };\n    /**\n     * @param {string} template Template.\n     * @return {import(\"../Tile.js\").UrlFunction} Tile URL function.\n     */\n    WMTS.prototype.createFromWMTSTemplate = function (template) {\n        var requestEncoding = this.requestEncoding_;\n        // context property names are lower case to allow for a case insensitive\n        // replacement as some services use different naming conventions\n        var context = {\n            'layer': this.layer_,\n            'style': this.style_,\n            'tilematrixset': this.matrixSet_,\n        };\n        if (requestEncoding == WMTSRequestEncoding.KVP) {\n            assign(context, {\n                'Service': 'WMTS',\n                'Request': 'GetTile',\n                'Version': this.version_,\n                'Format': this.format_,\n            });\n        }\n        // TODO: we may want to create our own appendParams function so that params\n        // order conforms to wmts spec guidance, and so that we can avoid to escape\n        // special template params\n        template =\n            requestEncoding == WMTSRequestEncoding.KVP\n                ? appendParams(template, context)\n                : template.replace(/\\{(\\w+?)\\}/g, function (m, p) {\n                    return p.toLowerCase() in context ? context[p.toLowerCase()] : m;\n                });\n        var tileGrid = /** @type {import(\"../tilegrid/WMTS.js\").default} */ (this.tileGrid);\n        var dimensions = this.dimensions_;\n        return (\n        /**\n         * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n         * @param {number} pixelRatio Pixel ratio.\n         * @param {import(\"../proj/Projection.js\").default} projection Projection.\n         * @return {string|undefined} Tile URL.\n         */\n        function (tileCoord, pixelRatio, projection) {\n            if (!tileCoord) {\n                return undefined;\n            }\n            else {\n                var localContext_1 = {\n                    'TileMatrix': tileGrid.getMatrixId(tileCoord[0]),\n                    'TileCol': tileCoord[1],\n                    'TileRow': tileCoord[2],\n                };\n                assign(localContext_1, dimensions);\n                var url = template;\n                if (requestEncoding == WMTSRequestEncoding.KVP) {\n                    url = appendParams(url, localContext_1);\n                }\n                else {\n                    url = url.replace(/\\{(\\w+?)\\}/g, function (m, p) {\n                        return localContext_1[p];\n                    });\n                }\n                return url;\n            }\n        });\n    };\n    return WMTS;\n}(TileImage));\nexport default WMTS;\n/**\n * Generate source options from a capabilities object.\n * @param {Object} wmtsCap An object representing the capabilities document.\n * @param {!Object} config Configuration properties for the layer.  Defaults for\n *                  the layer will apply if not provided.\n *\n * Required config properties:\n *  - layer - {string} The layer identifier.\n *\n * Optional config properties:\n *  - matrixSet - {string} The matrix set identifier, required if there is\n *       more than one matrix set in the layer capabilities.\n *  - projection - {string} The desired CRS when no matrixSet is specified.\n *       eg: \"EPSG:3857\". If the desired projection is not available,\n *       an error is thrown.\n *  - requestEncoding - {string} url encoding format for the layer. Default is\n *       the first tile url format found in the GetCapabilities response.\n *  - style - {string} The name of the style\n *  - format - {string} Image format for the layer. Default is the first\n *       format returned in the GetCapabilities response.\n *  - crossOrigin - {string|null|undefined} Cross origin. Default is `undefined`.\n * @return {?Options} WMTS source options object or `null` if the layer was not found.\n * @api\n */\nexport function optionsFromCapabilities(wmtsCap, config) {\n    var layers = wmtsCap['Contents']['Layer'];\n    var l = find(layers, function (elt, index, array) {\n        return elt['Identifier'] == config['layer'];\n    });\n    if (l === null) {\n        return null;\n    }\n    var tileMatrixSets = wmtsCap['Contents']['TileMatrixSet'];\n    var idx;\n    if (l['TileMatrixSetLink'].length > 1) {\n        if ('projection' in config) {\n            idx = findIndex(l['TileMatrixSetLink'], function (elt, index, array) {\n                var tileMatrixSet = find(tileMatrixSets, function (el) {\n                    return el['Identifier'] == elt['TileMatrixSet'];\n                });\n                var supportedCRS = tileMatrixSet['SupportedCRS'];\n                var proj1 = getProjection(supportedCRS);\n                var proj2 = getProjection(config['projection']);\n                if (proj1 && proj2) {\n                    return equivalent(proj1, proj2);\n                }\n                else {\n                    return supportedCRS == config['projection'];\n                }\n            });\n        }\n        else {\n            idx = findIndex(l['TileMatrixSetLink'], function (elt, index, array) {\n                return elt['TileMatrixSet'] == config['matrixSet'];\n            });\n        }\n    }\n    else {\n        idx = 0;\n    }\n    if (idx < 0) {\n        idx = 0;\n    }\n    var matrixSet = \n    /** @type {string} */\n    (l['TileMatrixSetLink'][idx]['TileMatrixSet']);\n    var matrixLimits = \n    /** @type {Array<Object>} */\n    (l['TileMatrixSetLink'][idx]['TileMatrixSetLimits']);\n    var format = /** @type {string} */ (l['Format'][0]);\n    if ('format' in config) {\n        format = config['format'];\n    }\n    idx = findIndex(l['Style'], function (elt, index, array) {\n        if ('style' in config) {\n            return elt['Title'] == config['style'];\n        }\n        else {\n            return elt['isDefault'];\n        }\n    });\n    if (idx < 0) {\n        idx = 0;\n    }\n    var style = /** @type {string} */ (l['Style'][idx]['Identifier']);\n    var dimensions = {};\n    if ('Dimension' in l) {\n        l['Dimension'].forEach(function (elt, index, array) {\n            var key = elt['Identifier'];\n            var value = elt['Default'];\n            if (value === undefined) {\n                value = elt['Value'][0];\n            }\n            dimensions[key] = value;\n        });\n    }\n    var matrixSets = wmtsCap['Contents']['TileMatrixSet'];\n    var matrixSetObj = find(matrixSets, function (elt, index, array) {\n        return elt['Identifier'] == matrixSet;\n    });\n    var projection;\n    var code = matrixSetObj['SupportedCRS'];\n    if (code) {\n        projection = getProjection(code);\n    }\n    if ('projection' in config) {\n        var projConfig = getProjection(config['projection']);\n        if (projConfig) {\n            if (!projection || equivalent(projConfig, projection)) {\n                projection = projConfig;\n            }\n        }\n    }\n    var wrapX = false;\n    var switchOriginXY = projection.getAxisOrientation().substr(0, 2) == 'ne';\n    var matrix = matrixSetObj.TileMatrix[0];\n    // create default matrixLimit\n    var selectedMatrixLimit = {\n        MinTileCol: 0,\n        MinTileRow: 0,\n        // subtract one to end up at tile top left\n        MaxTileCol: matrix.MatrixWidth - 1,\n        MaxTileRow: matrix.MatrixHeight - 1,\n    };\n    //in case of matrix limits, use matrix limits to calculate extent\n    if (matrixLimits) {\n        selectedMatrixLimit = matrixLimits[matrixLimits.length - 1];\n        var m = find(matrixSetObj.TileMatrix, function (tileMatrixValue) {\n            return tileMatrixValue.Identifier === selectedMatrixLimit.TileMatrix ||\n                matrixSetObj.Identifier + ':' + tileMatrixValue.Identifier ===\n                    selectedMatrixLimit.TileMatrix;\n        });\n        if (m) {\n            matrix = m;\n        }\n    }\n    var resolution = (matrix.ScaleDenominator * 0.00028) / projection.getMetersPerUnit(); // WMTS 1.0.0: standardized rendering pixel size\n    var origin = switchOriginXY\n        ? [matrix.TopLeftCorner[1], matrix.TopLeftCorner[0]]\n        : matrix.TopLeftCorner;\n    var tileSpanX = matrix.TileWidth * resolution;\n    var tileSpanY = matrix.TileHeight * resolution;\n    var matrixSetExtent = matrixSetObj['BoundingBox'];\n    var extent = [\n        origin[0] + tileSpanX * selectedMatrixLimit.MinTileCol,\n        // add one to get proper bottom/right coordinate\n        origin[1] - tileSpanY * (1 + selectedMatrixLimit.MaxTileRow),\n        origin[0] + tileSpanX * (1 + selectedMatrixLimit.MaxTileCol),\n        origin[1] - tileSpanY * selectedMatrixLimit.MinTileRow,\n    ];\n    if (matrixSetExtent !== undefined &&\n        !containsExtent(matrixSetExtent, extent)) {\n        var wgs84BoundingBox = l['WGS84BoundingBox'];\n        var wgs84ProjectionExtent = getProjection('EPSG:4326').getExtent();\n        extent = matrixSetExtent;\n        if (wgs84BoundingBox) {\n            wrapX =\n                wgs84BoundingBox[0] === wgs84ProjectionExtent[0] &&\n                    wgs84BoundingBox[2] === wgs84ProjectionExtent[2];\n        }\n        else {\n            var wgs84MatrixSetExtent = transformExtent(matrixSetExtent, matrixSetObj['SupportedCRS'], 'EPSG:4326');\n            // Ignore slight deviation from the correct x limits\n            wrapX =\n                wgs84MatrixSetExtent[0] - 1e-10 <= wgs84ProjectionExtent[0] &&\n                    wgs84MatrixSetExtent[2] + 1e-10 >= wgs84ProjectionExtent[2];\n        }\n    }\n    var tileGrid = createFromCapabilitiesMatrixSet(matrixSetObj, extent, matrixLimits);\n    /** @type {!Array<string>} */\n    var urls = [];\n    var requestEncoding = config['requestEncoding'];\n    requestEncoding = requestEncoding !== undefined ? requestEncoding : '';\n    if ('OperationsMetadata' in wmtsCap &&\n        'GetTile' in wmtsCap['OperationsMetadata']) {\n        var gets = wmtsCap['OperationsMetadata']['GetTile']['DCP']['HTTP']['Get'];\n        for (var i = 0, ii = gets.length; i < ii; ++i) {\n            if (gets[i]['Constraint']) {\n                var constraint = find(gets[i]['Constraint'], function (element) {\n                    return element['name'] == 'GetEncoding';\n                });\n                var encodings = constraint['AllowedValues']['Value'];\n                if (requestEncoding === '') {\n                    // requestEncoding not provided, use the first encoding from the list\n                    requestEncoding = encodings[0];\n                }\n                if (requestEncoding === WMTSRequestEncoding.KVP) {\n                    if (includes(encodings, WMTSRequestEncoding.KVP)) {\n                        urls.push(/** @type {string} */ (gets[i]['href']));\n                    }\n                }\n                else {\n                    break;\n                }\n            }\n            else if (gets[i]['href']) {\n                requestEncoding = WMTSRequestEncoding.KVP;\n                urls.push(/** @type {string} */ (gets[i]['href']));\n            }\n        }\n    }\n    if (urls.length === 0) {\n        requestEncoding = WMTSRequestEncoding.REST;\n        l['ResourceURL'].forEach(function (element) {\n            if (element['resourceType'] === 'tile') {\n                format = element['format'];\n                urls.push(/** @type {string} */ (element['template']));\n            }\n        });\n    }\n    return {\n        urls: urls,\n        layer: config['layer'],\n        matrixSet: matrixSet,\n        format: format,\n        projection: projection,\n        requestEncoding: requestEncoding,\n        tileGrid: tileGrid,\n        style: style,\n        dimensions: dimensions,\n        wrapX: wrapX,\n        crossOrigin: config['crossOrigin'],\n    };\n}\n//# sourceMappingURL=WMTS.js.map","import { Resources } from '../../resources/resources';\r\nimport { SessionLogin } from './sessionlogin';\r\nimport { checkBrowserCompatibility } from '../../view/helpers';\r\nimport { Events, ApiMethods, callApiMethod, getThumbnailUrl } from './components';\r\nimport $ from 'jquery';\r\nimport { createTree } from 'jquery.fancytree/dist/modules/jquery.fancytree';\r\nimport 'jquery.fancytree/dist/modules/jquery.fancytree.dnd5';\r\nimport 'jquery.fancytree/dist/skin-win8/ui.fancytree.min.css';\r\nimport 'font-awesome/css/font-awesome.css';\r\n\r\nlet PmaStartUrl = \"http://127.0.0.1:54001/\";\r\n/**\r\n* Represents a UI component that shows a tree view that allows browsing through the directories and slides from multiple PMA.core servers. This component uses {@link https://github.com/mar10/fancytree|fancytree} under the hood.\r\n* @param  {Context} context\r\n* @param  {object} options - Configuration options\r\n* @param  {Tree~server[]} options.servers An array of servers to show files from\r\n* @param {string|HTMLElement} options.element - The element that hosts the tree view. It can be either a valid CSS selector or an HTMLElement instance.\r\n* @param  {function} [options.renderNode] - Allows tweaking after node state was rendered\r\n* @param  {Tree~rootDirSortCb} [options.rootDirSortCb] - Function that sorts an array of directories\r\n* @param  {boolean} [options.checkboxes=false] - Allows multi selection of files with checkboxes\r\n* @param  {boolean} [options.autoDetectPmaStart=false] - Whether the tree should try to connect to a PMA.core lite server\r\n* @param  {boolean} [options.autoExpandNodes=false] - Whether the tree should expand nodes on single click\r\n* @param  {boolean} [options.preview=false] - Whether the tree should show a popover preview of slides\r\n* @param  {boolean} [options.search=false] - Whether the tree should show a textbox for enabling search\r\n* @fires PMA.UI.Components.Events#SlideSelected\r\n* @fires PMA.UI.Components.Events#DirectorySelected\r\n* @fires PMA.UI.Components.Events#ServerSelected\r\n* @fires PMA.UI.Components.Events#MultiSelectionChanged\r\n* @fires PMA.UI.Components.Events#TreeNodeDoubleClicked\r\n* @fires PMA.UI.Components.Events#ServerExpanded\r\n* @fires PMA.UI.Components.Events#DirectoryExpanded\r\n* @fires PMA.UI.Components.Events#SearchFinished\r\n* @fires PMA.UI.Components.Events#SearchFailed\r\n* @tutorial 04-tree\r\n*/\r\nexport class Tree {\r\n    /**\r\n     * Holds information about a PMA.core server\r\n     * @typedef {Object} Tree~server\r\n     * @property {string} name - The display name of the server\r\n     * @property {string} url - The url of the server\r\n     * @property {string} [path] - An optional path of a folder in the server to show\r\n     * @property {boolean} [showFiles=true] - Whether or not to display slides along with directories\r\n     */\r\n\r\n    /**\r\n     * Function that sorts an array of directories\r\n     * @callback Tree~rootDirSortCb\r\n     * @param {String[]} directories\r\n     * @returns {String[]}\r\n     */\r\n\r\n    /**\r\n    * Function that gets called when an attempt to add a server completes.\r\n    * @callback Tree~addServerCallback\r\n    * @param {boolean} success - Whether the server was successfully added or not\r\n    */\r\n\r\n    constructor(context, options) {\r\n        if (!checkBrowserCompatibility()) {\r\n            return;\r\n        }\r\n\r\n        this.element = options.element;\r\n        if (typeof options.element == \"string\") {\r\n            var el = document.querySelector(options.element);\r\n            if (!el) {\r\n                console.error(\"Invalid selector for element\");\r\n            }\r\n            else {\r\n                this.element = el;\r\n            }\r\n        }\r\n\r\n        this.context = context;\r\n        this.servers = options.servers || [];\r\n        var _this = this;\r\n\r\n        this.navigating = false;\r\n        this.lastNavigatePathRequest = null;\r\n\r\n        this.autoExpand = options.autoExpandNodes === true;\r\n        this.checkboxes = options.checkboxes === true;\r\n        this.lastSearchResults = {};\r\n        this.listeners = {};\r\n        this.listeners[Events.DirectorySelected] = [];\r\n        this.listeners[Events.SlideSelected] = [];\r\n        this.listeners[Events.ServerSelected] = [];\r\n        this.listeners[Events.MultiSelectionChanged] = [];\r\n        this.listeners[Events.TreeNodeDoubleClicked] = [];\r\n        this.listeners[Events.ServerExpanded] = [];\r\n        this.listeners[Events.DirectoryExpanded] = [];\r\n        this.listeners[Events.SearchFinished] = [];\r\n        this.listeners[Events.SearchFailed] = [];\r\n\r\n        this.lastSearchHash = 0;\r\n        this.previewEnabled = false;\r\n\r\n        if (typeof options.rootDirSortCb === \"function\") {\r\n            this.rootDirSortCb = options.rootDirSortCb;\r\n        }\r\n\r\n        var sourceData = [];\r\n        for (var i = 0; i < this.servers.length; i++) {\r\n            sourceData.push({\r\n                title: this.servers[i].name,\r\n                serverNode: true,\r\n                key: this.servers[i].url,\r\n                serverIndex: i,\r\n                extraClasses: \"server\",\r\n                dirPath: (this.servers[i].path ? this.servers[i].path : \"/\"),\r\n                lazy: true,\r\n                unselectableStatus: false,\r\n                unselectable: true,\r\n                selected: false,\r\n                checkbox: false\r\n            });\r\n\r\n            // try get version for each server\r\n            this.context.getVersionInfo(this.servers[i].url, serverVersionResult.bind(this, this.servers[i]));\r\n        }\r\n\r\n        var searchBox = null;\r\n        if (options.search === true) {\r\n            var cls = options.searchClass ? options.searchClass : 'pma-ui-tree-search-box';\r\n            searchBox = $(\"<input type='text' class='\" + cls + \"' placeholder='\" + Resources.translate(\"Search\") + \"'/><hr />\").appendTo(this.element);\r\n        }\r\n\r\n        this.fancytree = createTree(this.element, {\r\n            keyPathSeparator: \"?\",\r\n            checkbox: options.checkboxes === true,\r\n            extensions: [\"dnd5\", /*\"glyph\", \"wide\"*/],\r\n            dnd5: {\r\n                dragStart: function (node, data) {\r\n                    // Called when user starts dragging `node`.\r\n                    // This method MUST be defined to enable dragging for tree nodes.\r\n                    //\r\n                    // We can\r\n                    //   Add or modify the drag data using `data.dataTransfer.setData()`\r\n                    //   Return false to cancel dragging of `node`.\r\n\r\n                    // For example:\r\n                    //    if( data.originalEvent.shiftKey ) ...          \r\n                    //    if( node.isFolder() ) { return false; }\r\n                    if (node.data.dirPath && !node.data.serverNode) {\r\n                        node.data.dragging = true;\r\n                        if (node.isActive) {\r\n                            node.setActive(false);\r\n                        }\r\n\r\n                        data.dataTransfer.setData(\"text\", JSON.stringify({\r\n                            serverUrl: node.data.serverUrl,\r\n                            path: node.data.dirPath,\r\n                            isFolder: node.isFolder()\r\n                        }));\r\n\r\n                        return true;\r\n                    }\r\n\r\n                    return false;\r\n                },\r\n                dragEnd: function (node, data) {\r\n                    node.data.dragging = false;\r\n                }\r\n            },\r\n            //glyph: glyph_opts,\r\n            selectMode: 3,\r\n            toggleEffect: { options: { direction: \"left\" }, duration: 400 },\r\n            // toggleEffect: false,\r\n            wide: {\r\n                iconWidth: \"1em\", // Adjust this if @fancy-icon-width != \"16px\"\r\n                iconSpacing: \"0.5em\", // Adjust this if @fancy-icon-spacing != \"3px\"\r\n                levelOfs: \"1.5em\" // Adjust this if ul padding != \"16px\"\r\n            },\r\n            icon: function (event, data) {\r\n                if (data.node.key === \"_searchResults\") {\r\n                    if (data.node.data.searching) {\r\n                        return \"fa fa-spinner fa-spin\";\r\n                    }\r\n                    else {\r\n                        return \"fa fa-search\";\r\n                    }\r\n                }\r\n                else if (data.node.data.serverNode === true) {\r\n                    return \"server\";\r\n                }\r\n                else if (data.node.data.rootDir === true) {\r\n                    return \"rootdir\";\r\n                }\r\n                else if (!data.node.isFolder()) {\r\n                    return \"image\";\r\n                }\r\n            },\r\n            renderNode: (typeof options.renderNode === \"function\" ? options.renderNode : null),\r\n            source: sourceData,\r\n            lazyLoad: loadNode.bind(this),\r\n            activate: function (event, data) {\r\n                // A node was activated:\r\n                var node = data.node;\r\n                if (node.key == \"_searchResults\" && _this.autoExpand === true) {\r\n                    node.setExpanded(true);\r\n                }\r\n\r\n                setTimeout(function () {\r\n                    if (node.data && node.data.dragging === true) {\r\n                        event.preventDefault();\r\n                        return;\r\n                    }\r\n\r\n                    if (node.data.serverNode === true) {\r\n                        _this.fireEvent(Events.ServerSelected, { serverUrl: _this.servers[node.data.serverIndex].url });\r\n                        return;\r\n                    }\r\n\r\n                    if (node.data.dirPath !== \"/\") {\r\n                        if (node.isFolder()) {\r\n                            if (_this.autoExpand === true) {\r\n                                node.setExpanded(true);\r\n                            }\r\n\r\n                            _this.fireEvent(Events.DirectorySelected, { serverUrl: _this.servers[node.data.serverIndex].url, path: node.data.dirPath });\r\n                        }\r\n                        else {\r\n                            if (_this.servers[node.data.serverIndex]) {\r\n                                _this.fireEvent(Events.SlideSelected, { serverUrl: _this.servers[node.data.serverIndex].url, path: node.data.dirPath });\r\n                            }\r\n                        }\r\n                    }\r\n                    else if (_this.autoExpand === true) {\r\n                        node.setExpanded(true);\r\n                    }\r\n                }, 300);\r\n            },\r\n            select: function (event, data) {\r\n                var n = data.tree.getSelectedNodes();\r\n                var selectionArray = [];\r\n\r\n                if (n && n.length > 0) {\r\n                    for (var i = 0; i < n.length; i++) {\r\n                        if (!(n[i] === null || n[i].data.serverNode === true || n[i].data.rootDir === true || n[i].isFolder())) {\r\n                            selectionArray.push({ serverUrl: _this.servers[n[i].data.serverIndex].url, path: n[i].data.dirPath });\r\n                        }\r\n                    }\r\n                }\r\n\r\n                _this.fireEvent(Events.MultiSelectionChanged, selectionArray);\r\n            },\r\n            expand: function (event, data) {\r\n                var node = data.node;\r\n                setTimeout(function () {\r\n                    if (node.data.serverNode === true) {\r\n                        _this.fireEvent(Events.ServerExpanded, { serverUrl: _this.servers[node.data.serverIndex].url });\r\n                        return;\r\n                    }\r\n                    else if (node.data.dirPath !== \"/\") {\r\n                        if (node.isFolder()) {\r\n                            _this.fireEvent(Events.DirectoryExpanded, { serverUrl: _this.servers[node.data.serverIndex].url, path: node.data.dirPath });\r\n                            return;\r\n                        }\r\n                    }\r\n                }, 300);\r\n            },\r\n            dblclick: function (event, data) {\r\n                var node = data.node;\r\n                _this.fireEvent(Events.TreeNodeDoubleClicked,\r\n                    {\r\n                        serverUrl: _this.servers[node.data.serverIndex].url,\r\n                        path: node.data.dirPath,\r\n                        isSlide: !(node.data.serverNode === true || node.data.rootDir === true || node.isFolder())\r\n                    });\r\n            }\r\n        });\r\n\r\n        if (options.preview === true) {\r\n            enablePreview.call(this, this.fancytree);\r\n        }\r\n\r\n        if (options.autoDetectPmaStart === true) {\r\n            this.addPmaStartServer();\r\n        }\r\n\r\n        if (options.search === true) {\r\n            $(this.element).find(\".ui-fancytree\").addClass(\"ui-fancytree-search\");\r\n        }\r\n\r\n        // this.fancytree = $.ui.fancytree.getTree(this.element);\r\n\r\n        var self = this;\r\n        var searchTimeout = null;\r\n        var t = this.fancytree;\r\n        if (searchBox) {\r\n            searchBox.on('input propertychange paste', function () {\r\n                var val = $(this).val();\r\n                if (val && val.length > 3) {\r\n                    clearTimeout(searchTimeout);\r\n                    searchTimeout = setTimeout(function () {\r\n                        startSearch.call(self, val);\r\n                    }, 500);\r\n                }\r\n                else {\r\n                    var n = t.getNodeByKey(\"_searchResults\");\r\n                    if (n) {\r\n                        n.remove();\r\n                    }\r\n                }\r\n            });\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Toggle the live preview on/off\r\n     * @param {boolean} enable \r\n     */\r\n    togglePreview(enable) {\r\n        if (enable && !this.previewEnabled) {\r\n            enablePreview.call(this, $(this.element));\r\n        }\r\n        else if (!enable && this.previewEnabled) {\r\n            disablePreview.call(this, $(this.element));\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Adds a new server to the tree\r\n     * @param  {Tree~server} server A server object\r\n     */\r\n    addServer(server) {\r\n        if (server) {\r\n            this.servers.push(server);\r\n\r\n            var serverInfo = {\r\n                title: this.servers[this.servers.length - 1].name,\r\n                serverNode: true,\r\n                key: this.servers[this.servers.length - 1].url,\r\n                serverIndex: this.servers.length - 1,\r\n                extraClasses: \"server\",\r\n                dirPath: (this.servers[this.servers.length - 1].path ? this.servers[this.servers.length - 1].path : \"/\"),\r\n                lazy: true,\r\n                unselectableStatus: false,\r\n                unselectable: true,\r\n                selected: false,\r\n                checkbox: false\r\n            };\r\n\r\n            // try get version for server\r\n            this.context.getVersionInfo(server.url, serverVersionResult.bind(this, server));\r\n            this.fancytree.getRootNode().addChildren(serverInfo);\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Removes a server from the tree\r\n     * @param {number} index The index of the server to remove\r\n     */\r\n    removeServer(index) {\r\n        var children = this.fancytree.getRootNode().getChildren();\r\n        if (children && children.length && index >= 0 && index < children.length) {\r\n            if (children[index].data) {\r\n                this.servers.splice(children[index].data.serverIndex, 1);\r\n            }\r\n\r\n            children[index].remove();\r\n        }\r\n        else {\r\n            console.error(\"No children found or index out of range\");\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Removes a Pma.start server if it exists\r\n     */\r\n    removePmaStartServer() {\r\n        var children = this.fancytree.getRootNode().getChildren();\r\n        for (var i = 0; i < children.length; i++) {\r\n            if (children[i].key == PmaStartUrl) {\r\n                this.removeServer(children[i].data.serverIndex);\r\n            }\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Add a pma.start server if available\r\n     * @param {Tree~addServerCallback} callback - The function to call when the attempt to add server completes\r\n     */\r\n    addPmaStartServer(callback) {\r\n        // This function adds a SessionLogin provider to the context as many times as it is called. \r\n        // This needs fixing\r\n        var _this = this;\r\n        var children = this.fancytree.getRootNode().getChildren();\r\n        for (var i = 0; i < children.length; i++) {\r\n            if (children[i].key == PmaStartUrl) {\r\n                return;\r\n            }\r\n        }\r\n\r\n        callApiMethod({\r\n            method: ApiMethods.GetVersionInfo,\r\n            httpMethod: \"GET\",\r\n            data: { rnd: Math.random() },\r\n            serverUrl: PmaStartUrl,\r\n            success: function () {\r\n                var sl = new SessionLogin(_this.context, [{ serverUrl: PmaStartUrl, sessionId: \"pma.core.lite\" }]);\r\n                _this.addServer({ name: Resources.translate(\"Computer\"), url: PmaStartUrl });\r\n                if (typeof callback === \"function\") {\r\n                    callback.call(this, true);\r\n                }\r\n            },\r\n            failure: function () {\r\n                if (typeof callback === \"function\") {\r\n                    callback.call(this, false);\r\n                }\r\n            }\r\n        });\r\n    };\r\n\r\n    /**\r\n     * Returns the list of servers currently under the tree view\r\n     * @returns {Tree~server[]}\r\n     */\r\n    getServers() {\r\n        return this.servers;\r\n    };\r\n\r\n    /**\r\n     * Gets the currently selected slide or null\r\n     * @returns {Tree~server}\r\n     */\r\n    getSelectedSlide() {\r\n        var n = this.fancytree.getActiveNode();\r\n        if (n === null || n.data.serverNode === true || n.data.rootDir === true || n.isFolder()) {\r\n            return null;\r\n        }\r\n\r\n        return { server: this.servers[n.data.serverIndex].url, path: n.data.dirPath };\r\n    };\r\n\r\n    /**\r\n     * Gets the currently selected directory or null\r\n     * @returns {Tree~server}\r\n     */\r\n    getSelectedDirectory() {\r\n        var n = this.fancytree.getActiveNode();\r\n        if (n !== null && (n.data.rootDir === true || n.isFolder())) {\r\n            return { server: this.servers[n.data.serverIndex].url, path: n.data.dirPath };\r\n        }\r\n\r\n        return null;\r\n    };\r\n\r\n    /**\r\n     * Gets an array with the checked slides or an empty array\r\n     * @returns {Tree~server[]}\r\n     */\r\n    getMultiSelection() {\r\n        var n = this.fancytree.getSelectedNodes();\r\n        var selectionArray = [];\r\n        if (n && n.length > 0) {\r\n            for (var i = 0; i < n.length; i++) {\r\n                if (!(n[i] === null || n[i].data.serverNode === true || n[i].data.rootDir === true || n[i].isFolder())) {\r\n                    selectionArray.push({ serverUrl: this.servers[n[i].data.serverIndex].url, path: n[i].data.dirPath });\r\n                }\r\n            }\r\n        }\r\n\r\n        return selectionArray;\r\n    };\r\n\r\n    /**\r\n     * Clears the selected nodes in the tree view\r\n     */\r\n    clearMultiSelection() {\r\n        this.fancytree.selectAll(false);\r\n    };\r\n\r\n    /**\r\n     * Navigates to a path in the tree\r\n     * @param {string} path - The virtual path to navigate to. The server part of the path should be the server NAME(not the server url)\r\n     */\r\n    navigateTo(path) {\r\n        // fancy tree needs a path separated with options.keyPathSeparator \r\n        //  ex. ?key1?key2?key3\r\n        var self = this;\r\n        if (self.navigating) {\r\n            self.lastNavigatePathRequest = path;\r\n            return;\r\n        }\r\n\r\n        self.navigating = true;\r\n\r\n        var tree = this.fancytree;\r\n        var key = virtualPathToTreePath.call(this, path, tree);\r\n\r\n        return tree.loadKeyPath(key, function (node, status) {\r\n            if (status === \"ok\") {\r\n                node.setActive();\r\n                node.scrollIntoView();\r\n                self.navigating = false;\r\n            }\r\n        }).done(function () {\r\n            self.navigating = false;\r\n\r\n            if (self.lastNavigatePathRequest) {\r\n                var p = self.lastNavigatePathRequest;\r\n                self.lastNavigatePathRequest = null;\r\n                self.navigateTo(p);\r\n            }\r\n        });\r\n    };\r\n\r\n    /**\r\n     * Refreshes a node in the tree specified by the path (server or directory)\r\n     * @param {string} path - The virtual path to refresh. The server part of the path should be the server NAME(not the server url)\r\n     */\r\n    refresh(path) {\r\n        var tree = this.fancytree;\r\n        var key = virtualPathToTreePath.call(this, path, tree);\r\n\r\n        return tree.loadKeyPath(key, function (node, status) {\r\n            if (status === \"ok\") {\r\n                node.resetLazy();\r\n            }\r\n        });\r\n    };\r\n\r\n    /**\r\n     * Returns the last search results, grouped by the server name\r\n     * @return {Object.<string, string[]>} The object containing the result for each server available\r\n     */\r\n    getSearchResults() {\r\n        return this.lastSearchResults;\r\n    };\r\n\r\n    /**  \r\n     * Clears any search results for this tree\r\n    */\r\n    clearSearchResults() {\r\n        var tree = this.fancytree;\r\n        var n = tree.getNodeByKey(\"_searchResults\");\r\n        if (n) {\r\n            n.remove();\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Searches for files matching the specified value, and appends them to the tree. Use {@link PMA.UI.Components.Tree#getSearchResults} to get the search results\r\n     * @param {string} value - The value to search for\r\n     * @fires PMA.UI.Components.Events#SearchFinished\r\n     */\r\n    search(value) {\r\n        this.clearSearchResults();\r\n        return startSearch.call(this, value);\r\n    };\r\n\r\n    /**\r\n     * Attaches an event listener\r\n     * @param {PMA.UI.Components.Events} eventName - The name of the event to listen to\r\n     * @param {function} callback - The function to call when the event occurs\r\n     */\r\n    listen(eventName, callback) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" is not a valid event\");\r\n        }\r\n\r\n        this.listeners[eventName].push(callback);\r\n    };\r\n\r\n    // fires an event\r\n    fireEvent(eventName, eventArgs) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" does not exist\");\r\n            return;\r\n        }\r\n\r\n        for (var i = 0, max = this.listeners[eventName].length; i < max; i++) {\r\n            this.listeners[eventName][i].call(this, eventArgs);\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Gets a value indicating whether files are shown for a specified server\r\n     * @param {string} serverUrl - A server url to show/hide files for\r\n     */\r\n    getFilesVisibility(serverUrl) {\r\n        var children = this.fancytree.getRootNode().getChildren();\r\n        for (var i = 0; i < children.length; i++) {\r\n            if (children[i].key == serverUrl) {\r\n                for (var j = 0; j < this.servers.length; j++) {\r\n                    if (this.servers[j].url == children[i].key) {\r\n                        return this.servers[j].showFiles;\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Shows or hides the files of a specified server\r\n     * @param {string} serverUrl - A server url to show/hide files for\r\n     * @param {boolean} visible - Whether to show or hide files for the specific server\r\n     */\r\n    setFilesVisibility(serverUrl, visible) {\r\n        var children = this.fancytree.getRootNode().getChildren();\r\n        for (var i = 0; i < children.length; i++) {\r\n            if (children[i].key == serverUrl) {\r\n                for (var j = 0; j < this.servers.length; j++) {\r\n                    if (this.servers[j].url == children[i].key) {\r\n                        this.servers[j].showFiles = visible;\r\n                    }\r\n                }\r\n\r\n                children[i].resetLazy();\r\n            }\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Resets the state of all servers, collapses all visible folder, and resets the lazy load state\r\n     */\r\n    collapseAll() {\r\n        var children = this.fancytree.getRootNode().getChildren();\r\n        for (var i = 0; i < children.length; i++) {\r\n            // children[i].setExpanded(false);\r\n            children[i].resetLazy();\r\n        }\r\n    };\r\n\r\n    /**\r\n     * Resets the state of a specified server, collapses all visible folder, resets the lazy load state and invalidates the session \r\n     */\r\n    signOut(serverUrl) {\r\n        var children = this.fancytree.getRootNode().getChildren();\r\n        for (var i = 0; i < children.length; i++) {\r\n            if (children[i].key == serverUrl) {\r\n                children[i].resetLazy();\r\n                this.context.deAuthenticate(serverUrl);\r\n            }\r\n        }\r\n    };\r\n\r\n}\r\n\r\n\r\nfunction loadNode(event, data) {\r\n    var dfd = new $.Deferred();\r\n    data.result = dfd.promise();\r\n\r\n    var node = data.node;\r\n    var path = node.data.dirPath === \"/\" ? \"\" : node.data.dirPath;\r\n    var _this = this;\r\n\r\n    // if the directories to be loaded are root directories or sub directories\r\n    var isRootDir = node.data.dirPath === \"/\";\r\n\r\n    this.context.getDirectories(_this.servers[node.data.serverIndex].url, path,\r\n        function (sessionId, directories) {\r\n            if (_this.rootDirSortCb && path === \"\") {\r\n                directories = _this.rootDirSortCb(directories);\r\n            }\r\n\r\n            var result = [];\r\n            for (var i = 0; i < directories.length; i++) {\r\n                result.push({\r\n                    title: directories[i].split('/').pop(),\r\n                    lazy: true,\r\n                    serverIndex: node.data.serverIndex,\r\n                    serverUrl: _this.servers[node.data.serverIndex].url,\r\n                    dirPath: directories[i],\r\n                    key: directories[i],\r\n                    folder: true,\r\n                    rootDir: isRootDir,\r\n                    extraClasses: isRootDir ? \"rootdir\" : \"subdir\",\r\n                    // unselectableStatus: true,\r\n                    checkbox: _this.checkboxes\r\n                });\r\n            }\r\n\r\n            if (_this.servers[node.data.serverIndex].showFiles !== false && path && path !== \"\") {\r\n                _this.context.getSlides(\r\n                    {\r\n                        serverUrl: _this.servers[node.data.serverIndex].url,\r\n                        path: path,\r\n                        success: function (sessionId, files) {\r\n                            for (var i = 0; i < files.length; i++) {\r\n                                result.push({\r\n                                    title: files[i].split('/').pop(),\r\n                                    lazy: false,\r\n                                    serverIndex: node.data.serverIndex,\r\n                                    dirPath: files[i],\r\n                                    serverUrl: _this.servers[node.data.serverIndex].url,\r\n                                    key: files[i],\r\n                                    folder: false,\r\n                                    extraClasses: \"slide\"\r\n                                });\r\n                            }\r\n\r\n                            dfd.resolve(result);\r\n                        },\r\n                        failure: function (error) {\r\n                            dfd.reject(error.Message ? error.Message : Resources.translate(\"Error loading files\"));\r\n                        }\r\n                    });\r\n            }\r\n            else {\r\n                dfd.resolve(result);\r\n            }\r\n        },\r\n        function (error) {\r\n            dfd.reject(error.Message ? error.Message : Resources.translate(\"Error loading directories\"));\r\n        });\r\n}\r\n\r\nfunction searchResultsSuccess(searchNode, serverIndex, searchHash, sessionId, results) {\r\n    if (this.lastSearchHash !== searchHash) {\r\n        return;\r\n    }\r\n\r\n    this.lastSearchResults[this.servers[serverIndex].name] = results;\r\n\r\n    var searchServerNode = searchNode.addChildren({\r\n        title: this.servers[serverIndex].name,\r\n        serverNode: true,\r\n        key: \"_searchServer_\" + this.servers[serverIndex].url,\r\n        serverIndex: serverIndex,\r\n        dirPath: (this.servers[serverIndex].path ? this.servers[serverIndex].path : \"/\"),\r\n        lazy: false,\r\n        unselectableStatus: false,\r\n        unselectable: true,\r\n        selected: false,\r\n        checkbox: false,\r\n        resultCount: results.length\r\n    });\r\n\r\n    var tree = $(this.element).fancytree(\"getTree\");\r\n    for (var r = 0; r < results.length; r++) {\r\n        var parts = results[r].split('/');\r\n\r\n        var thispart = \"\";\r\n        var currentLevel = searchServerNode;\r\n        for (var i = 0; i < parts.length; i++) {\r\n            thispart += i > 0 ? \"/\" + parts[i] : parts[i];\r\n\r\n            var n = tree.getNodeByKey(\"_searchResult_\" + thispart, currentLevel);\r\n            if (n == null) {\r\n                currentLevel = currentLevel.addChildren({\r\n                    title: thispart.split(\"/\").pop(),\r\n                    lazy: false,\r\n                    serverIndex: serverIndex,\r\n                    dirPath: thispart,\r\n                    key: \"_searchResult_\" + thispart,\r\n                    folder: i < parts.length - 1,\r\n                    rootDir: i == 0,\r\n                    extraClasses: i == 0 ? \"rootdir\" : \"subdir\",\r\n                    checkbox: this.checkboxes,\r\n                    resultCount: 1\r\n                });\r\n            }\r\n            else {\r\n                currentLevel = n;\r\n                n.data.resultCount += 1;\r\n            }\r\n        }\r\n    }\r\n\r\n    searchNode.data.resultCount += results.length;\r\n\r\n    searchNode.visit(function (n) {\r\n        if (n == searchNode) {\r\n            n.setTitle(Resources.translate(\"Search results for \\\"{pattern}\\\" ({count})\", { pattern: searchNode.data.pattern, count: n.data.resultCount }));\r\n        }\r\n        else if ((n.isFolder() || n.data.serverNode) && n == searchServerNode) {\r\n            n.setTitle(n.title + \" (\" + n.data.resultCount + \")\");\r\n        }\r\n\r\n    }, true);\r\n\r\n    searchNode.data.serverDone++;\r\n    if (searchNode.data.serverDone >= searchNode.data.serversSearched) {\r\n        searchNode.data.searching = false;\r\n        searchNode.renderTitle();\r\n    }\r\n\r\n    searchNode.makeVisible();\r\n    searchNode.setExpanded(true);\r\n\r\n    this.fireEvent(Events.SearchFinished, this.lastSearchResults);\r\n}\r\n\r\nfunction searchResultError(searchNode, serverIndex, searchHash) {\r\n    if (this.lastSearchHash !== searchHash) {\r\n        return;\r\n    }\r\n\r\n    searchNode.data.serverDone++;\r\n    if (searchNode.data.serverDone >= searchNode.data.serversSearched) {\r\n        searchNode.data.searching = false;\r\n        searchNode.renderTitle();\r\n    }\r\n\r\n    this.fireEvent(Events.SearchFailed, this.servers[serverIndex]);\r\n}\r\n\r\nfunction serverVersionResult(server, version) {\r\n    server.version = version;\r\n}\r\n\r\nfunction startSearch(pattern) {\r\n    this.lastSearchResults = {};\r\n    var searchResultsNode = $(this.element).fancytree(\"getTree\").getNodeByKey(\"_searchResults\");\r\n    if (searchResultsNode == null) {\r\n        var searchResultsNodeInfo = {\r\n            title: Resources.translate(\"Search results for \\\"{pattern}\\\"\", { pattern: pattern }),\r\n            key: \"_searchResults\",\r\n            lazy: false,\r\n            selected: false,\r\n            checkbox: false,\r\n            resultCount: 0,\r\n            searching: true,\r\n            serverDone: 0,\r\n            serversSearched: 0,\r\n            pattern: pattern\r\n        };\r\n\r\n        searchResultsNode = this.fancytree.getRootNode().addChildren(searchResultsNodeInfo);\r\n    }\r\n    else {\r\n        searchResultsNode.resultCount = 0;\r\n        searchResultsNode.removeChildren();\r\n        searchResultsNode.data.searching = true;\r\n        searchResultsNode.data.serverDone = 0;\r\n        searchResultsNode.data.serversSearched = 0;\r\n        searchResultsNode.data.pattern = pattern;\r\n        searchResultsNode.renderTitle();\r\n    }\r\n\r\n    searchResultsNode.makeVisible();\r\n    searchResultsNode.setExpanded(true);\r\n\r\n    var self = this;\r\n    this.lastSearchHash = Math.random();\r\n    for (var i = 0; i < this.servers.length; i++) {\r\n        if (!this.servers[i].version || this.servers[i].version.substring(0, \"1.\".length) === \"1.\") {\r\n            continue;\r\n        }\r\n\r\n        searchResultsNode.data.serversSearched++;\r\n        this.context.queryFilename(\r\n            this.servers[i].url,\r\n            \"\",\r\n            pattern,\r\n            searchResultsSuccess.bind(self, searchResultsNode, i, this.lastSearchHash),\r\n            searchResultError.bind(self, searchResultsNode, i, this.lastSearchHash)\r\n        );\r\n    }\r\n}\r\n\r\n/**\r\n * Converts a virtual path to a key used internaly by the tree component to locate any node\r\n * @param {string} path - The virtual path to convert. The server part should be the NAME of the server (not the url)\r\n * @param {Object} tree - The instance of the fancytree\r\n * @returns {string} The key to the node\r\n */\r\nfunction virtualPathToTreePath(path, tree) {\r\n    var parts = path.split(\"/\").filter(function (e) { return e != null && e != \"\"; });\r\n    var initialPath = \"\";\r\n\r\n    if (parts.length > 0) {\r\n        // find server url as first part of path\r\n        for (var i = 0; i < this.servers.length; i++) {\r\n            if (this.servers[i].name.toLowerCase() == parts[0].toLowerCase()) {\r\n                parts[0] = this.servers[i].url;\r\n                initialPath = this.servers[i].path ? this.servers[i].path : \"\";\r\n                break;\r\n            }\r\n        }\r\n\r\n        if (initialPath) {\r\n            parts[1] = initialPath + \"/\" + parts[1];\r\n        }\r\n\r\n        for (i = 2; i < parts.length; i++) {\r\n            parts[i] = parts[i - 1] + \"/\" + parts[i];\r\n        }\r\n    }\r\n\r\n    parts = parts.join(tree.options.keyPathSeparator);\r\n\r\n    return parts;\r\n}\r\n\r\nfunction disablePreview(tree) {\r\n    if (this.previewEnabled) {\r\n        $(this.element).off(\"mouseenter\", \"span.fancytree-title\");\r\n        $(this.element).off(\"mouseleave\", \"span.fancytree-title\");\r\n        $(this.element).off(\"mousemove\", \"span.fancytree-title\");\r\n\r\n        $(\"#fancytree-preview\").remove();\r\n        this.previewEnabled = false;\r\n    }\r\n}\r\n\r\nfunction enablePreview(tree) {\r\n    if (!this.previewEnabled) {\r\n        var xOffset = 100, yOffset = -30;\r\n        var hoverTimeout = null;\r\n        var _this = this;\r\n\r\n        $(this.element).on(\"mouseenter\", \"span.fancytree-title\", function (event) {\r\n            // Add a hover handler to all node titles (using event delegation)\r\n            var node = $.ui.fancytree.getNode(event);\r\n            if (!(node === null || node.data.serverNode === true || node.data.rootDir === true || node.isFolder()) && node.data.serverIndex !== undefined) {\r\n                var serverUrl = _this.servers[node.data.serverIndex].url;\r\n\r\n                var f = function () {\r\n                    _this.context.getSession(serverUrl, function (sessionId) {\r\n                        var tUrl = getThumbnailUrl(serverUrl, sessionId, node.data.dirPath, 0, 150, 0);\r\n                        var el = $(\"#fancytree-preview\");\r\n                        if (el.length > 0) {\r\n                            el.remove();\r\n                        }\r\n\r\n                        el = $(\"<p id='fancytree-preview' class='fancytree-preview'><i class='fa fa-spinner fa-spin'></i><img/></p>\").appendTo(\"body\");\r\n                        el.css(\"position\", \"absolute\")\r\n                            .css(\"top\", (event.pageY + yOffset) + \"px\")\r\n                            .css(\"left\", (event.pageX + xOffset) + \"px\")\r\n                            .fadeIn(\"fast\");\r\n\r\n                        el.find(\"img\").bind(\"load\", function () {\r\n                            el.find(\"i\").remove();\r\n                        }).attr(\"src\", tUrl);\r\n\r\n                    });\r\n                };\r\n\r\n                hoverTimeout = setTimeout(f, 250);\r\n            }\r\n        });\r\n\r\n        $(this.element).on(\"mouseleave\", \"span.fancytree-title\", function (event) {\r\n            $(\"#fancytree-preview\").remove();\r\n            if (hoverTimeout) {\r\n                clearTimeout(hoverTimeout);\r\n                hoverTimeout = null;\r\n            }\r\n        });\r\n\r\n        $(this.element).on(\"mousemove\", \"span.fancytree-title\", function (event) {\r\n            var el = $(\"#fancytree-preview\");\r\n            if (el.length > 0) {\r\n                el.css(\"top\", (event.pageY + yOffset) + \"px\")\r\n                    .css(\"left\", (event.pageX + xOffset) + \"px\");\r\n            }\r\n        });\r\n\r\n        this.previewEnabled = true;\r\n    }\r\n}","\r\nimport { checkBrowserCompatibility } from '../../view/helpers';\r\nimport { login } from './components';\r\n\r\n/**\r\n * Holds information required to perform an automatic login against a PMA.core server\r\n * @typedef {Object} AutoLogin~serverCredentials\r\n * @property {string} serverUrl\r\n * @property {string} username\r\n * @property {string} password\r\n */\r\n/**\r\n * Authenticates against a PMA.core server without user interaction. Upon creation, the instance will register itself automatically as an authentication provider for the given context.\r\n * @param  {Context} context\r\n * @param  {AutoLogin~serverCredentials[]} serverCredentials - Array of PMA.core server credentials this authentication provider can manage.\r\n * @tutorial 03-gallery\r\n */\r\nexport class AutoLogin {\r\n    constructor(context, serverCredentials) {\r\n        if (!checkBrowserCompatibility()) {\r\n            return;\r\n        }\r\n\r\n        if (!(serverCredentials instanceof Array)) {\r\n            console.error(\"Expected array of server credentials\");\r\n            return;\r\n        }\r\n\r\n        this.serverCredentials = serverCredentials;\r\n        this.context = context;\r\n        this.context.registerAuthenticationProvider(this);\r\n    }\r\n    /**\r\n     * Authenticates against a PMA.core server. This method is usually invoked by the context itself and should rarely be used outside it.\r\n     * @param  {string} serverUrl - The URL of the PMA.core server to authenticate against\r\n     * @param  {function} [success]\r\n     * @param  {function} [failure]\r\n     * @returns {boolean} True or false depending on whether this instance has enough information to authenticate against this PMA.core server\r\n     */\r\n    authenticate(serverUrl, success, failure) {\r\n        for (var i = 0, max = this.serverCredentials.length; i < max; i++) {\r\n            if (this.serverCredentials[i].serverUrl == serverUrl) {\r\n\r\n                login(\r\n                    this.serverCredentials[i].serverUrl,\r\n                    this.serverCredentials[i].username,\r\n                    this.serverCredentials[i].password,\r\n                    this.context.getCaller(),\r\n                    success,\r\n                    failure);\r\n\r\n                return true;\r\n            }\r\n        }\r\n        // Requested server is not handled by this provider\r\n        return false;\r\n    }\r\n}","import { checkBrowserCompatibility } from '../../view/helpers';\r\nimport { Viewport } from '../../view/viewport';\r\nimport { Events, DragDropMimeType, parseDragData, _sessionList } from './components';\r\n\r\nfunction clone(obj) {\r\n    if (null === obj || \"object\" != typeof obj) {\r\n        return obj;\r\n    }\r\n\r\n    var copy = obj.constructor();\r\n    for (var attr in obj) {\r\n        if (obj.hasOwnProperty(attr)) {\r\n            copy[attr] = obj[attr];\r\n        }\r\n    }\r\n\r\n    return copy;\r\n}\r\n\r\nfunction checkReloadImage(serverUrl, path, doneCb, dropped) {\r\n    if (!this.lastLoadImageRequest) {\r\n        return;\r\n    }\r\n\r\n    if (this.lastLoadImageRequest.serverUrl !== serverUrl || this.lastLoadImageRequest.path !== path || this.lastLoadImageRequest.doneCb !== doneCb) {\r\n        var ref = this.lastLoadImageRequest;\r\n        this.lastLoadImageRequest = null;\r\n\r\n        this.load(ref.serverUrl, ref.path, ref.doneCb, ref.dropped);\r\n    }\r\n}\r\n\r\nfunction onDragOver(ev) {\r\n    ev.preventDefault();\r\n    var types = ev.dataTransfer.types;\r\n    if (types) {\r\n        var hasData = false;\r\n        if (types.indexOf) {\r\n            hasData = types.indexOf(\"application/x-fancytree-node\") > -1 || types.indexOf(DragDropMimeType) > -1;\r\n        }\r\n        else if (types.contains) {\r\n            // in IE and EDGE types is DOMStringList\r\n            hasData = types.contains(\"application/x-fancytree-node\") || types.contains(DragDropMimeType);\r\n        }\r\n\r\n        if (hasData) {\r\n            ev.dataTransfer.dropEffect = \"link\";\r\n            return;\r\n        }\r\n    }\r\n\r\n    ev.dataTransfer.dropEffect = \"none\";\r\n}\r\n\r\nfunction onDrop(ev) {\r\n    ev.preventDefault();\r\n    var nodeData = parseDragData(ev.dataTransfer);\r\n    if (nodeData && !nodeData.isFolder && nodeData.path && nodeData.serverUrl) {\r\n        var cancels = this.fireEvent(Events.BeforeDrop, { serverUrl: nodeData.serverUrl, path: nodeData.path, node: nodeData });\r\n        if (cancels.filter(function (c) { return c == false; }).length == 0) {\r\n            this.load(nodeData.serverUrl, nodeData.path, null, true);\r\n        }\r\n    }\r\n}\r\n\r\nfunction initializeDropZone() {\r\n    if (this.element) {\r\n        this.element.addEventListener(\"drop\", onDrop.bind(this), false);\r\n        this.element.addEventListener(\"dragover\", onDragOver.bind(this), false);\r\n    }\r\n}\r\n\r\n/**\r\n * Helper class that wraps around the {@link PMA.UI.View.Viewport} class. It's purpose is mainly to automatically handle slide reloading and authentication, via the provided {@link PMA.UI.Components.Context} instance.\r\n * @param {PMA.UI.Components.Context} context\r\n * @param {Object} slideLoaderOptions - Initialization options passed to each {@link PMA.UI.View.Viewport} that is created during a {@link PMA.UI.Components.SlideLoader#load} call. This is the same struct as the one accepted by the {@link PMA.UI.View.Viewport} constructor, omitting server URLs, credentials and specific slide paths. The omitted information is either available via the {@link PMA.UI.Components.Context} instance, or supplied during the {@link PMA.UI.Components.SlideLoader#load} call.\r\n * @param {string|HTMLElement} slideLoaderOptions.element - The element that hosts the viewer. It can be either a valid CSS selector or an HTMLElement instance\r\n * @param {string} slideLoaderOptions.image - The path or UID of the image to load\r\n * @param {Number} [slideLoaderOptions.keyboardPanFactor=0.5] - A factor to calculate pan delta when pressing a keyboard arrow. The actual pan in pixels is calculated as keyboardPanFactor * viewportWidth.\r\n * @param {PMA.UI.View.Themes} [slideLoaderOptions.theme=\"default\"] - The theme to use\r\n * @param {boolean|Object} [slideLoaderOptions.overview=true] - Whether or not to display an overview map\r\n * @param {boolean} [slideLoaderOptions.overview.collapsed] - Whether or not to start the overview in collapsed state\r\n * @param {boolean|Object} [slideLoaderOptions.dimensions=true] - Whether or not to display the dimensions selector for images that have more than one channel, z-stack or timeframe\r\n * @param {boolean} [slideLoaderOptions.dimensions.collapsed] - Whether or not to start the dimensions selector in collapsed state\r\n * @param {boolean|Object} [slideLoaderOptions.barcode=false] - Whether or not to display the image's barcode if it exists\r\n * @param {boolean} [slideLoaderOptions.barcode.collapsed=undefined] - Whether or not to start the barcode in collapsed state\r\n * @param {Number} [slideLoaderOptions.barcode.rotation=undefined] - Rotation in steps of 90 degrees\r\n * @param {boolean|Object} [slideLoaderOptions.loadingBar=true] - Whether or not to display a loading bar while the image is loading\r\n * @param {PMA.UI.View.Viewport~position} [slideLoaderOptions.position] - The initial position of the viewport within the image\r\n * @param {boolean} [slideLoaderOptions.snapshot=false] - Whether or not to display a button that generates a snapshot image\r\n * @param {PMA.UI.View.Viewport~annotationOptions} [slideLoaderOptions.annotations] - Annotation options\r\n * @param {Number} [slideLoaderOptions.digitalZoomLevels=0] - The number of digital zoom levels to add\r\n * @param {boolean} [slideLoaderOptions.scaleLine=true] - Whether or not to display a scale line when resolution information is available\r\n * @param {boolean} [slideLoaderOptions.colorAdjustments=false] - Whether or not to add a control that allows color adjustments\r\n * @param {string|PMA.UI.View.Viewport~filenameCallback} [slideLoaderOptions.filename] - A string to display as the file name or a callback function. If no value is supplied, no file name is displayed.\r\n * @param {boolean|PMA.UI.View.Viewport~attributionOptions}[slideLoaderOptions.attributions=undefined] - Whether or not to display Pathomation attribution in the viewer\r\n * @param {Array<PMA.UI.View.Viewport~customButton>} [slideLoaderOptions.customButtons] - An array of one or more custom buttons to add to the viewer\r\n * @param {Object|boolean} [options.magnifier=false] - Whether or not to show the magnifier control\r\n * @param {Object|boolean} [options.magnifier.collapsed=undefined] - Whether or not to show the magnifier control in collapsed state\r\n * @param {Object} [options.grid] - Options for measurement grid\r\n * @param {Array<number>} [options.grid.size] - Grid cell width and height in micrometers\r\n * @fires PMA.UI.Components.Events#SlideInfoError\r\n * @fires PMA.UI.Components.Events#BeforeSlideLoad\r\n * @fires PMA.UI.Components.Events#SlideLoaded\r\n * @fires PMA.UI.Components.Events#BeforeDrop\r\n * @tutorial 03-gallery\r\n * @tutorial 04-tree\r\n * @tutorial 05-annotations\r\n */\r\nexport class SlideLoader {\r\n    constructor(context, slideLoaderOptions) {\r\n        if (!checkBrowserCompatibility()) {\r\n            return;\r\n        }\r\n\r\n        this.loadingImage = false;\r\n        this.lastLoadImageRequest = null;\r\n        this.context = context;\r\n        this.slideLoaderOptions = slideLoaderOptions || {};\r\n\r\n        this.listeners = {};\r\n        this.listeners[Events.SlideInfoError] = [];\r\n        this.listeners[Events.BeforeSlideLoad] = [];\r\n        this.listeners[Events.SlideLoaded] = [];\r\n        this.listeners[Events.BeforeDrop] = [];\r\n\r\n        /**\r\n         * The currently loaded {@link PMA.UI.View.Viewport} instance, or null\r\n         * @public\r\n         */\r\n        this.mainViewport = null;\r\n\r\n        // try to get the element\r\n        if (this.slideLoaderOptions.element) {\r\n            if (this.slideLoaderOptions.element instanceof HTMLElement) {\r\n                this.element = this.slideLoaderOptions.element;\r\n            }\r\n            else if (typeof this.slideLoaderOptions.element == \"string\") {\r\n                var el = document.querySelector(this.slideLoaderOptions.element);\r\n                if (!el) {\r\n                    throw \"Invalid selector for element\";\r\n                }\r\n                else {\r\n                    this.element = el;\r\n                }\r\n            }\r\n        }\r\n\r\n        initializeDropZone.call(this);\r\n    }\r\n    /**\r\n             * Sets or overrides the value of an option. Useful when it is required to modify a viewer option before loading as slide.\r\n             * @param  {string} option\r\n             * @param  {any} value\r\n             */\r\n    setOption(option, value) {\r\n        this.slideLoaderOptions[option] = value;\r\n    }\r\n    /**\r\n             * Gets the value of a viewer option.\r\n             * @param  {string} option\r\n             * @param  {any} value\r\n             * @return {any} The value of the option or undefined\r\n             */\r\n    getOption(option) {\r\n        return this.slideLoaderOptions[option];\r\n    }\r\n    /**\r\n             * Creates a {@link PMA.UI.View.Viewport} instance that loads the requested slide\r\n             * @param  {string} serverUrl - PMA.core server URL\r\n             * @param  {string} path - Path or UID of the slide load\r\n             * @param  {function} [doneCb] - Called when the slide has finished loading\r\n             * @param {boolean} [dropped] - Whether this slide was loaded by a drag and drop operation\r\n             * @fires PMA.UI.Components.Events#BeforeSlideLoad\r\n             * @fires PMA.UI.Components.Events#SlideLoaded\r\n             * @fires PMA.UI.Components.Events#SlideInfoError\r\n             */\r\n    load(serverUrl, path, doneCb, dropped) {\r\n        if (this.loadingImage === true) {\r\n            //console.error(\"SlideLoader.loadImage: Last load image call hasn't finished yet\");\r\n            this.lastLoadImageRequest = {\r\n                serverUrl: serverUrl,\r\n                path: path,\r\n                doneCb: doneCb,\r\n                dropped: dropped === true ? true : false\r\n            };\r\n\r\n            return;\r\n        }\r\n\r\n        if (dropped !== true) {\r\n            dropped = false;\r\n        }\r\n\r\n        this.loadingImage = true;\r\n\r\n        if (this.mainViewport && this.mainViewport.map) {\r\n            while (this.mainViewport.map.getInteractions().getLength() > 0) {\r\n                this.mainViewport.map.removeInteraction(this.mainViewport.map.getInteractions().item(0));\r\n            }\r\n\r\n            while (this.mainViewport.map.getLayers().getLength() > 0) {\r\n                this.mainViewport.map.removeLayer(this.mainViewport.map.getLayers().item(0));\r\n            }\r\n\r\n            while (this.mainViewport.map.getControls().getLength() > 0) {\r\n                this.mainViewport.map.removeControl(this.mainViewport.map.getControls().item(0));\r\n            }\r\n        }\r\n\r\n        var beforeLoadEa = { serverUrl: serverUrl, path: path, cancel: false };\r\n        this.fireEvent(Events.BeforeSlideLoad, beforeLoadEa);\r\n\r\n        if (beforeLoadEa.cancel) {\r\n            this.loadingImage = false;\r\n            return;\r\n        }\r\n\r\n        var _this = this;\r\n        if (!serverUrl || !path) {\r\n            if (this.mainViewport) {\r\n                this.mainViewport.element.innerHTML = \"\";\r\n                this.mainViewport = null;\r\n            }\r\n\r\n            this.loadingImage = false;\r\n            this.fireEvent(Events.SlideLoaded, { serverUrl: serverUrl, path: path, dropped: dropped });\r\n            if (typeof doneCb === \"function\") {\r\n                doneCb();\r\n            }\r\n\r\n            checkReloadImage.call(_this, serverUrl, path, doneCb, dropped);\r\n            return;\r\n        }\r\n\r\n        this.context.getSession(serverUrl, function (sessionId) {\r\n            var opts = clone(_this.slideLoaderOptions);\r\n\r\n            opts.serverUrls = [serverUrl];\r\n            opts.image = path;\r\n            opts.sessionID = sessionId;\r\n            opts.caller = _this.context.getCaller();\r\n\r\n            _this.mainViewport = new Viewport(opts, function () {\r\n                _this.loadingImage = false;\r\n                _this.fireEvent(Events.SlideLoaded, { serverUrl: serverUrl, path: path, dropped: dropped });\r\n\r\n                if (typeof doneCb === \"function\") {\r\n                    doneCb();\r\n                }\r\n\r\n                checkReloadImage.call(_this, serverUrl, path, doneCb, dropped);\r\n            }, function () {\r\n                _this.loadingImage = false;\r\n                console.error(\"Error loading slide\");\r\n            });\r\n\r\n            var count = 0;\r\n            _this.mainViewport.listen(\"tileserror\", function () {\r\n                if (count === 0) {\r\n                    count++;\r\n                    _sessionList.set(serverUrl, null);\r\n\r\n                    _this.context.getSession(serverUrl, function (newSessionId) {\r\n                        count = -1;\r\n                        _this.mainViewport.sessionID = newSessionId;\r\n                        _this.mainViewport.redraw();\r\n                    }, function () {\r\n                        _this.fireEvent(Events.SlideInfoError, {});\r\n                    });\r\n                }\r\n                else if (count === -1) {\r\n                    count = 0;\r\n                    _this.fireEvent(Events.SlideInfoError, {});\r\n                }\r\n            });\r\n\r\n            _this.mainViewport.listen(\"SlideLoadError\", function () {\r\n                _this.loadingImage = false;\r\n                _this.fireEvent(Events.SlideInfoError, {});\r\n                checkReloadImage.call(_this, serverUrl, path, doneCb, dropped);\r\n            });\r\n        },\r\n            function () {\r\n                _this.loadingImage = false;\r\n                _this.fireEvent(Events.SlideInfoError, {});\r\n                checkReloadImage.call(_this, serverUrl, path, doneCb, dropped);\r\n            });\r\n    }\r\n    /**\r\n             * Gets the image info of the currently loaded image\r\n             * @return {object|null}\r\n             */\r\n    getLoadedImageInfo() {\r\n        if (this.mainViewport && this.mainViewport.map && this.mainViewport.imageInfo) {\r\n            return this.mainViewport.imageInfo;\r\n        }\r\n\r\n        return null;\r\n    }\r\n    /**\r\n             * Reloads annotations from the server\r\n             * @param {function} [readyCallback] - Called when the annotations have finished loading\r\n             */\r\n    reloadAnnotations(readyCallback) {\r\n        if (this.mainViewport && this.mainViewport.map && this.mainViewport.imageInfo) {\r\n            this.mainViewport.reloadAnnotations(readyCallback);\r\n            return;\r\n        }\r\n\r\n        if (typeof readyCallback === \"function\") {\r\n            readyCallback.call(this);\r\n        }\r\n    }\r\n    /**\r\n             * Attaches an event listener\r\n             * @param {PMA.UI.Components.Events} eventName - The name of the event to listen to\r\n             * @param {function} callback - The function to call when the event occurs\r\n             */\r\n    listen(eventName, callback) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" is not a valid event\");\r\n        }\r\n\r\n        this.listeners[eventName].push(callback);\r\n    }\r\n    // fires an event\r\n    fireEvent(eventName, eventArgs) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" does not exist\");\r\n            return;\r\n        }\r\n\r\n        var returns = [];\r\n        for (var i = 0, max = this.listeners[eventName].length; i < max; i++) {\r\n            returns.push(this.listeners[eventName][i].call(this, eventArgs));\r\n        }\r\n\r\n        return returns;\r\n    }\r\n}\r\n\r\n\r\n","import { coordEach } from '@turf/meta';\nimport { isObject } from '@turf/helpers';\n\n/**\n * Takes a GeoJSON Feature or FeatureCollection and truncates the precision of the geometry.\n *\n * @name truncate\n * @param {GeoJSON} geojson any GeoJSON Feature, FeatureCollection, Geometry or GeometryCollection.\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.precision=6] coordinate decimal precision\n * @param {number} [options.coordinates=3] maximum number of coordinates (primarly used to remove z coordinates)\n * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)\n * @returns {GeoJSON} layer with truncated geometry\n * @example\n * var point = turf.point([\n *     70.46923055566859,\n *     58.11088890802906,\n *     1508\n * ]);\n * var options = {precision: 3, coordinates: 2};\n * var truncated = turf.truncate(point, options);\n * //=truncated.geometry.coordinates => [70.469, 58.111]\n *\n * //addToMap\n * var addToMap = [truncated];\n */\nfunction truncate(geojson, options) {\n    // Optional parameters\n    options = options || {};\n    if (!isObject(options)) throw new Error('options is invalid');\n    var precision = options.precision;\n    var coordinates = options.coordinates;\n    var mutate = options.mutate;\n\n    // default params\n    precision = (precision === undefined || precision === null || isNaN(precision)) ? 6 : precision;\n    coordinates = (coordinates === undefined || coordinates === null || isNaN(coordinates)) ? 3 : coordinates;\n\n    // validation\n    if (!geojson) throw new Error('<geojson> is required');\n    if (typeof precision !== 'number') throw new Error('<precision> must be a number');\n    if (typeof coordinates !== 'number') throw new Error('<coordinates> must be a number');\n\n    // prevent input mutation\n    if (mutate === false || mutate === undefined) geojson = JSON.parse(JSON.stringify(geojson));\n\n    var factor = Math.pow(10, precision);\n\n    // Truncate Coordinates\n    coordEach(geojson, function (coords) {\n        truncateCoords(coords, factor, coordinates);\n    });\n    return geojson;\n}\n\n/**\n * Truncate Coordinates - Mutates coordinates in place\n *\n * @private\n * @param {Array<any>} coords Geometry Coordinates\n * @param {number} factor rounding factor for coordinate decimal precision\n * @param {number} coordinates maximum number of coordinates (primarly used to remove z coordinates)\n * @returns {Array<any>} mutated coordinates\n */\nfunction truncateCoords(coords, factor, coordinates) {\n    // Remove extra coordinates (usually elevation coordinates and more)\n    if (coords.length > coordinates) coords.splice(coordinates, coords.length);\n\n    // Truncate coordinate decimals\n    for (var i = 0; i < coords.length; i++) {\n        coords[i] = Math.round(coords[i] * factor) / factor;\n    }\n    return coords;\n}\n\nexport default truncate;\n","import { GeoJSONReader, GeoJSONWriter, OverlayOp } from 'turf-jsts';\nimport truncate from '@turf/truncate';\nimport { getGeom } from '@turf/invariant';\nimport { feature } from '@turf/helpers';\nimport cleanCoords from '@turf/clean-coords';\n\n// depend on jsts for now http://bjornharrtell.github.io/jsts/\n/**\n * Takes two {@link Polygon|polygons} and finds their intersection. If they share a border, returns the border; if they don't intersect, returns undefined.\n *\n * @name intersect\n * @param {Feature<Polygon>} poly1 the first polygon\n * @param {Feature<Polygon>} poly2 the second polygon\n * @returns {Feature|null} returns a feature representing the point(s) they share (in case of a {@link Point}  or {@link MultiPoint}), the borders they share (in case of a {@link LineString} or a {@link MultiLineString}), the area they share (in case of {@link Polygon} or {@link MultiPolygon}). If they do not share any point, returns `null`.\n * @example\n * var poly1 = turf.polygon([[\n *   [-122.801742, 45.48565],\n *   [-122.801742, 45.60491],\n *   [-122.584762, 45.60491],\n *   [-122.584762, 45.48565],\n *   [-122.801742, 45.48565]\n * ]]);\n *\n * var poly2 = turf.polygon([[\n *   [-122.520217, 45.535693],\n *   [-122.64038, 45.553967],\n *   [-122.720031, 45.526554],\n *   [-122.669906, 45.507309],\n *   [-122.723464, 45.446643],\n *   [-122.532577, 45.408574],\n *   [-122.487258, 45.477466],\n *   [-122.520217, 45.535693]\n * ]]);\n *\n * var intersection = turf.intersect(poly1, poly2);\n *\n * //addToMap\n * var addToMap = [poly1, poly2, intersection];\n */\nfunction intersect(poly1, poly2) {\n    var geom1 = getGeom(poly1);\n    var geom2 = getGeom(poly2);\n\n    // Return null if geometry is too narrow in coordinate precision\n    // fixes topology errors with JSTS\n    // https://github.com/Turfjs/turf/issues/463\n    // https://github.com/Turfjs/turf/pull/1004\n    if (cleanCoords(truncate(geom2, {precision: 4})).coordinates[0].length < 4) return null;\n    if (cleanCoords(truncate(geom1, {precision: 4})).coordinates[0].length < 4) return null;\n\n    var reader = new GeoJSONReader();\n    var a = reader.read(truncate(geom1));\n    var b = reader.read(truncate(geom2));\n    var intersection = OverlayOp.intersection(a, b);\n\n    // https://github.com/Turfjs/turf/issues/951\n    if (intersection.isEmpty()) return null;\n\n    var writer = new GeoJSONWriter();\n    var geom = writer.write(intersection);\n    return feature(geom);\n}\n\nexport default intersect;\n","import ol_style_Style from 'ol/style/Style';\r\nimport ol_style_Stroke from 'ol/style/Stroke';\r\nimport ol_source_Vector from 'ol/source/Vector';\r\nimport ol_style_Fill from 'ol/style/Fill';\r\nimport ol_layer_Vector from 'ol/layer/Vector';\r\nimport ol_geom_Point from 'ol/geom/Point';\r\nimport ol_Feature from 'ol/Feature';\r\nimport ol_Collection from 'ol/Collection';\r\nimport ol_interaction_Pointer from 'ol/interaction/Pointer';\r\nimport ol_style_RegularShape from 'ol/style/RegularShape';\r\nimport { fromExtent as ol_geom_Polygon_fromExtent } from 'ol/geom/Polygon';\r\nimport { boundingExtent as ol_extent_boundingExtent, buffer as ol_extent_buffer, createEmpty as ol_extent_createEmpty, extend as ol_extent_extend, getCenter as ol_extent_getCenter } from 'ol/extent';\r\nimport { unByKey as ol_Observable_unByKey } from 'ol/Observable';\r\n\r\n/** Interaction rotate\r\n * @constructor\r\n * @extends {ol_interaction_Pointer}\r\n * @fires select | rotatestart | rotating | rotateend | translatestart | translating | translateend | scalestart | scaling | scaleend\r\n * @param {any} options\r\n *  @param {function} options.filter A function that takes a Feature and a Layer and returns true if the feature may be transformed or false otherwise.\r\n *  @param {Array<ol.Layer>} options.layers array of layers to transform,\r\n *  @param {ol.Collection<ol.Feature>} options.features collection of feature to transform,\r\n *\t@param {ol.EventsConditionType|undefined} options.condition A function that takes an ol.MapBrowserEvent and a feature collection and returns a boolean to indicate whether that event should be handled. default: ol.events.condition.always.\r\n *\t@param {ol.EventsConditionType|undefined} options.addCondition A function that takes an ol.MapBrowserEvent and returns a boolean to indicate whether that event should be handled ie. the feature will be added to the transforms features. default: ol.events.condition.never.\r\n *\t@param {number | undefined} options.hitTolerance Tolerance to select feature in pixel, default 0\r\n *\t@param {bool} options.translateFeature Translate when click on feature\r\n *\t@param {bool} options.translate Can translate the feature\r\n *  @param {bool} options.translateBBox Enable translate when the user drags inside the bounding box\r\n *\t@param {bool} options.stretch can stretch the feature\r\n *\t@param {bool} options.scale can scale the feature\r\n *\t@param {bool} options.rotate can rotate the feature\r\n *\t@param {bool} options.noFlip prevent the feature geometry to flip, default false\r\n *\t@param {bool} options.selection the intraction handle selection/deselection, if not use the select prototype to add features to transform, default true\r\n *\t@param {ol.events.ConditionType | undefined} options.keepAspectRatio A function that takes an ol.MapBrowserEvent and returns a boolean to keep aspect ratio, default ol.events.condition.shiftKeyOnly.\r\n *\t@param {ol.events.ConditionType | undefined} options.modifyCenter A function that takes an ol.MapBrowserEvent and returns a boolean to apply scale & strech from the center, default ol.events.condition.metaKey or ol.events.condition.ctrlKey.\r\n *\t@param {boolean} options.enableRotatedTransform Enable transform when map is rotated\r\n *\t@param {} options.style list of ol.style for handles\r\n *\r\n */\r\nvar ol_interaction_Transform = function (options) {\r\n    if (!options) options = {};\r\n    var self = this;\r\n\r\n    this.selection_ = new ol_Collection();\r\n\r\n    // Create a new overlay layer for the sketch\r\n    this.handles_ = new ol_Collection();\r\n    this.overlayLayer_ = new ol_layer_Vector({\r\n        source: new ol_source_Vector({\r\n            features: this.handles_,\r\n            useSpatialIndex: false,\r\n            wrapX: false // For vector editing across the -180° and 180° meridians to work properly, this should be set to false\r\n        }),\r\n        name: 'Transform overlay',\r\n        displayInLayerSwitcher: false,\r\n        // Return the style according to the handle type\r\n        style: function (feature) {\r\n            return (self.style[(feature.get('handle') || 'default') + (feature.get('constraint') || '') + (feature.get('option') || '')]);\r\n        },\r\n    });\r\n\r\n    // Extend pointer\r\n    ol_interaction_Pointer.call(this, {\r\n        handleDownEvent: this.handleDownEvent_,\r\n        handleDragEvent: this.handleDragEvent_,\r\n        handleMoveEvent: this.handleMoveEvent_,\r\n        handleUpEvent: this.handleUpEvent_\r\n    });\r\n\r\n    // Collection of feature to transform\r\n    this.features_ = options.features;\r\n    // Filter or list of layers to transform\r\n    if (typeof (options.filter) === 'function') this._filter = options.filter;\r\n    this.layers_ = options.layers ? (options.layers instanceof Array) ? options.layers : [options.layers] : null;\r\n\r\n    this._handleEvent = options.condition || function () { return true; };\r\n    this.addFn_ = options.addCondition || function () { return false; };\r\n    /* Translate when click on feature */\r\n    this.set('translateFeature', (options.translateFeature !== false));\r\n    /* Can translate the feature */\r\n    this.set('translate', (options.translate !== false));\r\n    /* Translate when click on the bounding box */\r\n    this.set('translateBBox', (options.translateBBox === true));\r\n    /* Can stretch the feature */\r\n    this.set('stretch', (options.stretch !== false));\r\n    /* Can scale the feature */\r\n    this.set('scale', (options.scale !== false));\r\n    /* Can rotate the feature */\r\n    this.set('rotate', (options.rotate !== false));\r\n    /* Keep aspect ratio */\r\n    this.set('keepAspectRatio', (options.keepAspectRatio || function (e) { return e.originalEvent.shiftKey }));\r\n    /* Modify center */\r\n    this.set('modifyCenter', (options.modifyCenter || function (e) { return e.originalEvent.metaKey || e.originalEvent.ctrlKey }));\r\n    /* Prevent flip */\r\n    this.set('noFlip', (options.noFlip || false));\r\n    /* Handle selection */\r\n    this.set('selection', (options.selection !== false));\r\n    /*  */\r\n    this.set('hitTolerance', (options.hitTolerance || 0));\r\n    /* Enable view rotated transforms */\r\n    this.set('enableRotatedTransform', (options.enableRotatedTransform || false));\r\n\r\n\r\n    // Force redraw when changed\r\n    this.on('propertychange', function () {\r\n        this.drawSketch_();\r\n    });\r\n\r\n    // setstyle\r\n    this.setDefaultStyle();\r\n};\r\n//ol_ext_inherits(ol_interaction_Transform, ol_interaction_Pointer);\r\nol_interaction_Transform.prototype = Object.create(ol_interaction_Pointer.prototype);\r\nol_interaction_Transform.prototype.constructor = ol_interaction_Transform;\r\n\r\n/** Cursors for transform\r\n*/\r\nol_interaction_Transform.prototype.Cursors = {\r\n    'default': 'auto',\r\n    'select': 'pointer',\r\n    'translate': 'move',\r\n    'rotate': 'move',\r\n    'rotate0': 'move',\r\n    'scale': 'nesw-resize',\r\n    'scale1': 'nwse-resize',\r\n    'scale2': 'nesw-resize',\r\n    'scale3': 'nwse-resize',\r\n    'scalev': 'ew-resize',\r\n    'scaleh1': 'ns-resize',\r\n    'scalev2': 'ew-resize',\r\n    'scaleh3': 'ns-resize'\r\n};\r\n\r\n/**\r\n * Remove the interaction from its current map, if any,  and attach it to a new\r\n * map, if any. Pass `null` to just remove the interaction from the current map.\r\n * @param {ol.Map} map Map.\r\n * @api stable\r\n */\r\nol_interaction_Transform.prototype.setMap = function (map) {\r\n    var oldMap = this.getMap();\r\n    if (oldMap) {\r\n        var targetElement = oldMap.getTargetElement();\r\n        oldMap.removeLayer(this.overlayLayer_);\r\n        if (this.previousCursor_ && targetElement) {\r\n            targetElement.style.cursor = this.previousCursor_;\r\n        }\r\n        this.previousCursor_ = undefined;\r\n    }\r\n    ol_interaction_Pointer.prototype.setMap.call(this, map);\r\n    this.overlayLayer_.setMap(map);\r\n    if (map === null) {\r\n        this.select(null);\r\n    }\r\n    if (map !== null) {\r\n        this.isTouch = /touch/.test(map.getViewport().className);\r\n        this.setDefaultStyle();\r\n    }\r\n};\r\n\r\n/**\r\n * Activate/deactivate interaction\r\n * @param {bool}\r\n * @api stable\r\n */\r\nol_interaction_Transform.prototype.setActive = function (b) {\r\n    this.select(null);\r\n    this.overlayLayer_.setVisible(b);\r\n    ol_interaction_Pointer.prototype.setActive.call(this, b);\r\n};\r\n\r\n/** Set efault sketch style\r\n*/\r\nol_interaction_Transform.prototype.setDefaultStyle = function () {\r\n    // Style\r\n    var stroke = new ol_style_Stroke({ color: [255, 0, 0, 1], width: 1 });\r\n    var strokedash = new ol_style_Stroke({ color: [255, 0, 0, 1], width: 1, lineDash: [4, 4] });\r\n    var fill0 = new ol_style_Fill({ color: [255, 0, 0, 0.01] });\r\n    var fill = new ol_style_Fill({ color: [255, 255, 255, 0.8] });\r\n    var circle = new ol_style_RegularShape({\r\n        fill: fill,\r\n        stroke: stroke,\r\n        radius: this.isTouch ? 12 : 6,\r\n        points: 15\r\n    });\r\n    circle.getAnchor()[0] = this.isTouch ? -10 : -5;\r\n    var bigpt = new ol_style_RegularShape({\r\n        fill: fill,\r\n        stroke: stroke,\r\n        radius: this.isTouch ? 16 : 8,\r\n        points: 4,\r\n        angle: Math.PI / 4\r\n    });\r\n    var smallpt = new ol_style_RegularShape({\r\n        fill: fill,\r\n        stroke: stroke,\r\n        radius: this.isTouch ? 12 : 6,\r\n        points: 4,\r\n        angle: Math.PI / 4\r\n    });\r\n    function createStyle(img, stroke, fill) {\r\n        return [new ol_style_Style({ image: img, stroke: stroke, fill: fill })];\r\n    }\r\n    /** Style for handles */\r\n    this.style = {\r\n        'default': createStyle(bigpt, strokedash, fill0),\r\n        'translate': createStyle(bigpt, stroke, fill),\r\n        'rotate': createStyle(circle, stroke, fill),\r\n        'rotate0': createStyle(bigpt, stroke, fill),\r\n        'scale': createStyle(bigpt, stroke, fill),\r\n        'scale1': createStyle(bigpt, stroke, fill),\r\n        'scale2': createStyle(bigpt, stroke, fill),\r\n        'scale3': createStyle(bigpt, stroke, fill),\r\n        'scalev': createStyle(smallpt, stroke, fill),\r\n        'scaleh1': createStyle(smallpt, stroke, fill),\r\n        'scalev2': createStyle(smallpt, stroke, fill),\r\n        'scaleh3': createStyle(smallpt, stroke, fill),\r\n    };\r\n    this.drawSketch_();\r\n}\r\n\r\n/**\r\n * Set sketch style.\r\n * @param {style} style Style name: 'default','translate','rotate','rotate0','scale','scale1','scale2','scale3','scalev','scaleh1','scalev2','scaleh3'\r\n * @param {ol.style.Style|Array<ol.style.Style>} olstyle\r\n * @api stable\r\n */\r\nol_interaction_Transform.prototype.setStyle = function (style, olstyle) {\r\n    if (!olstyle) return;\r\n    if (olstyle instanceof Array) this.style[style] = olstyle;\r\n    else this.style[style] = [olstyle];\r\n    for (var i = 0; i < this.style[style].length; i++) {\r\n        var im = this.style[style][i].getImage();\r\n        if (im) {\r\n            if (style == 'rotate') im.getAnchor()[0] = -5;\r\n            if (this.isTouch) im.setScale(1.8);\r\n        }\r\n        var tx = this.style[style][i].getText();\r\n        if (tx) {\r\n            if (style == 'rotate') tx.setOffsetX(this.isTouch ? 14 : 7);\r\n            if (this.isTouch) tx.setScale(1.8);\r\n        }\r\n    }\r\n    this.drawSketch_();\r\n};\r\n\r\n/** Get Feature at pixel\r\n * @param {ol.Pixel}\r\n * @return {ol.feature}\r\n * @private\r\n */\r\nol_interaction_Transform.prototype.getFeatureAtPixel_ = function (pixel) {\r\n    var self = this;\r\n    return this.getMap().forEachFeatureAtPixel(pixel,\r\n        function (feature, layer) {\r\n            var found = false;\r\n            // Overlay ?\r\n            if (!layer) {\r\n                if (feature === self.bbox_) {\r\n                    if (self.get('translateBBox')) {\r\n                        return { feature: feature, handle: 'translate', constraint: '', option: '' };\r\n                    } else {\r\n                        return false;\r\n                    }\r\n                }\r\n                self.handles_.forEach(function (f) { if (f === feature) found = true; });\r\n                if (found) return { feature: feature, handle: feature.get('handle'), constraint: feature.get('constraint'), option: feature.get('option') };\r\n            }\r\n            // No seletion\r\n            if (!self.get('selection')) {\r\n                // Return the currently selected feature the user is interacting with.\r\n                if (self.selection_.getArray().some(function (f) { return feature === f; })) {\r\n                    return { feature: feature };\r\n                }\r\n                return null;\r\n            }\r\n            // filter condition\r\n            if (self._filter) {\r\n                if (self._filter(feature, layer)) return { feature: feature };\r\n                else return null;\r\n            }\r\n            // feature belong to a layer\r\n            else if (self.layers_) {\r\n                for (var i = 0; i < self.layers_.length; i++) {\r\n                    if (self.layers_[i] === layer) return { feature: feature };\r\n                }\r\n                return null;\r\n            }\r\n            // feature in the collection\r\n            else if (self.features_) {\r\n                self.features_.forEach(function (f) { if (f === feature) found = true; });\r\n                if (found) return { feature: feature };\r\n                else return null;\r\n            }\r\n            // Others\r\n            else return { feature: feature };\r\n        },\r\n        { hitTolerance: this.get('hitTolerance') }\r\n    ) || {};\r\n}\r\n\r\n/** Rotate feature from map view rotation\r\n * @param {ol.Feature} f the feature\r\n * @param {boolean} clone clone resulting geom\r\n * @param {ol.geom.Geometry} rotated geometry\r\n */\r\nol_interaction_Transform.prototype.getGeometryRotateToZero_ = function (f, clone) {\r\n    var origGeom = f.getGeometry();\r\n    var viewRotation = this.getMap().getView().getRotation();\r\n    if (viewRotation === 0 || !this.get('enableRotatedTransform')) {\r\n        return (clone) ? origGeom.clone() : origGeom;\r\n    }\r\n    var rotGeom = origGeom.clone();\r\n    rotGeom.rotate(viewRotation * -1, this.getMap().getView().getCenter());\r\n    return rotGeom;\r\n}\r\n\r\n/** Draw transform sketch\r\n* @param {boolean} draw only the center\r\n*/\r\nol_interaction_Transform.prototype.drawSketch_ = function (center) {\r\n    var i, f, geom;\r\n    this.overlayLayer_.getSource().clear();\r\n    if (!this.selection_.getLength()) return;\r\n    var viewRotation = this.getMap().getView().getRotation();\r\n    var ext = this.getGeometryRotateToZero_(this.selection_.item(0)).getExtent();\r\n    // Clone and extend\r\n    ext = ol_extent_buffer(ext, 0);\r\n    this.selection_.forEach(function (f) {\r\n        var extendExt = this.getGeometryRotateToZero_(f).getExtent();\r\n        ol_extent_extend(ext, extendExt);\r\n    }.bind(this));\r\n\r\n    if (center === true) {\r\n        if (!this.ispt_) {\r\n            this.overlayLayer_.getSource().addFeature(new ol_Feature({ geometry: new ol_geom_Point(this.center_), handle: 'rotate0' }));\r\n            geom = ol_geom_Polygon_fromExtent(ext);\r\n            if (this.get('enableRotatedTransform') && viewRotation !== 0) {\r\n                geom.rotate(viewRotation, this.getMap().getView().getCenter())\r\n            }\r\n            f = this.bbox_ = new ol_Feature(geom);\r\n            this.overlayLayer_.getSource().addFeature(f);\r\n        }\r\n    }\r\n    else {\r\n        if (this.ispt_) {\r\n            var p = this.getMap().getPixelFromCoordinate([ext[0], ext[1]]);\r\n            ext = ol_extent_boundingExtent([\r\n                this.getMap().getCoordinateFromPixel([p[0] - 10, p[1] - 10]),\r\n                this.getMap().getCoordinateFromPixel([p[0] + 10, p[1] + 10])\r\n            ]);\r\n        }\r\n        geom = ol_geom_Polygon_fromExtent(ext);\r\n        if (this.get('enableRotatedTransform') && viewRotation !== 0) {\r\n            geom.rotate(viewRotation, this.getMap().getView().getCenter())\r\n        }\r\n        f = this.bbox_ = new ol_Feature(geom);\r\n        var features = [];\r\n        var g = geom.getCoordinates()[0];\r\n        if (!this.ispt_) {\r\n            features.push(f);\r\n            // Middle\r\n            if (!this.iscircle_ && this.get('stretch') && this.get('scale')) for (i = 0; i < g.length - 1; i++) {\r\n                f = new ol_Feature({ geometry: new ol_geom_Point([(g[i][0] + g[i + 1][0]) / 2, (g[i][1] + g[i + 1][1]) / 2]), handle: 'scale', constraint: i % 2 ? \"h\" : \"v\", option: i });\r\n                features.push(f);\r\n            }\r\n            // Handles\r\n            if (this.get('scale')) for (i = 0; i < g.length - 1; i++) {\r\n                f = new ol_Feature({ geometry: new ol_geom_Point(g[i]), handle: 'scale', option: i });\r\n                features.push(f);\r\n            }\r\n            // Center\r\n            if (this.get('translate') && !this.get('translateFeature')) {\r\n                f = new ol_Feature({ geometry: new ol_geom_Point([(g[0][0] + g[2][0]) / 2, (g[0][1] + g[2][1]) / 2]), handle: 'translate' });\r\n                features.push(f);\r\n            }\r\n        }\r\n        // Rotate\r\n        if (!this.iscircle_ && this.get('rotate')) {\r\n            f = new ol_Feature({ geometry: new ol_geom_Point(g[3]), handle: 'rotate' });\r\n            features.push(f);\r\n        }\r\n        // Add sketch\r\n        this.overlayLayer_.getSource().addFeatures(features);\r\n    }\r\n\r\n};\r\n\r\n/** Select a feature to transform\r\n* @param {ol.Feature} feature the feature to transform\r\n* @param {boolean} add true to add the feature to the selection, default false\r\n*/\r\nol_interaction_Transform.prototype.select = function (feature, add) {\r\n    if (!feature) {\r\n        this.selection_.clear();\r\n        this.drawSketch_();\r\n        return;\r\n    }\r\n    if (!feature.getGeometry || !feature.getGeometry()) return;\r\n    // Add to selection\r\n    if (add) {\r\n        this.selection_.push(feature);\r\n    } else {\r\n        var index = this.selection_.getArray().indexOf(feature);\r\n        this.selection_.removeAt(index);\r\n    }\r\n    this.ispt_ = (this.selection_.getLength() === 1 ? (this.selection_.item(0).getGeometry().getType() == \"Point\") : false);\r\n    this.iscircle_ = (this.selection_.getLength() === 1 ? (this.selection_.item(0).getGeometry().getType() == \"Circle\") : false);\r\n    this.drawSketch_();\r\n    this.watchFeatures_();\r\n    // select event\r\n    this.dispatchEvent({ type: 'select', feature: feature, features: this.selection_ });\r\n};\r\n\r\n/** Update the selection collection.\r\n* @param {ol.Collection<ol.Feature>} features the features to transform\r\n*/\r\nol_interaction_Transform.prototype.setSelection = function (features) {\r\n    this.selection_.clear();\r\n    features.forEach(function (feature) {\r\n        this.selection_.push(feature);\r\n    }.bind(this));\r\n\r\n    this.ispt_ = (this.selection_.getLength() === 1 ? (this.selection_.item(0).getGeometry().getType() == \"Point\") : false);\r\n    this.iscircle_ = (this.selection_.getLength() === 1 ? (this.selection_.item(0).getGeometry().getType() == \"Circle\") : false);\r\n    this.drawSketch_();\r\n    this.watchFeatures_();\r\n    // select event\r\n    this.dispatchEvent({ type: 'select', features: this.selection_ });\r\n};\r\n\r\n/** Watch selected features\r\n * @private\r\n */\r\nol_interaction_Transform.prototype.watchFeatures_ = function () {\r\n    // Listen to feature modification\r\n    if (this._featureListeners) {\r\n        this._featureListeners.forEach(function (l) {\r\n            ol_Observable_unByKey(l)\r\n        });\r\n    }\r\n    this._featureListeners = [];\r\n    this.selection_.forEach(function (f) {\r\n        this._featureListeners.push(\r\n            f.on('change', function () {\r\n                if (!this.isUpdating_) {\r\n                    this.drawSketch_();\r\n                }\r\n            }.bind(this))\r\n        );\r\n    }.bind(this));\r\n};\r\n\r\n/**\r\n * @param {ol.MapBrowserEvent} evt Map browser event.\r\n * @return {boolean} `true` to start the drag sequence.\r\n * @private\r\n */\r\nol_interaction_Transform.prototype.handleDownEvent_ = function (evt) {\r\n    if (!this._handleEvent(evt, this.selection_)) return;\r\n    var sel = this.getFeatureAtPixel_(evt.pixel);\r\n    var feature = sel.feature;\r\n    if (this.selection_.getLength()\r\n        && this.selection_.getArray().indexOf(feature) >= 0\r\n        && ((this.ispt_ && this.get('translate')) || this.get('translateFeature'))\r\n    ) {\r\n        sel.handle = 'translate';\r\n    }\r\n    if (sel.handle) {\r\n        this.mode_ = sel.handle;\r\n        this.opt_ = sel.option;\r\n        this.constraint_ = sel.constraint;\r\n        // Save info\r\n        var viewRotation = this.getMap().getView().getRotation();\r\n        this.coordinate_ = evt.coordinate;\r\n        this.pixel_ = evt.pixel;\r\n        this.geoms_ = [];\r\n        this.rotatedGeoms_ = [];\r\n        var extent = ol_extent_createEmpty();\r\n        var rotExtent = ol_extent_createEmpty();\r\n        for (var i = 0, f; f = this.selection_.item(i); i++) {\r\n            this.geoms_.push(f.getGeometry().clone());\r\n            extent = ol_extent_extend(extent, f.getGeometry().getExtent());\r\n            if (this.get('enableRotatedTransform') && viewRotation !== 0) {\r\n                var rotGeom = this.getGeometryRotateToZero_(f, true);\r\n                this.rotatedGeoms_.push(rotGeom);\r\n                rotExtent = ol_extent_extend(rotExtent, rotGeom.getExtent());\r\n            }\r\n        }\r\n        this.extent_ = (ol_geom_Polygon_fromExtent(extent)).getCoordinates()[0];\r\n        if (this.get('enableRotatedTransform') && viewRotation !== 0) {\r\n            this.rotatedExtent_ = (ol_geom_Polygon_fromExtent(rotExtent)).getCoordinates()[0];\r\n        }\r\n        if (this.mode_ === 'rotate') {\r\n            this.center_ = this.getCenter() || ol_extent_getCenter(extent);\r\n            // we are now rotating (cursor down on rotate mode), so apply the grabbing cursor\r\n            var element = evt.map.getTargetElement();\r\n            element.style.cursor = this.Cursors.rotate0;\r\n            this.previousCursor_ = element.style.cursor;\r\n        } else {\r\n            this.center_ = ol_extent_getCenter(extent);\r\n        }\r\n        this.angle_ = Math.atan2(this.center_[1] - evt.coordinate[1], this.center_[0] - evt.coordinate[0]);\r\n\r\n        this.dispatchEvent({\r\n            type: this.mode_ + 'start',\r\n            feature: this.selection_.item(0), // backward compatibility\r\n            features: this.selection_,\r\n            pixel: evt.pixel,\r\n            coordinate: evt.coordinate\r\n        });\r\n        return true;\r\n    }\r\n    else if (this.get('selection')) {\r\n        if (feature) {\r\n            if (!this.addFn_(evt)) this.selection_.clear();\r\n            var index = this.selection_.getArray().indexOf(feature);\r\n            if (index < 0) this.selection_.push(feature);\r\n            else this.selection_.removeAt(index);\r\n        } else {\r\n            this.selection_.clear();\r\n        }\r\n        this.ispt_ = this.selection_.getLength() === 1 ? (this.selection_.item(0).getGeometry().getType() == \"Point\") : false;\r\n        this.iscircle_ = (this.selection_.getLength() === 1 ? (this.selection_.item(0).getGeometry().getType() == \"Circle\") : false);\r\n        this.drawSketch_();\r\n        this.watchFeatures_();\r\n        this.dispatchEvent({ type: 'select', feature: feature, features: this.selection_, pixel: evt.pixel, coordinate: evt.coordinate });\r\n        return false;\r\n    }\r\n};\r\n\r\n\r\n/**\r\n * Get features to transform\r\n * @return {ol.Collection<ol.Feature>}\r\n */\r\nol_interaction_Transform.prototype.getFeatures = function () {\r\n    return this.selection_;\r\n};\r\n\r\n/**\r\n * Get the rotation center\r\n * @return {ol.coordinates|undefined}\r\n */\r\nol_interaction_Transform.prototype.getCenter = function () {\r\n    return this.get('center');\r\n};\r\n\r\n/**\r\n * Set the rotation center\r\n * @param {ol.coordinates|undefined} c the center point, default center on the objet\r\n */\r\nol_interaction_Transform.prototype.setCenter = function (c) {\r\n    return this.set('center', c);\r\n}\r\n\r\n/**\r\n * @param {ol.MapBrowserEvent} evt Map browser event.\r\n * @private\r\n */\r\nol_interaction_Transform.prototype.handleDragEvent_ = function (evt) {\r\n    if (!this._handleEvent(evt, this.features_)) return;\r\n    var viewRotation = this.getMap().getView().getRotation();\r\n    var i, f, geometry;\r\n    var pt0 = [this.coordinate_[0], this.coordinate_[1]];\r\n    var pt = [evt.coordinate[0], evt.coordinate[1]];\r\n    this.isUpdating_ = true;\r\n    switch (this.mode_) {\r\n        case 'rotate': {\r\n            var a = Math.atan2(this.center_[1] - pt[1], this.center_[0] - pt[0]);\r\n            if (!this.ispt) {\r\n                // var geometry = this.geom_.clone();\r\n                // geometry.rotate(a-this.angle_, this.center_);\r\n                // this.feature_.setGeometry(geometry);\r\n                for (i = 0, f; f = this.selection_.item(i); i++) {\r\n                    geometry = this.geoms_[i].clone();\r\n                    geometry.rotate(a - this.angle_, this.center_);\r\n                    // bug: ol, bad calculation circle geom extent\r\n                    if (geometry.getType() == 'Circle') geometry.setCenterAndRadius(geometry.getCenter(), geometry.getRadius());\r\n                    f.setGeometry(geometry);\r\n                }\r\n            }\r\n            this.drawSketch_(true);\r\n            this.dispatchEvent({\r\n                type: 'rotating',\r\n                feature: this.selection_.item(0),\r\n                features: this.selection_,\r\n                angle: a - this.angle_,\r\n                pixel: evt.pixel,\r\n                coordinate: evt.coordinate\r\n            });\r\n            break;\r\n        }\r\n        case 'translate': {\r\n            var deltaX = pt[0] - pt0[0];\r\n            var deltaY = pt[1] - pt0[1];\r\n\r\n            //this.feature_.getGeometry().translate(deltaX, deltaY);\r\n            for (i = 0, f; f = this.selection_.item(i); i++) {\r\n                f.getGeometry().translate(deltaX, deltaY);\r\n            }\r\n            this.handles_.forEach(function (f) {\r\n                f.getGeometry().translate(deltaX, deltaY);\r\n            });\r\n\r\n            this.coordinate_ = evt.coordinate;\r\n            this.dispatchEvent({\r\n                type: 'translating',\r\n                feature: this.selection_.item(0),\r\n                features: this.selection_,\r\n                delta: [deltaX, deltaY],\r\n                pixel: evt.pixel,\r\n                coordinate: evt.coordinate\r\n            });\r\n            break;\r\n        }\r\n        case 'scale': {\r\n            var center = this.center_;\r\n            if (this.get('modifyCenter')(evt)) {\r\n                var extentCoordinates = this.extent_;\r\n                if (this.get('enableRotatedTransform') && viewRotation !== 0) {\r\n                    extentCoordinates = this.rotatedExtent_;\r\n                }\r\n                center = extentCoordinates[(Number(this.opt_) + 2) % 4];\r\n            }\r\n\r\n            var downCoordinate = this.coordinate_;\r\n            var dragCoordinate = evt.coordinate;\r\n            if (this.get('enableRotatedTransform') && viewRotation !== 0) {\r\n                var downPoint = new ol_geom_Point(this.coordinate_);\r\n                downPoint.rotate(viewRotation * -1, center);\r\n                downCoordinate = downPoint.getCoordinates();\r\n\r\n                var dragPoint = new ol_geom_Point(evt.coordinate);\r\n                dragPoint.rotate(viewRotation * -1, center);\r\n                dragCoordinate = dragPoint.getCoordinates();\r\n            }\r\n\r\n            var scx = ((dragCoordinate)[0] - (center)[0]) / (downCoordinate[0] - (center)[0]);\r\n            var scy = ((dragCoordinate)[1] - (center)[1]) / (downCoordinate[1] - (center)[1]);\r\n\r\n            if (this.get('enableRotatedTransform') && viewRotation !== 0) {\r\n                var centerPoint = new ol_geom_Point(center);\r\n                centerPoint.rotate(viewRotation * -1, this.getMap().getView().getCenter());\r\n                center = centerPoint.getCoordinates();\r\n            }\r\n\r\n            if (this.get('noFlip')) {\r\n                if (scx < 0) scx = -scx;\r\n                if (scy < 0) scy = -scy;\r\n            }\r\n\r\n            if (this.constraint_) {\r\n                if (this.constraint_ == \"h\") scx = 1;\r\n                else scy = 1;\r\n            } else {\r\n                if (this.get('keepAspectRatio')(evt)) {\r\n                    scx = scy = Math.min(scx, scy);\r\n                }\r\n            }\r\n\r\n            for (i = 0, f; f = this.selection_.item(i); i++) {\r\n                geometry = (viewRotation === 0 || !this.get('enableRotatedTransform')) ? this.geoms_[i].clone() : this.rotatedGeoms_[i].clone();\r\n                geometry.applyTransform(function (g1, g2, dim) {\r\n                    if (dim < 2) return g2;\r\n\r\n                    for (var j = 0; j < g1.length; j += dim) {\r\n                        if (scx != 1) g2[j] = center[0] + (g1[j] - center[0]) * scx;\r\n                        if (scy != 1) g2[j + 1] = center[1] + (g1[j + 1] - center[1]) * scy;\r\n                    }\r\n                    // bug: ol, bad calculation circle geom extent\r\n                    if (geometry.getType() == 'Circle') geometry.setCenterAndRadius(geometry.getCenter(), geometry.getRadius());\r\n                    return g2;\r\n                });\r\n                if (this.get('enableRotatedTransform') && viewRotation !== 0) {\r\n                    //geometry.rotate(viewRotation, rotationCenter);\r\n                    geometry.rotate(viewRotation, this.getMap().getView().getCenter());\r\n                }\r\n                f.setGeometry(geometry);\r\n            }\r\n            this.drawSketch_();\r\n            this.dispatchEvent({\r\n                type: 'scaling',\r\n                feature: this.selection_.item(0),\r\n                features: this.selection_,\r\n                scale: [scx, scy],\r\n                pixel: evt.pixel,\r\n                coordinate: evt.coordinate\r\n            });\r\n            break;\r\n        }\r\n        default: break;\r\n    }\r\n    this.isUpdating_ = false;\r\n};\r\n\r\n/**\r\n * @param {ol.MapBrowserEvent} evt Event.\r\n * @private\r\n */\r\nol_interaction_Transform.prototype.handleMoveEvent_ = function (evt) {\r\n    if (!this._handleEvent(evt, this.features_)) return;\r\n    // console.log(\"handleMoveEvent\");\r\n    if (!this.mode_) {\r\n        var sel = this.getFeatureAtPixel_(evt.pixel);\r\n        var element = evt.map.getTargetElement();\r\n        if (sel.feature) {\r\n            var c = sel.handle ? this.Cursors[(sel.handle || 'default') + (sel.constraint || '') + (sel.option || '')] : this.Cursors.select;\r\n\r\n            if (this.previousCursor_ === undefined) {\r\n                this.previousCursor_ = element.style.cursor;\r\n            }\r\n            element.style.cursor = c;\r\n        } else {\r\n            if (this.previousCursor_ !== undefined) element.style.cursor = this.previousCursor_;\r\n            this.previousCursor_ = undefined;\r\n        }\r\n    }\r\n};\r\n\r\n/**\r\n * @param {ol.MapBrowserEvent} evt Map browser event.\r\n * @return {boolean} `false` to stop the drag sequence.\r\n */\r\nol_interaction_Transform.prototype.handleUpEvent_ = function (evt) {\r\n    // remove rotate0 cursor on Up event, otherwise it's stuck on grab/grabbing\r\n    if (this.mode_ === 'rotate') {\r\n        var element = evt.map.getTargetElement();\r\n        element.style.cursor = this.Cursors.default;\r\n        this.previousCursor_ = undefined;\r\n    }\r\n\r\n    //dispatchEvent\r\n    this.dispatchEvent({\r\n        type: this.mode_ + 'end',\r\n        feature: this.selection_.item(0),\r\n        features: this.selection_,\r\n        oldgeom: this.geoms_[0],\r\n        oldgeoms: this.geoms_\r\n    });\r\n\r\n    this.drawSketch_();\r\n    this.mode_ = null;\r\n    return false;\r\n};\r\n\r\n/** Get the features that are selected for transform\r\n * @return ol.Collection\r\n */\r\nol_interaction_Transform.prototype.getFeatures = function () {\r\n    return this.selection_;\r\n};\r\n\r\nexport default ol_interaction_Transform;","import { getCoord, getCoords } from '@turf/invariant';\n\n// http://en.wikipedia.org/wiki/Even%E2%80%93odd_rule\n// modified from: https://github.com/substack/point-in-polygon/blob/master/index.js\n// which was modified from http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html\n\n/**\n * Takes a {@link Point} and a {@link Polygon} or {@link MultiPolygon} and determines if the point resides inside the polygon. The polygon can\n * be convex or concave. The function accounts for holes.\n *\n * @name booleanPointInPolygon\n * @param {Coord} point input point\n * @param {Feature<Polygon|MultiPolygon>} polygon input polygon or multipolygon\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.ignoreBoundary=false] True if polygon boundary should be ignored when determining if the point is inside the polygon otherwise false.\n * @returns {boolean} `true` if the Point is inside the Polygon; `false` if the Point is not inside the Polygon\n * @example\n * var pt = turf.point([-77, 44]);\n * var poly = turf.polygon([[\n *   [-81, 41],\n *   [-81, 47],\n *   [-72, 47],\n *   [-72, 41],\n *   [-81, 41]\n * ]]);\n *\n * turf.booleanPointInPolygon(pt, poly);\n * //= true\n */\nfunction booleanPointInPolygon(point, polygon, options) {\n    // Optional parameters\n    options = options || {};\n    if (typeof options !== 'object') throw new Error('options is invalid');\n    var ignoreBoundary = options.ignoreBoundary;\n\n    // validation\n    if (!point) throw new Error('point is required');\n    if (!polygon) throw new Error('polygon is required');\n\n    var pt = getCoord(point);\n    var polys = getCoords(polygon);\n    var type = (polygon.geometry) ? polygon.geometry.type : polygon.type;\n    var bbox = polygon.bbox;\n\n    // Quick elimination if point is not inside bbox\n    if (bbox && inBBox(pt, bbox) === false) return false;\n\n    // normalize to multipolygon\n    if (type === 'Polygon') polys = [polys];\n\n    for (var i = 0, insidePoly = false; i < polys.length && !insidePoly; i++) {\n        // check if it is in the outer ring first\n        if (inRing(pt, polys[i][0], ignoreBoundary)) {\n            var inHole = false;\n            var k = 1;\n            // check for the point in any of the holes\n            while (k < polys[i].length && !inHole) {\n                if (inRing(pt, polys[i][k], !ignoreBoundary)) {\n                    inHole = true;\n                }\n                k++;\n            }\n            if (!inHole) insidePoly = true;\n        }\n    }\n    return insidePoly;\n}\n\n/**\n * inRing\n *\n * @private\n * @param {Array<number>} pt [x,y]\n * @param {Array<Array<number>>} ring [[x,y], [x,y],..]\n * @param {boolean} ignoreBoundary ignoreBoundary\n * @returns {boolean} inRing\n */\nfunction inRing(pt, ring, ignoreBoundary) {\n    var isInside = false;\n    if (ring[0][0] === ring[ring.length - 1][0] && ring[0][1] === ring[ring.length - 1][1]) ring = ring.slice(0, ring.length - 1);\n\n    for (var i = 0, j = ring.length - 1; i < ring.length; j = i++) {\n        var xi = ring[i][0], yi = ring[i][1];\n        var xj = ring[j][0], yj = ring[j][1];\n        var onBoundary = (pt[1] * (xi - xj) + yi * (xj - pt[0]) + yj * (pt[0] - xi) === 0) &&\n            ((xi - pt[0]) * (xj - pt[0]) <= 0) && ((yi - pt[1]) * (yj - pt[1]) <= 0);\n        if (onBoundary) return !ignoreBoundary;\n        var intersect = ((yi > pt[1]) !== (yj > pt[1])) &&\n        (pt[0] < (xj - xi) * (pt[1] - yi) / (yj - yi) + xi);\n        if (intersect) isInside = !isInside;\n    }\n    return isInside;\n}\n\n/**\n * inBBox\n *\n * @private\n * @param {Position} pt point [x,y]\n * @param {BBox} bbox BBox [west, south, east, north]\n * @returns {boolean} true/false if point is inside BBox\n */\nfunction inBBox(pt, bbox) {\n    return bbox[0] <= pt[0] &&\n           bbox[1] <= pt[1] &&\n           bbox[2] >= pt[0] &&\n           bbox[3] >= pt[1];\n}\n\nexport default booleanPointInPolygon;\n","import { coordEach } from '@turf/meta';\n\n/**\n * Takes a set of features, calculates the bbox of all input features, and returns a bounding box.\n *\n * @name bbox\n * @param {GeoJSON} geojson any GeoJSON object\n * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order\n * @example\n * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);\n * var bbox = turf.bbox(line);\n * var bboxPolygon = turf.bboxPolygon(bbox);\n *\n * //addToMap\n * var addToMap = [line, bboxPolygon]\n */\nfunction bbox(geojson) {\n    var BBox = [Infinity, Infinity, -Infinity, -Infinity];\n    coordEach(geojson, function (coord) {\n        if (BBox[0] > coord[0]) BBox[0] = coord[0];\n        if (BBox[1] > coord[1]) BBox[1] = coord[1];\n        if (BBox[2] < coord[0]) BBox[2] = coord[0];\n        if (BBox[3] < coord[1]) BBox[3] = coord[1];\n    });\n    return BBox;\n}\n\nexport default bbox;\n","import { getCoord, getCoords } from '@turf/invariant';\nimport { isObject } from '@turf/helpers';\n\n/**\n * Returns true if a point is on a line. Accepts a optional parameter to ignore the start and end vertices of the linestring.\n *\n * @name booleanPointOnLine\n * @param {Coord} pt GeoJSON Point\n * @param {Feature<LineString>} line GeoJSON LineString\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.ignoreEndVertices=false] whether to ignore the start and end vertices.\n * @returns {boolean} true/false\n * @example\n * var pt = turf.point([0, 0]);\n * var line = turf.lineString([[-1, -1],[1, 1],[1.5, 2.2]]);\n * var isPointOnLine = turf.booleanPointOnLine(pt, line);\n * //=true\n */\nfunction booleanPointOnLine(pt, line, options) {\n    // Optional parameters\n    options = options || {};\n    var ignoreEndVertices = options.ignoreEndVertices;\n    if (!isObject(options)) throw new Error('invalid options');\n\n    // Validate input\n    if (!pt) throw new Error('pt is required');\n    if (!line) throw new Error('line is required');\n\n    // Normalize inputs\n    var ptCoords = getCoord(pt);\n    var lineCoords = getCoords(line);\n\n    // Main\n    for (var i = 0; i < lineCoords.length - 1; i++) {\n        var ignoreBoundary = false;\n        if (ignoreEndVertices) {\n            if (i === 0) ignoreBoundary = 'start';\n            if (i === lineCoords.length - 2) ignoreBoundary = 'end';\n            if (i === 0 && i + 1 === lineCoords.length - 1) ignoreBoundary = 'both';\n        }\n        if (isPointOnLineSegment(lineCoords[i], lineCoords[i + 1], ptCoords, ignoreBoundary)) return true;\n    }\n    return false;\n}\n\n// See http://stackoverflow.com/a/4833823/1979085\n/**\n * @private\n * @param {Position} lineSegmentStart coord pair of start of line\n * @param {Position} lineSegmentEnd coord pair of end of line\n * @param {Position} pt coord pair of point to check\n * @param {boolean|string} excludeBoundary whether the point is allowed to fall on the line ends. If true which end to ignore.\n * @returns {boolean} true/false\n */\nfunction isPointOnLineSegment(lineSegmentStart, lineSegmentEnd, pt, excludeBoundary) {\n    var x = pt[0];\n    var y = pt[1];\n    var x1 = lineSegmentStart[0];\n    var y1 = lineSegmentStart[1];\n    var x2 = lineSegmentEnd[0];\n    var y2 = lineSegmentEnd[1];\n    var dxc = pt[0] - x1;\n    var dyc = pt[1] - y1;\n    var dxl = x2 - x1;\n    var dyl = y2 - y1;\n    var cross = dxc * dyl - dyc * dxl;\n    if (cross !== 0) {\n        return false;\n    }\n    if (!excludeBoundary) {\n        if (Math.abs(dxl) >= Math.abs(dyl)) {\n            return dxl > 0 ? x1 <= x && x <= x2 : x2 <= x && x <= x1;\n        }\n        return dyl > 0 ? y1 <= y && y <= y2 : y2 <= y && y <= y1;\n    } else if (excludeBoundary === 'start') {\n        if (Math.abs(dxl) >= Math.abs(dyl)) {\n            return dxl > 0 ? x1 < x && x <= x2 : x2 <= x && x < x1;\n        }\n        return dyl > 0 ? y1 < y && y <= y2 : y2 <= y && y < y1;\n    } else if (excludeBoundary === 'end') {\n        if (Math.abs(dxl) >= Math.abs(dyl)) {\n            return dxl > 0 ? x1 <= x && x < x2 : x2 < x && x <= x1;\n        }\n        return dyl > 0 ? y1 <= y && y < y2 : y2 < y && y <= y1;\n    } else if (excludeBoundary === 'both') {\n        if (Math.abs(dxl) >= Math.abs(dyl)) {\n            return dxl > 0 ? x1 < x && x < x2 : x2 < x && x < x1;\n        }\n        return dyl > 0 ? y1 < y && y < y2 : y2 < y && y < y1;\n    }\n}\n\nexport default booleanPointOnLine;\n","import booleanPointInPolygon from '@turf/boolean-point-in-polygon';\nimport calcBbox from '@turf/bbox';\nimport isPointOnLine from '@turf/boolean-point-on-line';\nimport { getCoords, getGeom, getType } from '@turf/invariant';\n\n/**\n * Boolean-contains returns True if the second geometry is completely contained by the first geometry.\n * The interiors of both geometries must intersect and, the interior and boundary of the secondary (geometry b)\n * must not intersect the exterior of the primary (geometry a).\n * Boolean-contains returns the exact opposite result of the `@turf/boolean-within`.\n *\n * @name booleanContains\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @returns {boolean} true/false\n * @example\n * var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n * var point = turf.point([1, 2]);\n *\n * turf.booleanContains(line, point);\n * //=true\n */\nfunction booleanContains(feature1, feature2) {\n    var type1 = getType(feature1);\n    var type2 = getType(feature2);\n    var geom1 = getGeom(feature1);\n    var geom2 = getGeom(feature2);\n    var coords1 = getCoords(feature1);\n    var coords2 = getCoords(feature2);\n\n    switch (type1) {\n    case 'Point':\n        switch (type2) {\n        case 'Point':\n            return compareCoords(coords1, coords2);\n        default:\n            throw new Error('feature2 ' + type2 + ' geometry not supported');\n        }\n    case 'MultiPoint':\n        switch (type2) {\n        case 'Point':\n            return isPointInMultiPoint(geom1, geom2);\n        case 'MultiPoint':\n            return isMultiPointInMultiPoint(geom1, geom2);\n        default:\n            throw new Error('feature2 ' + type2 + ' geometry not supported');\n        }\n    case 'LineString':\n        switch (type2) {\n        case 'Point':\n            return isPointOnLine(geom2, geom1, {ignoreEndVertices: true});\n        case 'LineString':\n            return isLineOnLine(geom1, geom2);\n        case 'MultiPoint':\n            return isMultiPointOnLine(geom1, geom2);\n        default:\n            throw new Error('feature2 ' + type2 + ' geometry not supported');\n        }\n    case 'Polygon':\n        switch (type2) {\n        case 'Point':\n            return booleanPointInPolygon(geom2, geom1, {ignoreBoundary: true});\n        case 'LineString':\n            return isLineInPoly(geom1, geom2);\n        case 'Polygon':\n            return isPolyInPoly(geom1, geom2);\n        case 'MultiPoint':\n            return isMultiPointInPoly(geom1, geom2);\n        default:\n            throw new Error('feature2 ' + type2 + ' geometry not supported');\n        }\n    default:\n        throw new Error('feature1 ' + type1 + ' geometry not supported');\n    }\n}\n\nfunction isPointInMultiPoint(multiPoint, point) {\n    var i;\n    var output = false;\n    for (i = 0; i < multiPoint.coordinates.length; i++) {\n        if (compareCoords(multiPoint.coordinates[i], point.coordinates)) {\n            output = true;\n            break;\n        }\n    }\n    return output;\n}\n\nfunction isMultiPointInMultiPoint(multiPoint1, multiPoint2) {\n    for (var i = 0; i < multiPoint2.coordinates.length; i++) {\n        var matchFound = false;\n        for (var i2 = 0; i2 < multiPoint1.coordinates.length; i2++) {\n            if (compareCoords(multiPoint2.coordinates[i], multiPoint1.coordinates[i2])) {\n                matchFound = true;\n                break;\n            }\n        }\n        if (!matchFound) {\n            return false;\n        }\n    }\n    return true;\n}\n\n\nfunction isMultiPointOnLine(lineString, multiPoint) {\n    var haveFoundInteriorPoint = false;\n    for (var i = 0; i < multiPoint.coordinates.length; i++) {\n        if (isPointOnLine(multiPoint.coordinates[i], lineString, {ignoreEndVertices: true})) {\n            haveFoundInteriorPoint = true;\n        }\n        if (!isPointOnLine(multiPoint.coordinates[i], lineString)) {\n            return false;\n        }\n    }\n    if (haveFoundInteriorPoint) {\n        return true;\n    }\n    return false;\n}\n\nfunction isMultiPointInPoly(polygon, multiPoint) {\n    for (var i = 0; i < multiPoint.coordinates.length; i++) {\n        if (!booleanPointInPolygon(multiPoint.coordinates[i], polygon, {ignoreBoundary: true})) {\n            return false;\n        }\n    }\n    return true;\n}\n\nfunction isLineOnLine(lineString1, lineString2) {\n    var haveFoundInteriorPoint = false;\n    for (var i = 0; i < lineString2.coordinates.length; i++) {\n        if (isPointOnLine({type: 'Point', coordinates: lineString2.coordinates[i]}, lineString1, { ignoreEndVertices: true })) {\n            haveFoundInteriorPoint = true;\n        }\n        if (!isPointOnLine({type: 'Point', coordinates: lineString2.coordinates[i]}, lineString1, {ignoreEndVertices: false })) {\n            return false;\n        }\n    }\n    return haveFoundInteriorPoint;\n}\n\nfunction isLineInPoly(polygon, linestring) {\n    var output = false;\n    var i = 0;\n\n    var polyBbox = calcBbox(polygon);\n    var lineBbox = calcBbox(linestring);\n    if (!doBBoxOverlap(polyBbox, lineBbox)) {\n        return false;\n    }\n    for (i; i < linestring.coordinates.length - 1; i++) {\n        var midPoint = getMidpoint(linestring.coordinates[i], linestring.coordinates[i + 1]);\n        if (booleanPointInPolygon({type: 'Point', coordinates: midPoint}, polygon, { ignoreBoundary: true })) {\n            output = true;\n            break;\n        }\n    }\n    return output;\n}\n\n/**\n * Is Polygon2 in Polygon1\n * Only takes into account outer rings\n *\n * @private\n * @param {Geometry|Feature<Polygon>} feature1 Polygon1\n * @param {Geometry|Feature<Polygon>} feature2 Polygon2\n * @returns {boolean} true/false\n */\nfunction isPolyInPoly(feature1, feature2) {\n    var poly1Bbox = calcBbox(feature1);\n    var poly2Bbox = calcBbox(feature2);\n    if (!doBBoxOverlap(poly1Bbox, poly2Bbox)) {\n        return false;\n    }\n    for (var i = 0; i < feature2.coordinates[0].length; i++) {\n        if (!booleanPointInPolygon(feature2.coordinates[0][i], feature1)) {\n            return false;\n        }\n    }\n    return true;\n}\n\nfunction doBBoxOverlap(bbox1, bbox2) {\n    if (bbox1[0] > bbox2[0]) return false;\n    if (bbox1[2] < bbox2[2]) return false;\n    if (bbox1[1] > bbox2[1]) return false;\n    if (bbox1[3] < bbox2[3]) return false;\n    return true;\n}\n\n/**\n * compareCoords\n *\n * @private\n * @param {Position} pair1 point [x,y]\n * @param {Position} pair2 point [x,y]\n * @returns {boolean} true/false if coord pairs match\n */\nfunction compareCoords(pair1, pair2) {\n    return pair1[0] === pair2[0] && pair1[1] === pair2[1];\n}\n\nfunction getMidpoint(pair1, pair2) {\n    return [(pair1[0] + pair2[0]) / 2, (pair1[1] + pair2[1]) / 2];\n}\n\nexport default booleanContains;\n","import ol_Feature from 'ol/Feature';\r\nimport ol_Collection from 'ol/Collection';\r\nimport * as ol_Extent from \"ol/extent\";\r\nimport ol_interaction_Pointer from 'ol/interaction/Pointer';\r\nimport ol_interaction_Translate from 'ol/interaction/Translate';\r\nimport { fromCircle } from 'ol/geom/Polygon';\r\nimport { Polygon, Circle as GeomCircle } from 'ol/geom';\r\nimport * as olFormat from 'ol/format';\r\nimport union from \"@turf/union\";\r\nimport difference from \"@turf/difference\";\r\nimport intersect from \"@turf/intersect\";\r\nimport booleanContains from \"@turf/boolean-contains\";\r\n\r\n/** Brush interaction\r\n * @constructor\r\n * @extends {ol_interaction_Pointer}\r\n * @fires drawingstart | drawing | drawingend | erasingstart | erasing | erasingend\r\n * @param {any} options\r\n *  @param {ol.Map} options.map Map to use brush interaction on.\r\n *  @param {ol.Layer} options.layer Layer to use brush interaction on.\r\n *  @param {ol.Feature} [options.feature] Feature to use brush interaction on.\r\n *\t@param {number} [options.brushSize=500] Brush size in projection coords distance, default 500.\r\n *\t@param {BRUSHTYPES} [options.brushType=BRUSHTYPES.CIRCLE] Brush pointer type of BRUSHTYPES enum, default BRUSHTYPES.CIRCLE.\r\n *\t@param {BRUSHMODES} [options.brushMode=BRUSHMODES.BRUSH] Interaction mode type of BRUSHMODES enum, default BRUSHMODES.BRUSH.\r\n */\r\n\r\nvar ol_interaction_Brush = function (options) {\r\n    if (!options) options = {};\r\n    var self = this;\r\n\r\n    this.pointer_ = null;\r\n    this.map_ = options.map || function () { return false; };\r\n    this.sel_ = options.feature || null;\r\n    this.feature_ = null;\r\n    this.layer_ = options.layer || function () { return false; };\r\n    this.idToDelete_ = null;\r\n    this.translate_ = null;\r\n\r\n    ol_interaction_Pointer.call(this, {\r\n        handleDownEvent: this.handleDownEvent_,\r\n        handleDragEvent: this.handleDragEvent_,\r\n        handleMoveEvent: this.handleMoveEvent_,\r\n        handleUpEvent: this.handleUpEvent_\r\n    });\r\n\r\n    this.set('brushSize', options.brushSize || 500);\r\n    this.set('brushType', options.brushType || BRUSHTYPES.CIRCLE);\r\n    this.set('brushMode', options.brushMode || BRUSHMODES.BRUSH);\r\n\r\n    this.on('propertychange', function () {\r\n    });\r\n};\r\n\r\nol_interaction_Brush.prototype = Object.create(ol_interaction_Pointer.prototype);\r\nol_interaction_Brush.prototype.constructor = ol_interaction_Brush;\r\n\r\nexport const BRUSHTYPES = {\r\n    CIRCLE: 'circle',\r\n    SQUARE: 'square',\r\n};\r\n\r\nexport const BRUSHMODES = {\r\n    BRUSH: 'brush',\r\n    ERASER: 'eraser',\r\n};\r\n\r\n/**\r\n * Activate/deactivate interaction.\r\n * @param {bool}\r\n * @api stable\r\n */\r\nol_interaction_Brush.prototype.setActive = function (b) {\r\n    ol_interaction_Pointer.prototype.setActive.call(this, b);\r\n};\r\n\r\n/**\r\n * Changes size of brush pointer.\r\n * @param {number} brushSize Size of brush to set in projection coords distance.\r\n * @api stable\r\n */\r\nol_interaction_Brush.prototype.setBrushSize = function (brushSize) {\r\n    if (brushSize == null || brushSize == undefined || brushSize <= 0) {\r\n        return;\r\n    }\r\n    if (this.get('brushSize') == brushSize) {\r\n        return;\r\n    }\r\n    this.set('brushSize', brushSize);\r\n    this.setPointer_();\r\n};\r\n\r\n/**\r\n * Returns current size of brush pointer in projection coords distance.\r\n * @return {number} Current size of brush pointer in projection coords distance.\r\n * @api stable\r\n */\r\nol_interaction_Brush.prototype.getBrushSize = function () {\r\n    return this.get('brushSize');\r\n};\r\n\r\n/**\r\n * Changes type of brush pointer.\r\n * @param {string} brushType Type of brush to set.\r\n * @api stable\r\n */\r\nol_interaction_Brush.prototype.setBrushType = function (brushType) {\r\n    if (brushType == null || brushType == undefined) {\r\n        return;\r\n    }\r\n    if (this.get('brushType') == brushType) {\r\n        return;\r\n    }\r\n    this.set('brushType', brushType);\r\n    this.setPointer_();\r\n};\r\n\r\n/**\r\n * Returns current type of brush pointer.\r\n * @return {string} Current type of brush pointer.\r\n * @api stable\r\n */\r\nol_interaction_Brush.prototype.getBrushType = function () {\r\n    return BRUSHTYPES[this.get('brushType')];\r\n};\r\n\r\n/**\r\n * Changes type of brush pointer.\r\n * @param {string} brushType Type of brush to set.\r\n * @api stable\r\n */\r\nol_interaction_Brush.prototype.setBrushMode = function (brushMode) {\r\n    if (brushMode == null || brushMode == undefined) {\r\n        return;\r\n    }\r\n    if (this.get('brushMode') == brushMode) {\r\n        return;\r\n    }\r\n    this.set('brushMode', brushMode);\r\n    this.setPointer_();\r\n};\r\n\r\n/**\r\n * Returns current mode of brush interaction.\r\n * @return {string} Current mode of brush interaction.\r\n * @api stable\r\n */\r\nol_interaction_Brush.prototype.getBrushMode = function () {\r\n    return this.get('brushMode');\r\n};\r\n\r\n/**\r\n * @private\r\n */\r\nol_interaction_Brush.prototype.setPointer_ = function () {\r\n    if (this.format_ == null || this.format_ == undefined) {\r\n        this.format_ = new olFormat.GeoJSON();\r\n    }\r\n    if (this.formatOptions_ == null || this.formatOptions_ == undefined) {\r\n        this.formatOptions_ = { featureProjection: this.map_.getView().getProjection(), };\r\n    }\r\n    var pointerGeom = null;\r\n    if (this.get('brushType') == BRUSHTYPES.CIRCLE) {\r\n        pointerGeom = fromCircle(new GeomCircle([0, 0], this.get('brushSize')));\r\n    }\r\n    if (this.get('brushType') == BRUSHTYPES.SQUARE) {\r\n        var size = this.get('brushSize');\r\n        pointerGeom = new Polygon([\r\n            [\r\n                [size * -1, size],\r\n                [size, size],\r\n                [size, size * -1],\r\n                [size * -1, size * -1],\r\n                [size * -1, size],\r\n            ],\r\n        ]);\r\n    }\r\n    var pointer = new ol_Feature({\r\n        geometry: pointerGeom,\r\n    });\r\n\r\n    pointer.color = '#000';\r\n    pointer.fillColor = '#00000099';\r\n    pointer.penSize = 1;\r\n\r\n    if (this.pointer_ != null) {\r\n        this.layer_.getSource().removeFeature(this.pointer_);\r\n        this.map_.removeInteraction(this.translate_);\r\n    }\r\n\r\n    this.pointer_ = pointer;\r\n\r\n    $(this.map_.getTarget()).find(\"canvas\").css(\"cursor\", \"none\");\r\n\r\n    this.translate_ = new ol_interaction_Translate({\r\n        features: new ol_Collection([this.pointer_])\r\n    });\r\n\r\n    this.layer_.getSource().addFeature(this.pointer_);\r\n    this.map_.addInteraction(this.translate_);\r\n};\r\n\r\n/**\r\n * @param {ol.MapBrowserEvent} evt Map browser event.\r\n * @private\r\n */\r\nol_interaction_Brush.prototype.handleDownEvent_ = function (evt) {\r\n    if (this.get('brushMode') == BRUSHMODES.BRUSH) {\r\n        this.dispatchEvent(\"drawingstart\");\r\n    }\r\n    if (this.get('brushMode') == BRUSHMODES.ERASER) {\r\n        this.dispatchEvent(\"erasingstart\");\r\n    }\r\n};\r\n\r\n/**\r\n * @param {ol.MapBrowserEvent} evt Map browser event.\r\n * @private\r\n */\r\nol_interaction_Brush.prototype.handleDragEvent_ = function (evt) {\r\n    evt.preventDefault();\r\n    var feature = null;\r\n    if (this.sel_) {\r\n        feature = this.sel_;\r\n    } else {\r\n        try {\r\n            feature = this.getFeatureAtPixel_(evt.pixel).feature;\r\n        }\r\n        catch\r\n        {\r\n            return;\r\n        }\r\n    }\r\n    if (feature == null || feature == undefined) {\r\n        return;\r\n    }\r\n    var format = this.format_;\r\n    var formatOptions = this.formatOptions_;\r\n    var currentBrushFeature = this.pointer_;\r\n\r\n    var metaNotes = feature.metaData.Notes ? feature.metaData.Notes : \"\";\r\n    var metaColor = feature.metaData.Color ? feature.metaData.Color : feature.color;\r\n    var metaFillColor = feature.metaData.FillColor ? feature.metaData.FillColor : feature.fillColor;\r\n    var metaPenSize = feature.metaData.LineThickness ? feature.metaData.LineThickness : feature.penSize;\r\n    var metaIcon = feature.icon;\r\n\r\n    if (this.get('brushMode') == BRUSHMODES.BRUSH) {\r\n        if (feature.getGeometry().getType() !== \"Polygon\" && feature.getGeometry().getType() !== \"MultiPolygon\") {\r\n            console.error(\"Feature contains non-polygon geometry\");\r\n            return;\r\n        }\r\n    }\r\n    if (this.get('brushMode') == BRUSHMODES.ERASER) {\r\n        if (feature.getGeometry().getType() !== \"Polygon\") {\r\n            console.error(\"Feature contains non-polygon geometry\");\r\n            return;\r\n        }\r\n    }\r\n    var inputPolygonFeatureJson = format.writeFeatureObject(feature, formatOptions);\r\n    /*try {\r\n        inputPolygonFeatureJson = unkinkPolygon(cleanCoords(inputPolygonFeatureJson));\r\n    } catch {\r\n        console.error(\"Feature contains non-polygon geometry\");\r\n        return;\r\n    }*/\r\n    var pointerFeatureJson = format.writeFeatureObject(currentBrushFeature, formatOptions);\r\n    var intersection = intersect(inputPolygonFeatureJson, pointerFeatureJson);\r\n    if (!intersection) {\r\n        return;\r\n    }\r\n\r\n    var outputFeatureJson = null;\r\n    if (this.get('brushMode') == BRUSHMODES.BRUSH) {\r\n        outputFeatureJson = this.unify_(inputPolygonFeatureJson, pointerFeatureJson);\r\n    }\r\n    if (this.get('brushMode') == BRUSHMODES.ERASER) {\r\n        if (booleanContains(pointerFeatureJson, inputPolygonFeatureJson)) {\r\n            this.idToDelete_ = inputPolygonFeatureJson.id;\r\n            this.feature_ = null;\r\n            this.dispatchEvent(\"erasing\");\r\n            return;\r\n        } else {\r\n            outputFeatureJson = this.differentiate_(inputPolygonFeatureJson, pointerFeatureJson);\r\n        }\r\n    }\r\n    if (outputFeatureJson == null) {\r\n        return;\r\n    }\r\n\r\n    if (outputFeatureJson.geometry.type === \"MultiPolygon\") {\r\n        outputFeatureJson.geometry.coordinates.forEach((coords) => {\r\n            var feat = { 'type': 'Polygon', 'coordinates': coords };\r\n\r\n            var newFeature = format.readFeature(feat, formatOptions);\r\n\r\n            newFeature.color = metaColor;\r\n            newFeature.fillColor = metaFillColor;\r\n            newFeature.penSize = metaPenSize;\r\n            newFeature.icon = metaIcon;\r\n            newFeature.notes = metaNotes ? metaNotes : \"\";\r\n\r\n            this.idToDelete_ = inputPolygonFeatureJson.id;\r\n            this.feature_ = newFeature;\r\n            if (this.get('brushMode') == BRUSHMODES.BRUSH) {\r\n                this.dispatchEvent(\"drawing\");\r\n            }\r\n            if (this.get('brushMode') == BRUSHMODES.ERASER) {\r\n                this.dispatchEvent(\"erasing\");\r\n            }\r\n            if (this.sel_) {\r\n                this.stopEditing();\r\n            }\r\n        });\r\n    } else {\r\n        var newFeature = format.readFeature(outputFeatureJson, formatOptions);\r\n        feature.setGeometry(newFeature.getGeometry());\r\n        feature.changed();\r\n        this.idToDelete_ = null;\r\n        this.feature_ = feature;\r\n        if (this.get('brushMode') == BRUSHMODES.BRUSH) {\r\n            this.dispatchEvent(\"drawing\");\r\n        }\r\n        if (this.get('brushMode') == BRUSHMODES.ERASER) {\r\n            this.dispatchEvent(\"erasing\");\r\n        }\r\n    }\r\n};\r\n\r\n/**\r\n * @param {ol.MapBrowserEvent} evt Map browser event.\r\n * @private\r\n */\r\nol_interaction_Brush.prototype.handleMoveEvent_ = function (evt) {\r\n    if (this.map_ == null) {\r\n        this.map_ = evt.map;\r\n    }\r\n    if (this.pointer_ == null) {\r\n        this.setPointer_();\r\n    }\r\n    if (evt.dragging) {\r\n        this.handleDragEvent_(evt);\r\n    }\r\n    var extent = this.pointer_.getGeometry().getExtent();\r\n    var center = ol_Extent.getCenter(extent);\r\n    this.pointer_.getGeometry().translate(evt.coordinate[0] - center[0], evt.coordinate[1] - center[1]);\r\n};\r\n\r\n/**\r\n * @param {ol.MapBrowserEvent} evt Map browser event.\r\n * @private\r\n */\r\nol_interaction_Brush.prototype.handleUpEvent_ = function (evt) {\r\n    if (this.get('brushMode') == BRUSHMODES.BRUSH) {\r\n        this.dispatchEvent(\"drawingend\");\r\n    }\r\n    if (this.get('brushMode') == BRUSHMODES.ERASER) {\r\n        this.dispatchEvent(\"erasingend\");\r\n    }\r\n};\r\n\r\n/**\r\n * @param {ol.GeoJSON} input GeoJSON object of current feature.\r\n * @param {ol.GeoJSON} pointer GeoJSON object of current pointer.\r\n * @return {ol.GeoJSON || null} GeoJSON object of unified geometry.\r\n * @private\r\n */\r\nol_interaction_Brush.prototype.unify_ = function (input, pointer) {\r\n    var unifiedFeatureJson = union(input, pointer);\r\n    if (unifiedFeatureJson.type === \"FeatureCollection\") {\r\n        throw \"Feature collection detected\";\r\n    }\r\n\r\n    if (unifiedFeatureJson.geometry.type === \"MultiPolygon\") {\r\n        return null;\r\n    } else {\r\n        return unifiedFeatureJson;\r\n    }\r\n};\r\n\r\n/**\r\n * @param {ol.GeoJSON} input GeoJSON object of current feature.\r\n * @param {ol.GeoJSON} pointer GeoJSON object of current pointer.\r\n * @return {?ol.GeoJSON} GeoJSON object of differentiated geometry.\r\n * @private\r\n */\r\nol_interaction_Brush.prototype.differentiate_ = function (input, pointer) {\r\n    var differentiatedFeatureJson = difference(input, pointer);\r\n    if (!differentiatedFeatureJson) {\r\n        return null;\r\n    }\r\n    if (differentiatedFeatureJson.type === \"FeatureCollection\") {\r\n        throw \"Feature collection detected\";\r\n    }\r\n    return differentiatedFeatureJson;\r\n};\r\n\r\n/**\r\n * @param {ol.MapBrowserEvent.pixel} pixel Pixel coords of pointer.\r\n * @return {?ol.Feature} Feature found under pointer location.\r\n * @private\r\n */\r\nol_interaction_Brush.prototype.getFeatureAtPixel_ = function (pixel) {\r\n    var self = this;\r\n    var size = this.get('brushSize');\r\n    var geometry = new Polygon([\r\n        [\r\n            [size * -1, size],\r\n            [size, size],\r\n            [size, size * -1],\r\n            [size * -1, size * -1],\r\n            [size * -1, size],\r\n        ],\r\n    ]);\r\n    var coordinates = geometry.getCoordinates();\r\n    var pixels0 = this.map_.getPixelFromCoordinate(coordinates[0][0]);\r\n    var pixels1 = this.map_.getPixelFromCoordinate(coordinates[0][1]);\r\n    var tol = (pixels1[0] - pixels0[0]) / 2;\r\n    return this.map_.forEachFeatureAtPixel(pixel,\r\n        function (feature, layer) {\r\n            if (self.layer_ === layer && feature !== self.pointer_) {\r\n                return { feature: feature };\r\n            } else {\r\n                return null;\r\n            }\r\n        },\r\n        { hitTolerance: tol }\r\n    ) || null;\r\n};\r\n\r\n/**\r\n * Returns current feature.\r\n * @return {ol.Feature} Current feature.\r\n * @api stable\r\n */\r\nol_interaction_Brush.prototype.getFeature = function () {\r\n    return this.feature_;\r\n};\r\n\r\n/**\r\n * Returns ID of feature to remove.\r\n * @return {string | number} ID of feature to remove.\r\n * @api stable\r\n */\r\nol_interaction_Brush.prototype.getId = function () {\r\n    return this.idToDelete_;\r\n};\r\n\r\n/**\r\n * Disables and removes interaction.\r\n * @api stable\r\n */\r\nol_interaction_Brush.prototype.stopEditing = function () {\r\n    $(this.map_.getTarget()).find(\"canvas\").css(\"cursor\", \"\");\r\n    this.layer_.getSource().removeFeature(this.pointer_);\r\n    this.map_.removeInteraction(this.translate_);\r\n    this.map_.removeInteraction(this);\r\n    ol_interaction_Pointer.prototype.setActive.call(this, false);\r\n};\r\n\r\nexport default ol_interaction_Brush;","/**\r\n * @module ol/interaction/MagicWand\r\n */\r\n\r\nimport BaseObject from 'ol/Object';\r\nimport { Pointer as PointerInteraction } from 'ol/interaction';\r\nimport { unByKey } from 'ol/Observable'\r\n\r\nimport MagicWandLib from 'magic-wand-tool';\r\n\r\n/**\r\n * @typedef {Object} Point\r\n * @property {number} x\r\n * @property {number} y\r\n */\r\n\r\n/**\r\n * @typedef {Object} Size\r\n * @property {number} w\r\n * @property {number} h\r\n */\r\n\r\n/**\r\n * @typedef {Object} Bounds\r\n * @property {number} minX\r\n * @property {number} maxX\r\n * @property {number} minY\r\n * @property {number} maxY\r\n */\r\n\r\n/**\r\n * @typedef {Object} Mask\r\n * @property {Uint8Array} data\r\n * @property {number} width\r\n * @property {number} height\r\n * @property {number} [bytes]\r\n * @property {Bounds} [bounds]\r\n * @property {Point} globalOffset\r\n */\r\n\r\n/**\r\n * @typedef {Object} Contour\r\n * @property {Array<Point>} points Vertices of the polygon (closed figure)\r\n * @property {boolean} inner Indicates whether the polygon is inside another\r\n * @property {number} label Contour id\r\n * @property {number} [initialCount] Length of the point array before simplifying\r\n */\r\n\r\n/**\r\n * @typedef {Object} OffsetMask\r\n * @property {Uint8Array} data 1-D binary data array\r\n * @property {Size} size Mask size\r\n * @property {Point} offset Coordinates of the top-left corner in viewport basis\r\n */\r\n\r\n/**\r\n * @typedef {Object} PixelOffset\r\n * @property {number} x Left coordinate\r\n * @property {number} y Top coordinate\r\n * @property {number} width Length of the one world in pixels\r\n */\r\n\r\n/**\r\n * @typedef {Object} TileMaskOptions\r\n * @property {ol/Map} map Map\r\n * @property {ol/layer/Layer|Array<ol/layer/Layer>} layers Layer(s) for scanning\r\n * @property {number} hatchLength Thickness of the stroke (in pixels)\r\n * @property {number} hatchTimeout Hatching redraw timeout (in ms)\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * Create a snapshot from the specified layers and show the current selection mask\r\n *\r\n * @fires ol/events/Event#scanStarted\r\n * @fires ol/events/Event#scanFinished\r\n */\r\nexport class TileMask extends BaseObject {\r\n\r\n    /**\r\n     * @param {TileMaskOptions} options Tile mask options\r\n     */\r\n    constructor(options) {\r\n        super();\r\n\r\n        /**\r\n         * @type {ol/Map}\r\n         */\r\n        this.map = options.map;\r\n\r\n        /**\r\n         * Layers for scanning \r\n         * @type {Array<ol/layer/Layer>}\r\n         */\r\n        this.layers = null;\r\n\r\n        /**\r\n         * Binary mask\r\n         * @type {Mask}\r\n         */\r\n        this.mask = null;\r\n\r\n        /**\r\n         * Array of indices of a boundary points in the mask\r\n         * @private\r\n         * @type {Array<number>}\r\n         */\r\n        this.border_ = null;\r\n\r\n        /**\r\n         * @private\r\n         * @type {number}\r\n         */\r\n        this.hatchInterval_ = null;\r\n\r\n        /**\r\n         * @private\r\n         * @type {number}\r\n         */\r\n        this.hatchOffset_ = 0;\r\n\r\n        /**\r\n         * @type {number}\r\n         */\r\n        this.hatchLength = options.hatchLength;\r\n\r\n        /**\r\n         * @type {number}\r\n         */\r\n        this.hatchTimeout = options.hatchTimeout;\r\n\r\n        /**\r\n         * @type {Size}\r\n         */\r\n        this.size = null;\r\n\r\n        /**\r\n         * Context for mask\r\n         * @type {CanvasRenderingContext2D}\r\n         */\r\n        this.context = null;\r\n\r\n        /**\r\n         * Image data without mask\r\n         * @type {Uint8ClampedArray}\r\n         */\r\n        this.snapshot = null;\r\n\r\n        /**\r\n         * @protected\r\n         * @type {CanvasRenderingContext2D}\r\n         */\r\n        this.contextWithoutMask = document.createElement(\"canvas\").getContext(\"2d\");\r\n\r\n        /**\r\n         * Amount of bytes per pixel in the snapshot\r\n         * @type {number}\r\n         */\r\n        this.bytes = 4;\r\n\r\n        /**\r\n         * @private\r\n         * @type {boolean}\r\n         */\r\n        this.loading_ = false;\r\n\r\n        /**\r\n         * @private\r\n         * @type {boolean}\r\n         */\r\n        this.lock_ = false;\r\n\r\n        /**\r\n         * @private\r\n         * @type {ol/events/Array<EventsKey>}\r\n         */\r\n        this.mapKeys_ = null;\r\n\r\n        /**\r\n         * @private\r\n         * @type {ol/events/Array<EventsKey>}\r\n         */\r\n        this.layersKeys_ = null;\r\n\r\n        /**\r\n         * @private\r\n         * @type {ol/events/EventsKey}\r\n         */\r\n        this.mapKeyOnceComplete = null;\r\n\r\n        /**\r\n         * @private\r\n         * @type {ol/events/EventsKey}\r\n         */\r\n        this.mapKeyOnceRender = null;\r\n\r\n        this.createCanvas();\r\n\r\n        this.connectToMap();\r\n\r\n        this.setLayers(options.layers);\r\n\r\n        if (this.hatchTimeout && this.hatchTimeout > 0) {\r\n            this.hatchInterval = setInterval(() => this.hatchTick_(), this.hatchTimeout);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Creates a tile canvas.\r\n     * @protected\r\n     */\r\n    createCanvas() {\r\n        this.context = document.createElement(\"canvas\").getContext(\"2d\");\r\n        this.setCanvasSize();\r\n        this.clearMask();\r\n    }\r\n\r\n    /**\r\n     * @protected\r\n     */\r\n    setCanvasSize() {\r\n        let size = this.map.getSize();\r\n\r\n        this.context.canvas.width = size[0];\r\n        this.context.canvas.height = size[1];\r\n\r\n        this.contextWithoutMask.canvas.width = size[0];\r\n        this.contextWithoutMask.canvas.height = size[1];\r\n\r\n        this.size = { w: size[0], h: size[1] };\r\n    }\r\n\r\n    /**\r\n     * @inheritDoc\r\n     */\r\n    disposeInternal() {\r\n        this.disconnectFromMap();\r\n        this.disconnectFromLayers();\r\n        this.clearMask();\r\n\r\n        // stop hatching animation\r\n        if (this.hatchInterval) clearInterval(this.hatchInterval);\r\n\r\n        this.layers = null;\r\n        this.contextWithoutMask = null;\r\n        this.context = null;\r\n        this.snapshot = null;\r\n        this.map = null;\r\n\r\n        super.disposeInternal();\r\n    }\r\n\r\n    //#region Map\r\n\r\n    /**\r\n     * @protected\r\n     */\r\n    connectToMap() {\r\n        this.mapKeys_ = [\r\n            this.map.getView().on('change:resolution', this.onViewResChanged_.bind(this)),\r\n            this.map.on('change:size', this.onMapSizeChanged_.bind(this)),\r\n            this.map.on('moveend', this.onMapMoved_.bind(this)),\r\n            this.map.on('postrender', this.onPostRender_.bind(this))\r\n        ];\r\n    }\r\n\r\n    /**\r\n     * @protected\r\n     */\r\n    disconnectFromMap() {\r\n        if (this.mapKeys_) {\r\n            unByKey(this.mapKeys_);\r\n            this.mapKeys_ = null;\r\n        }\r\n        if (this.mapKeyOnceComplete) {\r\n            unByKey(this.mapKeyOnceComplete);\r\n            this.mapKeyOnceComplete = null;\r\n        }\r\n        if (this.mapKeyOnceRender) {\r\n            unByKey(this.mapKeyOnceRender);\r\n            this.mapKeyOnceRender = null;\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     */\r\n    onViewResChanged_() {\r\n        this.createCanvas();\r\n        this.setCanvasSize();\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     */\r\n    onMapSizeChanged_() {\r\n        this.setCanvasSize();\r\n        setTimeout(() => this.scan(), 50);\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     */\r\n    onMapMoved_() {\r\n        this.scan();\r\n    }\r\n\r\n    //#endregion\r\n\r\n    //#region Layers\r\n\r\n    /**\r\n     * @param {ol/layer/Layer | Array<ol/layer/Layer>} layers Layer(s) for scanning\r\n     * @return {boolean}\r\n     */\r\n    setLayers(layers) {\r\n        if (!layers) return false;\r\n\r\n        this.disconnectFromLayers();\r\n\r\n        this.layers = Array.isArray(layers) ? layers : [layers];\r\n\r\n        this.connectToLayers();\r\n\r\n        this.scan();\r\n\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @protected\r\n     */\r\n    connectToLayers() {\r\n        this.layersKeys_ = [];\r\n        this.layers.forEach((layer) => {\r\n            this.layersKeys_.push(\r\n                layer.on('change', (e) => this.scan()),\r\n                layer.on('propertychange', (e) => this.scan())\r\n                //layer.getSource().on('change', (e) => this.scan()),\r\n                //layer.getSource().on('propertychange', (e) => this.scan())\r\n            );\r\n        });\r\n    }\r\n\r\n    /**\r\n     * @protected\r\n     */\r\n    disconnectFromLayers() {\r\n        if (this.layersKeys_) {\r\n            unByKey(this.layersKeys_);\r\n            this.layersKeys_ = null;\r\n        }\r\n    }\r\n\r\n    //#endregion\r\n\r\n    //#region Snapshot\r\n\r\n    /**\r\n     * Indicates whether or not the snapshot is fully loaded\r\n     */\r\n    isReady() {\r\n        return !this.loading_ && this.snapshot != null;\r\n    }\r\n\r\n    /**\r\n     * Force to recreate the snapshot\r\n     */\r\n    scan() {\r\n        if (this.loading_ || !this.map) return;\r\n\r\n        this.snapshot = null;\r\n\r\n        if (!this.hasVisibleLayers_()) return;\r\n\r\n        this.dispatchEvent(\"scanStarted\");\r\n\r\n        let sz = this.map.getSize();\r\n        this.size = { w: sz[0], h: sz[1] };\r\n\r\n        this.loading_ = true;\r\n\r\n        this.mapKeyOnceComplete = this.map.once('rendercomplete', () => {\r\n            if (!this.lock_) {\r\n                this.mapKeyOnceRender = this.map.once('postrender', () => {\r\n\r\n                    if (this.getRenderLayers_().length > 0) {\r\n                        this.snapshot = this.contextWithoutMask.getImageData(0, 0, this.size.w, this.size.h).data;\r\n                    }\r\n\r\n                    this.loading_ = false;\r\n                    this.lock_ = false;\r\n\r\n                    this.dispatchEvent(\"scanFinished\");\r\n                });\r\n            }\r\n            this.lock_ = true;\r\n            this.map.render(); // force to call postrender\r\n        });\r\n        this.map.render(); // force to call rendercomplete\r\n    }\r\n\r\n    hasVisibleLayers_() {\r\n        return this.layers != null && this.layers.filter(l => {\r\n            return l.getVisible() && l.getOpacity() > 0;\r\n        }).length > 0;\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     * @param {RenderEvent} e\r\n     */\r\n    onPostRender_() {\r\n        if (this.lock_) {\r\n            this.contextWithoutMask.clearRect(0, 0, this.size.w, this.size.h);\r\n            this.getRenderLayers_().forEach((layer) => {\r\n                let cnv = layer.getRenderer().context.canvas;\r\n                this.contextWithoutMask.drawImage(cnv, 0, 0, cnv.width, cnv.height, 0, 0, this.size.w, this.size.h);\r\n            });\r\n        }\r\n        this.drawBorder();\r\n    }\r\n\r\n    //#endregion\r\n\r\n    //#region Mask\r\n\r\n    /**\r\n     * Render the current context to the top visible layer\r\n     * @param {boolean} [clear=false] Render the snapshot before\r\n     */\r\n    render(clear = false) {\r\n        let layers = this.getRenderLayers_();\r\n        if (layers.length == 0) return;\r\n\r\n        let layerCtx = layers[layers.length - 1].getRenderer().context; // top layer\r\n\r\n        // render snapshot context without mask\r\n        if (clear) {\r\n            let snap = this.contextWithoutMask;\r\n            layerCtx.drawImage(snap.canvas, 0, 0, snap.canvas.width, snap.canvas.height, 0, 0, layerCtx.canvas.width, layerCtx.canvas.height);\r\n        }\r\n\r\n        let ctx = this.context;\r\n        layerCtx.drawImage(ctx.canvas, 0, 0, ctx.canvas.width, ctx.canvas.height, 0, 0, layerCtx.canvas.width, layerCtx.canvas.height);\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     * @return {Array<ol/layer/Layer>} renderable layers\r\n     */\r\n    getRenderLayers_() {\r\n        return this.layers == null ? [] : this.layers.filter(l => {\r\n            let ctx = l.getRenderer().context;\r\n            return ctx && l.getVisible() && l.getOpacity() > 0 && ctx.canvas.width > 0 && ctx.canvas.height > 0;\r\n        }).sort((a, b) => a.getZIndex() - b.getZIndex());\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     */\r\n    hatchTick_() {\r\n        this.hatchOffset_ = (this.hatchOffset_ + 1) % (this.hatchLength * 2);\r\n        return this.drawBorder(false);\r\n    }\r\n\r\n    /**\r\n     *  Clear the current mask and remove it from the map\r\n     */\r\n    clearMask() {\r\n        this.mask = null;\r\n        this.border_ = null;\r\n        if (this.context)\r\n            this.context.clearRect(0, 0, this.size.w, this.size.h);\r\n\r\n        this.map.render();\r\n    }\r\n\r\n    /**\r\n     * Set a binary mask and render it\r\n     * @param {Mask} mask\r\n     */\r\n    setMask(mask) {\r\n        this.mask = mask;\r\n        this.map.render();\r\n    }\r\n\r\n    /**\r\n     * Draw a hatch border of the binary mask\r\n     * @param {boolean} [needBorder = true] If true, needs to recreate a border\r\n     */\r\n    drawBorder(needBorder = true) {\r\n        if (!this.mask) return false;\r\n\r\n        var i, j, k, q, len,\r\n            w = this.size.w, // viewport size\r\n            h = this.size.h,\r\n            ix = this.size.w - 1, // right bottom of viewport (left top = [0,0])\r\n            iy = this.size.h - 1,\r\n            sw = this.size.w + 2, // extend viewport size (+1 px on each side)\r\n            sh = this.size.h + 2;\r\n\r\n        if (needBorder) { // create border\r\n\r\n            var offset = MagicWand.getMainWorldOffset(this.map); // viewport offset in the main world basis\r\n\r\n            var dx, dy, x0, y0, x1, y1, k1, k2,\r\n                rx0, rx1, ry0, ry1, // result of the intersection mask with the viewport (+1 px on each side)\r\n                img = this.mask.data,\r\n                w1 = this.mask.width,\r\n                b = this.mask.bounds,\r\n                gf = this.mask.globalOffset, // mask offset in the main world basis,\r\n                data = new Uint8Array(sw * sh), // viewport data (+1 px on each side) for correct detection border\r\n                off,\r\n                maskOffsets = [{ // all posible mask world offsets (considering 'multiWorld')\r\n                    x: gf.x,\r\n                    y: gf.y\r\n                }, { // add the mask in the left world\r\n                    x: (gf.x - offset.width) + 1, // 1px for overlap\r\n                    y: gf.y\r\n                }, { // add the mask in the right world\r\n                    x: (gf.x + offset.width) - 1, // 1px for overlap\r\n                    y: gf.y\r\n                }];\r\n\r\n            // walk through all worlds\r\n            var offsetsLen = maskOffsets.length;\r\n            for (j = 0; j < offsetsLen; j++) {\r\n                off = maskOffsets[j]; // viewport offset in the world basis\r\n                dx = off.x - offset.x; // delta for the transformation to the viewport basis (mask offset in the viewport basis)\r\n                dy = off.y - offset.y;\r\n                x0 = dx + b.minX; // left top of binary image (in viewport basis)\r\n                y0 = dy + b.minY;\r\n                x1 = dx + b.maxX; // right bottom of binary image (in viewport basis)\r\n                y1 = dy + b.maxY;\r\n\r\n                // intersection of the mask with viewport\r\n                if (!(x1 < 0 || x0 > ix || y1 < 0 || y0 > iy)) {\r\n                    rx0 = x0 > -1 ? x0 : -1; // intersection +1 px on each side (for search border)\r\n                    ry0 = y0 > -1 ? y0 : -1;\r\n                    rx1 = x1 < ix + 1 ? x1 : ix + 1;\r\n                    ry1 = y1 < iy + 1 ? y1 : iy + 1;\r\n                } else {\r\n                    continue;\r\n                }\r\n                // copy result of the intersection(+1 px on each side) to image data for detection border\r\n                len = rx1 - rx0 + 1;\r\n                i = (ry0 + 1) * sw + (rx0 + 1);\r\n                k1 = (ry0 - dy) * w1 + (rx0 - dx);\r\n                k2 = (ry1 - dy) * w1 + (rx0 - dx) + 1;\r\n                // walk through rows (Y)\r\n                for (k = k1; k < k2; k += w1) {\r\n                    // walk through cols (X)\r\n                    for (q = 0; q < len; q++) {\r\n                        if (img[k + q] === 1) data[i + q] = 1; // copy only \"black\" points\r\n                    }\r\n                    i += sw;\r\n                }\r\n            }\r\n\r\n            // save result of border detection for animation\r\n            this.border_ = MagicWandLib.getBorderIndices({ data: data, width: sw, height: sh });\r\n        }\r\n\r\n        this.context.clearRect(0, 0, w, h);\r\n\r\n        var ind = this.border_; // array of indices of the boundary points\r\n        if (!ind) return false;\r\n\r\n        var x, y,\r\n            imgData = this.context.createImageData(w, h), // result image\r\n            res = imgData.data,\r\n            hatchLength = this.hatchLength,\r\n            hatchLength2 = hatchLength * 2,\r\n            hatchOffset = this.hatchOffset_;\r\n\r\n        len = ind.length;\r\n\r\n        for (j = 0; j < len; j++) {\r\n            i = ind[j];\r\n            x = i % sw; // calc x by index\r\n            y = (i - x) / sw; // calc y by index\r\n            x -= 1; // viewport coordinates transformed from extend (+1 px) viewport\r\n            y -= 1;\r\n            if (x < 0 || x > ix || y < 0 || y > iy) continue;\r\n            k = (y * w + x) * 4; // result image index by viewport coordinates\r\n            if ((x + y + hatchOffset) % hatchLength2 < hatchLength) { // detect hatch color \r\n                res[k + 3] = 255; // black, set only alpha\r\n            } else {\r\n                res[k] = 255; // white\r\n                res[k + 1] = 255;\r\n                res[k + 2] = 255;\r\n                res[k + 3] = 255;\r\n            }\r\n        }\r\n\r\n        this.context.putImageData(imgData, 0, 0);\r\n\r\n        this.render();\r\n\r\n        return true;\r\n    }\r\n\r\n    //#endregion\r\n\r\n    /**\r\n     * Get color of the snapshot by screen coordinates\r\n     * @param {number} x\r\n     * @param {number} y\r\n     * @return {Array<number>} RGBA color\r\n     */\r\n    getPixelColor(x, y) {\r\n        var i = (y * this.size.w + x) * this.bytes;\r\n        var res = [this.snapshot[i], this.snapshot[i + 1], this.snapshot[i + 2], this.snapshot[i + 3]];\r\n        return res;\r\n    }\r\n\r\n    /**\r\n     * Create data URL from the snapshot\r\n     * @param {string} [format=\"image/png\"] Image type\r\n     * @return {string} Image binary content URL\r\n     */\r\n    toImageUrl(format = \"image/png\") {\r\n        if (!this.isReady() || !this.size) return null;\r\n\r\n        var canvas = document.createElement(\"canvas\");\r\n        var context = canvas.getContext(\"2d\");\r\n        context.canvas.width = this.size.w;\r\n        context.canvas.height = this.size.h;\r\n\r\n        var imgData = context.createImageData(this.size.w, this.size.h);\r\n        for (var i = 0; i < this.snapshot.length; i++) {\r\n            imgData.data[i] = this.snapshot[i];\r\n        }\r\n        context.putImageData(imgData, 0, 0);\r\n\r\n        return canvas.toDataURL(format);\r\n    }\r\n\r\n}\r\n\r\n/**\r\n * @typedef {Object} MagicWandOptions\r\n * @property {ol/layer/Layer|Array<ol/layer/Layer>} layers Layer(s) for scanning\r\n * @property {string} [waitClass] CSS class for map when snapshot is loading\r\n * @property {string} [drawClass] CSS class for map when \"add mode\" is turned off (default)\r\n * @property {string} [addClass] CSS class for map when \"add mode\" is turned on\r\n * @property {number} [hatchLength=4] Thickness of the stroke (in pixels)\r\n * @property {number} [hatchTimeout=300] Hatching redraw timeout (in ms)\r\n * @property {number} [colorThreshold=15] Tool parameter: Initial color threshold [1-255] (see method 'floodFill' in 'magic-wand-tool')\r\n * @property {number} [blurRadius=5] Tool parameter: Blur radius [1-15] (see method 'gaussBlurOnlyBorder' in 'magic-wand-tool')\r\n * @property {boolean} [includeBorders=true] Tool parameter: Indicate whether to include borders pixels (see method 'floodFill' in 'magic-wand-tool')\r\n * @property {boolean} [addMode=true] Enable/disable a concatenation of masks (\"add mode\")\r\n * @property {boolean} [history=true] Enable/disable mask history functions: undo ('ctrl+z') and redo ('ctrl+y')\r\n * @property {boolean} [debugMode=false] Enable/disable debug functions: shows contours ('c' key) and current snapshot ('s' key)\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * Implementation of the magic-wand tool for the specified layers of the map\r\n * @api\r\n */\r\nexport default class MagicWand extends PointerInteraction {\r\n\r\n    /**\r\n     * @param {MagicWandOptions} options MagicWand options\r\n     */\r\n    constructor(options) {\r\n        super();\r\n\r\n        /**\r\n         * Layer(s) for scanning\r\n         * @protected\r\n         * @type {ol/layer/Layer|Array<ol/layer/Layer>}\r\n         */\r\n        this.layers = options.layers;\r\n\r\n        /**\r\n         * @type {number}\r\n         */\r\n        this.hatchLength = options.hatchLength == null ? 4 : options.hatchLength;\r\n\r\n        /**\r\n         * @type {number}\r\n         */\r\n        this.hatchTimeout = options.hatchTimeout == null ? 300 : options.hatchTimeout;\r\n\r\n        /**\r\n         * @type {number}\r\n         */\r\n        this.colorThreshold = options.colorThreshold == null ? 15 : options.colorThreshold;\r\n\r\n        /**\r\n         * @type {number}\r\n         */\r\n        this.blurRadius = options.blurRadius == null ? 5 : options.blurRadius;\r\n\r\n        /**\r\n         * @type {boolean}\r\n         */\r\n        this.includeBorders = options.includeBorders == null ? true : options.includeBorders;\r\n\r\n        /**\r\n         * @private\r\n         * @type {number}\r\n         */\r\n        this.currentThreshold_ = 0;\r\n\r\n        /**\r\n         * History of binary masks\r\n         * @type {MaskHistory}\r\n         */\r\n        this.history = options.history == false ? null : new MaskHistory();\r\n\r\n        /**\r\n         * Tile for displaying mask\r\n         * @private\r\n         * @type {TileMask}\r\n         */\r\n        this.tileMask_ = null;\r\n\r\n        /**\r\n         * @private\r\n         * @type {boolean}\r\n         */\r\n        this.isMapConnect_ = false;\r\n\r\n        /**\r\n         * @private\r\n         * @type {boolean}\r\n         */\r\n        this.allowDraw_ = false;\r\n\r\n        /**\r\n         * @private\r\n         * @type {boolean}\r\n         */\r\n        this.addMode_ = false;\r\n\r\n        /**\r\n         * @private\r\n         * @type {Mask}\r\n         */\r\n        this.oldMask_ = null;\r\n\r\n        /**\r\n         * @private\r\n         * @type {Point}\r\n         */\r\n        this.downPoint_ = null;\r\n\r\n        /**\r\n         * @private\r\n         * @type {ol/events/Array<EventsKey>}\r\n         */\r\n        this.mapKeys_ = null;\r\n\r\n        /**\r\n         * @private\r\n         * @type {boolean}\r\n         */\r\n        this.allowAdd_ = options.addMode == null ? true : options.addMode;\r\n\r\n        /**\r\n         * @private\r\n         * @type {boolean}\r\n         */\r\n        this.isDebug_ = options.debugMode == null ? false : options.debugMode;\r\n\r\n        if (options.waitClass) this.waitClass = options.waitClass;\r\n        if (options.drawClass) this.drawClass = options.drawClass;\r\n        if (options.addClass) this.addClass = options.addClass;\r\n    }\r\n\r\n    //#region Handlers\r\n\r\n    /**\r\n     * @inheritDoc\r\n     * @param {ol/MapBrowserPointerEvent} evt\r\n     */\r\n    handleDragEvent(evt) {\r\n        let e = evt.originalEvent;\r\n\r\n        // log current pixel color (debug mode)\r\n        //var pixel = this.getMap().getEventPixel(e);\r\n        //if (this.tileMask_ && this.tileMask_.isReady()) {\r\n        //    var r = this.tileMask_.getPixelColor(Math.round(pixel.x), Math.round(pixel.y));\r\n        //    console.log(r[0] + \" \" + r[1] + \" \" + r[2] + \" \" + r[3]);\r\n        //}\r\n        //return;\r\n\r\n        if (this.allowDraw_) {\r\n            var pixel = this.getMap().getEventPixel(e);\r\n            var x = Math.round(pixel[0]);\r\n            var y = Math.round(pixel[1]);\r\n            var px = this.downPoint_.x;\r\n            var py = this.downPoint_.y;\r\n            if (x != px || y != py) {\r\n                // color threshold calculation\r\n                var dx = x - px;\r\n                var dy = y - py;\r\n                var len = Math.sqrt(dx * dx + dy * dy);\r\n                var adx = Math.abs(dx);\r\n                var ady = Math.abs(dy);\r\n                var sign = adx > ady ? dx / adx : dy / ady;\r\n                sign = sign < 0 ? sign / 5 : sign / 3;\r\n                var thres = Math.min(Math.max(this.colorThreshold + Math.round(sign * len), 1), 255); // 1st method\r\n                //var thres = Math.min(Math.max(this.colorThreshold + dx / 2, 1), 255); // 2nd method\r\n                //var thres = Math.min(this.colorThreshold + Math.round(len / 3), 255); // 3rd method\r\n                if (thres != this.currentThreshold_) {\r\n                    this.currentThreshold_ = thres;\r\n                    this.drawMask_(px, py);\r\n                }\r\n            }\r\n        }\r\n        return !this.allowDraw_;\r\n    }\r\n\r\n    /**\r\n     * @inheritDoc\r\n     * @param {ol/MapBrowserPointerEvent} evt\r\n     */\r\n    handleDownEvent(evt) {\r\n        let e = evt.originalEvent;\r\n        if (e.button == 0) { // right button - draw mask\r\n            if (!this.tileMask_ || !this.tileMask_.isReady() || this.getMap().getView().getAnimating()) return;\r\n            let px = this.getMap().getEventPixel(e);\r\n            this.downPoint_ = { x: Math.round(px[0]), y: Math.round(px[1]) }; // mouse down point (base point)\r\n            this.allowDraw_ = true;\r\n            this.addMode_ = e.ctrlKey; // || e.shiftKey;\r\n            this.drawMask_(this.downPoint_.x, this.downPoint_.y);\r\n        } else { // reset all\r\n            this.allowDraw_ = false;\r\n            this.oldMask_ = null;\r\n            this.addMode_ = false;\r\n            return false;\r\n        }\r\n\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @inheritDoc\r\n     * @param {ol/MapBrowserPointerEvent} evt\r\n     */\r\n    handleUpEvent(evt) {\r\n        let e = evt.originalEvent;\r\n\r\n        // add current mask to history\r\n        if (this.allowDraw_ && this.tileMask_ && this.history) {\r\n            this.history.addMask(this.tileMask_.mask);\r\n        }\r\n\r\n        // reset all\r\n        this.currentThreshold_ = this.colorThreshold;\r\n        this.allowDraw_ = false;\r\n        this.oldMask_ = null;\r\n        this.addMode_ = false;\r\n\r\n        return false;\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     */\r\n    onMapKeyDown_(evt) {\r\n        let map = this.getMap();\r\n        if (map) {\r\n            let div = map.getTargetElement();\r\n            if (evt.keyCode == 17 && this.addClass != null && this.allowAdd_) // ctrl press (add mode on)\r\n                div.classList.add(this.addClass);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     */\r\n    onMapKeyUp_(evt) {\r\n        let map = this.getMap();\r\n        if (map) {\r\n            let div = map.getTargetElement();\r\n            let view = map.getView();\r\n            if (evt.keyCode == 17 && this.allowAdd_) div.classList.remove(this.addClass); // ctrl unpress (add mode off)\r\n            if (evt.keyCode == 83 && this.isDebug_) { // 's' key - show current snapshot (debug mode)\r\n                if (!this.tileMask_ || !this.tileMask_.isReady() || view.getInteracting() || view.getAnimating()) return;\r\n                this.tileMask_.context.clearRect(0, 0, this.tileMask_.size.w, this.tileMask_.size.h);\r\n                this.tileMask_.render(true);\r\n            }\r\n            if (evt.keyCode == 67 && this.isDebug_) { // 'c' key - show contours (debug mode)\r\n                if (!this.tileMask_ || !this.tileMask_.isReady() || view.getInteracting() || view.getAnimating()) return;\r\n\r\n                var cs = this.getContours();\r\n                if (cs == null) return;\r\n\r\n                var outer = cs.filter((c) => !c.inner);\r\n                var inner = cs.filter((c) => c.inner);\r\n\r\n                var ctx = this.tileMask_.context;\r\n                ctx.clearRect(0, 0, this.tileMask_.size.w, this.tileMask_.size.h);\r\n\r\n                var i, j, ps;\r\n                // outer\r\n                ctx.beginPath();\r\n                for (i = 0; i < outer.length; i++) {\r\n                    ps = outer[i].points;\r\n                    ctx.moveTo(ps[0].x, ps[0].y);\r\n                    //ctx.arc(ps[0].x, ps[0].y, 2, 0, 2 * Math.PI);\r\n                    for (j = 1; j < ps.length; j++) {\r\n                        ctx.lineTo(ps[j].x, ps[j].y);\r\n                        //ctx.arc(ps[j].x, ps[j].y, 1, 0, 2 * Math.PI);\r\n                    }\r\n                }\r\n                ctx.strokeStyle = \"green\";\r\n                ctx.stroke();\r\n\r\n                // inner\r\n                ctx.beginPath();\r\n                for (i = 0; i < inner.length; i++) {\r\n                    ps = inner[i].points;\r\n                    ctx.moveTo(ps[0].x, ps[0].y);\r\n                    //ctx.arc(ps[0].x, ps[0].y, 2, 0, 2 * Math.PI);\r\n                    for (j = 1; j < ps.length; j++) {\r\n                        ctx.lineTo(ps[j].x, ps[j].y);\r\n                        //ctx.arc(ps[j].x, ps[j].y, 1, 0, 2 * Math.PI);\r\n                    }\r\n                }\r\n                ctx.strokeStyle = \"red\";\r\n                ctx.stroke();\r\n\r\n                this.tileMask_.render(true);\r\n            }\r\n            if (evt.ctrlKey && this.history) { // history manipulations\r\n                var img = null;\r\n                if (evt.keyCode == 89) img = this.history.redo(); // ctrl + y\r\n                if (evt.keyCode == 90) img = this.history.undo(); // ctrl + z\r\n                if (img && this.tileMask_) this.tileMask_.setMask(img); // apply mask from history\r\n            }\r\n        }\r\n    }\r\n\r\n    //#endregion\r\n\r\n    /**\r\n     * @inheritDoc\r\n     */\r\n    setActive(active) {\r\n        if (!this.getActive() && active) {\r\n            this.onActivate_();\r\n        }\r\n        if (this.getActive() && !active) {\r\n            this.onDeactivate_();\r\n        }\r\n        super.setActive(active);\r\n    }\r\n\r\n    stopEditing() {\r\n        this.setActive(false);\r\n        annotationManager.viewport.annotationsLayer.setVisible(true);\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     */\r\n    onActivate_() {\r\n        let map = this.getMap();\r\n        if (map) {\r\n            this.connectToMap(map);\r\n            this.createMask(map);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     */\r\n    onDeactivate_() {\r\n        this.allowDraw_ = false;\r\n        this.downPoint_ = null;\r\n        this.oldMask_ = null;\r\n        this.addMode_ = false;\r\n        this.disconnectFromMap();\r\n        if (this.tileMask_) this.tileMask_.dispose();\r\n        this.tileMask_ = null;\r\n        this.clearHistory_();\r\n    }\r\n\r\n    /**\r\n     * @inheritDoc\r\n     */\r\n    disposeInternal() {\r\n        this.onDeactivate_();\r\n\r\n        if (this.history) this.history.dispose();\r\n\r\n        this.history = null;\r\n        this.layers = null;\r\n\r\n        super.disposeInternal();\r\n    }\r\n\r\n    //#region Map\r\n\r\n    /**\r\n     * @inheritDoc\r\n     */\r\n    setMap(map) {\r\n        this.onDeactivate_();\r\n        super.setMap(map);\r\n        if (this.getActive()) {\r\n            this.onActivate_();\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @protected\r\n     * @param {ol/Map} map\r\n     */\r\n    connectToMap(map) {\r\n        this.mapKeys_ = [\r\n            map.getView().on('change:resolution', this.onViewResChanged_.bind(this))\r\n        ];\r\n\r\n        this.keyDownListener = this.onMapKeyDown_.bind(this);\r\n        this.keyUpListener = this.onMapKeyUp_.bind(this);\r\n\r\n        document.addEventListener(\"keydown\", this.keyDownListener);\r\n        document.addEventListener(\"keyup\", this.keyUpListener);\r\n\r\n        let div = map.getTargetElement();\r\n        if (this.drawClass) div.classList.add(this.drawClass);\r\n\r\n        this.onMapContextMenuListener_ = (e) => {\r\n            if (this.getActive()) e.preventDefault();\r\n        };\r\n        div.addEventListener(\"contextmenu\", this.onMapContextMenuListener_);\r\n    }\r\n\r\n    /**\r\n     * @protected\r\n     */\r\n    disconnectFromMap() {\r\n        if (this.mapKeys_) {\r\n            unByKey(this.mapKeys_);\r\n            this.mapKeys_ = null;\r\n        }\r\n\r\n        document.removeEventListener(\"keydown\", this.keyDownListener);\r\n        document.removeEventListener(\"keyup\", this.keyUpListener);\r\n\r\n        let map = this.getMap();\r\n        if (map) {\r\n            let div = map.getTargetElement();\r\n            div.classList.remove(this.drawClass);\r\n            div.classList.remove(this.waitClass);\r\n            div.classList.remove(this.addClass);\r\n            div.removeEventListener(\"contextmenu\", this.onMapContextMenuListener_);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     */\r\n    onViewResChanged_() {\r\n        this.clearHistory_();\r\n    }\r\n\r\n    /**\r\n     * @private\r\n     */\r\n    clearHistory_() {\r\n        if (this.history) this.history.clear();\r\n    }\r\n\r\n    /**\r\n     * Get pixel offset in the main world\r\n     * @param {ol/Map} map\r\n     * @return {PixelOffset}\r\n     */\r\n    static getMainWorldOffset(map) {\r\n        let extent = map.getView().getProjection().getExtent();\r\n        let topLeft = map.getPixelFromCoordinate([extent[0], extent[3]]);\r\n        topLeft = { x: Math.round(-topLeft[0]), y: Math.round(-topLeft[1]) };\r\n        let bottomRight = map.getPixelFromCoordinate([extent[2], extent[1]]);\r\n        bottomRight = { x: Math.round(-bottomRight[0]), y: Math.round(-bottomRight[1]) };\r\n        let w = topLeft.x - bottomRight.x;\r\n        let x = topLeft.x % w;\r\n        return { x: x < 0 ? x + w : x, y: topLeft.y, width: w };\r\n    }\r\n\r\n    //#endregion\r\n\r\n    //#region Mask\r\n\r\n    /**\r\n     * @protected\r\n     * @param {ol/Map} map\r\n     */\r\n    createMask(map) {\r\n        let div = map.getTargetElement();\r\n        this.tileMask_ = new TileMask({ map: map, layers: this.layers, hatchTimeout: this.hatchTimeout, hatchLength: this.hatchLength });\r\n        if (this.waitClass) {\r\n            this.tileMask_.on(\"scanStarted\", () => div.classList.add(this.waitClass));\r\n            this.tileMask_.on(\"scanFinished\", () => div.classList.remove(this.waitClass));\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Concatenate mask and old mask\r\n     * @private\r\n     * @param {Mask} mask\r\n     * @param {Mask} old\r\n     * @return {Mask} concatenated mask\r\n     */\r\n    concatMask_(mask, old) {\r\n        var data1 = old.data,\r\n            data2 = mask.data,\r\n            w1 = old.width,\r\n            w2 = mask.width,\r\n            px1 = old.globalOffset.x,\r\n            py1 = old.globalOffset.y,\r\n            px2 = mask.globalOffset.x,\r\n            py2 = mask.globalOffset.y,\r\n            b1 = old.bounds,\r\n            b2 = mask.bounds,\r\n            px = Math.min(b1.minX + px1, b2.minX + px2), // global offset for new mask (by min in bounds)\r\n            py = Math.min(b1.minY + py1, b2.minY + py2),\r\n            b = { // bounds for new mask include all of the pixels [0,0,width,height] (reduce to bounds)\r\n                minX: 0,\r\n                minY: 0,\r\n                maxX: Math.max(b1.maxX + px1, b2.maxX + px2) - px,\r\n                maxY: Math.max(b1.maxY + py1, b2.maxY + py2) - py\r\n            },\r\n            w = b.maxX + 1, // size for new mask\r\n            h = b.maxY + 1,\r\n            i, j, k, k1, k2, len;\r\n\r\n        var result = new Uint8Array(w * h);\r\n\r\n        // copy all old mask\r\n        len = b1.maxX - b1.minX + 1;\r\n        i = (py1 - py + b1.minY) * w + (px1 - px + b1.minX);\r\n        k1 = b1.minY * w1 + b1.minX;\r\n        k2 = b1.maxY * w1 + b1.minX + 1;\r\n        // walk through rows (Y)\r\n        for (k = k1; k < k2; k += w1) {\r\n            result.set(data1.subarray(k, k + len), i); // copy row\r\n            i += w;\r\n        }\r\n\r\n        // copy new mask (only \"black\" pixels)\r\n        len = b2.maxX - b2.minX + 1;\r\n        i = (py2 - py + b2.minY) * w + (px2 - px + b2.minX);\r\n        k1 = b2.minY * w2 + b2.minX;\r\n        k2 = b2.maxY * w2 + b2.minX + 1;\r\n        // walk through rows (Y)\r\n        for (k = k1; k < k2; k += w2) {\r\n            // walk through cols (X)\r\n            for (j = 0; j < len; j++) {\r\n                if (data2[k + j] === 1) result[i + j] = 1;\r\n            }\r\n            i += w;\r\n        }\r\n\r\n        return {\r\n            data: result,\r\n            width: w,\r\n            height: h,\r\n            bounds: b,\r\n            globalOffset: {\r\n                x: px,\r\n                y: py\r\n            }\r\n        };\r\n    }\r\n\r\n    /**\r\n     * Create mask for the specified pixel position\r\n     * @private\r\n     * @param {number} x\r\n     * @param {number} y\r\n     * @return {boolean}\r\n     */\r\n    drawMask_(x, y) {\r\n        if (!this.tileMask_ || !this.tileMask_.isReady()) return false;\r\n\r\n        var size = this.tileMask_.size;\r\n        var map = this.getMap();\r\n        var ms = map.getSize();\r\n        var mapSize = { w: ms[0], h: ms[1] };\r\n        if (size.w != mapSize.w || size.h != mapSize.h) { // if map size is not equal to snapshot size then recreate snapshot\r\n            this.tileMask_.scan();\r\n            return false;\r\n            //if (!this.tileMask_.isReady()) return false;\r\n            //size = this.tileMask_.size;\r\n        }\r\n\r\n        var tile = this.tileMask_;\r\n\r\n        var offset = MagicWand.getMainWorldOffset(map); // snapshot (viewport) offset in the main world\r\n\r\n        var image = {\r\n            data: this.tileMask_.snapshot,\r\n            width: size.w,\r\n            height: size.h,\r\n            bytes: this.tileMask_.bytes\r\n        };\r\n\r\n        var mask = null;\r\n\r\n        if (this.allowAdd_ && this.addMode_ && tile.mask) {\r\n            if (!this.oldMask_) {\r\n                var img = tile.mask;\r\n                var bounds = img.bounds;\r\n                // clone mask\r\n                this.oldMask_ = {\r\n                    data: new Uint8Array(img.data),\r\n                    width: img.width,\r\n                    height: img.height,\r\n                    bounds: {\r\n                        minX: bounds.minX,\r\n                        maxX: bounds.maxX,\r\n                        minY: bounds.minY,\r\n                        maxY: bounds.maxY\r\n                    },\r\n                    globalOffset: {\r\n                        x: img.globalOffset.x,\r\n                        y: img.globalOffset.y\r\n                    }\r\n                };\r\n                var oldOffset = this.oldMask_.globalOffset,\r\n                    offsets = [{ x: oldOffset.x, y: oldOffset.y }]; // add old mask offset (current world)\r\n\r\n                let i, j, k, k1, k2, len, off,\r\n                    x0, y0, x1, y1, dx, dy,\r\n                    rx0, rx1, ry0, ry1,\r\n                    w = image.width,\r\n                    h = image.height,\r\n                    data = new Uint8Array(w * h),\r\n                    old = this.oldMask_.data,\r\n                    w1 = this.oldMask_.width,\r\n                    b = this.oldMask_.bounds,\r\n                    ix = image.width - 1, // right bottom of image (left top = [0,0])\r\n                    iy = image.height - 1,\r\n                    offsetsLen = offsets.length;\r\n\r\n                // copy visible data from old mask for floodfill (considering 'multiWorld' and neighboring worlds)\r\n                for (j = 0; j < offsetsLen; j++) {\r\n                    off = offsets[j]; // old mask offset in the global basis\r\n                    dx = off.x - offset.x; // delta for the transformation to image basis\r\n                    dy = off.y - offset.y;\r\n                    x0 = dx + b.minX; // left top of old mask (in image basis)\r\n                    y0 = dy + b.minY;\r\n                    x1 = dx + b.maxX; // right bottom of old mask (in image basis)\r\n                    y1 = dy + b.maxY;\r\n\r\n                    // intersection of the old mask with the image (viewport)\r\n                    if (!(x1 < 0 || x0 > ix || y1 < 0 || y0 > iy)) {\r\n                        rx0 = x0 > 0 ? x0 : 0; // result of the intersection\r\n                        ry0 = y0 > 0 ? y0 : 0;\r\n                        rx1 = x1 < ix ? x1 : ix;\r\n                        ry1 = y1 < iy ? y1 : iy;\r\n                    } else {\r\n                        continue;\r\n                    }\r\n                    // copy result of the intersection to mask data for floodfill\r\n                    len = rx1 - rx0 + 1;\r\n                    i = ry0 * w + rx0;\r\n                    k1 = (ry0 - dy) * w1 + (rx0 - dx);\r\n                    k2 = (ry1 - dy) * w1 + (rx0 - dx) + 1;\r\n                    // walk through rows (Y)\r\n                    for (k = k1; k < k2; k += w1) {\r\n                        data.set(old.subarray(k, k + len), i); // copy row\r\n                        i += w;\r\n                    }\r\n                }\r\n                this.oldMask_.visibleData = data;\r\n            }\r\n\r\n            // create a new mask considering the current visible data\r\n            mask = MagicWandLib.floodFill(image, x, y, this.currentThreshold_, this.oldMask_.visibleData, this.includeBorders);\r\n            if (!mask) return false;\r\n            // blur a new mask considering the current visible data\r\n            if (this.blurRadius > 0) mask = MagicWandLib.gaussBlurOnlyBorder(mask, this.blurRadius, this.oldMask_.visibleData);\r\n\r\n            mask.globalOffset = offset;\r\n\r\n            // check a shortest path for concatenation\r\n            let distance = (offset.x + mask.width / 2) - (this.oldMask_.globalOffset.x + this.oldMask_.width / 2);\r\n            if (Math.abs(distance) > offset.width / 2) {\r\n                mask.globalOffset.x = distance > 0 ? offset.x - offset.width : offset.x + offset.width;\r\n            }\r\n            mask = this.concatMask_(mask, this.oldMask_); // old mask + new mask\r\n        } else {\r\n            mask = MagicWandLib.floodFill(image, x, y, this.currentThreshold_, null, this.includeBorders);\r\n            if (this.blurRadius > 0) mask = MagicWandLib.gaussBlurOnlyBorder(mask, this.blurRadius);\r\n            mask.globalOffset = offset;\r\n        }\r\n\r\n        tile.setMask(mask);\r\n\r\n        return true;\r\n    }\r\n\r\n    //#endregion\r\n\r\n    //#region Public\r\n\r\n    /**\r\n     * Set map layers to create snapshot and to draw a mask\r\n     * @param {ol/layer/Layer|Array<ol/layer/Layer>} layers Layer(s) for scanning\r\n     * @return {boolean}\r\n     */\r\n    setLayers(layers) {\r\n        if (!layers) return false;\r\n\r\n        this.layers = layers;\r\n\r\n        return !this.tileMask_ ? false : this.tileMask_.setLayers(layers);\r\n    }\r\n\r\n    /**\r\n     * Return contours of binary mask\r\n     * @param {number} [simplifyTolerant=1] Tool parameter: Simplify tolerant (see method 'simplifyContours' in 'magic-wand-tool')\r\n     * @param {number} [simplifyCount=30] Tool parameter: Simplify count (see method 'simplifyContours' in 'magic-wand-tool')\r\n     * @return {Array<Contour>} Contours in the viewport basis\r\n     */\r\n    getContours(simplifyTolerant = 1, simplifyCount = 30) {\r\n        if (!this.tileMask_.mask) return null;\r\n\r\n        var offset = MagicWand.getMainWorldOffset(this.getMap()); // viewport offset in the main world\r\n\r\n        var i, j, points, len, plen, c,\r\n            mask = this.tileMask_.mask,\r\n            dx = mask.globalOffset.x - Math.round(offset.x),\r\n            dy = mask.globalOffset.y - Math.round(offset.y),\r\n            contours = MagicWandLib.traceContours(mask),\r\n            result = [];\r\n\r\n        if (simplifyTolerant > 0) contours = MagicWandLib.simplifyContours(contours, simplifyTolerant, simplifyCount);\r\n\r\n        return contours.map(c => {\r\n            c.initialCount = c.initialCount || c.points.length;\r\n            c.points.forEach(p => {\r\n                p.x += dx;\r\n                p.y += dy;\r\n            });\r\n            return c;\r\n        });\r\n    }\r\n\r\n    /**\r\n     * Get a data of the current mask\r\n     * @return {OffsetMask} Mask data in the viewport basis\r\n     */\r\n    getMask() {\r\n        if (this.tileMask_) {\r\n            let mask = this.tileMask_.mask;\r\n\r\n            let offset = MagicWand.getMainWorldOffset(this.getMap()); // viewport offset in the main world\r\n\r\n            let x, y, k = 0,\r\n                data = mask.data,\r\n                bounds = mask.bounds,\r\n                maskW = mask.width,\r\n                sw = bounds.maxX - bounds.minX + 1,\r\n                sh = bounds.maxY - bounds.minY + 1,\r\n                res = new Uint8Array(sw * sh);\r\n\r\n            for (y = bounds.minY; y <= bounds.maxY; y++) {\r\n                for (x = bounds.minX; x <= bounds.maxX; x++) {\r\n                    res[k++] = data[y * maskW + x];\r\n                }\r\n            }\r\n\r\n            return {\r\n                data: res,\r\n                size: {\r\n                    w: sw,\r\n                    h: sh\r\n                },\r\n                offset: {\r\n                    x: mask.globalOffset.x + bounds.minX - Math.round(offset.x),\r\n                    y: mask.globalOffset.y + bounds.minY - Math.round(offset.y)\r\n                }\r\n            };\r\n        }\r\n        return null;\r\n    }\r\n\r\n    /**\r\n     * Clear the current mask and remove it from the map view\r\n     */\r\n    clearMask() {\r\n        if (this.tileMask_) {\r\n            this.tileMask_.clearMask();\r\n        }\r\n    }\r\n\r\n    //#endregion\r\n\r\n}\r\n\r\n\r\n/**\r\n * @classdesc\r\n * History of binary masks\r\n * @api\r\n */\r\nexport class MaskHistory extends BaseObject {\r\n\r\n    constructor() {\r\n        super();\r\n\r\n        /**\r\n         * Array of masks\r\n         * @type {Array<Mask>}\r\n         */\r\n        this.masks = [];\r\n\r\n        /**\r\n         * Current index of history array\r\n         * @type {number}\r\n         */\r\n        this.current = -1;\r\n    }\r\n\r\n    /**\r\n     * @inheritDoc\r\n     */\r\n    disposeInternal() {\r\n        this.masks = null;\r\n        super.disposeInternal();\r\n    }\r\n\r\n    clear() {\r\n        this.masks.length = 0;\r\n        this.current = -1;\r\n    }\r\n\r\n    /**\r\n     * @param {Mask}\r\n     * @return {boolean}\r\n     */\r\n    addMask(mask) {\r\n        if (!mask) return false;\r\n\r\n        this.current++;\r\n        this.masks.length = this.current;\r\n        this.masks.push(mask);\r\n\r\n        return true;\r\n    }\r\n\r\n    /**\r\n     * @return {Mask}\r\n     */\r\n    getCurrent() {\r\n        return this.current > -1 ? this.masks[this.current] : null;\r\n    }\r\n\r\n    /**\r\n     * @return {boolean}\r\n     */\r\n    allowUndo() {\r\n        return this.current > 0;\r\n    }\r\n\r\n    /**\r\n     * @return {boolean}\r\n     */\r\n    allowRedo() {\r\n        return this.current < this.masks.length - 1;\r\n    }\r\n\r\n    /**\r\n     * @return {Mask}\r\n     */\r\n    undo() {\r\n        if (!this.allowUndo()) return null;\r\n        this.current--;\r\n        return this.getCurrent();\r\n    }\r\n\r\n    /**\r\n     * @return {Mask}\r\n     */\r\n    redo() {\r\n        if (!this.allowRedo()) return null;\r\n        this.current++;\r\n        return this.getCurrent();\r\n    }\r\n\r\n}","import * as olFormat from 'ol/format';\r\nimport * as olInteraction from 'ol/interaction';\r\nimport Overlay from 'ol/Overlay';\r\nimport * as Observable from 'ol/Observable';\r\nimport { Icon, Fill, Stroke, Circle, RegularShape, Style } from 'ol/style';\r\nimport { MultiPoint, Polygon, Circle as GeomCircle } from 'ol/geom';\r\nimport { fromCircle } from 'ol/geom/Polygon';\r\nimport { pointerMove, click, singleClick, noModifierKeys, shiftKeyOnly, never } from 'ol/events/condition';\r\nimport { checkBrowserCompatibility } from '../../view/helpers';\r\nimport { Viewport } from '../../view/viewport';\r\nimport { Resources } from '../../resources/resources';\r\nimport { DefaultFillColor } from '../../view/definitions';\r\nimport { Annotation, AnnotationState, Edit } from '../../view/definitions';\r\nimport { Events } from './components';\r\nimport $ from 'jquery';\r\nimport * as jscolor from '../../../lib/jscolor/jscolor';\r\nimport { ol } from '../../view/definitionsOl';\r\nimport union from \"@turf/union\";\r\nimport difference from \"@turf/difference\";\r\nimport intersect from \"@turf/intersect\";\r\nimport ol_interaction_Transform from \"../../view/interactions/transform\";\r\nimport ol_interaction_Brush from \"../../view/interactions/brush\";\r\nimport MagicWandInteraction from \"../../view/interactions/magicWand\";\r\nimport Feature from \"ol/Feature\";\r\n\r\nvar ellipseSides = 32;\r\n\r\nfunction supportsColorPicker() {\r\n    var colorInput;\r\n    colorInput = $('<input type=\"color\" value=\"!\" />')[0];\r\n    return colorInput.type === 'color' && colorInput.value !== '!';\r\n}\r\n\r\nfunction toggleDragPanInteraction(map, enabled) {\r\n    map.getInteractions().forEach(function (element, index, array) {\r\n        if (element instanceof olInteraction.DragPan) {\r\n            element.setActive(enabled);\r\n            return;\r\n        }\r\n    });\r\n}\r\n\r\nfunction getStrokeColor() {\r\n    if (this.element === null) {\r\n        return \"#000000\";\r\n    }\r\n\r\n    var scolor = $(this.element).find(\"li.draw a.active\").data(\"color\");\r\n    if (!scolor) {\r\n        return \"#000000\";\r\n    } else {\r\n        return scolor;\r\n    }\r\n}\r\n\r\nfunction getPenSize() {\r\n    if (this.element === null) {\r\n        return 1;\r\n    }\r\n\r\n    var width = parseInt($(this.element).find(\"li.draw a.active\").data(\"size\"));\r\n    if (isNaN(width) || width < 1) {\r\n        width = 1;\r\n    }\r\n\r\n    return width;\r\n}\r\n\r\nfunction getAnnotationStyle(strokeColor, width, fillColor, opt_icon, feature, styleGeometryFunction) {\r\n    var imageStyle = null;\r\n\r\n    if (!fillColor) {\r\n        fillColor = DefaultFillColor;\r\n    }\r\n\r\n    if (!strokeColor) {\r\n        strokeColor = getStrokeColor.call(this);\r\n    }\r\n\r\n    if (!width) {\r\n        width = getPenSize.call(this);\r\n    }\r\n\r\n    var fill = new Fill({\r\n        color: fillColor\r\n    });\r\n\r\n    var stroke = new Stroke({\r\n        color: strokeColor,\r\n        width: width\r\n    });\r\n\r\n    if (!opt_icon) {\r\n        imageStyle = new Circle({\r\n            fill: fill,\r\n            stroke: stroke,\r\n            radius: 5\r\n        });\r\n    } else {\r\n        imageStyle = new Icon({\r\n            anchor: [0.5, 0.5],\r\n            anchorXUnits: 'fraction',\r\n            anchorYUnits: 'fraction',\r\n            opacity: 1,\r\n            src: this.viewport.options.annotations.imageBaseUrl + opt_icon,\r\n            scale: isNaN(this.viewport.options.annotations.imageScale) ? 1 : this.viewport.options.annotations.imageScale\r\n        });\r\n    }\r\n\r\n    return new Style({\r\n        image: imageStyle,\r\n        fill: fill,\r\n        stroke: stroke,\r\n        text: this.viewport.getAnnotationTextStyle(feature),\r\n        geometry: styleGeometryFunction\r\n    });\r\n}\r\n\r\n// fixes the y-coordinates of annotations by inverting it\r\nfunction annotationTransform(input, output, dimension) {\r\n    for (var i = 0; i < input.length; i += dimension) {\r\n        var x = input[i];\r\n        var y = input[i + 1];\r\n\r\n        if (this.flip.vertically !== true) {\r\n            y = this.extent[3] - y;\r\n        }\r\n\r\n        if (this.flip.horizontally === true) {\r\n            x = this.extent[2] - x;\r\n        }\r\n\r\n        output[i] = x;\r\n        output[i + 1] = y;\r\n    }\r\n}\r\n\r\nfunction styleCircleGeometryFunction(feature) {\r\n    var g = feature.getGeometry();\r\n\r\n    if (g.getType() === \"Point\") {\r\n        return new GeomCircle(g.getFirstCoordinate(), this.size[0] / 2);\r\n    }\r\n\r\n    return g;\r\n}\r\n\r\nfunction styleBoxGeometryFunction(feature) {\r\n    var g = feature.getGeometry();\r\n\r\n    if (g.getType() === \"Point\") {\r\n        var dx = Math.abs(this.size[0] / 2);\r\n        var dy = Math.abs(this.size[1] / 2);\r\n        var c = g.getFirstCoordinate();\r\n\r\n        return new Polygon([\r\n            [\r\n                [c[0] - dx, c[1] - dy],\r\n                [c[0] - dx, c[1] + dy],\r\n                [c[0] + dx, c[1] + dy],\r\n                [c[0] + dx, c[1] - dy],\r\n                [c[0] - dx, c[1] - dy]\r\n            ]\r\n        ]);\r\n    }\r\n\r\n    return g;\r\n}\r\n\r\nfunction multiPointGeometryFunction(coordinates, geometry) {\r\n    if (!geometry) {\r\n        geometry = new MultiPoint(coordinates);\r\n    } else {\r\n        geometry.setCoordinates(coordinates);\r\n    }\r\n\r\n    return geometry;\r\n}\r\n\r\nfunction boxGeometryFunction(coordinates, geometry) {\r\n    var options = this;\r\n    if (options.size) {\r\n        // when we are drawing a rectangle with fixed size, the geometry type is \"Point\" coordinates has just one X,Y pair, which is our center\r\n        var dx = Math.abs(options.size[0] / 2);\r\n        var dy = Math.abs(options.size[1] / 2);\r\n        var c = coordinates;\r\n\r\n        return new Polygon([\r\n            [\r\n                [c[0] - dx, c[1] - dy],\r\n                [c[0] - dx, c[1] + dy],\r\n                [c[0] + dx, c[1] + dy],\r\n                [c[0] + dx, c[1] - dy],\r\n                [c[0] - dx, c[1] - dy]\r\n            ]\r\n        ]);\r\n    }\r\n\r\n\r\n\r\n    var start = coordinates[0];\r\n    var end = coordinates[1];\r\n\r\n    if (!start || !end) {\r\n        return null;\r\n    }\r\n    let coords = [\r\n        [start, [start[0], end[1]], end, [end[0], start[1]], start]\r\n    ];\r\n\r\n    if (!geometry) {\r\n        geometry = new Polygon(coords);\r\n    } else {\r\n        geometry.setCoordinates(coords);\r\n    }\r\n\r\n    return geometry;\r\n}\r\n\r\nfunction circleGeometryFunction(coordinates, opt_geometry) {\r\n    if (this.size) {\r\n        // when we are drawing a rectangle with fixed size, the geometry type is \"Point\" coordinates has just one X,Y pair, which is our center\r\n        // the size option gives us the circle's diameter\r\n        return new GeomCircle(coordinates, this.size[0] / 2.0);\r\n    }\r\n\r\n    var circle = opt_geometry ? /** @type {Circle} */ (opt_geometry) : new GeomCircle([NaN, NaN]);\r\n    var c = coordinates[0];\r\n    var dx = coordinates[0][0] - coordinates[1][0];\r\n    var dy = coordinates[0][1] - coordinates[1][1];\r\n    var radius = Math.sqrt(dx * dx + dy * dy);\r\n\r\n    circle.setCenterAndRadius(c, radius);\r\n    return circle;\r\n}\r\n\r\nfunction ellipseGeometryFunction(coordinates, geometry) {\r\n    var start = coordinates[0];\r\n    var end = coordinates[1];\r\n\r\n    if (!start || !end) {\r\n        return null;\r\n    }\r\n\r\n    var radiusY = (start[1] - end[1]) / 2;\r\n    var s = [start[0], start[1] + radiusY];\r\n    var e = end;\r\n\r\n    var center = [(e[0] + s[0]) / 2, (e[1] + s[1]) / 2];\r\n    var radius = [center[0] - e[0], center[1] - e[1]];\r\n    var ellipseCoords = [];\r\n    var step = 2 * Math.PI / ellipseSides;\r\n\r\n    for (var i = 0; i < ellipseSides; i++) {\r\n        var t = i * step;\r\n        var p = [Math.round(center[0] + radius[0] * Math.cos(t)), Math.round(center[1] + radius[1] * Math.sin(t))];\r\n\r\n        ellipseCoords.push(p);\r\n    }\r\n\r\n    ellipseCoords.push(ellipseCoords[0]);\r\n\r\n    if (!geometry) {\r\n        geometry = new Polygon([ellipseCoords]);\r\n    } else {\r\n        geometry.setCoordinates([ellipseCoords]);\r\n    }\r\n\r\n    return geometry;\r\n}\r\n\r\n// 3d cross product\r\nfunction crossProduct(v1, v2) {\r\n    return [\r\n        (v1[1] * v2[2]) - (v1[2] * v2[1]),\r\n        (v1[2] * v2[0]) - (v1[0] * v2[2]),\r\n        (v1[0] * v2[1]) - (v1[1] * v2[0])\r\n    ];\r\n}\r\n\r\nfunction vectorLength(v) {\r\n    if (v.length === 3) {\r\n        return Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);\r\n    }\r\n\r\n    return Math.sqrt(v[0] * v[0] + v[1] * v[1]);\r\n}\r\n\r\nfunction normalizeVector(v, length) {\r\n    if (v.length === 2) {\r\n        v.push(0);\r\n    }\r\n\r\n    if (!length) {\r\n        length = vectorLength(v);\r\n    }\r\n\r\n    if (length > 0.00001) {\r\n        var inv = 1.0 / length;\r\n        v[0] *= inv;\r\n        v[1] *= inv;\r\n        v[2] *= inv;\r\n    }\r\n\r\n    if (v.length === 3) {\r\n        return [v[0], v[1], v[2]];\r\n    }\r\n\r\n    return [v[0], v[1]];\r\n}\r\n\r\nfunction vectorMultScalar(v, scalar) {\r\n    if (v.length === 3) {\r\n        return [scalar * v[0], scalar * v[1], scalar * v[2]];\r\n    }\r\n\r\n    return [scalar * v[0], scalar * v[1]];\r\n}\r\n\r\n// calculates v2 - v1\r\nfunction vectorDiff(v1, v2) {\r\n    if (v1.lenth === 3 && v2.length === 3) {\r\n        return [v2[0] - v1[0], v2[1] - v1[1], v2[2] - v1[2]];\r\n    }\r\n\r\n    return [v2[0] - v1[0], v2[1] - v1[1]];\r\n}\r\n\r\nfunction arrowGeometryFunction(coordinates, geometry) {\r\n    var start = coordinates[1];\r\n    var end = coordinates[0];\r\n\r\n    var axisZ = [0, 0, 1];\r\n\r\n    var diff = vectorDiff(start, end);\r\n    var len = vectorLength(diff);\r\n    var normDirection = normalizeVector(diff, len);\r\n\r\n    // a normalized vector, vertical to the arrow axis\r\n    var vertical = crossProduct(normDirection, axisZ);\r\n\r\n    // Back        Body          Spearhead\r\n    //                          C\r\n    //                          |\\\r\n    //    A____________________B| \\\r\n    //    |                     |  \\D\r\n    //    |_____________________|  /\r\n    //    G                    F| /\r\n    //                          |/\r\n    //                          E\r\n\r\n    // body width is set to 15% of the total length\r\n    var bodyWidth = len * 0.15;\r\n    var bodyLength = len * 0.75;\r\n    var spearheadLength = len * 0.25;\r\n    var spearheadWidth = len * 0.15;\r\n\r\n    var a = [start[0] - (vertical[0] * bodyWidth / 2), start[1] - (vertical[1] * bodyWidth / 2)];\r\n    var g = [start[0] + (vertical[0] * bodyWidth / 2), start[1] + (vertical[1] * bodyWidth / 2)];\r\n\r\n    var b = [a[0] + normDirection[0] * bodyLength, a[1] + normDirection[1] * bodyLength];\r\n    var f = [g[0] + normDirection[0] * bodyLength, g[1] + normDirection[1] * bodyLength];\r\n\r\n    var c = [b[0] - (vertical[0] * spearheadWidth / 2), b[1] - (vertical[1] * spearheadWidth / 2)];\r\n    var e = [f[0] + (vertical[0] * spearheadWidth / 2), f[1] + (vertical[1] * spearheadWidth / 2)];\r\n\r\n    var d = [end[0], end[1]];\r\n\r\n    let coords = [\r\n        [a, b, c, d, e, f, g, a]\r\n    ];\r\n\r\n    if (!geometry) {\r\n        geometry = new Polygon(coords);\r\n    } else {\r\n        geometry.setCoordinates(coords);\r\n    }\r\n\r\n    return geometry;\r\n}\r\n\r\nfunction showDrawingControls(show, annotationType, feature) {\r\n    if (this.drawingControlsContainer && this.viewport.element.contains(this.drawingControlsContainer)) {\r\n        this.viewport.element.removeChild(this.drawingControlsContainer);\r\n    }\r\n\r\n    this.drawingControlsContainer = null;\r\n    this.endDrawingButton = null;\r\n    this.removeLastButton = null;\r\n    this.continueDrawingButton = null;\r\n    this.cancelDrawingButton = null;\r\n    this.counterButton = null;\r\n\r\n    if (this.changeFeatureKey != null) {\r\n        Observable.unByKey(this.changeFeatureKey);\r\n    }\r\n\r\n    if (!show) {\r\n        return;\r\n    }\r\n\r\n    this.changeFeatureKey = null;\r\n    var self = this;\r\n    this.drawingControlsContainer = document.createElement(\"div\");\r\n    this.drawingControlsContainer.className = \"ol-control pma-ui-viewport-annotations-drawing\";\r\n\r\n    this.cancelDrawingButton = document.createElement(\"button\");\r\n    this.cancelDrawingButton.innerHTML = Resources.translate(\"Cancel\");\r\n\r\n    $(this.cancelDrawingButton).click(function (evt) {\r\n        evt.preventDefault();\r\n        showDrawingControls.call(self, false, annotationType);\r\n        self.finishDrawing(false, annotationType);\r\n    });\r\n\r\n\r\n    // do not add the toolbar while drawing a compound polygon\r\n    if (!(annotationType === Annotation.CompoundFreehand && self.drawing)) {\r\n        this.viewport.element.appendChild(this.drawingControlsContainer);\r\n    }\r\n\r\n    if (annotationType === Annotation.MultiPoint) {\r\n        this.removeLastButton = document.createElement(\"button\");\r\n        this.removeLastButton.innerHTML = Resources.translate(\"Remove last point\");\r\n        this.drawingControlsContainer.appendChild(this.removeLastButton);\r\n\r\n        $(this.removeLastButton).click(function (evt) {\r\n            evt.preventDefault();\r\n            if (self.draw) {\r\n                self.draw.removeLastPoint();\r\n            }\r\n        });\r\n\r\n        this.endDrawingButton = document.createElement(\"button\");\r\n        this.endDrawingButton.innerHTML = Resources.translate(\"Finish\");\r\n\r\n        $(this.endDrawingButton).click(function (evt) {\r\n            evt.preventDefault();\r\n            showDrawingControls.call(self, false, Annotation.MultiPoint);\r\n            self.finishDrawing(true);\r\n        });\r\n\r\n        this.drawingControlsContainer.appendChild(this.endDrawingButton);\r\n\r\n        this.counterButton = document.createElement(\"button\");\r\n        this.counterButton.innerHTML = \"0\";\r\n\r\n        if (feature) {\r\n            if (feature.getGeometry() && feature.getGeometry().getCoordinates()) {\r\n                this.counterButton.innerHTML = feature.getGeometry().getCoordinates().length;\r\n            }\r\n\r\n            if (this.changeFeatureKey) {\r\n                Observable.unByKey(this.changeFeatureKey);\r\n            }\r\n\r\n            this.changeFeatureKey = feature.on(\"change\", function (e) {\r\n                if (self.counterButton) {\r\n                    self.counterButton.innerHTML = feature.getGeometry().getCoordinates().length - 1;\r\n                }\r\n            });\r\n        }\r\n\r\n        this.drawingControlsContainer.insertBefore(this.counterButton, this.removeLastButton);\r\n    } else if (annotationType === Annotation.CompoundFreehand) {\r\n        if (!self.drawing) {\r\n            this.continueDrawingButton = document.createElement(\"button\");\r\n            this.continueDrawingButton.innerHTML = Resources.translate(\"Draw\");\r\n            this.drawingControlsContainer.appendChild(this.continueDrawingButton);\r\n\r\n            $(this.continueDrawingButton).click(function (evt) {\r\n                evt.preventDefault();\r\n                self.startDrawing({\r\n                    type: Annotation.CompoundFreehand,\r\n                    color: self.lastAnnotationStyle.color,\r\n                    fillColor: self.lastAnnotationStyle.fillColor,\r\n                    penWidth: self.lastAnnotationStyle.penSize,\r\n                    iconRelativePath: self.lastAnnotationStyle.iconPath\r\n                });\r\n\r\n                if (self.continueDrawingButton) {\r\n                    self.continueDrawingButton.style.display = \"none\";\r\n                }\r\n            });\r\n        }\r\n\r\n        this.removeLastButton = document.createElement(\"button\");\r\n        this.removeLastButton.innerHTML = Resources.translate(\"Remove last\");\r\n\r\n\r\n        $(this.removeLastButton).click(function (evt) {\r\n            evt.preventDefault();\r\n            if (self.compoundFreehandList.length > 0) {\r\n                var ft = self.compoundFreehandList.pop();\r\n                self.deleteAnnotation(ft.getId());\r\n            }\r\n        });\r\n\r\n        this.endDrawingButton = document.createElement(\"button\");\r\n        this.endDrawingButton.innerHTML = Resources.translate(\"Finish\");\r\n\r\n        $(this.endDrawingButton).click(function (evt) {\r\n            evt.preventDefault();\r\n            showDrawingControls.call(self, false, Annotation.CompoundFreehand);\r\n            self.finishDrawing(true);\r\n\r\n            if (self.compoundFreehandList.length > 0) {\r\n                self.mergeSelection(self.compoundFreehandList);\r\n                self.compoundFreehandList = [];\r\n            }\r\n        });\r\n\r\n        this.drawingControlsContainer.appendChild(this.endDrawingButton);\r\n        this.drawingControlsContainer.appendChild(this.removeLastButton);\r\n    }\r\n\r\n    this.drawingControlsContainer.appendChild(this.cancelDrawingButton);\r\n}\r\n\r\nfunction showEditingControls(show, editType, feature) {\r\n    if (this.editingControlsContainer && this.viewport.element.contains(this.editingControlsContainer)) {\r\n        this.viewport.element.removeChild(this.editingControlsContainer);\r\n    }\r\n\r\n    this.editingControlsContainer = null;\r\n    this.endEditingButton = null;\r\n    this.cancelEditingButton = null;\r\n    this.saveEditingButton = null;\r\n    this.brushSizeIncreaseEditingButton = null;\r\n    this.brushSizeDecreaseEditingButton = null;\r\n    this.brushTypeCircleEditingButton = null;\r\n    this.brushTypeSquareEditingButton = null;\r\n\r\n    if (!show) {\r\n        return;\r\n    }\r\n\r\n    var self = this;\r\n    this.editingControlsContainer = document.createElement(\"div\");\r\n    this.editingControlsContainer.className = \"ol-control pma-ui-viewport-annotations-drawing\";\r\n\r\n    this.cancelEditingButton = document.createElement(\"button\");\r\n    this.cancelEditingButton.innerHTML = Resources.translate(\"Stop editing\");\r\n\r\n    $(this.cancelEditingButton).click(function (evt) {\r\n        evt.preventDefault();\r\n        showEditingControls.call(self, false, editType);\r\n        self.stopEditing();\r\n    });\r\n\r\n    this.viewport.element.appendChild(this.editingControlsContainer);\r\n\r\n    if (editType === Edit.Wand) {\r\n        this.saveEditingButton = document.createElement(\"button\");\r\n        this.saveEditingButton.innerHTML = Resources.translate(\"Create annotation from selection\");\r\n        $(this.saveEditingButton).click(function (evt) {\r\n            evt.preventDefault();\r\n            self.saveMagicWandAnnotation();\r\n            //self.stopEditing();\r\n        });\r\n        this.editingControlsContainer.appendChild(this.saveEditingButton);\r\n    }\r\n\r\n    if (editType === Edit.Brush || editType === Edit.Eraser) {\r\n        this.brushSizeIncreaseEditingButton = document.createElement(\"button\");\r\n        this.brushSizeIncreaseEditingButton.innerHTML = \"&nbsp;+&nbsp;\";\r\n        this.brushSizeIncreaseEditingButton.title = Resources.translate(\"Increase brush tip size\");\r\n        $(this.brushSizeIncreaseEditingButton).click(function (evt) {\r\n            evt.preventDefault();\r\n            var size = self.edit.getBrushSize();\r\n            size += self.edit.options.brushStep;\r\n            self.edit.setBrushSize(size);\r\n        });\r\n        this.editingControlsContainer.appendChild(this.brushSizeIncreaseEditingButton);\r\n\r\n        this.brushSizeDecreaseEditingButton = document.createElement(\"button\");\r\n        this.brushSizeDecreaseEditingButton.innerHTML = \"&nbsp;-&nbsp;\";\r\n        this.brushSizeDecreaseEditingButton.title = Resources.translate(\"Decrease brush tip size\");\r\n        $(this.brushSizeDecreaseEditingButton).click(function (evt) {\r\n            evt.preventDefault();\r\n            var size = self.edit.getBrushSize();\r\n            size -= self.edit.options.brushStep;\r\n            size = size <= 0 ? 1 : size;\r\n            self.edit.setBrushSize(size);\r\n        });\r\n        this.editingControlsContainer.appendChild(this.brushSizeDecreaseEditingButton);\r\n\r\n        this.brushTypeCircleEditingButton = document.createElement(\"button\");\r\n        this.brushTypeCircleEditingButton.innerHTML = \"&nbsp;&#9675;&nbsp;\";\r\n        this.brushTypeCircleEditingButton.title = Resources.translate(\"Change brush tip to circle\");\r\n        $(this.brushTypeCircleEditingButton).click(function (evt) {\r\n            evt.preventDefault();\r\n            self.edit.setBrushType('circle');\r\n        });\r\n        this.editingControlsContainer.appendChild(this.brushTypeCircleEditingButton);\r\n\r\n        this.brushTypeSquareEditingButton = document.createElement(\"button\");\r\n        this.brushTypeSquareEditingButton.innerHTML = \"&nbsp;&#9633;&nbsp;\";\r\n        this.brushTypeSquareEditingButton.title = Resources.translate(\"Change brush tip to square\");\r\n        $(this.brushTypeSquareEditingButton).click(function (evt) {\r\n            evt.preventDefault();\r\n            self.edit.setBrushType('square');\r\n        });\r\n        this.editingControlsContainer.appendChild(this.brushTypeSquareEditingButton);\r\n    }\r\n\r\n    this.editingControlsContainer.appendChild(this.cancelEditingButton);\r\n}\r\n\r\nfunction createMeasureTooltip() {\r\n    var el = document.createElement('div');\r\n    el.className = 'pma-ui-viewport-tooltip pma-ui-viewport-tooltip-measure';\r\n    var measureTooltip = new Overlay({\r\n        element: el,\r\n        offset: [0, -15],\r\n        positioning: 'bottom-center'\r\n    });\r\n\r\n    this.viewport.map.addOverlay(measureTooltip);\r\n    measureTooltip.element = el;\r\n\r\n    var self = this;\r\n    // addEvent(el, 'click', function () {\r\n    //     self.viewport.map.removeOverlay(measureTooltip);\r\n    //     self.viewport.annotationsLayer.getSource().removeFeature(measureTooltip.sketch);\r\n\r\n    //     el.parentNode.removeChild(el);\r\n    //     el = null;\r\n    // });\r\n\r\n    return measureTooltip;\r\n}\r\n\r\n/**\r\n * Instructs the viewport to enter annotation drawing mode\r\n * @param {Annotations~startDrawingOptions} options - Options to start drawing\r\n */\r\nfunction addInteraction(options) {\r\n    if (options.type !== Annotation.CompoundFreehand) {\r\n        this.compoundFreehandList = [];\r\n    }\r\n\r\n    showDrawingControls.call(this, false, options.type);\r\n\r\n    var type = options.type;\r\n    var maxPoints, minPoints, geometryFunction, finishCondition, condition = noModifierKeys,\r\n        freehandCondition = shiftKeyOnly;\r\n\r\n    this.stopDrawingOnMouseUp = false;\r\n\r\n    this.lastAnnotationStyle = {\r\n        color: options.color,\r\n        fillColor: options.fillColor,\r\n        penSize: options.penWidth,\r\n        iconPath: options.iconRelativePath\r\n    };\r\n\r\n    if (this.selectionAdded === true) {\r\n        this.selectionAdded = false;\r\n        this.hoverInteraction.getFeatures().clear();\r\n        this.viewport.map.removeInteraction(this.hoverInteraction);\r\n\r\n        this.selectInteraction.getFeatures().clear();\r\n        this.viewport.map.removeInteraction(this.selectInteraction);\r\n    }\r\n\r\n    var styleGeometryFunction;\r\n    switch (type) {\r\n        case Annotation.Rectangle:\r\n            geometryFunction = boxGeometryFunction.bind(options);\r\n            if (options.size) {\r\n                maxPoints = 1;\r\n                type = \"Point\";\r\n                styleGeometryFunction = styleBoxGeometryFunction.bind(options);\r\n            } else {\r\n                maxPoints = 2;\r\n                type = \"LineString\";\r\n            }\r\n\r\n            break;\r\n        case Annotation.Arrow:\r\n            geometryFunction = arrowGeometryFunction;\r\n            maxPoints = 2;\r\n            type = \"LineString\";\r\n            break;\r\n        case Annotation.Line:\r\n            maxPoints = 2;\r\n            type = \"LineString\";\r\n            break;\r\n        case Annotation.Icon:\r\n            type = \"Point\";\r\n            break;\r\n        case Annotation.MultiPoint:\r\n            geometryFunction = multiPointGeometryFunction;\r\n            type = \"LineString\";\r\n            finishCondition = never;\r\n            minPoints = 1;\r\n            break;\r\n        case Annotation.Freehand:\r\n        case Annotation.CompoundFreehand:\r\n            // disable dragging when drawing freehand\r\n            toggleDragPanInteraction(this.viewport.map, false);\r\n            type = \"LineString\";\r\n            freehandCondition = noModifierKeys;\r\n            condition = singleClick;\r\n            this.stopDrawingOnMouseUp = true;\r\n            break;\r\n        case Annotation.ClosedFreehand:\r\n            // disable dragging when drawing freehand\r\n            toggleDragPanInteraction(this.viewport.map, false);\r\n            type = \"Polygon\";\r\n            freehandCondition = noModifierKeys;\r\n            condition = singleClick;\r\n            this.stopDrawingOnMouseUp = true;\r\n            break;\r\n        case Annotation.Ellipse:\r\n            geometryFunction = ellipseGeometryFunction.bind(options);\r\n            maxPoints = 2;\r\n            type = \"LineString\";\r\n            break;\r\n        case Annotation.Circle:\r\n            if (options.size) {\r\n                maxPoints = 1;\r\n                type = \"Point\";\r\n                styleGeometryFunction = styleCircleGeometryFunction.bind(options);\r\n            }\r\n\r\n            geometryFunction = circleGeometryFunction.bind(options);\r\n            break;\r\n    }\r\n\r\n    var tmpStl = getAnnotationStyle.call(this, options.color, options.penWidth, options.fillColor, options.iconRelativePath, null, styleGeometryFunction);\r\n\r\n    this.draw = new olInteraction.Draw({\r\n        source: this.viewport.annotationsLayer.getSource(),\r\n        type: type,\r\n        geometryFunction: geometryFunction,\r\n        maxPoints: maxPoints,\r\n        minPoints: minPoints,\r\n        style: tmpStl,\r\n        condition: condition,\r\n        finishCondition: finishCondition,\r\n        freehandCondition: freehandCondition\r\n    });\r\n\r\n    this.snapInteraction = new olInteraction.Snap({\r\n        source: this.viewport.annotationsLayer.getSource()\r\n    });\r\n\r\n\r\n    var updateExisting = false;\r\n    if (options.feature) {\r\n        updateExisting = true;\r\n        this.draw.extend(options.feature);\r\n        this.drawing = true;\r\n        options.feature.drawingType = options.type;\r\n        options.feature.color = options.feature.metaData.Color;\r\n        options.feature.penSize = options.feature.metaData.LineThickness;\r\n        options.feature.fillColor = options.feature.metaData.FillColor;\r\n\r\n        showDrawingControls.call(this, true, options.type, options.feature);\r\n        options.feature = null;\r\n    }\r\n\r\n    this.viewport.map.addInteraction(this.draw);\r\n    this.viewport.map.addInteraction(this.snapInteraction);\r\n\r\n    if (this.viewport.getAnnotationLabelsVisible() === true) {\r\n        var tooltip = createMeasureTooltip.call(this);\r\n    }\r\n\r\n    var self = this;\r\n    var featureChangeKey = null; // used to unhook the event later\r\n\r\n    this.draw.on('drawstart', function (evt) {\r\n        // only called when a new annotation is created, not when extending an existing one\r\n        self.drawing = true;\r\n        self.shouldRejectDrawing = false;\r\n        showDrawingControls.call(self, true, options.type, evt.feature);\r\n\r\n        evt.feature.setId((Math.random() * 10000) | 0);\r\n\r\n        /** @type {ol.Coordinate|undefined} */\r\n        var tooltipCoord = evt.coordinate;\r\n\r\n        featureChangeKey = evt.feature.on(\"change\", function (e) {\r\n            var evtArgs = {\r\n                temporary: evt.feature.temporary,\r\n                feature: evt.feature\r\n            };\r\n\r\n            self.fireEvent(Events.AnnotationDrawing, evtArgs);\r\n        });\r\n\r\n        if (tooltip) {\r\n            evt.feature.getGeometry().on('change', function (e) {\r\n                var geom = e.target;\r\n                var output;\r\n                switch (options.type) {\r\n                    case Annotation.Rectangle:\r\n                    case Annotation.Ellipse:\r\n                    case Annotation.Polygon:\r\n                    case Annotation.ClosedFreehand:\r\n                        output = self.viewport.formatArea(self.viewport.calculateArea(geom));\r\n                        tooltipCoord = geom.getInteriorPoint().getCoordinates();\r\n                        break;\r\n                    case Annotation.Line:\r\n                    case Annotation.LineString:\r\n                    case Annotation.Freehand:\r\n                    case Annotation.Circle:\r\n                        output = self.viewport.formatLength(self.viewport.calculateLength(geom));\r\n                        tooltipCoord = geom.getLastCoordinate();\r\n                        break;\r\n                    default:\r\n                        break;\r\n                }\r\n\r\n                tooltip.element.innerHTML = output;\r\n                tooltip.setPosition(tooltipCoord);\r\n            });\r\n        }\r\n\r\n        evt.feature.notes = options.notes;\r\n        evt.feature.drawingType = options.type;\r\n        evt.feature.temporary = true;\r\n        evt.feature.penSize = options.penWidth;\r\n        evt.feature.color = options.color;\r\n        evt.feature.fillColor = options.fillColor;\r\n        evt.feature.icon = options.iconRelativePath;\r\n    });\r\n\r\n    this.draw.on('drawend', function (evt) {\r\n        self.drawing = false;\r\n        showDrawingControls.call(self, evt.feature.drawingType === Annotation.CompoundFreehand, evt.feature.drawingType, evt.feature);\r\n\r\n        if (evt.feature.drawingType === Annotation.CompoundFreehand) {\r\n            if (self.drawingControlsContainer) {\r\n                var c = evt.feature.getGeometry().getLastCoordinate();\r\n                var pixelCoord = self.viewport.map.getPixelFromCoordinate(c);\r\n\r\n                self.drawingControlsContainer.style.left = (pixelCoord[0] + 25) + \"px\";\r\n                self.drawingControlsContainer.style.top = (pixelCoord[1] - 50) + \"px\";\r\n            }\r\n        }\r\n\r\n        if (!self.getEnabled()) {\r\n            evt.preventDefault();\r\n            return false;\r\n        }\r\n\r\n        if (tooltip) {\r\n            self.viewport.map.removeOverlay(tooltip);\r\n            // tooltip = null;\r\n        }\r\n\r\n        if (self.shouldRejectDrawing) {\r\n            removeInteraction.call(self);\r\n        } else {\r\n            // remove the interaction with a delay, otherwise the last double click\r\n            // will result in a zoom in\r\n            setTimeout(function () {\r\n                removeInteraction.call(self);\r\n            }, 100);\r\n        }\r\n\r\n        if (evt.feature.drawingType === Annotation.CompoundFreehand) {\r\n            self.compoundFreehandList.push(evt.feature);\r\n        }\r\n\r\n        Observable.unByKey(featureChangeKey);\r\n\r\n        addFeature.call(self, evt.feature, updateExisting);\r\n    });\r\n}\r\n\r\nfunction addFeature(feature, updateExisting) {\r\n    var self = this;\r\n    var stl = getAnnotationStyle.call(self, feature.color, feature.penSize, feature.fillColor, feature.icon, feature);\r\n    if (feature.getId() === undefined) {\r\n        feature.setId((Math.random() * 10000) | 0);\r\n    }\r\n\r\n    feature.setStyle(self.viewport.getAnnotationStyle(stl, feature));\r\n\r\n    feature.originalStyle = stl;\r\n    feature.temporary = false;\r\n\r\n    // disable the toolbar once finished drawing\r\n    if (self.element !== null) {\r\n        $(self.element).find(\"li.draw a\").removeClass(\"active\");\r\n        $(self.element).find(\".color-picker\").hide();\r\n    }\r\n\r\n    var evtArgs = {\r\n        temporary: feature.temporary,\r\n        feature: feature\r\n    };\r\n\r\n    var extent = self.viewport.map.getView().getProjection().getExtent();\r\n    var extentObj = { extent: extent, flip: self.viewport.options.flip };\r\n\r\n    var geomClone = feature.getGeometry().clone();\r\n    geomClone.applyTransform(annotationTransform.bind(extentObj));\r\n\r\n    var geometryWkt = \"\";\r\n\r\n    if (feature.drawingType === \"Freehand\" || feature.drawingType === \"ClosedFreehand\") {\r\n        geometryWkt = self.format.writeGeometry(geomClone.simplify(2));\r\n    } else if (feature.drawingType === \"Circle\") {\r\n        geometryWkt = self.format.writeGeometry(fromCircle(geomClone));\r\n    } else {\r\n        geometryWkt = self.format.writeGeometry(geomClone);\r\n    }\r\n\r\n    var dimensions = 2;\r\n    switch (feature.drawingType) {\r\n        case Annotation.Arrow:\r\n        case Annotation.Icon:\r\n        case Annotation.Point:\r\n        case Annotation.MultiPoint:\r\n            dimensions = 0;\r\n            break;\r\n        case Annotation.Line:\r\n        case Annotation.Freehand:\r\n        case Annotation.CompoundFreehand:\r\n        case Annotation.LineString:\r\n            dimensions = 1;\r\n            break;\r\n        case Annotation.Rectangle:\r\n        case Annotation.Ellipse:\r\n        case Annotation.Polygon:\r\n        case Annotation.ClosedFreehand:\r\n        case Annotation.Circle:\r\n            dimensions = 2;\r\n            break;\r\n    }\r\n\r\n    if (!updateExisting) {\r\n        feature.metaData = {\r\n            AnnotationID: null,\r\n            Classification: Resources.translate(\"Generic\"),\r\n            Color: feature.icon ? feature.icon : feature.originalStyle.getStroke().getColor(),\r\n            Image: self.viewport.imageInfo.Filename,\r\n            LayerID: 1,\r\n            Notes: feature.notes ? feature.notes : \"\",\r\n            UpdateInfo: \"\",\r\n            State: AnnotationState.Added,\r\n            FillColor: feature.originalStyle.getFill().getColor(),\r\n            Dimensions: dimensions,\r\n            LineThickness: feature.penSize,\r\n            CreatedOn: new Date(),\r\n            CreatedBy: null,\r\n            UpdatedOn: null,\r\n            UpdatedBy: null,\r\n\r\n        };\r\n    } else {\r\n        feature.metaData.UpdatedOn = new Date();\r\n        feature.metaData.UpdatedBy = null;\r\n    }\r\n\r\n    var tmpGeom = feature.getGeometry();\r\n    if (dimensions > 0) {\r\n        var length = self.viewport.calculateLength(tmpGeom);\r\n        feature.metaData.Length = length;\r\n        feature.metaData.FormattedLength = self.viewport.formatLength(length);\r\n\r\n        if (dimensions > 1) {\r\n            var area = self.viewport.calculateArea(tmpGeom);\r\n            feature.metaData.Area = area;\r\n            feature.metaData.FormattedArea = self.viewport.formatArea(area);\r\n        }\r\n    }\r\n\r\n    feature.metaData.DrawingType = feature.drawingType;\r\n    if (feature.metaData.DrawingType == Annotation.MultiPoint) {\r\n        feature.metaData.PointCount = tmpGeom.getCoordinates ? tmpGeom.getCoordinates().length : 0;\r\n    }\r\n\r\n    feature.metaData.Geometry = geometryWkt;\r\n\r\n    if (updateExisting && feature.metaData.State !== AnnotationState.Added) {\r\n        feature.metaData.State = AnnotationState.Modified;\r\n    }\r\n\r\n    // fire with a time out to give the chance to OL to add the feature in the list\r\n    setTimeout(function () {\r\n        if (geometryWkt.indexOf(\"MULTIPOINT EMPTY\") !== -1) {\r\n            self.deleteAnnotation(feature.getId());\r\n        } else {\r\n            feature.setStyle(self.viewport.getAnnotationStyle(stl, feature));\r\n\r\n            if (updateExisting) {\r\n                self.fireEvent(Events.AnnotationModified, evtArgs);\r\n            } else {\r\n                if (!self.shouldRejectDrawing && feature && feature.drawingType !== Annotation.CompoundFreehand) {\r\n                    self.fireEvent(Events.AnnotationAdded, evtArgs);\r\n                }\r\n            }\r\n        }\r\n    }, 10);\r\n}\r\n\r\nfunction removeInteraction() {\r\n    if (this.draw) {\r\n        toggleDragPanInteraction(this.viewport.map, true);\r\n        this.viewport.map.removeInteraction(this.draw);\r\n        this.draw = null;\r\n    }\r\n\r\n    if (this.edit) {\r\n        toggleDragPanInteraction(this.viewport.map, true);\r\n        this.viewport.map.removeInteraction(this.edit);\r\n        this.edit = null;\r\n    }\r\n\r\n    if (this.selectionAdded !== true) {\r\n        this.selectionAdded = true;\r\n        this.selectInteraction.getFeatures().clear();\r\n        this.viewport.map.addInteraction(this.selectInteraction);\r\n        this.hoverInteraction.getFeatures().clear();\r\n        this.viewport.map.addInteraction(this.hoverInteraction);\r\n    }\r\n}\r\n\r\nfunction updateCurrentInteraction() {\r\n    if (!this.draw) {\r\n        return;\r\n    }\r\n\r\n    if (this.element !== null) {\r\n        var el = $(this.element).find(\"li.draw a.active\");\r\n        if (el.length === 1) {\r\n            el.removeClass(\"active\");\r\n            el.click();\r\n        }\r\n    }\r\n}\r\n\r\nfunction drawClick(element) {\r\n    if (!this.getEnabled()) {\r\n        return;\r\n    }\r\n\r\n    this.finishDrawing(true);\r\n\r\n    if (element.hasClass(\"active\")) {\r\n        element.removeClass(\"active\");\r\n        return;\r\n    }\r\n\r\n    var tp = element.data(\"type\");\r\n    var notes = \"\";\r\n    if (tp === \"Text\") {\r\n        tp = \"Point\";\r\n        notes = prompt(Resources.translate(\"Enter text\"));\r\n        if (!notes) {\r\n            return;\r\n        }\r\n    }\r\n\r\n    var selection = this.getSelection();\r\n    this.startDrawing({\r\n        type: tp,\r\n        color: element.data(\"color\"),\r\n        penWidth: element.data(\"size\"),\r\n        iconRelativePath: element.data(\"icon\"),\r\n        feature: (selection && selection.length > 0 ? selection[0] : null),\r\n        fillColor: PMA.UI.View.DefaultFillColor,\r\n        notes: notes\r\n    });\r\n\r\n    element.addClass(\"active\");\r\n\r\n    if (this.jsColorPicker !== null) {\r\n        this.jsColorPicker.fromString(element.data(\"color\"));\r\n    } else {\r\n        $(this.element).find(\".color-picker input[type='color']\").val(element.data(\"color\"));\r\n    }\r\n\r\n    $(this.element).find(\".color-picker\").show();\r\n}\r\n\r\nfunction createControls() {\r\n    if (this.element === null) {\r\n        return;\r\n    }\r\n\r\n    var html = \"<ul class='pma-ui-annotations'>\";\r\n    if (supportsColorPicker()) {\r\n        html += \"<li class='option color-picker'><input type='color' value='#000000' /></li>\";\r\n    } else {\r\n        html += \"<li class='option color-picker'><input type='button' value=' ' /><input type='hidden' value='#000000' /></li>\";\r\n    }\r\n\r\n    html += \"<li class='option draw'><a data-type='Freehand' data-size='2' data-color='#008000' style='color: #008000' class='size-2' href='#' title='\" + Resources.translate(\"Freehand size 1\") + \"'><i class='fa fa-circle' aria-hidden='true'></i></a></li>\";\r\n    // html += \"<li class='option draw'><a data-type='Freehand' data-size='4' data-color='#ff0000' style='color: #ff0000' class='size-4' href='#' title='\" + Resources.translate(\"Freehand size 2\") + \"'><i class='fa fa-circle' aria-hidden='true'></i></a></li>\";\r\n    // html += \"<li class='option draw'><a data-type='Freehand' data-size='8' data-color='#0000ff' style='color: #0000ff' class='size-8' href='#' title='\" + Resources.translate(\"Freehand size 3\") + \"'><i class='fa fa-circle' aria-hidden='true'></i></a></li>\";\r\n    html += \"<li class='option draw'><a data-type='ClosedFreehand' data-size='2' data-color='#008000' style='color: #008000' class='size-2' href='#' title='\" + Resources.translate(\"Closed Freehand size 1\") + \"'><i class='fa fa-pencil-square' aria-hidden='true'></i></a></li>\";\r\n    html += \"<li class='option draw'><a data-type='CompoundFreehand' data-size='2' data-color='#008080' style='color: #008080' class='size-2' href='#' title='\" + Resources.translate(\"Compound Freehand size 2\") + \"'><i class='fa fa-chain' aria-hidden='true'></i></a></li>\";\r\n    // html += \"<li class='option draw'><a data-type='Point' data-size='3' data-color='#f00ff0' style='color: #f00ff0' class='size-8' href='#' title='\" + Resources.translate(\"Point size 3\") + \"'><i class='fa fa-circle' aria-hidden='true'></i></a></li>\";\r\n    html += \"<li class='option draw'><a data-type='Text' data-size='1' data-color='#000000' style='color: #000000' class='size-2' href='#' title='\" + Resources.translate(\"Text\") + \"'><i class='fa fa-font' aria-hidden='true'></i></a></li>\";\r\n    // html += \"<li class='option draw'><a data-type='Icon' data-size='1' data-color='#ffffff' data-icon='wim.jpg' style='background: url(\\\"http://www.smartcode.gr/annotations/wim.jpg\\\") center center no-repeat; background-size: contain' class='size-8' href='#' title='\" + Resources.translate(\"Wim\") + \"'></a></li>\";\r\n    // html += \"<li class='option draw'><a data-type='Icon' data-size='1' data-color='#ffffff' data-icon='yves.jpg' style='background: url(\\\"http://www.smartcode.gr/annotations/yves.jpg\\\") center center no-repeat; background-size: contain' class='size-8' href='#' title='\" + Resources.translate(\"Yves\") + \"'></a></li>\";\r\n    // html += \"<li class='option draw'><a data-type='Rectangle' data-size='2' data-color='#000000' style='color: #000000' class='size-8' href='#' title='\" + Resources.translate(\"Rectangle\") + \"'><i class='fa fa-square-o' aria-hidden='true'></i></a></li>\";\r\n    // html += \"<li class='option draw'><a data-type='Circle' data-size='2' data-color='#000000' style='color: #000000' class='size-8' href='#' title='\" + Resources.translate(\"Circle\") + \"'><i class='fa fa-circle-o' aria-hidden='true'></i></a></li>\";\r\n    // html += \"<li class='option draw'><a data-type='Ellipse' data-size='2' data-color='#000000' style='color: #000000' class='size-8' href='#' title='\" + Resources.translate(\"Ellipse\") + \"'><i class='fa fa-circle' aria-hidden='true'></i></a></li>\";\r\n    html += \"<li class='option draw'><a data-type='Arrow' data-size='2' data-color='#000000' style='color: #000000' class='size-2' href='#' title='\" + Resources.translate(\"Arrow\") + \"'><i class='fa fa-arrow-right' aria-hidden='true'></i></a></li>\";\r\n    html += \"<li class='option draw'><a data-type='Line' data-size='1' data-color='#F00F00' style='color: #F00F00' class='size-2' href='#' title='\" + Resources.translate(\"Measure\") + \"'><i class='fa fa-minus' aria-hidden='true'></i></a></li>\";\r\n    // html += \"<li class='option draw'><a data-type='LineString' data-size='2' data-color='#000000' style='color: #000000' class='size-2' href='#' title='\" + Resources.translate(\"Polyline\") + \"'>L</a></li>\";\r\n    // html += \"<li class='option draw'><a data-type='Polygon' data-size='2' data-color='#000000' style='color: #000000' class='size-2' href='#' title='\" + Resources.translate(\"Polygon\") + \"'>P</a></li>\";\r\n    // html += \"<li class='option draw'><a data-type='MultiPoint' data-size='2' data-color='#000000' style='color: #000000' class='size-2' href='#' title='\" + Resources.translate(\"MultiPoint\") + \"'>MP</a></li>\";\r\n    // html += \"<li class='option delete'><a style='color: #000000' class='size-2' href='#' title='\" + Resources.translate(\"Delete\") + \"'><i class='fa fa-trash' aria-hidden='true'></i></a></li>\";\r\n    // html += \"<li class='option save'><a style='color: #000000' class='size-2' href='#' title='\" + Resources.translate(\"Save\") + \"'><i class='fa fa-floppy-o' aria-hidden='true'></i></a></li>\";\r\n\r\n\r\n\r\n    html += \"</ul>\";\r\n\r\n    var self = this;\r\n    var el = $(this.element);\r\n\r\n    el.html(html);\r\n\r\n    if (!supportsColorPicker()) {\r\n        self.jsColorPicker = new jscolor(el.find(\"li.color-picker input\")[0], { valueElement: el.find(\"li.color-picker input[type=hidden]\")[0], hash: true, closable: true, closeText: Resources.translate(\"Close\") });\r\n    }\r\n\r\n    el.find(\"li.color-picker input\").change(function () {\r\n        var newcol = $(this).val();\r\n\r\n        el.find(\"li.draw a.active\").data(\"color\", newcol);\r\n        el.find(\"li.draw a.active\").css(\"color\", newcol);\r\n        updateCurrentInteraction.call(self);\r\n    });\r\n\r\n    el.find(\"li.option.delete a\").click(function (evt) {\r\n        evt.preventDefault();\r\n        var d = self.getSelection();\r\n        if (d && d.length > 0) {\r\n            self.deleteAnnotation(d[0].getId());\r\n        }\r\n    });\r\n\r\n    el.find(\"li.option.save a\").click(function (evt) {\r\n        evt.preventDefault();\r\n        self.saveAnnotations();\r\n    });\r\n\r\n    el.find(\"li.draw a\").click(function (ev) {\r\n        ev.preventDefault();\r\n        var e = $(this);\r\n        drawClick.call(self, e);\r\n    });\r\n}\r\n\r\nfunction createSelectInteraction() {\r\n    var self = this;\r\n    let sqrt2 = Math.sqrt(2);\r\n    const defaultStyleFn = function (strokeColor, f) {\r\n        let radius = 5;\r\n        if (f.originalStyle) {\r\n            let oStyle = f.originalStyle.clone();\r\n            let oFill = oStyle.getFill();\r\n            if (!oFill) {\r\n                oFill = new Fill();\r\n            }\r\n\r\n            oFill.setColor('rgba(255, 255, 255, 0)');\r\n            oStyle.getStroke().setColor(strokeColor);\r\n            oStyle.getStroke().setWidth(oStyle.getStroke().getWidth() + 3);\r\n\r\n            let img = oStyle.getImage();\r\n            if (img && img.getSize) {\r\n                let sz = img.getSize();\r\n                let side = sz[0] > sz[1] ? sz[0] : sz[1];\r\n                radius = ((sqrt2 * side) / 2).toFixed(0);\r\n            }\r\n\r\n            oStyle.setImage(new Circle({\r\n                fill: new Fill({ color: 'rgba(255, 255, 255, 0.7)' }),\r\n                stroke: new Stroke({ color: strokeColor, width: 4, }),\r\n                radius: radius\r\n            }));\r\n\r\n            return oStyle;\r\n        }\r\n\r\n        return new Style({\r\n            stroke: new Stroke({ color: strokeColor, width: 3, }),\r\n            fill: new Fill({ color: 'rgba(255, 255, 255, 0.7)' }),\r\n            image: new RegularShape({\r\n                fill: new Fill({ color: 'rgba(255, 255, 255, 0.7)' }),\r\n                stroke: new Stroke({ color: strokeColor, width: 4 }),\r\n                points: 4,\r\n                radius: 5,\r\n                angle: Math.PI / 4\r\n            })\r\n        });\r\n    };\r\n\r\n    this.selectInteraction = new olInteraction.Select({\r\n        condition: click,\r\n        layers: [this.viewport.annotationsLayer],\r\n        style: defaultStyleFn.bind(this, 'rgba(0, 153, 255, 1)')\r\n    });\r\n\r\n    let selection = this.selectInteraction.getFeatures();\r\n\r\n    this.hoverInteraction = new olInteraction.Select({\r\n        condition: pointerMove,\r\n        layers: [this.viewport.annotationsLayer],\r\n        filter: function (f, layer) {\r\n            if (selection.getArray().indexOf(f) !== -1) {\r\n                return false;\r\n            }\r\n\r\n            return true;\r\n        },\r\n        style: defaultStyleFn.bind(this, \"#ffff00\")\r\n    });\r\n\r\n\r\n    this.selectInteraction.on('select', function (e) {\r\n        self.fireEvent(Events.AnnotationsSelectionChanged, selection.getArray());\r\n    });\r\n\r\n    // add the interactions initially\r\n    this.selectionAdded = true;\r\n    this.selectInteraction.getFeatures().clear();\r\n    this.viewport.map.addInteraction(this.selectInteraction);\r\n    this.hoverInteraction.getFeatures().clear();\r\n    this.viewport.map.addInteraction(this.hoverInteraction);\r\n}\r\n\r\nfunction saveAnnotationsNew(added, edited) {\r\n    var i, a;\r\n    var toAdd = [];\r\n    if (added && added.length) {\r\n        for (i = 0; i < added.length; i++) {\r\n            a = added[i];\r\n            if (!a.metaData.Notes) {\r\n                a.metaData.Notes = Resources.translate(' ');\r\n            }\r\n\r\n            if (!a.metaData.Classification) {\r\n                a.metaData.Classification = Resources.translate('no classification');\r\n            }\r\n\r\n            if (a.metaData.AnnotationID === null) {\r\n                a.metaData.AnnotationID = 0;\r\n            }\r\n\r\n            toAdd.push(a.metaData);\r\n        }\r\n    }\r\n\r\n    var toEdit = edited.map(function (x) { return x.metaData; });\r\n\r\n    var toDelete = [];\r\n    if (this.deletedAnnotations && this.deletedAnnotations.length > 0) {\r\n        for (i = 0; i < this.deletedAnnotations.length; i++) {\r\n            // if the annotation ID is null, it means that the annotation was never saved in the first place\r\n            if (this.deletedAnnotations[i].metaData.AnnotationID !== null) {\r\n                toDelete.push(this.deletedAnnotations[i].metaData);\r\n            }\r\n        }\r\n    }\r\n\r\n    var self = this;\r\n    this.context.saveAnnotations(\r\n        this.serverUrl,\r\n        this.path,\r\n        toAdd,\r\n        toEdit,\r\n        toDelete,\r\n        function (sessionId, annotationIds) {\r\n            if (added && added.length) {\r\n                if (annotationIds == null || annotationIds.length != added.length) {\r\n                    console.error(\"Annotations saved but cannot update annotation ids\");\r\n                    return;\r\n                }\r\n\r\n                for (i = 0; i < annotationIds.length; i++) {\r\n                    added[i].metaData.AnnotationID = annotationIds[i];\r\n                    added[i].setId(annotationIds[i]);\r\n                    added[i].metaData.State = AnnotationState.Pristine;\r\n                }\r\n            }\r\n\r\n            if (edited && edited.length) {\r\n                for (i = 0; i < edited.length; i++) {\r\n                    edited[i].metaData.State = AnnotationState.Pristine;\r\n                }\r\n            }\r\n\r\n            self.deletedAnnotations = [];\r\n\r\n            self.fireEvent(Events.AnnotationsSaved, { success: true });\r\n        },\r\n        function () {\r\n            self.fireEvent(Events.AnnotationsSaved, { success: false });\r\n            console.error(\"Saving annotations failed\");\r\n            console.log(arguments);\r\n        });\r\n}\r\n\r\n// saves all newly added annotations and then calls saveEditedAnnotations \r\nfunction saveAddedAnnotations(added, edited) {\r\n    if (!added || added.length === 0) {\r\n        saveEditedAnnotations.call(this, edited);\r\n        return;\r\n    }\r\n\r\n    var a = added.pop();\r\n    var self = this;\r\n\r\n    if (!a.metaData.Notes) {\r\n        a.metaData.Notes = Resources.translate(' ');\r\n    }\r\n\r\n    if (!a.metaData.Classification) {\r\n        a.metaData.Classification = Resources.translate('no classification');\r\n    }\r\n\r\n    self.context.addAnnotation(\r\n        self.serverUrl,\r\n        self.path,\r\n        a.metaData.Classification,\r\n        a.metaData.LayerID,\r\n        a.metaData.Notes,\r\n        a.metaData.Geometry,\r\n        a.metaData.Color,\r\n        function (sessionId, annotationId) {\r\n            a.metaData.AnnotationID = annotationId;\r\n            a.setId(annotationId);\r\n            a.metaData.State = AnnotationState.Pristine;\r\n\r\n            saveAddedAnnotations.call(self, added, edited);\r\n        },\r\n        function () {\r\n            self.fireEvent(Events.AnnotationsSaved, { success: false });\r\n            console.error(\"Saving annotation (add) failed\");\r\n            console.log(arguments);\r\n        });\r\n}\r\n\r\n// saves all modified annotations and then calls saveDeletedAnnotations \r\nfunction saveEditedAnnotations(edited) {\r\n    if (!edited || edited.length === 0) {\r\n        saveDeletedAnnotations.call(this);\r\n        return;\r\n    }\r\n\r\n    var a = edited.pop();\r\n    var self = this;\r\n\r\n    self.context.updateAnnotation(\r\n        self.serverUrl,\r\n        self.path,\r\n        a.metaData.LayerID,\r\n        a.metaData.AnnotationID,\r\n        a.metaData.Notes,\r\n        a.metaData.Geometry,\r\n        a.metaData.Color,\r\n        function () {\r\n            a.metaData.State = AnnotationState.Pristine;\r\n            saveEditedAnnotations.call(self, edited);\r\n        },\r\n        function () {\r\n            self.fireEvent(Events.AnnotationsSaved, { success: false });\r\n            console.error(\"Saving annotation (edit) failed\");\r\n            console.log(arguments);\r\n        });\r\n}\r\n\r\n// saves all deletd annotations and then AnnotationsSaved event\r\nfunction saveDeletedAnnotations() {\r\n    if (!this.deletedAnnotations || this.deletedAnnotations.length === 0) {\r\n        this.fireEvent(Events.AnnotationsSaved, { success: true });\r\n        return;\r\n    }\r\n\r\n    var entity = this.deletedAnnotations.pop();\r\n    var self = this;\r\n\r\n    if (entity.metaData.AnnotationID === null) {\r\n        // if the annotation ID is null, it means that the annotation was never saved in the first place\r\n        saveDeletedAnnotations.call(self);\r\n        return;\r\n    }\r\n\r\n    self.context.deleteAnnotation(\r\n        self.serverUrl,\r\n        self.path,\r\n        entity.metaData.LayerID,\r\n        entity.metaData.AnnotationID,\r\n        function () {\r\n            saveDeletedAnnotations.call(self);\r\n        },\r\n        function () {\r\n            self.fireEvent(Events.AnnotationsSaved, { success: false });\r\n            console.error(\"Saving annotation (delete) failed\");\r\n            console.log(arguments);\r\n        });\r\n}\r\n\r\nfunction checkPMACore2(cb) {\r\n    var self = this;\r\n    if (self.isPMACore2 !== null) {\r\n        if (typeof cb === \"function\") {\r\n            cb.call(self, self.isPMACore2);\r\n        }\r\n\r\n        return;\r\n    }\r\n\r\n    this.context.getVersionInfo(self.serverUrl, function (version) {\r\n        if (version && version.substring(0, \"1.\".length) === \"1.\") {\r\n            self.isPMACore2 = false;\r\n        } else {\r\n            self.isPMACore2 = true;\r\n        }\r\n\r\n        if (typeof cb === \"function\") {\r\n            cb.call(self, self.isPMACore2);\r\n        }\r\n    }, function () {\r\n        console.error(\"Cannot reach server\");\r\n    });\r\n}\r\n\r\n/**\r\n * Provides programmatic interaction with a {@link Viewport} instance to manipulate annotations\r\n * @param  {Object} options\r\n * @param  {Context} options.context\r\n * @param  {Viewport} options.viewport\r\n * @param  {string} options.serverUrl - PMA.core server URL\r\n * @param  {string} options.path - Path of an slide to save annotations for\r\n * @param  {boolean} options.enabled\r\n * @tutorial 05-annotations\r\n * @fires Components.Events#AnnotationAdded\r\n * @fires Components.Events#AnnotationDrawing\r\n * @fires Components.Events#AnnotationDeleted\r\n * @fires Components.Events#AnnotationModified\r\n * @fires Components.Events#AnnotationsSaved\r\n * @fires Components.Events#AnnotationsSelectionChanged\r\n */\r\nexport class Annotations {\r\n    constructor(options) {\r\n        // options: context, element, viewport, serverUrl, path, enabled\r\n        if (!checkBrowserCompatibility()) {\r\n            return;\r\n        }\r\n\r\n        // if the element is null, no controls are created\r\n        if (options.element instanceof HTMLElement) {\r\n            this.element = options.element;\r\n        } else if (typeof options.element == \"string\") {\r\n            var el = document.querySelector(options.element);\r\n            if (!el) {\r\n                console.error(\"Invalid selector for element\");\r\n            } else {\r\n                this.element = el;\r\n            }\r\n        } else {\r\n            this.element = null;\r\n        }\r\n\r\n        if (this.element) {\r\n            this.element.style.pointerEvents = \"auto\";\r\n        }\r\n\r\n        if (!(options.viewport instanceof Viewport) || !options.viewport.map) {\r\n            console.error(\"Invalid viewport instance\");\r\n            return;\r\n        }\r\n\r\n        if (!options.viewport.annotationsLayer) {\r\n            console.error(\"Annotations must be enabled in the viewport for this to work\");\r\n            return;\r\n        }\r\n\r\n        this.serverUrl = options.serverUrl;\r\n        this.path = options.path;\r\n        this.context = options.context;\r\n        this.viewport = options.viewport;\r\n        this.drawing = false;\r\n        this.selectionAdded = false;\r\n        this.stopDrawingOnMouseUp = false;\r\n        this.format = new olFormat.WKT();\r\n        this.jsColorPicker = null;\r\n        this.isPMACore2 = null;\r\n\r\n        checkPMACore2.call(this);\r\n\r\n        this.listeners = {};\r\n        this.listeners[Events.AnnotationAdded] = [];\r\n        this.listeners[Events.AnnotationDrawing] = [];\r\n        this.listeners[Events.AnnotationDeleted] = [];\r\n        this.listeners[Events.AnnotationModified] = [];\r\n        this.listeners[Events.AnnotationsSaved] = [];\r\n        this.listeners[Events.AnnotationsSelectionChanged] = [];\r\n        this.listeners[Events.AnnotationEditingStarted] = [];\r\n        this.listeners[Events.AnnotationEditingEnded] = [];\r\n\r\n        createSelectInteraction.call(this);\r\n\r\n        createControls.call(this);\r\n\r\n        var self = this;\r\n        this.viewport.map.on('pointerup', function (evt) {\r\n            if (self.drawing && self.stopDrawingOnMouseUp === true) {\r\n                self.finishDrawing(true);\r\n            }\r\n        });\r\n\r\n        this.setEnabled(options.enabled === true);\r\n        this.compoundFreehandList = [];\r\n        this.lastAnnotationStyle = null;\r\n\r\n        // used to control whether or not an annotation should actually be added after drawing is finished\r\n        // e.g. if finishDrawing(false) is invoked, the annotation should not be added and no events should fire\r\n        this.shouldRejectDrawing = false;\r\n    }\r\n    /**\r\n     * Annotation entity\r\n     * @typedef {Object} Annotations~annotationEntity\r\n     * @property {Number} LayerID - The layer id\r\n     * @property {string} Geometry - The annotation geometry in wkt format\r\n     * @property {string} [Notes] - Optional notes for the annotation\r\n     * @property {string} [Classification] - Optional classification string (Necrosis, tumor etc)\r\n     * @property {string} [Color] - Optional stroke color (e.g. #ff0000)\r\n     * @property {string} [UpdateInfo] - Optional update info\r\n     * @property {string} [FillColor] - Optional fill color (e.g. #ff0000)\r\n     * @property {Number} [Dimensions] - Optional dimensionality of the annotation\r\n     * @property {Number} [LineThickness=1] - Optional stroke line thickness\r\n     */\r\n    /**\r\n     * Replaces the currently loaded annotations with the provided ones (without saving them to the server)\r\n     * @param  {Annotations~annotationEntity[]} annotations - Array of annotation objects\r\n     */\r\n    replaceAnnotations(annotations) {\r\n        if (!annotations || !(annotations instanceof Array)) {\r\n            annotations = [];\r\n        }\r\n\r\n        var i = 0;\r\n        for (let i = 0; i < annotations.length; i++) {\r\n            annotations[i].AnnotationID = null;\r\n            annotations[i].Image = this.viewport.image;\r\n        }\r\n\r\n        this.finishDrawing(true);\r\n\r\n        // Clear all existing annotations and mark them as deleted\r\n        var current = this.viewport.getAnnotations();\r\n        this.deletedAnnotations = this.deletedAnnotations || [];\r\n        for (let i = 0; i < current.length; i++) {\r\n            switch (current[i].metaData.State) {\r\n                case AnnotationState.Pristine:\r\n                case AnnotationState.Modified:\r\n                    this.deletedAnnotations.push(current[i]);\r\n                    break;\r\n            }\r\n        }\r\n\r\n        // load the provided annotations\r\n        var annotationsSource = this.viewport.annotationsLayer.getSource();\r\n        annotationsSource.clear();\r\n\r\n        var features = this.viewport.initializeFeatures(annotations, this.viewport.mainLayer.getSource().getProjection());\r\n        for (let i = 0; i < features.length; i++) {\r\n            features[i].metaData.State = AnnotationState.Added;\r\n        }\r\n\r\n        annotationsSource.addFeatures(features);\r\n\r\n        this.viewport.redraw();\r\n    }\r\n    /**\r\n     * Adds an annotation to the current ones (without saving them to the server)\r\n     * @param  {Annotations~annotationEntity} annotation - An annotation object\r\n     */\r\n    addAnnotation(annotation) {\r\n        annotation.AnnotationID = null;\r\n        annotation.Image = this.viewport.image;\r\n\r\n        this.finishDrawing(true);\r\n\r\n        // load the provided annotations\r\n        var annotationsSource = this.viewport.annotationsLayer.getSource();\r\n\r\n        var features = this.viewport.initializeFeatures([annotation], this.viewport.mainLayer.getSource().getProjection());\r\n        for (let i = 0; i < features.length; i++) {\r\n            features[i].metaData.State = AnnotationState.Added;\r\n        }\r\n\r\n        annotationsSource.addFeatures(features);\r\n\r\n        var evtArgs = {\r\n            temporary: false,\r\n            feature: features && features.length ? features[0] : null\r\n        };\r\n\r\n        this.fireEvent(Events.AnnotationAdded, evtArgs);\r\n    }\r\n    getActive() {\r\n        if (this.element === null) {\r\n            return false;\r\n        }\r\n\r\n        return $(this.element).find(\"li.draw a.active\").length > 0;\r\n    }\r\n    /**\r\n     * Gets the state of the annotation component\r\n     * @returns {boolean}\r\n     */\r\n    getEnabled() {\r\n        return this.enabled;\r\n    }\r\n    /**\r\n     * Enables or disables annotation drawing\r\n     * @param  {boolean} enabled\r\n     */\r\n    setEnabled(enabled) {\r\n        this.enabled = enabled === true;\r\n\r\n        if (!this.getEnabled()) {\r\n            this.finishDrawing(false);\r\n\r\n            if (this.element !== null) {\r\n                $(this.element).find(\"li.draw a\").removeClass(\"active\");\r\n                $(this.element).find(\"li.draw a\").addClass(\"disabled\");\r\n                $(this.element).find(\".color-picker\").hide();\r\n            }\r\n        } else {\r\n            if (this.element !== null) {\r\n                $(this.element).find(\"li.draw a\").removeClass(\"disabled\");\r\n            }\r\n        }\r\n    }\r\n    /**\r\n     * Options parameter required to start drawing\r\n     * @typedef {Object} Annotations~startDrawingOptions\r\n     * @property {PMA.UI.Types.Annotation} type - The type of the annotation to start drawing\r\n     * @property {string} color - Annotation outline color as HTML hex string\r\n     * @property {string} fillColor - Annotation fill color as HTML hex string\r\n     * @property {Number} penWidth - The line thickness\r\n     * @property {string} notes - Text to add to the annotation\r\n     * @property {string} [iconRelativePath] - Relative path to an image that will be used when drawing a point. The base URL is defined by the imageBaseUrl property of the {@link PMA.UI.View.Viewport~annotationOptions|annotations} initialization option supplied in the {@link PMA.UI.View.Viewport} constructor\r\n     * @property {ol.Feature} [feature] - An existing {@link http://openlayers.org/en/master/apidoc/ol.Feature.html | feature} to edit. If this argument has a value, the viewport goes into edit mode, instead of drawing a new annotation\r\n     * @property {Number[]} [size] - An optional array of [width, height] in microns. Applies only to circles and rectangles. When drawing a circle only width is taken into account and it's the diameter of the circle.\r\n     */\r\n    /**\r\n     * Instructs the viewport to enter annotation drawing mode\r\n     * @param {Annotations~startDrawingOptions} options - Options to start drawing\r\n     */\r\n    startDrawing(options) {\r\n        if (typeof options === \"string\") {\r\n            // function is called with old arguments without options object\r\n            // to keep backwards compatibility wrap the arguments to the new options object\r\n            options = {\r\n                type: arguments[0],\r\n                color: arguments[1],\r\n                penWidth: arguments[2],\r\n                iconRelativePath: arguments[3],\r\n                feature: arguments[4],\r\n                fillColor: PMA.UI.View.DefaultFillColor,\r\n                notes: \"\" // notes was missing in the old parameter list\r\n            };\r\n        }\r\n\r\n        if (!this.getEnabled()) {\r\n            return;\r\n        }\r\n\r\n        if (this.drawing) {\r\n            console.error(\"Drawing already in progress. Finish drawing before starting a new one.\");\r\n            return;\r\n        }\r\n\r\n        if (!options.fillColor) {\r\n            options.fillColor = PMA.UI.View.DefaultFillColor;\r\n        }\r\n\r\n        if (options.size) {\r\n            if (!options.size.length || options.size.length != 2) {\r\n                options.size = undefined;\r\n            } else if (options.size[0] <= 0 || options.size[1] <= 0) {\r\n                options.size = undefined;\r\n            } else if (!this.viewport.imageInfo || !this.viewport.imageInfo.MicrometresPerPixelX || !this.viewport.imageInfo.MicrometresPerPixelY) {\r\n                options.size = undefined;\r\n            } else {\r\n                options.size = [\r\n                    options.size[0] / this.viewport.imageInfo.MicrometresPerPixelX,\r\n                    options.size[1] / this.viewport.imageInfo.MicrometresPerPixelY\r\n                ];\r\n            }\r\n        }\r\n\r\n        this.finishDrawing(false);\r\n        addInteraction.call(this, options);\r\n    }\r\n    /**\r\n     * Exits drawing mode\r\n     * @param  {boolean} accept - True to accept the annotation that was currently being drawn\r\n     * @param {PMA.UI.Types.Annotation} annotationType - The annotation type that was drawing\r\n     */\r\n    finishDrawing(accept, annotationType) {\r\n        this.shouldRejectDrawing = !accept;\r\n        var mustRemove = accept === false;\r\n        if (this.drawing) {\r\n            if (this.draw != null) {\r\n                this.draw.finishDrawing();\r\n            }\r\n        } else {\r\n            mustRemove = false;\r\n        }\r\n\r\n        removeInteraction.call(this);\r\n\r\n        if (this.element !== null) {\r\n            $(this.element).find(\".color-picker\").hide();\r\n            $(this.element).find(\"li.draw a\").removeClass(\"active\");\r\n        }\r\n\r\n        if (mustRemove || annotationType == Annotation.CompoundFreehand) {\r\n            var source = this.viewport.annotationsLayer.getSource();\r\n            var features = source.getFeatures();\r\n\r\n            if (this.compoundFreehandList.length > 0) {\r\n                while (this.compoundFreehandList.length > 0) {\r\n                    var ft = this.compoundFreehandList.pop();\r\n                    source.removeFeature(ft);\r\n                }\r\n            } else {\r\n                if (features.length > 0) {\r\n                    source.removeFeature(features[features.length - 1]);\r\n                }\r\n            }\r\n        }\r\n    }\r\n    /**\r\n     * Attaches an event listener\r\n     * @param {PMA.UI.Components.Events} eventName - The name of the event to listen to\r\n     * @param {function} callback - The function to call when the event occurs\r\n     */\r\n    listen(eventName, callback) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" is not a valid event\");\r\n        }\r\n\r\n        this.listeners[eventName].push(callback);\r\n    }\r\n    // fires an event\r\n    fireEvent(eventName, eventArgs) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" does not exist\");\r\n            return;\r\n        }\r\n\r\n        for (var i = 0, max = this.listeners[eventName].length; i < max; i++) {\r\n            this.listeners[eventName][i].call(this, eventArgs);\r\n        }\r\n    }\r\n    /**\r\n     * Get the currently selected annotations\r\n     * @return {Array.<{metaData: { PointCount: Number } }>} Array of PMA.core annotation instances\r\n     */\r\n    getSelection() {\r\n        return this.selectInteraction.getFeatures().getArray();\r\n    }\r\n    /**\r\n     * Saves all the annotations to PMA.core\r\n     */\r\n    saveAnnotations() {\r\n        var current = this.viewport.getAnnotations();\r\n\r\n        var added = [];\r\n        var updated = [];\r\n\r\n        for (var i = 0; i < current.length; i++) {\r\n            switch (current[i].metaData.State) {\r\n                case AnnotationState.Added:\r\n                    added.push(current[i]);\r\n                    break;\r\n                case AnnotationState.Pristine:\r\n                case AnnotationState.Modified:\r\n                    updated.push(current[i]);\r\n                    break;\r\n            }\r\n        }\r\n\r\n        checkPMACore2.call(this, function () {\r\n            if (this.isPMACore2) {\r\n                saveAnnotationsNew.call(this, added, updated);\r\n            } else {\r\n                saveAddedAnnotations.call(this, added, updated);\r\n            }\r\n        });\r\n    }\r\n    /**\r\n     *  Returns whether any annotation has unsaved changes\r\n     * @returns {bool}\r\n     */\r\n    hasChanges() {\r\n        if (this.deletedAnnotations && this.deletedAnnotations.length > 0) {\r\n            return true;\r\n        }\r\n\r\n        var current = this.viewport.getAnnotations();\r\n\r\n        for (var i = 0; i < current.length; i++) {\r\n            switch (current[i].metaData.State) {\r\n                case AnnotationState.Added:\r\n                    return true;\r\n                case AnnotationState.Pristine:\r\n                    break;\r\n                case AnnotationState.Modified:\r\n                    return true;\r\n            }\r\n        }\r\n\r\n        return false;\r\n    }\r\n    /**\r\n     * Deletes an annotation\r\n     * @param  {number} id - The id of the annotation to delete\r\n     * @fires PMA.UI.Components.Events#AnnotationDeleted\r\n     */\r\n    deleteAnnotation(id) {\r\n        if (id === null || isNaN(id)) {\r\n            return;\r\n        }\r\n\r\n        var f = this.viewport.annotationsLayer.getSource().getFeatureById(id);\r\n        if (f) {\r\n            this.clearHighlight();\r\n            this.clearSelection();\r\n            this.viewport.annotationsLayer.getSource().removeFeature(f);\r\n\r\n            f.metaData.State = AnnotationState.Deleted;\r\n\r\n            if (!this.deletedAnnotations) {\r\n                this.deletedAnnotations = [];\r\n            }\r\n\r\n            this.deletedAnnotations.push(f);\r\n            this.fireEvent(Events.AnnotationDeleted, { annotationId: id, feature: f });\r\n        }\r\n    }\r\n    /**\r\n     * Renders the requested annotation using the highlight style\r\n     * @param  {Number} id - The id of the annotation to render\r\n     */\r\n    highlightAnnotation(id) {\r\n        if (id === null || isNaN(id)) {\r\n            return;\r\n        }\r\n\r\n        var f = this.viewport.annotationsLayer.getSource().getFeatureById(id);\r\n        if (f) {\r\n            var feats = this.hoverInteraction.getFeatures();\r\n            feats.clear();\r\n            feats.push(f);\r\n        }\r\n    }\r\n    /**\r\n     * Clears all highlighted annotations\r\n     */\r\n    clearHighlight() {\r\n        this.hoverInteraction.getFeatures().clear();\r\n    }\r\n    /**\r\n     * Adds the requested annotation in the selection list\r\n     * @param  {Number} id - The id of the annotation to select\r\n     */\r\n    selectAnnotation(id) {\r\n        if (id === null || isNaN(id)) {\r\n            return;\r\n        }\r\n\r\n        var f = this.viewport.annotationsLayer.getSource().getFeatureById(id);\r\n        if (f) {\r\n            var feats = this.selectInteraction.getFeatures();\r\n            feats.clear();\r\n            feats.push(f);\r\n        }\r\n    }\r\n    /**\r\n     * Clears all selected annotations\r\n     */\r\n    clearSelection() {\r\n        this.selectInteraction.getFeatures().clear();\r\n    }\r\n    /**\r\n     * Merges the selected annotations into one geometry\r\n     * @param  {Array.<ol.Feature>} [selection=null] - An array of annotations to merge. If this parameter is not supplied, the currently selected annotations are used.\r\n     */\r\n    mergeSelection(selection) {\r\n        if (!selection) {\r\n            selection = this.getSelection();\r\n        }\r\n\r\n        if (!selection || selection.length < 1) {\r\n            return;\r\n        }\r\n\r\n        var tmpSelection = [];\r\n\r\n        for (var i = 0; i < selection.length; i++) {\r\n            var g = selection[i].getGeometry();\r\n            if (g.getFirstCoordinate) {\r\n                tmpSelection.push({\r\n                    id: selection[i].getId(),\r\n                    geometry: g,\r\n                    first: g.getFirstCoordinate(),\r\n                    last: g.getLastCoordinate(),\r\n                    coordinates: g.getCoordinates(),\r\n                    sqDistanceFirst: 0,\r\n                    sqDistanceLast: 0,\r\n                    sqDistanceFirstFirst: 0,\r\n                    sqDistanceLastFirst: 0\r\n                });\r\n            }\r\n        }\r\n\r\n        for (i = 0; i < tmpSelection.length; i++) {\r\n            this.deleteAnnotation(tmpSelection[i].id);\r\n        }\r\n\r\n        var coordinates = tmpSelection[0].coordinates;\r\n        var first = coordinates[0];\r\n        var last = coordinates[coordinates.length - 1];\r\n\r\n        tmpSelection.splice(0, 1);\r\n\r\n        while (tmpSelection.length > 0) {\r\n            var minDistance = -1;\r\n            var minIndex = -1;\r\n            for (i = 0; i < tmpSelection.length; i++) {\r\n                tmpSelection[i].sqDistanceFirst = Math.pow(last[0] - tmpSelection[i].first[0], 2) + Math.pow(last[1] - tmpSelection[i].first[1], 2);\r\n                tmpSelection[i].sqDistanceLast = Math.pow(last[0] - tmpSelection[i].last[0], 2) + Math.pow(last[1] - tmpSelection[i].last[1], 2);\r\n\r\n                tmpSelection[i].sqDistanceFirstFirst = Math.pow(first[0] - tmpSelection[i].first[0], 2) + Math.pow(first[1] - tmpSelection[i].first[1], 2);\r\n                tmpSelection[i].sqDistanceLastFirst = Math.pow(first[0] - tmpSelection[i].last[0], 2) + Math.pow(first[1] - tmpSelection[i].last[1], 2);\r\n\r\n                if (minDistance == -1 || tmpSelection[i].sqDistanceFirst < minDistance) {\r\n                    minDistance = tmpSelection[i].sqDistanceFirst;\r\n                    minIndex = i;\r\n                }\r\n\r\n                if (minDistance == -1 || tmpSelection[i].sqDistanceLast < minDistance) {\r\n                    minDistance = tmpSelection[i].sqDistanceLast;\r\n                    minIndex = i;\r\n                }\r\n            }\r\n\r\n            var minItem = tmpSelection.splice(minIndex, 1)[0];\r\n\r\n            var reversed = minItem.sqDistanceLast < minItem.sqDistanceFirst;\r\n            for (var c = 0; c < minItem.coordinates.length; c++) {\r\n                if (!reversed) {\r\n                    coordinates.push(minItem.coordinates[c]);\r\n                } else {\r\n                    coordinates.push(minItem.coordinates[minItem.coordinates.length - 1 - c]);\r\n                }\r\n            }\r\n\r\n            first = coordinates[0];\r\n            last = coordinates[coordinates.length - 1];\r\n        }\r\n\r\n        coordinates.push(coordinates[0]);\r\n\r\n        var resultGeometry = new Polygon([coordinates]);\r\n\r\n        var feature = new Feature({\r\n            geometry: resultGeometry,\r\n        });\r\n\r\n        feature.color = this.lastAnnotationStyle.color;\r\n        feature.fillColor = this.lastAnnotationStyle.fillColor;\r\n        feature.penSize = this.lastAnnotationStyle.penSize;\r\n        feature.icon = this.lastAnnotationStyle.iconPath;\r\n\r\n        addFeature.call(this, feature, false);\r\n\r\n        this.viewport.annotationsLayer.getSource().addFeatures([feature]);\r\n\r\n        this.clearSelection();\r\n    }\r\n\r\n    /**\r\n     * Takes two or more annotations and adds a combined annotation. Original annotations will be deleted. Style is based on first annotation in array.\r\n     * @param  {Array.<ol.Feature>} annotations - An array of annotations to compine with at least two elements.\r\n     */\r\n    booleanUnion(annotations) {\r\n        if (!annotations) {\r\n            console.error(\"No annotations provided\");\r\n            return;\r\n        }\r\n\r\n        if (annotations.length < 2) {\r\n            console.error(\"This operation requires at least 2 annotations\");\r\n            return;\r\n        }\r\n\r\n        var tmpSelection = [];\r\n        var featuresArray = [];\r\n\r\n        var format = new olFormat.GeoJSON();\r\n        var formatOptions = {\r\n            featureProjection: this.viewport.map.getView().getProjection(),\r\n        };\r\n\r\n        var metaNotes = \"\";\r\n        annotations.forEach(element => {\r\n            metaNotes += element.metaData.Notes ? element.metaData.Notes + \" \" : \"\";\r\n        });\r\n\r\n        var metaColor = annotations[0].metaData.Color ? annotations[0].metaData.Color : annotations[0].color;\r\n        var metaFillColor = annotations[0].metaData.FillColor ? annotations[0].metaData.FillColor : annotations[0].fillColor;\r\n        var metaPenSize = annotations[0].metaData.LineThickness ? annotations[0].metaData.LineThickness : annotations[0].penSize;\r\n        var metaIcon = annotations[0].icon;\r\n\r\n        for (var i = 0; i < annotations.length; i++) {\r\n            var g = annotations[i];\r\n            if (g.getGeometry().getType() !== \"Polygon\" && g.getGeometry().getType() !== \"MultiPolygon\") {\r\n                console.error(\"Selection contains non-polygon geometry\");\r\n                return;\r\n            }\r\n            var gJson = format.writeFeatureObject(g, formatOptions);\r\n            tmpSelection.push(gJson);\r\n            /*\r\n            try {\r\n                gJson = unkinkPolygon(cleanCoords(gJson));\r\n            } catch {\r\n                console.error(\"Selection contains non-polygon geometry\");\r\n                return;\r\n            }\r\n            gJson.features.forEach(feat => {\r\n                featuresArray.push(feat);\r\n            });\r\n            */\r\n            featuresArray.push(gJson);\r\n        }\r\n\r\n        var unifiedFeatureJson = union(...featuresArray);\r\n        if (unifiedFeatureJson.type === \"FeatureCollection\") {\r\n            throw \"Feature collection detected\";\r\n        }\r\n\r\n        if (unifiedFeatureJson.geometry.type === \"MultiPolygon\") {\r\n            unifiedFeatureJson.geometry.coordinates.forEach((coords) => {\r\n                var feat = { 'type': 'Polygon', 'coordinates': coords };\r\n\r\n                var feature = format.readFeature(feat, formatOptions);\r\n\r\n                feature.color = metaColor;\r\n                feature.fillColor = metaFillColor;\r\n                feature.penSize = metaPenSize;\r\n                feature.icon = metaIcon;\r\n                feature.notes = metaNotes ? metaNotes : \"\";\r\n\r\n                addFeature.call(this, feature, false);\r\n\r\n                this.viewport.annotationsLayer.getSource().addFeatures([feature]);\r\n            });\r\n        } else {\r\n            var feature = format.readFeature(unifiedFeatureJson, formatOptions);\r\n\r\n            feature.color = metaColor;\r\n            feature.fillColor = metaFillColor;\r\n            feature.penSize = metaPenSize;\r\n            feature.icon = metaIcon;\r\n            feature.notes = metaNotes ? metaNotes : \"\";\r\n\r\n            addFeature.call(this, feature, false);\r\n\r\n            this.viewport.annotationsLayer.getSource().addFeatures([feature]);\r\n        }\r\n\r\n        tmpSelection.forEach(geom => {\r\n            this.deleteAnnotation(geom.id);\r\n        });\r\n    }\r\n\r\n    /**\r\n     * Finds the difference between two annotations by clipping the second annotation from the first. Original annotations will be deleted. Style is based on inputPolygonFeature.\r\n     * @param  {ol.Feature} inputPolygonFeature - Base annotation feature to perform boolean difference.\r\n     * @param  {ol.Feature} polygonFeatureToDifferentiate - Annotation feature to difference from inputPolygonFeature\r\n     */\r\n    booleanDifference(inputPolygonFeature, polygonFeatureToDifferentiate) {\r\n        if (!inputPolygonFeature || !polygonFeatureToDifferentiate) {\r\n            console.error(\"No annotations provided\");\r\n            return;\r\n        }\r\n\r\n        var format = new olFormat.GeoJSON();\r\n        var formatOptions = {\r\n            featureProjection: this.viewport.map.getView().getProjection(),\r\n        };\r\n\r\n        var metaNotes = \"\";\r\n        metaNotes += inputPolygonFeature.metaData.Notes ? inputPolygonFeature.metaData.Notes + \" \" : \"\";\r\n        metaNotes += polygonFeatureToDifferentiate.metaData.Notes ? polygonFeatureToDifferentiate.metaData.Notes + \" \" : \"\";\r\n\r\n        var metaColor = inputPolygonFeature.metaData.Color ? inputPolygonFeature.metaData.Color : inputPolygonFeature.color;\r\n        var metaFillColor = inputPolygonFeature.metaData.FillColor ? inputPolygonFeature.metaData.FillColor : inputPolygonFeature.fillColor;\r\n        var metaPenSize = inputPolygonFeature.metaData.LineThickness ? inputPolygonFeature.metaData.LineThickness : inputPolygonFeature.penSize;\r\n        var metaIcon = inputPolygonFeature.icon;\r\n\r\n        var annotationId1;\r\n        var annotationId2;\r\n\r\n        var inputFeaturesArray = [];\r\n        var featuresArrayToDifferentiate = [];\r\n        var outputFeaturesArray = [];\r\n\r\n        if (inputPolygonFeature.getGeometry().getType() !== \"Polygon\") {\r\n            console.error(\"Annotation contains non-polygon geometry\");\r\n            return;\r\n        }\r\n        var inputPolygonFeatureJson = format.writeFeatureObject(inputPolygonFeature, formatOptions);\r\n        annotationId1 = inputPolygonFeatureJson.id;\r\n\r\n        /*\r\n        try {\r\n            inputPolygonFeatureJson = unkinkPolygon(cleanCoords(inputPolygonFeatureJson));\r\n        } catch {\r\n            console.error(\"Annotation contains non-polygon geometry\");\r\n            return;\r\n        }\r\n        inputPolygonFeatureJson.features.forEach(feat => {\r\n            inputFeaturesArray.push(feat);\r\n        });\r\n        */\r\n\r\n        inputFeaturesArray.push(inputPolygonFeatureJson);\r\n\r\n        if (polygonFeatureToDifferentiate.getGeometry().getType() !== \"Polygon\") {\r\n            console.error(\"Annotation contains non-polygon geometry\");\r\n            return;\r\n        }\r\n        var polygonFeatureToDifferentiateJson = format.writeFeatureObject(polygonFeatureToDifferentiate, formatOptions);\r\n        annotationId2 = polygonFeatureToDifferentiateJson.id;\r\n\r\n        /*\r\n        try {\r\n            polygonFeatureToDifferentiateJson = unkinkPolygon(cleanCoords(polygonFeatureToDifferentiateJson));\r\n        } catch {\r\n            console.error(\"Annotation contains non-polygon geometry\");\r\n            return;\r\n        }\r\n        polygonFeatureToDifferentiateJson.features.forEach(feat => {\r\n            featuresArrayToDifferentiate.push(feat);\r\n        });\r\n        */\r\n\r\n        featuresArrayToDifferentiate.push(polygonFeatureToDifferentiateJson);\r\n\r\n        inputFeaturesArray.forEach(input => {\r\n            featuresArrayToDifferentiate.forEach(diff => {\r\n                var intersection = intersect(input, diff);\r\n                if (!intersection) {\r\n                    console.error(\"Non-intersecting geometry\");\r\n                    return;\r\n                }\r\n                var differentiatedFeatureJson = difference(input, diff);\r\n                if (!differentiatedFeatureJson) {\r\n                    console.error(\"Nullified geometry\");\r\n                    return;\r\n                }\r\n                if (differentiatedFeatureJson.type === \"FeatureCollection\") {\r\n                    throw \"Feature collection detected\";\r\n                }\r\n                outputFeaturesArray.push(differentiatedFeatureJson);\r\n            });\r\n        });\r\n\r\n        if (outputFeaturesArray.length > 0) {\r\n            outputFeaturesArray.forEach(output => {\r\n                if (output.geometry.type === \"MultiPolygon\") {\r\n                    output.geometry.coordinates.forEach((coords) => {\r\n                        var feat = { 'type': 'Polygon', 'coordinates': coords };\r\n\r\n                        var feature = format.readFeature(feat, formatOptions);\r\n\r\n                        feature.color = metaColor;\r\n                        feature.fillColor = metaFillColor;\r\n                        feature.penSize = metaPenSize;\r\n                        feature.icon = metaIcon;\r\n                        feature.notes = metaNotes ? metaNotes : \"\";\r\n\r\n                        addFeature.call(this, feature, false);\r\n\r\n                        this.viewport.annotationsLayer.getSource().addFeatures([feature]);\r\n                    });\r\n                } else {\r\n                    var feature = format.readFeature(output, formatOptions);\r\n\r\n                    feature.color = metaColor;\r\n                    feature.fillColor = metaFillColor;\r\n                    feature.penSize = metaPenSize;\r\n                    feature.icon = metaIcon;\r\n                    feature.notes = metaNotes ? metaNotes : \"\";\r\n\r\n                    addFeature.call(this, feature, false);\r\n\r\n                    this.viewport.annotationsLayer.getSource().addFeatures([feature]);\r\n\r\n                    return feature;\r\n                }\r\n            });\r\n\r\n            this.deleteAnnotation(annotationId1);\r\n            this.deleteAnnotation(annotationId2);\r\n        }\r\n    }\r\n\r\n    saveTransformedAnnotations(editedFeature, existing = true) {\r\n        if (existing) {\r\n            editedFeature.color = editedFeature.metaData.Color;\r\n            editedFeature.penSize = editedFeature.metaData.LineThickness;\r\n            editedFeature.fillColor = editedFeature.metaData.FillColor;\r\n            addFeature.call(this, editedFeature, true);\r\n        } else {\r\n            addFeature.call(this, editedFeature, false);\r\n        }\r\n    }\r\n\r\n    enterTransformMode(annotation) {\r\n        var feature = annotation;\r\n        var transformInteraction = new ol_interaction_Transform({\r\n            layers: [this.viewport.annotationsLayer],\r\n            enableRotatedTransform: false,\r\n            translateFeature: true,\r\n            scale: true,\r\n            rotate: true,\r\n            keepAspectRatio: false,\r\n            translate: true,\r\n            stretch: true,\r\n        });\r\n\r\n        this.edit = transformInteraction;\r\n\r\n        this.viewport.map.addInteraction(transformInteraction);\r\n        if (feature) {\r\n            transformInteraction.select(feature, true);\r\n        }\r\n    }\r\n\r\n    enterModifyMode(annotation) {\r\n        var feature = annotation;\r\n        var modifyInteraction = new olInteraction.Modify({\r\n            source: this.viewport.annotationsLayer.getSource()\r\n        });\r\n\r\n        this.edit = modifyInteraction;\r\n\r\n        this.viewport.map.addInteraction(modifyInteraction);\r\n        annotationManager.selectInteraction.on('select', function (e) {\r\n            if (feature) {\r\n                annotationManager.saveTransformedAnnotations(feature);\r\n                annotationManager.viewport.map.removeInteraction(modifyInteraction);\r\n                feature = null;\r\n            }\r\n        });\r\n    }\r\n\r\n    enterMagicWandMode(options) {\r\n        if (!options) {\r\n            console.error(\"No style options provided.\");\r\n            return;\r\n        }\r\n\r\n        var magicWandInteraction = new MagicWandInteraction({\r\n            layers: [this.viewport.gridLayer],\r\n            hatchLength: 4,\r\n            hatchTimeout: 300,\r\n            waitClass: 'magic-wand-loading',\r\n            addClass: 'magic-wand-add'\r\n        });\r\n\r\n        this.edit = magicWandInteraction;\r\n        this.edit.options = options;\r\n\r\n        //this.viewport.annotationsLayer.setVisible(false);\r\n        this.viewport.map.addInteraction(magicWandInteraction);\r\n    }\r\n\r\n    saveMagicWandAnnotation() {\r\n        var contours = annotationManager.edit.getContours(5, 50);\r\n\r\n        if (!contours) return;\r\n\r\n        var rings = contours.map(c => c.points.map(p => annotationManager.viewport.map.getCoordinateFromPixel([p.x, p.y])));\r\n\r\n        var feature = new Feature({\r\n            geometry: new Polygon(rings)\r\n        });\r\n        feature.color = annotationManager.edit.options.color;\r\n        feature.fillColor = annotationManager.edit.options.fillColor;\r\n        feature.penSize = annotationManager.edit.options.penSize;\r\n        feature.icon = annotationManager.edit.options.icon;\r\n        feature.notes = annotationManager.edit.options.notes;\r\n        annotationManager.saveTransformedAnnotations(feature, false);\r\n        annotationManager.viewport.annotationsLayer.getSource().addFeatures([feature]);\r\n        annotationManager.viewport.annotationsLayer.setVisible(true);\r\n    }\r\n\r\n    enterBrushMode(eraser, annotation, options) {\r\n        if (!options) {\r\n            options = {\r\n                brushSize: 500,\r\n                brushType: 'circle',\r\n                brushStep: 50\r\n            };\r\n        }\r\n\r\n        var brush = new ol_interaction_Brush({\r\n            map: this.viewport.map,\r\n            feature: annotation,\r\n            layer: this.viewport.annotationsLayer,\r\n            brushSize: options.brushSize,\r\n            brushType: options.brushType,\r\n            brushMode: !eraser ? 'brush' : 'eraser',\r\n        });\r\n\r\n        brush.addEventListener(\"drawing\" || \"erasing\", (evt) => {\r\n            if (evt.target.getId() != null) {\r\n                this.deleteAnnotation(evt.target.getId());\r\n                if (evt.target.getFeature() !== null) {\r\n                    addFeature.call(this, evt.target.getFeature(), false);\r\n                    this.viewport.annotationsLayer.getSource().addFeature(evt.target.getFeature());\r\n                }\r\n            } else {\r\n                if (evt.target.getFeature() !== null) {\r\n                    var feat = evt.target.getFeature();\r\n                    addFeature.call(this, feat, true);\r\n                    feat.color = feat.metaData.Color;\r\n                    feat.fillColor = feat.metaData.FillColor;\r\n                    feat.penSize = feat.metaData.LineThickness;\r\n                    feat.notes = feat.metaData.Notes ? feat.metaData.Notes : \"\";\r\n                    feat.changed();\r\n                }\r\n            }\r\n        });\r\n\r\n        this.edit = brush;\r\n        this.edit.options = { brushStep: options.brushStep };\r\n\r\n        this.viewport.map.addInteraction(brush);\r\n    }\r\n    /**\r\n     * Options parameter required to start editing\r\n     * @param {PMA.UI.Types.Edit} type - The type of edit tool to start\r\n     * @param {string} [brushType] - The type of brush tip to use, 'circle' or 'square'. Used by brush and eraser tool. Default: 'circle'\r\n     * @param {Number} [brushSize] - The size of brush tip. Used by brush and eraser tool. Default: 500\r\n     * @param {Number} [brushStep] - The step to increase or decrease size of brush tip. Used by brush and eraser tool. Default: 50\r\n     * @param {string} [color] - Annotation outline color as HTML hex string. Required if type is Magic Wand\r\n     * @param {string} [fillColor] - Annotation fill color as HTML hex string. Required if type is Magic Wand\r\n     * @param {Number} [penWidth] - The line thickness. Required if type is Magic Wand\r\n     * @param {string} [notes] - Text to add to the annotation. Required if type is Magic Wand\r\n     * @param {string} [iconRelativePath] - Relative path to an image that will be used when drawing a point. The base URL is defined by the imageBaseUrl property of the {@link PMA.UI.View.Viewport~annotationOptions|annotations} initialization option supplied in the {@link PMA.UI.View.Viewport} constructor. Required if type is Magic Wand\r\n     * @param {ol.Feature} [feature] - An existing {@link http://openlayers.org/en/master/apidoc/ol.Feature.html | feature} to edit. If this argument has a value, the viewport goes into edit mode, instead of drawing a new annotation\r\n     * @fires Components.Events#AnnotationEditingStarted\r\n     */\r\n    enterEditMode(options) {\r\n        if (!this.getEnabled()) {\r\n            return;\r\n        }\r\n\r\n        if (this.editing) {\r\n            console.error(\"Editing already in progress. Finish editing before starting a new one.\");\r\n            return;\r\n        }\r\n\r\n        //this.stopEditing();\r\n        this.editing = true;\r\n        this.fireEvent(Events.AnnotationEditingStarted);\r\n        showEditingControls.call(this, true, options.type, options.feature);\r\n        switch (options.type) {\r\n            case Edit.Modify:\r\n                this.enterModifyMode(options.feature);\r\n                break;\r\n            case Edit.Transform:\r\n                this.enterTransformMode(options.feature);\r\n                break;\r\n            case Edit.Wand:\r\n                if (typeof options.color === \"undefined\" || typeof options.fillColor === \"undefined\" || typeof options.penWidth === \"undefined\" || typeof options.iconRelativePath === \"undefined\" || typeof options.notes === \"undefined\") {\r\n                    console.error(\"Required parameters missing!\");\r\n                    this.editing = false;\r\n                    showEditingControls.call(this, false, null, null);\r\n                    break;\r\n                }\r\n                this.enterMagicWandMode({\r\n                    color: options.color,\r\n                    fillColor: options.fillColor,\r\n                    penWidth: options.penWidth,\r\n                    iconRelativePath: options.iconRelativePath,\r\n                    notes: options.notes\r\n                });\r\n                break;\r\n            case Edit.Brush:\r\n                this.enterBrushMode(false, options.feature, { brushType: options.brushType, brushSize: options.brushSize, brushStep: options.brushStep });\r\n                break;\r\n            case Edit.Eraser:\r\n                this.enterBrushMode(true, options.feature, { brushType: options.brushType, brushSize: options.brushSize, brushStep: options.brushStep });\r\n                break;\r\n            default:\r\n                this.editing = false;\r\n                showEditingControls.call(this, false, null, null);\r\n                break;\r\n        }\r\n    }\r\n    /**\r\n     * Exits editing mode\r\n     * @fires Components.Events#AnnotationEditingEnded\r\n     */\r\n    stopEditing() {\r\n        if (this.editing) {\r\n            if (this.edit != null) {\r\n                showEditingControls.call(this, false, null, null);\r\n                if (typeof this.edit.stopEditing === \"function\") {\r\n                    this.edit.stopEditing();\r\n                }\r\n                this.editing = false;\r\n            }\r\n        }\r\n\r\n        removeInteraction.call(this);\r\n        this.fireEvent(Events.AnnotationEditingEnded);\r\n    }\r\n}","module.exports = require(\"regenerator-runtime\");\n","function _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n\n  for (var i = 0, arr2 = new Array(len); i < len; i++) {\n    arr2[i] = arr[i];\n  }\n\n  return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n  var e, m\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var nBits = -7\n  var i = isLE ? (nBytes - 1) : 0\n  var d = isLE ? -1 : 1\n  var s = buffer[offset + i]\n\n  i += d\n\n  e = s & ((1 << (-nBits)) - 1)\n  s >>= (-nBits)\n  nBits += eLen\n  for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  m = e & ((1 << (-nBits)) - 1)\n  e >>= (-nBits)\n  nBits += mLen\n  for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  if (e === 0) {\n    e = 1 - eBias\n  } else if (e === eMax) {\n    return m ? NaN : ((s ? -1 : 1) * Infinity)\n  } else {\n    m = m + Math.pow(2, mLen)\n    e = e - eBias\n  }\n  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n  var e, m, c\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n  var i = isLE ? 0 : (nBytes - 1)\n  var d = isLE ? 1 : -1\n  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n  value = Math.abs(value)\n\n  if (isNaN(value) || value === Infinity) {\n    m = isNaN(value) ? 1 : 0\n    e = eMax\n  } else {\n    e = Math.floor(Math.log(value) / Math.LN2)\n    if (value * (c = Math.pow(2, -e)) < 1) {\n      e--\n      c *= 2\n    }\n    if (e + eBias >= 1) {\n      value += rt / c\n    } else {\n      value += rt * Math.pow(2, 1 - eBias)\n    }\n    if (value * c >= 2) {\n      e++\n      c /= 2\n    }\n\n    if (e + eBias >= eMax) {\n      m = 0\n      e = eMax\n    } else if (e + eBias >= 1) {\n      m = ((value * c) - 1) * Math.pow(2, mLen)\n      e = e + eBias\n    } else {\n      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n      e = 0\n    }\n  }\n\n  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n  e = (e << mLen) | m\n  eLen += mLen\n  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n  buffer[offset + i - d] |= s * 128\n}\n","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Draw\n */\nimport Circle from '../geom/Circle.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport Feature from '../Feature.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport InteractionProperty from './Property.js';\nimport LineString from '../geom/LineString.js';\nimport MapBrowserEvent from '../MapBrowserEvent.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport PointerInteraction from './Pointer.js';\nimport Polygon, { fromCircle, makeRegular } from '../geom/Polygon.js';\nimport VectorLayer from '../layer/Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport { FALSE, TRUE } from '../functions.js';\nimport { always, noModifierKeys, shiftKeyOnly } from '../events/condition.js';\nimport { boundingExtent, getBottomLeft, getBottomRight, getTopLeft, getTopRight, } from '../extent.js';\nimport { createEditingStyle } from '../style/Style.js';\nimport { fromUserCoordinate, getUserProjection } from '../proj.js';\nimport { squaredDistance as squaredCoordinateDistance } from '../coordinate.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../geom/GeometryType.js\").default} type Geometry type of\n * the geometries being drawn with this instance.\n * @property {number} [clickTolerance=6] The maximum distance in pixels between\n * \"down\" and \"up\" for a \"up\" event to be considered a \"click\" event and\n * actually add a point/vertex to the geometry being drawn.  The default of `6`\n * was chosen for the draw interaction to behave correctly on mouse as well as\n * on touch devices.\n * @property {import(\"../Collection.js\").default<Feature>} [features]\n * Destination collection for the drawn features.\n * @property {VectorSource} [source] Destination source for\n * the drawn features.\n * @property {number} [dragVertexDelay=500] Delay in milliseconds after pointerdown\n * before the current vertex can be dragged to its exact position.\n * @property {number} [snapTolerance=12] Pixel distance for snapping to the\n * drawing finish. Must be greater than `0`.\n * @property {boolean} [stopClick=false] Stop click, singleclick, and\n * doubleclick events from firing during drawing.\n * @property {number} [maxPoints] The number of points that can be drawn before\n * a polygon ring or line string is finished. By default there is no\n * restriction.\n * @property {number} [minPoints] The number of points that must be drawn\n * before a polygon ring or line string can be finished. Default is `3` for\n * polygon rings and `2` for line strings.\n * @property {import(\"../events/condition.js\").Condition} [finishCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether the drawing can be finished. Not used when drawing\n * POINT or MULTI_POINT geometries.\n * @property {import(\"../style/Style.js\").StyleLike} [style]\n * Style for sketch features.\n * @property {GeometryFunction} [geometryFunction]\n * Function that is called when a geometry's coordinates are updated.\n * @property {string} [geometryName] Geometry name to use for features created\n * by the draw interaction.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * By default {@link module:ol/events/condition.noModifierKeys}, i.e. a click,\n * adds a vertex or deactivates freehand drawing.\n * @property {boolean} [freehand=false] Operate in freehand mode for lines,\n * polygons, and circles.  This makes the interaction always operate in freehand\n * mode and takes precedence over any `freehandCondition` option.\n * @property {import(\"../events/condition.js\").Condition} [freehandCondition]\n * Condition that activates freehand drawing for lines and polygons. This\n * function takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and\n * returns a boolean to indicate whether that event should be handled. The\n * default is {@link module:ol/events/condition.shiftKeyOnly}, meaning that the\n * Shift key activates freehand drawing.\n * @property {boolean} [wrapX=false] Wrap the world horizontally on the sketch\n * overlay.\n */\n/**\n * Coordinate type when drawing points.\n * @typedef {import(\"../coordinate.js\").Coordinate} PointCoordType\n */\n/**\n * Coordinate type when drawing lines.\n * @typedef {Array<import(\"../coordinate.js\").Coordinate>} LineCoordType\n */\n/**\n * Coordinate type when drawing polygons.\n * @typedef {Array<Array<import(\"../coordinate.js\").Coordinate>>} PolyCoordType\n */\n/**\n * Types used for drawing coordinates.\n * @typedef {PointCoordType|LineCoordType|PolyCoordType} SketchCoordType\n */\n/**\n * Function that takes an array of coordinates and an optional existing geometry\n * and a projection as arguments, and returns a geometry. The optional existing\n * geometry is the geometry that is returned when the function is called without\n * a second argument.\n * @typedef {function(!SketchCoordType, import(\"../geom/SimpleGeometry.js\").default,\n *     import(\"../proj/Projection.js\").default):\n *     import(\"../geom/SimpleGeometry.js\").default} GeometryFunction\n */\n/**\n * Draw mode.  This collapses multi-part geometry types with their single-part\n * cousins.\n * @enum {string}\n */\nvar Mode = {\n    POINT: 'Point',\n    LINE_STRING: 'LineString',\n    POLYGON: 'Polygon',\n    CIRCLE: 'Circle',\n};\n/**\n * @enum {string}\n */\nvar DrawEventType = {\n    /**\n     * Triggered upon feature draw start\n     * @event DrawEvent#drawstart\n     * @api\n     */\n    DRAWSTART: 'drawstart',\n    /**\n     * Triggered upon feature draw end\n     * @event DrawEvent#drawend\n     * @api\n     */\n    DRAWEND: 'drawend',\n    /**\n     * Triggered upon feature draw abortion\n     * @event DrawEvent#drawabort\n     * @api\n     */\n    DRAWABORT: 'drawabort',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Draw~Draw} instances are\n * instances of this type.\n */\nvar DrawEvent = /** @class */ (function (_super) {\n    __extends(DrawEvent, _super);\n    /**\n     * @param {DrawEventType} type Type.\n     * @param {Feature} feature The feature drawn.\n     */\n    function DrawEvent(type, feature) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The feature being drawn.\n         * @type {Feature}\n         * @api\n         */\n        _this.feature = feature;\n        return _this;\n    }\n    return DrawEvent;\n}(Event));\nexport { DrawEvent };\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types|\n *     'change:active', import(\"../Object\").ObjectEvent, Return> &\n *   import(\"../Observable\").OnSignature<'drawabort'|'drawend'|'drawstart', DrawEvent, Return> &\n *   import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"../ObjectEventType\").Types|\n *     'change:active'|'drawabort'|'drawend'|'drawstart', Return>} DrawOnSignature\n */\n/**\n * @classdesc\n * Interaction for drawing feature geometries.\n *\n * @fires DrawEvent\n * @api\n */\nvar Draw = /** @class */ (function (_super) {\n    __extends(Draw, _super);\n    /**\n     * @param {Options} options Options.\n     */\n    function Draw(options) {\n        var _this = this;\n        var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n        if (!pointerOptions.stopDown) {\n            pointerOptions.stopDown = FALSE;\n        }\n        _this = _super.call(this, pointerOptions) || this;\n        /***\n         * @type {DrawOnSignature<import(\"../Observable\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {DrawOnSignature<import(\"../Observable\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {DrawOnSignature<void>}\n         */\n        _this.un;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.shouldHandle_ = false;\n        /**\n         * @type {import(\"../pixel.js\").Pixel}\n         * @private\n         */\n        _this.downPx_ = null;\n        /**\n         * @type {?}\n         * @private\n         */\n        _this.downTimeout_;\n        /**\n         * @type {number|undefined}\n         * @private\n         */\n        _this.lastDragTime_;\n        /**\n         * Pointer type of the last pointermove event\n         * @type {string}\n         * @private\n         */\n        _this.pointerType_;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.freehand_ = false;\n        /**\n         * Target source for drawn features.\n         * @type {VectorSource}\n         * @private\n         */\n        _this.source_ = options.source ? options.source : null;\n        /**\n         * Target collection for drawn features.\n         * @type {import(\"../Collection.js\").default<Feature>}\n         * @private\n         */\n        _this.features_ = options.features ? options.features : null;\n        /**\n         * Pixel distance for snapping.\n         * @type {number}\n         * @private\n         */\n        _this.snapTolerance_ = options.snapTolerance ? options.snapTolerance : 12;\n        /**\n         * Geometry type.\n         * @type {import(\"../geom/GeometryType.js\").default}\n         * @private\n         */\n        _this.type_ = /** @type {import(\"../geom/GeometryType.js\").default} */ (options.type);\n        /**\n         * Drawing mode (derived from geometry type.\n         * @type {Mode}\n         * @private\n         */\n        _this.mode_ = getMode(_this.type_);\n        /**\n         * Stop click, singleclick, and doubleclick events from firing during drawing.\n         * Default is `false`.\n         * @type {boolean}\n         * @private\n         */\n        _this.stopClick_ = !!options.stopClick;\n        /**\n         * The number of points that must be drawn before a polygon ring or line\n         * string can be finished.  The default is 3 for polygon rings and 2 for\n         * line strings.\n         * @type {number}\n         * @private\n         */\n        _this.minPoints_ = options.minPoints\n            ? options.minPoints\n            : _this.mode_ === Mode.POLYGON\n                ? 3\n                : 2;\n        /**\n         * The number of points that can be drawn before a polygon ring or line string\n         * is finished. The default is no restriction.\n         * @type {number}\n         * @private\n         */\n        _this.maxPoints_ =\n            _this.mode_ === Mode.CIRCLE\n                ? 2\n                : options.maxPoints\n                    ? options.maxPoints\n                    : Infinity;\n        /**\n         * A function to decide if a potential finish coordinate is permissible\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.finishCondition_ = options.finishCondition\n            ? options.finishCondition\n            : TRUE;\n        var geometryFunction = options.geometryFunction;\n        if (!geometryFunction) {\n            var mode_1 = _this.mode_;\n            if (mode_1 === Mode.CIRCLE) {\n                /**\n                 * @param {!LineCoordType} coordinates The coordinates.\n                 * @param {import(\"../geom/SimpleGeometry.js\").default|undefined} geometry Optional geometry.\n                 * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n                 * @return {import(\"../geom/SimpleGeometry.js\").default} A geometry.\n                 */\n                geometryFunction = function (coordinates, geometry, projection) {\n                    var circle = geometry\n                        ? /** @type {Circle} */ (geometry)\n                        : new Circle([NaN, NaN]);\n                    var center = fromUserCoordinate(coordinates[0], projection);\n                    var squaredLength = squaredCoordinateDistance(center, fromUserCoordinate(coordinates[coordinates.length - 1], projection));\n                    circle.setCenterAndRadius(center, Math.sqrt(squaredLength));\n                    var userProjection = getUserProjection();\n                    if (userProjection) {\n                        circle.transform(projection, userProjection);\n                    }\n                    return circle;\n                };\n            }\n            else {\n                var Constructor_1;\n                if (mode_1 === Mode.POINT) {\n                    Constructor_1 = Point;\n                }\n                else if (mode_1 === Mode.LINE_STRING) {\n                    Constructor_1 = LineString;\n                }\n                else if (mode_1 === Mode.POLYGON) {\n                    Constructor_1 = Polygon;\n                }\n                /**\n                 * @param {!LineCoordType} coordinates The coordinates.\n                 * @param {import(\"../geom/SimpleGeometry.js\").default|undefined} geometry Optional geometry.\n                 * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n                 * @return {import(\"../geom/SimpleGeometry.js\").default} A geometry.\n                 */\n                geometryFunction = function (coordinates, geometry, projection) {\n                    if (geometry) {\n                        if (mode_1 === Mode.POLYGON) {\n                            if (coordinates[0].length) {\n                                // Add a closing coordinate to match the first\n                                geometry.setCoordinates([\n                                    coordinates[0].concat([coordinates[0][0]]),\n                                ]);\n                            }\n                            else {\n                                geometry.setCoordinates([]);\n                            }\n                        }\n                        else {\n                            geometry.setCoordinates(coordinates);\n                        }\n                    }\n                    else {\n                        geometry = new Constructor_1(coordinates);\n                    }\n                    return geometry;\n                };\n            }\n        }\n        /**\n         * @type {GeometryFunction}\n         * @private\n         */\n        _this.geometryFunction_ = geometryFunction;\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.dragVertexDelay_ =\n            options.dragVertexDelay !== undefined ? options.dragVertexDelay : 500;\n        /**\n         * Finish coordinate for the feature (first point for polygons, last point for\n         * linestrings).\n         * @type {import(\"../coordinate.js\").Coordinate}\n         * @private\n         */\n        _this.finishCoordinate_ = null;\n        /**\n         * Sketch feature.\n         * @type {Feature}\n         * @private\n         */\n        _this.sketchFeature_ = null;\n        /**\n         * Sketch point.\n         * @type {Feature<Point>}\n         * @private\n         */\n        _this.sketchPoint_ = null;\n        /**\n         * Sketch coordinates. Used when drawing a line or polygon.\n         * @type {SketchCoordType}\n         * @private\n         */\n        _this.sketchCoords_ = null;\n        /**\n         * Sketch line. Used when drawing polygon.\n         * @type {Feature<LineString>}\n         * @private\n         */\n        _this.sketchLine_ = null;\n        /**\n         * Sketch line coordinates. Used when drawing a polygon or circle.\n         * @type {LineCoordType}\n         * @private\n         */\n        _this.sketchLineCoords_ = null;\n        /**\n         * Squared tolerance for handling up events.  If the squared distance\n         * between a down and up event is greater than this tolerance, up events\n         * will not be handled.\n         * @type {number}\n         * @private\n         */\n        _this.squaredClickTolerance_ = options.clickTolerance\n            ? options.clickTolerance * options.clickTolerance\n            : 36;\n        /**\n         * Draw overlay where our sketch features are drawn.\n         * @type {VectorLayer}\n         * @private\n         */\n        _this.overlay_ = new VectorLayer({\n            source: new VectorSource({\n                useSpatialIndex: false,\n                wrapX: options.wrapX ? options.wrapX : false,\n            }),\n            style: options.style ? options.style : getDefaultStyleFunction(),\n            updateWhileInteracting: true,\n        });\n        /**\n         * Name of the geometry attribute for newly created features.\n         * @type {string|undefined}\n         * @private\n         */\n        _this.geometryName_ = options.geometryName;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : noModifierKeys;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.freehandCondition_;\n        if (options.freehand) {\n            _this.freehandCondition_ = always;\n        }\n        else {\n            _this.freehandCondition_ = options.freehandCondition\n                ? options.freehandCondition\n                : shiftKeyOnly;\n        }\n        _this.addChangeListener(InteractionProperty.ACTIVE, _this.updateState_);\n        return _this;\n    }\n    /**\n     * Remove the interaction from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    Draw.prototype.setMap = function (map) {\n        _super.prototype.setMap.call(this, map);\n        this.updateState_();\n    };\n    /**\n     * Get the overlay layer that this interaction renders sketch features to.\n     * @return {VectorLayer} Overlay layer.\n     * @api\n     */\n    Draw.prototype.getOverlay = function () {\n        return this.overlay_;\n    };\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} and may actually draw or finish the drawing.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     * @api\n     */\n    Draw.prototype.handleEvent = function (event) {\n        if (event.originalEvent.type === EventType.CONTEXTMENU) {\n            // Avoid context menu for long taps when drawing on mobile\n            event.originalEvent.preventDefault();\n        }\n        this.freehand_ =\n            this.mode_ !== Mode.POINT && this.freehandCondition_(event);\n        var move = event.type === MapBrowserEventType.POINTERMOVE;\n        var pass = true;\n        if (!this.freehand_ &&\n            this.lastDragTime_ &&\n            event.type === MapBrowserEventType.POINTERDRAG) {\n            var now = Date.now();\n            if (now - this.lastDragTime_ >= this.dragVertexDelay_) {\n                this.downPx_ = event.pixel;\n                this.shouldHandle_ = !this.freehand_;\n                move = true;\n            }\n            else {\n                this.lastDragTime_ = undefined;\n            }\n            if (this.shouldHandle_ && this.downTimeout_ !== undefined) {\n                clearTimeout(this.downTimeout_);\n                this.downTimeout_ = undefined;\n            }\n        }\n        if (this.freehand_ &&\n            event.type === MapBrowserEventType.POINTERDRAG &&\n            this.sketchFeature_ !== null) {\n            this.addToDrawing_(event.coordinate);\n            pass = false;\n        }\n        else if (this.freehand_ &&\n            event.type === MapBrowserEventType.POINTERDOWN) {\n            pass = false;\n        }\n        else if (move && this.getPointerCount() < 2) {\n            pass = event.type === MapBrowserEventType.POINTERMOVE;\n            if (pass && this.freehand_) {\n                this.handlePointerMove_(event);\n                if (this.shouldHandle_) {\n                    // Avoid page scrolling when freehand drawing on mobile\n                    event.originalEvent.preventDefault();\n                }\n            }\n            else if (event.originalEvent.pointerType === 'mouse' ||\n                (event.type === MapBrowserEventType.POINTERDRAG &&\n                    this.downTimeout_ === undefined)) {\n                this.handlePointerMove_(event);\n            }\n        }\n        else if (event.type === MapBrowserEventType.DBLCLICK) {\n            pass = false;\n        }\n        return _super.prototype.handleEvent.call(this, event) && pass;\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Draw.prototype.handleDownEvent = function (event) {\n        this.shouldHandle_ = !this.freehand_;\n        if (this.freehand_) {\n            this.downPx_ = event.pixel;\n            if (!this.finishCoordinate_) {\n                this.startDrawing_(event.coordinate);\n            }\n            return true;\n        }\n        else if (this.condition_(event)) {\n            this.lastDragTime_ = Date.now();\n            this.downTimeout_ = setTimeout(function () {\n                this.handlePointerMove_(new MapBrowserEvent(MapBrowserEventType.POINTERMOVE, event.map, event.originalEvent, false, event.frameState));\n            }.bind(this), this.dragVertexDelay_);\n            this.downPx_ = event.pixel;\n            return true;\n        }\n        else {\n            this.lastDragTime_ = undefined;\n            return false;\n        }\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Draw.prototype.handleUpEvent = function (event) {\n        var pass = true;\n        if (this.getPointerCount() === 0) {\n            if (this.downTimeout_) {\n                clearTimeout(this.downTimeout_);\n                this.downTimeout_ = undefined;\n            }\n            this.handlePointerMove_(event);\n            if (this.shouldHandle_) {\n                var startingToDraw = !this.finishCoordinate_;\n                if (startingToDraw) {\n                    this.startDrawing_(event.coordinate);\n                }\n                if (!startingToDraw && this.freehand_) {\n                    this.finishDrawing();\n                }\n                else if (!this.freehand_ &&\n                    (!startingToDraw || this.mode_ === Mode.POINT)) {\n                    if (this.atFinish_(event.pixel)) {\n                        if (this.finishCondition_(event)) {\n                            this.finishDrawing();\n                        }\n                    }\n                    else {\n                        this.addToDrawing_(event.coordinate);\n                    }\n                }\n                pass = false;\n            }\n            else if (this.freehand_) {\n                this.abortDrawing();\n            }\n        }\n        if (!pass && this.stopClick_) {\n            event.preventDefault();\n        }\n        return pass;\n    };\n    /**\n     * Handle move events.\n     * @param {import(\"../MapBrowserEvent.js\").default} event A move event.\n     * @private\n     */\n    Draw.prototype.handlePointerMove_ = function (event) {\n        this.pointerType_ = event.originalEvent.pointerType;\n        if (this.downPx_ &&\n            ((!this.freehand_ && this.shouldHandle_) ||\n                (this.freehand_ && !this.shouldHandle_))) {\n            var downPx = this.downPx_;\n            var clickPx = event.pixel;\n            var dx = downPx[0] - clickPx[0];\n            var dy = downPx[1] - clickPx[1];\n            var squaredDistance = dx * dx + dy * dy;\n            this.shouldHandle_ = this.freehand_\n                ? squaredDistance > this.squaredClickTolerance_\n                : squaredDistance <= this.squaredClickTolerance_;\n            if (!this.shouldHandle_) {\n                return;\n            }\n        }\n        if (this.finishCoordinate_) {\n            this.modifyDrawing_(event.coordinate);\n        }\n        else {\n            this.createOrUpdateSketchPoint_(event.coordinate.slice());\n        }\n    };\n    /**\n     * Determine if an event is within the snapping tolerance of the start coord.\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @return {boolean} The event is within the snapping tolerance of the start.\n     * @private\n     */\n    Draw.prototype.atFinish_ = function (pixel) {\n        var at = false;\n        if (this.sketchFeature_) {\n            var potentiallyDone = false;\n            var potentiallyFinishCoordinates = [this.finishCoordinate_];\n            var mode = this.mode_;\n            if (mode === Mode.POINT) {\n                at = true;\n            }\n            else if (mode === Mode.CIRCLE) {\n                at = this.sketchCoords_.length === 2;\n            }\n            else if (mode === Mode.LINE_STRING) {\n                potentiallyDone = this.sketchCoords_.length > this.minPoints_;\n            }\n            else if (mode === Mode.POLYGON) {\n                var sketchCoords = /** @type {PolyCoordType} */ (this.sketchCoords_);\n                potentiallyDone = sketchCoords[0].length > this.minPoints_;\n                potentiallyFinishCoordinates = [\n                    sketchCoords[0][0],\n                    sketchCoords[0][sketchCoords[0].length - 2],\n                ];\n            }\n            if (potentiallyDone) {\n                var map = this.getMap();\n                for (var i = 0, ii = potentiallyFinishCoordinates.length; i < ii; i++) {\n                    var finishCoordinate = potentiallyFinishCoordinates[i];\n                    var finishPixel = map.getPixelFromCoordinate(finishCoordinate);\n                    var dx = pixel[0] - finishPixel[0];\n                    var dy = pixel[1] - finishPixel[1];\n                    var snapTolerance = this.freehand_ ? 1 : this.snapTolerance_;\n                    at = Math.sqrt(dx * dx + dy * dy) <= snapTolerance;\n                    if (at) {\n                        this.finishCoordinate_ = finishCoordinate;\n                        break;\n                    }\n                }\n            }\n        }\n        return at;\n    };\n    /**\n     * @param {import(\"../coordinate\").Coordinate} coordinates Coordinate.\n     * @private\n     */\n    Draw.prototype.createOrUpdateSketchPoint_ = function (coordinates) {\n        if (!this.sketchPoint_) {\n            this.sketchPoint_ = new Feature(new Point(coordinates));\n            this.updateSketchFeatures_();\n        }\n        else {\n            var sketchPointGeom = this.sketchPoint_.getGeometry();\n            sketchPointGeom.setCoordinates(coordinates);\n        }\n    };\n    /**\n     * @param {import(\"../geom/Polygon.js\").default} geometry Polygon geometry.\n     * @private\n     */\n    Draw.prototype.createOrUpdateCustomSketchLine_ = function (geometry) {\n        if (!this.sketchLine_) {\n            this.sketchLine_ = new Feature();\n        }\n        var ring = geometry.getLinearRing(0);\n        var sketchLineGeom = this.sketchLine_.getGeometry();\n        if (!sketchLineGeom) {\n            sketchLineGeom = new LineString(ring.getFlatCoordinates(), ring.getLayout());\n            this.sketchLine_.setGeometry(sketchLineGeom);\n        }\n        else {\n            sketchLineGeom.setFlatCoordinates(ring.getLayout(), ring.getFlatCoordinates());\n            sketchLineGeom.changed();\n        }\n    };\n    /**\n     * Start the drawing.\n     * @param {import(\"../coordinate.js\").Coordinate} start Start coordinate.\n     * @private\n     */\n    Draw.prototype.startDrawing_ = function (start) {\n        var projection = this.getMap().getView().getProjection();\n        this.finishCoordinate_ = start;\n        if (this.mode_ === Mode.POINT) {\n            this.sketchCoords_ = start.slice();\n        }\n        else if (this.mode_ === Mode.POLYGON) {\n            this.sketchCoords_ = [[start.slice(), start.slice()]];\n            this.sketchLineCoords_ = this.sketchCoords_[0];\n        }\n        else {\n            this.sketchCoords_ = [start.slice(), start.slice()];\n        }\n        if (this.sketchLineCoords_) {\n            this.sketchLine_ = new Feature(new LineString(this.sketchLineCoords_));\n        }\n        var geometry = this.geometryFunction_(this.sketchCoords_, undefined, projection);\n        this.sketchFeature_ = new Feature();\n        if (this.geometryName_) {\n            this.sketchFeature_.setGeometryName(this.geometryName_);\n        }\n        this.sketchFeature_.setGeometry(geometry);\n        this.updateSketchFeatures_();\n        this.dispatchEvent(new DrawEvent(DrawEventType.DRAWSTART, this.sketchFeature_));\n    };\n    /**\n     * Modify the drawing.\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @private\n     */\n    Draw.prototype.modifyDrawing_ = function (coordinate) {\n        var map = this.getMap();\n        var geometry = this.sketchFeature_.getGeometry();\n        var projection = map.getView().getProjection();\n        var coordinates, last;\n        if (this.mode_ === Mode.POINT) {\n            last = this.sketchCoords_;\n        }\n        else if (this.mode_ === Mode.POLYGON) {\n            coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n            last = coordinates[coordinates.length - 1];\n            if (this.atFinish_(map.getPixelFromCoordinate(coordinate))) {\n                // snap to finish\n                coordinate = this.finishCoordinate_.slice();\n            }\n        }\n        else {\n            coordinates = this.sketchCoords_;\n            last = coordinates[coordinates.length - 1];\n        }\n        last[0] = coordinate[0];\n        last[1] = coordinate[1];\n        this.geometryFunction_(\n        /** @type {!LineCoordType} */ (this.sketchCoords_), geometry, projection);\n        if (this.sketchPoint_) {\n            var sketchPointGeom = this.sketchPoint_.getGeometry();\n            sketchPointGeom.setCoordinates(coordinate);\n        }\n        if (geometry.getType() === GeometryType.POLYGON &&\n            this.mode_ !== Mode.POLYGON) {\n            this.createOrUpdateCustomSketchLine_(/** @type {Polygon} */ (geometry));\n        }\n        else if (this.sketchLineCoords_) {\n            var sketchLineGeom = this.sketchLine_.getGeometry();\n            sketchLineGeom.setCoordinates(this.sketchLineCoords_);\n        }\n        this.updateSketchFeatures_();\n    };\n    /**\n     * Add a new coordinate to the drawing.\n     * @param {!PointCoordType} coordinate Coordinate\n     * @private\n     */\n    Draw.prototype.addToDrawing_ = function (coordinate) {\n        var geometry = this.sketchFeature_.getGeometry();\n        var projection = this.getMap().getView().getProjection();\n        var done;\n        var coordinates;\n        var mode = this.mode_;\n        if (mode === Mode.LINE_STRING || mode === Mode.CIRCLE) {\n            this.finishCoordinate_ = coordinate.slice();\n            coordinates = /** @type {LineCoordType} */ (this.sketchCoords_);\n            if (coordinates.length >= this.maxPoints_) {\n                if (this.freehand_) {\n                    coordinates.pop();\n                }\n                else {\n                    done = true;\n                }\n            }\n            coordinates.push(coordinate.slice());\n            this.geometryFunction_(coordinates, geometry, projection);\n        }\n        else if (mode === Mode.POLYGON) {\n            coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n            if (coordinates.length >= this.maxPoints_) {\n                if (this.freehand_) {\n                    coordinates.pop();\n                }\n                else {\n                    done = true;\n                }\n            }\n            coordinates.push(coordinate.slice());\n            if (done) {\n                this.finishCoordinate_ = coordinates[0];\n            }\n            this.geometryFunction_(this.sketchCoords_, geometry, projection);\n        }\n        this.createOrUpdateSketchPoint_(coordinate.slice());\n        this.updateSketchFeatures_();\n        if (done) {\n            this.finishDrawing();\n        }\n    };\n    /**\n     * Remove last point of the feature currently being drawn. Does not do anything when\n     * drawing POINT or MULTI_POINT geometries.\n     * @api\n     */\n    Draw.prototype.removeLastPoint = function () {\n        if (!this.sketchFeature_) {\n            return;\n        }\n        var geometry = this.sketchFeature_.getGeometry();\n        var projection = this.getMap().getView().getProjection();\n        var coordinates;\n        var mode = this.mode_;\n        if (mode === Mode.LINE_STRING || mode === Mode.CIRCLE) {\n            coordinates = /** @type {LineCoordType} */ (this.sketchCoords_);\n            coordinates.splice(-2, 1);\n            if (coordinates.length >= 2) {\n                this.finishCoordinate_ = coordinates[coordinates.length - 2].slice();\n                var finishCoordinate = this.finishCoordinate_.slice();\n                coordinates[coordinates.length - 1] = finishCoordinate;\n                this.createOrUpdateSketchPoint_(finishCoordinate);\n            }\n            this.geometryFunction_(coordinates, geometry, projection);\n            if (geometry.getType() === GeometryType.POLYGON && this.sketchLine_) {\n                this.createOrUpdateCustomSketchLine_(/** @type {Polygon} */ (geometry));\n            }\n        }\n        else if (mode === Mode.POLYGON) {\n            coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n            coordinates.splice(-2, 1);\n            var sketchLineGeom = this.sketchLine_.getGeometry();\n            if (coordinates.length >= 2) {\n                var finishCoordinate = coordinates[coordinates.length - 2].slice();\n                coordinates[coordinates.length - 1] = finishCoordinate;\n                this.createOrUpdateSketchPoint_(finishCoordinate);\n            }\n            sketchLineGeom.setCoordinates(coordinates);\n            this.geometryFunction_(this.sketchCoords_, geometry, projection);\n        }\n        if (coordinates.length === 1) {\n            this.abortDrawing();\n        }\n        this.updateSketchFeatures_();\n    };\n    /**\n     * Stop drawing and add the sketch feature to the target layer.\n     * The {@link module:ol/interaction/Draw~DrawEventType.DRAWEND} event is\n     * dispatched before inserting the feature.\n     * @api\n     */\n    Draw.prototype.finishDrawing = function () {\n        var sketchFeature = this.abortDrawing_();\n        if (!sketchFeature) {\n            return;\n        }\n        var coordinates = this.sketchCoords_;\n        var geometry = sketchFeature.getGeometry();\n        var projection = this.getMap().getView().getProjection();\n        if (this.mode_ === Mode.LINE_STRING) {\n            // remove the redundant last point\n            coordinates.pop();\n            this.geometryFunction_(coordinates, geometry, projection);\n        }\n        else if (this.mode_ === Mode.POLYGON) {\n            // remove the redundant last point in ring\n            /** @type {PolyCoordType} */ (coordinates)[0].pop();\n            this.geometryFunction_(coordinates, geometry, projection);\n            coordinates = geometry.getCoordinates();\n        }\n        // cast multi-part geometries\n        if (this.type_ === GeometryType.MULTI_POINT) {\n            sketchFeature.setGeometry(new MultiPoint([/** @type {PointCoordType} */ (coordinates)]));\n        }\n        else if (this.type_ === GeometryType.MULTI_LINE_STRING) {\n            sketchFeature.setGeometry(new MultiLineString([/** @type {LineCoordType} */ (coordinates)]));\n        }\n        else if (this.type_ === GeometryType.MULTI_POLYGON) {\n            sketchFeature.setGeometry(new MultiPolygon([/** @type {PolyCoordType} */ (coordinates)]));\n        }\n        // First dispatch event to allow full set up of feature\n        this.dispatchEvent(new DrawEvent(DrawEventType.DRAWEND, sketchFeature));\n        // Then insert feature\n        if (this.features_) {\n            this.features_.push(sketchFeature);\n        }\n        if (this.source_) {\n            this.source_.addFeature(sketchFeature);\n        }\n    };\n    /**\n     * Stop drawing without adding the sketch feature to the target layer.\n     * @return {Feature} The sketch feature (or null if none).\n     * @private\n     */\n    Draw.prototype.abortDrawing_ = function () {\n        this.finishCoordinate_ = null;\n        var sketchFeature = this.sketchFeature_;\n        this.sketchFeature_ = null;\n        this.sketchPoint_ = null;\n        this.sketchLine_ = null;\n        this.overlay_.getSource().clear(true);\n        return sketchFeature;\n    };\n    /**\n     * Stop drawing without adding the sketch feature to the target layer.\n     * @api\n     */\n    Draw.prototype.abortDrawing = function () {\n        var sketchFeature = this.abortDrawing_();\n        if (sketchFeature) {\n            this.dispatchEvent(new DrawEvent(DrawEventType.DRAWABORT, sketchFeature));\n        }\n    };\n    /**\n     * Append coordinates to the end of the geometry that is currently being drawn.\n     * This can be used when drawing LineStrings or Polygons. Coordinates will\n     * either be appended to the current LineString or the outer ring of the current\n     * Polygon. If no geometry is being drawn, a new one will be created.\n     * @param {!LineCoordType} coordinates Linear coordinates to be appended to\n     * the coordinate array.\n     * @api\n     */\n    Draw.prototype.appendCoordinates = function (coordinates) {\n        var mode = this.mode_;\n        var newDrawing = !this.sketchFeature_;\n        if (newDrawing) {\n            this.startDrawing_(coordinates[0]);\n        }\n        /** @type {LineCoordType} */\n        var sketchCoords;\n        if (mode === Mode.LINE_STRING || mode === Mode.CIRCLE) {\n            sketchCoords = /** @type {LineCoordType} */ (this.sketchCoords_);\n        }\n        else if (mode === Mode.POLYGON) {\n            sketchCoords =\n                this.sketchCoords_ && this.sketchCoords_.length\n                    ? /** @type {PolyCoordType} */ (this.sketchCoords_)[0]\n                    : [];\n        }\n        else {\n            return;\n        }\n        if (newDrawing) {\n            sketchCoords.shift();\n        }\n        // Remove last coordinate from sketch drawing (this coordinate follows cursor position)\n        sketchCoords.pop();\n        // Append coordinate list\n        for (var i = 0; i < coordinates.length; i++) {\n            this.addToDrawing_(coordinates[i]);\n        }\n        var ending = coordinates[coordinates.length - 1];\n        // Duplicate last coordinate for sketch drawing (cursor position)\n        this.addToDrawing_(ending);\n        this.modifyDrawing_(ending);\n    };\n    /**\n     * Initiate draw mode by starting from an existing geometry which will\n     * receive new additional points. This only works on features with\n     * `LineString` geometries, where the interaction will extend lines by adding\n     * points to the end of the coordinates array.\n     * This will change the original feature, instead of drawing a copy.\n     *\n     * The function will dispatch a `drawstart` event.\n     *\n     * @param {!Feature<LineString>} feature Feature to be extended.\n     * @api\n     */\n    Draw.prototype.extend = function (feature) {\n        var geometry = feature.getGeometry();\n        var lineString = geometry;\n        this.sketchFeature_ = feature;\n        this.sketchCoords_ = lineString.getCoordinates();\n        var last = this.sketchCoords_[this.sketchCoords_.length - 1];\n        this.finishCoordinate_ = last.slice();\n        this.sketchCoords_.push(last.slice());\n        this.sketchPoint_ = new Feature(new Point(last));\n        this.updateSketchFeatures_();\n        this.dispatchEvent(new DrawEvent(DrawEventType.DRAWSTART, this.sketchFeature_));\n    };\n    /**\n     * Redraw the sketch features.\n     * @private\n     */\n    Draw.prototype.updateSketchFeatures_ = function () {\n        var sketchFeatures = [];\n        if (this.sketchFeature_) {\n            sketchFeatures.push(this.sketchFeature_);\n        }\n        if (this.sketchLine_) {\n            sketchFeatures.push(this.sketchLine_);\n        }\n        if (this.sketchPoint_) {\n            sketchFeatures.push(this.sketchPoint_);\n        }\n        var overlaySource = this.overlay_.getSource();\n        overlaySource.clear(true);\n        overlaySource.addFeatures(sketchFeatures);\n    };\n    /**\n     * @private\n     */\n    Draw.prototype.updateState_ = function () {\n        var map = this.getMap();\n        var active = this.getActive();\n        if (!map || !active) {\n            this.abortDrawing();\n        }\n        this.overlay_.setMap(active ? map : null);\n    };\n    return Draw;\n}(PointerInteraction));\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n    var styles = createEditingStyle();\n    return function (feature, resolution) {\n        return styles[feature.getGeometry().getType()];\n    };\n}\n/**\n * Create a `geometryFunction` for `type: 'Circle'` that will create a regular\n * polygon with a user specified number of sides and start angle instead of a\n * `import(\"../geom/Circle.js\").Circle` geometry.\n * @param {number} [opt_sides] Number of sides of the regular polygon.\n *     Default is 32.\n * @param {number} [opt_angle] Angle of the first point in counter-clockwise\n *     radians. 0 means East.\n *     Default is the angle defined by the heading from the center of the\n *     regular polygon to the current pointer position.\n * @return {GeometryFunction} Function that draws a polygon.\n * @api\n */\nexport function createRegularPolygon(opt_sides, opt_angle) {\n    return function (coordinates, opt_geometry, projection) {\n        var center = fromUserCoordinate(\n        /** @type {LineCoordType} */ (coordinates)[0], projection);\n        var end = fromUserCoordinate(\n        /** @type {LineCoordType} */ (coordinates)[coordinates.length - 1], projection);\n        var radius = Math.sqrt(squaredCoordinateDistance(center, end));\n        var geometry = opt_geometry\n            ? /** @type {Polygon} */ (opt_geometry)\n            : fromCircle(new Circle(center), opt_sides);\n        var angle = opt_angle;\n        if (!opt_angle && opt_angle !== 0) {\n            var x = end[0] - center[0];\n            var y = end[1] - center[1];\n            angle = Math.atan2(y, x);\n        }\n        makeRegular(geometry, center, radius, angle);\n        var userProjection = getUserProjection();\n        if (userProjection) {\n            geometry.transform(projection, userProjection);\n        }\n        return geometry;\n    };\n}\n/**\n * Create a `geometryFunction` that will create a box-shaped polygon (aligned\n * with the coordinate system axes).  Use this with the draw interaction and\n * `type: 'Circle'` to return a box instead of a circle geometry.\n * @return {GeometryFunction} Function that draws a box-shaped polygon.\n * @api\n */\nexport function createBox() {\n    return function (coordinates, opt_geometry, projection) {\n        var extent = boundingExtent(\n        /** @type {LineCoordType} */ ([\n            coordinates[0],\n            coordinates[coordinates.length - 1],\n        ]).map(function (coordinate) {\n            return fromUserCoordinate(coordinate, projection);\n        }));\n        var boxCoordinates = [\n            [\n                getBottomLeft(extent),\n                getBottomRight(extent),\n                getTopRight(extent),\n                getTopLeft(extent),\n                getBottomLeft(extent),\n            ],\n        ];\n        var geometry = opt_geometry;\n        if (geometry) {\n            geometry.setCoordinates(boxCoordinates);\n        }\n        else {\n            geometry = new Polygon(boxCoordinates);\n        }\n        var userProjection = getUserProjection();\n        if (userProjection) {\n            geometry.transform(projection, userProjection);\n        }\n        return geometry;\n    };\n}\n/**\n * Get the drawing mode.  The mode for mult-part geometries is the same as for\n * their single-part cousins.\n * @param {import(\"../geom/GeometryType.js\").default} type Geometry type.\n * @return {Mode} Drawing mode.\n */\nfunction getMode(type) {\n    switch (type) {\n        case GeometryType.POINT:\n        case GeometryType.MULTI_POINT:\n            return Mode.POINT;\n        case GeometryType.LINE_STRING:\n        case GeometryType.MULTI_LINE_STRING:\n            return Mode.LINE_STRING;\n        case GeometryType.POLYGON:\n        case GeometryType.MULTI_POLYGON:\n            return Mode.POLYGON;\n        case GeometryType.CIRCLE:\n            return Mode.CIRCLE;\n        default:\n            throw new Error('Invalid type: ' + type);\n    }\n}\nexport default Draw;\n//# sourceMappingURL=Draw.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Modify\n */\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport Feature from '../Feature.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport Point from '../geom/Point.js';\nimport PointerInteraction from './Pointer.js';\nimport RBush from '../structs/RBush.js';\nimport VectorEventType from '../source/VectorEventType.js';\nimport VectorLayer from '../layer/Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport { altKeyOnly, always, primaryAction, singleClick, } from '../events/condition.js';\nimport { boundingExtent, buffer as bufferExtent, createOrUpdateFromCoordinate as createExtent, } from '../extent.js';\nimport { closestOnSegment, distance as coordinateDistance, equals as coordinatesEqual, squaredDistance as squaredCoordinateDistance, squaredDistanceToSegment, } from '../coordinate.js';\nimport { createEditingStyle } from '../style/Style.js';\nimport { equals, includes } from '../array.js';\nimport { fromCircle } from '../geom/Polygon.js';\nimport { fromUserCoordinate, fromUserExtent, getUserProjection, toUserCoordinate, toUserExtent, } from '../proj.js';\nimport { getUid } from '../util.js';\n/**\n * The segment index assigned to a circle's center when\n * breaking up a circle into ModifySegmentDataType segments.\n * @type {number}\n */\nvar CIRCLE_CENTER_INDEX = 0;\n/**\n * The segment index assigned to a circle's circumference when\n * breaking up a circle into ModifySegmentDataType segments.\n * @type {number}\n */\nvar CIRCLE_CIRCUMFERENCE_INDEX = 1;\nvar tempExtent = [0, 0, 0, 0];\nvar tempSegment = [];\n/**\n * @enum {string}\n */\nvar ModifyEventType = {\n    /**\n     * Triggered upon feature modification start\n     * @event ModifyEvent#modifystart\n     * @api\n     */\n    MODIFYSTART: 'modifystart',\n    /**\n     * Triggered upon feature modification end\n     * @event ModifyEvent#modifyend\n     * @api\n     */\n    MODIFYEND: 'modifyend',\n};\n/**\n * @typedef {Object} SegmentData\n * @property {Array<number>} [depth] Depth.\n * @property {import(\"../Feature\").FeatureLike} feature Feature.\n * @property {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @property {number} [index] Index.\n * @property {Array<Array<number>>} segment Segment.\n * @property {Array<SegmentData>} [featureSegments] FeatureSegments.\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event will be considered to add or move a\n * vertex to the sketch. Default is\n * {@link module:ol/events/condition.primaryAction}.\n * @property {import(\"../events/condition.js\").Condition} [deleteCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. By default,\n * {@link module:ol/events/condition.singleClick} with\n * {@link module:ol/events/condition.altKeyOnly} results in a vertex deletion.\n * @property {import(\"../events/condition.js\").Condition} [insertVertexCondition] A\n * function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and\n * returns a boolean to indicate whether a new vertex should be added to the sketch\n * features. Default is {@link module:ol/events/condition.always}.\n * @property {number} [pixelTolerance=10] Pixel tolerance for considering the\n * pointer close enough to a segment or vertex for editing.\n * @property {import(\"../style/Style.js\").StyleLike} [style]\n * Style used for the modification point or vertex. For linestrings and polygons, this will\n * be the affected vertex, for circles a point along the circle, and for points the actual\n * point. If not configured, the default edit style is used (see {@link module:ol/style}).\n * When using a style function, the point feature passed to the function will have a `features`\n * property - an array whose entries are the features that are being modified, and a `geometries`\n * property - an array whose entries are the geometries that are being modified. Both arrays are\n * in the same order. The `geometries` are only useful when modifying geometry collections, where\n * the geometry will be the particular geometry from the collection that is being modified.\n * @property {VectorSource} [source] The vector source with\n * features to modify.  If a vector source is not provided, a feature collection\n * must be provided with the `features` option.\n * @property {boolean|import(\"../layer/BaseVector\").default} [hitDetection] When configured, point\n * features will be considered for modification based on their visual appearance, instead of being within\n * the `pixelTolerance` from the pointer location. When a {@link module:ol/layer/BaseVector} is\n * provided, only the rendered representation of the features on that layer will be considered.\n * @property {Collection<Feature>} [features]\n * The features the interaction works on.  If a feature collection is not\n * provided, a vector source must be provided with the `source` option.\n * @property {boolean} [wrapX=false] Wrap the world horizontally on the sketch\n * overlay.\n * @property {boolean} [snapToPointer=!hitDetection] The vertex, point or segment being modified snaps to the\n * pointer coordinate when clicked within the `pixelTolerance`.\n */\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Modify~Modify} instances are\n * instances of this type.\n */\nvar ModifyEvent = /** @class */ (function (_super) {\n    __extends(ModifyEvent, _super);\n    /**\n     * @param {ModifyEventType} type Type.\n     * @param {Collection<import(\"../Feature\").FeatureLike>} features\n     * The features modified.\n     * @param {import(\"../MapBrowserEvent.js\").default} MapBrowserEvent\n     * Associated {@link module:ol/MapBrowserEvent}.\n     */\n    function ModifyEvent(type, features, MapBrowserEvent) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * The features being modified.\n         * @type {Collection<import(\"../Feature\").FeatureLike>}\n         * @api\n         */\n        _this.features = features;\n        /**\n         * Associated {@link module:ol/MapBrowserEvent}.\n         * @type {import(\"../MapBrowserEvent.js\").default}\n         * @api\n         */\n        _this.mapBrowserEvent = MapBrowserEvent;\n        return _this;\n    }\n    return ModifyEvent;\n}(Event));\nexport { ModifyEvent };\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types|\n *     'change:active', import(\"../Object\").ObjectEvent, Return> &\n *   import(\"../Observable\").OnSignature<'modifyend'|'modifystart', ModifyEvent, Return> &\n *   import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"../ObjectEventType\").Types|\n *     'change:active'|'modifyend'|'modifystart', Return>} ModifyOnSignature\n */\n/**\n * @classdesc\n * Interaction for modifying feature geometries.  To modify features that have\n * been added to an existing source, construct the modify interaction with the\n * `source` option.  If you want to modify features in a collection (for example,\n * the collection used by a select interaction), construct the interaction with\n * the `features` option.  The interaction must be constructed with either a\n * `source` or `features` option.\n *\n * Cartesian distance from the pointer is used to determine the features that\n * will be modified. This means that geometries will only be considered for\n * modification when they are within the configured `pixelTolerane`. For point\n * geometries, the `hitDetection` option can be used to match their visual\n * appearance.\n *\n * By default, the interaction will allow deletion of vertices when the `alt`\n * key is pressed.  To configure the interaction with a different condition\n * for deletion, use the `deleteCondition` option.\n * @fires ModifyEvent\n * @api\n */\nvar Modify = /** @class */ (function (_super) {\n    __extends(Modify, _super);\n    /**\n     * @param {Options} options Options.\n     */\n    function Modify(options) {\n        var _this = _super.call(this, /** @type {import(\"./Pointer.js\").Options} */ (options)) || this;\n        /***\n         * @type {ModifyOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {ModifyOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {ModifyOnSignature<void>}\n         */\n        _this.un;\n        /** @private */\n        _this.boundHandleFeatureChange_ = _this.handleFeatureChange_.bind(_this);\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : primaryAction;\n        /**\n         * @private\n         * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Browser event.\n         * @return {boolean} Combined condition result.\n         */\n        _this.defaultDeleteCondition_ = function (mapBrowserEvent) {\n            return altKeyOnly(mapBrowserEvent) && singleClick(mapBrowserEvent);\n        };\n        /**\n         * @type {import(\"../events/condition.js\").Condition}\n         * @private\n         */\n        _this.deleteCondition_ = options.deleteCondition\n            ? options.deleteCondition\n            : _this.defaultDeleteCondition_;\n        /**\n         * @type {import(\"../events/condition.js\").Condition}\n         * @private\n         */\n        _this.insertVertexCondition_ = options.insertVertexCondition\n            ? options.insertVertexCondition\n            : always;\n        /**\n         * Editing vertex.\n         * @type {Feature}\n         * @private\n         */\n        _this.vertexFeature_ = null;\n        /**\n         * Segments intersecting {@link this.vertexFeature_} by segment uid.\n         * @type {Object<string, boolean>}\n         * @private\n         */\n        _this.vertexSegments_ = null;\n        /**\n         * @type {import(\"../pixel.js\").Pixel}\n         * @private\n         */\n        _this.lastPixel_ = [0, 0];\n        /**\n         * Tracks if the next `singleclick` event should be ignored to prevent\n         * accidental deletion right after vertex creation.\n         * @type {boolean}\n         * @private\n         */\n        _this.ignoreNextSingleClick_ = false;\n        /**\n         * @type {Collection<import(\"../Feature\").FeatureLike>}\n         * @private\n         */\n        _this.featuresBeingModified_ = null;\n        /**\n         * Segment RTree for each layer\n         * @type {RBush<SegmentData>}\n         * @private\n         */\n        _this.rBush_ = new RBush();\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.pixelTolerance_ =\n            options.pixelTolerance !== undefined ? options.pixelTolerance : 10;\n        /**\n         * @type {boolean}\n         * @private\n         */\n        _this.snappedToVertex_ = false;\n        /**\n         * Indicate whether the interaction is currently changing a feature's\n         * coordinates.\n         * @type {boolean}\n         * @private\n         */\n        _this.changingFeature_ = false;\n        /**\n         * @type {Array}\n         * @private\n         */\n        _this.dragSegments_ = [];\n        /**\n         * Draw overlay where sketch features are drawn.\n         * @type {VectorLayer}\n         * @private\n         */\n        _this.overlay_ = new VectorLayer({\n            source: new VectorSource({\n                useSpatialIndex: false,\n                wrapX: !!options.wrapX,\n            }),\n            style: options.style ? options.style : getDefaultStyleFunction(),\n            updateWhileAnimating: true,\n            updateWhileInteracting: true,\n        });\n        /**\n         * @const\n         * @private\n         * @type {!Object<string, function(Feature, import(\"../geom/Geometry.js\").default): void>}\n         */\n        _this.SEGMENT_WRITERS_ = {\n            'Point': _this.writePointGeometry_.bind(_this),\n            'LineString': _this.writeLineStringGeometry_.bind(_this),\n            'LinearRing': _this.writeLineStringGeometry_.bind(_this),\n            'Polygon': _this.writePolygonGeometry_.bind(_this),\n            'MultiPoint': _this.writeMultiPointGeometry_.bind(_this),\n            'MultiLineString': _this.writeMultiLineStringGeometry_.bind(_this),\n            'MultiPolygon': _this.writeMultiPolygonGeometry_.bind(_this),\n            'Circle': _this.writeCircleGeometry_.bind(_this),\n            'GeometryCollection': _this.writeGeometryCollectionGeometry_.bind(_this),\n        };\n        /**\n         * @type {VectorSource}\n         * @private\n         */\n        _this.source_ = null;\n        /**\n         * @type {boolean|import(\"../layer/BaseVector\").default}\n         */\n        _this.hitDetection_ = null;\n        var features;\n        if (options.features) {\n            features = options.features;\n        }\n        else if (options.source) {\n            _this.source_ = options.source;\n            features = new Collection(_this.source_.getFeatures());\n            _this.source_.addEventListener(VectorEventType.ADDFEATURE, _this.handleSourceAdd_.bind(_this));\n            _this.source_.addEventListener(VectorEventType.REMOVEFEATURE, _this.handleSourceRemove_.bind(_this));\n        }\n        if (!features) {\n            throw new Error('The modify interaction requires features, a source or a layer');\n        }\n        if (options.hitDetection) {\n            _this.hitDetection_ = options.hitDetection;\n        }\n        /**\n         * @type {Collection<import(\"../Feature.js\").FeatureLike>}\n         * @private\n         */\n        _this.features_ = features;\n        _this.features_.forEach(_this.addFeature_.bind(_this));\n        _this.features_.addEventListener(CollectionEventType.ADD, _this.handleFeatureAdd_.bind(_this));\n        _this.features_.addEventListener(CollectionEventType.REMOVE, _this.handleFeatureRemove_.bind(_this));\n        /**\n         * @type {import(\"../MapBrowserEvent.js\").default}\n         * @private\n         */\n        _this.lastPointerEvent_ = null;\n        /**\n         * Delta (x, y in map units) between matched rtree vertex and pointer vertex.\n         * @type {Array<number>}\n         */\n        _this.delta_ = [0, 0];\n        /**\n         * @private\n         */\n        _this.snapToPointer_ =\n            options.snapToPointer === undefined\n                ? !_this.hitDetection_\n                : options.snapToPointer;\n        return _this;\n    }\n    /**\n     * @param {Feature} feature Feature.\n     * @private\n     */\n    Modify.prototype.addFeature_ = function (feature) {\n        var geometry = feature.getGeometry();\n        if (geometry) {\n            var writer = this.SEGMENT_WRITERS_[geometry.getType()];\n            if (writer) {\n                writer(feature, geometry);\n            }\n        }\n        var map = this.getMap();\n        if (map && map.isRendered() && this.getActive()) {\n            this.handlePointerAtPixel_(this.lastPixel_, map);\n        }\n        feature.addEventListener(EventType.CHANGE, this.boundHandleFeatureChange_);\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} evt Map browser event.\n     * @param {Array<Array<SegmentData>>} segments The segments subject to modification.\n     * @private\n     */\n    Modify.prototype.willModifyFeatures_ = function (evt, segments) {\n        if (!this.featuresBeingModified_) {\n            this.featuresBeingModified_ = new Collection();\n            var features = this.featuresBeingModified_.getArray();\n            for (var i = 0, ii = segments.length; i < ii; ++i) {\n                var segment = segments[i];\n                for (var s = 0, ss = segment.length; s < ss; ++s) {\n                    var feature = segment[s].feature;\n                    if (feature && features.indexOf(feature) === -1) {\n                        this.featuresBeingModified_.push(feature);\n                    }\n                }\n            }\n            if (this.featuresBeingModified_.getLength() === 0) {\n                this.featuresBeingModified_ = null;\n            }\n            else {\n                this.dispatchEvent(new ModifyEvent(ModifyEventType.MODIFYSTART, this.featuresBeingModified_, evt));\n            }\n        }\n    };\n    /**\n     * @param {Feature} feature Feature.\n     * @private\n     */\n    Modify.prototype.removeFeature_ = function (feature) {\n        this.removeFeatureSegmentData_(feature);\n        // Remove the vertex feature if the collection of canditate features is empty.\n        if (this.vertexFeature_ && this.features_.getLength() === 0) {\n            this.overlay_.getSource().removeFeature(this.vertexFeature_);\n            this.vertexFeature_ = null;\n        }\n        feature.removeEventListener(EventType.CHANGE, this.boundHandleFeatureChange_);\n    };\n    /**\n     * @param {Feature} feature Feature.\n     * @private\n     */\n    Modify.prototype.removeFeatureSegmentData_ = function (feature) {\n        var rBush = this.rBush_;\n        /** @type {Array<SegmentData>} */\n        var nodesToRemove = [];\n        rBush.forEach(\n        /**\n         * @param {SegmentData} node RTree node.\n         */\n        function (node) {\n            if (feature === node.feature) {\n                nodesToRemove.push(node);\n            }\n        });\n        for (var i = nodesToRemove.length - 1; i >= 0; --i) {\n            var nodeToRemove = nodesToRemove[i];\n            for (var j = this.dragSegments_.length - 1; j >= 0; --j) {\n                if (this.dragSegments_[j][0] === nodeToRemove) {\n                    this.dragSegments_.splice(j, 1);\n                }\n            }\n            rBush.remove(nodeToRemove);\n        }\n    };\n    /**\n     * Activate or deactivate the interaction.\n     * @param {boolean} active Active.\n     * @observable\n     * @api\n     */\n    Modify.prototype.setActive = function (active) {\n        if (this.vertexFeature_ && !active) {\n            this.overlay_.getSource().removeFeature(this.vertexFeature_);\n            this.vertexFeature_ = null;\n        }\n        _super.prototype.setActive.call(this, active);\n    };\n    /**\n     * Remove the interaction from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    Modify.prototype.setMap = function (map) {\n        this.overlay_.setMap(map);\n        _super.prototype.setMap.call(this, map);\n    };\n    /**\n     * Get the overlay layer that this interaction renders the modification point or vertex to.\n     * @return {VectorLayer} Overlay layer.\n     * @api\n     */\n    Modify.prototype.getOverlay = function () {\n        return this.overlay_;\n    };\n    /**\n     * @param {import(\"../source/Vector.js\").VectorSourceEvent} event Event.\n     * @private\n     */\n    Modify.prototype.handleSourceAdd_ = function (event) {\n        if (event.feature) {\n            this.features_.push(event.feature);\n        }\n    };\n    /**\n     * @param {import(\"../source/Vector.js\").VectorSourceEvent} event Event.\n     * @private\n     */\n    Modify.prototype.handleSourceRemove_ = function (event) {\n        if (event.feature) {\n            this.features_.remove(event.feature);\n        }\n    };\n    /**\n     * @param {import(\"../Collection.js\").CollectionEvent} evt Event.\n     * @private\n     */\n    Modify.prototype.handleFeatureAdd_ = function (evt) {\n        this.addFeature_(/** @type {Feature} */ (evt.element));\n    };\n    /**\n     * @param {import(\"../events/Event.js\").default} evt Event.\n     * @private\n     */\n    Modify.prototype.handleFeatureChange_ = function (evt) {\n        if (!this.changingFeature_) {\n            var feature = /** @type {Feature} */ (evt.target);\n            this.removeFeature_(feature);\n            this.addFeature_(feature);\n        }\n    };\n    /**\n     * @param {import(\"../Collection.js\").CollectionEvent} evt Event.\n     * @private\n     */\n    Modify.prototype.handleFeatureRemove_ = function (evt) {\n        var feature = /** @type {Feature} */ (evt.element);\n        this.removeFeature_(feature);\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {Point} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writePointGeometry_ = function (feature, geometry) {\n        var coordinates = geometry.getCoordinates();\n        /** @type {SegmentData} */\n        var segmentData = {\n            feature: feature,\n            geometry: geometry,\n            segment: [coordinates, coordinates],\n        };\n        this.rBush_.insert(geometry.getExtent(), segmentData);\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {import(\"../geom/MultiPoint.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writeMultiPointGeometry_ = function (feature, geometry) {\n        var points = geometry.getCoordinates();\n        for (var i = 0, ii = points.length; i < ii; ++i) {\n            var coordinates = points[i];\n            /** @type {SegmentData} */\n            var segmentData = {\n                feature: feature,\n                geometry: geometry,\n                depth: [i],\n                index: i,\n                segment: [coordinates, coordinates],\n            };\n            this.rBush_.insert(geometry.getExtent(), segmentData);\n        }\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {import(\"../geom/LineString.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writeLineStringGeometry_ = function (feature, geometry) {\n        var coordinates = geometry.getCoordinates();\n        for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n            var segment = coordinates.slice(i, i + 2);\n            /** @type {SegmentData} */\n            var segmentData = {\n                feature: feature,\n                geometry: geometry,\n                index: i,\n                segment: segment,\n            };\n            this.rBush_.insert(boundingExtent(segment), segmentData);\n        }\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {import(\"../geom/MultiLineString.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writeMultiLineStringGeometry_ = function (feature, geometry) {\n        var lines = geometry.getCoordinates();\n        for (var j = 0, jj = lines.length; j < jj; ++j) {\n            var coordinates = lines[j];\n            for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n                var segment = coordinates.slice(i, i + 2);\n                /** @type {SegmentData} */\n                var segmentData = {\n                    feature: feature,\n                    geometry: geometry,\n                    depth: [j],\n                    index: i,\n                    segment: segment,\n                };\n                this.rBush_.insert(boundingExtent(segment), segmentData);\n            }\n        }\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {import(\"../geom/Polygon.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writePolygonGeometry_ = function (feature, geometry) {\n        var rings = geometry.getCoordinates();\n        for (var j = 0, jj = rings.length; j < jj; ++j) {\n            var coordinates = rings[j];\n            for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n                var segment = coordinates.slice(i, i + 2);\n                /** @type {SegmentData} */\n                var segmentData = {\n                    feature: feature,\n                    geometry: geometry,\n                    depth: [j],\n                    index: i,\n                    segment: segment,\n                };\n                this.rBush_.insert(boundingExtent(segment), segmentData);\n            }\n        }\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writeMultiPolygonGeometry_ = function (feature, geometry) {\n        var polygons = geometry.getCoordinates();\n        for (var k = 0, kk = polygons.length; k < kk; ++k) {\n            var rings = polygons[k];\n            for (var j = 0, jj = rings.length; j < jj; ++j) {\n                var coordinates = rings[j];\n                for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n                    var segment = coordinates.slice(i, i + 2);\n                    /** @type {SegmentData} */\n                    var segmentData = {\n                        feature: feature,\n                        geometry: geometry,\n                        depth: [j, k],\n                        index: i,\n                        segment: segment,\n                    };\n                    this.rBush_.insert(boundingExtent(segment), segmentData);\n                }\n            }\n        }\n    };\n    /**\n     * We convert a circle into two segments.  The segment at index\n     * {@link CIRCLE_CENTER_INDEX} is the\n     * circle's center (a point).  The segment at index\n     * {@link CIRCLE_CIRCUMFERENCE_INDEX} is\n     * the circumference, and is not a line segment.\n     *\n     * @param {Feature} feature Feature.\n     * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writeCircleGeometry_ = function (feature, geometry) {\n        var coordinates = geometry.getCenter();\n        /** @type {SegmentData} */\n        var centerSegmentData = {\n            feature: feature,\n            geometry: geometry,\n            index: CIRCLE_CENTER_INDEX,\n            segment: [coordinates, coordinates],\n        };\n        /** @type {SegmentData} */\n        var circumferenceSegmentData = {\n            feature: feature,\n            geometry: geometry,\n            index: CIRCLE_CIRCUMFERENCE_INDEX,\n            segment: [coordinates, coordinates],\n        };\n        var featureSegments = [centerSegmentData, circumferenceSegmentData];\n        centerSegmentData.featureSegments = featureSegments;\n        circumferenceSegmentData.featureSegments = featureSegments;\n        this.rBush_.insert(createExtent(coordinates), centerSegmentData);\n        var circleGeometry = /** @type {import(\"../geom/Geometry.js\").default} */ (geometry);\n        var userProjection = getUserProjection();\n        if (userProjection && this.getMap()) {\n            var projection = this.getMap().getView().getProjection();\n            circleGeometry = circleGeometry\n                .clone()\n                .transform(userProjection, projection);\n            circleGeometry = fromCircle(\n            /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry)).transform(projection, userProjection);\n        }\n        this.rBush_.insert(circleGeometry.getExtent(), circumferenceSegmentData);\n    };\n    /**\n     * @param {Feature} feature Feature\n     * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n     * @private\n     */\n    Modify.prototype.writeGeometryCollectionGeometry_ = function (feature, geometry) {\n        var geometries = geometry.getGeometriesArray();\n        for (var i = 0; i < geometries.length; ++i) {\n            var geometry_1 = geometries[i];\n            var writer = this.SEGMENT_WRITERS_[geometry_1.getType()];\n            writer(feature, geometry_1);\n        }\n    };\n    /**\n     * @param {import(\"../coordinate.js\").Coordinate} coordinates Coordinates.\n     * @param {Array<import(\"../Feature\").FeatureLike>} features The features being modified.\n     * @param {Array<import(\"../geom/SimpleGeometry.js\").default>} geometries The geometries being modified.\n     * @return {Feature} Vertex feature.\n     * @private\n     */\n    Modify.prototype.createOrUpdateVertexFeature_ = function (coordinates, features, geometries) {\n        var vertexFeature = this.vertexFeature_;\n        if (!vertexFeature) {\n            vertexFeature = new Feature(new Point(coordinates));\n            this.vertexFeature_ = vertexFeature;\n            this.overlay_.getSource().addFeature(vertexFeature);\n        }\n        else {\n            var geometry = vertexFeature.getGeometry();\n            geometry.setCoordinates(coordinates);\n        }\n        vertexFeature.set('features', features);\n        vertexFeature.set('geometries', geometries);\n        return vertexFeature;\n    };\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} and may modify the geometry.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     */\n    Modify.prototype.handleEvent = function (mapBrowserEvent) {\n        if (!mapBrowserEvent.originalEvent) {\n            return true;\n        }\n        this.lastPointerEvent_ = mapBrowserEvent;\n        var handled;\n        if (!mapBrowserEvent.map.getView().getInteracting() &&\n            mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE &&\n            !this.handlingDownUpSequence) {\n            this.handlePointerMove_(mapBrowserEvent);\n        }\n        if (this.vertexFeature_ && this.deleteCondition_(mapBrowserEvent)) {\n            if (mapBrowserEvent.type != MapBrowserEventType.SINGLECLICK ||\n                !this.ignoreNextSingleClick_) {\n                handled = this.removePoint();\n            }\n            else {\n                handled = true;\n            }\n        }\n        if (mapBrowserEvent.type == MapBrowserEventType.SINGLECLICK) {\n            this.ignoreNextSingleClick_ = false;\n        }\n        return _super.prototype.handleEvent.call(this, mapBrowserEvent) && !handled;\n    };\n    /**\n     * Handle pointer drag events.\n     * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n     */\n    Modify.prototype.handleDragEvent = function (evt) {\n        this.ignoreNextSingleClick_ = false;\n        this.willModifyFeatures_(evt, this.dragSegments_);\n        var vertex = [\n            evt.coordinate[0] + this.delta_[0],\n            evt.coordinate[1] + this.delta_[1],\n        ];\n        var features = [];\n        var geometries = [];\n        for (var i = 0, ii = this.dragSegments_.length; i < ii; ++i) {\n            var dragSegment = this.dragSegments_[i];\n            var segmentData = dragSegment[0];\n            var feature = segmentData.feature;\n            if (features.indexOf(feature) === -1) {\n                features.push(feature);\n            }\n            var geometry = segmentData.geometry;\n            if (geometries.indexOf(geometry) === -1) {\n                geometries.push(geometry);\n            }\n            var depth = segmentData.depth;\n            var coordinates = void 0;\n            var segment = segmentData.segment;\n            var index = dragSegment[1];\n            while (vertex.length < geometry.getStride()) {\n                vertex.push(segment[index][vertex.length]);\n            }\n            switch (geometry.getType()) {\n                case GeometryType.POINT:\n                    coordinates = vertex;\n                    segment[0] = vertex;\n                    segment[1] = vertex;\n                    break;\n                case GeometryType.MULTI_POINT:\n                    coordinates = geometry.getCoordinates();\n                    coordinates[segmentData.index] = vertex;\n                    segment[0] = vertex;\n                    segment[1] = vertex;\n                    break;\n                case GeometryType.LINE_STRING:\n                    coordinates = geometry.getCoordinates();\n                    coordinates[segmentData.index + index] = vertex;\n                    segment[index] = vertex;\n                    break;\n                case GeometryType.MULTI_LINE_STRING:\n                    coordinates = geometry.getCoordinates();\n                    coordinates[depth[0]][segmentData.index + index] = vertex;\n                    segment[index] = vertex;\n                    break;\n                case GeometryType.POLYGON:\n                    coordinates = geometry.getCoordinates();\n                    coordinates[depth[0]][segmentData.index + index] = vertex;\n                    segment[index] = vertex;\n                    break;\n                case GeometryType.MULTI_POLYGON:\n                    coordinates = geometry.getCoordinates();\n                    coordinates[depth[1]][depth[0]][segmentData.index + index] = vertex;\n                    segment[index] = vertex;\n                    break;\n                case GeometryType.CIRCLE:\n                    segment[0] = vertex;\n                    segment[1] = vertex;\n                    if (segmentData.index === CIRCLE_CENTER_INDEX) {\n                        this.changingFeature_ = true;\n                        geometry.setCenter(vertex);\n                        this.changingFeature_ = false;\n                    }\n                    else {\n                        // We're dragging the circle's circumference:\n                        this.changingFeature_ = true;\n                        var projection = evt.map.getView().getProjection();\n                        var radius = coordinateDistance(fromUserCoordinate(geometry.getCenter(), projection), fromUserCoordinate(vertex, projection));\n                        var userProjection = getUserProjection();\n                        if (userProjection) {\n                            var circleGeometry = geometry\n                                .clone()\n                                .transform(userProjection, projection);\n                            circleGeometry.setRadius(radius);\n                            radius = circleGeometry\n                                .transform(projection, userProjection)\n                                .getRadius();\n                        }\n                        geometry.setRadius(radius);\n                        this.changingFeature_ = false;\n                    }\n                    break;\n                default:\n                // pass\n            }\n            if (coordinates) {\n                this.setGeometryCoordinates_(geometry, coordinates);\n            }\n        }\n        this.createOrUpdateVertexFeature_(vertex, features, geometries);\n    };\n    /**\n     * Handle pointer down events.\n     * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Modify.prototype.handleDownEvent = function (evt) {\n        if (!this.condition_(evt)) {\n            return false;\n        }\n        var pixelCoordinate = evt.coordinate;\n        this.handlePointerAtPixel_(evt.pixel, evt.map, pixelCoordinate);\n        this.dragSegments_.length = 0;\n        this.featuresBeingModified_ = null;\n        var vertexFeature = this.vertexFeature_;\n        if (vertexFeature) {\n            var projection = evt.map.getView().getProjection();\n            var insertVertices = [];\n            var vertex = vertexFeature.getGeometry().getCoordinates();\n            var vertexExtent = boundingExtent([vertex]);\n            var segmentDataMatches = this.rBush_.getInExtent(vertexExtent);\n            var componentSegments = {};\n            segmentDataMatches.sort(compareIndexes);\n            for (var i = 0, ii = segmentDataMatches.length; i < ii; ++i) {\n                var segmentDataMatch = segmentDataMatches[i];\n                var segment = segmentDataMatch.segment;\n                var uid = getUid(segmentDataMatch.geometry);\n                var depth = segmentDataMatch.depth;\n                if (depth) {\n                    uid += '-' + depth.join('-'); // separate feature components\n                }\n                if (!componentSegments[uid]) {\n                    componentSegments[uid] = new Array(2);\n                }\n                if (segmentDataMatch.geometry.getType() === GeometryType.CIRCLE &&\n                    segmentDataMatch.index === CIRCLE_CIRCUMFERENCE_INDEX) {\n                    var closestVertex = closestOnSegmentData(pixelCoordinate, segmentDataMatch, projection);\n                    if (coordinatesEqual(closestVertex, vertex) &&\n                        !componentSegments[uid][0]) {\n                        this.dragSegments_.push([segmentDataMatch, 0]);\n                        componentSegments[uid][0] = segmentDataMatch;\n                    }\n                    continue;\n                }\n                if (coordinatesEqual(segment[0], vertex) &&\n                    !componentSegments[uid][0]) {\n                    this.dragSegments_.push([segmentDataMatch, 0]);\n                    componentSegments[uid][0] = segmentDataMatch;\n                    continue;\n                }\n                if (coordinatesEqual(segment[1], vertex) &&\n                    !componentSegments[uid][1]) {\n                    // prevent dragging closed linestrings by the connecting node\n                    if ((segmentDataMatch.geometry.getType() === GeometryType.LINE_STRING ||\n                        segmentDataMatch.geometry.getType() ===\n                            GeometryType.MULTI_LINE_STRING) &&\n                        componentSegments[uid][0] &&\n                        componentSegments[uid][0].index === 0) {\n                        continue;\n                    }\n                    this.dragSegments_.push([segmentDataMatch, 1]);\n                    componentSegments[uid][1] = segmentDataMatch;\n                    continue;\n                }\n                if (getUid(segment) in this.vertexSegments_ &&\n                    !componentSegments[uid][0] &&\n                    !componentSegments[uid][1] &&\n                    this.insertVertexCondition_(evt)) {\n                    insertVertices.push(segmentDataMatch);\n                }\n            }\n            if (insertVertices.length) {\n                this.willModifyFeatures_(evt, [insertVertices]);\n            }\n            for (var j = insertVertices.length - 1; j >= 0; --j) {\n                this.insertVertex_(insertVertices[j], vertex);\n            }\n        }\n        return !!this.vertexFeature_;\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Modify.prototype.handleUpEvent = function (evt) {\n        for (var i = this.dragSegments_.length - 1; i >= 0; --i) {\n            var segmentData = this.dragSegments_[i][0];\n            var geometry = segmentData.geometry;\n            if (geometry.getType() === GeometryType.CIRCLE) {\n                // Update a circle object in the R* bush:\n                var coordinates = geometry.getCenter();\n                var centerSegmentData = segmentData.featureSegments[0];\n                var circumferenceSegmentData = segmentData.featureSegments[1];\n                centerSegmentData.segment[0] = coordinates;\n                centerSegmentData.segment[1] = coordinates;\n                circumferenceSegmentData.segment[0] = coordinates;\n                circumferenceSegmentData.segment[1] = coordinates;\n                this.rBush_.update(createExtent(coordinates), centerSegmentData);\n                var circleGeometry = geometry;\n                var userProjection = getUserProjection();\n                if (userProjection) {\n                    var projection = evt.map.getView().getProjection();\n                    circleGeometry = circleGeometry\n                        .clone()\n                        .transform(userProjection, projection);\n                    circleGeometry = fromCircle(circleGeometry).transform(projection, userProjection);\n                }\n                this.rBush_.update(circleGeometry.getExtent(), circumferenceSegmentData);\n            }\n            else {\n                this.rBush_.update(boundingExtent(segmentData.segment), segmentData);\n            }\n        }\n        if (this.featuresBeingModified_) {\n            this.dispatchEvent(new ModifyEvent(ModifyEventType.MODIFYEND, this.featuresBeingModified_, evt));\n            this.featuresBeingModified_ = null;\n        }\n        return false;\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n     * @private\n     */\n    Modify.prototype.handlePointerMove_ = function (evt) {\n        this.lastPixel_ = evt.pixel;\n        this.handlePointerAtPixel_(evt.pixel, evt.map, evt.coordinate);\n    };\n    /**\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @param {import(\"../coordinate.js\").Coordinate} [opt_coordinate] The pixel Coordinate.\n     * @private\n     */\n    Modify.prototype.handlePointerAtPixel_ = function (pixel, map, opt_coordinate) {\n        var _this = this;\n        var pixelCoordinate = opt_coordinate || map.getCoordinateFromPixel(pixel);\n        var projection = map.getView().getProjection();\n        var sortByDistance = function (a, b) {\n            return (projectedDistanceToSegmentDataSquared(pixelCoordinate, a, projection) -\n                projectedDistanceToSegmentDataSquared(pixelCoordinate, b, projection));\n        };\n        /** @type {Array<SegmentData>|undefined} */\n        var nodes;\n        var hitPointGeometry;\n        if (this.hitDetection_) {\n            var layerFilter = typeof this.hitDetection_ === 'object'\n                ? function (layer) { return layer === _this.hitDetection_; }\n                : undefined;\n            map.forEachFeatureAtPixel(pixel, function (feature, layer, geometry) {\n                geometry = geometry || feature.getGeometry();\n                if (geometry.getType() === GeometryType.POINT &&\n                    includes(_this.features_.getArray(), feature)) {\n                    hitPointGeometry = geometry;\n                    var coordinate = geometry.getFlatCoordinates().slice(0, 2);\n                    nodes = [\n                        {\n                            feature: feature,\n                            geometry: geometry,\n                            segment: [coordinate, coordinate],\n                        },\n                    ];\n                }\n                return true;\n            }, { layerFilter: layerFilter });\n        }\n        if (!nodes) {\n            var viewExtent = fromUserExtent(createExtent(pixelCoordinate, tempExtent), projection);\n            var buffer = map.getView().getResolution() * this.pixelTolerance_;\n            var box = toUserExtent(bufferExtent(viewExtent, buffer, tempExtent), projection);\n            nodes = this.rBush_.getInExtent(box);\n        }\n        if (nodes && nodes.length > 0) {\n            var node = nodes.sort(sortByDistance)[0];\n            var closestSegment = node.segment;\n            var vertex = closestOnSegmentData(pixelCoordinate, node, projection);\n            var vertexPixel = map.getPixelFromCoordinate(vertex);\n            var dist = coordinateDistance(pixel, vertexPixel);\n            if (hitPointGeometry || dist <= this.pixelTolerance_) {\n                /** @type {Object<string, boolean>} */\n                var vertexSegments = {};\n                vertexSegments[getUid(closestSegment)] = true;\n                if (!this.snapToPointer_) {\n                    this.delta_[0] = vertex[0] - pixelCoordinate[0];\n                    this.delta_[1] = vertex[1] - pixelCoordinate[1];\n                }\n                if (node.geometry.getType() === GeometryType.CIRCLE &&\n                    node.index === CIRCLE_CIRCUMFERENCE_INDEX) {\n                    this.snappedToVertex_ = true;\n                    this.createOrUpdateVertexFeature_(vertex, [node.feature], [node.geometry]);\n                }\n                else {\n                    var pixel1 = map.getPixelFromCoordinate(closestSegment[0]);\n                    var pixel2 = map.getPixelFromCoordinate(closestSegment[1]);\n                    var squaredDist1 = squaredCoordinateDistance(vertexPixel, pixel1);\n                    var squaredDist2 = squaredCoordinateDistance(vertexPixel, pixel2);\n                    dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n                    this.snappedToVertex_ = dist <= this.pixelTolerance_;\n                    if (this.snappedToVertex_) {\n                        vertex =\n                            squaredDist1 > squaredDist2\n                                ? closestSegment[1]\n                                : closestSegment[0];\n                    }\n                    this.createOrUpdateVertexFeature_(vertex, [node.feature], [node.geometry]);\n                    var geometries = {};\n                    geometries[getUid(node.geometry)] = true;\n                    for (var i = 1, ii = nodes.length; i < ii; ++i) {\n                        var segment = nodes[i].segment;\n                        if ((coordinatesEqual(closestSegment[0], segment[0]) &&\n                            coordinatesEqual(closestSegment[1], segment[1])) ||\n                            (coordinatesEqual(closestSegment[0], segment[1]) &&\n                                coordinatesEqual(closestSegment[1], segment[0]))) {\n                            var geometryUid = getUid(nodes[i].geometry);\n                            if (!(geometryUid in geometries)) {\n                                geometries[geometryUid] = true;\n                                vertexSegments[getUid(segment)] = true;\n                            }\n                        }\n                        else {\n                            break;\n                        }\n                    }\n                }\n                this.vertexSegments_ = vertexSegments;\n                return;\n            }\n        }\n        if (this.vertexFeature_) {\n            this.overlay_.getSource().removeFeature(this.vertexFeature_);\n            this.vertexFeature_ = null;\n        }\n    };\n    /**\n     * @param {SegmentData} segmentData Segment data.\n     * @param {import(\"../coordinate.js\").Coordinate} vertex Vertex.\n     * @private\n     */\n    Modify.prototype.insertVertex_ = function (segmentData, vertex) {\n        var segment = segmentData.segment;\n        var feature = segmentData.feature;\n        var geometry = segmentData.geometry;\n        var depth = segmentData.depth;\n        var index = segmentData.index;\n        var coordinates;\n        while (vertex.length < geometry.getStride()) {\n            vertex.push(0);\n        }\n        switch (geometry.getType()) {\n            case GeometryType.MULTI_LINE_STRING:\n                coordinates = geometry.getCoordinates();\n                coordinates[depth[0]].splice(index + 1, 0, vertex);\n                break;\n            case GeometryType.POLYGON:\n                coordinates = geometry.getCoordinates();\n                coordinates[depth[0]].splice(index + 1, 0, vertex);\n                break;\n            case GeometryType.MULTI_POLYGON:\n                coordinates = geometry.getCoordinates();\n                coordinates[depth[1]][depth[0]].splice(index + 1, 0, vertex);\n                break;\n            case GeometryType.LINE_STRING:\n                coordinates = geometry.getCoordinates();\n                coordinates.splice(index + 1, 0, vertex);\n                break;\n            default:\n                return;\n        }\n        this.setGeometryCoordinates_(geometry, coordinates);\n        var rTree = this.rBush_;\n        rTree.remove(segmentData);\n        this.updateSegmentIndices_(geometry, index, depth, 1);\n        /** @type {SegmentData} */\n        var newSegmentData = {\n            segment: [segment[0], vertex],\n            feature: feature,\n            geometry: geometry,\n            depth: depth,\n            index: index,\n        };\n        rTree.insert(boundingExtent(newSegmentData.segment), newSegmentData);\n        this.dragSegments_.push([newSegmentData, 1]);\n        /** @type {SegmentData} */\n        var newSegmentData2 = {\n            segment: [vertex, segment[1]],\n            feature: feature,\n            geometry: geometry,\n            depth: depth,\n            index: index + 1,\n        };\n        rTree.insert(boundingExtent(newSegmentData2.segment), newSegmentData2);\n        this.dragSegments_.push([newSegmentData2, 0]);\n        this.ignoreNextSingleClick_ = true;\n    };\n    /**\n     * Removes the vertex currently being pointed.\n     * @return {boolean} True when a vertex was removed.\n     * @api\n     */\n    Modify.prototype.removePoint = function () {\n        if (this.lastPointerEvent_ &&\n            this.lastPointerEvent_.type != MapBrowserEventType.POINTERDRAG) {\n            var evt = this.lastPointerEvent_;\n            this.willModifyFeatures_(evt, this.dragSegments_);\n            var removed = this.removeVertex_();\n            this.dispatchEvent(new ModifyEvent(ModifyEventType.MODIFYEND, this.featuresBeingModified_, evt));\n            this.featuresBeingModified_ = null;\n            return removed;\n        }\n        return false;\n    };\n    /**\n     * Removes a vertex from all matching features.\n     * @return {boolean} True when a vertex was removed.\n     * @private\n     */\n    Modify.prototype.removeVertex_ = function () {\n        var dragSegments = this.dragSegments_;\n        var segmentsByFeature = {};\n        var deleted = false;\n        var component, coordinates, dragSegment, geometry, i, index, left;\n        var newIndex, right, segmentData, uid;\n        for (i = dragSegments.length - 1; i >= 0; --i) {\n            dragSegment = dragSegments[i];\n            segmentData = dragSegment[0];\n            uid = getUid(segmentData.feature);\n            if (segmentData.depth) {\n                // separate feature components\n                uid += '-' + segmentData.depth.join('-');\n            }\n            if (!(uid in segmentsByFeature)) {\n                segmentsByFeature[uid] = {};\n            }\n            if (dragSegment[1] === 0) {\n                segmentsByFeature[uid].right = segmentData;\n                segmentsByFeature[uid].index = segmentData.index;\n            }\n            else if (dragSegment[1] == 1) {\n                segmentsByFeature[uid].left = segmentData;\n                segmentsByFeature[uid].index = segmentData.index + 1;\n            }\n        }\n        for (uid in segmentsByFeature) {\n            right = segmentsByFeature[uid].right;\n            left = segmentsByFeature[uid].left;\n            index = segmentsByFeature[uid].index;\n            newIndex = index - 1;\n            if (left !== undefined) {\n                segmentData = left;\n            }\n            else {\n                segmentData = right;\n            }\n            if (newIndex < 0) {\n                newIndex = 0;\n            }\n            geometry = segmentData.geometry;\n            coordinates = geometry.getCoordinates();\n            component = coordinates;\n            deleted = false;\n            switch (geometry.getType()) {\n                case GeometryType.MULTI_LINE_STRING:\n                    if (coordinates[segmentData.depth[0]].length > 2) {\n                        coordinates[segmentData.depth[0]].splice(index, 1);\n                        deleted = true;\n                    }\n                    break;\n                case GeometryType.LINE_STRING:\n                    if (coordinates.length > 2) {\n                        coordinates.splice(index, 1);\n                        deleted = true;\n                    }\n                    break;\n                case GeometryType.MULTI_POLYGON:\n                    component = component[segmentData.depth[1]];\n                /* falls through */\n                case GeometryType.POLYGON:\n                    component = component[segmentData.depth[0]];\n                    if (component.length > 4) {\n                        if (index == component.length - 1) {\n                            index = 0;\n                        }\n                        component.splice(index, 1);\n                        deleted = true;\n                        if (index === 0) {\n                            // close the ring again\n                            component.pop();\n                            component.push(component[0]);\n                            newIndex = component.length - 1;\n                        }\n                    }\n                    break;\n                default:\n                // pass\n            }\n            if (deleted) {\n                this.setGeometryCoordinates_(geometry, coordinates);\n                var segments = [];\n                if (left !== undefined) {\n                    this.rBush_.remove(left);\n                    segments.push(left.segment[0]);\n                }\n                if (right !== undefined) {\n                    this.rBush_.remove(right);\n                    segments.push(right.segment[1]);\n                }\n                if (left !== undefined && right !== undefined) {\n                    /** @type {SegmentData} */\n                    var newSegmentData = {\n                        depth: segmentData.depth,\n                        feature: segmentData.feature,\n                        geometry: segmentData.geometry,\n                        index: newIndex,\n                        segment: segments,\n                    };\n                    this.rBush_.insert(boundingExtent(newSegmentData.segment), newSegmentData);\n                }\n                this.updateSegmentIndices_(geometry, index, segmentData.depth, -1);\n                if (this.vertexFeature_) {\n                    this.overlay_.getSource().removeFeature(this.vertexFeature_);\n                    this.vertexFeature_ = null;\n                }\n                dragSegments.length = 0;\n            }\n        }\n        return deleted;\n    };\n    /**\n     * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n     * @param {Array} coordinates Coordinates.\n     * @private\n     */\n    Modify.prototype.setGeometryCoordinates_ = function (geometry, coordinates) {\n        this.changingFeature_ = true;\n        geometry.setCoordinates(coordinates);\n        this.changingFeature_ = false;\n    };\n    /**\n     * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n     * @param {number} index Index.\n     * @param {Array<number>|undefined} depth Depth.\n     * @param {number} delta Delta (1 or -1).\n     * @private\n     */\n    Modify.prototype.updateSegmentIndices_ = function (geometry, index, depth, delta) {\n        this.rBush_.forEachInExtent(geometry.getExtent(), function (segmentDataMatch) {\n            if (segmentDataMatch.geometry === geometry &&\n                (depth === undefined ||\n                    segmentDataMatch.depth === undefined ||\n                    equals(segmentDataMatch.depth, depth)) &&\n                segmentDataMatch.index > index) {\n                segmentDataMatch.index += delta;\n            }\n        });\n    };\n    return Modify;\n}(PointerInteraction));\n/**\n * @param {SegmentData} a The first segment data.\n * @param {SegmentData} b The second segment data.\n * @return {number} The difference in indexes.\n */\nfunction compareIndexes(a, b) {\n    return a.index - b.index;\n}\n/**\n * Returns the distance from a point to a line segment.\n *\n * @param {import(\"../coordinate.js\").Coordinate} pointCoordinates The coordinates of the point from\n *        which to calculate the distance.\n * @param {SegmentData} segmentData The object describing the line\n *        segment we are calculating the distance to.\n * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n * @return {number} The square of the distance between a point and a line segment.\n */\nfunction projectedDistanceToSegmentDataSquared(pointCoordinates, segmentData, projection) {\n    var geometry = segmentData.geometry;\n    if (geometry.getType() === GeometryType.CIRCLE) {\n        var circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (geometry);\n        if (segmentData.index === CIRCLE_CIRCUMFERENCE_INDEX) {\n            var userProjection = getUserProjection();\n            if (userProjection) {\n                circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry.clone().transform(userProjection, projection));\n            }\n            var distanceToCenterSquared = squaredCoordinateDistance(circleGeometry.getCenter(), fromUserCoordinate(pointCoordinates, projection));\n            var distanceToCircumference = Math.sqrt(distanceToCenterSquared) - circleGeometry.getRadius();\n            return distanceToCircumference * distanceToCircumference;\n        }\n    }\n    var coordinate = fromUserCoordinate(pointCoordinates, projection);\n    tempSegment[0] = fromUserCoordinate(segmentData.segment[0], projection);\n    tempSegment[1] = fromUserCoordinate(segmentData.segment[1], projection);\n    return squaredDistanceToSegment(coordinate, tempSegment);\n}\n/**\n * Returns the point closest to a given line segment.\n *\n * @param {import(\"../coordinate.js\").Coordinate} pointCoordinates The point to which a closest point\n *        should be found.\n * @param {SegmentData} segmentData The object describing the line\n *        segment which should contain the closest point.\n * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n * @return {import(\"../coordinate.js\").Coordinate} The point closest to the specified line segment.\n */\nfunction closestOnSegmentData(pointCoordinates, segmentData, projection) {\n    var geometry = segmentData.geometry;\n    if (geometry.getType() === GeometryType.CIRCLE &&\n        segmentData.index === CIRCLE_CIRCUMFERENCE_INDEX) {\n        var circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (geometry);\n        var userProjection = getUserProjection();\n        if (userProjection) {\n            circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry.clone().transform(userProjection, projection));\n        }\n        return toUserCoordinate(circleGeometry.getClosestPoint(fromUserCoordinate(pointCoordinates, projection)), projection);\n    }\n    var coordinate = fromUserCoordinate(pointCoordinates, projection);\n    tempSegment[0] = fromUserCoordinate(segmentData.segment[0], projection);\n    tempSegment[1] = fromUserCoordinate(segmentData.segment[1], projection);\n    return toUserCoordinate(closestOnSegment(coordinate, tempSegment), projection);\n}\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n    var style = createEditingStyle();\n    return function (feature, resolution) {\n        return style[GeometryType.POINT];\n    };\n}\nexport default Modify;\n//# sourceMappingURL=Modify.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Select\n */\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport Event from '../events/Event.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport Interaction from './Interaction.js';\nimport { TRUE } from '../functions.js';\nimport { clear } from '../obj.js';\nimport { createEditingStyle } from '../style/Style.js';\nimport { extend, includes } from '../array.js';\nimport { getUid } from '../util.js';\nimport { never, shiftKeyOnly, singleClick } from '../events/condition.js';\n/**\n * @enum {string}\n */\nvar SelectEventType = {\n    /**\n     * Triggered when feature(s) has been (de)selected.\n     * @event SelectEvent#select\n     * @api\n     */\n    SELECT: 'select',\n};\n/**\n * A function that takes an {@link module:ol/Feature} or\n * {@link module:ol/render/Feature} and an\n * {@link module:ol/layer/Layer} and returns `true` if the feature may be\n * selected or `false` otherwise.\n * @typedef {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default):boolean} FilterFunction\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [addCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * By default, this is {@link module:ol/events/condition.never}. Use this if you\n * want to use different events for add and remove instead of `toggle`.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. This is the event\n * for the selected features as a whole. By default, this is\n * {@link module:ol/events/condition.singleClick}. Clicking on a feature selects that\n * feature and removes any that were in the selection. Clicking outside any\n * feature removes all from the selection.\n * See `toggle`, `add`, `remove` options for adding/removing extra features to/\n * from the selection.\n * @property {Array<import(\"../layer/Layer.js\").default>|function(import(\"../layer/Layer.js\").default): boolean} [layers]\n * A list of layers from which features should be selected. Alternatively, a\n * filter function can be provided. The function will be called for each layer\n * in the map and should return `true` for layers that you want to be\n * selectable. If the option is absent, all visible layers will be considered\n * selectable.\n * @property {import(\"../style/Style.js\").StyleLike|null} [style]\n * Style for the selected features. By default the default edit style is used\n * (see {@link module:ol/style}). Set to `null` if this interaction should not apply\n * any style changes for selected features.\n * If set to a falsey value, the selected feature's style will not change.\n * @property {import(\"../events/condition.js\").Condition} [removeCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * By default, this is {@link module:ol/events/condition.never}. Use this if you\n * want to use different events for add and remove instead of `toggle`.\n * @property {import(\"../events/condition.js\").Condition} [toggleCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. This is in addition\n * to the `condition` event. By default,\n * {@link module:ol/events/condition.shiftKeyOnly}, i.e. pressing `shift` as\n * well as the `condition` event, adds that feature to the current selection if\n * it is not currently selected, and removes it if it is. See `add` and `remove`\n * if you want to use different events instead of a toggle.\n * @property {boolean} [multi=false] A boolean that determines if the default\n * behaviour should select only single features or all (overlapping) features at\n * the clicked map position. The default of `false` means single select.\n * @property {import(\"../Collection.js\").default<import(\"../Feature.js\").default>} [features]\n * Collection where the interaction will place selected features. Optional. If\n * not set the interaction will create a collection. In any case the collection\n * used by the interaction is returned by\n * {@link module:ol/interaction/Select~Select#getFeatures}.\n * @property {FilterFunction} [filter] A function\n * that takes an {@link module:ol/Feature} and an\n * {@link module:ol/layer/Layer} and returns `true` if the feature may be\n * selected or `false` otherwise.\n * @property {number} [hitTolerance=0] Hit-detection tolerance. Pixels inside\n * the radius around the given position will be checked for features.\n */\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Select~Select} instances are instances of\n * this type.\n */\nvar SelectEvent = /** @class */ (function (_super) {\n    __extends(SelectEvent, _super);\n    /**\n     * @param {SelectEventType} type The event type.\n     * @param {Array<import(\"../Feature.js\").default>} selected Selected features.\n     * @param {Array<import(\"../Feature.js\").default>} deselected Deselected features.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Associated\n     *     {@link module:ol/MapBrowserEvent}.\n     */\n    function SelectEvent(type, selected, deselected, mapBrowserEvent) {\n        var _this = _super.call(this, type) || this;\n        /**\n         * Selected features array.\n         * @type {Array<import(\"../Feature.js\").default>}\n         * @api\n         */\n        _this.selected = selected;\n        /**\n         * Deselected features array.\n         * @type {Array<import(\"../Feature.js\").default>}\n         * @api\n         */\n        _this.deselected = deselected;\n        /**\n         * Associated {@link module:ol/MapBrowserEvent}.\n         * @type {import(\"../MapBrowserEvent.js\").default}\n         * @api\n         */\n        _this.mapBrowserEvent = mapBrowserEvent;\n        return _this;\n    }\n    return SelectEvent;\n}(Event));\nexport { SelectEvent };\n/**\n * Original feature styles to reset to when features are no longer selected.\n * @type {Object<number, import(\"../style/Style.js\").default|Array<import(\"../style/Style.js\").default>|import(\"../style/Style.js\").StyleFunction>}\n */\nvar originalFeatureStyles = {};\n/***\n * @template Return\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n *   import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types|\n *     'change:active', import(\"../Object\").ObjectEvent, Return> &\n *   import(\"../Observable\").OnSignature<'select', SelectEvent, Return> &\n *   import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"../ObjectEventType\").Types|\n *     'change:active'|'select', Return>} SelectOnSignature\n */\n/**\n * @classdesc\n * Interaction for selecting vector features. By default, selected features are\n * styled differently, so this interaction can be used for visual highlighting,\n * as well as selecting features for other actions, such as modification or\n * output. There are three ways of controlling which features are selected:\n * using the browser event as defined by the `condition` and optionally the\n * `toggle`, `add`/`remove`, and `multi` options; a `layers` filter; and a\n * further feature filter using the `filter` option.\n *\n * Selected features are added to an internal unmanaged layer.\n *\n * @fires SelectEvent\n * @api\n */\nvar Select = /** @class */ (function (_super) {\n    __extends(Select, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function Select(opt_options) {\n        var _this = _super.call(this) || this;\n        /***\n         * @type {SelectOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.on;\n        /***\n         * @type {SelectOnSignature<import(\"../Observable.js\").OnReturn>}\n         */\n        _this.once;\n        /***\n         * @type {SelectOnSignature<void>}\n         */\n        _this.un;\n        var options = opt_options ? opt_options : {};\n        /**\n         * @private\n         */\n        _this.boundAddFeature_ = _this.addFeature_.bind(_this);\n        /**\n         * @private\n         */\n        _this.boundRemoveFeature_ = _this.removeFeature_.bind(_this);\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.condition_ = options.condition ? options.condition : singleClick;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.addCondition_ = options.addCondition ? options.addCondition : never;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.removeCondition_ = options.removeCondition\n            ? options.removeCondition\n            : never;\n        /**\n         * @private\n         * @type {import(\"../events/condition.js\").Condition}\n         */\n        _this.toggleCondition_ = options.toggleCondition\n            ? options.toggleCondition\n            : shiftKeyOnly;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.multi_ = options.multi ? options.multi : false;\n        /**\n         * @private\n         * @type {FilterFunction}\n         */\n        _this.filter_ = options.filter ? options.filter : TRUE;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;\n        /**\n         * @private\n         * @type {import(\"../style/Style.js\").default|Array<import(\"../style/Style.js\").default>|import(\"../style/Style.js\").StyleFunction|null}\n         */\n        _this.style_ =\n            options.style !== undefined ? options.style : getDefaultStyleFunction();\n        /**\n         * @private\n         * @type {import(\"../Collection.js\").default}\n         */\n        _this.features_ = options.features || new Collection();\n        /** @type {function(import(\"../layer/Layer.js\").default): boolean} */\n        var layerFilter;\n        if (options.layers) {\n            if (typeof options.layers === 'function') {\n                layerFilter = options.layers;\n            }\n            else {\n                var layers_1 = options.layers;\n                layerFilter = function (layer) {\n                    return includes(layers_1, layer);\n                };\n            }\n        }\n        else {\n            layerFilter = TRUE;\n        }\n        /**\n         * @private\n         * @type {function(import(\"../layer/Layer.js\").default): boolean}\n         */\n        _this.layerFilter_ = layerFilter;\n        /**\n         * An association between selected feature (key)\n         * and layer (value)\n         * @private\n         * @type {Object<string, import(\"../layer/Layer.js\").default>}\n         */\n        _this.featureLayerAssociation_ = {};\n        return _this;\n    }\n    /**\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     * @param {import(\"../layer/Layer.js\").default} layer Layer.\n     * @private\n     */\n    Select.prototype.addFeatureLayerAssociation_ = function (feature, layer) {\n        this.featureLayerAssociation_[getUid(feature)] = layer;\n    };\n    /**\n     * Get the selected features.\n     * @return {import(\"../Collection.js\").default<import(\"../Feature.js\").default>} Features collection.\n     * @api\n     */\n    Select.prototype.getFeatures = function () {\n        return this.features_;\n    };\n    /**\n     * Returns the Hit-detection tolerance.\n     * @return {number} Hit tolerance in pixels.\n     * @api\n     */\n    Select.prototype.getHitTolerance = function () {\n        return this.hitTolerance_;\n    };\n    /**\n     * Returns the associated {@link module:ol/layer/Vector~Vector vectorlayer} of\n     * the (last) selected feature. Note that this will not work with any\n     * programmatic method like pushing features to\n     * {@link module:ol/interaction/Select~Select#getFeatures collection}.\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature\n     * @return {import('../layer/Vector.js').default} Layer.\n     * @api\n     */\n    Select.prototype.getLayer = function (feature) {\n        return /** @type {import('../layer/Vector.js').default} */ (this.featureLayerAssociation_[getUid(feature)]);\n    };\n    /**\n     * Hit-detection tolerance. Pixels inside the radius around the given position\n     * will be checked for features.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @api\n     */\n    Select.prototype.setHitTolerance = function (hitTolerance) {\n        this.hitTolerance_ = hitTolerance;\n    };\n    /**\n     * Remove the interaction from its current map, if any,  and attach it to a new\n     * map, if any. Pass `null` to just remove the interaction from the current map.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @api\n     */\n    Select.prototype.setMap = function (map) {\n        var currentMap = this.getMap();\n        if (currentMap && this.style_) {\n            this.features_.forEach(this.restorePreviousStyle_.bind(this));\n        }\n        _super.prototype.setMap.call(this, map);\n        if (map) {\n            this.features_.addEventListener(CollectionEventType.ADD, this.boundAddFeature_);\n            this.features_.addEventListener(CollectionEventType.REMOVE, this.boundRemoveFeature_);\n            if (this.style_) {\n                this.features_.forEach(this.applySelectedStyle_.bind(this));\n            }\n        }\n        else {\n            this.features_.removeEventListener(CollectionEventType.ADD, this.boundAddFeature_);\n            this.features_.removeEventListener(CollectionEventType.REMOVE, this.boundRemoveFeature_);\n        }\n    };\n    /**\n     * @param {import(\"../Collection.js\").CollectionEvent} evt Event.\n     * @private\n     */\n    Select.prototype.addFeature_ = function (evt) {\n        var feature = evt.element;\n        if (this.style_) {\n            this.applySelectedStyle_(feature);\n        }\n    };\n    /**\n     * @param {import(\"../Collection.js\").CollectionEvent} evt Event.\n     * @private\n     */\n    Select.prototype.removeFeature_ = function (evt) {\n        var feature = evt.element;\n        if (this.style_) {\n            this.restorePreviousStyle_(feature);\n        }\n    };\n    /**\n     * @return {import(\"../style/Style.js\").StyleLike|null} Select style.\n     */\n    Select.prototype.getStyle = function () {\n        return this.style_;\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @private\n     */\n    Select.prototype.applySelectedStyle_ = function (feature) {\n        var key = getUid(feature);\n        if (!(key in originalFeatureStyles)) {\n            originalFeatureStyles[key] = feature.getStyle();\n        }\n        feature.setStyle(this.style_);\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @private\n     */\n    Select.prototype.restorePreviousStyle_ = function (feature) {\n        var interactions = this.getMap().getInteractions().getArray();\n        for (var i = interactions.length - 1; i >= 0; --i) {\n            var interaction = interactions[i];\n            if (interaction !== this &&\n                interaction instanceof Select &&\n                interaction.getStyle() &&\n                interaction.getFeatures().getArray().lastIndexOf(feature) !== -1) {\n                feature.setStyle(interaction.getStyle());\n                return;\n            }\n        }\n        var key = getUid(feature);\n        feature.setStyle(originalFeatureStyles[key]);\n        delete originalFeatureStyles[key];\n    };\n    /**\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     * @private\n     */\n    Select.prototype.removeFeatureLayerAssociation_ = function (feature) {\n        delete this.featureLayerAssociation_[getUid(feature)];\n    };\n    /**\n     * Handles the {@link module:ol/MapBrowserEvent map browser event} and may change the\n     * selected state of features.\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     * @this {Select}\n     */\n    Select.prototype.handleEvent = function (mapBrowserEvent) {\n        if (!this.condition_(mapBrowserEvent)) {\n            return true;\n        }\n        var add = this.addCondition_(mapBrowserEvent);\n        var remove = this.removeCondition_(mapBrowserEvent);\n        var toggle = this.toggleCondition_(mapBrowserEvent);\n        var set = !add && !remove && !toggle;\n        var map = mapBrowserEvent.map;\n        var features = this.getFeatures();\n        var deselected = [];\n        var selected = [];\n        if (set) {\n            // Replace the currently selected feature(s) with the feature(s) at the\n            // pixel, or clear the selected feature(s) if there is no feature at\n            // the pixel.\n            clear(this.featureLayerAssociation_);\n            map.forEachFeatureAtPixel(mapBrowserEvent.pixel, \n            /**\n             * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n             * @param {import(\"../layer/Layer.js\").default} layer Layer.\n             * @return {boolean|undefined} Continue to iterate over the features.\n             */\n            function (feature, layer) {\n                if (this.filter_(feature, layer)) {\n                    selected.push(feature);\n                    this.addFeatureLayerAssociation_(feature, layer);\n                    return !this.multi_;\n                }\n            }.bind(this), {\n                layerFilter: this.layerFilter_,\n                hitTolerance: this.hitTolerance_,\n            });\n            for (var i = features.getLength() - 1; i >= 0; --i) {\n                var feature = features.item(i);\n                var index = selected.indexOf(feature);\n                if (index > -1) {\n                    // feature is already selected\n                    selected.splice(index, 1);\n                }\n                else {\n                    features.remove(feature);\n                    deselected.push(feature);\n                }\n            }\n            if (selected.length !== 0) {\n                features.extend(selected);\n            }\n        }\n        else {\n            // Modify the currently selected feature(s).\n            map.forEachFeatureAtPixel(mapBrowserEvent.pixel, \n            /**\n             * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n             * @param {import(\"../layer/Layer.js\").default} layer Layer.\n             * @return {boolean|undefined} Continue to iterate over the features.\n             */\n            function (feature, layer) {\n                if (this.filter_(feature, layer)) {\n                    if ((add || toggle) && !includes(features.getArray(), feature)) {\n                        selected.push(feature);\n                        this.addFeatureLayerAssociation_(feature, layer);\n                    }\n                    else if ((remove || toggle) &&\n                        includes(features.getArray(), feature)) {\n                        deselected.push(feature);\n                        this.removeFeatureLayerAssociation_(feature);\n                    }\n                    return !this.multi_;\n                }\n            }.bind(this), {\n                layerFilter: this.layerFilter_,\n                hitTolerance: this.hitTolerance_,\n            });\n            for (var j = deselected.length - 1; j >= 0; --j) {\n                features.remove(deselected[j]);\n            }\n            features.extend(selected);\n        }\n        if (selected.length > 0 || deselected.length > 0) {\n            this.dispatchEvent(new SelectEvent(SelectEventType.SELECT, selected, deselected, mapBrowserEvent));\n        }\n        return true;\n    };\n    return Select;\n}(Interaction));\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n    var styles = createEditingStyle();\n    extend(styles[GeometryType.POLYGON], styles[GeometryType.LINE_STRING]);\n    extend(styles[GeometryType.GEOMETRY_COLLECTION], styles[GeometryType.LINE_STRING]);\n    return function (feature) {\n        if (!feature.getGeometry()) {\n            return null;\n        }\n        return styles[feature.getGeometry().getType()];\n    };\n}\nexport default Select;\n//# sourceMappingURL=Select.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/interaction/Snap\n */\nimport CollectionEventType from '../CollectionEventType.js';\nimport EventType from '../events/EventType.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport PointerInteraction from './Pointer.js';\nimport RBush from '../structs/RBush.js';\nimport VectorEventType from '../source/VectorEventType.js';\nimport { FALSE, TRUE } from '../functions.js';\nimport { boundingExtent, createEmpty } from '../extent.js';\nimport { closestOnCircle, closestOnSegment, distance as coordinateDistance, squaredDistance as squaredCoordinateDistance, squaredDistanceToSegment, } from '../coordinate.js';\nimport { fromCircle } from '../geom/Polygon.js';\nimport { fromUserCoordinate, getUserProjection, toUserCoordinate, } from '../proj.js';\nimport { getUid } from '../util.js';\nimport { getValues } from '../obj.js';\nimport { listen, unlistenByKey } from '../events.js';\n/**\n * @typedef {Object} Result\n * @property {boolean} snapped Snapped.\n * @property {import(\"../coordinate.js\").Coordinate|null} vertex Vertex.\n * @property {import(\"../pixel.js\").Pixel|null} vertexPixel VertexPixel.\n */\n/**\n * @typedef {Object} SegmentData\n * @property {import(\"../Feature.js\").default} feature Feature.\n * @property {Array<import(\"../coordinate.js\").Coordinate>} segment Segment.\n */\n/**\n * @typedef {Object} Options\n * @property {import(\"../Collection.js\").default<import(\"../Feature.js\").default>} [features] Snap to these features. Either this option or source should be provided.\n * @property {boolean} [edge=true] Snap to edges.\n * @property {boolean} [vertex=true] Snap to vertices.\n * @property {number} [pixelTolerance=10] Pixel tolerance for considering the pointer close enough to a segment or\n * vertex for snapping.\n * @property {import(\"../source/Vector.js\").default} [source] Snap to features from this source. Either this option or features should be provided\n */\n/**\n * @param  {import(\"../source/Vector.js\").VectorSourceEvent|import(\"../Collection.js\").CollectionEvent} evt Event.\n * @return {import(\"../Feature.js\").default} Feature.\n */\nfunction getFeatureFromEvent(evt) {\n    if (\n    /** @type {import(\"../source/Vector.js\").VectorSourceEvent} */ (evt).feature) {\n        return /** @type {import(\"../source/Vector.js\").VectorSourceEvent} */ (evt)\n            .feature;\n    }\n    else if (\n    /** @type {import(\"../Collection.js\").CollectionEvent} */ (evt).element) {\n        return /** @type {import(\"../Feature.js\").default} */ (\n        /** @type {import(\"../Collection.js\").CollectionEvent} */ (evt).element);\n    }\n}\nvar tempSegment = [];\n/**\n * @classdesc\n * Handles snapping of vector features while modifying or drawing them.  The\n * features can come from a {@link module:ol/source/Vector} or {@link module:ol/Collection~Collection}\n * Any interaction object that allows the user to interact\n * with the features using the mouse can benefit from the snapping, as long\n * as it is added before.\n *\n * The snap interaction modifies map browser event `coordinate` and `pixel`\n * properties to force the snap to occur to any interaction that them.\n *\n * Example:\n *\n *     import Snap from 'ol/interaction/Snap';\n *\n *     const snap = new Snap({\n *       source: source\n *     });\n *\n *     map.addInteraction(snap);\n *\n * @api\n */\nvar Snap = /** @class */ (function (_super) {\n    __extends(Snap, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function Snap(opt_options) {\n        var _this = this;\n        var options = opt_options ? opt_options : {};\n        var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n        if (!pointerOptions.handleDownEvent) {\n            pointerOptions.handleDownEvent = TRUE;\n        }\n        if (!pointerOptions.stopDown) {\n            pointerOptions.stopDown = FALSE;\n        }\n        _this = _super.call(this, pointerOptions) || this;\n        /**\n         * @type {import(\"../source/Vector.js\").default}\n         * @private\n         */\n        _this.source_ = options.source ? options.source : null;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.vertex_ = options.vertex !== undefined ? options.vertex : true;\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.edge_ = options.edge !== undefined ? options.edge : true;\n        /**\n         * @type {import(\"../Collection.js\").default<import(\"../Feature.js\").default>}\n         * @private\n         */\n        _this.features_ = options.features ? options.features : null;\n        /**\n         * @type {Array<import(\"../events.js\").EventsKey>}\n         * @private\n         */\n        _this.featuresListenerKeys_ = [];\n        /**\n         * @type {Object<string, import(\"../events.js\").EventsKey>}\n         * @private\n         */\n        _this.featureChangeListenerKeys_ = {};\n        /**\n         * Extents are preserved so indexed segment can be quickly removed\n         * when its feature geometry changes\n         * @type {Object<string, import(\"../extent.js\").Extent>}\n         * @private\n         */\n        _this.indexedFeaturesExtents_ = {};\n        /**\n         * If a feature geometry changes while a pointer drag|move event occurs, the\n         * feature doesn't get updated right away.  It will be at the next 'pointerup'\n         * event fired.\n         * @type {!Object<string, import(\"../Feature.js\").default>}\n         * @private\n         */\n        _this.pendingFeatures_ = {};\n        /**\n         * @type {number}\n         * @private\n         */\n        _this.pixelTolerance_ =\n            options.pixelTolerance !== undefined ? options.pixelTolerance : 10;\n        /**\n         * Segment RTree for each layer\n         * @type {import(\"../structs/RBush.js\").default<SegmentData>}\n         * @private\n         */\n        _this.rBush_ = new RBush();\n        /**\n         * @const\n         * @private\n         * @type {Object<string, function(import(\"../Feature.js\").default, import(\"../geom/Geometry.js\").default): void>}\n         */\n        _this.SEGMENT_WRITERS_ = {\n            'Point': _this.writePointGeometry_.bind(_this),\n            'LineString': _this.writeLineStringGeometry_.bind(_this),\n            'LinearRing': _this.writeLineStringGeometry_.bind(_this),\n            'Polygon': _this.writePolygonGeometry_.bind(_this),\n            'MultiPoint': _this.writeMultiPointGeometry_.bind(_this),\n            'MultiLineString': _this.writeMultiLineStringGeometry_.bind(_this),\n            'MultiPolygon': _this.writeMultiPolygonGeometry_.bind(_this),\n            'GeometryCollection': _this.writeGeometryCollectionGeometry_.bind(_this),\n            'Circle': _this.writeCircleGeometry_.bind(_this),\n        };\n        return _this;\n    }\n    /**\n     * Add a feature to the collection of features that we may snap to.\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @param {boolean} [opt_listen] Whether to listen to the feature change or not\n     *     Defaults to `true`.\n     * @api\n     */\n    Snap.prototype.addFeature = function (feature, opt_listen) {\n        var register = opt_listen !== undefined ? opt_listen : true;\n        var feature_uid = getUid(feature);\n        var geometry = feature.getGeometry();\n        if (geometry) {\n            var segmentWriter = this.SEGMENT_WRITERS_[geometry.getType()];\n            if (segmentWriter) {\n                this.indexedFeaturesExtents_[feature_uid] = geometry.getExtent(createEmpty());\n                segmentWriter(feature, geometry);\n            }\n        }\n        if (register) {\n            this.featureChangeListenerKeys_[feature_uid] = listen(feature, EventType.CHANGE, this.handleFeatureChange_, this);\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @private\n     */\n    Snap.prototype.forEachFeatureAdd_ = function (feature) {\n        this.addFeature(feature);\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature.\n     * @private\n     */\n    Snap.prototype.forEachFeatureRemove_ = function (feature) {\n        this.removeFeature(feature);\n    };\n    /**\n     * @return {import(\"../Collection.js\").default<import(\"../Feature.js\").default>|Array<import(\"../Feature.js\").default>} Features.\n     * @private\n     */\n    Snap.prototype.getFeatures_ = function () {\n        var features;\n        if (this.features_) {\n            features = this.features_;\n        }\n        else if (this.source_) {\n            features = this.source_.getFeatures();\n        }\n        return features;\n    };\n    /**\n     * @param {import(\"../MapBrowserEvent.js\").default} evt Map browser event.\n     * @return {boolean} `false` to stop event propagation.\n     */\n    Snap.prototype.handleEvent = function (evt) {\n        var result = this.snapTo(evt.pixel, evt.coordinate, evt.map);\n        if (result.snapped) {\n            evt.coordinate = result.vertex.slice(0, 2);\n            evt.pixel = result.vertexPixel;\n        }\n        return _super.prototype.handleEvent.call(this, evt);\n    };\n    /**\n     * @param {import(\"../source/Vector.js\").VectorSourceEvent|import(\"../Collection.js\").CollectionEvent} evt Event.\n     * @private\n     */\n    Snap.prototype.handleFeatureAdd_ = function (evt) {\n        var feature = getFeatureFromEvent(evt);\n        this.addFeature(feature);\n    };\n    /**\n     * @param {import(\"../source/Vector.js\").VectorSourceEvent|import(\"../Collection.js\").CollectionEvent} evt Event.\n     * @private\n     */\n    Snap.prototype.handleFeatureRemove_ = function (evt) {\n        var feature = getFeatureFromEvent(evt);\n        this.removeFeature(feature);\n    };\n    /**\n     * @param {import(\"../events/Event.js\").default} evt Event.\n     * @private\n     */\n    Snap.prototype.handleFeatureChange_ = function (evt) {\n        var feature = /** @type {import(\"../Feature.js\").default} */ (evt.target);\n        if (this.handlingDownUpSequence) {\n            var uid = getUid(feature);\n            if (!(uid in this.pendingFeatures_)) {\n                this.pendingFeatures_[uid] = feature;\n            }\n        }\n        else {\n            this.updateFeature_(feature);\n        }\n    };\n    /**\n     * Handle pointer up events.\n     * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n     * @return {boolean} If the event was consumed.\n     */\n    Snap.prototype.handleUpEvent = function (evt) {\n        var featuresToUpdate = getValues(this.pendingFeatures_);\n        if (featuresToUpdate.length) {\n            featuresToUpdate.forEach(this.updateFeature_.bind(this));\n            this.pendingFeatures_ = {};\n        }\n        return false;\n    };\n    /**\n     * Remove a feature from the collection of features that we may snap to.\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {boolean} [opt_unlisten] Whether to unlisten to the feature change\n     *     or not. Defaults to `true`.\n     * @api\n     */\n    Snap.prototype.removeFeature = function (feature, opt_unlisten) {\n        var unregister = opt_unlisten !== undefined ? opt_unlisten : true;\n        var feature_uid = getUid(feature);\n        var extent = this.indexedFeaturesExtents_[feature_uid];\n        if (extent) {\n            var rBush = this.rBush_;\n            var nodesToRemove_1 = [];\n            rBush.forEachInExtent(extent, function (node) {\n                if (feature === node.feature) {\n                    nodesToRemove_1.push(node);\n                }\n            });\n            for (var i = nodesToRemove_1.length - 1; i >= 0; --i) {\n                rBush.remove(nodesToRemove_1[i]);\n            }\n        }\n        if (unregister) {\n            unlistenByKey(this.featureChangeListenerKeys_[feature_uid]);\n            delete this.featureChangeListenerKeys_[feature_uid];\n        }\n    };\n    /**\n     * Remove the interaction from its current map and attach it to the new map.\n     * Subclasses may set up event handlers to get notified about changes to\n     * the map here.\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    Snap.prototype.setMap = function (map) {\n        var currentMap = this.getMap();\n        var keys = this.featuresListenerKeys_;\n        var features = /** @type {Array<import(\"../Feature.js\").default>} */ (this.getFeatures_());\n        if (currentMap) {\n            keys.forEach(unlistenByKey);\n            keys.length = 0;\n            features.forEach(this.forEachFeatureRemove_.bind(this));\n        }\n        _super.prototype.setMap.call(this, map);\n        if (map) {\n            if (this.features_) {\n                keys.push(listen(this.features_, CollectionEventType.ADD, this.handleFeatureAdd_, this), listen(this.features_, CollectionEventType.REMOVE, this.handleFeatureRemove_, this));\n            }\n            else if (this.source_) {\n                keys.push(listen(this.source_, VectorEventType.ADDFEATURE, this.handleFeatureAdd_, this), listen(this.source_, VectorEventType.REMOVEFEATURE, this.handleFeatureRemove_, this));\n            }\n            features.forEach(this.forEachFeatureAdd_.bind(this));\n        }\n    };\n    /**\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel\n     * @param {import(\"../coordinate.js\").Coordinate} pixelCoordinate Coordinate\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     * @return {Result} Snap result\n     */\n    Snap.prototype.snapTo = function (pixel, pixelCoordinate, map) {\n        var lowerLeft = map.getCoordinateFromPixel([\n            pixel[0] - this.pixelTolerance_,\n            pixel[1] + this.pixelTolerance_,\n        ]);\n        var upperRight = map.getCoordinateFromPixel([\n            pixel[0] + this.pixelTolerance_,\n            pixel[1] - this.pixelTolerance_,\n        ]);\n        var box = boundingExtent([lowerLeft, upperRight]);\n        var segments = this.rBush_.getInExtent(box);\n        // If snapping on vertices only, don't consider circles\n        if (this.vertex_ && !this.edge_) {\n            segments = segments.filter(function (segment) {\n                return segment.feature.getGeometry().getType() !== GeometryType.CIRCLE;\n            });\n        }\n        var snapped = false;\n        var vertex = null;\n        var vertexPixel = null;\n        if (segments.length === 0) {\n            return {\n                snapped: snapped,\n                vertex: vertex,\n                vertexPixel: vertexPixel,\n            };\n        }\n        var projection = map.getView().getProjection();\n        var projectedCoordinate = fromUserCoordinate(pixelCoordinate, projection);\n        var closestSegmentData;\n        var minSquaredDistance = Infinity;\n        for (var i = 0; i < segments.length; ++i) {\n            var segmentData = segments[i];\n            tempSegment[0] = fromUserCoordinate(segmentData.segment[0], projection);\n            tempSegment[1] = fromUserCoordinate(segmentData.segment[1], projection);\n            var delta = squaredDistanceToSegment(projectedCoordinate, tempSegment);\n            if (delta < minSquaredDistance) {\n                closestSegmentData = segmentData;\n                minSquaredDistance = delta;\n            }\n        }\n        var closestSegment = closestSegmentData.segment;\n        if (this.vertex_ && !this.edge_) {\n            var pixel1 = map.getPixelFromCoordinate(closestSegment[0]);\n            var pixel2 = map.getPixelFromCoordinate(closestSegment[1]);\n            var squaredDist1 = squaredCoordinateDistance(pixel, pixel1);\n            var squaredDist2 = squaredCoordinateDistance(pixel, pixel2);\n            var dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n            if (dist <= this.pixelTolerance_) {\n                snapped = true;\n                vertex =\n                    squaredDist1 > squaredDist2 ? closestSegment[1] : closestSegment[0];\n                vertexPixel = map.getPixelFromCoordinate(vertex);\n            }\n        }\n        else if (this.edge_) {\n            var isCircle = closestSegmentData.feature.getGeometry().getType() ===\n                GeometryType.CIRCLE;\n            if (isCircle) {\n                var circleGeometry = closestSegmentData.feature.getGeometry();\n                var userProjection = getUserProjection();\n                if (userProjection) {\n                    circleGeometry = circleGeometry\n                        .clone()\n                        .transform(userProjection, projection);\n                }\n                vertex = toUserCoordinate(closestOnCircle(projectedCoordinate, \n                /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry)), projection);\n            }\n            else {\n                tempSegment[0] = fromUserCoordinate(closestSegment[0], projection);\n                tempSegment[1] = fromUserCoordinate(closestSegment[1], projection);\n                vertex = toUserCoordinate(closestOnSegment(projectedCoordinate, tempSegment), projection);\n            }\n            vertexPixel = map.getPixelFromCoordinate(vertex);\n            if (coordinateDistance(pixel, vertexPixel) <= this.pixelTolerance_) {\n                snapped = true;\n                if (this.vertex_ && !isCircle) {\n                    var pixel1 = map.getPixelFromCoordinate(closestSegment[0]);\n                    var pixel2 = map.getPixelFromCoordinate(closestSegment[1]);\n                    var squaredDist1 = squaredCoordinateDistance(vertexPixel, pixel1);\n                    var squaredDist2 = squaredCoordinateDistance(vertexPixel, pixel2);\n                    var dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n                    if (dist <= this.pixelTolerance_) {\n                        vertex =\n                            squaredDist1 > squaredDist2\n                                ? closestSegment[1]\n                                : closestSegment[0];\n                        vertexPixel = map.getPixelFromCoordinate(vertex);\n                    }\n                }\n            }\n        }\n        if (snapped) {\n            vertexPixel = [Math.round(vertexPixel[0]), Math.round(vertexPixel[1])];\n        }\n        return {\n            snapped: snapped,\n            vertex: vertex,\n            vertexPixel: vertexPixel,\n        };\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @private\n     */\n    Snap.prototype.updateFeature_ = function (feature) {\n        this.removeFeature(feature, false);\n        this.addFeature(feature, false);\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writeCircleGeometry_ = function (feature, geometry) {\n        var projection = this.getMap().getView().getProjection();\n        var circleGeometry = geometry;\n        var userProjection = getUserProjection();\n        if (userProjection) {\n            circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (circleGeometry.clone().transform(userProjection, projection));\n        }\n        var polygon = fromCircle(circleGeometry);\n        if (userProjection) {\n            polygon.transform(projection, userProjection);\n        }\n        var coordinates = polygon.getCoordinates()[0];\n        for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n            var segment = coordinates.slice(i, i + 2);\n            var segmentData = {\n                feature: feature,\n                segment: segment,\n            };\n            this.rBush_.insert(boundingExtent(segment), segmentData);\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writeGeometryCollectionGeometry_ = function (feature, geometry) {\n        var geometries = geometry.getGeometriesArray();\n        for (var i = 0; i < geometries.length; ++i) {\n            var segmentWriter = this.SEGMENT_WRITERS_[geometries[i].getType()];\n            if (segmentWriter) {\n                segmentWriter(feature, geometries[i]);\n            }\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/LineString.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writeLineStringGeometry_ = function (feature, geometry) {\n        var coordinates = geometry.getCoordinates();\n        for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n            var segment = coordinates.slice(i, i + 2);\n            var segmentData = {\n                feature: feature,\n                segment: segment,\n            };\n            this.rBush_.insert(boundingExtent(segment), segmentData);\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/MultiLineString.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writeMultiLineStringGeometry_ = function (feature, geometry) {\n        var lines = geometry.getCoordinates();\n        for (var j = 0, jj = lines.length; j < jj; ++j) {\n            var coordinates = lines[j];\n            for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n                var segment = coordinates.slice(i, i + 2);\n                var segmentData = {\n                    feature: feature,\n                    segment: segment,\n                };\n                this.rBush_.insert(boundingExtent(segment), segmentData);\n            }\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/MultiPoint.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writeMultiPointGeometry_ = function (feature, geometry) {\n        var points = geometry.getCoordinates();\n        for (var i = 0, ii = points.length; i < ii; ++i) {\n            var coordinates = points[i];\n            var segmentData = {\n                feature: feature,\n                segment: [coordinates, coordinates],\n            };\n            this.rBush_.insert(geometry.getExtent(), segmentData);\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writeMultiPolygonGeometry_ = function (feature, geometry) {\n        var polygons = geometry.getCoordinates();\n        for (var k = 0, kk = polygons.length; k < kk; ++k) {\n            var rings = polygons[k];\n            for (var j = 0, jj = rings.length; j < jj; ++j) {\n                var coordinates = rings[j];\n                for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n                    var segment = coordinates.slice(i, i + 2);\n                    var segmentData = {\n                        feature: feature,\n                        segment: segment,\n                    };\n                    this.rBush_.insert(boundingExtent(segment), segmentData);\n                }\n            }\n        }\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/Point.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writePointGeometry_ = function (feature, geometry) {\n        var coordinates = geometry.getCoordinates();\n        var segmentData = {\n            feature: feature,\n            segment: [coordinates, coordinates],\n        };\n        this.rBush_.insert(geometry.getExtent(), segmentData);\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Feature\n     * @param {import(\"../geom/Polygon.js\").default} geometry Geometry.\n     * @private\n     */\n    Snap.prototype.writePolygonGeometry_ = function (feature, geometry) {\n        var rings = geometry.getCoordinates();\n        for (var j = 0, jj = rings.length; j < jj; ++j) {\n            var coordinates = rings[j];\n            for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n                var segment = coordinates.slice(i, i + 2);\n                var segmentData = {\n                    feature: feature,\n                    segment: segment,\n                };\n                this.rBush_.insert(boundingExtent(segment), segmentData);\n            }\n        }\n    };\n    return Snap;\n}(PointerInteraction));\nexport default Snap;\n//# sourceMappingURL=Snap.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/format/WKT\n */\nimport Feature from '../Feature.js';\nimport GeometryCollection from '../geom/GeometryCollection.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport TextFeature from './TextFeature.js';\nimport { transformGeometryWithOptions } from './Feature.js';\n/**\n * Geometry constructors\n * @enum {function (new:import(\"../geom/Geometry.js\").default, Array, import(\"../geom/GeometryLayout.js\").default)}\n */\nvar GeometryConstructor = {\n    'POINT': Point,\n    'LINESTRING': LineString,\n    'POLYGON': Polygon,\n    'MULTIPOINT': MultiPoint,\n    'MULTILINESTRING': MultiLineString,\n    'MULTIPOLYGON': MultiPolygon,\n};\n/**\n * @typedef {Object} Options\n * @property {boolean} [splitCollection=false] Whether to split GeometryCollections into\n * multiple features on reading.\n */\n/**\n * @typedef {Object} Token\n * @property {number} type Type.\n * @property {number|string} [value] Value.\n * @property {number} position Position.\n */\n/**\n * @const\n * @type {string}\n */\nvar EMPTY = 'EMPTY';\n/**\n * @const\n * @type {string}\n */\nvar Z = 'Z';\n/**\n * @const\n * @type {string}\n */\nvar M = 'M';\n/**\n * @const\n * @type {string}\n */\nvar ZM = 'ZM';\n/**\n * @const\n * @enum {number}\n */\nvar TokenType = {\n    START: 0,\n    TEXT: 1,\n    LEFT_PAREN: 2,\n    RIGHT_PAREN: 3,\n    NUMBER: 4,\n    COMMA: 5,\n    EOF: 6,\n};\n/**\n * @const\n * @type {Object<string, string>}\n */\nvar WKTGeometryType = {};\nfor (var type in GeometryType) {\n    WKTGeometryType[type] = GeometryType[type].toUpperCase();\n}\n/**\n * Class to tokenize a WKT string.\n */\nvar Lexer = /** @class */ (function () {\n    /**\n     * @param {string} wkt WKT string.\n     */\n    function Lexer(wkt) {\n        /**\n         * @type {string}\n         */\n        this.wkt = wkt;\n        /**\n         * @type {number}\n         * @private\n         */\n        this.index_ = -1;\n    }\n    /**\n     * @param {string} c Character.\n     * @return {boolean} Whether the character is alphabetic.\n     * @private\n     */\n    Lexer.prototype.isAlpha_ = function (c) {\n        return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');\n    };\n    /**\n     * @param {string} c Character.\n     * @param {boolean} [opt_decimal] Whether the string number\n     *     contains a dot, i.e. is a decimal number.\n     * @return {boolean} Whether the character is numeric.\n     * @private\n     */\n    Lexer.prototype.isNumeric_ = function (c, opt_decimal) {\n        var decimal = opt_decimal !== undefined ? opt_decimal : false;\n        return (c >= '0' && c <= '9') || (c == '.' && !decimal);\n    };\n    /**\n     * @param {string} c Character.\n     * @return {boolean} Whether the character is whitespace.\n     * @private\n     */\n    Lexer.prototype.isWhiteSpace_ = function (c) {\n        return c == ' ' || c == '\\t' || c == '\\r' || c == '\\n';\n    };\n    /**\n     * @return {string} Next string character.\n     * @private\n     */\n    Lexer.prototype.nextChar_ = function () {\n        return this.wkt.charAt(++this.index_);\n    };\n    /**\n     * Fetch and return the next token.\n     * @return {Token} Next string token.\n     */\n    Lexer.prototype.nextToken = function () {\n        var c = this.nextChar_();\n        var position = this.index_;\n        /** @type {number|string} */\n        var value = c;\n        var type;\n        if (c == '(') {\n            type = TokenType.LEFT_PAREN;\n        }\n        else if (c == ',') {\n            type = TokenType.COMMA;\n        }\n        else if (c == ')') {\n            type = TokenType.RIGHT_PAREN;\n        }\n        else if (this.isNumeric_(c) || c == '-') {\n            type = TokenType.NUMBER;\n            value = this.readNumber_();\n        }\n        else if (this.isAlpha_(c)) {\n            type = TokenType.TEXT;\n            value = this.readText_();\n        }\n        else if (this.isWhiteSpace_(c)) {\n            return this.nextToken();\n        }\n        else if (c === '') {\n            type = TokenType.EOF;\n        }\n        else {\n            throw new Error('Unexpected character: ' + c);\n        }\n        return { position: position, value: value, type: type };\n    };\n    /**\n     * @return {number} Numeric token value.\n     * @private\n     */\n    Lexer.prototype.readNumber_ = function () {\n        var c;\n        var index = this.index_;\n        var decimal = false;\n        var scientificNotation = false;\n        do {\n            if (c == '.') {\n                decimal = true;\n            }\n            else if (c == 'e' || c == 'E') {\n                scientificNotation = true;\n            }\n            c = this.nextChar_();\n        } while (this.isNumeric_(c, decimal) ||\n            // if we haven't detected a scientific number before, 'e' or 'E'\n            // hint that we should continue to read\n            (!scientificNotation && (c == 'e' || c == 'E')) ||\n            // once we know that we have a scientific number, both '-' and '+'\n            // are allowed\n            (scientificNotation && (c == '-' || c == '+')));\n        return parseFloat(this.wkt.substring(index, this.index_--));\n    };\n    /**\n     * @return {string} String token value.\n     * @private\n     */\n    Lexer.prototype.readText_ = function () {\n        var c;\n        var index = this.index_;\n        do {\n            c = this.nextChar_();\n        } while (this.isAlpha_(c));\n        return this.wkt.substring(index, this.index_--).toUpperCase();\n    };\n    return Lexer;\n}());\n/**\n * Class to parse the tokens from the WKT string.\n */\nvar Parser = /** @class */ (function () {\n    /**\n     * @param {Lexer} lexer The lexer.\n     */\n    function Parser(lexer) {\n        /**\n         * @type {Lexer}\n         * @private\n         */\n        this.lexer_ = lexer;\n        /**\n         * @type {Token}\n         * @private\n         */\n        this.token_ = {\n            position: 0,\n            type: TokenType.START,\n        };\n        /**\n         * @type {import(\"../geom/GeometryLayout.js\").default}\n         * @private\n         */\n        this.layout_ = GeometryLayout.XY;\n    }\n    /**\n     * Fetch the next token form the lexer and replace the active token.\n     * @private\n     */\n    Parser.prototype.consume_ = function () {\n        this.token_ = this.lexer_.nextToken();\n    };\n    /**\n     * Tests if the given type matches the type of the current token.\n     * @param {TokenType} type Token type.\n     * @return {boolean} Whether the token matches the given type.\n     */\n    Parser.prototype.isTokenType = function (type) {\n        return this.token_.type == type;\n    };\n    /**\n     * If the given type matches the current token, consume it.\n     * @param {TokenType} type Token type.\n     * @return {boolean} Whether the token matches the given type.\n     */\n    Parser.prototype.match = function (type) {\n        var isMatch = this.isTokenType(type);\n        if (isMatch) {\n            this.consume_();\n        }\n        return isMatch;\n    };\n    /**\n     * Try to parse the tokens provided by the lexer.\n     * @return {import(\"../geom/Geometry.js\").default} The geometry.\n     */\n    Parser.prototype.parse = function () {\n        this.consume_();\n        return this.parseGeometry_();\n    };\n    /**\n     * Try to parse the dimensional info.\n     * @return {import(\"../geom/GeometryLayout.js\").default} The layout.\n     * @private\n     */\n    Parser.prototype.parseGeometryLayout_ = function () {\n        var layout = GeometryLayout.XY;\n        var dimToken = this.token_;\n        if (this.isTokenType(TokenType.TEXT)) {\n            var dimInfo = dimToken.value;\n            if (dimInfo === Z) {\n                layout = GeometryLayout.XYZ;\n            }\n            else if (dimInfo === M) {\n                layout = GeometryLayout.XYM;\n            }\n            else if (dimInfo === ZM) {\n                layout = GeometryLayout.XYZM;\n            }\n            if (layout !== GeometryLayout.XY) {\n                this.consume_();\n            }\n        }\n        return layout;\n    };\n    /**\n     * @return {Array<import(\"../geom/Geometry.js\").default>} A collection of geometries.\n     * @private\n     */\n    Parser.prototype.parseGeometryCollectionText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var geometries = [];\n            do {\n                geometries.push(this.parseGeometry_());\n            } while (this.match(TokenType.COMMA));\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return geometries;\n            }\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {Array<number>} All values in a point.\n     * @private\n     */\n    Parser.prototype.parsePointText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var coordinates = this.parsePoint_();\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return coordinates;\n            }\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {Array<Array<number>>} All points in a linestring.\n     * @private\n     */\n    Parser.prototype.parseLineStringText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var coordinates = this.parsePointList_();\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return coordinates;\n            }\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {Array<Array<Array<number>>>} All points in a polygon.\n     * @private\n     */\n    Parser.prototype.parsePolygonText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var coordinates = this.parseLineStringTextList_();\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return coordinates;\n            }\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {Array<Array<number>>} All points in a multipoint.\n     * @private\n     */\n    Parser.prototype.parseMultiPointText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var coordinates = void 0;\n            if (this.token_.type == TokenType.LEFT_PAREN) {\n                coordinates = this.parsePointTextList_();\n            }\n            else {\n                coordinates = this.parsePointList_();\n            }\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return coordinates;\n            }\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {Array<Array<Array<number>>>} All linestring points\n     *                                          in a multilinestring.\n     * @private\n     */\n    Parser.prototype.parseMultiLineStringText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var coordinates = this.parseLineStringTextList_();\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return coordinates;\n            }\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {Array<Array<Array<Array<number>>>>} All polygon points in a multipolygon.\n     * @private\n     */\n    Parser.prototype.parseMultiPolygonText_ = function () {\n        if (this.match(TokenType.LEFT_PAREN)) {\n            var coordinates = this.parsePolygonTextList_();\n            if (this.match(TokenType.RIGHT_PAREN)) {\n                return coordinates;\n            }\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {Array<number>} A point.\n     * @private\n     */\n    Parser.prototype.parsePoint_ = function () {\n        var coordinates = [];\n        var dimensions = this.layout_.length;\n        for (var i = 0; i < dimensions; ++i) {\n            var token = this.token_;\n            if (this.match(TokenType.NUMBER)) {\n                coordinates.push(/** @type {number} */ (token.value));\n            }\n            else {\n                break;\n            }\n        }\n        if (coordinates.length == dimensions) {\n            return coordinates;\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    /**\n     * @return {Array<Array<number>>} An array of points.\n     * @private\n     */\n    Parser.prototype.parsePointList_ = function () {\n        var coordinates = [this.parsePoint_()];\n        while (this.match(TokenType.COMMA)) {\n            coordinates.push(this.parsePoint_());\n        }\n        return coordinates;\n    };\n    /**\n     * @return {Array<Array<number>>} An array of points.\n     * @private\n     */\n    Parser.prototype.parsePointTextList_ = function () {\n        var coordinates = [this.parsePointText_()];\n        while (this.match(TokenType.COMMA)) {\n            coordinates.push(this.parsePointText_());\n        }\n        return coordinates;\n    };\n    /**\n     * @return {Array<Array<Array<number>>>} An array of points.\n     * @private\n     */\n    Parser.prototype.parseLineStringTextList_ = function () {\n        var coordinates = [this.parseLineStringText_()];\n        while (this.match(TokenType.COMMA)) {\n            coordinates.push(this.parseLineStringText_());\n        }\n        return coordinates;\n    };\n    /**\n     * @return {Array<Array<Array<Array<number>>>>} An array of points.\n     * @private\n     */\n    Parser.prototype.parsePolygonTextList_ = function () {\n        var coordinates = [this.parsePolygonText_()];\n        while (this.match(TokenType.COMMA)) {\n            coordinates.push(this.parsePolygonText_());\n        }\n        return coordinates;\n    };\n    /**\n     * @return {boolean} Whether the token implies an empty geometry.\n     * @private\n     */\n    Parser.prototype.isEmptyGeometry_ = function () {\n        var isEmpty = this.isTokenType(TokenType.TEXT) && this.token_.value == EMPTY;\n        if (isEmpty) {\n            this.consume_();\n        }\n        return isEmpty;\n    };\n    /**\n     * Create an error message for an unexpected token error.\n     * @return {string} Error message.\n     * @private\n     */\n    Parser.prototype.formatErrorMessage_ = function () {\n        return ('Unexpected `' +\n            this.token_.value +\n            '` at position ' +\n            this.token_.position +\n            ' in `' +\n            this.lexer_.wkt +\n            '`');\n    };\n    /**\n     * @return {import(\"../geom/Geometry.js\").default} The geometry.\n     * @private\n     */\n    Parser.prototype.parseGeometry_ = function () {\n        var token = this.token_;\n        if (this.match(TokenType.TEXT)) {\n            var geomType = /** @type {string} */ (token.value);\n            this.layout_ = this.parseGeometryLayout_();\n            var isEmpty = this.isEmptyGeometry_();\n            if (geomType == 'GEOMETRYCOLLECTION') {\n                if (isEmpty) {\n                    return new GeometryCollection([]);\n                }\n                var geometries = this.parseGeometryCollectionText_();\n                return new GeometryCollection(geometries);\n            }\n            else {\n                var ctor = GeometryConstructor[geomType];\n                if (!ctor) {\n                    throw new Error('Invalid geometry type: ' + geomType);\n                }\n                var coordinates = void 0;\n                if (isEmpty) {\n                    if (geomType == 'POINT') {\n                        coordinates = [NaN, NaN];\n                    }\n                    else {\n                        coordinates = [];\n                    }\n                }\n                else {\n                    switch (geomType) {\n                        case 'POINT': {\n                            coordinates = this.parsePointText_();\n                            break;\n                        }\n                        case 'LINESTRING': {\n                            coordinates = this.parseLineStringText_();\n                            break;\n                        }\n                        case 'POLYGON': {\n                            coordinates = this.parsePolygonText_();\n                            break;\n                        }\n                        case 'MULTIPOINT': {\n                            coordinates = this.parseMultiPointText_();\n                            break;\n                        }\n                        case 'MULTILINESTRING': {\n                            coordinates = this.parseMultiLineStringText_();\n                            break;\n                        }\n                        case 'MULTIPOLYGON': {\n                            coordinates = this.parseMultiPolygonText_();\n                            break;\n                        }\n                        default:\n                            break;\n                    }\n                }\n                return new ctor(coordinates, this.layout_);\n            }\n        }\n        throw new Error(this.formatErrorMessage_());\n    };\n    return Parser;\n}());\n/**\n * @classdesc\n * Geometry format for reading and writing data in the `WellKnownText` (WKT)\n * format.\n *\n * @api\n */\nvar WKT = /** @class */ (function (_super) {\n    __extends(WKT, _super);\n    /**\n     * @param {Options} [opt_options] Options.\n     */\n    function WKT(opt_options) {\n        var _this = _super.call(this) || this;\n        var options = opt_options ? opt_options : {};\n        /**\n         * Split GeometryCollection into multiple features.\n         * @type {boolean}\n         * @private\n         */\n        _this.splitCollection_ =\n            options.splitCollection !== undefined ? options.splitCollection : false;\n        return _this;\n    }\n    /**\n     * Parse a WKT string.\n     * @param {string} wkt WKT string.\n     * @return {import(\"../geom/Geometry.js\").default}\n     *     The geometry created.\n     * @private\n     */\n    WKT.prototype.parse_ = function (wkt) {\n        var lexer = new Lexer(wkt);\n        var parser = new Parser(lexer);\n        return parser.parse();\n    };\n    /**\n     * @protected\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @return {import(\"../Feature.js\").default} Feature.\n     */\n    WKT.prototype.readFeatureFromText = function (text, opt_options) {\n        var geom = this.readGeometryFromText(text, opt_options);\n        var feature = new Feature();\n        feature.setGeometry(geom);\n        return feature;\n    };\n    /**\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @protected\n     * @return {Array<Feature>} Features.\n     */\n    WKT.prototype.readFeaturesFromText = function (text, opt_options) {\n        var geometries = [];\n        var geometry = this.readGeometryFromText(text, opt_options);\n        if (this.splitCollection_ &&\n            geometry.getType() == GeometryType.GEOMETRY_COLLECTION) {\n            geometries = /** @type {GeometryCollection} */ (geometry).getGeometriesArray();\n        }\n        else {\n            geometries = [geometry];\n        }\n        var features = [];\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            var feature = new Feature();\n            feature.setGeometry(geometries[i]);\n            features.push(feature);\n        }\n        return features;\n    };\n    /**\n     * @param {string} text Text.\n     * @param {import(\"./Feature.js\").ReadOptions} [opt_options] Read options.\n     * @protected\n     * @return {import(\"../geom/Geometry.js\").default} Geometry.\n     */\n    WKT.prototype.readGeometryFromText = function (text, opt_options) {\n        var geometry = this.parse_(text);\n        return transformGeometryWithOptions(geometry, false, opt_options);\n    };\n    /**\n     * @param {import(\"../Feature.js\").default} feature Features.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    WKT.prototype.writeFeatureText = function (feature, opt_options) {\n        var geometry = feature.getGeometry();\n        if (geometry) {\n            return this.writeGeometryText(geometry, opt_options);\n        }\n        return '';\n    };\n    /**\n     * @param {Array<import(\"../Feature.js\").default>} features Features.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    WKT.prototype.writeFeaturesText = function (features, opt_options) {\n        if (features.length == 1) {\n            return this.writeFeatureText(features[0], opt_options);\n        }\n        var geometries = [];\n        for (var i = 0, ii = features.length; i < ii; ++i) {\n            geometries.push(features[i].getGeometry());\n        }\n        var collection = new GeometryCollection(geometries);\n        return this.writeGeometryText(collection, opt_options);\n    };\n    /**\n     * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     * @param {import(\"./Feature.js\").WriteOptions} [opt_options] Write options.\n     * @protected\n     * @return {string} Text.\n     */\n    WKT.prototype.writeGeometryText = function (geometry, opt_options) {\n        return encode(transformGeometryWithOptions(geometry, true, opt_options));\n    };\n    return WKT;\n}(TextFeature));\n/**\n * @param {Point} geom Point geometry.\n * @return {string} Coordinates part of Point as WKT.\n */\nfunction encodePointGeometry(geom) {\n    var coordinates = geom.getCoordinates();\n    if (coordinates.length === 0) {\n        return '';\n    }\n    return coordinates.join(' ');\n}\n/**\n * @param {MultiPoint} geom MultiPoint geometry.\n * @return {string} Coordinates part of MultiPoint as WKT.\n */\nfunction encodeMultiPointGeometry(geom) {\n    var array = [];\n    var components = geom.getPoints();\n    for (var i = 0, ii = components.length; i < ii; ++i) {\n        array.push('(' + encodePointGeometry(components[i]) + ')');\n    }\n    return array.join(',');\n}\n/**\n * @param {GeometryCollection} geom GeometryCollection geometry.\n * @return {string} Coordinates part of GeometryCollection as WKT.\n */\nfunction encodeGeometryCollectionGeometry(geom) {\n    var array = [];\n    var geoms = geom.getGeometries();\n    for (var i = 0, ii = geoms.length; i < ii; ++i) {\n        array.push(encode(geoms[i]));\n    }\n    return array.join(',');\n}\n/**\n * @param {LineString|import(\"../geom/LinearRing.js\").default} geom LineString geometry.\n * @return {string} Coordinates part of LineString as WKT.\n */\nfunction encodeLineStringGeometry(geom) {\n    var coordinates = geom.getCoordinates();\n    var array = [];\n    for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n        array.push(coordinates[i].join(' '));\n    }\n    return array.join(',');\n}\n/**\n * @param {MultiLineString} geom MultiLineString geometry.\n * @return {string} Coordinates part of MultiLineString as WKT.\n */\nfunction encodeMultiLineStringGeometry(geom) {\n    var array = [];\n    var components = geom.getLineStrings();\n    for (var i = 0, ii = components.length; i < ii; ++i) {\n        array.push('(' + encodeLineStringGeometry(components[i]) + ')');\n    }\n    return array.join(',');\n}\n/**\n * @param {Polygon} geom Polygon geometry.\n * @return {string} Coordinates part of Polygon as WKT.\n */\nfunction encodePolygonGeometry(geom) {\n    var array = [];\n    var rings = geom.getLinearRings();\n    for (var i = 0, ii = rings.length; i < ii; ++i) {\n        array.push('(' + encodeLineStringGeometry(rings[i]) + ')');\n    }\n    return array.join(',');\n}\n/**\n * @param {MultiPolygon} geom MultiPolygon geometry.\n * @return {string} Coordinates part of MultiPolygon as WKT.\n */\nfunction encodeMultiPolygonGeometry(geom) {\n    var array = [];\n    var components = geom.getPolygons();\n    for (var i = 0, ii = components.length; i < ii; ++i) {\n        array.push('(' + encodePolygonGeometry(components[i]) + ')');\n    }\n    return array.join(',');\n}\n/**\n * @param {import(\"../geom/SimpleGeometry.js\").default} geom SimpleGeometry geometry.\n * @return {string} Potential dimensional information for WKT type.\n */\nfunction encodeGeometryLayout(geom) {\n    var layout = geom.getLayout();\n    var dimInfo = '';\n    if (layout === GeometryLayout.XYZ || layout === GeometryLayout.XYZM) {\n        dimInfo += Z;\n    }\n    if (layout === GeometryLayout.XYM || layout === GeometryLayout.XYZM) {\n        dimInfo += M;\n    }\n    return dimInfo;\n}\n/**\n * @const\n * @type {Object<string, function(import(\"../geom/Geometry.js\").default): string>}\n */\nvar GeometryEncoder = {\n    'Point': encodePointGeometry,\n    'LineString': encodeLineStringGeometry,\n    'Polygon': encodePolygonGeometry,\n    'MultiPoint': encodeMultiPointGeometry,\n    'MultiLineString': encodeMultiLineStringGeometry,\n    'MultiPolygon': encodeMultiPolygonGeometry,\n    'GeometryCollection': encodeGeometryCollectionGeometry,\n};\n/**\n * Encode a geometry as WKT.\n * @param {import(\"../geom/Geometry.js\").default} geom The geometry to encode.\n * @return {string} WKT string for the geometry.\n */\nfunction encode(geom) {\n    var type = geom.getType();\n    var geometryEncoder = GeometryEncoder[type];\n    var enc = geometryEncoder(geom);\n    type = type.toUpperCase();\n    if (typeof ( /** @type {?} */(geom).getFlatCoordinates) === 'function') {\n        var dimInfo = encodeGeometryLayout(\n        /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (geom));\n        if (dimInfo.length > 0) {\n            type += ' ' + dimInfo;\n        }\n    }\n    if (enc.length === 0) {\n        return type + ' ' + EMPTY;\n    }\n    return type + '(' + enc + ')';\n}\nexport default WKT;\n//# sourceMappingURL=WKT.js.map","var getPrototypeOf = require(\"./getPrototypeOf\");\n\nfunction _superPropBase(object, property) {\n  while (!Object.prototype.hasOwnProperty.call(object, property)) {\n    object = getPrototypeOf(object);\n    if (object === null) break;\n  }\n\n  return object;\n}\n\nmodule.exports = _superPropBase;","/*!\n * jquery.fancytree.dnd5.js\n *\n * Drag-and-drop support (native HTML5).\n * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/)\n *\n * Copyright (c) 2008-2020, Martin Wendt (https://wwWendt.de)\n *\n * Released under the MIT license\n * https://github.com/mar10/fancytree/wiki/LicenseInfo\n *\n * @version 2.36.1\n * @date 2020-07-25T09:03:47Z\n */\n\n/*\n #TODO\n\tCompatiblity when dragging between *separate* windows:\n\n\t\t   Drag from Chrome   Edge    FF    IE11    Safari\n\t  To Chrome      ok       ok      ok    NO      ?\n\t\t Edge        ok       ok      ok    NO      ?\n\t\t FF          ok       ok      ok    NO      ?\n\t\t IE 11       ok       ok      ok    ok      ?\n\t\t Safari      ?        ?       ?     ?       ok\n\n */\n\n(function(factory) {\n\tif (typeof define === \"function\" && define.amd) {\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine([\"jquery\", \"./jquery.fancytree\"], factory);\n\t} else if (typeof module === \"object\" && module.exports) {\n\t\t// Node/CommonJS\n\t\trequire(\"./jquery.fancytree\");\n\t\tmodule.exports = factory(require(\"jquery\"));\n\t} else {\n\t\t// Browser globals\n\t\tfactory(jQuery);\n\t}\n})(function($) {\n\t\"use strict\";\n\n\t/******************************************************************************\n\t * Private functions and variables\n\t */\n\tvar FT = $.ui.fancytree,\n\t\tisMac = /Mac/.test(navigator.platform),\n\t\tclassDragSource = \"fancytree-drag-source\",\n\t\tclassDragRemove = \"fancytree-drag-remove\",\n\t\tclassDropAccept = \"fancytree-drop-accept\",\n\t\tclassDropAfter = \"fancytree-drop-after\",\n\t\tclassDropBefore = \"fancytree-drop-before\",\n\t\tclassDropOver = \"fancytree-drop-over\",\n\t\tclassDropReject = \"fancytree-drop-reject\",\n\t\tclassDropTarget = \"fancytree-drop-target\",\n\t\tnodeMimeType = \"application/x-fancytree-node\",\n\t\t$dropMarker = null,\n\t\t$dragImage,\n\t\t$extraHelper,\n\t\tSOURCE_NODE = null,\n\t\tSOURCE_NODE_LIST = null,\n\t\t$sourceList = null,\n\t\tDRAG_ENTER_RESPONSE = null,\n\t\t// SESSION_DATA = null, // plain object passed to events as `data`\n\t\tSUGGESTED_DROP_EFFECT = null,\n\t\tREQUESTED_DROP_EFFECT = null,\n\t\tREQUESTED_EFFECT_ALLOWED = null,\n\t\tLAST_HIT_MODE = null,\n\t\tDRAG_OVER_STAMP = null; // Time when a node entered the 'over' hitmode\n\n\t/* */\n\tfunction _clearGlobals() {\n\t\tDRAG_ENTER_RESPONSE = null;\n\t\tDRAG_OVER_STAMP = null;\n\t\tREQUESTED_DROP_EFFECT = null;\n\t\tREQUESTED_EFFECT_ALLOWED = null;\n\t\tSUGGESTED_DROP_EFFECT = null;\n\t\tSOURCE_NODE = null;\n\t\tSOURCE_NODE_LIST = null;\n\t\tif ($sourceList) {\n\t\t\t$sourceList.removeClass(classDragSource + \" \" + classDragRemove);\n\t\t}\n\t\t$sourceList = null;\n\t\tif ($dropMarker) {\n\t\t\t$dropMarker.hide();\n\t\t}\n\t\t// Take this badge off of me - I can't use it anymore:\n\t\tif ($extraHelper) {\n\t\t\t$extraHelper.remove();\n\t\t\t$extraHelper = null;\n\t\t}\n\t}\n\n\t/* Convert number to string and prepend +/-; return empty string for 0.*/\n\tfunction offsetString(n) {\n\t\t// eslint-disable-next-line no-nested-ternary\n\t\treturn n === 0 ? \"\" : n > 0 ? \"+\" + n : \"\" + n;\n\t}\n\n\t/* Convert a dragEnter() or dragOver() response to a canonical form.\n\t * Return false or plain object\n\t * @param {string|object|boolean} r\n\t * @return {object|false}\n\t */\n\tfunction normalizeDragEnterResponse(r) {\n\t\tvar res;\n\n\t\tif (!r) {\n\t\t\treturn false;\n\t\t}\n\t\tif ($.isPlainObject(r)) {\n\t\t\tres = {\n\t\t\t\tover: !!r.over,\n\t\t\t\tbefore: !!r.before,\n\t\t\t\tafter: !!r.after,\n\t\t\t};\n\t\t} else if ($.isArray(r)) {\n\t\t\tres = {\n\t\t\t\tover: $.inArray(\"over\", r) >= 0,\n\t\t\t\tbefore: $.inArray(\"before\", r) >= 0,\n\t\t\t\tafter: $.inArray(\"after\", r) >= 0,\n\t\t\t};\n\t\t} else {\n\t\t\tres = {\n\t\t\t\tover: r === true || r === \"over\",\n\t\t\t\tbefore: r === true || r === \"before\",\n\t\t\t\tafter: r === true || r === \"after\",\n\t\t\t};\n\t\t}\n\t\tif (Object.keys(res).length === 0) {\n\t\t\treturn false;\n\t\t}\n\t\t// if( Object.keys(res).length === 1 ) {\n\t\t// \tres.unique = res[0];\n\t\t// }\n\t\treturn res;\n\t}\n\n\t/* Convert a dataTransfer.effectAllowed to a canonical form.\n\t * Return false or plain object\n\t * @param {string|boolean} r\n\t * @return {object|false}\n\t */\n\t// function normalizeEffectAllowed(r) {\n\t// \tif (!r || r === \"none\") {\n\t// \t\treturn false;\n\t// \t}\n\t// \tvar all = r === \"all\",\n\t// \t\tres = {\n\t// \t\t\tcopy: all || /copy/i.test(r),\n\t// \t\t\tlink: all || /link/i.test(r),\n\t// \t\t\tmove: all || /move/i.test(r),\n\t// \t\t};\n\n\t// \treturn res;\n\t// }\n\n\t/* Implement auto scrolling when drag cursor is in top/bottom area of scroll parent. */\n\tfunction autoScroll(tree, event) {\n\t\tvar spOfs,\n\t\t\tscrollTop,\n\t\t\tdelta,\n\t\t\tdndOpts = tree.options.dnd5,\n\t\t\tsp = tree.$scrollParent[0],\n\t\t\tsensitivity = dndOpts.scrollSensitivity,\n\t\t\tspeed = dndOpts.scrollSpeed,\n\t\t\tscrolled = 0;\n\n\t\tif (sp !== document && sp.tagName !== \"HTML\") {\n\t\t\tspOfs = tree.$scrollParent.offset();\n\t\t\tscrollTop = sp.scrollTop;\n\t\t\tif (spOfs.top + sp.offsetHeight - event.pageY < sensitivity) {\n\t\t\t\tdelta =\n\t\t\t\t\tsp.scrollHeight -\n\t\t\t\t\ttree.$scrollParent.innerHeight() -\n\t\t\t\t\tscrollTop;\n\t\t\t\t// console.log (\"sp.offsetHeight: \" + sp.offsetHeight\n\t\t\t\t// \t+ \", spOfs.top: \" + spOfs.top\n\t\t\t\t// \t+ \", scrollTop: \" + scrollTop\n\t\t\t\t// \t+ \", innerHeight: \" + tree.$scrollParent.innerHeight()\n\t\t\t\t// \t+ \", scrollHeight: \" + sp.scrollHeight\n\t\t\t\t// \t+ \", delta: \" + delta\n\t\t\t\t// \t);\n\t\t\t\tif (delta > 0) {\n\t\t\t\t\tsp.scrollTop = scrolled = scrollTop + speed;\n\t\t\t\t}\n\t\t\t} else if (scrollTop > 0 && event.pageY - spOfs.top < sensitivity) {\n\t\t\t\tsp.scrollTop = scrolled = scrollTop - speed;\n\t\t\t}\n\t\t} else {\n\t\t\tscrollTop = $(document).scrollTop();\n\t\t\tif (scrollTop > 0 && event.pageY - scrollTop < sensitivity) {\n\t\t\t\tscrolled = scrollTop - speed;\n\t\t\t\t$(document).scrollTop(scrolled);\n\t\t\t} else if (\n\t\t\t\t$(window).height() - (event.pageY - scrollTop) <\n\t\t\t\tsensitivity\n\t\t\t) {\n\t\t\t\tscrolled = scrollTop + speed;\n\t\t\t\t$(document).scrollTop(scrolled);\n\t\t\t}\n\t\t}\n\t\tif (scrolled) {\n\t\t\ttree.debug(\"autoScroll: \" + scrolled + \"px\");\n\t\t}\n\t\treturn scrolled;\n\t}\n\n\t/* Guess dropEffect from modifier keys.\n\t * Using rules suggested here:\n\t *     https://ux.stackexchange.com/a/83769\n\t * @returns\n\t *     'copy', 'link', 'move', or 'none'\n\t */\n\tfunction evalEffectModifiers(tree, event, effectDefault) {\n\t\tvar res = effectDefault;\n\n\t\tif (isMac) {\n\t\t\tif (event.metaKey && event.altKey) {\n\t\t\t\t// Mac: [Control] + [Option]\n\t\t\t\tres = \"link\";\n\t\t\t} else if (event.ctrlKey) {\n\t\t\t\t// Chrome on Mac: [Control]\n\t\t\t\tres = \"link\";\n\t\t\t} else if (event.metaKey) {\n\t\t\t\t// Mac: [Command]\n\t\t\t\tres = \"move\";\n\t\t\t} else if (event.altKey) {\n\t\t\t\t// Mac: [Option]\n\t\t\t\tres = \"copy\";\n\t\t\t}\n\t\t} else {\n\t\t\tif (event.ctrlKey) {\n\t\t\t\t// Windows: [Ctrl]\n\t\t\t\tres = \"copy\";\n\t\t\t} else if (event.shiftKey) {\n\t\t\t\t// Windows: [Shift]\n\t\t\t\tres = \"move\";\n\t\t\t} else if (event.altKey) {\n\t\t\t\t// Windows: [Alt]\n\t\t\t\tres = \"link\";\n\t\t\t}\n\t\t}\n\t\tif (res !== SUGGESTED_DROP_EFFECT) {\n\t\t\ttree.info(\n\t\t\t\t\"evalEffectModifiers: \" +\n\t\t\t\t\tevent.type +\n\t\t\t\t\t\" - evalEffectModifiers(): \" +\n\t\t\t\t\tSUGGESTED_DROP_EFFECT +\n\t\t\t\t\t\" -> \" +\n\t\t\t\t\tres\n\t\t\t);\n\t\t}\n\t\tSUGGESTED_DROP_EFFECT = res;\n\t\t// tree.debug(\"evalEffectModifiers: \" + res);\n\t\treturn res;\n\t}\n\t/*\n\t * Check if the previous callback (dragEnter, dragOver, ...) has changed\n\t * the `data` object and apply those settings.\n\t *\n\t * Safari:\n\t *     It seems that `dataTransfer.dropEffect` can only be set on dragStart, and will remain\n\t *     even if the cursor changes when [Alt] or [Ctrl] are pressed (?)\n\t * Using rules suggested here:\n\t *     https://ux.stackexchange.com/a/83769\n\t * @returns\n\t *     'copy', 'link', 'move', or 'none'\n\t */\n\tfunction prepareDropEffectCallback(event, data) {\n\t\tvar tree = data.tree,\n\t\t\tdataTransfer = data.dataTransfer;\n\n\t\tif (event.type === \"dragstart\") {\n\t\t\tdata.effectAllowed = tree.options.dnd5.effectAllowed;\n\t\t\tdata.dropEffect = tree.options.dnd5.dropEffectDefault;\n\t\t} else {\n\t\t\tdata.effectAllowed = REQUESTED_EFFECT_ALLOWED;\n\t\t\tdata.dropEffect = REQUESTED_DROP_EFFECT;\n\t\t}\n\t\tdata.dropEffectSuggested = evalEffectModifiers(\n\t\t\ttree,\n\t\t\tevent,\n\t\t\ttree.options.dnd5.dropEffectDefault\n\t\t);\n\t\tdata.isMove = data.dropEffect === \"move\";\n\t\tdata.files = dataTransfer.files || [];\n\n\t\t// if (REQUESTED_EFFECT_ALLOWED !== dataTransfer.effectAllowed) {\n\t\t// \ttree.warn(\n\t\t// \t\t\"prepareDropEffectCallback(\" +\n\t\t// \t\t\tevent.type +\n\t\t// \t\t\t\"): dataTransfer.effectAllowed changed from \" +\n\t\t// \t\t\tREQUESTED_EFFECT_ALLOWED +\n\t\t// \t\t\t\" -> \" +\n\t\t// \t\t\tdataTransfer.effectAllowed\n\t\t// \t);\n\t\t// }\n\t\t// if (REQUESTED_DROP_EFFECT !== dataTransfer.dropEffect) {\n\t\t// \ttree.warn(\n\t\t// \t\t\"prepareDropEffectCallback(\" +\n\t\t// \t\t\tevent.type +\n\t\t// \t\t\t\"): dataTransfer.dropEffect changed from requested \" +\n\t\t// \t\t\tREQUESTED_DROP_EFFECT +\n\t\t// \t\t\t\" to \" +\n\t\t// \t\t\tdataTransfer.dropEffect\n\t\t// \t);\n\t\t// }\n\t}\n\n\tfunction applyDropEffectCallback(event, data, allowDrop) {\n\t\tvar tree = data.tree,\n\t\t\tdataTransfer = data.dataTransfer;\n\n\t\tif (\n\t\t\tevent.type !== \"dragstart\" &&\n\t\t\tREQUESTED_EFFECT_ALLOWED !== data.effectAllowed\n\t\t) {\n\t\t\ttree.warn(\n\t\t\t\t\"effectAllowed should only be changed in dragstart event: \" +\n\t\t\t\t\tevent.type +\n\t\t\t\t\t\": data.effectAllowed changed from \" +\n\t\t\t\t\tREQUESTED_EFFECT_ALLOWED +\n\t\t\t\t\t\" -> \" +\n\t\t\t\t\tdata.effectAllowed\n\t\t\t);\n\t\t}\n\n\t\tif (allowDrop === false) {\n\t\t\ttree.info(\"applyDropEffectCallback: allowDrop === false\");\n\t\t\tdata.effectAllowed = \"none\";\n\t\t\tdata.dropEffect = \"none\";\n\t\t}\n\t\t// if (REQUESTED_DROP_EFFECT !== data.dropEffect) {\n\t\t// \ttree.debug(\n\t\t// \t\t\"applyDropEffectCallback(\" +\n\t\t// \t\t\tevent.type +\n\t\t// \t\t\t\"): data.dropEffect changed from previous \" +\n\t\t// \t\t\tREQUESTED_DROP_EFFECT +\n\t\t// \t\t\t\" to \" +\n\t\t// \t\t\tdata.dropEffect\n\t\t// \t);\n\t\t// }\n\n\t\tdata.isMove = data.dropEffect === \"move\";\n\t\t// data.isMove = data.dropEffectSuggested === \"move\";\n\n\t\t// `effectAllowed` must only be defined in dragstart event, so we\n\t\t// store it in a global variable for reference\n\t\tif (event.type === \"dragstart\") {\n\t\t\tREQUESTED_EFFECT_ALLOWED = data.effectAllowed;\n\t\t\tREQUESTED_DROP_EFFECT = data.dropEffect;\n\t\t}\n\n\t\t// if (REQUESTED_DROP_EFFECT !== dataTransfer.dropEffect) {\n\t\t// \tdata.tree.info(\n\t\t// \t\t\"applyDropEffectCallback(\" +\n\t\t// \t\t\tevent.type +\n\t\t// \t\t\t\"): dataTransfer.dropEffect changed from \" +\n\t\t// \t\t\tREQUESTED_DROP_EFFECT +\n\t\t// \t\t\t\" -> \" +\n\t\t// \t\t\tdataTransfer.dropEffect\n\t\t// \t);\n\t\t// }\n\t\tdataTransfer.effectAllowed = REQUESTED_EFFECT_ALLOWED;\n\t\tdataTransfer.dropEffect = REQUESTED_DROP_EFFECT;\n\n\t\t// tree.debug(\n\t\t// \t\"applyDropEffectCallback(\" +\n\t\t// \t\tevent.type +\n\t\t// \t\t\"): set \" +\n\t\t// \t\tdataTransfer.dropEffect +\n\t\t// \t\t\"/\" +\n\t\t// \t\tdataTransfer.effectAllowed\n\t\t// );\n\t\t// if (REQUESTED_DROP_EFFECT !== dataTransfer.dropEffect) {\n\t\t// \tdata.tree.warn(\n\t\t// \t\t\"applyDropEffectCallback(\" +\n\t\t// \t\t\tevent.type +\n\t\t// \t\t\t\"): could not set dataTransfer.dropEffect to \" +\n\t\t// \t\t\tREQUESTED_DROP_EFFECT +\n\t\t// \t\t\t\": got \" +\n\t\t// \t\t\tdataTransfer.dropEffect\n\t\t// \t);\n\t\t// }\n\t\treturn REQUESTED_DROP_EFFECT;\n\t}\n\n\t/* Handle dragover event (fired every x ms) on valid drop targets.\n\t *\n\t * - Auto-scroll when cursor is in border regions\n\t * - Apply restrictioan like 'preventVoidMoves'\n\t * - Calculate hit mode\n\t * - Calculate drop effect\n\t * - Trigger dragOver() callback to let user modify hit mode and drop effect\n\t * - Adjust the drop marker accordingly\n\t *\n\t * @returns hitMode\n\t */\n\tfunction handleDragOver(event, data) {\n\t\t// Implement auto-scrolling\n\t\tif (data.options.dnd5.scroll) {\n\t\t\tautoScroll(data.tree, event);\n\t\t}\n\t\t// Bail out with previous response if we get an invalid dragover\n\t\tif (!data.node) {\n\t\t\tdata.tree.warn(\"Ignored dragover for non-node\"); //, event, data);\n\t\t\treturn LAST_HIT_MODE;\n\t\t}\n\n\t\tvar markerOffsetX,\n\t\t\tnodeOfs,\n\t\t\tpos,\n\t\t\trelPosY,\n\t\t\thitMode = null,\n\t\t\ttree = data.tree,\n\t\t\toptions = tree.options,\n\t\t\tdndOpts = options.dnd5,\n\t\t\ttargetNode = data.node,\n\t\t\tsourceNode = data.otherNode,\n\t\t\tmarkerAt = \"center\",\n\t\t\t$target = $(targetNode.span),\n\t\t\t$targetTitle = $target.find(\"span.fancytree-title\");\n\n\t\tif (DRAG_ENTER_RESPONSE === false) {\n\t\t\ttree.debug(\"Ignored dragover, since dragenter returned false.\");\n\t\t\treturn false;\n\t\t} else if (typeof DRAG_ENTER_RESPONSE === \"string\") {\n\t\t\t$.error(\"assert failed: dragenter returned string\");\n\t\t}\n\t\t// Calculate hitMode from relative cursor position.\n\t\tnodeOfs = $target.offset();\n\t\trelPosY = (event.pageY - nodeOfs.top) / $target.height();\n\t\tif (event.pageY === undefined) {\n\t\t\ttree.warn(\"event.pageY is undefined: see issue #1013.\");\n\t\t}\n\n\t\tif (DRAG_ENTER_RESPONSE.after && relPosY > 0.75) {\n\t\t\thitMode = \"after\";\n\t\t} else if (\n\t\t\t!DRAG_ENTER_RESPONSE.over &&\n\t\t\tDRAG_ENTER_RESPONSE.after &&\n\t\t\trelPosY > 0.5\n\t\t) {\n\t\t\thitMode = \"after\";\n\t\t} else if (DRAG_ENTER_RESPONSE.before && relPosY <= 0.25) {\n\t\t\thitMode = \"before\";\n\t\t} else if (\n\t\t\t!DRAG_ENTER_RESPONSE.over &&\n\t\t\tDRAG_ENTER_RESPONSE.before &&\n\t\t\trelPosY <= 0.5\n\t\t) {\n\t\t\thitMode = \"before\";\n\t\t} else if (DRAG_ENTER_RESPONSE.over) {\n\t\t\thitMode = \"over\";\n\t\t}\n\t\t// Prevent no-ops like 'before source node'\n\t\t// TODO: these are no-ops when moving nodes, but not in copy mode\n\t\tif (dndOpts.preventVoidMoves && data.dropEffect === \"move\") {\n\t\t\tif (targetNode === sourceNode) {\n\t\t\t\ttargetNode.debug(\"Drop over source node prevented.\");\n\t\t\t\thitMode = null;\n\t\t\t} else if (\n\t\t\t\thitMode === \"before\" &&\n\t\t\t\tsourceNode &&\n\t\t\t\ttargetNode === sourceNode.getNextSibling()\n\t\t\t) {\n\t\t\t\ttargetNode.debug(\"Drop after source node prevented.\");\n\t\t\t\thitMode = null;\n\t\t\t} else if (\n\t\t\t\thitMode === \"after\" &&\n\t\t\t\tsourceNode &&\n\t\t\t\ttargetNode === sourceNode.getPrevSibling()\n\t\t\t) {\n\t\t\t\ttargetNode.debug(\"Drop before source node prevented.\");\n\t\t\t\thitMode = null;\n\t\t\t} else if (\n\t\t\t\thitMode === \"over\" &&\n\t\t\t\tsourceNode &&\n\t\t\t\tsourceNode.parent === targetNode &&\n\t\t\t\tsourceNode.isLastSibling()\n\t\t\t) {\n\t\t\t\ttargetNode.debug(\"Drop last child over own parent prevented.\");\n\t\t\t\thitMode = null;\n\t\t\t}\n\t\t}\n\t\t// Let callback modify the calculated hitMode\n\t\tdata.hitMode = hitMode;\n\t\tif (hitMode && dndOpts.dragOver) {\n\t\t\tprepareDropEffectCallback(event, data);\n\t\t\tdndOpts.dragOver(targetNode, data);\n\t\t\tvar allowDrop = !!hitMode;\n\t\t\tapplyDropEffectCallback(event, data, allowDrop);\n\t\t\thitMode = data.hitMode;\n\t\t}\n\t\tLAST_HIT_MODE = hitMode;\n\t\t//\n\t\tif (hitMode === \"after\" || hitMode === \"before\" || hitMode === \"over\") {\n\t\t\tmarkerOffsetX = dndOpts.dropMarkerOffsetX || 0;\n\t\t\tswitch (hitMode) {\n\t\t\t\tcase \"before\":\n\t\t\t\t\tmarkerAt = \"top\";\n\t\t\t\t\tmarkerOffsetX += dndOpts.dropMarkerInsertOffsetX || 0;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"after\":\n\t\t\t\t\tmarkerAt = \"bottom\";\n\t\t\t\t\tmarkerOffsetX += dndOpts.dropMarkerInsertOffsetX || 0;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tpos = {\n\t\t\t\tmy: \"left\" + offsetString(markerOffsetX) + \" center\",\n\t\t\t\tat: \"left \" + markerAt,\n\t\t\t\tof: $targetTitle,\n\t\t\t};\n\t\t\tif (options.rtl) {\n\t\t\t\tpos.my = \"right\" + offsetString(-markerOffsetX) + \" center\";\n\t\t\t\tpos.at = \"right \" + markerAt;\n\t\t\t\t// console.log(\"rtl\", pos);\n\t\t\t}\n\t\t\t$dropMarker\n\t\t\t\t.toggleClass(classDropAfter, hitMode === \"after\")\n\t\t\t\t.toggleClass(classDropOver, hitMode === \"over\")\n\t\t\t\t.toggleClass(classDropBefore, hitMode === \"before\")\n\t\t\t\t.show()\n\t\t\t\t.position(FT.fixPositionOptions(pos));\n\t\t} else {\n\t\t\t$dropMarker.hide();\n\t\t\t// console.log(\"hide dropmarker\")\n\t\t}\n\n\t\t$(targetNode.span)\n\t\t\t.toggleClass(\n\t\t\t\tclassDropTarget,\n\t\t\t\thitMode === \"after\" ||\n\t\t\t\t\thitMode === \"before\" ||\n\t\t\t\t\thitMode === \"over\"\n\t\t\t)\n\t\t\t.toggleClass(classDropAfter, hitMode === \"after\")\n\t\t\t.toggleClass(classDropBefore, hitMode === \"before\")\n\t\t\t.toggleClass(classDropAccept, hitMode === \"over\")\n\t\t\t.toggleClass(classDropReject, hitMode === false);\n\n\t\treturn hitMode;\n\t}\n\n\t/*\n\t * Handle dragstart drag dragend events on the container\n\t */\n\tfunction onDragEvent(event) {\n\t\tvar json,\n\t\t\ttree = this,\n\t\t\tdndOpts = tree.options.dnd5,\n\t\t\tnode = FT.getNode(event),\n\t\t\tdataTransfer =\n\t\t\t\tevent.dataTransfer || event.originalEvent.dataTransfer,\n\t\t\tdata = {\n\t\t\t\ttree: tree,\n\t\t\t\tnode: node,\n\t\t\t\toptions: tree.options,\n\t\t\t\toriginalEvent: event.originalEvent,\n\t\t\t\twidget: tree.widget,\n\t\t\t\tdataTransfer: dataTransfer,\n\t\t\t\tuseDefaultImage: true,\n\t\t\t\tdropEffect: undefined,\n\t\t\t\tdropEffectSuggested: undefined,\n\t\t\t\teffectAllowed: undefined, // set by dragstart\n\t\t\t\tfiles: undefined, // only for drop events\n\t\t\t\tisCancelled: undefined, // set by dragend\n\t\t\t\tisMove: undefined,\n\t\t\t};\n\n\t\tswitch (event.type) {\n\t\t\tcase \"dragstart\":\n\t\t\t\tif (!node) {\n\t\t\t\t\ttree.info(\"Ignored dragstart on a non-node.\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// Store current source node in different formats\n\t\t\t\tSOURCE_NODE = node;\n\n\t\t\t\t// Also optionally store selected nodes\n\t\t\t\tif (dndOpts.multiSource === false) {\n\t\t\t\t\tSOURCE_NODE_LIST = [node];\n\t\t\t\t} else if (dndOpts.multiSource === true) {\n\t\t\t\t\tSOURCE_NODE_LIST = tree.getSelectedNodes();\n\t\t\t\t\tif (!node.isSelected()) {\n\t\t\t\t\t\tSOURCE_NODE_LIST.unshift(node);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tSOURCE_NODE_LIST = dndOpts.multiSource(node, data);\n\t\t\t\t}\n\t\t\t\t// Cache as array of jQuery objects for faster access:\n\t\t\t\t$sourceList = $(\n\t\t\t\t\t$.map(SOURCE_NODE_LIST, function(n) {\n\t\t\t\t\t\treturn n.span;\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t\t// Set visual feedback\n\t\t\t\t$sourceList.addClass(classDragSource);\n\n\t\t\t\t// Set payload\n\t\t\t\t// Note:\n\t\t\t\t// Transfer data is only accessible on dragstart and drop!\n\t\t\t\t// For all other events the formats and kinds in the drag\n\t\t\t\t// data store list of items representing dragged data can be\n\t\t\t\t// enumerated, but the data itself is unavailable and no new\n\t\t\t\t// data can be added.\n\t\t\t\tvar nodeData = node.toDict();\n\t\t\t\tnodeData.treeId = node.tree._id;\n\t\t\t\tjson = JSON.stringify(nodeData);\n\t\t\t\ttry {\n\t\t\t\t\tdataTransfer.setData(nodeMimeType, json);\n\t\t\t\t\tdataTransfer.setData(\"text/html\", $(node.span).html());\n\t\t\t\t\tdataTransfer.setData(\"text/plain\", node.title);\n\t\t\t\t} catch (ex) {\n\t\t\t\t\t// IE only accepts 'text' type\n\t\t\t\t\ttree.warn(\n\t\t\t\t\t\t\"Could not set data (IE only accepts 'text') - \" + ex\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// We always need to set the 'text' type if we want to drag\n\t\t\t\t// Because IE 11 only accepts this single type.\n\t\t\t\t// If we pass JSON here, IE can can access all node properties,\n\t\t\t\t// even when the source lives in another window. (D'n'd inside\n\t\t\t\t// the same window will always work.)\n\t\t\t\t// The drawback is, that in this case ALL browsers will see\n\t\t\t\t// the JSON representation as 'text', so dragging\n\t\t\t\t// to a text field will insert the JSON string instead of\n\t\t\t\t// the node title.\n\t\t\t\tif (dndOpts.setTextTypeJson) {\n\t\t\t\t\tdataTransfer.setData(\"text\", json);\n\t\t\t\t} else {\n\t\t\t\t\tdataTransfer.setData(\"text\", node.title);\n\t\t\t\t}\n\n\t\t\t\t// Set the allowed drag modes (combinations of move, copy, and link)\n\t\t\t\t// (effectAllowed can only be set in the dragstart event.)\n\t\t\t\t// This can be overridden in the dragStart() callback\n\t\t\t\tprepareDropEffectCallback(event, data);\n\n\t\t\t\t// Let user cancel or modify above settings\n\t\t\t\t// Realize potential changes by previous callback\n\t\t\t\tif (dndOpts.dragStart(node, data) === false) {\n\t\t\t\t\t// Cancel dragging\n\t\t\t\t\t// dataTransfer.dropEffect = \"none\";\n\t\t\t\t\t_clearGlobals();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tapplyDropEffectCallback(event, data);\n\n\t\t\t\t// Unless user set `data.useDefaultImage` to false in dragStart,\n\t\t\t\t// generata a default drag image now:\n\t\t\t\t$extraHelper = null;\n\n\t\t\t\tif (data.useDefaultImage) {\n\t\t\t\t\t// Set the title as drag image (otherwise it would contain the expander)\n\t\t\t\t\t$dragImage = $(node.span).find(\".fancytree-title\");\n\n\t\t\t\t\tif (SOURCE_NODE_LIST && SOURCE_NODE_LIST.length > 1) {\n\t\t\t\t\t\t// Add a counter badge to node title if dragging more than one node.\n\t\t\t\t\t\t// We want this, because the element that is used as drag image\n\t\t\t\t\t\t// must be *visible* in the DOM, so we cannot create some hidden\n\t\t\t\t\t\t// custom markup.\n\t\t\t\t\t\t// See https://kryogenix.org/code/browser/custom-drag-image.html\n\t\t\t\t\t\t// Also, since IE 11 and Edge don't support setDragImage() alltogether,\n\t\t\t\t\t\t// it gives som feedback to the user.\n\t\t\t\t\t\t// The badge will be removed later on drag end.\n\t\t\t\t\t\t$extraHelper = $(\n\t\t\t\t\t\t\t\"<span class='fancytree-childcounter'/>\"\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\t.text(\"+\" + (SOURCE_NODE_LIST.length - 1))\n\t\t\t\t\t\t\t.appendTo($dragImage);\n\t\t\t\t\t}\n\t\t\t\t\tif (dataTransfer.setDragImage) {\n\t\t\t\t\t\t// IE 11 and Edge do not support this\n\t\t\t\t\t\tdataTransfer.setDragImage($dragImage[0], -10, -10);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true;\n\n\t\t\tcase \"drag\":\n\t\t\t\t// Called every few milliseconds (no matter if the\n\t\t\t\t// cursor is over a valid drop target)\n\t\t\t\t// data.tree.info(\"drag\", SOURCE_NODE)\n\t\t\t\tprepareDropEffectCallback(event, data);\n\t\t\t\tdndOpts.dragDrag(node, data);\n\t\t\t\tapplyDropEffectCallback(event, data);\n\n\t\t\t\t$sourceList.toggleClass(classDragRemove, data.isMove);\n\t\t\t\tbreak;\n\n\t\t\tcase \"dragend\":\n\t\t\t\t// Called at the end of a d'n'd process (after drop)\n\t\t\t\t// Note caveat: If drop removed the dragged source element,\n\t\t\t\t// we may not get this event, since the target does not exist\n\t\t\t\t// anymore\n\t\t\t\tprepareDropEffectCallback(event, data);\n\n\t\t\t\t_clearGlobals();\n\n\t\t\t\tdata.isCancelled = !LAST_HIT_MODE;\n\t\t\t\tdndOpts.dragEnd(node, data, !LAST_HIT_MODE);\n\t\t\t\t// applyDropEffectCallback(event, data);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\t/*\n\t * Handle dragenter dragover dragleave drop events on the container\n\t */\n\tfunction onDropEvent(event) {\n\t\tvar json,\n\t\t\tallowAutoExpand,\n\t\t\tnodeData,\n\t\t\tisSourceFtNode,\n\t\t\tr,\n\t\t\tres,\n\t\t\ttree = this,\n\t\t\tdndOpts = tree.options.dnd5,\n\t\t\tallowDrop = null,\n\t\t\tnode = FT.getNode(event),\n\t\t\tdataTransfer =\n\t\t\t\tevent.dataTransfer || event.originalEvent.dataTransfer,\n\t\t\tdata = {\n\t\t\t\ttree: tree,\n\t\t\t\tnode: node,\n\t\t\t\toptions: tree.options,\n\t\t\t\toriginalEvent: event.originalEvent,\n\t\t\t\twidget: tree.widget,\n\t\t\t\thitMode: DRAG_ENTER_RESPONSE,\n\t\t\t\tdataTransfer: dataTransfer,\n\t\t\t\totherNode: SOURCE_NODE || null,\n\t\t\t\totherNodeList: SOURCE_NODE_LIST || null,\n\t\t\t\totherNodeData: null, // set by drop event\n\t\t\t\tuseDefaultImage: true,\n\t\t\t\tdropEffect: undefined,\n\t\t\t\tdropEffectSuggested: undefined,\n\t\t\t\teffectAllowed: undefined, // set by dragstart\n\t\t\t\tfiles: null, // list of File objects (may be [])\n\t\t\t\tisCancelled: undefined, // set by drop event\n\t\t\t\tisMove: undefined,\n\t\t\t};\n\n\t\t// data.isMove = dropEffect === \"move\";\n\n\t\tswitch (event.type) {\n\t\t\tcase \"dragenter\":\n\t\t\t\t// The dragenter event is fired when a dragged element or\n\t\t\t\t// text selection enters a valid drop target.\n\n\t\t\t\tDRAG_OVER_STAMP = null;\n\t\t\t\tif (!node) {\n\t\t\t\t\t// Sometimes we get dragenter for the container element\n\t\t\t\t\ttree.debug(\n\t\t\t\t\t\t\"Ignore non-node \" +\n\t\t\t\t\t\t\tevent.type +\n\t\t\t\t\t\t\t\": \" +\n\t\t\t\t\t\t\tevent.target.tagName +\n\t\t\t\t\t\t\t\".\" +\n\t\t\t\t\t\t\tevent.target.className\n\t\t\t\t\t);\n\t\t\t\t\tDRAG_ENTER_RESPONSE = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$(node.span)\n\t\t\t\t\t.addClass(classDropOver)\n\t\t\t\t\t.removeClass(classDropAccept + \" \" + classDropReject);\n\n\t\t\t\t// Data is only readable in the dragstart and drop event,\n\t\t\t\t// but we can check for the type:\n\t\t\t\tisSourceFtNode =\n\t\t\t\t\t$.inArray(nodeMimeType, dataTransfer.types) >= 0;\n\n\t\t\t\tif (dndOpts.preventNonNodes && !isSourceFtNode) {\n\t\t\t\t\tnode.debug(\"Reject dropping a non-node.\");\n\t\t\t\t\tDRAG_ENTER_RESPONSE = false;\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (\n\t\t\t\t\tdndOpts.preventForeignNodes &&\n\t\t\t\t\t(!SOURCE_NODE || SOURCE_NODE.tree !== node.tree)\n\t\t\t\t) {\n\t\t\t\t\tnode.debug(\"Reject dropping a foreign node.\");\n\t\t\t\t\tDRAG_ENTER_RESPONSE = false;\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (\n\t\t\t\t\tdndOpts.preventSameParent &&\n\t\t\t\t\tdata.otherNode &&\n\t\t\t\t\tdata.otherNode.tree === node.tree &&\n\t\t\t\t\tnode.parent === data.otherNode.parent\n\t\t\t\t) {\n\t\t\t\t\tnode.debug(\"Reject dropping as sibling (same parent).\");\n\t\t\t\t\tDRAG_ENTER_RESPONSE = false;\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (\n\t\t\t\t\tdndOpts.preventRecursion &&\n\t\t\t\t\tdata.otherNode &&\n\t\t\t\t\tdata.otherNode.tree === node.tree &&\n\t\t\t\t\tnode.isDescendantOf(data.otherNode)\n\t\t\t\t) {\n\t\t\t\t\tnode.debug(\"Reject dropping below own ancestor.\");\n\t\t\t\t\tDRAG_ENTER_RESPONSE = false;\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (dndOpts.preventLazyParents && !node.isLoaded()) {\n\t\t\t\t\tnode.warn(\"Drop over unloaded target node prevented.\");\n\t\t\t\t\tDRAG_ENTER_RESPONSE = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$dropMarker.show();\n\n\t\t\t\t// Call dragEnter() to figure out if (and where) dropping is allowed\n\t\t\t\tprepareDropEffectCallback(event, data);\n\t\t\t\tr = dndOpts.dragEnter(node, data);\n\n\t\t\t\tres = normalizeDragEnterResponse(r);\n\t\t\t\t// alert(\"res:\" + JSON.stringify(res))\n\t\t\t\tDRAG_ENTER_RESPONSE = res;\n\n\t\t\t\tallowDrop = res && (res.over || res.before || res.after);\n\n\t\t\t\tapplyDropEffectCallback(event, data, allowDrop);\n\t\t\t\tbreak;\n\n\t\t\tcase \"dragover\":\n\t\t\t\tif (!node) {\n\t\t\t\t\ttree.debug(\n\t\t\t\t\t\t\"Ignore non-node \" +\n\t\t\t\t\t\t\tevent.type +\n\t\t\t\t\t\t\t\": \" +\n\t\t\t\t\t\t\tevent.target.tagName +\n\t\t\t\t\t\t\t\".\" +\n\t\t\t\t\t\t\tevent.target.className\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// The dragover event is fired when an element or text\n\t\t\t\t// selection is being dragged over a valid drop target\n\t\t\t\t// (every few hundred milliseconds).\n\t\t\t\t// tree.debug(\n\t\t\t\t// \tevent.type +\n\t\t\t\t// \t\t\": dropEffect: \" +\n\t\t\t\t// \t\tdataTransfer.dropEffect\n\t\t\t\t// );\n\t\t\t\tprepareDropEffectCallback(event, data);\n\t\t\t\tLAST_HIT_MODE = handleDragOver(event, data);\n\n\t\t\t\t// The flag controls the preventDefault() below:\n\t\t\t\tallowDrop = !!LAST_HIT_MODE;\n\t\t\t\tallowAutoExpand =\n\t\t\t\t\tLAST_HIT_MODE === \"over\" || LAST_HIT_MODE === false;\n\n\t\t\t\tif (\n\t\t\t\t\tallowAutoExpand &&\n\t\t\t\t\t!node.expanded &&\n\t\t\t\t\tnode.hasChildren() !== false\n\t\t\t\t) {\n\t\t\t\t\tif (!DRAG_OVER_STAMP) {\n\t\t\t\t\t\tDRAG_OVER_STAMP = Date.now();\n\t\t\t\t\t} else if (\n\t\t\t\t\t\tdndOpts.autoExpandMS &&\n\t\t\t\t\t\tDate.now() - DRAG_OVER_STAMP > dndOpts.autoExpandMS &&\n\t\t\t\t\t\t!node.isLoading() &&\n\t\t\t\t\t\t(!dndOpts.dragExpand ||\n\t\t\t\t\t\t\tdndOpts.dragExpand(node, data) !== false)\n\t\t\t\t\t) {\n\t\t\t\t\t\tnode.setExpanded();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tDRAG_OVER_STAMP = null;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"dragleave\":\n\t\t\t\t// NOTE: dragleave is fired AFTER the dragenter event of the\n\t\t\t\t// FOLLOWING element.\n\t\t\t\tif (!node) {\n\t\t\t\t\ttree.debug(\n\t\t\t\t\t\t\"Ignore non-node \" +\n\t\t\t\t\t\t\tevent.type +\n\t\t\t\t\t\t\t\": \" +\n\t\t\t\t\t\t\tevent.target.tagName +\n\t\t\t\t\t\t\t\".\" +\n\t\t\t\t\t\t\tevent.target.className\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (!$(node.span).hasClass(classDropOver)) {\n\t\t\t\t\tnode.debug(\"Ignore dragleave (multi).\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$(node.span).removeClass(\n\t\t\t\t\tclassDropOver +\n\t\t\t\t\t\t\" \" +\n\t\t\t\t\t\tclassDropAccept +\n\t\t\t\t\t\t\" \" +\n\t\t\t\t\t\tclassDropReject\n\t\t\t\t);\n\t\t\t\tnode.scheduleAction(\"cancel\");\n\t\t\t\tdndOpts.dragLeave(node, data);\n\t\t\t\t$dropMarker.hide();\n\t\t\t\tbreak;\n\n\t\t\tcase \"drop\":\n\t\t\t\t// Data is only readable in the (dragstart and) drop event:\n\n\t\t\t\tif ($.inArray(nodeMimeType, dataTransfer.types) >= 0) {\n\t\t\t\t\tnodeData = dataTransfer.getData(nodeMimeType);\n\t\t\t\t\ttree.info(\n\t\t\t\t\t\tevent.type +\n\t\t\t\t\t\t\t\": getData('application/x-fancytree-node'): '\" +\n\t\t\t\t\t\t\tnodeData +\n\t\t\t\t\t\t\t\"'\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (!nodeData) {\n\t\t\t\t\t// 1. Source is not a Fancytree node, or\n\t\t\t\t\t// 2. If the FT mime type was set, but returns '', this\n\t\t\t\t\t//    is probably IE 11 (which only supports 'text')\n\t\t\t\t\tnodeData = dataTransfer.getData(\"text\");\n\t\t\t\t\ttree.info(\n\t\t\t\t\t\tevent.type + \": getData('text'): '\" + nodeData + \"'\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (nodeData) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// 'text' type may contain JSON if IE is involved\n\t\t\t\t\t\t// and setTextTypeJson option was set\n\t\t\t\t\t\tjson = JSON.parse(nodeData);\n\t\t\t\t\t\tif (json.title !== undefined) {\n\t\t\t\t\t\t\tdata.otherNodeData = json;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\t// assume 'text' type contains plain text, so `otherNodeData`\n\t\t\t\t\t\t// should not be set\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttree.debug(\n\t\t\t\t\tevent.type +\n\t\t\t\t\t\t\": nodeData: '\" +\n\t\t\t\t\t\tnodeData +\n\t\t\t\t\t\t\"', otherNodeData: \",\n\t\t\t\t\tdata.otherNodeData\n\t\t\t\t);\n\n\t\t\t\t$(node.span).removeClass(\n\t\t\t\t\tclassDropOver +\n\t\t\t\t\t\t\" \" +\n\t\t\t\t\t\tclassDropAccept +\n\t\t\t\t\t\t\" \" +\n\t\t\t\t\t\tclassDropReject\n\t\t\t\t);\n\n\t\t\t\t// Let user implement the actual drop operation\n\t\t\t\tdata.hitMode = LAST_HIT_MODE;\n\t\t\t\tprepareDropEffectCallback(event, data, !LAST_HIT_MODE);\n\t\t\t\tdata.isCancelled = !LAST_HIT_MODE;\n\n\t\t\t\tvar orgSourceElem = SOURCE_NODE && SOURCE_NODE.span,\n\t\t\t\t\torgSourceTree = SOURCE_NODE && SOURCE_NODE.tree;\n\n\t\t\t\tdndOpts.dragDrop(node, data);\n\t\t\t\t// applyDropEffectCallback(event, data);\n\n\t\t\t\t// Prevent browser's default drop handling, i.e. open as link, ...\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tif (orgSourceElem && !document.body.contains(orgSourceElem)) {\n\t\t\t\t\t// The drop handler removed the original drag source from\n\t\t\t\t\t// the DOM, so the dragend event will probaly not fire.\n\t\t\t\t\tif (orgSourceTree === tree) {\n\t\t\t\t\t\ttree.debug(\n\t\t\t\t\t\t\t\"Drop handler removed source element: generating dragEnd.\"\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdndOpts.dragEnd(SOURCE_NODE, data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttree.warn(\n\t\t\t\t\t\t\t\"Drop handler removed source element: dragend event may be lost.\"\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t_clearGlobals();\n\n\t\t\t\tbreak;\n\t\t}\n\t\t// Dnd API madness: we must PREVENT default handling to enable dropping\n\t\tif (allowDrop) {\n\t\t\tevent.preventDefault();\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t/** [ext-dnd5] Return a Fancytree instance, from element, index, event, or jQueryObject.\n\t *\n\t * @returns {FancytreeNode[]} List of nodes (empty if no drag operation)\n\t * @example\n\t * $.ui.fancytree.getDragNodeList();\n\t *\n\t * @alias Fancytree_Static#getDragNodeList\n\t * @requires jquery.fancytree.dnd5.js\n\t * @since 2.31\n\t */\n\t$.ui.fancytree.getDragNodeList = function() {\n\t\treturn SOURCE_NODE_LIST || [];\n\t};\n\n\t/** [ext-dnd5] Return the FancytreeNode that is currently being dragged.\n\t *\n\t * If multiple nodes are dragged, only the first is returned.\n\t *\n\t * @returns {FancytreeNode | null} dragged nodes or null if no drag operation\n\t * @example\n\t * $.ui.fancytree.getDragNode();\n\t *\n\t * @alias Fancytree_Static#getDragNode\n\t * @requires jquery.fancytree.dnd5.js\n\t * @since 2.31\n\t */\n\t$.ui.fancytree.getDragNode = function() {\n\t\treturn SOURCE_NODE;\n\t};\n\n\t/******************************************************************************\n\t *\n\t */\n\n\t$.ui.fancytree.registerExtension({\n\t\tname: \"dnd5\",\n\t\tversion: \"2.36.1\",\n\t\t// Default options for this extension.\n\t\toptions: {\n\t\t\tautoExpandMS: 1500, // Expand nodes after n milliseconds of hovering\n\t\t\tdropMarkerInsertOffsetX: -16, // Additional offset for drop-marker with hitMode = \"before\"/\"after\"\n\t\t\tdropMarkerOffsetX: -24, // Absolute position offset for .fancytree-drop-marker relatively to ..fancytree-title (icon/img near a node accepting drop)\n\t\t\t// #1021 `document.body` is not available yet\n\t\t\tdropMarkerParent: \"body\", // Root Container used for drop marker (could be a shadow root)\n\t\t\tmultiSource: false, // true: Drag multiple (i.e. selected) nodes. Also a callback() is allowed\n\t\t\teffectAllowed: \"all\", // Restrict the possible cursor shapes and modifier operations (can also be set in the dragStart event)\n\t\t\t// dropEffect: \"auto\", // 'copy'|'link'|'move'|'auto'(calculate from `effectAllowed`+modifier keys) or callback(node, data) that returns such string.\n\t\t\tdropEffectDefault: \"move\", // Default dropEffect ('copy', 'link', or 'move') when no modifier is pressed (overide in dragDrag, dragOver).\n\t\t\tpreventForeignNodes: false, // Prevent dropping nodes from different Fancytrees\n\t\t\tpreventLazyParents: true, // Prevent dropping items on unloaded lazy Fancytree nodes\n\t\t\tpreventNonNodes: false, // Prevent dropping items other than Fancytree nodes\n\t\t\tpreventRecursion: true, // Prevent dropping nodes on own descendants\n\t\t\tpreventSameParent: false, // Prevent dropping nodes under same direct parent\n\t\t\tpreventVoidMoves: true, // Prevent dropping nodes 'before self', etc.\n\t\t\tscroll: true, // Enable auto-scrolling while dragging\n\t\t\tscrollSensitivity: 20, // Active top/bottom margin in pixel\n\t\t\tscrollSpeed: 5, // Pixel per event\n\t\t\tsetTextTypeJson: false, // Allow dragging of nodes to different IE windows\n\t\t\t// Events (drag support)\n\t\t\tdragStart: null, // Callback(sourceNode, data), return true, to enable dnd drag\n\t\t\tdragDrag: $.noop, // Callback(sourceNode, data)\n\t\t\tdragEnd: $.noop, // Callback(sourceNode, data)\n\t\t\t// Events (drop support)\n\t\t\tdragEnter: null, // Callback(targetNode, data), return true, to enable dnd drop\n\t\t\tdragOver: $.noop, // Callback(targetNode, data)\n\t\t\tdragExpand: $.noop, // Callback(targetNode, data), return false to prevent autoExpand\n\t\t\tdragDrop: $.noop, // Callback(targetNode, data)\n\t\t\tdragLeave: $.noop, // Callback(targetNode, data)\n\t\t},\n\n\t\ttreeInit: function(ctx) {\n\t\t\tvar $temp,\n\t\t\t\ttree = ctx.tree,\n\t\t\t\topts = ctx.options,\n\t\t\t\tglyph = opts.glyph || null,\n\t\t\t\tdndOpts = opts.dnd5;\n\n\t\t\tif ($.inArray(\"dnd\", opts.extensions) >= 0) {\n\t\t\t\t$.error(\"Extensions 'dnd' and 'dnd5' are mutually exclusive.\");\n\t\t\t}\n\t\t\tif (dndOpts.dragStop) {\n\t\t\t\t$.error(\n\t\t\t\t\t\"dragStop is not used by ext-dnd5. Use dragEnd instead.\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (dndOpts.preventRecursiveMoves != null) {\n\t\t\t\t$.error(\n\t\t\t\t\t\"preventRecursiveMoves was renamed to preventRecursion.\"\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Implement `opts.createNode` event to add the 'draggable' attribute\n\t\t\t// #680: this must happen before calling super.treeInit()\n\t\t\tif (dndOpts.dragStart) {\n\t\t\t\tFT.overrideMethod(ctx.options, \"createNode\", function(\n\t\t\t\t\tevent,\n\t\t\t\t\tdata\n\t\t\t\t) {\n\t\t\t\t\t// Default processing if any\n\t\t\t\t\tthis._super.apply(this, arguments);\n\t\t\t\t\tif (data.node.span) {\n\t\t\t\t\t\tdata.node.span.draggable = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdata.node.warn(\"Cannot add `draggable`: no span tag\");\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis._superApply(arguments);\n\n\t\t\tthis.$container.addClass(\"fancytree-ext-dnd5\");\n\n\t\t\t// Store the current scroll parent, which may be the tree\n\t\t\t// container, any enclosing div, or the document.\n\t\t\t// #761: scrollParent() always needs a container child\n\t\t\t$temp = $(\"<span>\").appendTo(this.$container);\n\t\t\tthis.$scrollParent = $temp.scrollParent();\n\t\t\t$temp.remove();\n\n\t\t\t$dropMarker = $(\"#fancytree-drop-marker\");\n\t\t\tif (!$dropMarker.length) {\n\t\t\t\t$dropMarker = $(\"<div id='fancytree-drop-marker'></div>\")\n\t\t\t\t\t.hide()\n\t\t\t\t\t.css({\n\t\t\t\t\t\t\"z-index\": 1000,\n\t\t\t\t\t\t// Drop marker should not steal dragenter/dragover events:\n\t\t\t\t\t\t\"pointer-events\": \"none\",\n\t\t\t\t\t})\n\t\t\t\t\t.prependTo(dndOpts.dropMarkerParent);\n\t\t\t\tif (glyph) {\n\t\t\t\t\tFT.setSpanIcon(\n\t\t\t\t\t\t$dropMarker[0],\n\t\t\t\t\t\tglyph.map._addClass,\n\t\t\t\t\t\tglyph.map.dropMarker\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dropMarker.toggleClass(\"fancytree-rtl\", !!opts.rtl);\n\n\t\t\t// Enable drag support if dragStart() is specified:\n\t\t\tif (dndOpts.dragStart) {\n\t\t\t\t// Bind drag event handlers\n\t\t\t\ttree.$container.on(\n\t\t\t\t\t\"dragstart drag dragend\",\n\t\t\t\t\tonDragEvent.bind(tree)\n\t\t\t\t);\n\t\t\t}\n\t\t\t// Enable drop support if dragEnter() is specified:\n\t\t\tif (dndOpts.dragEnter) {\n\t\t\t\t// Bind drop event handlers\n\t\t\t\ttree.$container.on(\n\t\t\t\t\t\"dragenter dragover dragleave drop\",\n\t\t\t\t\tonDropEvent.bind(tree)\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t});\n\t// Value returned by `require('jquery.fancytree..')`\n\treturn $.ui.fancytree;\n}); // End of closure\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n  try {\n    var info = gen[key](arg);\n    var value = info.value;\n  } catch (error) {\n    reject(error);\n    return;\n  }\n\n  if (info.done) {\n    resolve(value);\n  } else {\n    Promise.resolve(value).then(_next, _throw);\n  }\n}\n\nfunction _asyncToGenerator(fn) {\n  return function () {\n    var self = this,\n        args = arguments;\n    return new Promise(function (resolve, reject) {\n      var gen = fn.apply(self, args);\n\n      function _next(value) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n      }\n\n      function _throw(err) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n      }\n\n      _next(undefined);\n    });\n  };\n}\n\nmodule.exports = _asyncToGenerator;","// Generated by CoffeeScript 1.10.0\n(function() {\n  var families;\n\n  module.exports = {\n    icon: 'icons/google.svg',\n    name: 'google',\n    title: 'Google Fonts',\n    link: 'google.com/fonts',\n    getNames: function() {\n      return families;\n    },\n    getLink: function(name) {\n      return \"https://fonts.google.com/specimen/\" + (name.replace(/( )/g, '+'));\n    },\n    normalizeName: function(name) {\n      return name;\n    }\n  };\n\n  families = [\"ABeeZee\", \"Abel\", \"Abril Fatface\", \"Aclonica\", \"Acme\", \"Actor\", \"Adamina\", \"Advent Pro\", \"Aguafina Script\", \"Akronim\", \"Aladin\", \"Aldrich\", \"Alef\", \"Alegreya\", \"Alegreya SC\", \"Alegreya Sans\", \"Alegreya Sans SC\", \"Alex Brush\", \"Alfa Slab One\", \"Alice\", \"Alike\", \"Alike Angular\", \"Allan\", \"Allerta\", \"Allerta Stencil\", \"Allura\", \"Almendra\", \"Almendra Display\", \"Almendra SC\", \"Amarante\", \"Amaranth\", \"Amatic SC\", \"Amethysta\", \"Amiri\", \"Amita\", \"Anaheim\", \"Andada\", \"Andika\", \"Angkor\", \"Annie Use Your Telescope\", \"Anonymous Pro\", \"Antic\", \"Antic Didone\", \"Antic Slab\", \"Anton\", \"Arapey\", \"Arbutus\", \"Arbutus Slab\", \"Architects Daughter\", \"Archivo Black\", \"Archivo Narrow\", \"Arimo\", \"Arizonia\", \"Armata\", \"Artifika\", \"Arvo\", \"Arya\", \"Asap\", \"Asar\", \"Asset\", \"Astloch\", \"Asul\", \"Atomic Age\", \"Aubrey\", \"Audiowide\", \"Autour One\", \"Average\", \"Average Sans\", \"Averia Gruesa Libre\", \"Averia Libre\", \"Averia Sans Libre\", \"Averia Serif Libre\", \"Bad Script\", \"Balthazar\", \"Bangers\", \"Basic\", \"Battambang\", \"Baumans\", \"Bayon\", \"Belgrano\", \"Belleza\", \"BenchNine\", \"Bentham\", \"Berkshire Swash\", \"Bevan\", \"Bigelow Rules\", \"Bigshot One\", \"Bilbo\", \"Bilbo Swash Caps\", \"Biryani\", \"Bitter\", \"Black Ops One\", \"Bokor\", \"Bonbon\", \"Boogaloo\", \"Bowlby One\", \"Bowlby One SC\", \"Brawler\", \"Bree Serif\", \"Bubblegum Sans\", \"Bubbler One\", \"Buda\", \"Buenard\", \"Butcherman\", \"Butterfly Kids\", \"Cabin\", \"Cabin Condensed\", \"Cabin Sketch\", \"Caesar Dressing\", \"Cagliostro\", \"Calligraffitti\", \"Cambay\", \"Cambo\", \"Candal\", \"Cantarell\", \"Cantata One\", \"Cantora One\", \"Capriola\", \"Cardo\", \"Carme\", \"Carrois Gothic\", \"Carrois Gothic SC\", \"Carter One\", \"Catamaran\", \"Caudex\", \"Caveat\", \"Caveat Brush\", \"Cedarville Cursive\", \"Ceviche One\", \"Changa One\", \"Chango\", \"Chau Philomene One\", \"Chela One\", \"Chelsea Market\", \"Chenla\", \"Cherry Cream Soda\", \"Cherry Swash\", \"Chewy\", \"Chicle\", \"Chivo\", \"Chonburi\", \"Cinzel\", \"Cinzel Decorative\", \"Clicker Script\", \"Coda\", \"Coda Caption\", \"Codystar\", \"Combo\", \"Comfortaa\", \"Coming Soon\", \"Concert One\", \"Condiment\", \"Content\", \"Contrail One\", \"Convergence\", \"Cookie\", \"Copse\", \"Corben\", \"Courgette\", \"Cousine\", \"Coustard\", \"Covered By Your Grace\", \"Crafty Girls\", \"Creepster\", \"Crete Round\", \"Crimson Text\", \"Croissant One\", \"Crushed\", \"Cuprum\", \"Cutive\", \"Cutive Mono\", \"Damion\", \"Dancing Script\", \"Dangrek\", \"Dawning of a New Day\", \"Days One\", \"Dekko\", \"Delius\", \"Delius Swash Caps\", \"Delius Unicase\", \"Della Respira\", \"Denk One\", \"Devonshire\", \"Dhurjati\", \"Didact Gothic\", \"Diplomata\", \"Diplomata SC\", \"Domine\", \"Donegal One\", \"Doppio One\", \"Dorsa\", \"Dosis\", \"Dr Sugiyama\", \"Droid Sans\", \"Droid Sans Mono\", \"Droid Serif\", \"Duru Sans\", \"Dynalight\", \"EB Garamond\", \"Eagle Lake\", \"Eater\", \"Economica\", \"Eczar\", \"Ek Mukta\", \"Electrolize\", \"Elsie\", \"Elsie Swash Caps\", \"Emblema One\", \"Emilys Candy\", \"Engagement\", \"Englebert\", \"Enriqueta\", \"Erica One\", \"Esteban\", \"Euphoria Script\", \"Ewert\", \"Exo\", \"Exo 2\", \"Expletus Sans\", \"Fanwood Text\", \"Fascinate\", \"Fascinate Inline\", \"Faster One\", \"Fasthand\", \"Fauna One\", \"Federant\", \"Federo\", \"Felipa\", \"Fenix\", \"Finger Paint\", \"Fira Mono\", \"Fira Sans\", \"Fjalla One\", \"Fjord One\", \"Flamenco\", \"Flavors\", \"Fondamento\", \"Fontdiner Swanky\", \"Forum\", \"Francois One\", \"Freckle Face\", \"Fredericka the Great\", \"Fredoka One\", \"Freehand\", \"Fresca\", \"Frijole\", \"Fruktur\", \"Fugaz One\", \"GFS Didot\", \"GFS Neohellenic\", \"Gabriela\", \"Gafata\", \"Galdeano\", \"Galindo\", \"Gentium Basic\", \"Gentium Book Basic\", \"Geo\", \"Geostar\", \"Geostar Fill\", \"Germania One\", \"Gidugu\", \"Gilda Display\", \"Give You Glory\", \"Glass Antiqua\", \"Glegoo\", \"Gloria Hallelujah\", \"Goblin One\", \"Gochi Hand\", \"Gorditas\", \"Goudy Bookletter 1911\", \"Graduate\", \"Grand Hotel\", \"Gravitas One\", \"Great Vibes\", \"Griffy\", \"Gruppo\", \"Gudea\", \"Gurajada\", \"Habibi\", \"Halant\", \"Hammersmith One\", \"Hanalei\", \"Hanalei Fill\", \"Handlee\", \"Hanuman\", \"Happy Monkey\", \"Headland One\", \"Henny Penny\", \"Herr Von Muellerhoff\", \"Hind\", \"Hind Siliguri\", \"Hind Vadodara\", \"Holtwood One SC\", \"Homemade Apple\", \"Homenaje\", \"IM Fell DW Pica\", \"IM Fell DW Pica SC\", \"IM Fell Double Pica\", \"IM Fell Double Pica SC\", \"IM Fell English\", \"IM Fell English SC\", \"IM Fell French Canon\", \"IM Fell French Canon SC\", \"IM Fell Great Primer\", \"IM Fell Great Primer SC\", \"Iceberg\", \"Iceland\", \"Imprima\", \"Inconsolata\", \"Inder\", \"Indie Flower\", \"Inika\", \"Inknut Antiqua\", \"Irish Grover\", \"Istok Web\", \"Italiana\", \"Italianno\", \"Itim\", \"Jacques Francois\", \"Jacques Francois Shadow\", \"Jaldi\", \"Jim Nightshade\", \"Jockey One\", \"Jolly Lodger\", \"Josefin Sans\", \"Josefin Slab\", \"Joti One\", \"Judson\", \"Julee\", \"Julius Sans One\", \"Junge\", \"Jura\", \"Just Another Hand\", \"Just Me Again Down Here\", \"Kadwa\", \"Kalam\", \"Kameron\", \"Kantumruy\", \"Karla\", \"Karma\", \"Kaushan Script\", \"Kavoon\", \"Kdam Thmor\", \"Keania One\", \"Kelly Slab\", \"Kenia\", \"Khand\", \"Khmer\", \"Khula\", \"Kite One\", \"Knewave\", \"Kotta One\", \"Koulen\", \"Kranky\", \"Kreon\", \"Kristi\", \"Krona One\", \"Kurale\", \"La Belle Aurore\", \"Laila\", \"Lakki Reddy\", \"Lancelot\", \"Lateef\", \"Lato\", \"League Script\", \"Leckerli One\", \"Ledger\", \"Lekton\", \"Lemon\", \"Libre Baskerville\", \"Life Savers\", \"Lilita One\", \"Lily Script One\", \"Limelight\", \"Linden Hill\", \"Lobster\", \"Lobster Two\", \"Londrina Outline\", \"Londrina Shadow\", \"Londrina Sketch\", \"Londrina Solid\", \"Lora\", \"Love Ya Like A Sister\", \"Loved by the King\", \"Lovers Quarrel\", \"Luckiest Guy\", \"Lusitana\", \"Lustria\", \"Macondo\", \"Macondo Swash Caps\", \"Magra\", \"Maiden Orange\", \"Mako\", \"Mallanna\", \"Mandali\", \"Marcellus\", \"Marcellus SC\", \"Marck Script\", \"Margarine\", \"Marko One\", \"Marmelad\", \"Martel\", \"Martel Sans\", \"Marvel\", \"Mate\", \"Mate SC\", \"Maven Pro\", \"McLaren\", \"Meddon\", \"MedievalSharp\", \"Medula One\", \"Megrim\", \"Meie Script\", \"Merienda\", \"Merienda One\", \"Merriweather\", \"Merriweather Sans\", \"Metal\", \"Metal Mania\", \"Metamorphous\", \"Metrophobic\", \"Michroma\", \"Milonga\", \"Miltonian\", \"Miltonian Tattoo\", \"Miniver\", \"Miss Fajardose\", \"Modak\", \"Modern Antiqua\", \"Molengo\", \"Molle\", \"Monda\", \"Monofett\", \"Monoton\", \"Monsieur La Doulaise\", \"Montaga\", \"Montez\", \"Montserrat\", \"Montserrat Alternates\", \"Montserrat Subrayada\", \"Moul\", \"Moulpali\", \"Mountains of Christmas\", \"Mouse Memoirs\", \"Mr Bedfort\", \"Mr Dafoe\", \"Mr De Haviland\", \"Mrs Saint Delafield\", \"Mrs Sheppards\", \"Muli\", \"Mystery Quest\", \"NTR\", \"Neucha\", \"Neuton\", \"New Rocker\", \"News Cycle\", \"Niconne\", \"Nixie One\", \"Nobile\", \"Nokora\", \"Norican\", \"Nosifer\", \"Nothing You Could Do\", \"Noticia Text\", \"Noto Sans\", \"Noto Serif\", \"Nova Cut\", \"Nova Flat\", \"Nova Mono\", \"Nova Oval\", \"Nova Round\", \"Nova Script\", \"Nova Slim\", \"Nova Square\", \"Numans\", \"Nunito\", \"Odor Mean Chey\", \"Offside\", \"Old Standard TT\", \"Oldenburg\", \"Oleo Script\", \"Oleo Script Swash Caps\", \"Open Sans\", \"Open Sans Condensed\", \"Oranienbaum\", \"Orbitron\", \"Oregano\", \"Orienta\", \"Original Surfer\", \"Oswald\", \"Over the Rainbow\", \"Overlock\", \"Overlock SC\", \"Ovo\", \"Oxygen\", \"Oxygen Mono\", \"PT Mono\", \"PT Sans\", \"PT Sans Caption\", \"PT Sans Narrow\", \"PT Serif\", \"PT Serif Caption\", \"Pacifico\", \"Palanquin\", \"Palanquin Dark\", \"Paprika\", \"Parisienne\", \"Passero One\", \"Passion One\", \"Pathway Gothic One\", \"Patrick Hand\", \"Patrick Hand SC\", \"Patua One\", \"Paytone One\", \"Peddana\", \"Peralta\", \"Permanent Marker\", \"Petit Formal Script\", \"Petrona\", \"Philosopher\", \"Piedra\", \"Pinyon Script\", \"Pirata One\", \"Plaster\", \"Play\", \"Playball\", \"Playfair Display\", \"Playfair Display SC\", \"Podkova\", \"Poiret One\", \"Poller One\", \"Poly\", \"Pompiere\", \"Pontano Sans\", \"Poppins\", \"Port Lligat Sans\", \"Port Lligat Slab\", \"Pragati Narrow\", \"Prata\", \"Preahvihear\", \"Press Start 2P\", \"Princess Sofia\", \"Prociono\", \"Prosto One\", \"Puritan\", \"Purple Purse\", \"Quando\", \"Quantico\", \"Quattrocento\", \"Quattrocento Sans\", \"Questrial\", \"Quicksand\", \"Quintessential\", \"Qwigley\", \"Racing Sans One\", \"Radley\", \"Rajdhani\", \"Raleway\", \"Raleway Dots\", \"Ramabhadra\", \"Ramaraja\", \"Rambla\", \"Rammetto One\", \"Ranchers\", \"Rancho\", \"Ranga\", \"Rationale\", \"Ravi Prakash\", \"Redressed\", \"Reenie Beanie\", \"Revalia\", \"Rhodium Libre\", \"Ribeye\", \"Ribeye Marrow\", \"Righteous\", \"Risque\", \"Roboto\", \"Roboto Condensed\", \"Roboto Mono\", \"Roboto Slab\", \"Rochester\", \"Rock Salt\", \"Rokkitt\", \"Romanesco\", \"Ropa Sans\", \"Rosario\", \"Rosarivo\", \"Rouge Script\", \"Rozha One\", \"Rubik\", \"Rubik Mono One\", \"Rubik One\", \"Ruda\", \"Rufina\", \"Ruge Boogie\", \"Ruluko\", \"Rum Raisin\", \"Ruslan Display\", \"Russo One\", \"Ruthie\", \"Rye\", \"Sacramento\", \"Sahitya\", \"Sail\", \"Salsa\", \"Sanchez\", \"Sancreek\", \"Sansita One\", \"Sarala\", \"Sarina\", \"Sarpanch\", \"Satisfy\", \"Scada\", \"Scheherazade\", \"Schoolbell\", \"Seaweed Script\", \"Sevillana\", \"Seymour One\", \"Shadows Into Light\", \"Shadows Into Light Two\", \"Shanti\", \"Share\", \"Share Tech\", \"Share Tech Mono\", \"Shojumaru\", \"Short Stack\", \"Siemreap\", \"Sigmar One\", \"Signika\", \"Signika Negative\", \"Simonetta\", \"Sintony\", \"Sirin Stencil\", \"Six Caps\", \"Skranji\", \"Slabo 13px\", \"Slabo 27px\", \"Slackey\", \"Smokum\", \"Smythe\", \"Sniglet\", \"Snippet\", \"Snowburst One\", \"Sofadi One\", \"Sofia\", \"Sonsie One\", \"Sorts Mill Goudy\", \"Source Code Pro\", \"Source Sans Pro\", \"Source Serif Pro\", \"Special Elite\", \"Spicy Rice\", \"Spinnaker\", \"Spirax\", \"Squada One\", \"Sree Krushnadevaraya\", \"Stalemate\", \"Stalinist One\", \"Stardos Stencil\", \"Stint Ultra Condensed\", \"Stint Ultra Expanded\", \"Stoke\", \"Strait\", \"Sue Ellen Francisco\", \"Sumana\", \"Sunshiney\", \"Supermercado One\", \"Sura\", \"Suranna\", \"Suravaram\", \"Suwannaphum\", \"Swanky and Moo Moo\", \"Syncopate\", \"Tangerine\", \"Taprom\", \"Tauri\", \"Teko\", \"Telex\", \"Tenali Ramakrishna\", \"Tenor Sans\", \"Text Me One\", \"The Girl Next Door\", \"Tienne\", \"Tillana\", \"Timmana\", \"Tinos\", \"Titan One\", \"Titillium Web\", \"Trade Winds\", \"Trocchi\", \"Trochut\", \"Trykker\", \"Tulpen One\", \"Ubuntu\", \"Ubuntu Condensed\", \"Ubuntu Mono\", \"Ultra\", \"Uncial Antiqua\", \"Underdog\", \"Unica One\", \"UnifrakturCook\", \"UnifrakturMaguntia\", \"Unkempt\", \"Unlock\", \"Unna\", \"VT323\", \"Vampiro One\", \"Varela\", \"Varela Round\", \"Vast Shadow\", \"Vesper Libre\", \"Vibur\", \"Vidaloka\", \"Viga\", \"Voces\", \"Volkhov\", \"Vollkorn\", \"Voltaire\", \"Waiting for the Sunrise\", \"Wallpoet\", \"Walter Turncoat\", \"Warnes\", \"Wellfleet\", \"Wendy One\", \"Wire One\", \"Work Sans\", \"Yanone Kaffeesatz\", \"Yantramanav\", \"Yellowtail\", \"Yeseva One\", \"Yesteryear\", \"Zeyada\"];\n\n}).call(this);\n","'use strict';\n\nmodule.exports = Pbf;\n\nvar ieee754 = require('ieee754');\n\nfunction Pbf(buf) {\n    this.buf = ArrayBuffer.isView && ArrayBuffer.isView(buf) ? buf : new Uint8Array(buf || 0);\n    this.pos = 0;\n    this.type = 0;\n    this.length = this.buf.length;\n}\n\nPbf.Varint  = 0; // varint: int32, int64, uint32, uint64, sint32, sint64, bool, enum\nPbf.Fixed64 = 1; // 64-bit: double, fixed64, sfixed64\nPbf.Bytes   = 2; // length-delimited: string, bytes, embedded messages, packed repeated fields\nPbf.Fixed32 = 5; // 32-bit: float, fixed32, sfixed32\n\nvar SHIFT_LEFT_32 = (1 << 16) * (1 << 16),\n    SHIFT_RIGHT_32 = 1 / SHIFT_LEFT_32;\n\n// Threshold chosen based on both benchmarking and knowledge about browser string\n// data structures (which currently switch structure types at 12 bytes or more)\nvar TEXT_DECODER_MIN_LENGTH = 12;\nvar utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf8');\n\nPbf.prototype = {\n\n    destroy: function() {\n        this.buf = null;\n    },\n\n    // === READING =================================================================\n\n    readFields: function(readField, result, end) {\n        end = end || this.length;\n\n        while (this.pos < end) {\n            var val = this.readVarint(),\n                tag = val >> 3,\n                startPos = this.pos;\n\n            this.type = val & 0x7;\n            readField(tag, result, this);\n\n            if (this.pos === startPos) this.skip(val);\n        }\n        return result;\n    },\n\n    readMessage: function(readField, result) {\n        return this.readFields(readField, result, this.readVarint() + this.pos);\n    },\n\n    readFixed32: function() {\n        var val = readUInt32(this.buf, this.pos);\n        this.pos += 4;\n        return val;\n    },\n\n    readSFixed32: function() {\n        var val = readInt32(this.buf, this.pos);\n        this.pos += 4;\n        return val;\n    },\n\n    // 64-bit int handling is based on github.com/dpw/node-buffer-more-ints (MIT-licensed)\n\n    readFixed64: function() {\n        var val = readUInt32(this.buf, this.pos) + readUInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n        this.pos += 8;\n        return val;\n    },\n\n    readSFixed64: function() {\n        var val = readUInt32(this.buf, this.pos) + readInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n        this.pos += 8;\n        return val;\n    },\n\n    readFloat: function() {\n        var val = ieee754.read(this.buf, this.pos, true, 23, 4);\n        this.pos += 4;\n        return val;\n    },\n\n    readDouble: function() {\n        var val = ieee754.read(this.buf, this.pos, true, 52, 8);\n        this.pos += 8;\n        return val;\n    },\n\n    readVarint: function(isSigned) {\n        var buf = this.buf,\n            val, b;\n\n        b = buf[this.pos++]; val  =  b & 0x7f;        if (b < 0x80) return val;\n        b = buf[this.pos++]; val |= (b & 0x7f) << 7;  if (b < 0x80) return val;\n        b = buf[this.pos++]; val |= (b & 0x7f) << 14; if (b < 0x80) return val;\n        b = buf[this.pos++]; val |= (b & 0x7f) << 21; if (b < 0x80) return val;\n        b = buf[this.pos];   val |= (b & 0x0f) << 28;\n\n        return readVarintRemainder(val, isSigned, this);\n    },\n\n    readVarint64: function() { // for compatibility with v2.0.1\n        return this.readVarint(true);\n    },\n\n    readSVarint: function() {\n        var num = this.readVarint();\n        return num % 2 === 1 ? (num + 1) / -2 : num / 2; // zigzag encoding\n    },\n\n    readBoolean: function() {\n        return Boolean(this.readVarint());\n    },\n\n    readString: function() {\n        var end = this.readVarint() + this.pos;\n        var pos = this.pos;\n        this.pos = end;\n\n        if (end - pos >= TEXT_DECODER_MIN_LENGTH && utf8TextDecoder) {\n            // longer strings are fast with the built-in browser TextDecoder API\n            return readUtf8TextDecoder(this.buf, pos, end);\n        }\n        // short strings are fast with our custom implementation\n        return readUtf8(this.buf, pos, end);\n    },\n\n    readBytes: function() {\n        var end = this.readVarint() + this.pos,\n            buffer = this.buf.subarray(this.pos, end);\n        this.pos = end;\n        return buffer;\n    },\n\n    // verbose for performance reasons; doesn't affect gzipped size\n\n    readPackedVarint: function(arr, isSigned) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readVarint(isSigned));\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readVarint(isSigned));\n        return arr;\n    },\n    readPackedSVarint: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readSVarint());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readSVarint());\n        return arr;\n    },\n    readPackedBoolean: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readBoolean());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readBoolean());\n        return arr;\n    },\n    readPackedFloat: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readFloat());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readFloat());\n        return arr;\n    },\n    readPackedDouble: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readDouble());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readDouble());\n        return arr;\n    },\n    readPackedFixed32: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readFixed32());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readFixed32());\n        return arr;\n    },\n    readPackedSFixed32: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed32());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readSFixed32());\n        return arr;\n    },\n    readPackedFixed64: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readFixed64());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readFixed64());\n        return arr;\n    },\n    readPackedSFixed64: function(arr) {\n        if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed64());\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readSFixed64());\n        return arr;\n    },\n\n    skip: function(val) {\n        var type = val & 0x7;\n        if (type === Pbf.Varint) while (this.buf[this.pos++] > 0x7f) {}\n        else if (type === Pbf.Bytes) this.pos = this.readVarint() + this.pos;\n        else if (type === Pbf.Fixed32) this.pos += 4;\n        else if (type === Pbf.Fixed64) this.pos += 8;\n        else throw new Error('Unimplemented type: ' + type);\n    },\n\n    // === WRITING =================================================================\n\n    writeTag: function(tag, type) {\n        this.writeVarint((tag << 3) | type);\n    },\n\n    realloc: function(min) {\n        var length = this.length || 16;\n\n        while (length < this.pos + min) length *= 2;\n\n        if (length !== this.length) {\n            var buf = new Uint8Array(length);\n            buf.set(this.buf);\n            this.buf = buf;\n            this.length = length;\n        }\n    },\n\n    finish: function() {\n        this.length = this.pos;\n        this.pos = 0;\n        return this.buf.subarray(0, this.length);\n    },\n\n    writeFixed32: function(val) {\n        this.realloc(4);\n        writeInt32(this.buf, val, this.pos);\n        this.pos += 4;\n    },\n\n    writeSFixed32: function(val) {\n        this.realloc(4);\n        writeInt32(this.buf, val, this.pos);\n        this.pos += 4;\n    },\n\n    writeFixed64: function(val) {\n        this.realloc(8);\n        writeInt32(this.buf, val & -1, this.pos);\n        writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n        this.pos += 8;\n    },\n\n    writeSFixed64: function(val) {\n        this.realloc(8);\n        writeInt32(this.buf, val & -1, this.pos);\n        writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n        this.pos += 8;\n    },\n\n    writeVarint: function(val) {\n        val = +val || 0;\n\n        if (val > 0xfffffff || val < 0) {\n            writeBigVarint(val, this);\n            return;\n        }\n\n        this.realloc(4);\n\n        this.buf[this.pos++] =           val & 0x7f  | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n        this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n        this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n        this.buf[this.pos++] =   (val >>> 7) & 0x7f;\n    },\n\n    writeSVarint: function(val) {\n        this.writeVarint(val < 0 ? -val * 2 - 1 : val * 2);\n    },\n\n    writeBoolean: function(val) {\n        this.writeVarint(Boolean(val));\n    },\n\n    writeString: function(str) {\n        str = String(str);\n        this.realloc(str.length * 4);\n\n        this.pos++; // reserve 1 byte for short string length\n\n        var startPos = this.pos;\n        // write the string directly to the buffer and see how much was written\n        this.pos = writeUtf8(this.buf, str, this.pos);\n        var len = this.pos - startPos;\n\n        if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n        // finally, write the message length in the reserved place and restore the position\n        this.pos = startPos - 1;\n        this.writeVarint(len);\n        this.pos += len;\n    },\n\n    writeFloat: function(val) {\n        this.realloc(4);\n        ieee754.write(this.buf, val, this.pos, true, 23, 4);\n        this.pos += 4;\n    },\n\n    writeDouble: function(val) {\n        this.realloc(8);\n        ieee754.write(this.buf, val, this.pos, true, 52, 8);\n        this.pos += 8;\n    },\n\n    writeBytes: function(buffer) {\n        var len = buffer.length;\n        this.writeVarint(len);\n        this.realloc(len);\n        for (var i = 0; i < len; i++) this.buf[this.pos++] = buffer[i];\n    },\n\n    writeRawMessage: function(fn, obj) {\n        this.pos++; // reserve 1 byte for short message length\n\n        // write the message directly to the buffer and see how much was written\n        var startPos = this.pos;\n        fn(obj, this);\n        var len = this.pos - startPos;\n\n        if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n        // finally, write the message length in the reserved place and restore the position\n        this.pos = startPos - 1;\n        this.writeVarint(len);\n        this.pos += len;\n    },\n\n    writeMessage: function(tag, fn, obj) {\n        this.writeTag(tag, Pbf.Bytes);\n        this.writeRawMessage(fn, obj);\n    },\n\n    writePackedVarint:   function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedVarint, arr);   },\n    writePackedSVarint:  function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSVarint, arr);  },\n    writePackedBoolean:  function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedBoolean, arr);  },\n    writePackedFloat:    function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFloat, arr);    },\n    writePackedDouble:   function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedDouble, arr);   },\n    writePackedFixed32:  function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFixed32, arr);  },\n    writePackedSFixed32: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSFixed32, arr); },\n    writePackedFixed64:  function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFixed64, arr);  },\n    writePackedSFixed64: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSFixed64, arr); },\n\n    writeBytesField: function(tag, buffer) {\n        this.writeTag(tag, Pbf.Bytes);\n        this.writeBytes(buffer);\n    },\n    writeFixed32Field: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed32);\n        this.writeFixed32(val);\n    },\n    writeSFixed32Field: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed32);\n        this.writeSFixed32(val);\n    },\n    writeFixed64Field: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed64);\n        this.writeFixed64(val);\n    },\n    writeSFixed64Field: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed64);\n        this.writeSFixed64(val);\n    },\n    writeVarintField: function(tag, val) {\n        this.writeTag(tag, Pbf.Varint);\n        this.writeVarint(val);\n    },\n    writeSVarintField: function(tag, val) {\n        this.writeTag(tag, Pbf.Varint);\n        this.writeSVarint(val);\n    },\n    writeStringField: function(tag, str) {\n        this.writeTag(tag, Pbf.Bytes);\n        this.writeString(str);\n    },\n    writeFloatField: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed32);\n        this.writeFloat(val);\n    },\n    writeDoubleField: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed64);\n        this.writeDouble(val);\n    },\n    writeBooleanField: function(tag, val) {\n        this.writeVarintField(tag, Boolean(val));\n    }\n};\n\nfunction readVarintRemainder(l, s, p) {\n    var buf = p.buf,\n        h, b;\n\n    b = buf[p.pos++]; h  = (b & 0x70) >> 4;  if (b < 0x80) return toNum(l, h, s);\n    b = buf[p.pos++]; h |= (b & 0x7f) << 3;  if (b < 0x80) return toNum(l, h, s);\n    b = buf[p.pos++]; h |= (b & 0x7f) << 10; if (b < 0x80) return toNum(l, h, s);\n    b = buf[p.pos++]; h |= (b & 0x7f) << 17; if (b < 0x80) return toNum(l, h, s);\n    b = buf[p.pos++]; h |= (b & 0x7f) << 24; if (b < 0x80) return toNum(l, h, s);\n    b = buf[p.pos++]; h |= (b & 0x01) << 31; if (b < 0x80) return toNum(l, h, s);\n\n    throw new Error('Expected varint not more than 10 bytes');\n}\n\nfunction readPackedEnd(pbf) {\n    return pbf.type === Pbf.Bytes ?\n        pbf.readVarint() + pbf.pos : pbf.pos + 1;\n}\n\nfunction toNum(low, high, isSigned) {\n    if (isSigned) {\n        return high * 0x100000000 + (low >>> 0);\n    }\n\n    return ((high >>> 0) * 0x100000000) + (low >>> 0);\n}\n\nfunction writeBigVarint(val, pbf) {\n    var low, high;\n\n    if (val >= 0) {\n        low  = (val % 0x100000000) | 0;\n        high = (val / 0x100000000) | 0;\n    } else {\n        low  = ~(-val % 0x100000000);\n        high = ~(-val / 0x100000000);\n\n        if (low ^ 0xffffffff) {\n            low = (low + 1) | 0;\n        } else {\n            low = 0;\n            high = (high + 1) | 0;\n        }\n    }\n\n    if (val >= 0x10000000000000000 || val < -0x10000000000000000) {\n        throw new Error('Given varint doesn\\'t fit into 10 bytes');\n    }\n\n    pbf.realloc(10);\n\n    writeBigVarintLow(low, high, pbf);\n    writeBigVarintHigh(high, pbf);\n}\n\nfunction writeBigVarintLow(low, high, pbf) {\n    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n    pbf.buf[pbf.pos]   = low & 0x7f;\n}\n\nfunction writeBigVarintHigh(high, pbf) {\n    var lsb = (high & 0x07) << 4;\n\n    pbf.buf[pbf.pos++] |= lsb         | ((high >>>= 3) ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f;\n}\n\nfunction makeRoomForExtraLength(startPos, len, pbf) {\n    var extraLen =\n        len <= 0x3fff ? 1 :\n        len <= 0x1fffff ? 2 :\n        len <= 0xfffffff ? 3 : Math.floor(Math.log(len) / (Math.LN2 * 7));\n\n    // if 1 byte isn't enough for encoding message length, shift the data to the right\n    pbf.realloc(extraLen);\n    for (var i = pbf.pos - 1; i >= startPos; i--) pbf.buf[i + extraLen] = pbf.buf[i];\n}\n\nfunction writePackedVarint(arr, pbf)   { for (var i = 0; i < arr.length; i++) pbf.writeVarint(arr[i]);   }\nfunction writePackedSVarint(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeSVarint(arr[i]);  }\nfunction writePackedFloat(arr, pbf)    { for (var i = 0; i < arr.length; i++) pbf.writeFloat(arr[i]);    }\nfunction writePackedDouble(arr, pbf)   { for (var i = 0; i < arr.length; i++) pbf.writeDouble(arr[i]);   }\nfunction writePackedBoolean(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeBoolean(arr[i]);  }\nfunction writePackedFixed32(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeFixed32(arr[i]);  }\nfunction writePackedSFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed32(arr[i]); }\nfunction writePackedFixed64(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeFixed64(arr[i]);  }\nfunction writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); }\n\n// Buffer code below from https://github.com/feross/buffer, MIT-licensed\n\nfunction readUInt32(buf, pos) {\n    return ((buf[pos]) |\n        (buf[pos + 1] << 8) |\n        (buf[pos + 2] << 16)) +\n        (buf[pos + 3] * 0x1000000);\n}\n\nfunction writeInt32(buf, val, pos) {\n    buf[pos] = val;\n    buf[pos + 1] = (val >>> 8);\n    buf[pos + 2] = (val >>> 16);\n    buf[pos + 3] = (val >>> 24);\n}\n\nfunction readInt32(buf, pos) {\n    return ((buf[pos]) |\n        (buf[pos + 1] << 8) |\n        (buf[pos + 2] << 16)) +\n        (buf[pos + 3] << 24);\n}\n\nfunction readUtf8(buf, pos, end) {\n    var str = '';\n    var i = pos;\n\n    while (i < end) {\n        var b0 = buf[i];\n        var c = null; // codepoint\n        var bytesPerSequence =\n            b0 > 0xEF ? 4 :\n            b0 > 0xDF ? 3 :\n            b0 > 0xBF ? 2 : 1;\n\n        if (i + bytesPerSequence > end) break;\n\n        var b1, b2, b3;\n\n        if (bytesPerSequence === 1) {\n            if (b0 < 0x80) {\n                c = b0;\n            }\n        } else if (bytesPerSequence === 2) {\n            b1 = buf[i + 1];\n            if ((b1 & 0xC0) === 0x80) {\n                c = (b0 & 0x1F) << 0x6 | (b1 & 0x3F);\n                if (c <= 0x7F) {\n                    c = null;\n                }\n            }\n        } else if (bytesPerSequence === 3) {\n            b1 = buf[i + 1];\n            b2 = buf[i + 2];\n            if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80) {\n                c = (b0 & 0xF) << 0xC | (b1 & 0x3F) << 0x6 | (b2 & 0x3F);\n                if (c <= 0x7FF || (c >= 0xD800 && c <= 0xDFFF)) {\n                    c = null;\n                }\n            }\n        } else if (bytesPerSequence === 4) {\n            b1 = buf[i + 1];\n            b2 = buf[i + 2];\n            b3 = buf[i + 3];\n            if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n                c = (b0 & 0xF) << 0x12 | (b1 & 0x3F) << 0xC | (b2 & 0x3F) << 0x6 | (b3 & 0x3F);\n                if (c <= 0xFFFF || c >= 0x110000) {\n                    c = null;\n                }\n            }\n        }\n\n        if (c === null) {\n            c = 0xFFFD;\n            bytesPerSequence = 1;\n\n        } else if (c > 0xFFFF) {\n            c -= 0x10000;\n            str += String.fromCharCode(c >>> 10 & 0x3FF | 0xD800);\n            c = 0xDC00 | c & 0x3FF;\n        }\n\n        str += String.fromCharCode(c);\n        i += bytesPerSequence;\n    }\n\n    return str;\n}\n\nfunction readUtf8TextDecoder(buf, pos, end) {\n    return utf8TextDecoder.decode(buf.subarray(pos, end));\n}\n\nfunction writeUtf8(buf, str, pos) {\n    for (var i = 0, c, lead; i < str.length; i++) {\n        c = str.charCodeAt(i); // code point\n\n        if (c > 0xD7FF && c < 0xE000) {\n            if (lead) {\n                if (c < 0xDC00) {\n                    buf[pos++] = 0xEF;\n                    buf[pos++] = 0xBF;\n                    buf[pos++] = 0xBD;\n                    lead = c;\n                    continue;\n                } else {\n                    c = lead - 0xD800 << 10 | c - 0xDC00 | 0x10000;\n                    lead = null;\n                }\n            } else {\n                if (c > 0xDBFF || (i + 1 === str.length)) {\n                    buf[pos++] = 0xEF;\n                    buf[pos++] = 0xBF;\n                    buf[pos++] = 0xBD;\n                } else {\n                    lead = c;\n                }\n                continue;\n            }\n        } else if (lead) {\n            buf[pos++] = 0xEF;\n            buf[pos++] = 0xBF;\n            buf[pos++] = 0xBD;\n            lead = null;\n        }\n\n        if (c < 0x80) {\n            buf[pos++] = c;\n        } else {\n            if (c < 0x800) {\n                buf[pos++] = c >> 0x6 | 0xC0;\n            } else {\n                if (c < 0x10000) {\n                    buf[pos++] = c >> 0xC | 0xE0;\n                } else {\n                    buf[pos++] = c >> 0x12 | 0xF0;\n                    buf[pos++] = c >> 0xC & 0x3F | 0x80;\n                }\n                buf[pos++] = c >> 0x6 & 0x3F | 0x80;\n            }\n            buf[pos++] = c & 0x3F | 0x80;\n        }\n    }\n    return pos;\n}\n","var superPropBase = require(\"./superPropBase\");\n\nvar defineProperty = require(\"./defineProperty\");\n\nfunction set(target, property, value, receiver) {\n  if (typeof Reflect !== \"undefined\" && Reflect.set) {\n    set = Reflect.set;\n  } else {\n    set = function set(target, property, value, receiver) {\n      var base = superPropBase(target, property);\n      var desc;\n\n      if (base) {\n        desc = Object.getOwnPropertyDescriptor(base, property);\n\n        if (desc.set) {\n          desc.set.call(receiver, value);\n          return true;\n        } else if (!desc.writable) {\n          return false;\n        }\n      }\n\n      desc = Object.getOwnPropertyDescriptor(receiver, property);\n\n      if (desc) {\n        if (!desc.writable) {\n          return false;\n        }\n\n        desc.value = value;\n        Object.defineProperty(receiver, property, desc);\n      } else {\n        defineProperty(receiver, property, value);\n      }\n\n      return true;\n    };\n  }\n\n  return set(target, property, value, receiver);\n}\n\nfunction _set(target, property, value, receiver, isStrict) {\n  var s = set(target, property, value, receiver || target);\n\n  if (!s && isStrict) {\n    throw new Error('failed to set property');\n  }\n\n  return value;\n}\n\nmodule.exports = _set;","/*! nouislider - 14.6.0 - 6/27/2020 */\n(function(factory) {\n    if (typeof define === \"function\" && define.amd) {\n        // AMD. Register as an anonymous module.\n        define([], factory);\n    } else if (typeof exports === \"object\") {\n        // Node/CommonJS\n        module.exports = factory();\n    } else {\n        // Browser globals\n        window.noUiSlider = factory();\n    }\n})(function() {\n    \"use strict\";\n\n    var VERSION = \"14.6.0\";\n\n    //region Helper Methods\n\n    function isValidFormatter(entry) {\n        return typeof entry === \"object\" && typeof entry.to === \"function\" && typeof entry.from === \"function\";\n    }\n\n    function removeElement(el) {\n        el.parentElement.removeChild(el);\n    }\n\n    function isSet(value) {\n        return value !== null && value !== undefined;\n    }\n\n    // Bindable version\n    function preventDefault(e) {\n        e.preventDefault();\n    }\n\n    // Removes duplicates from an array.\n    function unique(array) {\n        return array.filter(function(a) {\n            return !this[a] ? (this[a] = true) : false;\n        }, {});\n    }\n\n    // Round a value to the closest 'to'.\n    function closest(value, to) {\n        return Math.round(value / to) * to;\n    }\n\n    // Current position of an element relative to the document.\n    function offset(elem, orientation) {\n        var rect = elem.getBoundingClientRect();\n        var doc = elem.ownerDocument;\n        var docElem = doc.documentElement;\n        var pageOffset = getPageOffset(doc);\n\n        // getBoundingClientRect contains left scroll in Chrome on Android.\n        // I haven't found a feature detection that proves this. Worst case\n        // scenario on mis-match: the 'tap' feature on horizontal sliders breaks.\n        if (/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)) {\n            pageOffset.x = 0;\n        }\n\n        return orientation\n            ? rect.top + pageOffset.y - docElem.clientTop\n            : rect.left + pageOffset.x - docElem.clientLeft;\n    }\n\n    // Checks whether a value is numerical.\n    function isNumeric(a) {\n        return typeof a === \"number\" && !isNaN(a) && isFinite(a);\n    }\n\n    // Sets a class and removes it after [duration] ms.\n    function addClassFor(element, className, duration) {\n        if (duration > 0) {\n            addClass(element, className);\n            setTimeout(function() {\n                removeClass(element, className);\n            }, duration);\n        }\n    }\n\n    // Limits a value to 0 - 100\n    function limit(a) {\n        return Math.max(Math.min(a, 100), 0);\n    }\n\n    // Wraps a variable as an array, if it isn't one yet.\n    // Note that an input array is returned by reference!\n    function asArray(a) {\n        return Array.isArray(a) ? a : [a];\n    }\n\n    // Counts decimals\n    function countDecimals(numStr) {\n        numStr = String(numStr);\n        var pieces = numStr.split(\".\");\n        return pieces.length > 1 ? pieces[1].length : 0;\n    }\n\n    // http://youmightnotneedjquery.com/#add_class\n    function addClass(el, className) {\n        if (el.classList && !/\\s/.test(className)) {\n            el.classList.add(className);\n        } else {\n            el.className += \" \" + className;\n        }\n    }\n\n    // http://youmightnotneedjquery.com/#remove_class\n    function removeClass(el, className) {\n        if (el.classList && !/\\s/.test(className)) {\n            el.classList.remove(className);\n        } else {\n            el.className = el.className.replace(\n                new RegExp(\"(^|\\\\b)\" + className.split(\" \").join(\"|\") + \"(\\\\b|$)\", \"gi\"),\n                \" \"\n            );\n        }\n    }\n\n    // https://plainjs.com/javascript/attributes/adding-removing-and-testing-for-classes-9/\n    function hasClass(el, className) {\n        return el.classList\n            ? el.classList.contains(className)\n            : new RegExp(\"\\\\b\" + className + \"\\\\b\").test(el.className);\n    }\n\n    // https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY#Notes\n    function getPageOffset(doc) {\n        var supportPageOffset = window.pageXOffset !== undefined;\n        var isCSS1Compat = (doc.compatMode || \"\") === \"CSS1Compat\";\n        var x = supportPageOffset\n            ? window.pageXOffset\n            : isCSS1Compat\n                ? doc.documentElement.scrollLeft\n                : doc.body.scrollLeft;\n        var y = supportPageOffset\n            ? window.pageYOffset\n            : isCSS1Compat\n                ? doc.documentElement.scrollTop\n                : doc.body.scrollTop;\n\n        return {\n            x: x,\n            y: y\n        };\n    }\n\n    // we provide a function to compute constants instead\n    // of accessing window.* as soon as the module needs it\n    // so that we do not compute anything if not needed\n    function getActions() {\n        // Determine the events to bind. IE11 implements pointerEvents without\n        // a prefix, which breaks compatibility with the IE10 implementation.\n        return window.navigator.pointerEnabled\n            ? {\n                  start: \"pointerdown\",\n                  move: \"pointermove\",\n                  end: \"pointerup\"\n              }\n            : window.navigator.msPointerEnabled\n                ? {\n                      start: \"MSPointerDown\",\n                      move: \"MSPointerMove\",\n                      end: \"MSPointerUp\"\n                  }\n                : {\n                      start: \"mousedown touchstart\",\n                      move: \"mousemove touchmove\",\n                      end: \"mouseup touchend\"\n                  };\n    }\n\n    // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\n    // Issue #785\n    function getSupportsPassive() {\n        var supportsPassive = false;\n\n        /* eslint-disable */\n        try {\n            var opts = Object.defineProperty({}, \"passive\", {\n                get: function() {\n                    supportsPassive = true;\n                }\n            });\n\n            window.addEventListener(\"test\", null, opts);\n        } catch (e) {}\n        /* eslint-enable */\n\n        return supportsPassive;\n    }\n\n    function getSupportsTouchActionNone() {\n        return window.CSS && CSS.supports && CSS.supports(\"touch-action\", \"none\");\n    }\n\n    //endregion\n\n    //region Range Calculation\n\n    // Determine the size of a sub-range in relation to a full range.\n    function subRangeRatio(pa, pb) {\n        return 100 / (pb - pa);\n    }\n\n    // (percentage) How many percent is this value of this range?\n    function fromPercentage(range, value, startRange) {\n        return (value * 100) / (range[startRange + 1] - range[startRange]);\n    }\n\n    // (percentage) Where is this value on this range?\n    function toPercentage(range, value) {\n        return fromPercentage(range, range[0] < 0 ? value + Math.abs(range[0]) : value - range[0], 0);\n    }\n\n    // (value) How much is this percentage on this range?\n    function isPercentage(range, value) {\n        return (value * (range[1] - range[0])) / 100 + range[0];\n    }\n\n    function getJ(value, arr) {\n        var j = 1;\n\n        while (value >= arr[j]) {\n            j += 1;\n        }\n\n        return j;\n    }\n\n    // (percentage) Input a value, find where, on a scale of 0-100, it applies.\n    function toStepping(xVal, xPct, value) {\n        if (value >= xVal.slice(-1)[0]) {\n            return 100;\n        }\n\n        var j = getJ(value, xVal);\n        var va = xVal[j - 1];\n        var vb = xVal[j];\n        var pa = xPct[j - 1];\n        var pb = xPct[j];\n\n        return pa + toPercentage([va, vb], value) / subRangeRatio(pa, pb);\n    }\n\n    // (value) Input a percentage, find where it is on the specified range.\n    function fromStepping(xVal, xPct, value) {\n        // There is no range group that fits 100\n        if (value >= 100) {\n            return xVal.slice(-1)[0];\n        }\n\n        var j = getJ(value, xPct);\n        var va = xVal[j - 1];\n        var vb = xVal[j];\n        var pa = xPct[j - 1];\n        var pb = xPct[j];\n\n        return isPercentage([va, vb], (value - pa) * subRangeRatio(pa, pb));\n    }\n\n    // (percentage) Get the step that applies at a certain value.\n    function getStep(xPct, xSteps, snap, value) {\n        if (value === 100) {\n            return value;\n        }\n\n        var j = getJ(value, xPct);\n        var a = xPct[j - 1];\n        var b = xPct[j];\n\n        // If 'snap' is set, steps are used as fixed points on the slider.\n        if (snap) {\n            // Find the closest position, a or b.\n            if (value - a > (b - a) / 2) {\n                return b;\n            }\n\n            return a;\n        }\n\n        if (!xSteps[j - 1]) {\n            return value;\n        }\n\n        return xPct[j - 1] + closest(value - xPct[j - 1], xSteps[j - 1]);\n    }\n\n    function handleEntryPoint(index, value, that) {\n        var percentage;\n\n        // Wrap numerical input in an array.\n        if (typeof value === \"number\") {\n            value = [value];\n        }\n\n        // Reject any invalid input, by testing whether value is an array.\n        if (!Array.isArray(value)) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'range' contains invalid value.\");\n        }\n\n        // Covert min/max syntax to 0 and 100.\n        if (index === \"min\") {\n            percentage = 0;\n        } else if (index === \"max\") {\n            percentage = 100;\n        } else {\n            percentage = parseFloat(index);\n        }\n\n        // Check for correct input.\n        if (!isNumeric(percentage) || !isNumeric(value[0])) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'range' value isn't numeric.\");\n        }\n\n        // Store values.\n        that.xPct.push(percentage);\n        that.xVal.push(value[0]);\n\n        // NaN will evaluate to false too, but to keep\n        // logging clear, set step explicitly. Make sure\n        // not to override the 'step' setting with false.\n        if (!percentage) {\n            if (!isNaN(value[1])) {\n                that.xSteps[0] = value[1];\n            }\n        } else {\n            that.xSteps.push(isNaN(value[1]) ? false : value[1]);\n        }\n\n        that.xHighestCompleteStep.push(0);\n    }\n\n    function handleStepPoint(i, n, that) {\n        // Ignore 'false' stepping.\n        if (!n) {\n            return;\n        }\n\n        // Step over zero-length ranges (#948);\n        if (that.xVal[i] === that.xVal[i + 1]) {\n            that.xSteps[i] = that.xHighestCompleteStep[i] = that.xVal[i];\n\n            return;\n        }\n\n        // Factor to range ratio\n        that.xSteps[i] =\n            fromPercentage([that.xVal[i], that.xVal[i + 1]], n, 0) / subRangeRatio(that.xPct[i], that.xPct[i + 1]);\n\n        var totalSteps = (that.xVal[i + 1] - that.xVal[i]) / that.xNumSteps[i];\n        var highestStep = Math.ceil(Number(totalSteps.toFixed(3)) - 1);\n        var step = that.xVal[i] + that.xNumSteps[i] * highestStep;\n\n        that.xHighestCompleteStep[i] = step;\n    }\n\n    //endregion\n\n    //region Spectrum\n\n    function Spectrum(entry, snap, singleStep) {\n        this.xPct = [];\n        this.xVal = [];\n        this.xSteps = [singleStep || false];\n        this.xNumSteps = [false];\n        this.xHighestCompleteStep = [];\n\n        this.snap = snap;\n\n        var index;\n        var ordered = []; // [0, 'min'], [1, '50%'], [2, 'max']\n\n        // Map the object keys to an array.\n        for (index in entry) {\n            if (entry.hasOwnProperty(index)) {\n                ordered.push([entry[index], index]);\n            }\n        }\n\n        // Sort all entries by value (numeric sort).\n        if (ordered.length && typeof ordered[0][0] === \"object\") {\n            ordered.sort(function(a, b) {\n                return a[0][0] - b[0][0];\n            });\n        } else {\n            ordered.sort(function(a, b) {\n                return a[0] - b[0];\n            });\n        }\n\n        // Convert all entries to subranges.\n        for (index = 0; index < ordered.length; index++) {\n            handleEntryPoint(ordered[index][1], ordered[index][0], this);\n        }\n\n        // Store the actual step values.\n        // xSteps is sorted in the same order as xPct and xVal.\n        this.xNumSteps = this.xSteps.slice(0);\n\n        // Convert all numeric steps to the percentage of the subrange they represent.\n        for (index = 0; index < this.xNumSteps.length; index++) {\n            handleStepPoint(index, this.xNumSteps[index], this);\n        }\n    }\n\n    Spectrum.prototype.getDistance = function(value) {\n        var index;\n        var distances = [];\n\n        for (index = 0; index < this.xNumSteps.length - 1; index++) {\n            // last \"range\" can't contain step size as it is purely an endpoint.\n            var step = this.xNumSteps[index];\n\n            if (step && (value / step) % 1 !== 0) {\n                throw new Error(\n                    \"noUiSlider (\" +\n                        VERSION +\n                        \"): 'limit', 'margin' and 'padding' of \" +\n                        this.xPct[index] +\n                        \"% range must be divisible by step.\"\n                );\n            }\n\n            // Calculate percentual distance in current range of limit, margin or padding\n            distances[index] = fromPercentage(this.xVal, value, index);\n        }\n\n        return distances;\n    };\n\n    // Calculate the percentual distance over the whole scale of ranges.\n    // direction: 0 = backwards / 1 = forwards\n    Spectrum.prototype.getAbsoluteDistance = function(value, distances, direction) {\n        var xPct_index = 0;\n\n        // Calculate range where to start calculation\n        if (value < this.xPct[this.xPct.length - 1]) {\n            while (value > this.xPct[xPct_index + 1]) {\n                xPct_index++;\n            }\n        } else if (value === this.xPct[this.xPct.length - 1]) {\n            xPct_index = this.xPct.length - 2;\n        }\n\n        // If looking backwards and the value is exactly at a range separator then look one range further\n        if (!direction && value === this.xPct[xPct_index + 1]) {\n            xPct_index++;\n        }\n\n        var start_factor;\n        var rest_factor = 1;\n\n        var rest_rel_distance = distances[xPct_index];\n\n        var range_pct = 0;\n\n        var rel_range_distance = 0;\n        var abs_distance_counter = 0;\n        var range_counter = 0;\n\n        // Calculate what part of the start range the value is\n        if (direction) {\n            start_factor = (value - this.xPct[xPct_index]) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);\n        } else {\n            start_factor = (this.xPct[xPct_index + 1] - value) / (this.xPct[xPct_index + 1] - this.xPct[xPct_index]);\n        }\n\n        // Do until the complete distance across ranges is calculated\n        while (rest_rel_distance > 0) {\n            // Calculate the percentage of total range\n            range_pct = this.xPct[xPct_index + 1 + range_counter] - this.xPct[xPct_index + range_counter];\n\n            // Detect if the margin, padding or limit is larger then the current range and calculate\n            if (distances[xPct_index + range_counter] * rest_factor + 100 - start_factor * 100 > 100) {\n                // If larger then take the percentual distance of the whole range\n                rel_range_distance = range_pct * start_factor;\n                // Rest factor of relative percentual distance still to be calculated\n                rest_factor = (rest_rel_distance - 100 * start_factor) / distances[xPct_index + range_counter];\n                // Set start factor to 1 as for next range it does not apply.\n                start_factor = 1;\n            } else {\n                // If smaller or equal then take the percentual distance of the calculate percentual part of that range\n                rel_range_distance = ((distances[xPct_index + range_counter] * range_pct) / 100) * rest_factor;\n                // No rest left as the rest fits in current range\n                rest_factor = 0;\n            }\n\n            if (direction) {\n                abs_distance_counter = abs_distance_counter - rel_range_distance;\n                // Limit range to first range when distance becomes outside of minimum range\n                if (this.xPct.length + range_counter >= 1) {\n                    range_counter--;\n                }\n            } else {\n                abs_distance_counter = abs_distance_counter + rel_range_distance;\n                // Limit range to last range when distance becomes outside of maximum range\n                if (this.xPct.length - range_counter >= 1) {\n                    range_counter++;\n                }\n            }\n\n            // Rest of relative percentual distance still to be calculated\n            rest_rel_distance = distances[xPct_index + range_counter] * rest_factor;\n        }\n\n        return value + abs_distance_counter;\n    };\n\n    Spectrum.prototype.toStepping = function(value) {\n        value = toStepping(this.xVal, this.xPct, value);\n\n        return value;\n    };\n\n    Spectrum.prototype.fromStepping = function(value) {\n        return fromStepping(this.xVal, this.xPct, value);\n    };\n\n    Spectrum.prototype.getStep = function(value) {\n        value = getStep(this.xPct, this.xSteps, this.snap, value);\n\n        return value;\n    };\n\n    Spectrum.prototype.getDefaultStep = function(value, isDown, size) {\n        var j = getJ(value, this.xPct);\n\n        // When at the top or stepping down, look at the previous sub-range\n        if (value === 100 || (isDown && value === this.xPct[j - 1])) {\n            j = Math.max(j - 1, 1);\n        }\n\n        return (this.xVal[j] - this.xVal[j - 1]) / size;\n    };\n\n    Spectrum.prototype.getNearbySteps = function(value) {\n        var j = getJ(value, this.xPct);\n\n        return {\n            stepBefore: {\n                startValue: this.xVal[j - 2],\n                step: this.xNumSteps[j - 2],\n                highestStep: this.xHighestCompleteStep[j - 2]\n            },\n            thisStep: {\n                startValue: this.xVal[j - 1],\n                step: this.xNumSteps[j - 1],\n                highestStep: this.xHighestCompleteStep[j - 1]\n            },\n            stepAfter: {\n                startValue: this.xVal[j],\n                step: this.xNumSteps[j],\n                highestStep: this.xHighestCompleteStep[j]\n            }\n        };\n    };\n\n    Spectrum.prototype.countStepDecimals = function() {\n        var stepDecimals = this.xNumSteps.map(countDecimals);\n        return Math.max.apply(null, stepDecimals);\n    };\n\n    // Outside testing\n    Spectrum.prototype.convert = function(value) {\n        return this.getStep(this.toStepping(value));\n    };\n\n    //endregion\n\n    //region Options\n\n    /*\tEvery input option is tested and parsed. This'll prevent\n        endless validation in internal methods. These tests are\n        structured with an item for every option available. An\n        option can be marked as required by setting the 'r' flag.\n        The testing function is provided with three arguments:\n            - The provided value for the option;\n            - A reference to the options object;\n            - The name for the option;\n\n        The testing function returns false when an error is detected,\n        or true when everything is OK. It can also modify the option\n        object, to make sure all values can be correctly looped elsewhere. */\n\n    //region Defaults\n\n    var defaultFormatter = {\n        to: function(value) {\n            return value !== undefined && value.toFixed(2);\n        },\n        from: Number\n    };\n\n    var cssClasses = {\n        target: \"target\",\n        base: \"base\",\n        origin: \"origin\",\n        handle: \"handle\",\n        handleLower: \"handle-lower\",\n        handleUpper: \"handle-upper\",\n        touchArea: \"touch-area\",\n        horizontal: \"horizontal\",\n        vertical: \"vertical\",\n        background: \"background\",\n        connect: \"connect\",\n        connects: \"connects\",\n        ltr: \"ltr\",\n        rtl: \"rtl\",\n        textDirectionLtr: \"txt-dir-ltr\",\n        textDirectionRtl: \"txt-dir-rtl\",\n        draggable: \"draggable\",\n        drag: \"state-drag\",\n        tap: \"state-tap\",\n        active: \"active\",\n        tooltip: \"tooltip\",\n        pips: \"pips\",\n        pipsHorizontal: \"pips-horizontal\",\n        pipsVertical: \"pips-vertical\",\n        marker: \"marker\",\n        markerHorizontal: \"marker-horizontal\",\n        markerVertical: \"marker-vertical\",\n        markerNormal: \"marker-normal\",\n        markerLarge: \"marker-large\",\n        markerSub: \"marker-sub\",\n        value: \"value\",\n        valueHorizontal: \"value-horizontal\",\n        valueVertical: \"value-vertical\",\n        valueNormal: \"value-normal\",\n        valueLarge: \"value-large\",\n        valueSub: \"value-sub\"\n    };\n\n    //endregion\n\n    function validateFormat(entry) {\n        // Any object with a to and from method is supported.\n        if (isValidFormatter(entry)) {\n            return true;\n        }\n\n        throw new Error(\"noUiSlider (\" + VERSION + \"): 'format' requires 'to' and 'from' methods.\");\n    }\n\n    function testStep(parsed, entry) {\n        if (!isNumeric(entry)) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'step' is not numeric.\");\n        }\n\n        // The step option can still be used to set stepping\n        // for linear sliders. Overwritten if set in 'range'.\n        parsed.singleStep = entry;\n    }\n\n    function testKeyboardPageMultiplier(parsed, entry) {\n        if (!isNumeric(entry)) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'keyboardPageMultiplier' is not numeric.\");\n        }\n\n        parsed.keyboardPageMultiplier = entry;\n    }\n\n    function testKeyboardDefaultStep(parsed, entry) {\n        if (!isNumeric(entry)) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'keyboardDefaultStep' is not numeric.\");\n        }\n\n        parsed.keyboardDefaultStep = entry;\n    }\n\n    function testRange(parsed, entry) {\n        // Filter incorrect input.\n        if (typeof entry !== \"object\" || Array.isArray(entry)) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'range' is not an object.\");\n        }\n\n        // Catch missing start or end.\n        if (entry.min === undefined || entry.max === undefined) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): Missing 'min' or 'max' in 'range'.\");\n        }\n\n        // Catch equal start or end.\n        if (entry.min === entry.max) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'range' 'min' and 'max' cannot be equal.\");\n        }\n\n        parsed.spectrum = new Spectrum(entry, parsed.snap, parsed.singleStep);\n    }\n\n    function testStart(parsed, entry) {\n        entry = asArray(entry);\n\n        // Validate input. Values aren't tested, as the public .val method\n        // will always provide a valid location.\n        if (!Array.isArray(entry) || !entry.length) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'start' option is incorrect.\");\n        }\n\n        // Store the number of handles.\n        parsed.handles = entry.length;\n\n        // When the slider is initialized, the .val method will\n        // be called with the start options.\n        parsed.start = entry;\n    }\n\n    function testSnap(parsed, entry) {\n        // Enforce 100% stepping within subranges.\n        parsed.snap = entry;\n\n        if (typeof entry !== \"boolean\") {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'snap' option must be a boolean.\");\n        }\n    }\n\n    function testAnimate(parsed, entry) {\n        // Enforce 100% stepping within subranges.\n        parsed.animate = entry;\n\n        if (typeof entry !== \"boolean\") {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'animate' option must be a boolean.\");\n        }\n    }\n\n    function testAnimationDuration(parsed, entry) {\n        parsed.animationDuration = entry;\n\n        if (typeof entry !== \"number\") {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'animationDuration' option must be a number.\");\n        }\n    }\n\n    function testConnect(parsed, entry) {\n        var connect = [false];\n        var i;\n\n        // Map legacy options\n        if (entry === \"lower\") {\n            entry = [true, false];\n        } else if (entry === \"upper\") {\n            entry = [false, true];\n        }\n\n        // Handle boolean options\n        if (entry === true || entry === false) {\n            for (i = 1; i < parsed.handles; i++) {\n                connect.push(entry);\n            }\n\n            connect.push(false);\n        }\n\n        // Reject invalid input\n        else if (!Array.isArray(entry) || !entry.length || entry.length !== parsed.handles + 1) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'connect' option doesn't match handle count.\");\n        } else {\n            connect = entry;\n        }\n\n        parsed.connect = connect;\n    }\n\n    function testOrientation(parsed, entry) {\n        // Set orientation to an a numerical value for easy\n        // array selection.\n        switch (entry) {\n            case \"horizontal\":\n                parsed.ort = 0;\n                break;\n            case \"vertical\":\n                parsed.ort = 1;\n                break;\n            default:\n                throw new Error(\"noUiSlider (\" + VERSION + \"): 'orientation' option is invalid.\");\n        }\n    }\n\n    function testMargin(parsed, entry) {\n        if (!isNumeric(entry)) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'margin' option must be numeric.\");\n        }\n\n        // Issue #582\n        if (entry === 0) {\n            return;\n        }\n\n        parsed.margin = parsed.spectrum.getDistance(entry);\n    }\n\n    function testLimit(parsed, entry) {\n        if (!isNumeric(entry)) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'limit' option must be numeric.\");\n        }\n\n        parsed.limit = parsed.spectrum.getDistance(entry);\n\n        if (!parsed.limit || parsed.handles < 2) {\n            throw new Error(\n                \"noUiSlider (\" +\n                    VERSION +\n                    \"): 'limit' option is only supported on linear sliders with 2 or more handles.\"\n            );\n        }\n    }\n\n    function testPadding(parsed, entry) {\n        var index;\n\n        if (!isNumeric(entry) && !Array.isArray(entry)) {\n            throw new Error(\n                \"noUiSlider (\" + VERSION + \"): 'padding' option must be numeric or array of exactly 2 numbers.\"\n            );\n        }\n\n        if (Array.isArray(entry) && !(entry.length === 2 || isNumeric(entry[0]) || isNumeric(entry[1]))) {\n            throw new Error(\n                \"noUiSlider (\" + VERSION + \"): 'padding' option must be numeric or array of exactly 2 numbers.\"\n            );\n        }\n\n        if (entry === 0) {\n            return;\n        }\n\n        if (!Array.isArray(entry)) {\n            entry = [entry, entry];\n        }\n\n        // 'getDistance' returns false for invalid values.\n        parsed.padding = [parsed.spectrum.getDistance(entry[0]), parsed.spectrum.getDistance(entry[1])];\n\n        for (index = 0; index < parsed.spectrum.xNumSteps.length - 1; index++) {\n            // last \"range\" can't contain step size as it is purely an endpoint.\n            if (parsed.padding[0][index] < 0 || parsed.padding[1][index] < 0) {\n                throw new Error(\"noUiSlider (\" + VERSION + \"): 'padding' option must be a positive number(s).\");\n            }\n        }\n\n        var totalPadding = entry[0] + entry[1];\n        var firstValue = parsed.spectrum.xVal[0];\n        var lastValue = parsed.spectrum.xVal[parsed.spectrum.xVal.length - 1];\n\n        if (totalPadding / (lastValue - firstValue) > 1) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'padding' option must not exceed 100% of the range.\");\n        }\n    }\n\n    function testDirection(parsed, entry) {\n        // Set direction as a numerical value for easy parsing.\n        // Invert connection for RTL sliders, so that the proper\n        // handles get the connect/background classes.\n        switch (entry) {\n            case \"ltr\":\n                parsed.dir = 0;\n                break;\n            case \"rtl\":\n                parsed.dir = 1;\n                break;\n            default:\n                throw new Error(\"noUiSlider (\" + VERSION + \"): 'direction' option was not recognized.\");\n        }\n    }\n\n    function testBehaviour(parsed, entry) {\n        // Make sure the input is a string.\n        if (typeof entry !== \"string\") {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'behaviour' must be a string containing options.\");\n        }\n\n        // Check if the string contains any keywords.\n        // None are required.\n        var tap = entry.indexOf(\"tap\") >= 0;\n        var drag = entry.indexOf(\"drag\") >= 0;\n        var fixed = entry.indexOf(\"fixed\") >= 0;\n        var snap = entry.indexOf(\"snap\") >= 0;\n        var hover = entry.indexOf(\"hover\") >= 0;\n        var unconstrained = entry.indexOf(\"unconstrained\") >= 0;\n\n        if (fixed) {\n            if (parsed.handles !== 2) {\n                throw new Error(\"noUiSlider (\" + VERSION + \"): 'fixed' behaviour must be used with 2 handles\");\n            }\n\n            // Use margin to enforce fixed state\n            testMargin(parsed, parsed.start[1] - parsed.start[0]);\n        }\n\n        if (unconstrained && (parsed.margin || parsed.limit)) {\n            throw new Error(\n                \"noUiSlider (\" + VERSION + \"): 'unconstrained' behaviour cannot be used with margin or limit\"\n            );\n        }\n\n        parsed.events = {\n            tap: tap || snap,\n            drag: drag,\n            fixed: fixed,\n            snap: snap,\n            hover: hover,\n            unconstrained: unconstrained\n        };\n    }\n\n    function testTooltips(parsed, entry) {\n        if (entry === false) {\n            return;\n        }\n\n        if (entry === true) {\n            parsed.tooltips = [];\n\n            for (var i = 0; i < parsed.handles; i++) {\n                parsed.tooltips.push(true);\n            }\n        } else {\n            parsed.tooltips = asArray(entry);\n\n            if (parsed.tooltips.length !== parsed.handles) {\n                throw new Error(\"noUiSlider (\" + VERSION + \"): must pass a formatter for all handles.\");\n            }\n\n            parsed.tooltips.forEach(function(formatter) {\n                if (\n                    typeof formatter !== \"boolean\" &&\n                    (typeof formatter !== \"object\" || typeof formatter.to !== \"function\")\n                ) {\n                    throw new Error(\"noUiSlider (\" + VERSION + \"): 'tooltips' must be passed a formatter or 'false'.\");\n                }\n            });\n        }\n    }\n\n    function testAriaFormat(parsed, entry) {\n        parsed.ariaFormat = entry;\n        validateFormat(entry);\n    }\n\n    function testFormat(parsed, entry) {\n        parsed.format = entry;\n        validateFormat(entry);\n    }\n\n    function testKeyboardSupport(parsed, entry) {\n        parsed.keyboardSupport = entry;\n\n        if (typeof entry !== \"boolean\") {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'keyboardSupport' option must be a boolean.\");\n        }\n    }\n\n    function testDocumentElement(parsed, entry) {\n        // This is an advanced option. Passed values are used without validation.\n        parsed.documentElement = entry;\n    }\n\n    function testCssPrefix(parsed, entry) {\n        if (typeof entry !== \"string\" && entry !== false) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'cssPrefix' must be a string or `false`.\");\n        }\n\n        parsed.cssPrefix = entry;\n    }\n\n    function testCssClasses(parsed, entry) {\n        if (typeof entry !== \"object\") {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): 'cssClasses' must be an object.\");\n        }\n\n        if (typeof parsed.cssPrefix === \"string\") {\n            parsed.cssClasses = {};\n\n            for (var key in entry) {\n                if (!entry.hasOwnProperty(key)) {\n                    continue;\n                }\n\n                parsed.cssClasses[key] = parsed.cssPrefix + entry[key];\n            }\n        } else {\n            parsed.cssClasses = entry;\n        }\n    }\n\n    // Test all developer settings and parse to assumption-safe values.\n    function testOptions(options) {\n        // To prove a fix for #537, freeze options here.\n        // If the object is modified, an error will be thrown.\n        // Object.freeze(options);\n\n        var parsed = {\n            margin: 0,\n            limit: 0,\n            padding: 0,\n            animate: true,\n            animationDuration: 300,\n            ariaFormat: defaultFormatter,\n            format: defaultFormatter\n        };\n\n        // Tests are executed in the order they are presented here.\n        var tests = {\n            step: { r: false, t: testStep },\n            keyboardPageMultiplier: { r: false, t: testKeyboardPageMultiplier },\n            keyboardDefaultStep: { r: false, t: testKeyboardDefaultStep },\n            start: { r: true, t: testStart },\n            connect: { r: true, t: testConnect },\n            direction: { r: true, t: testDirection },\n            snap: { r: false, t: testSnap },\n            animate: { r: false, t: testAnimate },\n            animationDuration: { r: false, t: testAnimationDuration },\n            range: { r: true, t: testRange },\n            orientation: { r: false, t: testOrientation },\n            margin: { r: false, t: testMargin },\n            limit: { r: false, t: testLimit },\n            padding: { r: false, t: testPadding },\n            behaviour: { r: true, t: testBehaviour },\n            ariaFormat: { r: false, t: testAriaFormat },\n            format: { r: false, t: testFormat },\n            tooltips: { r: false, t: testTooltips },\n            keyboardSupport: { r: true, t: testKeyboardSupport },\n            documentElement: { r: false, t: testDocumentElement },\n            cssPrefix: { r: true, t: testCssPrefix },\n            cssClasses: { r: true, t: testCssClasses }\n        };\n\n        var defaults = {\n            connect: false,\n            direction: \"ltr\",\n            behaviour: \"tap\",\n            orientation: \"horizontal\",\n            keyboardSupport: true,\n            cssPrefix: \"noUi-\",\n            cssClasses: cssClasses,\n            keyboardPageMultiplier: 5,\n            keyboardDefaultStep: 10\n        };\n\n        // AriaFormat defaults to regular format, if any.\n        if (options.format && !options.ariaFormat) {\n            options.ariaFormat = options.format;\n        }\n\n        // Run all options through a testing mechanism to ensure correct\n        // input. It should be noted that options might get modified to\n        // be handled properly. E.g. wrapping integers in arrays.\n        Object.keys(tests).forEach(function(name) {\n            // If the option isn't set, but it is required, throw an error.\n            if (!isSet(options[name]) && defaults[name] === undefined) {\n                if (tests[name].r) {\n                    throw new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\n                }\n\n                return true;\n            }\n\n            tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);\n        });\n\n        // Forward pips options\n        parsed.pips = options.pips;\n\n        // All recent browsers accept unprefixed transform.\n        // We need -ms- for IE9 and -webkit- for older Android;\n        // Assume use of -webkit- if unprefixed and -ms- are not supported.\n        // https://caniuse.com/#feat=transforms2d\n        var d = document.createElement(\"div\");\n        var msPrefix = d.style.msTransform !== undefined;\n        var noPrefix = d.style.transform !== undefined;\n\n        parsed.transformRule = noPrefix ? \"transform\" : msPrefix ? \"msTransform\" : \"webkitTransform\";\n\n        // Pips don't move, so we can place them using left/top.\n        var styles = [[\"left\", \"top\"], [\"right\", \"bottom\"]];\n\n        parsed.style = styles[parsed.dir][parsed.ort];\n\n        return parsed;\n    }\n\n    //endregion\n\n    function scope(target, options, originalOptions) {\n        var actions = getActions();\n        var supportsTouchActionNone = getSupportsTouchActionNone();\n        var supportsPassive = supportsTouchActionNone && getSupportsPassive();\n\n        // All variables local to 'scope' are prefixed with 'scope_'\n\n        // Slider DOM Nodes\n        var scope_Target = target;\n        var scope_Base;\n        var scope_Handles;\n        var scope_Connects;\n        var scope_Pips;\n        var scope_Tooltips;\n\n        // Slider state values\n        var scope_Spectrum = options.spectrum;\n        var scope_Values = [];\n        var scope_Locations = [];\n        var scope_HandleNumbers = [];\n        var scope_ActiveHandlesCount = 0;\n        var scope_Events = {};\n\n        // Exposed API\n        var scope_Self;\n\n        // Document Nodes\n        var scope_Document = target.ownerDocument;\n        var scope_DocumentElement = options.documentElement || scope_Document.documentElement;\n        var scope_Body = scope_Document.body;\n\n        // Pips constants\n        var PIPS_NONE = -1;\n        var PIPS_NO_VALUE = 0;\n        var PIPS_LARGE_VALUE = 1;\n        var PIPS_SMALL_VALUE = 2;\n\n        // For horizontal sliders in standard ltr documents,\n        // make .noUi-origin overflow to the left so the document doesn't scroll.\n        var scope_DirOffset = scope_Document.dir === \"rtl\" || options.ort === 1 ? 0 : 100;\n\n        // Creates a node, adds it to target, returns the new node.\n        function addNodeTo(addTarget, className) {\n            var div = scope_Document.createElement(\"div\");\n\n            if (className) {\n                addClass(div, className);\n            }\n\n            addTarget.appendChild(div);\n\n            return div;\n        }\n\n        // Append a origin to the base\n        function addOrigin(base, handleNumber) {\n            var origin = addNodeTo(base, options.cssClasses.origin);\n            var handle = addNodeTo(origin, options.cssClasses.handle);\n\n            addNodeTo(handle, options.cssClasses.touchArea);\n\n            handle.setAttribute(\"data-handle\", handleNumber);\n\n            if (options.keyboardSupport) {\n                // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex\n                // 0 = focusable and reachable\n                handle.setAttribute(\"tabindex\", \"0\");\n                handle.addEventListener(\"keydown\", function(event) {\n                    return eventKeydown(event, handleNumber);\n                });\n            }\n\n            handle.setAttribute(\"role\", \"slider\");\n            handle.setAttribute(\"aria-orientation\", options.ort ? \"vertical\" : \"horizontal\");\n\n            if (handleNumber === 0) {\n                addClass(handle, options.cssClasses.handleLower);\n            } else if (handleNumber === options.handles - 1) {\n                addClass(handle, options.cssClasses.handleUpper);\n            }\n\n            return origin;\n        }\n\n        // Insert nodes for connect elements\n        function addConnect(base, add) {\n            if (!add) {\n                return false;\n            }\n\n            return addNodeTo(base, options.cssClasses.connect);\n        }\n\n        // Add handles to the slider base.\n        function addElements(connectOptions, base) {\n            var connectBase = addNodeTo(base, options.cssClasses.connects);\n\n            scope_Handles = [];\n            scope_Connects = [];\n\n            scope_Connects.push(addConnect(connectBase, connectOptions[0]));\n\n            // [::::O====O====O====]\n            // connectOptions = [0, 1, 1, 1]\n\n            for (var i = 0; i < options.handles; i++) {\n                // Keep a list of all added handles.\n                scope_Handles.push(addOrigin(base, i));\n                scope_HandleNumbers[i] = i;\n                scope_Connects.push(addConnect(connectBase, connectOptions[i + 1]));\n            }\n        }\n\n        // Initialize a single slider.\n        function addSlider(addTarget) {\n            // Apply classes and data to the target.\n            addClass(addTarget, options.cssClasses.target);\n\n            if (options.dir === 0) {\n                addClass(addTarget, options.cssClasses.ltr);\n            } else {\n                addClass(addTarget, options.cssClasses.rtl);\n            }\n\n            if (options.ort === 0) {\n                addClass(addTarget, options.cssClasses.horizontal);\n            } else {\n                addClass(addTarget, options.cssClasses.vertical);\n            }\n\n            var textDirection = getComputedStyle(addTarget).direction;\n\n            if (textDirection === \"rtl\") {\n                addClass(addTarget, options.cssClasses.textDirectionRtl);\n            } else {\n                addClass(addTarget, options.cssClasses.textDirectionLtr);\n            }\n\n            return addNodeTo(addTarget, options.cssClasses.base);\n        }\n\n        function addTooltip(handle, handleNumber) {\n            if (!options.tooltips[handleNumber]) {\n                return false;\n            }\n\n            return addNodeTo(handle.firstChild, options.cssClasses.tooltip);\n        }\n\n        function isSliderDisabled() {\n            return scope_Target.hasAttribute(\"disabled\");\n        }\n\n        // Disable the slider dragging if any handle is disabled\n        function isHandleDisabled(handleNumber) {\n            var handleOrigin = scope_Handles[handleNumber];\n            return handleOrigin.hasAttribute(\"disabled\");\n        }\n\n        function removeTooltips() {\n            if (scope_Tooltips) {\n                removeEvent(\"update.tooltips\");\n                scope_Tooltips.forEach(function(tooltip) {\n                    if (tooltip) {\n                        removeElement(tooltip);\n                    }\n                });\n                scope_Tooltips = null;\n            }\n        }\n\n        // The tooltips option is a shorthand for using the 'update' event.\n        function tooltips() {\n            removeTooltips();\n\n            // Tooltips are added with options.tooltips in original order.\n            scope_Tooltips = scope_Handles.map(addTooltip);\n\n            bindEvent(\"update.tooltips\", function(values, handleNumber, unencoded) {\n                if (!scope_Tooltips[handleNumber]) {\n                    return;\n                }\n\n                var formattedValue = values[handleNumber];\n\n                if (options.tooltips[handleNumber] !== true) {\n                    formattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\n                }\n\n                scope_Tooltips[handleNumber].innerHTML = formattedValue;\n            });\n        }\n\n        function aria() {\n            bindEvent(\"update\", function(values, handleNumber, unencoded, tap, positions) {\n                // Update Aria Values for all handles, as a change in one changes min and max values for the next.\n                scope_HandleNumbers.forEach(function(index) {\n                    var handle = scope_Handles[index];\n\n                    var min = checkHandlePosition(scope_Locations, index, 0, true, true, true);\n                    var max = checkHandlePosition(scope_Locations, index, 100, true, true, true);\n\n                    var now = positions[index];\n\n                    // Formatted value for display\n                    var text = options.ariaFormat.to(unencoded[index]);\n\n                    // Map to slider range values\n                    min = scope_Spectrum.fromStepping(min).toFixed(1);\n                    max = scope_Spectrum.fromStepping(max).toFixed(1);\n                    now = scope_Spectrum.fromStepping(now).toFixed(1);\n\n                    handle.children[0].setAttribute(\"aria-valuemin\", min);\n                    handle.children[0].setAttribute(\"aria-valuemax\", max);\n                    handle.children[0].setAttribute(\"aria-valuenow\", now);\n                    handle.children[0].setAttribute(\"aria-valuetext\", text);\n                });\n            });\n        }\n\n        function getGroup(mode, values, stepped) {\n            // Use the range.\n            if (mode === \"range\" || mode === \"steps\") {\n                return scope_Spectrum.xVal;\n            }\n\n            if (mode === \"count\") {\n                if (values < 2) {\n                    throw new Error(\"noUiSlider (\" + VERSION + \"): 'values' (>= 2) required for mode 'count'.\");\n                }\n\n                // Divide 0 - 100 in 'count' parts.\n                var interval = values - 1;\n                var spread = 100 / interval;\n\n                values = [];\n\n                // List these parts and have them handled as 'positions'.\n                while (interval--) {\n                    values[interval] = interval * spread;\n                }\n\n                values.push(100);\n\n                mode = \"positions\";\n            }\n\n            if (mode === \"positions\") {\n                // Map all percentages to on-range values.\n                return values.map(function(value) {\n                    return scope_Spectrum.fromStepping(stepped ? scope_Spectrum.getStep(value) : value);\n                });\n            }\n\n            if (mode === \"values\") {\n                // If the value must be stepped, it needs to be converted to a percentage first.\n                if (stepped) {\n                    return values.map(function(value) {\n                        // Convert to percentage, apply step, return to value.\n                        return scope_Spectrum.fromStepping(scope_Spectrum.getStep(scope_Spectrum.toStepping(value)));\n                    });\n                }\n\n                // Otherwise, we can simply use the values.\n                return values;\n            }\n        }\n\n        function generateSpread(density, mode, group) {\n            function safeIncrement(value, increment) {\n                // Avoid floating point variance by dropping the smallest decimal places.\n                return (value + increment).toFixed(7) / 1;\n            }\n\n            var indexes = {};\n            var firstInRange = scope_Spectrum.xVal[0];\n            var lastInRange = scope_Spectrum.xVal[scope_Spectrum.xVal.length - 1];\n            var ignoreFirst = false;\n            var ignoreLast = false;\n            var prevPct = 0;\n\n            // Create a copy of the group, sort it and filter away all duplicates.\n            group = unique(\n                group.slice().sort(function(a, b) {\n                    return a - b;\n                })\n            );\n\n            // Make sure the range starts with the first element.\n            if (group[0] !== firstInRange) {\n                group.unshift(firstInRange);\n                ignoreFirst = true;\n            }\n\n            // Likewise for the last one.\n            if (group[group.length - 1] !== lastInRange) {\n                group.push(lastInRange);\n                ignoreLast = true;\n            }\n\n            group.forEach(function(current, index) {\n                // Get the current step and the lower + upper positions.\n                var step;\n                var i;\n                var q;\n                var low = current;\n                var high = group[index + 1];\n                var newPct;\n                var pctDifference;\n                var pctPos;\n                var type;\n                var steps;\n                var realSteps;\n                var stepSize;\n                var isSteps = mode === \"steps\";\n\n                // When using 'steps' mode, use the provided steps.\n                // Otherwise, we'll step on to the next subrange.\n                if (isSteps) {\n                    step = scope_Spectrum.xNumSteps[index];\n                }\n\n                // Default to a 'full' step.\n                if (!step) {\n                    step = high - low;\n                }\n\n                // Low can be 0, so test for false. If high is undefined,\n                // we are at the last subrange. Index 0 is already handled.\n                if (low === false || high === undefined) {\n                    return;\n                }\n\n                // Make sure step isn't 0, which would cause an infinite loop (#654)\n                step = Math.max(step, 0.0000001);\n\n                // Find all steps in the subrange.\n                for (i = low; i <= high; i = safeIncrement(i, step)) {\n                    // Get the percentage value for the current step,\n                    // calculate the size for the subrange.\n                    newPct = scope_Spectrum.toStepping(i);\n                    pctDifference = newPct - prevPct;\n\n                    steps = pctDifference / density;\n                    realSteps = Math.round(steps);\n\n                    // This ratio represents the amount of percentage-space a point indicates.\n                    // For a density 1 the points/percentage = 1. For density 2, that percentage needs to be re-divided.\n                    // Round the percentage offset to an even number, then divide by two\n                    // to spread the offset on both sides of the range.\n                    stepSize = pctDifference / realSteps;\n\n                    // Divide all points evenly, adding the correct number to this subrange.\n                    // Run up to <= so that 100% gets a point, event if ignoreLast is set.\n                    for (q = 1; q <= realSteps; q += 1) {\n                        // The ratio between the rounded value and the actual size might be ~1% off.\n                        // Correct the percentage offset by the number of points\n                        // per subrange. density = 1 will result in 100 points on the\n                        // full range, 2 for 50, 4 for 25, etc.\n                        pctPos = prevPct + q * stepSize;\n                        indexes[pctPos.toFixed(5)] = [scope_Spectrum.fromStepping(pctPos), 0];\n                    }\n\n                    // Determine the point type.\n                    type = group.indexOf(i) > -1 ? PIPS_LARGE_VALUE : isSteps ? PIPS_SMALL_VALUE : PIPS_NO_VALUE;\n\n                    // Enforce the 'ignoreFirst' option by overwriting the type for 0.\n                    if (!index && ignoreFirst && i !== high) {\n                        type = 0;\n                    }\n\n                    if (!(i === high && ignoreLast)) {\n                        // Mark the 'type' of this point. 0 = plain, 1 = real value, 2 = step value.\n                        indexes[newPct.toFixed(5)] = [i, type];\n                    }\n\n                    // Update the percentage count.\n                    prevPct = newPct;\n                }\n            });\n\n            return indexes;\n        }\n\n        function addMarking(spread, filterFunc, formatter) {\n            var element = scope_Document.createElement(\"div\");\n\n            var valueSizeClasses = [];\n            valueSizeClasses[PIPS_NO_VALUE] = options.cssClasses.valueNormal;\n            valueSizeClasses[PIPS_LARGE_VALUE] = options.cssClasses.valueLarge;\n            valueSizeClasses[PIPS_SMALL_VALUE] = options.cssClasses.valueSub;\n\n            var markerSizeClasses = [];\n            markerSizeClasses[PIPS_NO_VALUE] = options.cssClasses.markerNormal;\n            markerSizeClasses[PIPS_LARGE_VALUE] = options.cssClasses.markerLarge;\n            markerSizeClasses[PIPS_SMALL_VALUE] = options.cssClasses.markerSub;\n\n            var valueOrientationClasses = [options.cssClasses.valueHorizontal, options.cssClasses.valueVertical];\n            var markerOrientationClasses = [options.cssClasses.markerHorizontal, options.cssClasses.markerVertical];\n\n            addClass(element, options.cssClasses.pips);\n            addClass(element, options.ort === 0 ? options.cssClasses.pipsHorizontal : options.cssClasses.pipsVertical);\n\n            function getClasses(type, source) {\n                var a = source === options.cssClasses.value;\n                var orientationClasses = a ? valueOrientationClasses : markerOrientationClasses;\n                var sizeClasses = a ? valueSizeClasses : markerSizeClasses;\n\n                return source + \" \" + orientationClasses[options.ort] + \" \" + sizeClasses[type];\n            }\n\n            function addSpread(offset, value, type) {\n                // Apply the filter function, if it is set.\n                type = filterFunc ? filterFunc(value, type) : type;\n\n                if (type === PIPS_NONE) {\n                    return;\n                }\n\n                // Add a marker for every point\n                var node = addNodeTo(element, false);\n                node.className = getClasses(type, options.cssClasses.marker);\n                node.style[options.style] = offset + \"%\";\n\n                // Values are only appended for points marked '1' or '2'.\n                if (type > PIPS_NO_VALUE) {\n                    node = addNodeTo(element, false);\n                    node.className = getClasses(type, options.cssClasses.value);\n                    node.setAttribute(\"data-value\", value);\n                    node.style[options.style] = offset + \"%\";\n                    node.innerHTML = formatter.to(value);\n                }\n            }\n\n            // Append all points.\n            Object.keys(spread).forEach(function(offset) {\n                addSpread(offset, spread[offset][0], spread[offset][1]);\n            });\n\n            return element;\n        }\n\n        function removePips() {\n            if (scope_Pips) {\n                removeElement(scope_Pips);\n                scope_Pips = null;\n            }\n        }\n\n        function pips(grid) {\n            // Fix #669\n            removePips();\n\n            var mode = grid.mode;\n            var density = grid.density || 1;\n            var filter = grid.filter || false;\n            var values = grid.values || false;\n            var stepped = grid.stepped || false;\n            var group = getGroup(mode, values, stepped);\n            var spread = generateSpread(density, mode, group);\n            var format = grid.format || {\n                to: Math.round\n            };\n\n            scope_Pips = scope_Target.appendChild(addMarking(spread, filter, format));\n\n            return scope_Pips;\n        }\n\n        // Shorthand for base dimensions.\n        function baseSize() {\n            var rect = scope_Base.getBoundingClientRect();\n            var alt = \"offset\" + [\"Width\", \"Height\"][options.ort];\n            return options.ort === 0 ? rect.width || scope_Base[alt] : rect.height || scope_Base[alt];\n        }\n\n        // Handler for attaching events trough a proxy.\n        function attachEvent(events, element, callback, data) {\n            // This function can be used to 'filter' events to the slider.\n            // element is a node, not a nodeList\n\n            var method = function(e) {\n                e = fixEvent(e, data.pageOffset, data.target || element);\n\n                // fixEvent returns false if this event has a different target\n                // when handling (multi-) touch events;\n                if (!e) {\n                    return false;\n                }\n\n                // doNotReject is passed by all end events to make sure released touches\n                // are not rejected, leaving the slider \"stuck\" to the cursor;\n                if (isSliderDisabled() && !data.doNotReject) {\n                    return false;\n                }\n\n                // Stop if an active 'tap' transition is taking place.\n                if (hasClass(scope_Target, options.cssClasses.tap) && !data.doNotReject) {\n                    return false;\n                }\n\n                // Ignore right or middle clicks on start #454\n                if (events === actions.start && e.buttons !== undefined && e.buttons > 1) {\n                    return false;\n                }\n\n                // Ignore right or middle clicks on start #454\n                if (data.hover && e.buttons) {\n                    return false;\n                }\n\n                // 'supportsPassive' is only true if a browser also supports touch-action: none in CSS.\n                // iOS safari does not, so it doesn't get to benefit from passive scrolling. iOS does support\n                // touch-action: manipulation, but that allows panning, which breaks\n                // sliders after zooming/on non-responsive pages.\n                // See: https://bugs.webkit.org/show_bug.cgi?id=133112\n                if (!supportsPassive) {\n                    e.preventDefault();\n                }\n\n                e.calcPoint = e.points[options.ort];\n\n                // Call the event handler with the event [ and additional data ].\n                callback(e, data);\n            };\n\n            var methods = [];\n\n            // Bind a closure on the target for every event type.\n            events.split(\" \").forEach(function(eventName) {\n                element.addEventListener(eventName, method, supportsPassive ? { passive: true } : false);\n                methods.push([eventName, method]);\n            });\n\n            return methods;\n        }\n\n        // Provide a clean event with standardized offset values.\n        function fixEvent(e, pageOffset, eventTarget) {\n            // Filter the event to register the type, which can be\n            // touch, mouse or pointer. Offset changes need to be\n            // made on an event specific basis.\n            var touch = e.type.indexOf(\"touch\") === 0;\n            var mouse = e.type.indexOf(\"mouse\") === 0;\n            var pointer = e.type.indexOf(\"pointer\") === 0;\n\n            var x;\n            var y;\n\n            // IE10 implemented pointer events with a prefix;\n            if (e.type.indexOf(\"MSPointer\") === 0) {\n                pointer = true;\n            }\n\n            // The only thing one handle should be concerned about is the touches that originated on top of it.\n            if (touch) {\n                // Returns true if a touch originated on the target.\n                var isTouchOnTarget = function(checkTouch) {\n                    return (\n                        checkTouch.target === eventTarget ||\n                        eventTarget.contains(checkTouch.target) ||\n                        (checkTouch.target.shadowRoot && checkTouch.target.shadowRoot.contains(eventTarget))\n                    );\n                };\n\n                // In the case of touchstart events, we need to make sure there is still no more than one\n                // touch on the target so we look amongst all touches.\n                if (e.type === \"touchstart\") {\n                    var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\n\n                    // Do not support more than one touch per handle.\n                    if (targetTouches.length > 1) {\n                        return false;\n                    }\n\n                    x = targetTouches[0].pageX;\n                    y = targetTouches[0].pageY;\n                } else {\n                    // In the other cases, find on changedTouches is enough.\n                    var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\n\n                    // Cancel if the target touch has not moved.\n                    if (!targetTouch) {\n                        return false;\n                    }\n\n                    x = targetTouch.pageX;\n                    y = targetTouch.pageY;\n                }\n            }\n\n            pageOffset = pageOffset || getPageOffset(scope_Document);\n\n            if (mouse || pointer) {\n                x = e.clientX + pageOffset.x;\n                y = e.clientY + pageOffset.y;\n            }\n\n            e.pageOffset = pageOffset;\n            e.points = [x, y];\n            e.cursor = mouse || pointer; // Fix #435\n\n            return e;\n        }\n\n        // Translate a coordinate in the document to a percentage on the slider\n        function calcPointToPercentage(calcPoint) {\n            var location = calcPoint - offset(scope_Base, options.ort);\n            var proposal = (location * 100) / baseSize();\n\n            // Clamp proposal between 0% and 100%\n            // Out-of-bound coordinates may occur when .noUi-base pseudo-elements\n            // are used (e.g. contained handles feature)\n            proposal = limit(proposal);\n\n            return options.dir ? 100 - proposal : proposal;\n        }\n\n        // Find handle closest to a certain percentage on the slider\n        function getClosestHandle(clickedPosition) {\n            var smallestDifference = 100;\n            var handleNumber = false;\n\n            scope_Handles.forEach(function(handle, index) {\n                // Disabled handles are ignored\n                if (isHandleDisabled(index)) {\n                    return;\n                }\n\n                var handlePosition = scope_Locations[index];\n                var differenceWithThisHandle = Math.abs(handlePosition - clickedPosition);\n\n                // Initial state\n                var clickAtEdge = differenceWithThisHandle === 100 && smallestDifference === 100;\n\n                // Difference with this handle is smaller than the previously checked handle\n                var isCloser = differenceWithThisHandle < smallestDifference;\n                var isCloserAfter = differenceWithThisHandle <= smallestDifference && clickedPosition > handlePosition;\n\n                if (isCloser || isCloserAfter || clickAtEdge) {\n                    handleNumber = index;\n                    smallestDifference = differenceWithThisHandle;\n                }\n            });\n\n            return handleNumber;\n        }\n\n        // Fire 'end' when a mouse or pen leaves the document.\n        function documentLeave(event, data) {\n            if (event.type === \"mouseout\" && event.target.nodeName === \"HTML\" && event.relatedTarget === null) {\n                eventEnd(event, data);\n            }\n        }\n\n        // Handle movement on document for handle and range drag.\n        function eventMove(event, data) {\n            // Fix #498\n            // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\n            // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\n            // IE9 has .buttons and .which zero on mousemove.\n            // Firefox breaks the spec MDN defines.\n            if (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\n                return eventEnd(event, data);\n            }\n\n            // Check if we are moving up or down\n            var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\n\n            // Convert the movement into a percentage of the slider width/height\n            var proposal = (movement * 100) / data.baseSize;\n\n            moveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\n        }\n\n        // Unbind move events on document, call callbacks.\n        function eventEnd(event, data) {\n            // The handle is no longer active, so remove the class.\n            if (data.handle) {\n                removeClass(data.handle, options.cssClasses.active);\n                scope_ActiveHandlesCount -= 1;\n            }\n\n            // Unbind the move and end events, which are added on 'start'.\n            data.listeners.forEach(function(c) {\n                scope_DocumentElement.removeEventListener(c[0], c[1]);\n            });\n\n            if (scope_ActiveHandlesCount === 0) {\n                // Remove dragging class.\n                removeClass(scope_Target, options.cssClasses.drag);\n                setZindex();\n\n                // Remove cursor styles and text-selection events bound to the body.\n                if (event.cursor) {\n                    scope_Body.style.cursor = \"\";\n                    scope_Body.removeEventListener(\"selectstart\", preventDefault);\n                }\n            }\n\n            data.handleNumbers.forEach(function(handleNumber) {\n                fireEvent(\"change\", handleNumber);\n                fireEvent(\"set\", handleNumber);\n                fireEvent(\"end\", handleNumber);\n            });\n        }\n\n        // Bind move events on document.\n        function eventStart(event, data) {\n            // Ignore event if any handle is disabled\n            if (data.handleNumbers.some(isHandleDisabled)) {\n                return false;\n            }\n\n            var handle;\n\n            if (data.handleNumbers.length === 1) {\n                var handleOrigin = scope_Handles[data.handleNumbers[0]];\n\n                handle = handleOrigin.children[0];\n                scope_ActiveHandlesCount += 1;\n\n                // Mark the handle as 'active' so it can be styled.\n                addClass(handle, options.cssClasses.active);\n            }\n\n            // A drag should never propagate up to the 'tap' event.\n            event.stopPropagation();\n\n            // Record the event listeners.\n            var listeners = [];\n\n            // Attach the move and end events.\n            var moveEvent = attachEvent(actions.move, scope_DocumentElement, eventMove, {\n                // The event target has changed so we need to propagate the original one so that we keep\n                // relying on it to extract target touches.\n                target: event.target,\n                handle: handle,\n                listeners: listeners,\n                startCalcPoint: event.calcPoint,\n                baseSize: baseSize(),\n                pageOffset: event.pageOffset,\n                handleNumbers: data.handleNumbers,\n                buttonsProperty: event.buttons,\n                locations: scope_Locations.slice()\n            });\n\n            var endEvent = attachEvent(actions.end, scope_DocumentElement, eventEnd, {\n                target: event.target,\n                handle: handle,\n                listeners: listeners,\n                doNotReject: true,\n                handleNumbers: data.handleNumbers\n            });\n\n            var outEvent = attachEvent(\"mouseout\", scope_DocumentElement, documentLeave, {\n                target: event.target,\n                handle: handle,\n                listeners: listeners,\n                doNotReject: true,\n                handleNumbers: data.handleNumbers\n            });\n\n            // We want to make sure we pushed the listeners in the listener list rather than creating\n            // a new one as it has already been passed to the event handlers.\n            listeners.push.apply(listeners, moveEvent.concat(endEvent, outEvent));\n\n            // Text selection isn't an issue on touch devices,\n            // so adding cursor styles can be skipped.\n            if (event.cursor) {\n                // Prevent the 'I' cursor and extend the range-drag cursor.\n                scope_Body.style.cursor = getComputedStyle(event.target).cursor;\n\n                // Mark the target with a dragging state.\n                if (scope_Handles.length > 1) {\n                    addClass(scope_Target, options.cssClasses.drag);\n                }\n\n                // Prevent text selection when dragging the handles.\n                // In noUiSlider <= 9.2.0, this was handled by calling preventDefault on mouse/touch start/move,\n                // which is scroll blocking. The selectstart event is supported by FireFox starting from version 52,\n                // meaning the only holdout is iOS Safari. This doesn't matter: text selection isn't triggered there.\n                // The 'cursor' flag is false.\n                // See: http://caniuse.com/#search=selectstart\n                scope_Body.addEventListener(\"selectstart\", preventDefault, false);\n            }\n\n            data.handleNumbers.forEach(function(handleNumber) {\n                fireEvent(\"start\", handleNumber);\n            });\n        }\n\n        // Move closest handle to tapped location.\n        function eventTap(event) {\n            // Erroneous events seem to be passed in occasionally on iOS/iPadOS after user finishes interacting with\n            // the slider. They appear to be of type MouseEvent, yet they don't have usual properties set. Ignore tap\n            // events that have no touches or buttons associated with them.\n            if (!event.buttons && !event.touches) {\n                return false;\n            }\n\n            // The tap event shouldn't propagate up\n            event.stopPropagation();\n\n            var proposal = calcPointToPercentage(event.calcPoint);\n            var handleNumber = getClosestHandle(proposal);\n\n            // Tackle the case that all handles are 'disabled'.\n            if (handleNumber === false) {\n                return false;\n            }\n\n            // Flag the slider as it is now in a transitional state.\n            // Transition takes a configurable amount of ms (default 300). Re-enable the slider after that.\n            if (!options.events.snap) {\n                addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);\n            }\n\n            setHandle(handleNumber, proposal, true, true);\n\n            setZindex();\n\n            fireEvent(\"slide\", handleNumber, true);\n            fireEvent(\"update\", handleNumber, true);\n            fireEvent(\"change\", handleNumber, true);\n            fireEvent(\"set\", handleNumber, true);\n\n            if (options.events.snap) {\n                eventStart(event, { handleNumbers: [handleNumber] });\n            }\n        }\n\n        // Fires a 'hover' event for a hovered mouse/pen position.\n        function eventHover(event) {\n            var proposal = calcPointToPercentage(event.calcPoint);\n\n            var to = scope_Spectrum.getStep(proposal);\n            var value = scope_Spectrum.fromStepping(to);\n\n            Object.keys(scope_Events).forEach(function(targetEvent) {\n                if (\"hover\" === targetEvent.split(\".\")[0]) {\n                    scope_Events[targetEvent].forEach(function(callback) {\n                        callback.call(scope_Self, value);\n                    });\n                }\n            });\n        }\n\n        // Handles keydown on focused handles\n        // Don't move the document when pressing arrow keys on focused handles\n        function eventKeydown(event, handleNumber) {\n            if (isSliderDisabled() || isHandleDisabled(handleNumber)) {\n                return false;\n            }\n\n            var horizontalKeys = [\"Left\", \"Right\"];\n            var verticalKeys = [\"Down\", \"Up\"];\n            var largeStepKeys = [\"PageDown\", \"PageUp\"];\n            var edgeKeys = [\"Home\", \"End\"];\n\n            if (options.dir && !options.ort) {\n                // On an right-to-left slider, the left and right keys act inverted\n                horizontalKeys.reverse();\n            } else if (options.ort && !options.dir) {\n                // On a top-to-bottom slider, the up and down keys act inverted\n                verticalKeys.reverse();\n                largeStepKeys.reverse();\n            }\n\n            // Strip \"Arrow\" for IE compatibility. https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key\n            var key = event.key.replace(\"Arrow\", \"\");\n\n            var isLargeDown = key === largeStepKeys[0];\n            var isLargeUp = key === largeStepKeys[1];\n            var isDown = key === verticalKeys[0] || key === horizontalKeys[0] || isLargeDown;\n            var isUp = key === verticalKeys[1] || key === horizontalKeys[1] || isLargeUp;\n            var isMin = key === edgeKeys[0];\n            var isMax = key === edgeKeys[1];\n\n            if (!isDown && !isUp && !isMin && !isMax) {\n                return true;\n            }\n\n            event.preventDefault();\n\n            var to;\n\n            if (isUp || isDown) {\n                var multiplier = options.keyboardPageMultiplier;\n                var direction = isDown ? 0 : 1;\n                var steps = getNextStepsForHandle(handleNumber);\n                var step = steps[direction];\n\n                // At the edge of a slider, do nothing\n                if (step === null) {\n                    return false;\n                }\n\n                // No step set, use the default of 10% of the sub-range\n                if (step === false) {\n                    step = scope_Spectrum.getDefaultStep(\n                        scope_Locations[handleNumber],\n                        isDown,\n                        options.keyboardDefaultStep\n                    );\n                }\n\n                if (isLargeUp || isLargeDown) {\n                    step *= multiplier;\n                }\n\n                // Step over zero-length ranges (#948);\n                step = Math.max(step, 0.0000001);\n\n                // Decrement for down steps\n                step = (isDown ? -1 : 1) * step;\n\n                to = scope_Values[handleNumber] + step;\n            } else if (isMax) {\n                // End key\n                to = options.spectrum.xVal[options.spectrum.xVal.length - 1];\n            } else {\n                // Home key\n                to = options.spectrum.xVal[0];\n            }\n\n            setHandle(handleNumber, scope_Spectrum.toStepping(to), true, true);\n\n            fireEvent(\"slide\", handleNumber);\n            fireEvent(\"update\", handleNumber);\n            fireEvent(\"change\", handleNumber);\n            fireEvent(\"set\", handleNumber);\n\n            return false;\n        }\n\n        // Attach events to several slider parts.\n        function bindSliderEvents(behaviour) {\n            // Attach the standard drag event to the handles.\n            if (!behaviour.fixed) {\n                scope_Handles.forEach(function(handle, index) {\n                    // These events are only bound to the visual handle\n                    // element, not the 'real' origin element.\n                    attachEvent(actions.start, handle.children[0], eventStart, {\n                        handleNumbers: [index]\n                    });\n                });\n            }\n\n            // Attach the tap event to the slider base.\n            if (behaviour.tap) {\n                attachEvent(actions.start, scope_Base, eventTap, {});\n            }\n\n            // Fire hover events\n            if (behaviour.hover) {\n                attachEvent(actions.move, scope_Base, eventHover, {\n                    hover: true\n                });\n            }\n\n            // Make the range draggable.\n            if (behaviour.drag) {\n                scope_Connects.forEach(function(connect, index) {\n                    if (connect === false || index === 0 || index === scope_Connects.length - 1) {\n                        return;\n                    }\n\n                    var handleBefore = scope_Handles[index - 1];\n                    var handleAfter = scope_Handles[index];\n                    var eventHolders = [connect];\n\n                    addClass(connect, options.cssClasses.draggable);\n\n                    // When the range is fixed, the entire range can\n                    // be dragged by the handles. The handle in the first\n                    // origin will propagate the start event upward,\n                    // but it needs to be bound manually on the other.\n                    if (behaviour.fixed) {\n                        eventHolders.push(handleBefore.children[0]);\n                        eventHolders.push(handleAfter.children[0]);\n                    }\n\n                    eventHolders.forEach(function(eventHolder) {\n                        attachEvent(actions.start, eventHolder, eventStart, {\n                            handles: [handleBefore, handleAfter],\n                            handleNumbers: [index - 1, index]\n                        });\n                    });\n                });\n            }\n        }\n\n        // Attach an event to this slider, possibly including a namespace\n        function bindEvent(namespacedEvent, callback) {\n            scope_Events[namespacedEvent] = scope_Events[namespacedEvent] || [];\n            scope_Events[namespacedEvent].push(callback);\n\n            // If the event bound is 'update,' fire it immediately for all handles.\n            if (namespacedEvent.split(\".\")[0] === \"update\") {\n                scope_Handles.forEach(function(a, index) {\n                    fireEvent(\"update\", index);\n                });\n            }\n        }\n\n        // Undo attachment of event\n        function removeEvent(namespacedEvent) {\n            var event = namespacedEvent && namespacedEvent.split(\".\")[0];\n            var namespace = event && namespacedEvent.substring(event.length);\n\n            Object.keys(scope_Events).forEach(function(bind) {\n                var tEvent = bind.split(\".\")[0];\n                var tNamespace = bind.substring(tEvent.length);\n\n                if ((!event || event === tEvent) && (!namespace || namespace === tNamespace)) {\n                    delete scope_Events[bind];\n                }\n            });\n        }\n\n        // External event handling\n        function fireEvent(eventName, handleNumber, tap) {\n            Object.keys(scope_Events).forEach(function(targetEvent) {\n                var eventType = targetEvent.split(\".\")[0];\n\n                if (eventName === eventType) {\n                    scope_Events[targetEvent].forEach(function(callback) {\n                        callback.call(\n                            // Use the slider public API as the scope ('this')\n                            scope_Self,\n                            // Return values as array, so arg_1[arg_2] is always valid.\n                            scope_Values.map(options.format.to),\n                            // Handle index, 0 or 1\n                            handleNumber,\n                            // Un-formatted slider values\n                            scope_Values.slice(),\n                            // Event is fired by tap, true or false\n                            tap || false,\n                            // Left offset of the handle, in relation to the slider\n                            scope_Locations.slice(),\n                            // add the slider public API to an accessible parameter when this is unavailable\n                            scope_Self\n                        );\n                    });\n                }\n            });\n        }\n\n        // Split out the handle positioning logic so the Move event can use it, too\n        function checkHandlePosition(reference, handleNumber, to, lookBackward, lookForward, getValue) {\n            var distance;\n\n            // For sliders with multiple handles, limit movement to the other handle.\n            // Apply the margin option by adding it to the handle positions.\n            if (scope_Handles.length > 1 && !options.events.unconstrained) {\n                if (lookBackward && handleNumber > 0) {\n                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.margin, 0);\n                    to = Math.max(to, distance);\n                }\n\n                if (lookForward && handleNumber < scope_Handles.length - 1) {\n                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.margin, 1);\n                    to = Math.min(to, distance);\n                }\n            }\n\n            // The limit option has the opposite effect, limiting handles to a\n            // maximum distance from another. Limit must be > 0, as otherwise\n            // handles would be unmovable.\n            if (scope_Handles.length > 1 && options.limit) {\n                if (lookBackward && handleNumber > 0) {\n                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber - 1], options.limit, 0);\n                    to = Math.min(to, distance);\n                }\n\n                if (lookForward && handleNumber < scope_Handles.length - 1) {\n                    distance = scope_Spectrum.getAbsoluteDistance(reference[handleNumber + 1], options.limit, 1);\n                    to = Math.max(to, distance);\n                }\n            }\n\n            // The padding option keeps the handles a certain distance from the\n            // edges of the slider. Padding must be > 0.\n            if (options.padding) {\n                if (handleNumber === 0) {\n                    distance = scope_Spectrum.getAbsoluteDistance(0, options.padding[0], 0);\n                    to = Math.max(to, distance);\n                }\n\n                if (handleNumber === scope_Handles.length - 1) {\n                    distance = scope_Spectrum.getAbsoluteDistance(100, options.padding[1], 1);\n                    to = Math.min(to, distance);\n                }\n            }\n\n            to = scope_Spectrum.getStep(to);\n\n            // Limit percentage to the 0 - 100 range\n            to = limit(to);\n\n            // Return false if handle can't move\n            if (to === reference[handleNumber] && !getValue) {\n                return false;\n            }\n\n            return to;\n        }\n\n        // Uses slider orientation to create CSS rules. a = base value;\n        function inRuleOrder(v, a) {\n            var o = options.ort;\n            return (o ? a : v) + \", \" + (o ? v : a);\n        }\n\n        // Moves handle(s) by a percentage\n        // (bool, % to move, [% where handle started, ...], [index in scope_Handles, ...])\n        function moveHandles(upward, proposal, locations, handleNumbers) {\n            var proposals = locations.slice();\n\n            var b = [!upward, upward];\n            var f = [upward, !upward];\n\n            // Copy handleNumbers so we don't change the dataset\n            handleNumbers = handleNumbers.slice();\n\n            // Check to see which handle is 'leading'.\n            // If that one can't move the second can't either.\n            if (upward) {\n                handleNumbers.reverse();\n            }\n\n            // Step 1: get the maximum percentage that any of the handles can move\n            if (handleNumbers.length > 1) {\n                handleNumbers.forEach(function(handleNumber, o) {\n                    var to = checkHandlePosition(\n                        proposals,\n                        handleNumber,\n                        proposals[handleNumber] + proposal,\n                        b[o],\n                        f[o],\n                        false\n                    );\n\n                    // Stop if one of the handles can't move.\n                    if (to === false) {\n                        proposal = 0;\n                    } else {\n                        proposal = to - proposals[handleNumber];\n                        proposals[handleNumber] = to;\n                    }\n                });\n            }\n\n            // If using one handle, check backward AND forward\n            else {\n                b = f = [true];\n            }\n\n            var state = false;\n\n            // Step 2: Try to set the handles with the found percentage\n            handleNumbers.forEach(function(handleNumber, o) {\n                state = setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o]) || state;\n            });\n\n            // Step 3: If a handle moved, fire events\n            if (state) {\n                handleNumbers.forEach(function(handleNumber) {\n                    fireEvent(\"update\", handleNumber);\n                    fireEvent(\"slide\", handleNumber);\n                });\n            }\n        }\n\n        // Takes a base value and an offset. This offset is used for the connect bar size.\n        // In the initial design for this feature, the origin element was 1% wide.\n        // Unfortunately, a rounding bug in Chrome makes it impossible to implement this feature\n        // in this manner: https://bugs.chromium.org/p/chromium/issues/detail?id=798223\n        function transformDirection(a, b) {\n            return options.dir ? 100 - a - b : a;\n        }\n\n        // Updates scope_Locations and scope_Values, updates visual state\n        function updateHandlePosition(handleNumber, to) {\n            // Update locations.\n            scope_Locations[handleNumber] = to;\n\n            // Convert the value to the slider stepping/range.\n            scope_Values[handleNumber] = scope_Spectrum.fromStepping(to);\n\n            var translation = 10 * (transformDirection(to, 0) - scope_DirOffset);\n            var translateRule = \"translate(\" + inRuleOrder(translation + \"%\", \"0\") + \")\";\n\n            scope_Handles[handleNumber].style[options.transformRule] = translateRule;\n\n            updateConnect(handleNumber);\n            updateConnect(handleNumber + 1);\n        }\n\n        // Handles before the slider middle are stacked later = higher,\n        // Handles after the middle later is lower\n        // [[7] [8] .......... | .......... [5] [4]\n        function setZindex() {\n            scope_HandleNumbers.forEach(function(handleNumber) {\n                var dir = scope_Locations[handleNumber] > 50 ? -1 : 1;\n                var zIndex = 3 + (scope_Handles.length + dir * handleNumber);\n                scope_Handles[handleNumber].style.zIndex = zIndex;\n            });\n        }\n\n        // Test suggested values and apply margin, step.\n        function setHandle(handleNumber, to, lookBackward, lookForward) {\n            to = checkHandlePosition(scope_Locations, handleNumber, to, lookBackward, lookForward, false);\n\n            if (to === false) {\n                return false;\n            }\n\n            updateHandlePosition(handleNumber, to);\n\n            return true;\n        }\n\n        // Updates style attribute for connect nodes\n        function updateConnect(index) {\n            // Skip connects set to false\n            if (!scope_Connects[index]) {\n                return;\n            }\n\n            var l = 0;\n            var h = 100;\n\n            if (index !== 0) {\n                l = scope_Locations[index - 1];\n            }\n\n            if (index !== scope_Connects.length - 1) {\n                h = scope_Locations[index];\n            }\n\n            // We use two rules:\n            // 'translate' to change the left/top offset;\n            // 'scale' to change the width of the element;\n            // As the element has a width of 100%, a translation of 100% is equal to 100% of the parent (.noUi-base)\n            var connectWidth = h - l;\n            var translateRule = \"translate(\" + inRuleOrder(transformDirection(l, connectWidth) + \"%\", \"0\") + \")\";\n            var scaleRule = \"scale(\" + inRuleOrder(connectWidth / 100, \"1\") + \")\";\n\n            scope_Connects[index].style[options.transformRule] = translateRule + \" \" + scaleRule;\n        }\n\n        // Parses value passed to .set method. Returns current value if not parse-able.\n        function resolveToValue(to, handleNumber) {\n            // Setting with null indicates an 'ignore'.\n            // Inputting 'false' is invalid.\n            if (to === null || to === false || to === undefined) {\n                return scope_Locations[handleNumber];\n            }\n\n            // If a formatted number was passed, attempt to decode it.\n            if (typeof to === \"number\") {\n                to = String(to);\n            }\n\n            to = options.format.from(to);\n            to = scope_Spectrum.toStepping(to);\n\n            // If parsing the number failed, use the current value.\n            if (to === false || isNaN(to)) {\n                return scope_Locations[handleNumber];\n            }\n\n            return to;\n        }\n\n        // Set the slider value.\n        function valueSet(input, fireSetEvent) {\n            var values = asArray(input);\n            var isInit = scope_Locations[0] === undefined;\n\n            // Event fires by default\n            fireSetEvent = fireSetEvent === undefined ? true : !!fireSetEvent;\n\n            // Animation is optional.\n            // Make sure the initial values were set before using animated placement.\n            if (options.animate && !isInit) {\n                addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);\n            }\n\n            // First pass, without lookAhead but with lookBackward. Values are set from left to right.\n            scope_HandleNumbers.forEach(function(handleNumber) {\n                setHandle(handleNumber, resolveToValue(values[handleNumber], handleNumber), true, false);\n            });\n\n            var i = scope_HandleNumbers.length === 1 ? 0 : 1;\n\n            // Secondary passes. Now that all base values are set, apply constraints.\n            // Iterate all handles to ensure constraints are applied for the entire slider (Issue #1009)\n            for (; i < scope_HandleNumbers.length; ++i) {\n                scope_HandleNumbers.forEach(function(handleNumber) {\n                    setHandle(handleNumber, scope_Locations[handleNumber], true, true);\n                });\n            }\n\n            setZindex();\n\n            scope_HandleNumbers.forEach(function(handleNumber) {\n                fireEvent(\"update\", handleNumber);\n\n                // Fire the event only for handles that received a new value, as per #579\n                if (values[handleNumber] !== null && fireSetEvent) {\n                    fireEvent(\"set\", handleNumber);\n                }\n            });\n        }\n\n        // Reset slider to initial values\n        function valueReset(fireSetEvent) {\n            valueSet(options.start, fireSetEvent);\n        }\n\n        // Set value for a single handle\n        function valueSetHandle(handleNumber, value, fireSetEvent) {\n            // Ensure numeric input\n            handleNumber = Number(handleNumber);\n\n            if (!(handleNumber >= 0 && handleNumber < scope_HandleNumbers.length)) {\n                throw new Error(\"noUiSlider (\" + VERSION + \"): invalid handle number, got: \" + handleNumber);\n            }\n\n            // Look both backward and forward, since we don't want this handle to \"push\" other handles (#960);\n            setHandle(handleNumber, resolveToValue(value, handleNumber), true, true);\n\n            fireEvent(\"update\", handleNumber);\n\n            if (fireSetEvent) {\n                fireEvent(\"set\", handleNumber);\n            }\n        }\n\n        // Get the slider value.\n        function valueGet() {\n            var values = scope_Values.map(options.format.to);\n\n            // If only one handle is used, return a single value.\n            if (values.length === 1) {\n                return values[0];\n            }\n\n            return values;\n        }\n\n        // Removes classes from the root and empties it.\n        function destroy() {\n            for (var key in options.cssClasses) {\n                if (!options.cssClasses.hasOwnProperty(key)) {\n                    continue;\n                }\n                removeClass(scope_Target, options.cssClasses[key]);\n            }\n\n            while (scope_Target.firstChild) {\n                scope_Target.removeChild(scope_Target.firstChild);\n            }\n\n            delete scope_Target.noUiSlider;\n        }\n\n        function getNextStepsForHandle(handleNumber) {\n            var location = scope_Locations[handleNumber];\n            var nearbySteps = scope_Spectrum.getNearbySteps(location);\n            var value = scope_Values[handleNumber];\n            var increment = nearbySteps.thisStep.step;\n            var decrement = null;\n\n            // If snapped, directly use defined step value\n            if (options.snap) {\n                return [\n                    value - nearbySteps.stepBefore.startValue || null,\n                    nearbySteps.stepAfter.startValue - value || null\n                ];\n            }\n\n            // If the next value in this step moves into the next step,\n            // the increment is the start of the next step - the current value\n            if (increment !== false) {\n                if (value + increment > nearbySteps.stepAfter.startValue) {\n                    increment = nearbySteps.stepAfter.startValue - value;\n                }\n            }\n\n            // If the value is beyond the starting point\n            if (value > nearbySteps.thisStep.startValue) {\n                decrement = nearbySteps.thisStep.step;\n            } else if (nearbySteps.stepBefore.step === false) {\n                decrement = false;\n            }\n\n            // If a handle is at the start of a step, it always steps back into the previous step first\n            else {\n                decrement = value - nearbySteps.stepBefore.highestStep;\n            }\n\n            // Now, if at the slider edges, there is no in/decrement\n            if (location === 100) {\n                increment = null;\n            } else if (location === 0) {\n                decrement = null;\n            }\n\n            // As per #391, the comparison for the decrement step can have some rounding issues.\n            var stepDecimals = scope_Spectrum.countStepDecimals();\n\n            // Round per #391\n            if (increment !== null && increment !== false) {\n                increment = Number(increment.toFixed(stepDecimals));\n            }\n\n            if (decrement !== null && decrement !== false) {\n                decrement = Number(decrement.toFixed(stepDecimals));\n            }\n\n            return [decrement, increment];\n        }\n\n        // Get the current step size for the slider.\n        function getNextSteps() {\n            return scope_HandleNumbers.map(getNextStepsForHandle);\n        }\n\n        // Updateable: margin, limit, padding, step, range, animate, snap\n        function updateOptions(optionsToUpdate, fireSetEvent) {\n            // Spectrum is created using the range, snap, direction and step options.\n            // 'snap' and 'step' can be updated.\n            // If 'snap' and 'step' are not passed, they should remain unchanged.\n            var v = valueGet();\n\n            var updateAble = [\n                \"margin\",\n                \"limit\",\n                \"padding\",\n                \"range\",\n                \"animate\",\n                \"snap\",\n                \"step\",\n                \"format\",\n                \"pips\",\n                \"tooltips\"\n            ];\n\n            // Only change options that we're actually passed to update.\n            updateAble.forEach(function(name) {\n                // Check for undefined. null removes the value.\n                if (optionsToUpdate[name] !== undefined) {\n                    originalOptions[name] = optionsToUpdate[name];\n                }\n            });\n\n            var newOptions = testOptions(originalOptions);\n\n            // Load new options into the slider state\n            updateAble.forEach(function(name) {\n                if (optionsToUpdate[name] !== undefined) {\n                    options[name] = newOptions[name];\n                }\n            });\n\n            scope_Spectrum = newOptions.spectrum;\n\n            // Limit, margin and padding depend on the spectrum but are stored outside of it. (#677)\n            options.margin = newOptions.margin;\n            options.limit = newOptions.limit;\n            options.padding = newOptions.padding;\n\n            // Update pips, removes existing.\n            if (options.pips) {\n                pips(options.pips);\n            } else {\n                removePips();\n            }\n\n            // Update tooltips, removes existing.\n            if (options.tooltips) {\n                tooltips();\n            } else {\n                removeTooltips();\n            }\n\n            // Invalidate the current positioning so valueSet forces an update.\n            scope_Locations = [];\n            valueSet(optionsToUpdate.start || v, fireSetEvent);\n        }\n\n        // Initialization steps\n        function setupSlider() {\n            // Create the base element, initialize HTML and set classes.\n            // Add handles and connect elements.\n            scope_Base = addSlider(scope_Target);\n\n            addElements(options.connect, scope_Base);\n\n            // Attach user events.\n            bindSliderEvents(options.events);\n\n            // Use the public value method to set the start values.\n            valueSet(options.start);\n\n            if (options.pips) {\n                pips(options.pips);\n            }\n\n            if (options.tooltips) {\n                tooltips();\n            }\n\n            aria();\n        }\n\n        setupSlider();\n\n        // noinspection JSUnusedGlobalSymbols\n        scope_Self = {\n            destroy: destroy,\n            steps: getNextSteps,\n            on: bindEvent,\n            off: removeEvent,\n            get: valueGet,\n            set: valueSet,\n            setHandle: valueSetHandle,\n            reset: valueReset,\n            // Exposed for unit testing, don't use this in your application.\n            __moveHandles: function(a, b, c) {\n                moveHandles(a, b, scope_Locations, c);\n            },\n            options: originalOptions, // Issue #600, #678\n            updateOptions: updateOptions,\n            target: scope_Target, // Issue #597\n            removePips: removePips,\n            removeTooltips: removeTooltips,\n            getTooltips: function() {\n                return scope_Tooltips;\n            },\n            getOrigins: function() {\n                return scope_Handles;\n            },\n            pips: pips // Issue #594\n        };\n\n        return scope_Self;\n    }\n\n    // Run the standard initializer\n    function initialize(target, originalOptions) {\n        if (!target || !target.nodeName) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): create requires a single element, got: \" + target);\n        }\n\n        // Throw an error if the slider was already initialized.\n        if (target.noUiSlider) {\n            throw new Error(\"noUiSlider (\" + VERSION + \"): Slider was already initialized.\");\n        }\n\n        // Test the options and create the slider environment;\n        var options = testOptions(originalOptions, target);\n        var api = scope(target, options, originalOptions);\n\n        target.noUiSlider = api;\n\n        return api;\n    }\n\n    // Use an object instead of a function for future expandability;\n    return {\n        // Exposed for unit testing, don't use this in your application.\n        __spectrum: Spectrum,\n        version: VERSION,\n        // A reference to the default classes, allows global changes.\n        // Use the cssClasses option for changes to one slider.\n        cssClasses: cssClasses,\n        create: initialize\n    };\n});\n","(function(a,b){if(\"function\"==typeof define&&define.amd)define([],b);else if(\"undefined\"!=typeof exports)b();else{b(),a.FileSaver={exports:{}}.exports}})(this,function(){\"use strict\";function b(a,b){return\"undefined\"==typeof b?b={autoBom:!1}:\"object\"!=typeof b&&(console.warn(\"Deprecated: Expected third argument to be a object\"),b={autoBom:!b}),b.autoBom&&/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(a.type)?new Blob([\"\\uFEFF\",a],{type:a.type}):a}function c(b,c,d){var e=new XMLHttpRequest;e.open(\"GET\",b),e.responseType=\"blob\",e.onload=function(){a(e.response,c,d)},e.onerror=function(){console.error(\"could not download file\")},e.send()}function d(a){var b=new XMLHttpRequest;b.open(\"HEAD\",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent(\"click\"))}catch(c){var b=document.createEvent(\"MouseEvents\");b.initMouseEvent(\"click\",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f=\"object\"==typeof window&&window.window===window?window:\"object\"==typeof self&&self.self===self?self:\"object\"==typeof global&&global.global===global?global:void 0,a=f.saveAs||(\"object\"!=typeof window||window!==f?function(){}:\"download\"in HTMLAnchorElement.prototype?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement(\"a\");g=g||b.name||\"download\",j.download=g,j.rel=\"noopener\",\"string\"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target=\"_blank\")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:\"msSaveOrOpenBlob\"in navigator?function(f,g,h){if(g=g||f.name||\"download\",\"string\"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement(\"a\");i.href=f,i.target=\"_blank\",setTimeout(function(){e(i)})}}:function(a,b,d,e){if(e=e||open(\"\",\"_blank\"),e&&(e.document.title=e.document.body.innerText=\"downloading...\"),\"string\"==typeof a)return c(a,b,d);var g=\"application/octet-stream\"===a.type,h=/constructor/i.test(f.HTMLElement)||f.safari,i=/CriOS\\/[\\d]+/.test(navigator.userAgent);if((i||g&&h)&&\"object\"==typeof FileReader){var j=new FileReader;j.onloadend=function(){var a=j.result;a=i?a:a.replace(/^data:[^;]*;/,\"data:attachment/file;\"),e?e.location.href=a:location=a,e=null},j.readAsDataURL(a)}else{var k=f.URL||f.webkitURL,l=k.createObjectURL(a);e?e.location=l:location.href=l,e=null,setTimeout(function(){k.revokeObjectURL(l)},4E4)}});f.saveAs=a.saveAs=a,\"undefined\"!=typeof module&&(module.exports=a)});\n\n//# sourceMappingURL=FileSaver.min.js.map","/**\r\n * jscolor - JavaScript Color Picker\r\n *\r\n * @link    http://jscolor.com\r\n * @license For open source use: GPLv3\r\n *          For commercial use: JSColor Commercial License\r\n * @author  Jan Odvarko\r\n * @version 2.0.4\r\n *\r\n * See usage examples at http://jscolor.com/examples/\r\n */\r\n\r\n\r\n\"use strict\";\r\n\r\n\r\nif (!window.jscolor) { window.jscolor = (function () {\r\n\r\n\r\nvar jsc = {\r\n\r\n\r\n\tregister : function () {\r\n\t\tjsc.attachDOMReadyEvent(jsc.init);\r\n\t\tjsc.attachEvent(document, 'mousedown', jsc.onDocumentMouseDown);\r\n\t\tjsc.attachEvent(document, 'touchstart', jsc.onDocumentTouchStart);\r\n\t\tjsc.attachEvent(window, 'resize', jsc.onWindowResize);\r\n\t},\r\n\r\n\r\n\tinit : function () {\r\n\t\tif (jsc.jscolor.lookupClass) {\r\n\t\t\tjsc.jscolor.installByClassName(jsc.jscolor.lookupClass);\r\n\t\t}\r\n\t},\r\n\r\n\r\n\ttryInstallOnElements : function (elms, className) {\r\n\t\tvar matchClass = new RegExp('(^|\\\\s)(' + className + ')(\\\\s*(\\\\{[^}]*\\\\})|\\\\s|$)', 'i');\r\n\r\n\t\tfor (var i = 0; i < elms.length; i += 1) {\r\n\t\t\tif (elms[i].type !== undefined && elms[i].type.toLowerCase() == 'color') {\r\n\t\t\t\tif (jsc.isColorAttrSupported) {\r\n\t\t\t\t\t// skip inputs of type 'color' if supported by the browser\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar m;\r\n\t\t\tif (!elms[i].jscolor && elms[i].className && (m = elms[i].className.match(matchClass))) {\r\n\t\t\t\tvar targetElm = elms[i];\r\n\t\t\t\tvar optsStr = null;\r\n\r\n\t\t\t\tvar dataOptions = jsc.getDataAttr(targetElm, 'jscolor');\r\n\t\t\t\tif (dataOptions !== null) {\r\n\t\t\t\t\toptsStr = dataOptions;\r\n\t\t\t\t} else if (m[4]) {\r\n\t\t\t\t\toptsStr = m[4];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar opts = {};\r\n\t\t\t\tif (optsStr) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\topts = (new Function ('return (' + optsStr + ')'))();\r\n\t\t\t\t\t} catch(eParseError) {\r\n\t\t\t\t\t\tjsc.warn('Error parsing jscolor options: ' + eParseError + ':\\n' + optsStr);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttargetElm.jscolor = new jsc.jscolor(targetElm, opts);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tisColorAttrSupported : (function () {\r\n\t\tvar elm = document.createElement('input');\r\n\t\tif (elm.setAttribute) {\r\n\t\t\telm.setAttribute('type', 'color');\r\n\t\t\tif (elm.type.toLowerCase() == 'color') {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t})(),\r\n\r\n\r\n\tisCanvasSupported : (function () {\r\n\t\tvar elm = document.createElement('canvas');\r\n\t\treturn !!(elm.getContext && elm.getContext('2d'));\r\n\t})(),\r\n\r\n\r\n\tfetchElement : function (mixed) {\r\n\t\treturn typeof mixed === 'string' ? document.getElementById(mixed) : mixed;\r\n\t},\r\n\r\n\r\n\tisElementType : function (elm, type) {\r\n\t\treturn elm.nodeName.toLowerCase() === type.toLowerCase();\r\n\t},\r\n\r\n\r\n\tgetDataAttr : function (el, name) {\r\n\t\tvar attrName = 'data-' + name;\r\n\t\tvar attrValue = el.getAttribute(attrName);\r\n\t\tif (attrValue !== null) {\r\n\t\t\treturn attrValue;\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\r\n\tattachEvent : function (el, evnt, func) {\r\n\t\tif (el.addEventListener) {\r\n\t\t\tel.addEventListener(evnt, func, false);\r\n\t\t} else if (el.attachEvent) {\r\n\t\t\tel.attachEvent('on' + evnt, func);\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tdetachEvent : function (el, evnt, func) {\r\n\t\tif (el.removeEventListener) {\r\n\t\t\tel.removeEventListener(evnt, func, false);\r\n\t\t} else if (el.detachEvent) {\r\n\t\t\tel.detachEvent('on' + evnt, func);\r\n\t\t}\r\n\t},\r\n\r\n\r\n\t_attachedGroupEvents : {},\r\n\r\n\r\n\tattachGroupEvent : function (groupName, el, evnt, func) {\r\n\t\tif (!jsc._attachedGroupEvents.hasOwnProperty(groupName)) {\r\n\t\t\tjsc._attachedGroupEvents[groupName] = [];\r\n\t\t}\r\n\t\tjsc._attachedGroupEvents[groupName].push([el, evnt, func]);\r\n\t\tjsc.attachEvent(el, evnt, func);\r\n\t},\r\n\r\n\r\n\tdetachGroupEvents : function (groupName) {\r\n\t\tif (jsc._attachedGroupEvents.hasOwnProperty(groupName)) {\r\n\t\t\tfor (var i = 0; i < jsc._attachedGroupEvents[groupName].length; i += 1) {\r\n\t\t\t\tvar evt = jsc._attachedGroupEvents[groupName][i];\r\n\t\t\t\tjsc.detachEvent(evt[0], evt[1], evt[2]);\r\n\t\t\t}\r\n\t\t\tdelete jsc._attachedGroupEvents[groupName];\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tattachDOMReadyEvent : function (func) {\r\n\t\tvar fired = false;\r\n\t\tvar fireOnce = function () {\r\n\t\t\tif (!fired) {\r\n\t\t\t\tfired = true;\r\n\t\t\t\tfunc();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tif (document.readyState === 'complete') {\r\n\t\t\tsetTimeout(fireOnce, 1); // async\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (document.addEventListener) {\r\n\t\t\tdocument.addEventListener('DOMContentLoaded', fireOnce, false);\r\n\r\n\t\t\t// Fallback\r\n\t\t\twindow.addEventListener('load', fireOnce, false);\r\n\r\n\t\t} else if (document.attachEvent) {\r\n\t\t\t// IE\r\n\t\t\tdocument.attachEvent('onreadystatechange', function () {\r\n\t\t\t\tif (document.readyState === 'complete') {\r\n\t\t\t\t\tdocument.detachEvent('onreadystatechange', arguments.callee);\r\n\t\t\t\t\tfireOnce();\r\n\t\t\t\t}\r\n\t\t\t})\r\n\r\n\t\t\t// Fallback\r\n\t\t\twindow.attachEvent('onload', fireOnce);\r\n\r\n\t\t\t// IE7/8\r\n\t\t\tif (document.documentElement.doScroll && window == window.top) {\r\n\t\t\t\tvar tryScroll = function () {\r\n\t\t\t\t\tif (!document.body) { return; }\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tdocument.documentElement.doScroll('left');\r\n\t\t\t\t\t\tfireOnce();\r\n\t\t\t\t\t} catch (e) {\r\n\t\t\t\t\t\tsetTimeout(tryScroll, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\ttryScroll();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\r\n\twarn : function (msg) {\r\n\t\tif (window.console && window.console.warn) {\r\n\t\t\twindow.console.warn(msg);\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tpreventDefault : function (e) {\r\n\t\tif (e.preventDefault) { e.preventDefault(); }\r\n\t\te.returnValue = false;\r\n\t},\r\n\r\n\r\n\tcaptureTarget : function (target) {\r\n\t\t// IE\r\n\t\tif (target.setCapture) {\r\n\t\t\tjsc._capturedTarget = target;\r\n\t\t\tjsc._capturedTarget.setCapture();\r\n\t\t}\r\n\t},\r\n\r\n\r\n\treleaseTarget : function () {\r\n\t\t// IE\r\n\t\tif (jsc._capturedTarget) {\r\n\t\t\tjsc._capturedTarget.releaseCapture();\r\n\t\t\tjsc._capturedTarget = null;\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tfireEvent : function (el, evnt) {\r\n\t\tif (!el) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (document.createEvent) {\r\n\t\t\tvar ev = document.createEvent('HTMLEvents');\r\n\t\t\tev.initEvent(evnt, true, true);\r\n\t\t\tel.dispatchEvent(ev);\r\n\t\t} else if (document.createEventObject) {\r\n\t\t\tvar ev = document.createEventObject();\r\n\t\t\tel.fireEvent('on' + evnt, ev);\r\n\t\t} else if (el['on' + evnt]) { // alternatively use the traditional event model\r\n\t\t\tel['on' + evnt]();\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tclassNameToList : function (className) {\r\n\t\treturn className.replace(/^\\s+|\\s+$/g, '').split(/\\s+/);\r\n\t},\r\n\r\n\r\n\t// The className parameter (str) can only contain a single class name\r\n\thasClass : function (elm, className) {\r\n\t\tif (!className) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn -1 != (' ' + elm.className.replace(/\\s+/g, ' ') + ' ').indexOf(' ' + className + ' ');\r\n\t},\r\n\r\n\r\n\t// The className parameter (str) can contain multiple class names separated by whitespace\r\n\tsetClass : function (elm, className) {\r\n\t\tvar classList = jsc.classNameToList(className);\r\n\t\tfor (var i = 0; i < classList.length; i += 1) {\r\n\t\t\tif (!jsc.hasClass(elm, classList[i])) {\r\n\t\t\t\telm.className += (elm.className ? ' ' : '') + classList[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\r\n\t// The className parameter (str) can contain multiple class names separated by whitespace\r\n\tunsetClass : function (elm, className) {\r\n\t\tvar classList = jsc.classNameToList(className);\r\n\t\tfor (var i = 0; i < classList.length; i += 1) {\r\n\t\t\tvar repl = new RegExp(\r\n\t\t\t\t'^\\\\s*' + classList[i] + '\\\\s*|' +\r\n\t\t\t\t'\\\\s*' + classList[i] + '\\\\s*$|' +\r\n\t\t\t\t'\\\\s+' + classList[i] + '(\\\\s+)',\r\n\t\t\t\t'g'\r\n\t\t\t);\r\n\t\t\telm.className = elm.className.replace(repl, '$1');\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tgetStyle : function (elm) {\r\n\t\treturn window.getComputedStyle ? window.getComputedStyle(elm) : elm.currentStyle;\r\n\t},\r\n\r\n\r\n\tsetStyle : (function () {\r\n\t\tvar helper = document.createElement('div');\r\n\t\tvar getSupportedProp = function (names) {\r\n\t\t\tfor (var i = 0; i < names.length; i += 1) {\r\n\t\t\t\tif (names[i] in helper.style) {\r\n\t\t\t\t\treturn names[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tvar props = {\r\n\t\t\tborderRadius: getSupportedProp(['borderRadius', 'MozBorderRadius', 'webkitBorderRadius']),\r\n\t\t\tboxShadow: getSupportedProp(['boxShadow', 'MozBoxShadow', 'webkitBoxShadow'])\r\n\t\t};\r\n\t\treturn function (elm, prop, value) {\r\n\t\t\tswitch (prop.toLowerCase()) {\r\n\t\t\tcase 'opacity':\r\n\t\t\t\tvar alphaOpacity = Math.round(parseFloat(value) * 100);\r\n\t\t\t\telm.style.opacity = value;\r\n\t\t\t\telm.style.filter = 'alpha(opacity=' + alphaOpacity + ')';\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\telm.style[props[prop]] = value;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t};\r\n\t})(),\r\n\r\n\r\n\tsetBorderRadius : function (elm, value) {\r\n\t\tjsc.setStyle(elm, 'borderRadius', value || '0');\r\n\t},\r\n\r\n\r\n\tsetBoxShadow : function (elm, value) {\r\n\t\tjsc.setStyle(elm, 'boxShadow', value || 'none');\r\n\t},\r\n\r\n\r\n\tgetElementPos : function (e, relativeToViewport) {\r\n\t\tvar x=0, y=0;\r\n\t\tvar rect = e.getBoundingClientRect();\r\n\t\tx = rect.left;\r\n\t\ty = rect.top;\r\n\t\tif (!relativeToViewport) {\r\n\t\t\tvar viewPos = jsc.getViewPos();\r\n\t\t\tx += viewPos[0];\r\n\t\t\ty += viewPos[1];\r\n\t\t}\r\n\t\treturn [x, y];\r\n\t},\r\n\r\n\r\n\tgetElementSize : function (e) {\r\n\t\treturn [e.offsetWidth, e.offsetHeight];\r\n\t},\r\n\r\n\r\n\t// get pointer's X/Y coordinates relative to viewport\r\n\tgetAbsPointerPos : function (e) {\r\n\t\tif (!e) { e = window.event; }\r\n\t\tvar x = 0, y = 0;\r\n\t\tif (typeof e.changedTouches !== 'undefined' && e.changedTouches.length) {\r\n\t\t\t// touch devices\r\n\t\t\tx = e.changedTouches[0].clientX;\r\n\t\t\ty = e.changedTouches[0].clientY;\r\n\t\t} else if (typeof e.clientX === 'number') {\r\n\t\t\tx = e.clientX;\r\n\t\t\ty = e.clientY;\r\n\t\t}\r\n\t\treturn { x: x, y: y };\r\n\t},\r\n\r\n\r\n\t// get pointer's X/Y coordinates relative to target element\r\n\tgetRelPointerPos : function (e) {\r\n\t\tif (!e) { e = window.event; }\r\n\t\tvar target = e.target || e.srcElement;\r\n\t\tvar targetRect = target.getBoundingClientRect();\r\n\r\n\t\tvar x = 0, y = 0;\r\n\r\n\t\tvar clientX = 0, clientY = 0;\r\n\t\tif (typeof e.changedTouches !== 'undefined' && e.changedTouches.length) {\r\n\t\t\t// touch devices\r\n\t\t\tclientX = e.changedTouches[0].clientX;\r\n\t\t\tclientY = e.changedTouches[0].clientY;\r\n\t\t} else if (typeof e.clientX === 'number') {\r\n\t\t\tclientX = e.clientX;\r\n\t\t\tclientY = e.clientY;\r\n\t\t}\r\n\r\n\t\tx = clientX - targetRect.left;\r\n\t\ty = clientY - targetRect.top;\r\n\t\treturn { x: x, y: y };\r\n\t},\r\n\r\n\r\n\tgetViewPos : function () {\r\n\t\tvar doc = document.documentElement;\r\n\t\treturn [\r\n\t\t\t(window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0),\r\n\t\t\t(window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0)\r\n\t\t];\r\n\t},\r\n\r\n\r\n\tgetViewSize : function () {\r\n\t\tvar doc = document.documentElement;\r\n\t\treturn [\r\n\t\t\t(window.innerWidth || doc.clientWidth),\r\n\t\t\t(window.innerHeight || doc.clientHeight),\r\n\t\t];\r\n\t},\r\n\r\n\r\n\tredrawPosition : function () {\r\n\r\n\t\tif (jsc.picker && jsc.picker.owner) {\r\n\t\t\tvar thisObj = jsc.picker.owner;\r\n\r\n\t\t\tvar tp, vp;\r\n\r\n\t\t\tif (thisObj.fixed) {\r\n\t\t\t\t// Fixed elements are positioned relative to viewport,\r\n\t\t\t\t// therefore we can ignore the scroll offset\r\n\t\t\t\ttp = jsc.getElementPos(thisObj.targetElement, true); // target pos\r\n\t\t\t\tvp = [0, 0]; // view pos\r\n\t\t\t} else {\r\n\t\t\t\ttp = jsc.getElementPos(thisObj.targetElement); // target pos\r\n\t\t\t\tvp = jsc.getViewPos(); // view pos\r\n\t\t\t}\r\n\r\n\t\t\tvar ts = jsc.getElementSize(thisObj.targetElement); // target size\r\n\t\t\tvar vs = jsc.getViewSize(); // view size\r\n\t\t\tvar ps = jsc.getPickerOuterDims(thisObj); // picker size\r\n\t\t\tvar a, b, c;\r\n\t\t\tswitch (thisObj.position.toLowerCase()) {\r\n\t\t\t\tcase 'left': a=1; b=0; c=-1; break;\r\n\t\t\t\tcase 'right':a=1; b=0; c=1; break;\r\n\t\t\t\tcase 'top':  a=0; b=1; c=-1; break;\r\n\t\t\t\tdefault:     a=0; b=1; c=1; break;\r\n\t\t\t}\r\n\t\t\tvar l = (ts[b]+ps[b])/2;\r\n\r\n\t\t\t// compute picker position\r\n\t\t\tif (!thisObj.smartPosition) {\r\n\t\t\t\tvar pp = [\r\n\t\t\t\t\ttp[a],\r\n\t\t\t\t\ttp[b]+ts[b]-l+l*c\r\n\t\t\t\t];\r\n\t\t\t} else {\r\n\t\t\t\tvar pp = [\r\n\t\t\t\t\t-vp[a]+tp[a]+ps[a] > vs[a] ?\r\n\t\t\t\t\t\t(-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) :\r\n\t\t\t\t\t\ttp[a],\r\n\t\t\t\t\t-vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ?\r\n\t\t\t\t\t\t(-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) :\r\n\t\t\t\t\t\t(tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c)\r\n\t\t\t\t];\r\n\t\t\t}\r\n\r\n\t\t\tvar x = pp[a];\r\n\t\t\tvar y = pp[b];\r\n\t\t\tvar positionValue = thisObj.fixed ? 'fixed' : 'absolute';\r\n\t\t\tvar contractShadow =\r\n\t\t\t\t(pp[0] + ps[0] > tp[0] || pp[0] < tp[0] + ts[0]) &&\r\n\t\t\t\t(pp[1] + ps[1] < tp[1] + ts[1]);\r\n\r\n\t\t\tjsc._drawPosition(thisObj, x, y, positionValue, contractShadow);\r\n\t\t}\r\n\t},\r\n\r\n\r\n\t_drawPosition : function (thisObj, x, y, positionValue, contractShadow) {\r\n\t\tvar vShadow = contractShadow ? 0 : thisObj.shadowBlur; // px\r\n\r\n\t\tjsc.picker.wrap.style.position = positionValue;\r\n\t\tjsc.picker.wrap.style.left = x + 'px';\r\n\t\tjsc.picker.wrap.style.top = y + 'px';\r\n\r\n\t\tjsc.setBoxShadow(\r\n\t\t\tjsc.picker.boxS,\r\n\t\t\tthisObj.shadow ?\r\n\t\t\t\tnew jsc.BoxShadow(0, vShadow, thisObj.shadowBlur, 0, thisObj.shadowColor) :\r\n\t\t\t\tnull);\r\n\t},\r\n\r\n\r\n\tgetPickerDims : function (thisObj) {\r\n\t\tvar displaySlider = !!jsc.getSliderComponent(thisObj);\r\n\t\tvar dims = [\r\n\t\t\t2 * thisObj.insetWidth + 2 * thisObj.padding + thisObj.width +\r\n\t\t\t\t(displaySlider ? 2 * thisObj.insetWidth + jsc.getPadToSliderPadding(thisObj) + thisObj.sliderSize : 0),\r\n\t\t\t2 * thisObj.insetWidth + 2 * thisObj.padding + thisObj.height +\r\n\t\t\t\t(thisObj.closable ? 2 * thisObj.insetWidth + thisObj.padding + thisObj.buttonHeight : 0)\r\n\t\t];\r\n\t\treturn dims;\r\n\t},\r\n\r\n\r\n\tgetPickerOuterDims : function (thisObj) {\r\n\t\tvar dims = jsc.getPickerDims(thisObj);\r\n\t\treturn [\r\n\t\t\tdims[0] + 2 * thisObj.borderWidth,\r\n\t\t\tdims[1] + 2 * thisObj.borderWidth\r\n\t\t];\r\n\t},\r\n\r\n\r\n\tgetPadToSliderPadding : function (thisObj) {\r\n\t\treturn Math.max(thisObj.padding, 1.5 * (2 * thisObj.pointerBorderWidth + thisObj.pointerThickness));\r\n\t},\r\n\r\n\r\n\tgetPadYComponent : function (thisObj) {\r\n\t\tswitch (thisObj.mode.charAt(1).toLowerCase()) {\r\n\t\t\tcase 'v': return 'v'; break;\r\n\t\t}\r\n\t\treturn 's';\r\n\t},\r\n\r\n\r\n\tgetSliderComponent : function (thisObj) {\r\n\t\tif (thisObj.mode.length > 2) {\r\n\t\t\tswitch (thisObj.mode.charAt(2).toLowerCase()) {\r\n\t\t\t\tcase 's': return 's'; break;\r\n\t\t\t\tcase 'v': return 'v'; break;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\r\n\tonDocumentMouseDown : function (e) {\r\n\t\tif (!e) { e = window.event; }\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tif (target._jscLinkedInstance) {\r\n\t\t\tif (target._jscLinkedInstance.showOnClick) {\r\n\t\t\t\ttarget._jscLinkedInstance.show();\r\n\t\t\t}\r\n\t\t} else if (target._jscControlName) {\r\n\t\t\tjsc.onControlPointerStart(e, target, target._jscControlName, 'mouse');\r\n\t\t} else {\r\n\t\t\t// Mouse is outside the picker controls -> hide the color picker!\r\n\t\t\tif (jsc.picker && jsc.picker.owner) {\r\n\t\t\t\tjsc.picker.owner.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tonDocumentTouchStart : function (e) {\r\n\t\tif (!e) { e = window.event; }\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tif (target._jscLinkedInstance) {\r\n\t\t\tif (target._jscLinkedInstance.showOnClick) {\r\n\t\t\t\ttarget._jscLinkedInstance.show();\r\n\t\t\t}\r\n\t\t} else if (target._jscControlName) {\r\n\t\t\tjsc.onControlPointerStart(e, target, target._jscControlName, 'touch');\r\n\t\t} else {\r\n\t\t\tif (jsc.picker && jsc.picker.owner) {\r\n\t\t\t\tjsc.picker.owner.hide();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tonWindowResize : function (e) {\r\n\t\tjsc.redrawPosition();\r\n\t},\r\n\r\n\r\n\tonParentScroll : function (e) {\r\n\t\t// hide the picker when one of the parent elements is scrolled\r\n\t\tif (jsc.picker && jsc.picker.owner) {\r\n\t\t\tjsc.picker.owner.hide();\r\n\t\t}\r\n\t},\r\n\r\n\r\n\t_pointerMoveEvent : {\r\n\t\tmouse: 'mousemove',\r\n\t\ttouch: 'touchmove'\r\n\t},\r\n\t_pointerEndEvent : {\r\n\t\tmouse: 'mouseup',\r\n\t\ttouch: 'touchend'\r\n\t},\r\n\r\n\r\n\t_pointerOrigin : null,\r\n\t_capturedTarget : null,\r\n\r\n\r\n\tonControlPointerStart : function (e, target, controlName, pointerType) {\r\n\t\tvar thisObj = target._jscInstance;\r\n\r\n\t\tjsc.preventDefault(e);\r\n\t\tjsc.captureTarget(target);\r\n\r\n\t\tvar registerDragEvents = function (doc, offset) {\r\n\t\t\tjsc.attachGroupEvent('drag', doc, jsc._pointerMoveEvent[pointerType],\r\n\t\t\t\tjsc.onDocumentPointerMove(e, target, controlName, pointerType, offset));\r\n\t\t\tjsc.attachGroupEvent('drag', doc, jsc._pointerEndEvent[pointerType],\r\n\t\t\t\tjsc.onDocumentPointerEnd(e, target, controlName, pointerType));\r\n\t\t};\r\n\r\n\t\tregisterDragEvents(document, [0, 0]);\r\n\r\n\t\tif (window.parent && window.frameElement) {\r\n\t\t\tvar rect = window.frameElement.getBoundingClientRect();\r\n\t\t\tvar ofs = [-rect.left, -rect.top];\r\n\t\t\tregisterDragEvents(window.parent.window.document, ofs);\r\n\t\t}\r\n\r\n\t\tvar abs = jsc.getAbsPointerPos(e);\r\n\t\tvar rel = jsc.getRelPointerPos(e);\r\n\t\tjsc._pointerOrigin = {\r\n\t\t\tx: abs.x - rel.x,\r\n\t\t\ty: abs.y - rel.y\r\n\t\t};\r\n\r\n\t\tswitch (controlName) {\r\n\t\tcase 'pad':\r\n\t\t\t// if the slider is at the bottom, move it up\r\n\t\t\tswitch (jsc.getSliderComponent(thisObj)) {\r\n\t\t\tcase 's': if (thisObj.hsv[1] === 0) { thisObj.fromHSV(null, 100, null); }; break;\r\n\t\t\tcase 'v': if (thisObj.hsv[2] === 0) { thisObj.fromHSV(null, null, 100); }; break;\r\n\t\t\t}\r\n\t\t\tjsc.setPad(thisObj, e, 0, 0);\r\n\t\t\tbreak;\r\n\r\n\t\tcase 'sld':\r\n\t\t\tjsc.setSld(thisObj, e, 0);\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tjsc.dispatchFineChange(thisObj);\r\n\t},\r\n\r\n\r\n\tonDocumentPointerMove : function (e, target, controlName, pointerType, offset) {\r\n\t\treturn function (e) {\r\n\t\t\tvar thisObj = target._jscInstance;\r\n\t\t\tswitch (controlName) {\r\n\t\t\tcase 'pad':\r\n\t\t\t\tif (!e) { e = window.event; }\r\n\t\t\t\tjsc.setPad(thisObj, e, offset[0], offset[1]);\r\n\t\t\t\tjsc.dispatchFineChange(thisObj);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'sld':\r\n\t\t\t\tif (!e) { e = window.event; }\r\n\t\t\t\tjsc.setSld(thisObj, e, offset[1]);\r\n\t\t\t\tjsc.dispatchFineChange(thisObj);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tonDocumentPointerEnd : function (e, target, controlName, pointerType) {\r\n\t\treturn function (e) {\r\n\t\t\tvar thisObj = target._jscInstance;\r\n\t\t\tjsc.detachGroupEvents('drag');\r\n\t\t\tjsc.releaseTarget();\r\n\t\t\t// Always dispatch changes after detaching outstanding mouse handlers,\r\n\t\t\t// in case some user interaction will occur in user's onchange callback\r\n\t\t\t// that would intrude with current mouse events\r\n\t\t\tjsc.dispatchChange(thisObj);\r\n\t\t};\r\n\t},\r\n\r\n\r\n\tdispatchChange : function (thisObj) {\r\n\t\tif (thisObj.valueElement) {\r\n\t\t\tif (jsc.isElementType(thisObj.valueElement, 'input')) {\r\n\t\t\t\tjsc.fireEvent(thisObj.valueElement, 'change');\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tdispatchFineChange : function (thisObj) {\r\n\t\tif (thisObj.onFineChange) {\r\n\t\t\tvar callback;\r\n\t\t\tif (typeof thisObj.onFineChange === 'string') {\r\n\t\t\t\tcallback = new Function (thisObj.onFineChange);\r\n\t\t\t} else {\r\n\t\t\t\tcallback = thisObj.onFineChange;\r\n\t\t\t}\r\n\t\t\tcallback.call(thisObj);\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tsetPad : function (thisObj, e, ofsX, ofsY) {\r\n\t\tvar pointerAbs = jsc.getAbsPointerPos(e);\r\n\t\tvar x = ofsX + pointerAbs.x - jsc._pointerOrigin.x - thisObj.padding - thisObj.insetWidth;\r\n\t\tvar y = ofsY + pointerAbs.y - jsc._pointerOrigin.y - thisObj.padding - thisObj.insetWidth;\r\n\r\n\t\tvar xVal = x * (360 / (thisObj.width - 1));\r\n\t\tvar yVal = 100 - (y * (100 / (thisObj.height - 1)));\r\n\r\n\t\tswitch (jsc.getPadYComponent(thisObj)) {\r\n\t\tcase 's': thisObj.fromHSV(xVal, yVal, null, jsc.leaveSld); break;\r\n\t\tcase 'v': thisObj.fromHSV(xVal, null, yVal, jsc.leaveSld); break;\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tsetSld : function (thisObj, e, ofsY) {\r\n\t\tvar pointerAbs = jsc.getAbsPointerPos(e);\r\n\t\tvar y = ofsY + pointerAbs.y - jsc._pointerOrigin.y - thisObj.padding - thisObj.insetWidth;\r\n\r\n\t\tvar yVal = 100 - (y * (100 / (thisObj.height - 1)));\r\n\r\n\t\tswitch (jsc.getSliderComponent(thisObj)) {\r\n\t\tcase 's': thisObj.fromHSV(null, yVal, null, jsc.leavePad); break;\r\n\t\tcase 'v': thisObj.fromHSV(null, null, yVal, jsc.leavePad); break;\r\n\t\t}\r\n\t},\r\n\r\n\r\n\t_vmlNS : 'jsc_vml_',\r\n\t_vmlCSS : 'jsc_vml_css_',\r\n\t_vmlReady : false,\r\n\r\n\r\n\tinitVML : function () {\r\n\t\tif (!jsc._vmlReady) {\r\n\t\t\t// init VML namespace\r\n\t\t\tvar doc = document;\r\n\t\t\tif (!doc.namespaces[jsc._vmlNS]) {\r\n\t\t\t\tdoc.namespaces.add(jsc._vmlNS, 'urn:schemas-microsoft-com:vml');\r\n\t\t\t}\r\n\t\t\tif (!doc.styleSheets[jsc._vmlCSS]) {\r\n\t\t\t\tvar tags = ['shape', 'shapetype', 'group', 'background', 'path', 'formulas', 'handles', 'fill', 'stroke', 'shadow', 'textbox', 'textpath', 'imagedata', 'line', 'polyline', 'curve', 'rect', 'roundrect', 'oval', 'arc', 'image'];\r\n\t\t\t\tvar ss = doc.createStyleSheet();\r\n\t\t\t\tss.owningElement.id = jsc._vmlCSS;\r\n\t\t\t\tfor (var i = 0; i < tags.length; i += 1) {\r\n\t\t\t\t\tss.addRule(jsc._vmlNS + '\\\\:' + tags[i], 'behavior:url(#default#VML);');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tjsc._vmlReady = true;\r\n\t\t}\r\n\t},\r\n\r\n\r\n\tcreatePalette : function () {\r\n\r\n\t\tvar paletteObj = {\r\n\t\t\telm: null,\r\n\t\t\tdraw: null\r\n\t\t};\r\n\r\n\t\tif (jsc.isCanvasSupported) {\r\n\t\t\t// Canvas implementation for modern browsers\r\n\r\n\t\t\tvar canvas = document.createElement('canvas');\r\n\t\t\tvar ctx = canvas.getContext('2d');\r\n\r\n\t\t\tvar drawFunc = function (width, height, type) {\r\n\t\t\t\tcanvas.width = width;\r\n\t\t\t\tcanvas.height = height;\r\n\r\n\t\t\t\tctx.clearRect(0, 0, canvas.width, canvas.height);\r\n\r\n\t\t\t\tvar hGrad = ctx.createLinearGradient(0, 0, canvas.width, 0);\r\n\t\t\t\thGrad.addColorStop(0 / 6, '#F00');\r\n\t\t\t\thGrad.addColorStop(1 / 6, '#FF0');\r\n\t\t\t\thGrad.addColorStop(2 / 6, '#0F0');\r\n\t\t\t\thGrad.addColorStop(3 / 6, '#0FF');\r\n\t\t\t\thGrad.addColorStop(4 / 6, '#00F');\r\n\t\t\t\thGrad.addColorStop(5 / 6, '#F0F');\r\n\t\t\t\thGrad.addColorStop(6 / 6, '#F00');\r\n\r\n\t\t\t\tctx.fillStyle = hGrad;\r\n\t\t\t\tctx.fillRect(0, 0, canvas.width, canvas.height);\r\n\r\n\t\t\t\tvar vGrad = ctx.createLinearGradient(0, 0, 0, canvas.height);\r\n\t\t\t\tswitch (type.toLowerCase()) {\r\n\t\t\t\tcase 's':\r\n\t\t\t\t\tvGrad.addColorStop(0, 'rgba(255,255,255,0)');\r\n\t\t\t\t\tvGrad.addColorStop(1, 'rgba(255,255,255,1)');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'v':\r\n\t\t\t\t\tvGrad.addColorStop(0, 'rgba(0,0,0,0)');\r\n\t\t\t\t\tvGrad.addColorStop(1, 'rgba(0,0,0,1)');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tctx.fillStyle = vGrad;\r\n\t\t\t\tctx.fillRect(0, 0, canvas.width, canvas.height);\r\n\t\t\t};\r\n\r\n\t\t\tpaletteObj.elm = canvas;\r\n\t\t\tpaletteObj.draw = drawFunc;\r\n\r\n\t\t} else {\r\n\t\t\t// VML fallback for IE 7 and 8\r\n\r\n\t\t\tjsc.initVML();\r\n\r\n\t\t\tvar vmlContainer = document.createElement('div');\r\n\t\t\tvmlContainer.style.position = 'relative';\r\n\t\t\tvmlContainer.style.overflow = 'hidden';\r\n\r\n\t\t\tvar hGrad = document.createElement(jsc._vmlNS + ':fill');\r\n\t\t\thGrad.type = 'gradient';\r\n\t\t\thGrad.method = 'linear';\r\n\t\t\thGrad.angle = '90';\r\n\t\t\thGrad.colors = '16.67% #F0F, 33.33% #00F, 50% #0FF, 66.67% #0F0, 83.33% #FF0'\r\n\r\n\t\t\tvar hRect = document.createElement(jsc._vmlNS + ':rect');\r\n\t\t\thRect.style.position = 'absolute';\r\n\t\t\thRect.style.left = -1 + 'px';\r\n\t\t\thRect.style.top = -1 + 'px';\r\n\t\t\thRect.stroked = false;\r\n\t\t\thRect.appendChild(hGrad);\r\n\t\t\tvmlContainer.appendChild(hRect);\r\n\r\n\t\t\tvar vGrad = document.createElement(jsc._vmlNS + ':fill');\r\n\t\t\tvGrad.type = 'gradient';\r\n\t\t\tvGrad.method = 'linear';\r\n\t\t\tvGrad.angle = '180';\r\n\t\t\tvGrad.opacity = '0';\r\n\r\n\t\t\tvar vRect = document.createElement(jsc._vmlNS + ':rect');\r\n\t\t\tvRect.style.position = 'absolute';\r\n\t\t\tvRect.style.left = -1 + 'px';\r\n\t\t\tvRect.style.top = -1 + 'px';\r\n\t\t\tvRect.stroked = false;\r\n\t\t\tvRect.appendChild(vGrad);\r\n\t\t\tvmlContainer.appendChild(vRect);\r\n\r\n\t\t\tvar drawFunc = function (width, height, type) {\r\n\t\t\t\tvmlContainer.style.width = width + 'px';\r\n\t\t\t\tvmlContainer.style.height = height + 'px';\r\n\r\n\t\t\t\thRect.style.width =\r\n\t\t\t\tvRect.style.width =\r\n\t\t\t\t\t(width + 1) + 'px';\r\n\t\t\t\thRect.style.height =\r\n\t\t\t\tvRect.style.height =\r\n\t\t\t\t\t(height + 1) + 'px';\r\n\r\n\t\t\t\t// Colors must be specified during every redraw, otherwise IE won't display\r\n\t\t\t\t// a full gradient during a subsequential redraw\r\n\t\t\t\thGrad.color = '#F00';\r\n\t\t\t\thGrad.color2 = '#F00';\r\n\r\n\t\t\t\tswitch (type.toLowerCase()) {\r\n\t\t\t\tcase 's':\r\n\t\t\t\t\tvGrad.color = vGrad.color2 = '#FFF';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'v':\r\n\t\t\t\t\tvGrad.color = vGrad.color2 = '#000';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tpaletteObj.elm = vmlContainer;\r\n\t\t\tpaletteObj.draw = drawFunc;\r\n\t\t}\r\n\r\n\t\treturn paletteObj;\r\n\t},\r\n\r\n\r\n\tcreateSliderGradient : function () {\r\n\r\n\t\tvar sliderObj = {\r\n\t\t\telm: null,\r\n\t\t\tdraw: null\r\n\t\t};\r\n\r\n\t\tif (jsc.isCanvasSupported) {\r\n\t\t\t// Canvas implementation for modern browsers\r\n\r\n\t\t\tvar canvas = document.createElement('canvas');\r\n\t\t\tvar ctx = canvas.getContext('2d');\r\n\r\n\t\t\tvar drawFunc = function (width, height, color1, color2) {\r\n\t\t\t\tcanvas.width = width;\r\n\t\t\t\tcanvas.height = height;\r\n\r\n\t\t\t\tctx.clearRect(0, 0, canvas.width, canvas.height);\r\n\r\n\t\t\t\tvar grad = ctx.createLinearGradient(0, 0, 0, canvas.height);\r\n\t\t\t\tgrad.addColorStop(0, color1);\r\n\t\t\t\tgrad.addColorStop(1, color2);\r\n\r\n\t\t\t\tctx.fillStyle = grad;\r\n\t\t\t\tctx.fillRect(0, 0, canvas.width, canvas.height);\r\n\t\t\t};\r\n\r\n\t\t\tsliderObj.elm = canvas;\r\n\t\t\tsliderObj.draw = drawFunc;\r\n\r\n\t\t} else {\r\n\t\t\t// VML fallback for IE 7 and 8\r\n\r\n\t\t\tjsc.initVML();\r\n\r\n\t\t\tvar vmlContainer = document.createElement('div');\r\n\t\t\tvmlContainer.style.position = 'relative';\r\n\t\t\tvmlContainer.style.overflow = 'hidden';\r\n\r\n\t\t\tvar grad = document.createElement(jsc._vmlNS + ':fill');\r\n\t\t\tgrad.type = 'gradient';\r\n\t\t\tgrad.method = 'linear';\r\n\t\t\tgrad.angle = '180';\r\n\r\n\t\t\tvar rect = document.createElement(jsc._vmlNS + ':rect');\r\n\t\t\trect.style.position = 'absolute';\r\n\t\t\trect.style.left = -1 + 'px';\r\n\t\t\trect.style.top = -1 + 'px';\r\n\t\t\trect.stroked = false;\r\n\t\t\trect.appendChild(grad);\r\n\t\t\tvmlContainer.appendChild(rect);\r\n\r\n\t\t\tvar drawFunc = function (width, height, color1, color2) {\r\n\t\t\t\tvmlContainer.style.width = width + 'px';\r\n\t\t\t\tvmlContainer.style.height = height + 'px';\r\n\r\n\t\t\t\trect.style.width = (width + 1) + 'px';\r\n\t\t\t\trect.style.height = (height + 1) + 'px';\r\n\r\n\t\t\t\tgrad.color = color1;\r\n\t\t\t\tgrad.color2 = color2;\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tsliderObj.elm = vmlContainer;\r\n\t\t\tsliderObj.draw = drawFunc;\r\n\t\t}\r\n\r\n\t\treturn sliderObj;\r\n\t},\r\n\r\n\r\n\tleaveValue : 1<<0,\r\n\tleaveStyle : 1<<1,\r\n\tleavePad : 1<<2,\r\n\tleaveSld : 1<<3,\r\n\r\n\r\n\tBoxShadow : (function () {\r\n\t\tvar BoxShadow = function (hShadow, vShadow, blur, spread, color, inset) {\r\n\t\t\tthis.hShadow = hShadow;\r\n\t\t\tthis.vShadow = vShadow;\r\n\t\t\tthis.blur = blur;\r\n\t\t\tthis.spread = spread;\r\n\t\t\tthis.color = color;\r\n\t\t\tthis.inset = !!inset;\r\n\t\t};\r\n\r\n\t\tBoxShadow.prototype.toString = function () {\r\n\t\t\tvar vals = [\r\n\t\t\t\tMath.round(this.hShadow) + 'px',\r\n\t\t\t\tMath.round(this.vShadow) + 'px',\r\n\t\t\t\tMath.round(this.blur) + 'px',\r\n\t\t\t\tMath.round(this.spread) + 'px',\r\n\t\t\t\tthis.color\r\n\t\t\t];\r\n\t\t\tif (this.inset) {\r\n\t\t\t\tvals.push('inset');\r\n\t\t\t}\r\n\t\t\treturn vals.join(' ');\r\n\t\t};\r\n\r\n\t\treturn BoxShadow;\r\n\t})(),\r\n\r\n\r\n\t//\r\n\t// Usage:\r\n\t// var myColor = new jscolor(<targetElement> [, <options>])\r\n\t//\r\n\r\n\tjscolor : function (targetElement, options) {\r\n\r\n\t\t// General options\r\n\t\t//\r\n\t\tthis.value = null; // initial HEX color. To change it later, use methods fromString(), fromHSV() and fromRGB()\r\n\t\tthis.valueElement = targetElement; // element that will be used to display and input the color code\r\n\t\tthis.styleElement = targetElement; // element that will preview the picked color using CSS backgroundColor\r\n\t\tthis.required = true; // whether the associated text <input> can be left empty\r\n\t\tthis.refine = true; // whether to refine the entered color code (e.g. uppercase it and remove whitespace)\r\n\t\tthis.hash = false; // whether to prefix the HEX color code with # symbol\r\n\t\tthis.uppercase = true; // whether to uppercase the color code\r\n\t\tthis.onFineChange = null; // called instantly every time the color changes (value can be either a function or a string with javascript code)\r\n\t\tthis.activeClass = 'jscolor-active'; // class to be set to the target element when a picker window is open on it\r\n\t\tthis.minS = 0; // min allowed saturation (0 - 100)\r\n\t\tthis.maxS = 100; // max allowed saturation (0 - 100)\r\n\t\tthis.minV = 0; // min allowed value (brightness) (0 - 100)\r\n\t\tthis.maxV = 100; // max allowed value (brightness) (0 - 100)\r\n\r\n\t\t// Accessing the picked color\r\n\t\t//\r\n\t\tthis.hsv = [0, 0, 100]; // read-only  [0-360, 0-100, 0-100]\r\n\t\tthis.rgb = [255, 255, 255]; // read-only  [0-255, 0-255, 0-255]\r\n\r\n\t\t// Color Picker options\r\n\t\t//\r\n\t\tthis.width = 181; // width of color palette (in px)\r\n\t\tthis.height = 101; // height of color palette (in px)\r\n\t\tthis.showOnClick = true; // whether to display the color picker when user clicks on its target element\r\n\t\tthis.mode = 'HSV'; // HSV | HVS | HS | HV - layout of the color picker controls\r\n\t\tthis.position = 'bottom'; // left | right | top | bottom - position relative to the target element\r\n\t\tthis.smartPosition = true; // automatically change picker position when there is not enough space for it\r\n\t\tthis.sliderSize = 16; // px\r\n\t\tthis.crossSize = 8; // px\r\n\t\tthis.closable = false; // whether to display the Close button\r\n\t\tthis.closeText = 'Close';\r\n\t\tthis.buttonColor = '#000000'; // CSS color\r\n\t\tthis.buttonHeight = 18; // px\r\n\t\tthis.padding = 12; // px\r\n\t\tthis.backgroundColor = '#FFFFFF'; // CSS color\r\n\t\tthis.borderWidth = 1; // px\r\n\t\tthis.borderColor = '#BBBBBB'; // CSS color\r\n\t\tthis.borderRadius = 8; // px\r\n\t\tthis.insetWidth = 1; // px\r\n\t\tthis.insetColor = '#BBBBBB'; // CSS color\r\n\t\tthis.shadow = true; // whether to display shadow\r\n\t\tthis.shadowBlur = 15; // px\r\n\t\tthis.shadowColor = 'rgba(0,0,0,0.2)'; // CSS color\r\n\t\tthis.pointerColor = '#4C4C4C'; // px\r\n\t\tthis.pointerBorderColor = '#FFFFFF'; // px\r\n        this.pointerBorderWidth = 1; // px\r\n        this.pointerThickness = 2; // px\r\n\t\tthis.zIndex = 10000;\r\n\t\tthis.container = null; // where to append the color picker (BODY element by default)\r\n\r\n\r\n\t\tfor (var opt in options) {\r\n\t\t\tif (options.hasOwnProperty(opt)) {\r\n\t\t\t\tthis[opt] = options[opt];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tthis.hide = function () {\r\n\t\t\tif (isPickerOwner()) {\r\n\t\t\t\tdetachPicker();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\r\n\t\tthis.show = function () {\r\n\t\t\tdrawPicker();\r\n\t\t};\r\n\r\n\r\n\t\tthis.redraw = function () {\r\n\t\t\tif (isPickerOwner()) {\r\n\t\t\t\tdrawPicker();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\r\n\t\tthis.importColor = function () {\r\n\t\t\tif (!this.valueElement) {\r\n\t\t\t\tthis.exportColor();\r\n\t\t\t} else {\r\n\t\t\t\tif (jsc.isElementType(this.valueElement, 'input')) {\r\n\t\t\t\t\tif (!this.refine) {\r\n\t\t\t\t\t\tif (!this.fromString(this.valueElement.value, jsc.leaveValue)) {\r\n\t\t\t\t\t\t\tif (this.styleElement) {\r\n\t\t\t\t\t\t\t\tthis.styleElement.style.backgroundImage = this.styleElement._jscOrigStyle.backgroundImage;\r\n\t\t\t\t\t\t\t\tthis.styleElement.style.backgroundColor = this.styleElement._jscOrigStyle.backgroundColor;\r\n\t\t\t\t\t\t\t\tthis.styleElement.style.color = this.styleElement._jscOrigStyle.color;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tthis.exportColor(jsc.leaveValue | jsc.leaveStyle);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (!this.required && /^\\s*$/.test(this.valueElement.value)) {\r\n\t\t\t\t\t\tthis.valueElement.value = '';\r\n\t\t\t\t\t\tif (this.styleElement) {\r\n\t\t\t\t\t\t\tthis.styleElement.style.backgroundImage = this.styleElement._jscOrigStyle.backgroundImage;\r\n\t\t\t\t\t\t\tthis.styleElement.style.backgroundColor = this.styleElement._jscOrigStyle.backgroundColor;\r\n\t\t\t\t\t\t\tthis.styleElement.style.color = this.styleElement._jscOrigStyle.color;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.exportColor(jsc.leaveValue | jsc.leaveStyle);\r\n\r\n\t\t\t\t\t} else if (this.fromString(this.valueElement.value)) {\r\n\t\t\t\t\t\t// managed to import color successfully from the value -> OK, don't do anything\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.exportColor();\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// not an input element -> doesn't have any value\r\n\t\t\t\t\tthis.exportColor();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\r\n\t\tthis.exportColor = function (flags) {\r\n\t\t\tif (!(flags & jsc.leaveValue) && this.valueElement) {\r\n\t\t\t\tvar value = this.toString();\r\n\t\t\t\tif (this.uppercase) { value = value.toUpperCase(); }\r\n\t\t\t\tif (this.hash) { value = '#' + value; }\r\n\r\n\t\t\t\tif (jsc.isElementType(this.valueElement, 'input')) {\r\n\t\t\t\t\tthis.valueElement.value = value;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.valueElement.innerHTML = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!(flags & jsc.leaveStyle)) {\r\n\t\t\t\tif (this.styleElement) {\r\n\t\t\t\t\tthis.styleElement.style.backgroundImage = 'none';\r\n\t\t\t\t\tthis.styleElement.style.backgroundColor = '#' + this.toString();\r\n\t\t\t\t\tthis.styleElement.style.color = this.isLight() ? '#000' : '#FFF';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!(flags & jsc.leavePad) && isPickerOwner()) {\r\n\t\t\t\tredrawPad();\r\n\t\t\t}\r\n\t\t\tif (!(flags & jsc.leaveSld) && isPickerOwner()) {\r\n\t\t\t\tredrawSld();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\r\n\t\t// h: 0-360\r\n\t\t// s: 0-100\r\n\t\t// v: 0-100\r\n\t\t//\r\n\t\tthis.fromHSV = function (h, s, v, flags) { // null = don't change\r\n\t\t\tif (h !== null) {\r\n\t\t\t\tif (isNaN(h)) { return false; }\r\n\t\t\t\th = Math.max(0, Math.min(360, h));\r\n\t\t\t}\r\n\t\t\tif (s !== null) {\r\n\t\t\t\tif (isNaN(s)) { return false; }\r\n\t\t\t\ts = Math.max(0, Math.min(100, this.maxS, s), this.minS);\r\n\t\t\t}\r\n\t\t\tif (v !== null) {\r\n\t\t\t\tif (isNaN(v)) { return false; }\r\n\t\t\t\tv = Math.max(0, Math.min(100, this.maxV, v), this.minV);\r\n\t\t\t}\r\n\r\n\t\t\tthis.rgb = HSV_RGB(\r\n\t\t\t\th===null ? this.hsv[0] : (this.hsv[0]=h),\r\n\t\t\t\ts===null ? this.hsv[1] : (this.hsv[1]=s),\r\n\t\t\t\tv===null ? this.hsv[2] : (this.hsv[2]=v)\r\n\t\t\t);\r\n\r\n\t\t\tthis.exportColor(flags);\r\n\t\t};\r\n\r\n\r\n\t\t// r: 0-255\r\n\t\t// g: 0-255\r\n\t\t// b: 0-255\r\n\t\t//\r\n\t\tthis.fromRGB = function (r, g, b, flags) { // null = don't change\r\n\t\t\tif (r !== null) {\r\n\t\t\t\tif (isNaN(r)) { return false; }\r\n\t\t\t\tr = Math.max(0, Math.min(255, r));\r\n\t\t\t}\r\n\t\t\tif (g !== null) {\r\n\t\t\t\tif (isNaN(g)) { return false; }\r\n\t\t\t\tg = Math.max(0, Math.min(255, g));\r\n\t\t\t}\r\n\t\t\tif (b !== null) {\r\n\t\t\t\tif (isNaN(b)) { return false; }\r\n\t\t\t\tb = Math.max(0, Math.min(255, b));\r\n\t\t\t}\r\n\r\n\t\t\tvar hsv = RGB_HSV(\r\n\t\t\t\tr===null ? this.rgb[0] : r,\r\n\t\t\t\tg===null ? this.rgb[1] : g,\r\n\t\t\t\tb===null ? this.rgb[2] : b\r\n\t\t\t);\r\n\t\t\tif (hsv[0] !== null) {\r\n\t\t\t\tthis.hsv[0] = Math.max(0, Math.min(360, hsv[0]));\r\n\t\t\t}\r\n\t\t\tif (hsv[2] !== 0) {\r\n\t\t\t\tthis.hsv[1] = hsv[1]===null ? null : Math.max(0, this.minS, Math.min(100, this.maxS, hsv[1]));\r\n\t\t\t}\r\n\t\t\tthis.hsv[2] = hsv[2]===null ? null : Math.max(0, this.minV, Math.min(100, this.maxV, hsv[2]));\r\n\r\n\t\t\t// update RGB according to final HSV, as some values might be trimmed\r\n\t\t\tvar rgb = HSV_RGB(this.hsv[0], this.hsv[1], this.hsv[2]);\r\n\t\t\tthis.rgb[0] = rgb[0];\r\n\t\t\tthis.rgb[1] = rgb[1];\r\n\t\t\tthis.rgb[2] = rgb[2];\r\n\r\n\t\t\tthis.exportColor(flags);\r\n\t\t};\r\n\r\n\r\n\t\tthis.fromString = function (str, flags) {\r\n\t\t\tvar m;\r\n\t\t\tif (m = str.match(/^\\W*([0-9A-F]{3}([0-9A-F]{3})?)\\W*$/i)) {\r\n\t\t\t\t// HEX notation\r\n\t\t\t\t//\r\n\r\n\t\t\t\tif (m[1].length === 6) {\r\n\t\t\t\t\t// 6-char notation\r\n\t\t\t\t\tthis.fromRGB(\r\n\t\t\t\t\t\tparseInt(m[1].substr(0,2),16),\r\n\t\t\t\t\t\tparseInt(m[1].substr(2,2),16),\r\n\t\t\t\t\t\tparseInt(m[1].substr(4,2),16),\r\n\t\t\t\t\t\tflags\r\n\t\t\t\t\t);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// 3-char notation\r\n\t\t\t\t\tthis.fromRGB(\r\n\t\t\t\t\t\tparseInt(m[1].charAt(0) + m[1].charAt(0),16),\r\n\t\t\t\t\t\tparseInt(m[1].charAt(1) + m[1].charAt(1),16),\r\n\t\t\t\t\t\tparseInt(m[1].charAt(2) + m[1].charAt(2),16),\r\n\t\t\t\t\t\tflags\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\r\n\t\t\t} else if (m = str.match(/^\\W*rgba?\\(([^)]*)\\)\\W*$/i)) {\r\n\t\t\t\tvar params = m[1].split(',');\r\n\t\t\t\tvar re = /^\\s*(\\d*)(\\.\\d+)?\\s*$/;\r\n\t\t\t\tvar mR, mG, mB;\r\n\t\t\t\tif (\r\n\t\t\t\t\tparams.length >= 3 &&\r\n\t\t\t\t\t(mR = params[0].match(re)) &&\r\n\t\t\t\t\t(mG = params[1].match(re)) &&\r\n\t\t\t\t\t(mB = params[2].match(re))\r\n\t\t\t\t) {\r\n\t\t\t\t\tvar r = parseFloat((mR[1] || '0') + (mR[2] || ''));\r\n\t\t\t\t\tvar g = parseFloat((mG[1] || '0') + (mG[2] || ''));\r\n\t\t\t\t\tvar b = parseFloat((mB[1] || '0') + (mB[2] || ''));\r\n\t\t\t\t\tthis.fromRGB(r, g, b, flags);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t};\r\n\r\n\r\n\t\tthis.toString = function () {\r\n\t\t\treturn (\r\n\t\t\t\t(0x100 | Math.round(this.rgb[0])).toString(16).substr(1) +\r\n\t\t\t\t(0x100 | Math.round(this.rgb[1])).toString(16).substr(1) +\r\n\t\t\t\t(0x100 | Math.round(this.rgb[2])).toString(16).substr(1)\r\n\t\t\t);\r\n\t\t};\r\n\r\n\r\n\t\tthis.toHEXString = function () {\r\n\t\t\treturn '#' + this.toString().toUpperCase();\r\n\t\t};\r\n\r\n\r\n\t\tthis.toRGBString = function () {\r\n\t\t\treturn ('rgb(' +\r\n\t\t\t\tMath.round(this.rgb[0]) + ',' +\r\n\t\t\t\tMath.round(this.rgb[1]) + ',' +\r\n\t\t\t\tMath.round(this.rgb[2]) + ')'\r\n\t\t\t);\r\n\t\t};\r\n\r\n\r\n\t\tthis.isLight = function () {\r\n\t\t\treturn (\r\n\t\t\t\t0.213 * this.rgb[0] +\r\n\t\t\t\t0.715 * this.rgb[1] +\r\n\t\t\t\t0.072 * this.rgb[2] >\r\n\t\t\t\t255 / 2\r\n\t\t\t);\r\n\t\t};\r\n\r\n\r\n\t\tthis._processParentElementsInDOM = function () {\r\n\t\t\tif (this._linkedElementsProcessed) { return; }\r\n\t\t\tthis._linkedElementsProcessed = true;\r\n\r\n\t\t\tvar elm = this.targetElement;\r\n\t\t\tdo {\r\n\t\t\t\t// If the target element or one of its parent nodes has fixed position,\r\n\t\t\t\t// then use fixed positioning instead\r\n\t\t\t\t//\r\n\t\t\t\t// Note: In Firefox, getComputedStyle returns null in a hidden iframe,\r\n\t\t\t\t// that's why we need to check if the returned style object is non-empty\r\n\t\t\t\tvar currStyle = jsc.getStyle(elm);\r\n\t\t\t\tif (currStyle && currStyle.position.toLowerCase() === 'fixed') {\r\n\t\t\t\t\tthis.fixed = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (elm !== this.targetElement) {\r\n\t\t\t\t\t// Ensure to attach onParentScroll only once to each parent element\r\n\t\t\t\t\t// (multiple targetElements can share the same parent nodes)\r\n\t\t\t\t\t//\r\n\t\t\t\t\t// Note: It's not just offsetParents that can be scrollable,\r\n\t\t\t\t\t// that's why we loop through all parent nodes\r\n\t\t\t\t\tif (!elm._jscEventsAttached) {\r\n\t\t\t\t\t\tjsc.attachEvent(elm, 'scroll', jsc.onParentScroll);\r\n\t\t\t\t\t\telm._jscEventsAttached = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} while ((elm = elm.parentNode) && !jsc.isElementType(elm, 'body'));\r\n\t\t};\r\n\r\n\r\n\t\t// r: 0-255\r\n\t\t// g: 0-255\r\n\t\t// b: 0-255\r\n\t\t//\r\n\t\t// returns: [ 0-360, 0-100, 0-100 ]\r\n\t\t//\r\n\t\tfunction RGB_HSV (r, g, b) {\r\n\t\t\tr /= 255;\r\n\t\t\tg /= 255;\r\n\t\t\tb /= 255;\r\n\t\t\tvar n = Math.min(Math.min(r,g),b);\r\n\t\t\tvar v = Math.max(Math.max(r,g),b);\r\n\t\t\tvar m = v - n;\r\n\t\t\tif (m === 0) { return [ null, 0, 100 * v ]; }\r\n\t\t\tvar h = r===n ? 3+(b-g)/m : (g===n ? 5+(r-b)/m : 1+(g-r)/m);\r\n\t\t\treturn [\r\n\t\t\t\t60 * (h===6?0:h),\r\n\t\t\t\t100 * (m/v),\r\n\t\t\t\t100 * v\r\n\t\t\t];\r\n\t\t}\r\n\r\n\r\n\t\t// h: 0-360\r\n\t\t// s: 0-100\r\n\t\t// v: 0-100\r\n\t\t//\r\n\t\t// returns: [ 0-255, 0-255, 0-255 ]\r\n\t\t//\r\n\t\tfunction HSV_RGB (h, s, v) {\r\n\t\t\tvar u = 255 * (v / 100);\r\n\r\n\t\t\tif (h === null) {\r\n\t\t\t\treturn [ u, u, u ];\r\n\t\t\t}\r\n\r\n\t\t\th /= 60;\r\n\t\t\ts /= 100;\r\n\r\n\t\t\tvar i = Math.floor(h);\r\n\t\t\tvar f = i%2 ? h-i : 1-(h-i);\r\n\t\t\tvar m = u * (1 - s);\r\n\t\t\tvar n = u * (1 - s * f);\r\n\t\t\tswitch (i) {\r\n\t\t\t\tcase 6:\r\n\t\t\t\tcase 0: return [u,n,m];\r\n\t\t\t\tcase 1: return [n,u,m];\r\n\t\t\t\tcase 2: return [m,u,n];\r\n\t\t\t\tcase 3: return [m,n,u];\r\n\t\t\t\tcase 4: return [n,m,u];\r\n\t\t\t\tcase 5: return [u,m,n];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfunction detachPicker () {\r\n\t\t\tjsc.unsetClass(THIS.targetElement, THIS.activeClass);\r\n\t\t\tjsc.picker.wrap.parentNode.removeChild(jsc.picker.wrap);\r\n\t\t\tdelete jsc.picker.owner;\r\n\t\t}\r\n\r\n\r\n\t\tfunction drawPicker () {\r\n\r\n\t\t\t// At this point, when drawing the picker, we know what the parent elements are\r\n\t\t\t// and we can do all related DOM operations, such as registering events on them\r\n\t\t\t// or checking their positioning\r\n\t\t\tTHIS._processParentElementsInDOM();\r\n\r\n\t\t\tif (!jsc.picker) {\r\n\t\t\t\tjsc.picker = {\r\n\t\t\t\t\towner: null,\r\n\t\t\t\t\twrap : document.createElement('div'),\r\n\t\t\t\t\tbox : document.createElement('div'),\r\n\t\t\t\t\tboxS : document.createElement('div'), // shadow area\r\n\t\t\t\t\tboxB : document.createElement('div'), // border\r\n\t\t\t\t\tpad : document.createElement('div'),\r\n\t\t\t\t\tpadB : document.createElement('div'), // border\r\n\t\t\t\t\tpadM : document.createElement('div'), // mouse/touch area\r\n\t\t\t\t\tpadPal : jsc.createPalette(),\r\n\t\t\t\t\tcross : document.createElement('div'),\r\n\t\t\t\t\tcrossBY : document.createElement('div'), // border Y\r\n\t\t\t\t\tcrossBX : document.createElement('div'), // border X\r\n\t\t\t\t\tcrossLY : document.createElement('div'), // line Y\r\n\t\t\t\t\tcrossLX : document.createElement('div'), // line X\r\n\t\t\t\t\tsld : document.createElement('div'),\r\n\t\t\t\t\tsldB : document.createElement('div'), // border\r\n\t\t\t\t\tsldM : document.createElement('div'), // mouse/touch area\r\n\t\t\t\t\tsldGrad : jsc.createSliderGradient(),\r\n\t\t\t\t\tsldPtrS : document.createElement('div'), // slider pointer spacer\r\n\t\t\t\t\tsldPtrIB : document.createElement('div'), // slider pointer inner border\r\n\t\t\t\t\tsldPtrMB : document.createElement('div'), // slider pointer middle border\r\n\t\t\t\t\tsldPtrOB : document.createElement('div'), // slider pointer outer border\r\n\t\t\t\t\tbtn : document.createElement('div'),\r\n\t\t\t\t\tbtnT : document.createElement('span') // text\r\n\t\t\t\t};\r\n\r\n\t\t\t\tjsc.picker.pad.appendChild(jsc.picker.padPal.elm);\r\n\t\t\t\tjsc.picker.padB.appendChild(jsc.picker.pad);\r\n\t\t\t\tjsc.picker.cross.appendChild(jsc.picker.crossBY);\r\n\t\t\t\tjsc.picker.cross.appendChild(jsc.picker.crossBX);\r\n\t\t\t\tjsc.picker.cross.appendChild(jsc.picker.crossLY);\r\n\t\t\t\tjsc.picker.cross.appendChild(jsc.picker.crossLX);\r\n\t\t\t\tjsc.picker.padB.appendChild(jsc.picker.cross);\r\n\t\t\t\tjsc.picker.box.appendChild(jsc.picker.padB);\r\n\t\t\t\tjsc.picker.box.appendChild(jsc.picker.padM);\r\n\r\n\t\t\t\tjsc.picker.sld.appendChild(jsc.picker.sldGrad.elm);\r\n\t\t\t\tjsc.picker.sldB.appendChild(jsc.picker.sld);\r\n\t\t\t\tjsc.picker.sldB.appendChild(jsc.picker.sldPtrOB);\r\n\t\t\t\tjsc.picker.sldPtrOB.appendChild(jsc.picker.sldPtrMB);\r\n\t\t\t\tjsc.picker.sldPtrMB.appendChild(jsc.picker.sldPtrIB);\r\n\t\t\t\tjsc.picker.sldPtrIB.appendChild(jsc.picker.sldPtrS);\r\n\t\t\t\tjsc.picker.box.appendChild(jsc.picker.sldB);\r\n\t\t\t\tjsc.picker.box.appendChild(jsc.picker.sldM);\r\n\r\n\t\t\t\tjsc.picker.btn.appendChild(jsc.picker.btnT);\r\n\t\t\t\tjsc.picker.box.appendChild(jsc.picker.btn);\r\n\r\n\t\t\t\tjsc.picker.boxB.appendChild(jsc.picker.box);\r\n\t\t\t\tjsc.picker.wrap.appendChild(jsc.picker.boxS);\r\n\t\t\t\tjsc.picker.wrap.appendChild(jsc.picker.boxB);\r\n\t\t\t}\r\n\r\n\t\t\tvar p = jsc.picker;\r\n\r\n\t\t\tvar displaySlider = !!jsc.getSliderComponent(THIS);\r\n\t\t\tvar dims = jsc.getPickerDims(THIS);\r\n\t\t\tvar crossOuterSize = (2 * THIS.pointerBorderWidth + THIS.pointerThickness + 2 * THIS.crossSize);\r\n\t\t\tvar padToSliderPadding = jsc.getPadToSliderPadding(THIS);\r\n\t\t\tvar borderRadius = Math.min(\r\n\t\t\t\tTHIS.borderRadius,\r\n\t\t\t\tMath.round(THIS.padding * Math.PI)); // px\r\n\t\t\tvar padCursor = 'crosshair';\r\n\r\n\t\t\t// wrap\r\n\t\t\tp.wrap.style.clear = 'both';\r\n\t\t\tp.wrap.style.width = (dims[0] + 2 * THIS.borderWidth) + 'px';\r\n\t\t\tp.wrap.style.height = (dims[1] + 2 * THIS.borderWidth) + 'px';\r\n\t\t\tp.wrap.style.zIndex = THIS.zIndex;\r\n\r\n\t\t\t// picker\r\n\t\t\tp.box.style.width = dims[0] + 'px';\r\n\t\t\tp.box.style.height = dims[1] + 'px';\r\n\r\n\t\t\tp.boxS.style.position = 'absolute';\r\n\t\t\tp.boxS.style.left = '0';\r\n\t\t\tp.boxS.style.top = '0';\r\n\t\t\tp.boxS.style.width = '100%';\r\n\t\t\tp.boxS.style.height = '100%';\r\n\t\t\tjsc.setBorderRadius(p.boxS, borderRadius + 'px');\r\n\r\n\t\t\t// picker border\r\n\t\t\tp.boxB.style.position = 'relative';\r\n\t\t\tp.boxB.style.border = THIS.borderWidth + 'px solid';\r\n\t\t\tp.boxB.style.borderColor = THIS.borderColor;\r\n\t\t\tp.boxB.style.background = THIS.backgroundColor;\r\n\t\t\tjsc.setBorderRadius(p.boxB, borderRadius + 'px');\r\n\r\n\t\t\t// IE hack:\r\n\t\t\t// If the element is transparent, IE will trigger the event on the elements under it,\r\n\t\t\t// e.g. on Canvas or on elements with border\r\n\t\t\tp.padM.style.background =\r\n\t\t\tp.sldM.style.background =\r\n\t\t\t\t'#FFF';\r\n\t\t\tjsc.setStyle(p.padM, 'opacity', '0');\r\n\t\t\tjsc.setStyle(p.sldM, 'opacity', '0');\r\n\r\n\t\t\t// pad\r\n\t\t\tp.pad.style.position = 'relative';\r\n\t\t\tp.pad.style.width = THIS.width + 'px';\r\n\t\t\tp.pad.style.height = THIS.height + 'px';\r\n\r\n\t\t\t// pad palettes (HSV and HVS)\r\n\t\t\tp.padPal.draw(THIS.width, THIS.height, jsc.getPadYComponent(THIS));\r\n\r\n\t\t\t// pad border\r\n\t\t\tp.padB.style.position = 'absolute';\r\n\t\t\tp.padB.style.left = THIS.padding + 'px';\r\n\t\t\tp.padB.style.top = THIS.padding + 'px';\r\n\t\t\tp.padB.style.border = THIS.insetWidth + 'px solid';\r\n\t\t\tp.padB.style.borderColor = THIS.insetColor;\r\n\r\n\t\t\t// pad mouse area\r\n\t\t\tp.padM._jscInstance = THIS;\r\n\t\t\tp.padM._jscControlName = 'pad';\r\n\t\t\tp.padM.style.position = 'absolute';\r\n\t\t\tp.padM.style.left = '0';\r\n\t\t\tp.padM.style.top = '0';\r\n\t\t\tp.padM.style.width = (THIS.padding + 2 * THIS.insetWidth + THIS.width + padToSliderPadding / 2) + 'px';\r\n\t\t\tp.padM.style.height = dims[1] + 'px';\r\n\t\t\tp.padM.style.cursor = padCursor;\r\n\r\n\t\t\t// pad cross\r\n\t\t\tp.cross.style.position = 'absolute';\r\n\t\t\tp.cross.style.left =\r\n\t\t\tp.cross.style.top =\r\n\t\t\t\t'0';\r\n\t\t\tp.cross.style.width =\r\n\t\t\tp.cross.style.height =\r\n\t\t\t\tcrossOuterSize + 'px';\r\n\r\n\t\t\t// pad cross border Y and X\r\n\t\t\tp.crossBY.style.position =\r\n\t\t\tp.crossBX.style.position =\r\n\t\t\t\t'absolute';\r\n\t\t\tp.crossBY.style.background =\r\n\t\t\tp.crossBX.style.background =\r\n\t\t\t\tTHIS.pointerBorderColor;\r\n\t\t\tp.crossBY.style.width =\r\n\t\t\tp.crossBX.style.height =\r\n\t\t\t\t(2 * THIS.pointerBorderWidth + THIS.pointerThickness) + 'px';\r\n\t\t\tp.crossBY.style.height =\r\n\t\t\tp.crossBX.style.width =\r\n\t\t\t\tcrossOuterSize + 'px';\r\n\t\t\tp.crossBY.style.left =\r\n\t\t\tp.crossBX.style.top =\r\n\t\t\t\t(Math.floor(crossOuterSize / 2) - Math.floor(THIS.pointerThickness / 2) - THIS.pointerBorderWidth) + 'px';\r\n\t\t\tp.crossBY.style.top =\r\n\t\t\tp.crossBX.style.left =\r\n\t\t\t\t'0';\r\n\r\n\t\t\t// pad cross line Y and X\r\n\t\t\tp.crossLY.style.position =\r\n\t\t\tp.crossLX.style.position =\r\n\t\t\t\t'absolute';\r\n\t\t\tp.crossLY.style.background =\r\n\t\t\tp.crossLX.style.background =\r\n\t\t\t\tTHIS.pointerColor;\r\n\t\t\tp.crossLY.style.height =\r\n\t\t\tp.crossLX.style.width =\r\n\t\t\t\t(crossOuterSize - 2 * THIS.pointerBorderWidth) + 'px';\r\n\t\t\tp.crossLY.style.width =\r\n\t\t\tp.crossLX.style.height =\r\n\t\t\t\tTHIS.pointerThickness + 'px';\r\n\t\t\tp.crossLY.style.left =\r\n\t\t\tp.crossLX.style.top =\r\n\t\t\t\t(Math.floor(crossOuterSize / 2) - Math.floor(THIS.pointerThickness / 2)) + 'px';\r\n\t\t\tp.crossLY.style.top =\r\n\t\t\tp.crossLX.style.left =\r\n\t\t\t\tTHIS.pointerBorderWidth + 'px';\r\n\r\n\t\t\t// slider\r\n\t\t\tp.sld.style.overflow = 'hidden';\r\n\t\t\tp.sld.style.width = THIS.sliderSize + 'px';\r\n\t\t\tp.sld.style.height = THIS.height + 'px';\r\n\r\n\t\t\t// slider gradient\r\n\t\t\tp.sldGrad.draw(THIS.sliderSize, THIS.height, '#000', '#000');\r\n\r\n\t\t\t// slider border\r\n\t\t\tp.sldB.style.display = displaySlider ? 'block' : 'none';\r\n\t\t\tp.sldB.style.position = 'absolute';\r\n\t\t\tp.sldB.style.right = THIS.padding + 'px';\r\n\t\t\tp.sldB.style.top = THIS.padding + 'px';\r\n\t\t\tp.sldB.style.border = THIS.insetWidth + 'px solid';\r\n\t\t\tp.sldB.style.borderColor = THIS.insetColor;\r\n\r\n\t\t\t// slider mouse area\r\n\t\t\tp.sldM._jscInstance = THIS;\r\n\t\t\tp.sldM._jscControlName = 'sld';\r\n\t\t\tp.sldM.style.display = displaySlider ? 'block' : 'none';\r\n\t\t\tp.sldM.style.position = 'absolute';\r\n\t\t\tp.sldM.style.right = '0';\r\n\t\t\tp.sldM.style.top = '0';\r\n\t\t\tp.sldM.style.width = (THIS.sliderSize + padToSliderPadding / 2 + THIS.padding + 2 * THIS.insetWidth) + 'px';\r\n\t\t\tp.sldM.style.height = dims[1] + 'px';\r\n\t\t\tp.sldM.style.cursor = 'default';\r\n\r\n\t\t\t// slider pointer inner and outer border\r\n\t\t\tp.sldPtrIB.style.border =\r\n\t\t\tp.sldPtrOB.style.border =\r\n\t\t\t\tTHIS.pointerBorderWidth + 'px solid ' + THIS.pointerBorderColor;\r\n\r\n\t\t\t// slider pointer outer border\r\n\t\t\tp.sldPtrOB.style.position = 'absolute';\r\n\t\t\tp.sldPtrOB.style.left = -(2 * THIS.pointerBorderWidth + THIS.pointerThickness) + 'px';\r\n\t\t\tp.sldPtrOB.style.top = '0';\r\n\r\n\t\t\t// slider pointer middle border\r\n\t\t\tp.sldPtrMB.style.border = THIS.pointerThickness + 'px solid ' + THIS.pointerColor;\r\n\r\n\t\t\t// slider pointer spacer\r\n\t\t\tp.sldPtrS.style.width = THIS.sliderSize + 'px';\r\n\t\t\tp.sldPtrS.style.height = sliderPtrSpace + 'px';\r\n\r\n\t\t\t// the Close button\r\n\t\t\tfunction setBtnBorder () {\r\n\t\t\t\tvar insetColors = THIS.insetColor.split(/\\s+/);\r\n\t\t\t\tvar outsetColor = insetColors.length < 2 ? insetColors[0] : insetColors[1] + ' ' + insetColors[0] + ' ' + insetColors[0] + ' ' + insetColors[1];\r\n\t\t\t\tp.btn.style.borderColor = outsetColor;\r\n\t\t\t}\r\n\t\t\tp.btn.style.display = THIS.closable ? 'block' : 'none';\r\n\t\t\tp.btn.style.position = 'absolute';\r\n\t\t\tp.btn.style.left = THIS.padding + 'px';\r\n\t\t\tp.btn.style.bottom = THIS.padding + 'px';\r\n\t\t\tp.btn.style.padding = '0 15px';\r\n\t\t\tp.btn.style.height = THIS.buttonHeight + 'px';\r\n\t\t\tp.btn.style.border = THIS.insetWidth + 'px solid';\r\n\t\t\tsetBtnBorder();\r\n\t\t\tp.btn.style.color = THIS.buttonColor;\r\n\t\t\tp.btn.style.font = '12px sans-serif';\r\n\t\t\tp.btn.style.textAlign = 'center';\r\n\t\t\ttry {\r\n\t\t\t\tp.btn.style.cursor = 'pointer';\r\n\t\t\t} catch(eOldIE) {\r\n\t\t\t\tp.btn.style.cursor = 'hand';\r\n\t\t\t}\r\n\t\t\tp.btn.onmousedown = function () {\r\n\t\t\t\tTHIS.hide();\r\n\t\t\t};\r\n\t\t\tp.btnT.style.lineHeight = THIS.buttonHeight + 'px';\r\n\t\t\tp.btnT.innerHTML = '';\r\n\t\t\tp.btnT.appendChild(document.createTextNode(THIS.closeText));\r\n\r\n\t\t\t// place pointers\r\n\t\t\tredrawPad();\r\n\t\t\tredrawSld();\r\n\r\n\t\t\t// If we are changing the owner without first closing the picker,\r\n\t\t\t// make sure to first deal with the old owner\r\n\t\t\tif (jsc.picker.owner && jsc.picker.owner !== THIS) {\r\n\t\t\t\tjsc.unsetClass(jsc.picker.owner.targetElement, THIS.activeClass);\r\n\t\t\t}\r\n\r\n\t\t\t// Set the new picker owner\r\n\t\t\tjsc.picker.owner = THIS;\r\n\r\n\t\t\t// The redrawPosition() method needs picker.owner to be set, that's why we call it here,\r\n\t\t\t// after setting the owner\r\n\t\t\tif (jsc.isElementType(container, 'body')) {\r\n\t\t\t\tjsc.redrawPosition();\r\n\t\t\t} else {\r\n\t\t\t\tjsc._drawPosition(THIS, 0, 0, 'relative', false);\r\n\t\t\t}\r\n\r\n\t\t\tif (p.wrap.parentNode != container) {\r\n\t\t\t\tcontainer.appendChild(p.wrap);\r\n\t\t\t}\r\n\r\n\t\t\tjsc.setClass(THIS.targetElement, THIS.activeClass);\r\n\t\t}\r\n\r\n\r\n\t\tfunction redrawPad () {\r\n\t\t\t// redraw the pad pointer\r\n\t\t\tswitch (jsc.getPadYComponent(THIS)) {\r\n\t\t\tcase 's': var yComponent = 1; break;\r\n\t\t\tcase 'v': var yComponent = 2; break;\r\n\t\t\t}\r\n\t\t\tvar x = Math.round((THIS.hsv[0] / 360) * (THIS.width - 1));\r\n\t\t\tvar y = Math.round((1 - THIS.hsv[yComponent] / 100) * (THIS.height - 1));\r\n\t\t\tvar crossOuterSize = (2 * THIS.pointerBorderWidth + THIS.pointerThickness + 2 * THIS.crossSize);\r\n\t\t\tvar ofs = -Math.floor(crossOuterSize / 2);\r\n\t\t\tjsc.picker.cross.style.left = (x + ofs) + 'px';\r\n\t\t\tjsc.picker.cross.style.top = (y + ofs) + 'px';\r\n\r\n\t\t\t// redraw the slider\r\n\t\t\tswitch (jsc.getSliderComponent(THIS)) {\r\n\t\t\tcase 's':\r\n\t\t\t\tvar rgb1 = HSV_RGB(THIS.hsv[0], 100, THIS.hsv[2]);\r\n\t\t\t\tvar rgb2 = HSV_RGB(THIS.hsv[0], 0, THIS.hsv[2]);\r\n\t\t\t\tvar color1 = 'rgb(' +\r\n\t\t\t\t\tMath.round(rgb1[0]) + ',' +\r\n\t\t\t\t\tMath.round(rgb1[1]) + ',' +\r\n\t\t\t\t\tMath.round(rgb1[2]) + ')';\r\n\t\t\t\tvar color2 = 'rgb(' +\r\n\t\t\t\t\tMath.round(rgb2[0]) + ',' +\r\n\t\t\t\t\tMath.round(rgb2[1]) + ',' +\r\n\t\t\t\t\tMath.round(rgb2[2]) + ')';\r\n\t\t\t\tjsc.picker.sldGrad.draw(THIS.sliderSize, THIS.height, color1, color2);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'v':\r\n\t\t\t\tvar rgb = HSV_RGB(THIS.hsv[0], THIS.hsv[1], 100);\r\n\t\t\t\tvar color1 = 'rgb(' +\r\n\t\t\t\t\tMath.round(rgb[0]) + ',' +\r\n\t\t\t\t\tMath.round(rgb[1]) + ',' +\r\n\t\t\t\t\tMath.round(rgb[2]) + ')';\r\n\t\t\t\tvar color2 = '#000';\r\n\t\t\t\tjsc.picker.sldGrad.draw(THIS.sliderSize, THIS.height, color1, color2);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfunction redrawSld () {\r\n\t\t\tvar sldComponent = jsc.getSliderComponent(THIS);\r\n\t\t\tif (sldComponent) {\r\n\t\t\t\t// redraw the slider pointer\r\n\t\t\t\tswitch (sldComponent) {\r\n\t\t\t\tcase 's': var yComponent = 1; break;\r\n\t\t\t\tcase 'v': var yComponent = 2; break;\r\n\t\t\t\t}\r\n\t\t\t\tvar y = Math.round((1 - THIS.hsv[yComponent] / 100) * (THIS.height - 1));\r\n\t\t\t\tjsc.picker.sldPtrOB.style.top = (y - (2 * THIS.pointerBorderWidth + THIS.pointerThickness) - Math.floor(sliderPtrSpace / 2)) + 'px';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tfunction isPickerOwner () {\r\n\t\t\treturn jsc.picker && jsc.picker.owner === THIS;\r\n\t\t}\r\n\r\n\r\n\t\tfunction blurValue () {\r\n\t\t\tTHIS.importColor();\r\n\t\t}\r\n\r\n\r\n\t\t// Find the target element\r\n\t\tif (typeof targetElement === 'string') {\r\n\t\t\tvar id = targetElement;\r\n\t\t\tvar elm = document.getElementById(id);\r\n\t\t\tif (elm) {\r\n\t\t\t\tthis.targetElement = elm;\r\n\t\t\t} else {\r\n\t\t\t\tjsc.warn('Could not find target element with ID \\'' + id + '\\'');\r\n\t\t\t}\r\n\t\t} else if (targetElement) {\r\n\t\t\tthis.targetElement = targetElement;\r\n\t\t} else {\r\n\t\t\tjsc.warn('Invalid target element: \\'' + targetElement + '\\'');\r\n\t\t}\r\n\r\n\t\tif (this.targetElement._jscLinkedInstance) {\r\n\t\t\tjsc.warn('Cannot link jscolor twice to the same element. Skipping.');\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.targetElement._jscLinkedInstance = this;\r\n\r\n\t\t// Find the value element\r\n\t\tthis.valueElement = jsc.fetchElement(this.valueElement);\r\n\t\t// Find the style element\r\n\t\tthis.styleElement = jsc.fetchElement(this.styleElement);\r\n\r\n\t\tvar THIS = this;\r\n\t\tvar container =\r\n\t\t\tthis.container ?\r\n\t\t\tjsc.fetchElement(this.container) :\r\n\t\t\tdocument.getElementsByTagName('body')[0];\r\n\t\tvar sliderPtrSpace = 3; // px\r\n\r\n\t\t// For BUTTON elements it's important to stop them from sending the form when clicked\r\n\t\t// (e.g. in Safari)\r\n\t\tif (jsc.isElementType(this.targetElement, 'button')) {\r\n\t\t\tif (this.targetElement.onclick) {\r\n\t\t\t\tvar origCallback = this.targetElement.onclick;\r\n\t\t\t\tthis.targetElement.onclick = function (evt) {\r\n\t\t\t\t\torigCallback.call(this, evt);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t};\r\n\t\t\t} else {\r\n\t\t\t\tthis.targetElement.onclick = function () { return false; };\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\tvar elm = this.targetElement;\r\n\t\tdo {\r\n\t\t\t// If the target element or one of its offsetParents has fixed position,\r\n\t\t\t// then use fixed positioning instead\r\n\t\t\t//\r\n\t\t\t// Note: In Firefox, getComputedStyle returns null in a hidden iframe,\r\n\t\t\t// that's why we need to check if the returned style object is non-empty\r\n\t\t\tvar currStyle = jsc.getStyle(elm);\r\n\t\t\tif (currStyle && currStyle.position.toLowerCase() === 'fixed') {\r\n\t\t\t\tthis.fixed = true;\r\n\t\t\t}\r\n\r\n\t\t\tif (elm !== this.targetElement) {\r\n\t\t\t\t// attach onParentScroll so that we can recompute the picker position\r\n\t\t\t\t// when one of the offsetParents is scrolled\r\n\t\t\t\tif (!elm._jscEventsAttached) {\r\n\t\t\t\t\tjsc.attachEvent(elm, 'scroll', jsc.onParentScroll);\r\n\t\t\t\t\telm._jscEventsAttached = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} while ((elm = elm.offsetParent) && !jsc.isElementType(elm, 'body'));\r\n\t\t*/\r\n\r\n\t\t// valueElement\r\n\t\tif (this.valueElement) {\r\n\t\t\tif (jsc.isElementType(this.valueElement, 'input')) {\r\n\t\t\t\tvar updateField = function () {\r\n\t\t\t\t\tTHIS.fromString(THIS.valueElement.value, jsc.leaveValue);\r\n\t\t\t\t\tjsc.dispatchFineChange(THIS);\r\n\t\t\t\t};\r\n\t\t\t\tjsc.attachEvent(this.valueElement, 'keyup', updateField);\r\n\t\t\t\tjsc.attachEvent(this.valueElement, 'input', updateField);\r\n\t\t\t\tjsc.attachEvent(this.valueElement, 'blur', blurValue);\r\n\t\t\t\tthis.valueElement.setAttribute('autocomplete', 'off');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// styleElement\r\n\t\tif (this.styleElement) {\r\n\t\t\tthis.styleElement._jscOrigStyle = {\r\n\t\t\t\tbackgroundImage : this.styleElement.style.backgroundImage,\r\n\t\t\t\tbackgroundColor : this.styleElement.style.backgroundColor,\r\n\t\t\t\tcolor : this.styleElement.style.color\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tif (this.value) {\r\n\t\t\t// Try to set the color from the .value option and if unsuccessful,\r\n\t\t\t// export the current color\r\n\t\t\tthis.fromString(this.value) || this.exportColor();\r\n\t\t} else {\r\n\t\t\tthis.importColor();\r\n\t\t}\r\n\t}\r\n\r\n};\r\n\r\n\r\n//================================\r\n// Public properties and methods\r\n//================================\r\n\r\n\r\n// By default, search for all elements with class=\"jscolor\" and install a color picker on them.\r\n//\r\n// You can change what class name will be looked for by setting the property jscolor.lookupClass\r\n// anywhere in your HTML document. To completely disable the automatic lookup, set it to null.\r\n//\r\njsc.jscolor.lookupClass = 'jscolor';\r\n\r\n\r\njsc.jscolor.installByClassName = function (className) {\r\n\tvar inputElms = document.getElementsByTagName('input');\r\n\tvar buttonElms = document.getElementsByTagName('button');\r\n\r\n\tjsc.tryInstallOnElements(inputElms, className);\r\n\tjsc.tryInstallOnElements(buttonElms, className);\r\n};\r\n\r\n\r\njsc.register();\r\n\r\n\r\nreturn jsc.jscolor;\r\n\r\n\r\n})(); }\r\n","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n  if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","function _iterableToArray(iter) {\n  if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","function _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n  \"use strict\";\n\n  var Op = Object.prototype;\n  var hasOwn = Op.hasOwnProperty;\n  var undefined; // More compressible than void 0.\n  var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n  var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n  var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n  var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n  function define(obj, key, value) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n    return obj[key];\n  }\n  try {\n    // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n    define({}, \"\");\n  } catch (err) {\n    define = function(obj, key, value) {\n      return obj[key] = value;\n    };\n  }\n\n  function wrap(innerFn, outerFn, self, tryLocsList) {\n    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n    var generator = Object.create(protoGenerator.prototype);\n    var context = new Context(tryLocsList || []);\n\n    // The ._invoke method unifies the implementations of the .next,\n    // .throw, and .return methods.\n    generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n    return generator;\n  }\n  exports.wrap = wrap;\n\n  // Try/catch helper to minimize deoptimizations. Returns a completion\n  // record like context.tryEntries[i].completion. This interface could\n  // have been (and was previously) designed to take a closure to be\n  // invoked without arguments, but in all the cases we care about we\n  // already have an existing method we want to call, so there's no need\n  // to create a new function object. We can even get away with assuming\n  // the method takes exactly one argument, since that happens to be true\n  // in every case, so we don't have to touch the arguments object. The\n  // only additional allocation required is the completion record, which\n  // has a stable shape and so hopefully should be cheap to allocate.\n  function tryCatch(fn, obj, arg) {\n    try {\n      return { type: \"normal\", arg: fn.call(obj, arg) };\n    } catch (err) {\n      return { type: \"throw\", arg: err };\n    }\n  }\n\n  var GenStateSuspendedStart = \"suspendedStart\";\n  var GenStateSuspendedYield = \"suspendedYield\";\n  var GenStateExecuting = \"executing\";\n  var GenStateCompleted = \"completed\";\n\n  // Returning this object from the innerFn has the same effect as\n  // breaking out of the dispatch switch statement.\n  var ContinueSentinel = {};\n\n  // Dummy constructor functions that we use as the .constructor and\n  // .constructor.prototype properties for functions that return Generator\n  // objects. For full spec compliance, you may wish to configure your\n  // minifier not to mangle the names of these two functions.\n  function Generator() {}\n  function GeneratorFunction() {}\n  function GeneratorFunctionPrototype() {}\n\n  // This is a polyfill for %IteratorPrototype% for environments that\n  // don't natively support it.\n  var IteratorPrototype = {};\n  IteratorPrototype[iteratorSymbol] = function () {\n    return this;\n  };\n\n  var getProto = Object.getPrototypeOf;\n  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n  if (NativeIteratorPrototype &&\n      NativeIteratorPrototype !== Op &&\n      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n    // This environment has a native %IteratorPrototype%; use it instead\n    // of the polyfill.\n    IteratorPrototype = NativeIteratorPrototype;\n  }\n\n  var Gp = GeneratorFunctionPrototype.prototype =\n    Generator.prototype = Object.create(IteratorPrototype);\n  GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n  GeneratorFunctionPrototype.constructor = GeneratorFunction;\n  GeneratorFunction.displayName = define(\n    GeneratorFunctionPrototype,\n    toStringTagSymbol,\n    \"GeneratorFunction\"\n  );\n\n  // Helper for defining the .next, .throw, and .return methods of the\n  // Iterator interface in terms of a single ._invoke method.\n  function defineIteratorMethods(prototype) {\n    [\"next\", \"throw\", \"return\"].forEach(function(method) {\n      define(prototype, method, function(arg) {\n        return this._invoke(method, arg);\n      });\n    });\n  }\n\n  exports.isGeneratorFunction = function(genFun) {\n    var ctor = typeof genFun === \"function\" && genFun.constructor;\n    return ctor\n      ? ctor === GeneratorFunction ||\n        // For the native GeneratorFunction constructor, the best we can\n        // do is to check its .name property.\n        (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n      : false;\n  };\n\n  exports.mark = function(genFun) {\n    if (Object.setPrototypeOf) {\n      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n    } else {\n      genFun.__proto__ = GeneratorFunctionPrototype;\n      define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n    }\n    genFun.prototype = Object.create(Gp);\n    return genFun;\n  };\n\n  // Within the body of any async function, `await x` is transformed to\n  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n  // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n  // meant to be awaited.\n  exports.awrap = function(arg) {\n    return { __await: arg };\n  };\n\n  function AsyncIterator(generator, PromiseImpl) {\n    function invoke(method, arg, resolve, reject) {\n      var record = tryCatch(generator[method], generator, arg);\n      if (record.type === \"throw\") {\n        reject(record.arg);\n      } else {\n        var result = record.arg;\n        var value = result.value;\n        if (value &&\n            typeof value === \"object\" &&\n            hasOwn.call(value, \"__await\")) {\n          return PromiseImpl.resolve(value.__await).then(function(value) {\n            invoke(\"next\", value, resolve, reject);\n          }, function(err) {\n            invoke(\"throw\", err, resolve, reject);\n          });\n        }\n\n        return PromiseImpl.resolve(value).then(function(unwrapped) {\n          // When a yielded Promise is resolved, its final value becomes\n          // the .value of the Promise<{value,done}> result for the\n          // current iteration.\n          result.value = unwrapped;\n          resolve(result);\n        }, function(error) {\n          // If a rejected Promise was yielded, throw the rejection back\n          // into the async generator function so it can be handled there.\n          return invoke(\"throw\", error, resolve, reject);\n        });\n      }\n    }\n\n    var previousPromise;\n\n    function enqueue(method, arg) {\n      function callInvokeWithMethodAndArg() {\n        return new PromiseImpl(function(resolve, reject) {\n          invoke(method, arg, resolve, reject);\n        });\n      }\n\n      return previousPromise =\n        // If enqueue has been called before, then we want to wait until\n        // all previous Promises have been resolved before calling invoke,\n        // so that results are always delivered in the correct order. If\n        // enqueue has not been called before, then it is important to\n        // call invoke immediately, without waiting on a callback to fire,\n        // so that the async generator function has the opportunity to do\n        // any necessary setup in a predictable way. This predictability\n        // is why the Promise constructor synchronously invokes its\n        // executor callback, and why async functions synchronously\n        // execute code before the first await. Since we implement simple\n        // async functions in terms of async generators, it is especially\n        // important to get this right, even though it requires care.\n        previousPromise ? previousPromise.then(\n          callInvokeWithMethodAndArg,\n          // Avoid propagating failures to Promises returned by later\n          // invocations of the iterator.\n          callInvokeWithMethodAndArg\n        ) : callInvokeWithMethodAndArg();\n    }\n\n    // Define the unified helper method that is used to implement .next,\n    // .throw, and .return (see defineIteratorMethods).\n    this._invoke = enqueue;\n  }\n\n  defineIteratorMethods(AsyncIterator.prototype);\n  AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n    return this;\n  };\n  exports.AsyncIterator = AsyncIterator;\n\n  // Note that simple async functions are implemented on top of\n  // AsyncIterator objects; they just return a Promise for the value of\n  // the final result produced by the iterator.\n  exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n    if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n    var iter = new AsyncIterator(\n      wrap(innerFn, outerFn, self, tryLocsList),\n      PromiseImpl\n    );\n\n    return exports.isGeneratorFunction(outerFn)\n      ? iter // If outerFn is a generator, return the full iterator.\n      : iter.next().then(function(result) {\n          return result.done ? result.value : iter.next();\n        });\n  };\n\n  function makeInvokeMethod(innerFn, self, context) {\n    var state = GenStateSuspendedStart;\n\n    return function invoke(method, arg) {\n      if (state === GenStateExecuting) {\n        throw new Error(\"Generator is already running\");\n      }\n\n      if (state === GenStateCompleted) {\n        if (method === \"throw\") {\n          throw arg;\n        }\n\n        // Be forgiving, per 25.3.3.3.3 of the spec:\n        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n        return doneResult();\n      }\n\n      context.method = method;\n      context.arg = arg;\n\n      while (true) {\n        var delegate = context.delegate;\n        if (delegate) {\n          var delegateResult = maybeInvokeDelegate(delegate, context);\n          if (delegateResult) {\n            if (delegateResult === ContinueSentinel) continue;\n            return delegateResult;\n          }\n        }\n\n        if (context.method === \"next\") {\n          // Setting context._sent for legacy support of Babel's\n          // function.sent implementation.\n          context.sent = context._sent = context.arg;\n\n        } else if (context.method === \"throw\") {\n          if (state === GenStateSuspendedStart) {\n            state = GenStateCompleted;\n            throw context.arg;\n          }\n\n          context.dispatchException(context.arg);\n\n        } else if (context.method === \"return\") {\n          context.abrupt(\"return\", context.arg);\n        }\n\n        state = GenStateExecuting;\n\n        var record = tryCatch(innerFn, self, context);\n        if (record.type === \"normal\") {\n          // If an exception is thrown from innerFn, we leave state ===\n          // GenStateExecuting and loop back for another invocation.\n          state = context.done\n            ? GenStateCompleted\n            : GenStateSuspendedYield;\n\n          if (record.arg === ContinueSentinel) {\n            continue;\n          }\n\n          return {\n            value: record.arg,\n            done: context.done\n          };\n\n        } else if (record.type === \"throw\") {\n          state = GenStateCompleted;\n          // Dispatch the exception by looping back around to the\n          // context.dispatchException(context.arg) call above.\n          context.method = \"throw\";\n          context.arg = record.arg;\n        }\n      }\n    };\n  }\n\n  // Call delegate.iterator[context.method](context.arg) and handle the\n  // result, either by returning a { value, done } result from the\n  // delegate iterator, or by modifying context.method and context.arg,\n  // setting context.delegate to null, and returning the ContinueSentinel.\n  function maybeInvokeDelegate(delegate, context) {\n    var method = delegate.iterator[context.method];\n    if (method === undefined) {\n      // A .throw or .return when the delegate iterator has no .throw\n      // method always terminates the yield* loop.\n      context.delegate = null;\n\n      if (context.method === \"throw\") {\n        // Note: [\"return\"] must be used for ES3 parsing compatibility.\n        if (delegate.iterator[\"return\"]) {\n          // If the delegate iterator has a return method, give it a\n          // chance to clean up.\n          context.method = \"return\";\n          context.arg = undefined;\n          maybeInvokeDelegate(delegate, context);\n\n          if (context.method === \"throw\") {\n            // If maybeInvokeDelegate(context) changed context.method from\n            // \"return\" to \"throw\", let that override the TypeError below.\n            return ContinueSentinel;\n          }\n        }\n\n        context.method = \"throw\";\n        context.arg = new TypeError(\n          \"The iterator does not provide a 'throw' method\");\n      }\n\n      return ContinueSentinel;\n    }\n\n    var record = tryCatch(method, delegate.iterator, context.arg);\n\n    if (record.type === \"throw\") {\n      context.method = \"throw\";\n      context.arg = record.arg;\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    var info = record.arg;\n\n    if (! info) {\n      context.method = \"throw\";\n      context.arg = new TypeError(\"iterator result is not an object\");\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    if (info.done) {\n      // Assign the result of the finished delegate to the temporary\n      // variable specified by delegate.resultName (see delegateYield).\n      context[delegate.resultName] = info.value;\n\n      // Resume execution at the desired location (see delegateYield).\n      context.next = delegate.nextLoc;\n\n      // If context.method was \"throw\" but the delegate handled the\n      // exception, let the outer generator proceed normally. If\n      // context.method was \"next\", forget context.arg since it has been\n      // \"consumed\" by the delegate iterator. If context.method was\n      // \"return\", allow the original .return call to continue in the\n      // outer generator.\n      if (context.method !== \"return\") {\n        context.method = \"next\";\n        context.arg = undefined;\n      }\n\n    } else {\n      // Re-yield the result returned by the delegate method.\n      return info;\n    }\n\n    // The delegate iterator is finished, so forget it and continue with\n    // the outer generator.\n    context.delegate = null;\n    return ContinueSentinel;\n  }\n\n  // Define Generator.prototype.{next,throw,return} in terms of the\n  // unified ._invoke helper method.\n  defineIteratorMethods(Gp);\n\n  define(Gp, toStringTagSymbol, \"Generator\");\n\n  // A Generator should always return itself as the iterator object when the\n  // @@iterator function is called on it. Some browsers' implementations of the\n  // iterator prototype chain incorrectly implement this, causing the Generator\n  // object to not be returned from this call. This ensures that doesn't happen.\n  // See https://github.com/facebook/regenerator/issues/274 for more details.\n  Gp[iteratorSymbol] = function() {\n    return this;\n  };\n\n  Gp.toString = function() {\n    return \"[object Generator]\";\n  };\n\n  function pushTryEntry(locs) {\n    var entry = { tryLoc: locs[0] };\n\n    if (1 in locs) {\n      entry.catchLoc = locs[1];\n    }\n\n    if (2 in locs) {\n      entry.finallyLoc = locs[2];\n      entry.afterLoc = locs[3];\n    }\n\n    this.tryEntries.push(entry);\n  }\n\n  function resetTryEntry(entry) {\n    var record = entry.completion || {};\n    record.type = \"normal\";\n    delete record.arg;\n    entry.completion = record;\n  }\n\n  function Context(tryLocsList) {\n    // The root entry object (effectively a try statement without a catch\n    // or a finally block) gives us a place to store values thrown from\n    // locations where there is no enclosing try statement.\n    this.tryEntries = [{ tryLoc: \"root\" }];\n    tryLocsList.forEach(pushTryEntry, this);\n    this.reset(true);\n  }\n\n  exports.keys = function(object) {\n    var keys = [];\n    for (var key in object) {\n      keys.push(key);\n    }\n    keys.reverse();\n\n    // Rather than returning an object with a next method, we keep\n    // things simple and return the next function itself.\n    return function next() {\n      while (keys.length) {\n        var key = keys.pop();\n        if (key in object) {\n          next.value = key;\n          next.done = false;\n          return next;\n        }\n      }\n\n      // To avoid creating an additional object, we just hang the .value\n      // and .done properties off the next function object itself. This\n      // also ensures that the minifier will not anonymize the function.\n      next.done = true;\n      return next;\n    };\n  };\n\n  function values(iterable) {\n    if (iterable) {\n      var iteratorMethod = iterable[iteratorSymbol];\n      if (iteratorMethod) {\n        return iteratorMethod.call(iterable);\n      }\n\n      if (typeof iterable.next === \"function\") {\n        return iterable;\n      }\n\n      if (!isNaN(iterable.length)) {\n        var i = -1, next = function next() {\n          while (++i < iterable.length) {\n            if (hasOwn.call(iterable, i)) {\n              next.value = iterable[i];\n              next.done = false;\n              return next;\n            }\n          }\n\n          next.value = undefined;\n          next.done = true;\n\n          return next;\n        };\n\n        return next.next = next;\n      }\n    }\n\n    // Return an iterator with no values.\n    return { next: doneResult };\n  }\n  exports.values = values;\n\n  function doneResult() {\n    return { value: undefined, done: true };\n  }\n\n  Context.prototype = {\n    constructor: Context,\n\n    reset: function(skipTempReset) {\n      this.prev = 0;\n      this.next = 0;\n      // Resetting context._sent for legacy support of Babel's\n      // function.sent implementation.\n      this.sent = this._sent = undefined;\n      this.done = false;\n      this.delegate = null;\n\n      this.method = \"next\";\n      this.arg = undefined;\n\n      this.tryEntries.forEach(resetTryEntry);\n\n      if (!skipTempReset) {\n        for (var name in this) {\n          // Not sure about the optimal order of these conditions:\n          if (name.charAt(0) === \"t\" &&\n              hasOwn.call(this, name) &&\n              !isNaN(+name.slice(1))) {\n            this[name] = undefined;\n          }\n        }\n      }\n    },\n\n    stop: function() {\n      this.done = true;\n\n      var rootEntry = this.tryEntries[0];\n      var rootRecord = rootEntry.completion;\n      if (rootRecord.type === \"throw\") {\n        throw rootRecord.arg;\n      }\n\n      return this.rval;\n    },\n\n    dispatchException: function(exception) {\n      if (this.done) {\n        throw exception;\n      }\n\n      var context = this;\n      function handle(loc, caught) {\n        record.type = \"throw\";\n        record.arg = exception;\n        context.next = loc;\n\n        if (caught) {\n          // If the dispatched exception was caught by a catch block,\n          // then let that catch block handle the exception normally.\n          context.method = \"next\";\n          context.arg = undefined;\n        }\n\n        return !! caught;\n      }\n\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        var record = entry.completion;\n\n        if (entry.tryLoc === \"root\") {\n          // Exception thrown outside of any try block that could handle\n          // it, so set the completion value of the entire function to\n          // throw the exception.\n          return handle(\"end\");\n        }\n\n        if (entry.tryLoc <= this.prev) {\n          var hasCatch = hasOwn.call(entry, \"catchLoc\");\n          var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n          if (hasCatch && hasFinally) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            } else if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else if (hasCatch) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            }\n\n          } else if (hasFinally) {\n            if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else {\n            throw new Error(\"try statement without catch or finally\");\n          }\n        }\n      }\n    },\n\n    abrupt: function(type, arg) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc <= this.prev &&\n            hasOwn.call(entry, \"finallyLoc\") &&\n            this.prev < entry.finallyLoc) {\n          var finallyEntry = entry;\n          break;\n        }\n      }\n\n      if (finallyEntry &&\n          (type === \"break\" ||\n           type === \"continue\") &&\n          finallyEntry.tryLoc <= arg &&\n          arg <= finallyEntry.finallyLoc) {\n        // Ignore the finally entry if control is not jumping to a\n        // location outside the try/catch block.\n        finallyEntry = null;\n      }\n\n      var record = finallyEntry ? finallyEntry.completion : {};\n      record.type = type;\n      record.arg = arg;\n\n      if (finallyEntry) {\n        this.method = \"next\";\n        this.next = finallyEntry.finallyLoc;\n        return ContinueSentinel;\n      }\n\n      return this.complete(record);\n    },\n\n    complete: function(record, afterLoc) {\n      if (record.type === \"throw\") {\n        throw record.arg;\n      }\n\n      if (record.type === \"break\" ||\n          record.type === \"continue\") {\n        this.next = record.arg;\n      } else if (record.type === \"return\") {\n        this.rval = this.arg = record.arg;\n        this.method = \"return\";\n        this.next = \"end\";\n      } else if (record.type === \"normal\" && afterLoc) {\n        this.next = afterLoc;\n      }\n\n      return ContinueSentinel;\n    },\n\n    finish: function(finallyLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.finallyLoc === finallyLoc) {\n          this.complete(entry.completion, entry.afterLoc);\n          resetTryEntry(entry);\n          return ContinueSentinel;\n        }\n      }\n    },\n\n    \"catch\": function(tryLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc === tryLoc) {\n          var record = entry.completion;\n          if (record.type === \"throw\") {\n            var thrown = record.arg;\n            resetTryEntry(entry);\n          }\n          return thrown;\n        }\n      }\n\n      // The context.catch method must only be called with a location\n      // argument that corresponds to a known catch block.\n      throw new Error(\"illegal catch attempt\");\n    },\n\n    delegateYield: function(iterable, resultName, nextLoc) {\n      this.delegate = {\n        iterator: values(iterable),\n        resultName: resultName,\n        nextLoc: nextLoc\n      };\n\n      if (this.method === \"next\") {\n        // Deliberately forget the last sent value so that we don't\n        // accidentally pass it on to the delegate.\n        this.arg = undefined;\n      }\n\n      return ContinueSentinel;\n    }\n  };\n\n  // Regardless of whether this script is executing as a CommonJS module\n  // or not, return the runtime object so that we can declare the variable\n  // regeneratorRuntime in the outer scope, which allows this module to be\n  // injected easily by `bin/regenerator --include-runtime script.js`.\n  return exports;\n\n}(\n  // If this script is executing as a CommonJS module, use module.exports\n  // as the regeneratorRuntime namespace. Otherwise create a new empty\n  // object. Either way, the resulting object will be used to initialize\n  // the regeneratorRuntime variable at the top of this file.\n  typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n  regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n  // This module should not be running in strict mode, so the above\n  // assignment should always work unless something is misconfigured. Just\n  // in case runtime.js accidentally runs in strict mode, we can escape\n  // strict mode using a global Function call. This could conceivably fail\n  // if a Content Security Policy forbids using Function, but in that case\n  // the proper solution is to fix the accidental strict mode problem. If\n  // you've misconfigured your bundler to force strict mode and applied a\n  // CSP to forbid Function, and you're not willing to fix either of those\n  // problems, please detail your unique predicament in a GitHub issue.\n  Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <http://feross.org>\n * @license  MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n *   === true    Use Uint8Array implementation (fastest)\n *   === false   Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n *     incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n  ? global.TYPED_ARRAY_SUPPORT\n  : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n  try {\n    var arr = new Uint8Array(1)\n    arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n    return arr.foo() === 42 && // typed array instances can be augmented\n        typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n        arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n  } catch (e) {\n    return false\n  }\n}\n\nfunction kMaxLength () {\n  return Buffer.TYPED_ARRAY_SUPPORT\n    ? 0x7fffffff\n    : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n  if (kMaxLength() < length) {\n    throw new RangeError('Invalid typed array length')\n  }\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = new Uint8Array(length)\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    if (that === null) {\n      that = new Buffer(length)\n    }\n    that.length = length\n  }\n\n  return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n  if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n    return new Buffer(arg, encodingOrOffset, length)\n  }\n\n  // Common case.\n  if (typeof arg === 'number') {\n    if (typeof encodingOrOffset === 'string') {\n      throw new Error(\n        'If encoding is specified then the first argument must be a string'\n      )\n    }\n    return allocUnsafe(this, arg)\n  }\n  return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n  arr.__proto__ = Buffer.prototype\n  return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n  if (typeof value === 'number') {\n    throw new TypeError('\"value\" argument must not be a number')\n  }\n\n  if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n    return fromArrayBuffer(that, value, encodingOrOffset, length)\n  }\n\n  if (typeof value === 'string') {\n    return fromString(that, value, encodingOrOffset)\n  }\n\n  return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n  return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n  Buffer.prototype.__proto__ = Uint8Array.prototype\n  Buffer.__proto__ = Uint8Array\n  if (typeof Symbol !== 'undefined' && Symbol.species &&\n      Buffer[Symbol.species] === Buffer) {\n    // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n    Object.defineProperty(Buffer, Symbol.species, {\n      value: null,\n      configurable: true\n    })\n  }\n}\n\nfunction assertSize (size) {\n  if (typeof size !== 'number') {\n    throw new TypeError('\"size\" argument must be a number')\n  } else if (size < 0) {\n    throw new RangeError('\"size\" argument must not be negative')\n  }\n}\n\nfunction alloc (that, size, fill, encoding) {\n  assertSize(size)\n  if (size <= 0) {\n    return createBuffer(that, size)\n  }\n  if (fill !== undefined) {\n    // Only pay attention to encoding if it's a string. This\n    // prevents accidentally sending in a number that would\n    // be interpretted as a start offset.\n    return typeof encoding === 'string'\n      ? createBuffer(that, size).fill(fill, encoding)\n      : createBuffer(that, size).fill(fill)\n  }\n  return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n  return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n  assertSize(size)\n  that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) {\n    for (var i = 0; i < size; ++i) {\n      that[i] = 0\n    }\n  }\n  return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n  return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n  return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n  if (typeof encoding !== 'string' || encoding === '') {\n    encoding = 'utf8'\n  }\n\n  if (!Buffer.isEncoding(encoding)) {\n    throw new TypeError('\"encoding\" must be a valid string encoding')\n  }\n\n  var length = byteLength(string, encoding) | 0\n  that = createBuffer(that, length)\n\n  var actual = that.write(string, encoding)\n\n  if (actual !== length) {\n    // Writing a hex string, for example, that contains invalid characters will\n    // cause everything after the first invalid character to be ignored. (e.g.\n    // 'abxxcd' will be treated as 'ab')\n    that = that.slice(0, actual)\n  }\n\n  return that\n}\n\nfunction fromArrayLike (that, array) {\n  var length = array.length < 0 ? 0 : checked(array.length) | 0\n  that = createBuffer(that, length)\n  for (var i = 0; i < length; i += 1) {\n    that[i] = array[i] & 255\n  }\n  return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n  array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n  if (byteOffset < 0 || array.byteLength < byteOffset) {\n    throw new RangeError('\\'offset\\' is out of bounds')\n  }\n\n  if (array.byteLength < byteOffset + (length || 0)) {\n    throw new RangeError('\\'length\\' is out of bounds')\n  }\n\n  if (byteOffset === undefined && length === undefined) {\n    array = new Uint8Array(array)\n  } else if (length === undefined) {\n    array = new Uint8Array(array, byteOffset)\n  } else {\n    array = new Uint8Array(array, byteOffset, length)\n  }\n\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    // Return an augmented `Uint8Array` instance, for best performance\n    that = array\n    that.__proto__ = Buffer.prototype\n  } else {\n    // Fallback: Return an object instance of the Buffer class\n    that = fromArrayLike(that, array)\n  }\n  return that\n}\n\nfunction fromObject (that, obj) {\n  if (Buffer.isBuffer(obj)) {\n    var len = checked(obj.length) | 0\n    that = createBuffer(that, len)\n\n    if (that.length === 0) {\n      return that\n    }\n\n    obj.copy(that, 0, 0, len)\n    return that\n  }\n\n  if (obj) {\n    if ((typeof ArrayBuffer !== 'undefined' &&\n        obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n      if (typeof obj.length !== 'number' || isnan(obj.length)) {\n        return createBuffer(that, 0)\n      }\n      return fromArrayLike(that, obj)\n    }\n\n    if (obj.type === 'Buffer' && isArray(obj.data)) {\n      return fromArrayLike(that, obj.data)\n    }\n  }\n\n  throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n  // Note: cannot use `length < kMaxLength()` here because that fails when\n  // length is NaN (which is otherwise coerced to zero.)\n  if (length >= kMaxLength()) {\n    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n                         'size: 0x' + kMaxLength().toString(16) + ' bytes')\n  }\n  return length | 0\n}\n\nfunction SlowBuffer (length) {\n  if (+length != length) { // eslint-disable-line eqeqeq\n    length = 0\n  }\n  return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n  return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n    throw new TypeError('Arguments must be Buffers')\n  }\n\n  if (a === b) return 0\n\n  var x = a.length\n  var y = b.length\n\n  for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n    if (a[i] !== b[i]) {\n      x = a[i]\n      y = b[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n  switch (String(encoding).toLowerCase()) {\n    case 'hex':\n    case 'utf8':\n    case 'utf-8':\n    case 'ascii':\n    case 'latin1':\n    case 'binary':\n    case 'base64':\n    case 'ucs2':\n    case 'ucs-2':\n    case 'utf16le':\n    case 'utf-16le':\n      return true\n    default:\n      return false\n  }\n}\n\nBuffer.concat = function concat (list, length) {\n  if (!isArray(list)) {\n    throw new TypeError('\"list\" argument must be an Array of Buffers')\n  }\n\n  if (list.length === 0) {\n    return Buffer.alloc(0)\n  }\n\n  var i\n  if (length === undefined) {\n    length = 0\n    for (i = 0; i < list.length; ++i) {\n      length += list[i].length\n    }\n  }\n\n  var buffer = Buffer.allocUnsafe(length)\n  var pos = 0\n  for (i = 0; i < list.length; ++i) {\n    var buf = list[i]\n    if (!Buffer.isBuffer(buf)) {\n      throw new TypeError('\"list\" argument must be an Array of Buffers')\n    }\n    buf.copy(buffer, pos)\n    pos += buf.length\n  }\n  return buffer\n}\n\nfunction byteLength (string, encoding) {\n  if (Buffer.isBuffer(string)) {\n    return string.length\n  }\n  if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n      (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n    return string.byteLength\n  }\n  if (typeof string !== 'string') {\n    string = '' + string\n  }\n\n  var len = string.length\n  if (len === 0) return 0\n\n  // Use a for loop to avoid recursion\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'ascii':\n      case 'latin1':\n      case 'binary':\n        return len\n      case 'utf8':\n      case 'utf-8':\n      case undefined:\n        return utf8ToBytes(string).length\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return len * 2\n      case 'hex':\n        return len >>> 1\n      case 'base64':\n        return base64ToBytes(string).length\n      default:\n        if (loweredCase) return utf8ToBytes(string).length // assume utf8\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n  var loweredCase = false\n\n  // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n  // property of a typed array.\n\n  // This behaves neither like String nor Uint8Array in that we set start/end\n  // to their upper/lower bounds if the value passed is out of range.\n  // undefined is handled specially as per ECMA-262 6th Edition,\n  // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n  if (start === undefined || start < 0) {\n    start = 0\n  }\n  // Return early if start > this.length. Done here to prevent potential uint32\n  // coercion fail below.\n  if (start > this.length) {\n    return ''\n  }\n\n  if (end === undefined || end > this.length) {\n    end = this.length\n  }\n\n  if (end <= 0) {\n    return ''\n  }\n\n  // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n  end >>>= 0\n  start >>>= 0\n\n  if (end <= start) {\n    return ''\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  while (true) {\n    switch (encoding) {\n      case 'hex':\n        return hexSlice(this, start, end)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Slice(this, start, end)\n\n      case 'ascii':\n        return asciiSlice(this, start, end)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Slice(this, start, end)\n\n      case 'base64':\n        return base64Slice(this, start, end)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return utf16leSlice(this, start, end)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = (encoding + '').toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n  var i = b[n]\n  b[n] = b[m]\n  b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n  var len = this.length\n  if (len % 2 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 16-bits')\n  }\n  for (var i = 0; i < len; i += 2) {\n    swap(this, i, i + 1)\n  }\n  return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n  var len = this.length\n  if (len % 4 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 32-bits')\n  }\n  for (var i = 0; i < len; i += 4) {\n    swap(this, i, i + 3)\n    swap(this, i + 1, i + 2)\n  }\n  return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n  var len = this.length\n  if (len % 8 !== 0) {\n    throw new RangeError('Buffer size must be a multiple of 64-bits')\n  }\n  for (var i = 0; i < len; i += 8) {\n    swap(this, i, i + 7)\n    swap(this, i + 1, i + 6)\n    swap(this, i + 2, i + 5)\n    swap(this, i + 3, i + 4)\n  }\n  return this\n}\n\nBuffer.prototype.toString = function toString () {\n  var length = this.length | 0\n  if (length === 0) return ''\n  if (arguments.length === 0) return utf8Slice(this, 0, length)\n  return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n  if (this === b) return true\n  return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n  var str = ''\n  var max = exports.INSPECT_MAX_BYTES\n  if (this.length > 0) {\n    str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n    if (this.length > max) str += ' ... '\n  }\n  return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n  if (!Buffer.isBuffer(target)) {\n    throw new TypeError('Argument must be a Buffer')\n  }\n\n  if (start === undefined) {\n    start = 0\n  }\n  if (end === undefined) {\n    end = target ? target.length : 0\n  }\n  if (thisStart === undefined) {\n    thisStart = 0\n  }\n  if (thisEnd === undefined) {\n    thisEnd = this.length\n  }\n\n  if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n    throw new RangeError('out of range index')\n  }\n\n  if (thisStart >= thisEnd && start >= end) {\n    return 0\n  }\n  if (thisStart >= thisEnd) {\n    return -1\n  }\n  if (start >= end) {\n    return 1\n  }\n\n  start >>>= 0\n  end >>>= 0\n  thisStart >>>= 0\n  thisEnd >>>= 0\n\n  if (this === target) return 0\n\n  var x = thisEnd - thisStart\n  var y = end - start\n  var len = Math.min(x, y)\n\n  var thisCopy = this.slice(thisStart, thisEnd)\n  var targetCopy = target.slice(start, end)\n\n  for (var i = 0; i < len; ++i) {\n    if (thisCopy[i] !== targetCopy[i]) {\n      x = thisCopy[i]\n      y = targetCopy[i]\n      break\n    }\n  }\n\n  if (x < y) return -1\n  if (y < x) return 1\n  return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n  // Empty buffer means no match\n  if (buffer.length === 0) return -1\n\n  // Normalize byteOffset\n  if (typeof byteOffset === 'string') {\n    encoding = byteOffset\n    byteOffset = 0\n  } else if (byteOffset > 0x7fffffff) {\n    byteOffset = 0x7fffffff\n  } else if (byteOffset < -0x80000000) {\n    byteOffset = -0x80000000\n  }\n  byteOffset = +byteOffset  // Coerce to Number.\n  if (isNaN(byteOffset)) {\n    // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n    byteOffset = dir ? 0 : (buffer.length - 1)\n  }\n\n  // Normalize byteOffset: negative offsets start from the end of the buffer\n  if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n  if (byteOffset >= buffer.length) {\n    if (dir) return -1\n    else byteOffset = buffer.length - 1\n  } else if (byteOffset < 0) {\n    if (dir) byteOffset = 0\n    else return -1\n  }\n\n  // Normalize val\n  if (typeof val === 'string') {\n    val = Buffer.from(val, encoding)\n  }\n\n  // Finally, search either indexOf (if dir is true) or lastIndexOf\n  if (Buffer.isBuffer(val)) {\n    // Special case: looking for empty string/buffer always fails\n    if (val.length === 0) {\n      return -1\n    }\n    return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n  } else if (typeof val === 'number') {\n    val = val & 0xFF // Search for a byte value [0-255]\n    if (Buffer.TYPED_ARRAY_SUPPORT &&\n        typeof Uint8Array.prototype.indexOf === 'function') {\n      if (dir) {\n        return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n      } else {\n        return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n      }\n    }\n    return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n  }\n\n  throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n  var indexSize = 1\n  var arrLength = arr.length\n  var valLength = val.length\n\n  if (encoding !== undefined) {\n    encoding = String(encoding).toLowerCase()\n    if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n        encoding === 'utf16le' || encoding === 'utf-16le') {\n      if (arr.length < 2 || val.length < 2) {\n        return -1\n      }\n      indexSize = 2\n      arrLength /= 2\n      valLength /= 2\n      byteOffset /= 2\n    }\n  }\n\n  function read (buf, i) {\n    if (indexSize === 1) {\n      return buf[i]\n    } else {\n      return buf.readUInt16BE(i * indexSize)\n    }\n  }\n\n  var i\n  if (dir) {\n    var foundIndex = -1\n    for (i = byteOffset; i < arrLength; i++) {\n      if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n        if (foundIndex === -1) foundIndex = i\n        if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n      } else {\n        if (foundIndex !== -1) i -= i - foundIndex\n        foundIndex = -1\n      }\n    }\n  } else {\n    if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n    for (i = byteOffset; i >= 0; i--) {\n      var found = true\n      for (var j = 0; j < valLength; j++) {\n        if (read(arr, i + j) !== read(val, j)) {\n          found = false\n          break\n        }\n      }\n      if (found) return i\n    }\n  }\n\n  return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n  return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n  return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n  offset = Number(offset) || 0\n  var remaining = buf.length - offset\n  if (!length) {\n    length = remaining\n  } else {\n    length = Number(length)\n    if (length > remaining) {\n      length = remaining\n    }\n  }\n\n  // must be an even number of digits\n  var strLen = string.length\n  if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n  if (length > strLen / 2) {\n    length = strLen / 2\n  }\n  for (var i = 0; i < length; ++i) {\n    var parsed = parseInt(string.substr(i * 2, 2), 16)\n    if (isNaN(parsed)) return i\n    buf[offset + i] = parsed\n  }\n  return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n  return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n  return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n  return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n  // Buffer#write(string)\n  if (offset === undefined) {\n    encoding = 'utf8'\n    length = this.length\n    offset = 0\n  // Buffer#write(string, encoding)\n  } else if (length === undefined && typeof offset === 'string') {\n    encoding = offset\n    length = this.length\n    offset = 0\n  // Buffer#write(string, offset[, length][, encoding])\n  } else if (isFinite(offset)) {\n    offset = offset | 0\n    if (isFinite(length)) {\n      length = length | 0\n      if (encoding === undefined) encoding = 'utf8'\n    } else {\n      encoding = length\n      length = undefined\n    }\n  // legacy write(string, encoding, offset, length) - remove in v0.13\n  } else {\n    throw new Error(\n      'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n    )\n  }\n\n  var remaining = this.length - offset\n  if (length === undefined || length > remaining) length = remaining\n\n  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n    throw new RangeError('Attempt to write outside buffer bounds')\n  }\n\n  if (!encoding) encoding = 'utf8'\n\n  var loweredCase = false\n  for (;;) {\n    switch (encoding) {\n      case 'hex':\n        return hexWrite(this, string, offset, length)\n\n      case 'utf8':\n      case 'utf-8':\n        return utf8Write(this, string, offset, length)\n\n      case 'ascii':\n        return asciiWrite(this, string, offset, length)\n\n      case 'latin1':\n      case 'binary':\n        return latin1Write(this, string, offset, length)\n\n      case 'base64':\n        // Warning: maxLength not taken into account in base64Write\n        return base64Write(this, string, offset, length)\n\n      case 'ucs2':\n      case 'ucs-2':\n      case 'utf16le':\n      case 'utf-16le':\n        return ucs2Write(this, string, offset, length)\n\n      default:\n        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n        encoding = ('' + encoding).toLowerCase()\n        loweredCase = true\n    }\n  }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n  return {\n    type: 'Buffer',\n    data: Array.prototype.slice.call(this._arr || this, 0)\n  }\n}\n\nfunction base64Slice (buf, start, end) {\n  if (start === 0 && end === buf.length) {\n    return base64.fromByteArray(buf)\n  } else {\n    return base64.fromByteArray(buf.slice(start, end))\n  }\n}\n\nfunction utf8Slice (buf, start, end) {\n  end = Math.min(buf.length, end)\n  var res = []\n\n  var i = start\n  while (i < end) {\n    var firstByte = buf[i]\n    var codePoint = null\n    var bytesPerSequence = (firstByte > 0xEF) ? 4\n      : (firstByte > 0xDF) ? 3\n      : (firstByte > 0xBF) ? 2\n      : 1\n\n    if (i + bytesPerSequence <= end) {\n      var secondByte, thirdByte, fourthByte, tempCodePoint\n\n      switch (bytesPerSequence) {\n        case 1:\n          if (firstByte < 0x80) {\n            codePoint = firstByte\n          }\n          break\n        case 2:\n          secondByte = buf[i + 1]\n          if ((secondByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n            if (tempCodePoint > 0x7F) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 3:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n              codePoint = tempCodePoint\n            }\n          }\n          break\n        case 4:\n          secondByte = buf[i + 1]\n          thirdByte = buf[i + 2]\n          fourthByte = buf[i + 3]\n          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n              codePoint = tempCodePoint\n            }\n          }\n      }\n    }\n\n    if (codePoint === null) {\n      // we did not generate a valid codePoint so insert a\n      // replacement char (U+FFFD) and advance only 1 byte\n      codePoint = 0xFFFD\n      bytesPerSequence = 1\n    } else if (codePoint > 0xFFFF) {\n      // encode to utf16 (surrogate pair dance)\n      codePoint -= 0x10000\n      res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n      codePoint = 0xDC00 | codePoint & 0x3FF\n    }\n\n    res.push(codePoint)\n    i += bytesPerSequence\n  }\n\n  return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n  var len = codePoints.length\n  if (len <= MAX_ARGUMENTS_LENGTH) {\n    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n  }\n\n  // Decode in chunks to avoid \"call stack size exceeded\".\n  var res = ''\n  var i = 0\n  while (i < len) {\n    res += String.fromCharCode.apply(\n      String,\n      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n    )\n  }\n  return res\n}\n\nfunction asciiSlice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i] & 0x7F)\n  }\n  return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n  var ret = ''\n  end = Math.min(buf.length, end)\n\n  for (var i = start; i < end; ++i) {\n    ret += String.fromCharCode(buf[i])\n  }\n  return ret\n}\n\nfunction hexSlice (buf, start, end) {\n  var len = buf.length\n\n  if (!start || start < 0) start = 0\n  if (!end || end < 0 || end > len) end = len\n\n  var out = ''\n  for (var i = start; i < end; ++i) {\n    out += toHex(buf[i])\n  }\n  return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n  var bytes = buf.slice(start, end)\n  var res = ''\n  for (var i = 0; i < bytes.length; i += 2) {\n    res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n  }\n  return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n  var len = this.length\n  start = ~~start\n  end = end === undefined ? len : ~~end\n\n  if (start < 0) {\n    start += len\n    if (start < 0) start = 0\n  } else if (start > len) {\n    start = len\n  }\n\n  if (end < 0) {\n    end += len\n    if (end < 0) end = 0\n  } else if (end > len) {\n    end = len\n  }\n\n  if (end < start) end = start\n\n  var newBuf\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    newBuf = this.subarray(start, end)\n    newBuf.__proto__ = Buffer.prototype\n  } else {\n    var sliceLen = end - start\n    newBuf = new Buffer(sliceLen, undefined)\n    for (var i = 0; i < sliceLen; ++i) {\n      newBuf[i] = this[i + start]\n    }\n  }\n\n  return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    checkOffset(offset, byteLength, this.length)\n  }\n\n  var val = this[offset + --byteLength]\n  var mul = 1\n  while (byteLength > 0 && (mul *= 0x100)) {\n    val += this[offset + --byteLength] * mul\n  }\n\n  return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return ((this[offset]) |\n      (this[offset + 1] << 8) |\n      (this[offset + 2] << 16)) +\n      (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] * 0x1000000) +\n    ((this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var val = this[offset]\n  var mul = 1\n  var i = 0\n  while (++i < byteLength && (mul *= 0x100)) {\n    val += this[offset + i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n  var i = byteLength\n  var mul = 1\n  var val = this[offset + --i]\n  while (i > 0 && (mul *= 0x100)) {\n    val += this[offset + --i] * mul\n  }\n  mul *= 0x80\n\n  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n  return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 1, this.length)\n  if (!(this[offset] & 0x80)) return (this[offset])\n  return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset] | (this[offset + 1] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 2, this.length)\n  var val = this[offset + 1] | (this[offset] << 8)\n  return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset]) |\n    (this[offset + 1] << 8) |\n    (this[offset + 2] << 16) |\n    (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n\n  return (this[offset] << 24) |\n    (this[offset + 1] << 16) |\n    (this[offset + 2] << 8) |\n    (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 4, this.length)\n  return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n  if (!noAssert) checkOffset(offset, 8, this.length)\n  return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n  if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n  if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var mul = 1\n  var i = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  byteLength = byteLength | 0\n  if (!noAssert) {\n    var maxBytes = Math.pow(2, 8 * byteLength) - 1\n    checkInt(this, value, offset, byteLength, maxBytes, 0)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    this[offset + i] = (value / mul) & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n    buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n      (littleEndian ? i : 1 - i) * 8\n  }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n  if (value < 0) value = 0xffffffff + value + 1\n  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n    buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n  }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset + 3] = (value >>> 24)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 1] = (value >>> 8)\n    this[offset] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = 0\n  var mul = 1\n  var sub = 0\n  this[offset] = value & 0xFF\n  while (++i < byteLength && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) {\n    var limit = Math.pow(2, 8 * byteLength - 1)\n\n    checkInt(this, value, offset, byteLength, limit - 1, -limit)\n  }\n\n  var i = byteLength - 1\n  var mul = 1\n  var sub = 0\n  this[offset + i] = value & 0xFF\n  while (--i >= 0 && (mul *= 0x100)) {\n    if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n      sub = 1\n    }\n    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n  }\n\n  return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n  if (value < 0) value = 0xff + value + 1\n  this[offset] = (value & 0xff)\n  return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n  } else {\n    objectWriteUInt16(this, value, offset, true)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 8)\n    this[offset + 1] = (value & 0xff)\n  } else {\n    objectWriteUInt16(this, value, offset, false)\n  }\n  return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value & 0xff)\n    this[offset + 1] = (value >>> 8)\n    this[offset + 2] = (value >>> 16)\n    this[offset + 3] = (value >>> 24)\n  } else {\n    objectWriteUInt32(this, value, offset, true)\n  }\n  return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n  value = +value\n  offset = offset | 0\n  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n  if (value < 0) value = 0xffffffff + value + 1\n  if (Buffer.TYPED_ARRAY_SUPPORT) {\n    this[offset] = (value >>> 24)\n    this[offset + 1] = (value >>> 16)\n    this[offset + 2] = (value >>> 8)\n    this[offset + 3] = (value & 0xff)\n  } else {\n    objectWriteUInt32(this, value, offset, false)\n  }\n  return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n  if (offset + ext > buf.length) throw new RangeError('Index out of range')\n  if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 23, 4)\n  return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n  return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n  if (!noAssert) {\n    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n  }\n  ieee754.write(buf, value, offset, littleEndian, 52, 8)\n  return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n  return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n  if (!start) start = 0\n  if (!end && end !== 0) end = this.length\n  if (targetStart >= target.length) targetStart = target.length\n  if (!targetStart) targetStart = 0\n  if (end > 0 && end < start) end = start\n\n  // Copy 0 bytes; we're done\n  if (end === start) return 0\n  if (target.length === 0 || this.length === 0) return 0\n\n  // Fatal error conditions\n  if (targetStart < 0) {\n    throw new RangeError('targetStart out of bounds')\n  }\n  if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n  if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n  // Are we oob?\n  if (end > this.length) end = this.length\n  if (target.length - targetStart < end - start) {\n    end = target.length - targetStart + start\n  }\n\n  var len = end - start\n  var i\n\n  if (this === target && start < targetStart && targetStart < end) {\n    // descending copy from end\n    for (i = len - 1; i >= 0; --i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n    // ascending copy from start\n    for (i = 0; i < len; ++i) {\n      target[i + targetStart] = this[i + start]\n    }\n  } else {\n    Uint8Array.prototype.set.call(\n      target,\n      this.subarray(start, start + len),\n      targetStart\n    )\n  }\n\n  return len\n}\n\n// Usage:\n//    buffer.fill(number[, offset[, end]])\n//    buffer.fill(buffer[, offset[, end]])\n//    buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n  // Handle string cases:\n  if (typeof val === 'string') {\n    if (typeof start === 'string') {\n      encoding = start\n      start = 0\n      end = this.length\n    } else if (typeof end === 'string') {\n      encoding = end\n      end = this.length\n    }\n    if (val.length === 1) {\n      var code = val.charCodeAt(0)\n      if (code < 256) {\n        val = code\n      }\n    }\n    if (encoding !== undefined && typeof encoding !== 'string') {\n      throw new TypeError('encoding must be a string')\n    }\n    if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n      throw new TypeError('Unknown encoding: ' + encoding)\n    }\n  } else if (typeof val === 'number') {\n    val = val & 255\n  }\n\n  // Invalid ranges are not set to a default, so can range check early.\n  if (start < 0 || this.length < start || this.length < end) {\n    throw new RangeError('Out of range index')\n  }\n\n  if (end <= start) {\n    return this\n  }\n\n  start = start >>> 0\n  end = end === undefined ? this.length : end >>> 0\n\n  if (!val) val = 0\n\n  var i\n  if (typeof val === 'number') {\n    for (i = start; i < end; ++i) {\n      this[i] = val\n    }\n  } else {\n    var bytes = Buffer.isBuffer(val)\n      ? val\n      : utf8ToBytes(new Buffer(val, encoding).toString())\n    var len = bytes.length\n    for (i = 0; i < end - start; ++i) {\n      this[i + start] = bytes[i % len]\n    }\n  }\n\n  return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n  // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n  str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n  // Node converts strings with length < 2 to ''\n  if (str.length < 2) return ''\n  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n  while (str.length % 4 !== 0) {\n    str = str + '='\n  }\n  return str\n}\n\nfunction stringtrim (str) {\n  if (str.trim) return str.trim()\n  return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n  if (n < 16) return '0' + n.toString(16)\n  return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n  units = units || Infinity\n  var codePoint\n  var length = string.length\n  var leadSurrogate = null\n  var bytes = []\n\n  for (var i = 0; i < length; ++i) {\n    codePoint = string.charCodeAt(i)\n\n    // is surrogate component\n    if (codePoint > 0xD7FF && codePoint < 0xE000) {\n      // last char was a lead\n      if (!leadSurrogate) {\n        // no lead yet\n        if (codePoint > 0xDBFF) {\n          // unexpected trail\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        } else if (i + 1 === length) {\n          // unpaired lead\n          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n          continue\n        }\n\n        // valid lead\n        leadSurrogate = codePoint\n\n        continue\n      }\n\n      // 2 leads in a row\n      if (codePoint < 0xDC00) {\n        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n        leadSurrogate = codePoint\n        continue\n      }\n\n      // valid surrogate pair\n      codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n    } else if (leadSurrogate) {\n      // valid bmp char, but last char was a lead\n      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n    }\n\n    leadSurrogate = null\n\n    // encode utf8\n    if (codePoint < 0x80) {\n      if ((units -= 1) < 0) break\n      bytes.push(codePoint)\n    } else if (codePoint < 0x800) {\n      if ((units -= 2) < 0) break\n      bytes.push(\n        codePoint >> 0x6 | 0xC0,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x10000) {\n      if ((units -= 3) < 0) break\n      bytes.push(\n        codePoint >> 0xC | 0xE0,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else if (codePoint < 0x110000) {\n      if ((units -= 4) < 0) break\n      bytes.push(\n        codePoint >> 0x12 | 0xF0,\n        codePoint >> 0xC & 0x3F | 0x80,\n        codePoint >> 0x6 & 0x3F | 0x80,\n        codePoint & 0x3F | 0x80\n      )\n    } else {\n      throw new Error('Invalid code point')\n    }\n  }\n\n  return bytes\n}\n\nfunction asciiToBytes (str) {\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    // Node's code seems to be doing this and not & 0x7F..\n    byteArray.push(str.charCodeAt(i) & 0xFF)\n  }\n  return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n  var c, hi, lo\n  var byteArray = []\n  for (var i = 0; i < str.length; ++i) {\n    if ((units -= 2) < 0) break\n\n    c = str.charCodeAt(i)\n    hi = c >> 8\n    lo = c % 256\n    byteArray.push(lo)\n    byteArray.push(hi)\n  }\n\n  return byteArray\n}\n\nfunction base64ToBytes (str) {\n  return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n  for (var i = 0; i < length; ++i) {\n    if ((i + offset >= dst.length) || (i >= src.length)) break\n    dst[i + offset] = src[i]\n  }\n  return i\n}\n\nfunction isnan (val) {\n  return val !== val // eslint-disable-line no-self-compare\n}\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n  lookup[i] = code[i]\n  revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n  var len = b64.length\n\n  if (len % 4 > 0) {\n    throw new Error('Invalid string. Length must be a multiple of 4')\n  }\n\n  // Trim off extra bytes after placeholder bytes are found\n  // See: https://github.com/beatgammit/base64-js/issues/42\n  var validLen = b64.indexOf('=')\n  if (validLen === -1) validLen = len\n\n  var placeHoldersLen = validLen === len\n    ? 0\n    : 4 - (validLen % 4)\n\n  return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n  var tmp\n  var lens = getLens(b64)\n  var validLen = lens[0]\n  var placeHoldersLen = lens[1]\n\n  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n  var curByte = 0\n\n  // if there are placeholders, only get up to the last complete 4 chars\n  var len = placeHoldersLen > 0\n    ? validLen - 4\n    : validLen\n\n  var i\n  for (i = 0; i < len; i += 4) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 18) |\n      (revLookup[b64.charCodeAt(i + 1)] << 12) |\n      (revLookup[b64.charCodeAt(i + 2)] << 6) |\n      revLookup[b64.charCodeAt(i + 3)]\n    arr[curByte++] = (tmp >> 16) & 0xFF\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 2) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 2) |\n      (revLookup[b64.charCodeAt(i + 1)] >> 4)\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  if (placeHoldersLen === 1) {\n    tmp =\n      (revLookup[b64.charCodeAt(i)] << 10) |\n      (revLookup[b64.charCodeAt(i + 1)] << 4) |\n      (revLookup[b64.charCodeAt(i + 2)] >> 2)\n    arr[curByte++] = (tmp >> 8) & 0xFF\n    arr[curByte++] = tmp & 0xFF\n  }\n\n  return arr\n}\n\nfunction tripletToBase64 (num) {\n  return lookup[num >> 18 & 0x3F] +\n    lookup[num >> 12 & 0x3F] +\n    lookup[num >> 6 & 0x3F] +\n    lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n  var tmp\n  var output = []\n  for (var i = start; i < end; i += 3) {\n    tmp =\n      ((uint8[i] << 16) & 0xFF0000) +\n      ((uint8[i + 1] << 8) & 0xFF00) +\n      (uint8[i + 2] & 0xFF)\n    output.push(tripletToBase64(tmp))\n  }\n  return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n  var tmp\n  var len = uint8.length\n  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n  var parts = []\n  var maxChunkLength = 16383 // must be multiple of 3\n\n  // go through the array every three bytes, we'll deal with trailing stuff later\n  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n    parts.push(encodeChunk(\n      uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n    ))\n  }\n\n  // pad the end with zeros, but make sure to not forget the extra bytes\n  if (extraBytes === 1) {\n    tmp = uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 2] +\n      lookup[(tmp << 4) & 0x3F] +\n      '=='\n    )\n  } else if (extraBytes === 2) {\n    tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n    parts.push(\n      lookup[tmp >> 10] +\n      lookup[(tmp >> 4) & 0x3F] +\n      lookup[(tmp << 2) & 0x3F] +\n      '='\n    )\n  }\n\n  return parts.join('')\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n  return toString.call(arr) == '[object Array]';\n};\n","function _setPrototypeOf(o, p) {\n  module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n\n  return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","/*! jQuery UI - v1.12.1 - 2018-05-20\n* http://jqueryui.com\n* Includes: widget.js, position.js, keycode.js, scroll-parent.js, unique-id.js\n* Copyright jQuery Foundation and other contributors; Licensed MIT */\n\n;(function( factory ) {\n\tif ( typeof define === \"function\" && define.amd ) {\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine( [ \"jquery\" ], factory );\n\t} else if ( typeof module === \"object\" && module.exports ) {\n\t\t// Node/CommonJS\n\t\tmodule.exports = factory(require(\"jquery\"));\n\t} else {\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n}(function( $ ) {\n\n$.ui = $.ui || {};\n\nvar version = $.ui.version = \"1.12.1\";\n\n\n/*!\n * jQuery UI Widget 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Widget\n//>>group: Core\n//>>description: Provides a factory for creating stateful widgets with a common API.\n//>>docs: http://api.jqueryui.com/jQuery.widget/\n//>>demos: http://jqueryui.com/widget/\n\n\n\nvar widgetUuid = 0;\nvar widgetSlice = Array.prototype.slice;\n\n$.cleanData = $.cleanData || ( function( orig ) {\n\treturn function( elems ) {\n\t\tvar events, elem, i;\n\t\tfor ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\ttry {\n\n\t\t\t\t// Only trigger remove when necessary to save time\n\t\t\t\tevents = $._data( elem, \"events\" );\n\t\t\t\tif ( events && events.remove ) {\n\t\t\t\t\t$( elem ).triggerHandler( \"remove\" );\n\t\t\t\t}\n\n\t\t\t// Http://bugs.jquery.com/ticket/8235\n\t\t\t} catch ( e ) {}\n\t\t}\n\t\torig( elems );\n\t};\n} )( $.cleanData );\n\n$.widget = $.widget || function( name, base, prototype ) {\n\tvar existingConstructor, constructor, basePrototype;\n\n\t// ProxiedPrototype allows the provided prototype to remain unmodified\n\t// so that it can be used as a mixin for multiple widgets (#8876)\n\tvar proxiedPrototype = {};\n\n\tvar namespace = name.split( \".\" )[ 0 ];\n\tname = name.split( \".\" )[ 1 ];\n\tvar fullName = namespace + \"-\" + name;\n\n\tif ( !prototype ) {\n\t\tprototype = base;\n\t\tbase = $.Widget;\n\t}\n\n\tif ( $.isArray( prototype ) ) {\n\t\tprototype = $.extend.apply( null, [ {} ].concat( prototype ) );\n\t}\n\n\t// Create selector for plugin\n\t$.expr[ \":\" ][ fullName.toLowerCase() ] = function( elem ) {\n\t\treturn !!$.data( elem, fullName );\n\t};\n\n\t$[ namespace ] = $[ namespace ] || {};\n\texistingConstructor = $[ namespace ][ name ];\n\tconstructor = $[ namespace ][ name ] = function( options, element ) {\n\n\t\t// Allow instantiation without \"new\" keyword\n\t\tif ( !this._createWidget ) {\n\t\t\treturn new constructor( options, element );\n\t\t}\n\n\t\t// Allow instantiation without initializing for simple inheritance\n\t\t// must use \"new\" keyword (the code above always passes args)\n\t\tif ( arguments.length ) {\n\t\t\tthis._createWidget( options, element );\n\t\t}\n\t};\n\n\t// Extend with the existing constructor to carry over any static properties\n\t$.extend( constructor, existingConstructor, {\n\t\tversion: prototype.version,\n\n\t\t// Copy the object used to create the prototype in case we need to\n\t\t// redefine the widget later\n\t\t_proto: $.extend( {}, prototype ),\n\n\t\t// Track widgets that inherit from this widget in case this widget is\n\t\t// redefined after a widget inherits from it\n\t\t_childConstructors: []\n\t} );\n\n\tbasePrototype = new base();\n\n\t// We need to make the options hash a property directly on the new instance\n\t// otherwise we'll modify the options hash on the prototype that we're\n\t// inheriting from\n\tbasePrototype.options = $.widget.extend( {}, basePrototype.options );\n\t$.each( prototype, function( prop, value ) {\n\t\tif ( !$.isFunction( value ) ) {\n\t\t\tproxiedPrototype[ prop ] = value;\n\t\t\treturn;\n\t\t}\n\t\tproxiedPrototype[ prop ] = ( function() {\n\t\t\tfunction _super() {\n\t\t\t\treturn base.prototype[ prop ].apply( this, arguments );\n\t\t\t}\n\n\t\t\tfunction _superApply( args ) {\n\t\t\t\treturn base.prototype[ prop ].apply( this, args );\n\t\t\t}\n\n\t\t\treturn function() {\n\t\t\t\tvar __super = this._super;\n\t\t\t\tvar __superApply = this._superApply;\n\t\t\t\tvar returnValue;\n\n\t\t\t\tthis._super = _super;\n\t\t\t\tthis._superApply = _superApply;\n\n\t\t\t\treturnValue = value.apply( this, arguments );\n\n\t\t\t\tthis._super = __super;\n\t\t\t\tthis._superApply = __superApply;\n\n\t\t\t\treturn returnValue;\n\t\t\t};\n\t\t} )();\n\t} );\n\tconstructor.prototype = $.widget.extend( basePrototype, {\n\n\t\t// TODO: remove support for widgetEventPrefix\n\t\t// always use the name + a colon as the prefix, e.g., draggable:start\n\t\t// don't prefix for widgets that aren't DOM-based\n\t\twidgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name\n\t}, proxiedPrototype, {\n\t\tconstructor: constructor,\n\t\tnamespace: namespace,\n\t\twidgetName: name,\n\t\twidgetFullName: fullName\n\t} );\n\n\t// If this widget is being redefined then we need to find all widgets that\n\t// are inheriting from it and redefine all of them so that they inherit from\n\t// the new version of this widget. We're essentially trying to replace one\n\t// level in the prototype chain.\n\tif ( existingConstructor ) {\n\t\t$.each( existingConstructor._childConstructors, function( i, child ) {\n\t\t\tvar childPrototype = child.prototype;\n\n\t\t\t// Redefine the child widget using the same prototype that was\n\t\t\t// originally used, but inherit from the new version of the base\n\t\t\t$.widget( childPrototype.namespace + \".\" + childPrototype.widgetName, constructor,\n\t\t\t\tchild._proto );\n\t\t} );\n\n\t\t// Remove the list of existing child constructors from the old constructor\n\t\t// so the old child constructors can be garbage collected\n\t\tdelete existingConstructor._childConstructors;\n\t} else {\n\t\tbase._childConstructors.push( constructor );\n\t}\n\n\t$.widget.bridge( name, constructor );\n\n\treturn constructor;\n};\n\n$.widget.extend = function( target ) {\n\tvar input = widgetSlice.call( arguments, 1 );\n\tvar inputIndex = 0;\n\tvar inputLength = input.length;\n\tvar key;\n\tvar value;\n\n\tfor ( ; inputIndex < inputLength; inputIndex++ ) {\n\t\tfor ( key in input[ inputIndex ] ) {\n\t\t\tvalue = input[ inputIndex ][ key ];\n\t\t\tif ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {\n\n\t\t\t\t// Clone objects\n\t\t\t\tif ( $.isPlainObject( value ) ) {\n\t\t\t\t\ttarget[ key ] = $.isPlainObject( target[ key ] ) ?\n\t\t\t\t\t\t$.widget.extend( {}, target[ key ], value ) :\n\n\t\t\t\t\t\t// Don't extend strings, arrays, etc. with objects\n\t\t\t\t\t\t$.widget.extend( {}, value );\n\n\t\t\t\t// Copy everything else by reference\n\t\t\t\t} else {\n\t\t\t\t\ttarget[ key ] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn target;\n};\n\n$.widget.bridge = function( name, object ) {\n\tvar fullName = object.prototype.widgetFullName || name;\n\t$.fn[ name ] = function( options ) {\n\t\tvar isMethodCall = typeof options === \"string\";\n\t\tvar args = widgetSlice.call( arguments, 1 );\n\t\tvar returnValue = this;\n\n\t\tif ( isMethodCall ) {\n\n\t\t\t// If this is an empty collection, we need to have the instance method\n\t\t\t// return undefined instead of the jQuery instance\n\t\t\tif ( !this.length && options === \"instance\" ) {\n\t\t\t\treturnValue = undefined;\n\t\t\t} else {\n\t\t\t\tthis.each( function() {\n\t\t\t\t\tvar methodValue;\n\t\t\t\t\tvar instance = $.data( this, fullName );\n\n\t\t\t\t\tif ( options === \"instance\" ) {\n\t\t\t\t\t\treturnValue = instance;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !instance ) {\n\t\t\t\t\t\treturn $.error( \"cannot call methods on \" + name +\n\t\t\t\t\t\t\t\" prior to initialization; \" +\n\t\t\t\t\t\t\t\"attempted to call method '\" + options + \"'\" );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === \"_\" ) {\n\t\t\t\t\t\treturn $.error( \"no such method '\" + options + \"' for \" + name +\n\t\t\t\t\t\t\t\" widget instance\" );\n\t\t\t\t\t}\n\n\t\t\t\t\tmethodValue = instance[ options ].apply( instance, args );\n\n\t\t\t\t\tif ( methodValue !== instance && methodValue !== undefined ) {\n\t\t\t\t\t\treturnValue = methodValue && methodValue.jquery ?\n\t\t\t\t\t\t\treturnValue.pushStack( methodValue.get() ) :\n\t\t\t\t\t\t\tmethodValue;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Allow multiple hashes to be passed on init\n\t\t\tif ( args.length ) {\n\t\t\t\toptions = $.widget.extend.apply( null, [ options ].concat( args ) );\n\t\t\t}\n\n\t\t\tthis.each( function() {\n\t\t\t\tvar instance = $.data( this, fullName );\n\t\t\t\tif ( instance ) {\n\t\t\t\t\tinstance.option( options || {} );\n\t\t\t\t\tif ( instance._init ) {\n\t\t\t\t\t\tinstance._init();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$.data( this, fullName, new object( options, this ) );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn returnValue;\n\t};\n};\n\n$.Widget = $.Widget || function( /* options, element */ ) {};\n$.Widget._childConstructors = [];\n\n$.Widget.prototype = {\n\twidgetName: \"widget\",\n\twidgetEventPrefix: \"\",\n\tdefaultElement: \"<div>\",\n\n\toptions: {\n\t\tclasses: {},\n\t\tdisabled: false,\n\n\t\t// Callbacks\n\t\tcreate: null\n\t},\n\n\t_createWidget: function( options, element ) {\n\t\telement = $( element || this.defaultElement || this )[ 0 ];\n\t\tthis.element = $( element );\n\t\tthis.uuid = widgetUuid++;\n\t\tthis.eventNamespace = \".\" + this.widgetName + this.uuid;\n\n\t\tthis.bindings = $();\n\t\tthis.hoverable = $();\n\t\tthis.focusable = $();\n\t\tthis.classesElementLookup = {};\n\n\t\tif ( element !== this ) {\n\t\t\t$.data( element, this.widgetFullName, this );\n\t\t\tthis._on( true, this.element, {\n\t\t\t\tremove: function( event ) {\n\t\t\t\t\tif ( event.target === element ) {\n\t\t\t\t\t\tthis.destroy();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t\tthis.document = $( element.style ?\n\n\t\t\t\t// Element within the document\n\t\t\t\telement.ownerDocument :\n\n\t\t\t\t// Element is window or document\n\t\t\t\telement.document || element );\n\t\t\tthis.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow );\n\t\t}\n\n\t\tthis.options = $.widget.extend( {},\n\t\t\tthis.options,\n\t\t\tthis._getCreateOptions(),\n\t\t\toptions );\n\n\t\tthis._create();\n\n\t\tif ( this.options.disabled ) {\n\t\t\tthis._setOptionDisabled( this.options.disabled );\n\t\t}\n\n\t\tthis._trigger( \"create\", null, this._getCreateEventData() );\n\t\tthis._init();\n\t},\n\n\t_getCreateOptions: function() {\n\t\treturn {};\n\t},\n\n\t_getCreateEventData: $.noop,\n\n\t_create: $.noop,\n\n\t_init: $.noop,\n\n\tdestroy: function() {\n\t\tvar that = this;\n\n\t\tthis._destroy();\n\t\t$.each( this.classesElementLookup, function( key, value ) {\n\t\t\tthat._removeClass( value, key );\n\t\t} );\n\n\t\t// We can probably remove the unbind calls in 2.0\n\t\t// all event bindings should go through this._on()\n\t\tthis.element\n\t\t\t.off( this.eventNamespace )\n\t\t\t.removeData( this.widgetFullName );\n\t\tthis.widget()\n\t\t\t.off( this.eventNamespace )\n\t\t\t.removeAttr( \"aria-disabled\" );\n\n\t\t// Clean up events and states\n\t\tthis.bindings.off( this.eventNamespace );\n\t},\n\n\t_destroy: $.noop,\n\n\twidget: function() {\n\t\treturn this.element;\n\t},\n\n\toption: function( key, value ) {\n\t\tvar options = key;\n\t\tvar parts;\n\t\tvar curOption;\n\t\tvar i;\n\n\t\tif ( arguments.length === 0 ) {\n\n\t\t\t// Don't return a reference to the internal hash\n\t\t\treturn $.widget.extend( {}, this.options );\n\t\t}\n\n\t\tif ( typeof key === \"string\" ) {\n\n\t\t\t// Handle nested keys, e.g., \"foo.bar\" => { foo: { bar: ___ } }\n\t\t\toptions = {};\n\t\t\tparts = key.split( \".\" );\n\t\t\tkey = parts.shift();\n\t\t\tif ( parts.length ) {\n\t\t\t\tcurOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );\n\t\t\t\tfor ( i = 0; i < parts.length - 1; i++ ) {\n\t\t\t\t\tcurOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};\n\t\t\t\t\tcurOption = curOption[ parts[ i ] ];\n\t\t\t\t}\n\t\t\t\tkey = parts.pop();\n\t\t\t\tif ( arguments.length === 1 ) {\n\t\t\t\t\treturn curOption[ key ] === undefined ? null : curOption[ key ];\n\t\t\t\t}\n\t\t\t\tcurOption[ key ] = value;\n\t\t\t} else {\n\t\t\t\tif ( arguments.length === 1 ) {\n\t\t\t\t\treturn this.options[ key ] === undefined ? null : this.options[ key ];\n\t\t\t\t}\n\t\t\t\toptions[ key ] = value;\n\t\t\t}\n\t\t}\n\n\t\tthis._setOptions( options );\n\n\t\treturn this;\n\t},\n\n\t_setOptions: function( options ) {\n\t\tvar key;\n\n\t\tfor ( key in options ) {\n\t\t\tthis._setOption( key, options[ key ] );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"classes\" ) {\n\t\t\tthis._setOptionClasses( value );\n\t\t}\n\n\t\tthis.options[ key ] = value;\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis._setOptionDisabled( value );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_setOptionClasses: function( value ) {\n\t\tvar classKey, elements, currentElements;\n\n\t\tfor ( classKey in value ) {\n\t\t\tcurrentElements = this.classesElementLookup[ classKey ];\n\t\t\tif ( value[ classKey ] === this.options.classes[ classKey ] ||\n\t\t\t\t\t!currentElements ||\n\t\t\t\t\t!currentElements.length ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// We are doing this to create a new jQuery object because the _removeClass() call\n\t\t\t// on the next line is going to destroy the reference to the current elements being\n\t\t\t// tracked. We need to save a copy of this collection so that we can add the new classes\n\t\t\t// below.\n\t\t\telements = $( currentElements.get() );\n\t\t\tthis._removeClass( currentElements, classKey );\n\n\t\t\t// We don't use _addClass() here, because that uses this.options.classes\n\t\t\t// for generating the string of classes. We want to use the value passed in from\n\t\t\t// _setOption(), this is the new value of the classes option which was passed to\n\t\t\t// _setOption(). We pass this value directly to _classes().\n\t\t\telements.addClass( this._classes( {\n\t\t\t\telement: elements,\n\t\t\t\tkeys: classKey,\n\t\t\t\tclasses: value,\n\t\t\t\tadd: true\n\t\t\t} ) );\n\t\t}\n\t},\n\n\t_setOptionDisabled: function( value ) {\n\t\tthis._toggleClass( this.widget(), this.widgetFullName + \"-disabled\", null, !!value );\n\n\t\t// If the widget is becoming disabled, then nothing is interactive\n\t\tif ( value ) {\n\t\t\tthis._removeClass( this.hoverable, null, \"ui-state-hover\" );\n\t\t\tthis._removeClass( this.focusable, null, \"ui-state-focus\" );\n\t\t}\n\t},\n\n\tenable: function() {\n\t\treturn this._setOptions( { disabled: false } );\n\t},\n\n\tdisable: function() {\n\t\treturn this._setOptions( { disabled: true } );\n\t},\n\n\t_classes: function( options ) {\n\t\tvar full = [];\n\t\tvar that = this;\n\n\t\toptions = $.extend( {\n\t\t\telement: this.element,\n\t\t\tclasses: this.options.classes || {}\n\t\t}, options );\n\n\t\tfunction processClassString( classes, checkOption ) {\n\t\t\tvar current, i;\n\t\t\tfor ( i = 0; i < classes.length; i++ ) {\n\t\t\t\tcurrent = that.classesElementLookup[ classes[ i ] ] || $();\n\t\t\t\tif ( options.add ) {\n\t\t\t\t\tcurrent = $( $.unique( current.get().concat( options.element.get() ) ) );\n\t\t\t\t} else {\n\t\t\t\t\tcurrent = $( current.not( options.element ).get() );\n\t\t\t\t}\n\t\t\t\tthat.classesElementLookup[ classes[ i ] ] = current;\n\t\t\t\tfull.push( classes[ i ] );\n\t\t\t\tif ( checkOption && options.classes[ classes[ i ] ] ) {\n\t\t\t\t\tfull.push( options.classes[ classes[ i ] ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._on( options.element, {\n\t\t\t\"remove\": \"_untrackClassesElement\"\n\t\t} );\n\n\t\tif ( options.keys ) {\n\t\t\tprocessClassString( options.keys.match( /\\S+/g ) || [], true );\n\t\t}\n\t\tif ( options.extra ) {\n\t\t\tprocessClassString( options.extra.match( /\\S+/g ) || [] );\n\t\t}\n\n\t\treturn full.join( \" \" );\n\t},\n\n\t_untrackClassesElement: function( event ) {\n\t\tvar that = this;\n\t\t$.each( that.classesElementLookup, function( key, value ) {\n\t\t\tif ( $.inArray( event.target, value ) !== -1 ) {\n\t\t\t\tthat.classesElementLookup[ key ] = $( value.not( event.target ).get() );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_removeClass: function( element, keys, extra ) {\n\t\treturn this._toggleClass( element, keys, extra, false );\n\t},\n\n\t_addClass: function( element, keys, extra ) {\n\t\treturn this._toggleClass( element, keys, extra, true );\n\t},\n\n\t_toggleClass: function( element, keys, extra, add ) {\n\t\tadd = ( typeof add === \"boolean\" ) ? add : extra;\n\t\tvar shift = ( typeof element === \"string\" || element === null ),\n\t\t\toptions = {\n\t\t\t\textra: shift ? keys : extra,\n\t\t\t\tkeys: shift ? element : keys,\n\t\t\t\telement: shift ? this.element : element,\n\t\t\t\tadd: add\n\t\t\t};\n\t\toptions.element.toggleClass( this._classes( options ), add );\n\t\treturn this;\n\t},\n\n\t_on: function( suppressDisabledCheck, element, handlers ) {\n\t\tvar delegateElement;\n\t\tvar instance = this;\n\n\t\t// No suppressDisabledCheck flag, shuffle arguments\n\t\tif ( typeof suppressDisabledCheck !== \"boolean\" ) {\n\t\t\thandlers = element;\n\t\t\telement = suppressDisabledCheck;\n\t\t\tsuppressDisabledCheck = false;\n\t\t}\n\n\t\t// No element argument, shuffle and use this.element\n\t\tif ( !handlers ) {\n\t\t\thandlers = element;\n\t\t\telement = this.element;\n\t\t\tdelegateElement = this.widget();\n\t\t} else {\n\t\t\telement = delegateElement = $( element );\n\t\t\tthis.bindings = this.bindings.add( element );\n\t\t}\n\n\t\t$.each( handlers, function( event, handler ) {\n\t\t\tfunction handlerProxy() {\n\n\t\t\t\t// Allow widgets to customize the disabled handling\n\t\t\t\t// - disabled as an array instead of boolean\n\t\t\t\t// - disabled class as method for disabling individual parts\n\t\t\t\tif ( !suppressDisabledCheck &&\n\t\t\t\t\t\t( instance.options.disabled === true ||\n\t\t\t\t\t\t$( this ).hasClass( \"ui-state-disabled\" ) ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t\t.apply( instance, arguments );\n\t\t\t}\n\n\t\t\t// Copy the guid so direct unbinding works\n\t\t\tif ( typeof handler !== \"string\" ) {\n\t\t\t\thandlerProxy.guid = handler.guid =\n\t\t\t\t\thandler.guid || handlerProxy.guid || $.guid++;\n\t\t\t}\n\n\t\t\tvar match = event.match( /^([\\w:-]*)\\s*(.*)$/ );\n\t\t\tvar eventName = match[ 1 ] + instance.eventNamespace;\n\t\t\tvar selector = match[ 2 ];\n\n\t\t\tif ( selector ) {\n\t\t\t\tdelegateElement.on( eventName, selector, handlerProxy );\n\t\t\t} else {\n\t\t\t\telement.on( eventName, handlerProxy );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_off: function( element, eventName ) {\n\t\teventName = ( eventName || \"\" ).split( \" \" ).join( this.eventNamespace + \" \" ) +\n\t\t\tthis.eventNamespace;\n\t\telement.off( eventName ).off( eventName );\n\n\t\t// Clear the stack to avoid memory leaks (#10056)\n\t\tthis.bindings = $( this.bindings.not( element ).get() );\n\t\tthis.focusable = $( this.focusable.not( element ).get() );\n\t\tthis.hoverable = $( this.hoverable.not( element ).get() );\n\t},\n\n\t_delay: function( handler, delay ) {\n\t\tfunction handlerProxy() {\n\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t.apply( instance, arguments );\n\t\t}\n\t\tvar instance = this;\n\t\treturn setTimeout( handlerProxy, delay || 0 );\n\t},\n\n\t_hoverable: function( element ) {\n\t\tthis.hoverable = this.hoverable.add( element );\n\t\tthis._on( element, {\n\t\t\tmouseenter: function( event ) {\n\t\t\t\tthis._addClass( $( event.currentTarget ), null, \"ui-state-hover\" );\n\t\t\t},\n\t\t\tmouseleave: function( event ) {\n\t\t\t\tthis._removeClass( $( event.currentTarget ), null, \"ui-state-hover\" );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_focusable: function( element ) {\n\t\tthis.focusable = this.focusable.add( element );\n\t\tthis._on( element, {\n\t\t\tfocusin: function( event ) {\n\t\t\t\tthis._addClass( $( event.currentTarget ), null, \"ui-state-focus\" );\n\t\t\t},\n\t\t\tfocusout: function( event ) {\n\t\t\t\tthis._removeClass( $( event.currentTarget ), null, \"ui-state-focus\" );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_trigger: function( type, event, data ) {\n\t\tvar prop, orig;\n\t\tvar callback = this.options[ type ];\n\n\t\tdata = data || {};\n\t\tevent = $.Event( event );\n\t\tevent.type = ( type === this.widgetEventPrefix ?\n\t\t\ttype :\n\t\t\tthis.widgetEventPrefix + type ).toLowerCase();\n\n\t\t// The original event may come from any element\n\t\t// so we need to reset the target on the new event\n\t\tevent.target = this.element[ 0 ];\n\n\t\t// Copy original event properties over to the new event\n\t\torig = event.originalEvent;\n\t\tif ( orig ) {\n\t\t\tfor ( prop in orig ) {\n\t\t\t\tif ( !( prop in event ) ) {\n\t\t\t\t\tevent[ prop ] = orig[ prop ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.element.trigger( event, data );\n\t\treturn !( $.isFunction( callback ) &&\n\t\t\tcallback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||\n\t\t\tevent.isDefaultPrevented() );\n\t}\n};\n\n$.each( { show: \"fadeIn\", hide: \"fadeOut\" }, function( method, defaultEffect ) {\n\t$.Widget.prototype[ \"_\" + method ] = function( element, options, callback ) {\n\t\tif ( typeof options === \"string\" ) {\n\t\t\toptions = { effect: options };\n\t\t}\n\n\t\tvar hasOptions;\n\t\tvar effectName = !options ?\n\t\t\tmethod :\n\t\t\toptions === true || typeof options === \"number\" ?\n\t\t\t\tdefaultEffect :\n\t\t\t\toptions.effect || defaultEffect;\n\n\t\toptions = options || {};\n\t\tif ( typeof options === \"number\" ) {\n\t\t\toptions = { duration: options };\n\t\t}\n\n\t\thasOptions = !$.isEmptyObject( options );\n\t\toptions.complete = callback;\n\n\t\tif ( options.delay ) {\n\t\t\telement.delay( options.delay );\n\t\t}\n\n\t\tif ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {\n\t\t\telement[ method ]( options );\n\t\t} else if ( effectName !== method && element[ effectName ] ) {\n\t\t\telement[ effectName ]( options.duration, options.easing, callback );\n\t\t} else {\n\t\t\telement.queue( function( next ) {\n\t\t\t\t$( this )[ method ]();\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback.call( element[ 0 ] );\n\t\t\t\t}\n\t\t\t\tnext();\n\t\t\t} );\n\t\t}\n\t};\n} );\n\nvar widget = $.widget;\n\n\n/*!\n * jQuery UI Position 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/position/\n */\n\n//>>label: Position\n//>>group: Core\n//>>description: Positions elements relative to other elements.\n//>>docs: http://api.jqueryui.com/position/\n//>>demos: http://jqueryui.com/position/\n\n\n( function() {\nvar cachedScrollbarWidth,\n\tmax = Math.max,\n\tabs = Math.abs,\n\trhorizontal = /left|center|right/,\n\trvertical = /top|center|bottom/,\n\troffset = /[\\+\\-]\\d+(\\.[\\d]+)?%?/,\n\trposition = /^\\w+/,\n\trpercent = /%$/,\n\t_position = $.fn.position;\n\nfunction getOffsets( offsets, width, height ) {\n\treturn [\n\t\tparseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),\n\t\tparseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )\n\t];\n}\n\nfunction parseCss( element, property ) {\n\treturn parseInt( $.css( element, property ), 10 ) || 0;\n}\n\nfunction getDimensions( elem ) {\n\tvar raw = elem[ 0 ];\n\tif ( raw.nodeType === 9 ) {\n\t\treturn {\n\t\t\twidth: elem.width(),\n\t\t\theight: elem.height(),\n\t\t\toffset: { top: 0, left: 0 }\n\t\t};\n\t}\n\tif ( $.isWindow( raw ) ) {\n\t\treturn {\n\t\t\twidth: elem.width(),\n\t\t\theight: elem.height(),\n\t\t\toffset: { top: elem.scrollTop(), left: elem.scrollLeft() }\n\t\t};\n\t}\n\tif ( raw.preventDefault ) {\n\t\treturn {\n\t\t\twidth: 0,\n\t\t\theight: 0,\n\t\t\toffset: { top: raw.pageY, left: raw.pageX }\n\t\t};\n\t}\n\treturn {\n\t\twidth: elem.outerWidth(),\n\t\theight: elem.outerHeight(),\n\t\toffset: elem.offset()\n\t};\n}\n\n$.position = $.position || {\n\tscrollbarWidth: function() {\n\t\tif ( cachedScrollbarWidth !== undefined ) {\n\t\t\treturn cachedScrollbarWidth;\n\t\t}\n\t\tvar w1, w2,\n\t\t\tdiv = $( \"<div \" +\n\t\t\t\t\"style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>\" +\n\t\t\t\t\"<div style='height:100px;width:auto;'></div></div>\" ),\n\t\t\tinnerDiv = div.children()[ 0 ];\n\n\t\t$( \"body\" ).append( div );\n\t\tw1 = innerDiv.offsetWidth;\n\t\tdiv.css( \"overflow\", \"scroll\" );\n\n\t\tw2 = innerDiv.offsetWidth;\n\n\t\tif ( w1 === w2 ) {\n\t\t\tw2 = div[ 0 ].clientWidth;\n\t\t}\n\n\t\tdiv.remove();\n\n\t\treturn ( cachedScrollbarWidth = w1 - w2 );\n\t},\n\tgetScrollInfo: function( within ) {\n\t\tvar overflowX = within.isWindow || within.isDocument ? \"\" :\n\t\t\t\twithin.element.css( \"overflow-x\" ),\n\t\t\toverflowY = within.isWindow || within.isDocument ? \"\" :\n\t\t\t\twithin.element.css( \"overflow-y\" ),\n\t\t\thasOverflowX = overflowX === \"scroll\" ||\n\t\t\t\t( overflowX === \"auto\" && within.width < within.element[ 0 ].scrollWidth ),\n\t\t\thasOverflowY = overflowY === \"scroll\" ||\n\t\t\t\t( overflowY === \"auto\" && within.height < within.element[ 0 ].scrollHeight );\n\t\treturn {\n\t\t\twidth: hasOverflowY ? $.position.scrollbarWidth() : 0,\n\t\t\theight: hasOverflowX ? $.position.scrollbarWidth() : 0\n\t\t};\n\t},\n\tgetWithinInfo: function( element ) {\n\t\tvar withinElement = $( element || window ),\n\t\t\tisWindow = $.isWindow( withinElement[ 0 ] ),\n\t\t\tisDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9,\n\t\t\thasOffset = !isWindow && !isDocument;\n\t\treturn {\n\t\t\telement: withinElement,\n\t\t\tisWindow: isWindow,\n\t\t\tisDocument: isDocument,\n\t\t\toffset: hasOffset ? $( element ).offset() : { left: 0, top: 0 },\n\t\t\tscrollLeft: withinElement.scrollLeft(),\n\t\t\tscrollTop: withinElement.scrollTop(),\n\t\t\twidth: withinElement.outerWidth(),\n\t\t\theight: withinElement.outerHeight()\n\t\t};\n\t}\n};\n\n$.fn.position = function( options ) {\n\tif ( !options || !options.of ) {\n\t\treturn _position.apply( this, arguments );\n\t}\n\n\t// Make a copy, we don't want to modify arguments\n\toptions = $.extend( {}, options );\n\n\tvar atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,\n\t\ttarget = $( options.of ),\n\t\twithin = $.position.getWithinInfo( options.within ),\n\t\tscrollInfo = $.position.getScrollInfo( within ),\n\t\tcollision = ( options.collision || \"flip\" ).split( \" \" ),\n\t\toffsets = {};\n\n\tdimensions = getDimensions( target );\n\tif ( target[ 0 ].preventDefault ) {\n\n\t\t// Force left top to allow flipping\n\t\toptions.at = \"left top\";\n\t}\n\ttargetWidth = dimensions.width;\n\ttargetHeight = dimensions.height;\n\ttargetOffset = dimensions.offset;\n\n\t// Clone to reuse original targetOffset later\n\tbasePosition = $.extend( {}, targetOffset );\n\n\t// Force my and at to have valid horizontal and vertical positions\n\t// if a value is missing or invalid, it will be converted to center\n\t$.each( [ \"my\", \"at\" ], function() {\n\t\tvar pos = ( options[ this ] || \"\" ).split( \" \" ),\n\t\t\thorizontalOffset,\n\t\t\tverticalOffset;\n\n\t\tif ( pos.length === 1 ) {\n\t\t\tpos = rhorizontal.test( pos[ 0 ] ) ?\n\t\t\t\tpos.concat( [ \"center\" ] ) :\n\t\t\t\trvertical.test( pos[ 0 ] ) ?\n\t\t\t\t\t[ \"center\" ].concat( pos ) :\n\t\t\t\t\t[ \"center\", \"center\" ];\n\t\t}\n\t\tpos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : \"center\";\n\t\tpos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : \"center\";\n\n\t\t// Calculate offsets\n\t\thorizontalOffset = roffset.exec( pos[ 0 ] );\n\t\tverticalOffset = roffset.exec( pos[ 1 ] );\n\t\toffsets[ this ] = [\n\t\t\thorizontalOffset ? horizontalOffset[ 0 ] : 0,\n\t\t\tverticalOffset ? verticalOffset[ 0 ] : 0\n\t\t];\n\n\t\t// Reduce to just the positions without the offsets\n\t\toptions[ this ] = [\n\t\t\trposition.exec( pos[ 0 ] )[ 0 ],\n\t\t\trposition.exec( pos[ 1 ] )[ 0 ]\n\t\t];\n\t} );\n\n\t// Normalize collision option\n\tif ( collision.length === 1 ) {\n\t\tcollision[ 1 ] = collision[ 0 ];\n\t}\n\n\tif ( options.at[ 0 ] === \"right\" ) {\n\t\tbasePosition.left += targetWidth;\n\t} else if ( options.at[ 0 ] === \"center\" ) {\n\t\tbasePosition.left += targetWidth / 2;\n\t}\n\n\tif ( options.at[ 1 ] === \"bottom\" ) {\n\t\tbasePosition.top += targetHeight;\n\t} else if ( options.at[ 1 ] === \"center\" ) {\n\t\tbasePosition.top += targetHeight / 2;\n\t}\n\n\tatOffset = getOffsets( offsets.at, targetWidth, targetHeight );\n\tbasePosition.left += atOffset[ 0 ];\n\tbasePosition.top += atOffset[ 1 ];\n\n\treturn this.each( function() {\n\t\tvar collisionPosition, using,\n\t\t\telem = $( this ),\n\t\t\telemWidth = elem.outerWidth(),\n\t\t\telemHeight = elem.outerHeight(),\n\t\t\tmarginLeft = parseCss( this, \"marginLeft\" ),\n\t\t\tmarginTop = parseCss( this, \"marginTop\" ),\n\t\t\tcollisionWidth = elemWidth + marginLeft + parseCss( this, \"marginRight\" ) +\n\t\t\t\tscrollInfo.width,\n\t\t\tcollisionHeight = elemHeight + marginTop + parseCss( this, \"marginBottom\" ) +\n\t\t\t\tscrollInfo.height,\n\t\t\tposition = $.extend( {}, basePosition ),\n\t\t\tmyOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );\n\n\t\tif ( options.my[ 0 ] === \"right\" ) {\n\t\t\tposition.left -= elemWidth;\n\t\t} else if ( options.my[ 0 ] === \"center\" ) {\n\t\t\tposition.left -= elemWidth / 2;\n\t\t}\n\n\t\tif ( options.my[ 1 ] === \"bottom\" ) {\n\t\t\tposition.top -= elemHeight;\n\t\t} else if ( options.my[ 1 ] === \"center\" ) {\n\t\t\tposition.top -= elemHeight / 2;\n\t\t}\n\n\t\tposition.left += myOffset[ 0 ];\n\t\tposition.top += myOffset[ 1 ];\n\n\t\tcollisionPosition = {\n\t\t\tmarginLeft: marginLeft,\n\t\t\tmarginTop: marginTop\n\t\t};\n\n\t\t$.each( [ \"left\", \"top\" ], function( i, dir ) {\n\t\t\tif ( $.ui.position[ collision[ i ] ] ) {\n\t\t\t\t$.ui.position[ collision[ i ] ][ dir ]( position, {\n\t\t\t\t\ttargetWidth: targetWidth,\n\t\t\t\t\ttargetHeight: targetHeight,\n\t\t\t\t\telemWidth: elemWidth,\n\t\t\t\t\telemHeight: elemHeight,\n\t\t\t\t\tcollisionPosition: collisionPosition,\n\t\t\t\t\tcollisionWidth: collisionWidth,\n\t\t\t\t\tcollisionHeight: collisionHeight,\n\t\t\t\t\toffset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],\n\t\t\t\t\tmy: options.my,\n\t\t\t\t\tat: options.at,\n\t\t\t\t\twithin: within,\n\t\t\t\t\telem: elem\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\tif ( options.using ) {\n\n\t\t\t// Adds feedback as second argument to using callback, if present\n\t\t\tusing = function( props ) {\n\t\t\t\tvar left = targetOffset.left - position.left,\n\t\t\t\t\tright = left + targetWidth - elemWidth,\n\t\t\t\t\ttop = targetOffset.top - position.top,\n\t\t\t\t\tbottom = top + targetHeight - elemHeight,\n\t\t\t\t\tfeedback = {\n\t\t\t\t\t\ttarget: {\n\t\t\t\t\t\t\telement: target,\n\t\t\t\t\t\t\tleft: targetOffset.left,\n\t\t\t\t\t\t\ttop: targetOffset.top,\n\t\t\t\t\t\t\twidth: targetWidth,\n\t\t\t\t\t\t\theight: targetHeight\n\t\t\t\t\t\t},\n\t\t\t\t\t\telement: {\n\t\t\t\t\t\t\telement: elem,\n\t\t\t\t\t\t\tleft: position.left,\n\t\t\t\t\t\t\ttop: position.top,\n\t\t\t\t\t\t\twidth: elemWidth,\n\t\t\t\t\t\t\theight: elemHeight\n\t\t\t\t\t\t},\n\t\t\t\t\t\thorizontal: right < 0 ? \"left\" : left > 0 ? \"right\" : \"center\",\n\t\t\t\t\t\tvertical: bottom < 0 ? \"top\" : top > 0 ? \"bottom\" : \"middle\"\n\t\t\t\t\t};\n\t\t\t\tif ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {\n\t\t\t\t\tfeedback.horizontal = \"center\";\n\t\t\t\t}\n\t\t\t\tif ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {\n\t\t\t\t\tfeedback.vertical = \"middle\";\n\t\t\t\t}\n\t\t\t\tif ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {\n\t\t\t\t\tfeedback.important = \"horizontal\";\n\t\t\t\t} else {\n\t\t\t\t\tfeedback.important = \"vertical\";\n\t\t\t\t}\n\t\t\t\toptions.using.call( this, props, feedback );\n\t\t\t};\n\t\t}\n\n\t\telem.offset( $.extend( position, { using: using } ) );\n\t} );\n};\n\n$.ui.position = {\n\tfit: {\n\t\tleft: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.isWindow ? within.scrollLeft : within.offset.left,\n\t\t\t\touterWidth = within.width,\n\t\t\t\tcollisionPosLeft = position.left - data.collisionPosition.marginLeft,\n\t\t\t\toverLeft = withinOffset - collisionPosLeft,\n\t\t\t\toverRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,\n\t\t\t\tnewOverRight;\n\n\t\t\t// Element is wider than within\n\t\t\tif ( data.collisionWidth > outerWidth ) {\n\n\t\t\t\t// Element is initially over the left side of within\n\t\t\t\tif ( overLeft > 0 && overRight <= 0 ) {\n\t\t\t\t\tnewOverRight = position.left + overLeft + data.collisionWidth - outerWidth -\n\t\t\t\t\t\twithinOffset;\n\t\t\t\t\tposition.left += overLeft - newOverRight;\n\n\t\t\t\t// Element is initially over right side of within\n\t\t\t\t} else if ( overRight > 0 && overLeft <= 0 ) {\n\t\t\t\t\tposition.left = withinOffset;\n\n\t\t\t\t// Element is initially over both left and right sides of within\n\t\t\t\t} else {\n\t\t\t\t\tif ( overLeft > overRight ) {\n\t\t\t\t\t\tposition.left = withinOffset + outerWidth - data.collisionWidth;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tposition.left = withinOffset;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Too far left -> align with left edge\n\t\t\t} else if ( overLeft > 0 ) {\n\t\t\t\tposition.left += overLeft;\n\n\t\t\t// Too far right -> align with right edge\n\t\t\t} else if ( overRight > 0 ) {\n\t\t\t\tposition.left -= overRight;\n\n\t\t\t// Adjust based on position and margin\n\t\t\t} else {\n\t\t\t\tposition.left = max( position.left - collisionPosLeft, position.left );\n\t\t\t}\n\t\t},\n\t\ttop: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.isWindow ? within.scrollTop : within.offset.top,\n\t\t\t\touterHeight = data.within.height,\n\t\t\t\tcollisionPosTop = position.top - data.collisionPosition.marginTop,\n\t\t\t\toverTop = withinOffset - collisionPosTop,\n\t\t\t\toverBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,\n\t\t\t\tnewOverBottom;\n\n\t\t\t// Element is taller than within\n\t\t\tif ( data.collisionHeight > outerHeight ) {\n\n\t\t\t\t// Element is initially over the top of within\n\t\t\t\tif ( overTop > 0 && overBottom <= 0 ) {\n\t\t\t\t\tnewOverBottom = position.top + overTop + data.collisionHeight - outerHeight -\n\t\t\t\t\t\twithinOffset;\n\t\t\t\t\tposition.top += overTop - newOverBottom;\n\n\t\t\t\t// Element is initially over bottom of within\n\t\t\t\t} else if ( overBottom > 0 && overTop <= 0 ) {\n\t\t\t\t\tposition.top = withinOffset;\n\n\t\t\t\t// Element is initially over both top and bottom of within\n\t\t\t\t} else {\n\t\t\t\t\tif ( overTop > overBottom ) {\n\t\t\t\t\t\tposition.top = withinOffset + outerHeight - data.collisionHeight;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tposition.top = withinOffset;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Too far up -> align with top\n\t\t\t} else if ( overTop > 0 ) {\n\t\t\t\tposition.top += overTop;\n\n\t\t\t// Too far down -> align with bottom edge\n\t\t\t} else if ( overBottom > 0 ) {\n\t\t\t\tposition.top -= overBottom;\n\n\t\t\t// Adjust based on position and margin\n\t\t\t} else {\n\t\t\t\tposition.top = max( position.top - collisionPosTop, position.top );\n\t\t\t}\n\t\t}\n\t},\n\tflip: {\n\t\tleft: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.offset.left + within.scrollLeft,\n\t\t\t\touterWidth = within.width,\n\t\t\t\toffsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,\n\t\t\t\tcollisionPosLeft = position.left - data.collisionPosition.marginLeft,\n\t\t\t\toverLeft = collisionPosLeft - offsetLeft,\n\t\t\t\toverRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,\n\t\t\t\tmyOffset = data.my[ 0 ] === \"left\" ?\n\t\t\t\t\t-data.elemWidth :\n\t\t\t\t\tdata.my[ 0 ] === \"right\" ?\n\t\t\t\t\t\tdata.elemWidth :\n\t\t\t\t\t\t0,\n\t\t\t\tatOffset = data.at[ 0 ] === \"left\" ?\n\t\t\t\t\tdata.targetWidth :\n\t\t\t\t\tdata.at[ 0 ] === \"right\" ?\n\t\t\t\t\t\t-data.targetWidth :\n\t\t\t\t\t\t0,\n\t\t\t\toffset = -2 * data.offset[ 0 ],\n\t\t\t\tnewOverRight,\n\t\t\t\tnewOverLeft;\n\n\t\t\tif ( overLeft < 0 ) {\n\t\t\t\tnewOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth -\n\t\t\t\t\touterWidth - withinOffset;\n\t\t\t\tif ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {\n\t\t\t\t\tposition.left += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t} else if ( overRight > 0 ) {\n\t\t\t\tnewOverLeft = position.left - data.collisionPosition.marginLeft + myOffset +\n\t\t\t\t\tatOffset + offset - offsetLeft;\n\t\t\t\tif ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {\n\t\t\t\t\tposition.left += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\ttop: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.offset.top + within.scrollTop,\n\t\t\t\touterHeight = within.height,\n\t\t\t\toffsetTop = within.isWindow ? within.scrollTop : within.offset.top,\n\t\t\t\tcollisionPosTop = position.top - data.collisionPosition.marginTop,\n\t\t\t\toverTop = collisionPosTop - offsetTop,\n\t\t\t\toverBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,\n\t\t\t\ttop = data.my[ 1 ] === \"top\",\n\t\t\t\tmyOffset = top ?\n\t\t\t\t\t-data.elemHeight :\n\t\t\t\t\tdata.my[ 1 ] === \"bottom\" ?\n\t\t\t\t\t\tdata.elemHeight :\n\t\t\t\t\t\t0,\n\t\t\t\tatOffset = data.at[ 1 ] === \"top\" ?\n\t\t\t\t\tdata.targetHeight :\n\t\t\t\t\tdata.at[ 1 ] === \"bottom\" ?\n\t\t\t\t\t\t-data.targetHeight :\n\t\t\t\t\t\t0,\n\t\t\t\toffset = -2 * data.offset[ 1 ],\n\t\t\t\tnewOverTop,\n\t\t\t\tnewOverBottom;\n\t\t\tif ( overTop < 0 ) {\n\t\t\t\tnewOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight -\n\t\t\t\t\touterHeight - withinOffset;\n\t\t\t\tif ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {\n\t\t\t\t\tposition.top += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t} else if ( overBottom > 0 ) {\n\t\t\t\tnewOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset +\n\t\t\t\t\toffset - offsetTop;\n\t\t\t\tif ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {\n\t\t\t\t\tposition.top += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tflipfit: {\n\t\tleft: function() {\n\t\t\t$.ui.position.flip.left.apply( this, arguments );\n\t\t\t$.ui.position.fit.left.apply( this, arguments );\n\t\t},\n\t\ttop: function() {\n\t\t\t$.ui.position.flip.top.apply( this, arguments );\n\t\t\t$.ui.position.fit.top.apply( this, arguments );\n\t\t}\n\t}\n};\n\n} )();\n\nvar position = $.ui.position;\n\n\n/*!\n * jQuery UI Keycode 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Keycode\n//>>group: Core\n//>>description: Provide keycodes as keynames\n//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/\n\n\nvar keycode = $.ui.keyCode = {\n\tBACKSPACE: 8,\n\tCOMMA: 188,\n\tDELETE: 46,\n\tDOWN: 40,\n\tEND: 35,\n\tENTER: 13,\n\tESCAPE: 27,\n\tHOME: 36,\n\tLEFT: 37,\n\tPAGE_DOWN: 34,\n\tPAGE_UP: 33,\n\tPERIOD: 190,\n\tRIGHT: 39,\n\tSPACE: 32,\n\tTAB: 9,\n\tUP: 38\n};\n\n\n/*!\n * jQuery UI Scroll Parent 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: scrollParent\n//>>group: Core\n//>>description: Get the closest ancestor element that is scrollable.\n//>>docs: http://api.jqueryui.com/scrollParent/\n\n\n\nvar scrollParent = $.fn.scrollParent = function( includeHidden ) {\n\tvar position = this.css( \"position\" ),\n\t\texcludeStaticParent = position === \"absolute\",\n\t\toverflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,\n\t\tscrollParent = this.parents().filter( function() {\n\t\t\tvar parent = $( this );\n\t\t\tif ( excludeStaticParent && parent.css( \"position\" ) === \"static\" ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn overflowRegex.test( parent.css( \"overflow\" ) + parent.css( \"overflow-y\" ) +\n\t\t\t\tparent.css( \"overflow-x\" ) );\n\t\t} ).eq( 0 );\n\n\treturn position === \"fixed\" || !scrollParent.length ?\n\t\t$( this[ 0 ].ownerDocument || document ) :\n\t\tscrollParent;\n};\n\n\n/*!\n * jQuery UI Unique ID 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: uniqueId\n//>>group: Core\n//>>description: Functions to generate and remove uniqueId's\n//>>docs: http://api.jqueryui.com/uniqueId/\n\n\n\nvar uniqueId = $.fn.extend( {\n\tuniqueId: ( function() {\n\t\tvar uuid = 0;\n\n\t\treturn function() {\n\t\t\treturn this.each( function() {\n\t\t\t\tif ( !this.id ) {\n\t\t\t\t\tthis.id = \"ui-id-\" + ( ++uuid );\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\t} )(),\n\n\tremoveUniqueId: function() {\n\t\treturn this.each( function() {\n\t\t\tif ( /^ui-id-\\d+$/.test( this.id ) ) {\n\t\t\t\t$( this ).removeAttr( \"id\" );\n\t\t\t}\n\t\t} );\n\t}\n} );\n\n\n}));\n","import { checkBrowserCompatibility } from '../../view/helpers';\r\n\r\n/**\r\n * This callback should be called when the authentication to a server was successfull\r\n * @callback CustomLogin~authenticateSuccess\r\n * @param {string} sessionID - The session id acquired by authenticating to the server\r\n */\r\n/**\r\n * This callback should be called when the authentication to a server failed\r\n * @callback CustomLogin~authenticateError\r\n * @param {object} error - The error occured when trying to authenticate to the server\r\n * @param {string} error.Message - The error message to display\r\n */\r\n/**\r\n * The callback function used to authenticate to a server url\r\n * @callback CustomLogin~authenticateCallback\r\n * @param  {string} serverUrl - The URL of the PMA.core server to authenticate against\r\n * @param  {CustomLogin~authenticateSuccess} [success]\r\n * @param  {CustomLogin~authenticateError} [failure]\r\n * @returns {boolean} True or false depending on whether this instance has enough information to authenticate against this PMA.core server\r\n */\r\n/**\r\n * Authenticates against a PMA.core server with a custom callback function. The caller should implement the callback method with the required parameters\r\n * that authenticates to a server. The implemented function should call the success/error callbacks that are passed as parameters and return a value indicating\r\n * whether this provider can handle authentication to the specified server\r\n * @param  {Context} context\r\n * @param {CustomLogin~authenticateCallback} authenticate\r\n */\r\nexport class CustomLogin {\r\n    constructor(context, authenticate) {\r\n        if (!checkBrowserCompatibility()) {\r\n            return;\r\n        }\r\n\r\n        if ((typeof authenticate !== \"function\")) {\r\n            console.error(\"Expected authenticate callback function\");\r\n            return;\r\n        }\r\n\r\n        this.authenticateCb = authenticate;\r\n        this.context = context;\r\n        this.context.registerAuthenticationProvider(this);\r\n    }\r\n    /**\r\n     * Authenticates against a PMA.core server. This method is usually invoked by the context itself and should rarely be used outside it.\r\n     * @param  {string} serverUrl - The URL of the PMA.core server to authenticate against\r\n     * @param  {function} [success]\r\n     * @param  {function} [failure]\r\n     * @returns {boolean} True or false depending on whether this instance has enough information to authenticate against this PMA.core server\r\n     */\r\n    authenticate(serverUrl, success, failure) {\r\n        return this.authenticateCb(serverUrl, success, failure);\r\n    }\r\n}","/*!\n * perfect-scrollbar v1.5.0\n * Copyright 2020 Hyunje Jun, MDBootstrap and Contributors\n * Licensed under MIT\n */\n\nfunction get(element) {\n  return getComputedStyle(element);\n}\n\nfunction set(element, obj) {\n  for (var key in obj) {\n    var val = obj[key];\n    if (typeof val === 'number') {\n      val = val + \"px\";\n    }\n    element.style[key] = val;\n  }\n  return element;\n}\n\nfunction div(className) {\n  var div = document.createElement('div');\n  div.className = className;\n  return div;\n}\n\nvar elMatches =\n  typeof Element !== 'undefined' &&\n  (Element.prototype.matches ||\n    Element.prototype.webkitMatchesSelector ||\n    Element.prototype.mozMatchesSelector ||\n    Element.prototype.msMatchesSelector);\n\nfunction matches(element, query) {\n  if (!elMatches) {\n    throw new Error('No element matching method supported');\n  }\n\n  return elMatches.call(element, query);\n}\n\nfunction remove(element) {\n  if (element.remove) {\n    element.remove();\n  } else {\n    if (element.parentNode) {\n      element.parentNode.removeChild(element);\n    }\n  }\n}\n\nfunction queryChildren(element, selector) {\n  return Array.prototype.filter.call(element.children, function (child) { return matches(child, selector); }\n  );\n}\n\nvar cls = {\n  main: 'ps',\n  rtl: 'ps__rtl',\n  element: {\n    thumb: function (x) { return (\"ps__thumb-\" + x); },\n    rail: function (x) { return (\"ps__rail-\" + x); },\n    consuming: 'ps__child--consume',\n  },\n  state: {\n    focus: 'ps--focus',\n    clicking: 'ps--clicking',\n    active: function (x) { return (\"ps--active-\" + x); },\n    scrolling: function (x) { return (\"ps--scrolling-\" + x); },\n  },\n};\n\n/*\n * Helper methods\n */\nvar scrollingClassTimeout = { x: null, y: null };\n\nfunction addScrollingClass(i, x) {\n  var classList = i.element.classList;\n  var className = cls.state.scrolling(x);\n\n  if (classList.contains(className)) {\n    clearTimeout(scrollingClassTimeout[x]);\n  } else {\n    classList.add(className);\n  }\n}\n\nfunction removeScrollingClass(i, x) {\n  scrollingClassTimeout[x] = setTimeout(\n    function () { return i.isAlive && i.element.classList.remove(cls.state.scrolling(x)); },\n    i.settings.scrollingThreshold\n  );\n}\n\nfunction setScrollingClassInstantly(i, x) {\n  addScrollingClass(i, x);\n  removeScrollingClass(i, x);\n}\n\nvar EventElement = function EventElement(element) {\n  this.element = element;\n  this.handlers = {};\n};\n\nvar prototypeAccessors = { isEmpty: { configurable: true } };\n\nEventElement.prototype.bind = function bind (eventName, handler) {\n  if (typeof this.handlers[eventName] === 'undefined') {\n    this.handlers[eventName] = [];\n  }\n  this.handlers[eventName].push(handler);\n  this.element.addEventListener(eventName, handler, false);\n};\n\nEventElement.prototype.unbind = function unbind (eventName, target) {\n    var this$1 = this;\n\n  this.handlers[eventName] = this.handlers[eventName].filter(function (handler) {\n    if (target && handler !== target) {\n      return true;\n    }\n    this$1.element.removeEventListener(eventName, handler, false);\n    return false;\n  });\n};\n\nEventElement.prototype.unbindAll = function unbindAll () {\n  for (var name in this.handlers) {\n    this.unbind(name);\n  }\n};\n\nprototypeAccessors.isEmpty.get = function () {\n    var this$1 = this;\n\n  return Object.keys(this.handlers).every(\n    function (key) { return this$1.handlers[key].length === 0; }\n  );\n};\n\nObject.defineProperties( EventElement.prototype, prototypeAccessors );\n\nvar EventManager = function EventManager() {\n  this.eventElements = [];\n};\n\nEventManager.prototype.eventElement = function eventElement (element) {\n  var ee = this.eventElements.filter(function (ee) { return ee.element === element; })[0];\n  if (!ee) {\n    ee = new EventElement(element);\n    this.eventElements.push(ee);\n  }\n  return ee;\n};\n\nEventManager.prototype.bind = function bind (element, eventName, handler) {\n  this.eventElement(element).bind(eventName, handler);\n};\n\nEventManager.prototype.unbind = function unbind (element, eventName, handler) {\n  var ee = this.eventElement(element);\n  ee.unbind(eventName, handler);\n\n  if (ee.isEmpty) {\n    // remove\n    this.eventElements.splice(this.eventElements.indexOf(ee), 1);\n  }\n};\n\nEventManager.prototype.unbindAll = function unbindAll () {\n  this.eventElements.forEach(function (e) { return e.unbindAll(); });\n  this.eventElements = [];\n};\n\nEventManager.prototype.once = function once (element, eventName, handler) {\n  var ee = this.eventElement(element);\n  var onceHandler = function (evt) {\n    ee.unbind(eventName, onceHandler);\n    handler(evt);\n  };\n  ee.bind(eventName, onceHandler);\n};\n\nfunction createEvent(name) {\n  if (typeof window.CustomEvent === 'function') {\n    return new CustomEvent(name);\n  } else {\n    var evt = document.createEvent('CustomEvent');\n    evt.initCustomEvent(name, false, false, undefined);\n    return evt;\n  }\n}\n\nfunction processScrollDiff(\n  i,\n  axis,\n  diff,\n  useScrollingClass,\n  forceFireReachEvent\n) {\n  if ( useScrollingClass === void 0 ) useScrollingClass = true;\n  if ( forceFireReachEvent === void 0 ) forceFireReachEvent = false;\n\n  var fields;\n  if (axis === 'top') {\n    fields = [\n      'contentHeight',\n      'containerHeight',\n      'scrollTop',\n      'y',\n      'up',\n      'down' ];\n  } else if (axis === 'left') {\n    fields = [\n      'contentWidth',\n      'containerWidth',\n      'scrollLeft',\n      'x',\n      'left',\n      'right' ];\n  } else {\n    throw new Error('A proper axis should be provided');\n  }\n\n  processScrollDiff$1(i, diff, fields, useScrollingClass, forceFireReachEvent);\n}\n\nfunction processScrollDiff$1(\n  i,\n  diff,\n  ref,\n  useScrollingClass,\n  forceFireReachEvent\n) {\n  var contentHeight = ref[0];\n  var containerHeight = ref[1];\n  var scrollTop = ref[2];\n  var y = ref[3];\n  var up = ref[4];\n  var down = ref[5];\n  if ( useScrollingClass === void 0 ) useScrollingClass = true;\n  if ( forceFireReachEvent === void 0 ) forceFireReachEvent = false;\n\n  var element = i.element;\n\n  // reset reach\n  i.reach[y] = null;\n\n  // 1 for subpixel rounding\n  if (element[scrollTop] < 1) {\n    i.reach[y] = 'start';\n  }\n\n  // 1 for subpixel rounding\n  if (element[scrollTop] > i[contentHeight] - i[containerHeight] - 1) {\n    i.reach[y] = 'end';\n  }\n\n  if (diff) {\n    element.dispatchEvent(createEvent((\"ps-scroll-\" + y)));\n\n    if (diff < 0) {\n      element.dispatchEvent(createEvent((\"ps-scroll-\" + up)));\n    } else if (diff > 0) {\n      element.dispatchEvent(createEvent((\"ps-scroll-\" + down)));\n    }\n\n    if (useScrollingClass) {\n      setScrollingClassInstantly(i, y);\n    }\n  }\n\n  if (i.reach[y] && (diff || forceFireReachEvent)) {\n    element.dispatchEvent(createEvent((\"ps-\" + y + \"-reach-\" + (i.reach[y]))));\n  }\n}\n\nfunction toInt(x) {\n  return parseInt(x, 10) || 0;\n}\n\nfunction isEditable(el) {\n  return (\n    matches(el, 'input,[contenteditable]') ||\n    matches(el, 'select,[contenteditable]') ||\n    matches(el, 'textarea,[contenteditable]') ||\n    matches(el, 'button,[contenteditable]')\n  );\n}\n\nfunction outerWidth(element) {\n  var styles = get(element);\n  return (\n    toInt(styles.width) +\n    toInt(styles.paddingLeft) +\n    toInt(styles.paddingRight) +\n    toInt(styles.borderLeftWidth) +\n    toInt(styles.borderRightWidth)\n  );\n}\n\nvar env = {\n  isWebKit:\n    typeof document !== 'undefined' &&\n    'WebkitAppearance' in document.documentElement.style,\n  supportsTouch:\n    typeof window !== 'undefined' &&\n    ('ontouchstart' in window ||\n      ('maxTouchPoints' in window.navigator &&\n        window.navigator.maxTouchPoints > 0) ||\n      (window.DocumentTouch && document instanceof window.DocumentTouch)),\n  supportsIePointer:\n    typeof navigator !== 'undefined' && navigator.msMaxTouchPoints,\n  isChrome:\n    typeof navigator !== 'undefined' &&\n    /Chrome/i.test(navigator && navigator.userAgent),\n};\n\nfunction updateGeometry(i) {\n  var element = i.element;\n  var roundedScrollTop = Math.floor(element.scrollTop);\n  var rect = element.getBoundingClientRect();\n\n  i.containerWidth = Math.ceil(rect.width);\n  i.containerHeight = Math.ceil(rect.height);\n  i.contentWidth = element.scrollWidth;\n  i.contentHeight = element.scrollHeight;\n\n  if (!element.contains(i.scrollbarXRail)) {\n    // clean up and append\n    queryChildren(element, cls.element.rail('x')).forEach(function (el) { return remove(el); }\n    );\n    element.appendChild(i.scrollbarXRail);\n  }\n  if (!element.contains(i.scrollbarYRail)) {\n    // clean up and append\n    queryChildren(element, cls.element.rail('y')).forEach(function (el) { return remove(el); }\n    );\n    element.appendChild(i.scrollbarYRail);\n  }\n\n  if (\n    !i.settings.suppressScrollX &&\n    i.containerWidth + i.settings.scrollXMarginOffset < i.contentWidth\n  ) {\n    i.scrollbarXActive = true;\n    i.railXWidth = i.containerWidth - i.railXMarginWidth;\n    i.railXRatio = i.containerWidth / i.railXWidth;\n    i.scrollbarXWidth = getThumbSize(\n      i,\n      toInt((i.railXWidth * i.containerWidth) / i.contentWidth)\n    );\n    i.scrollbarXLeft = toInt(\n      ((i.negativeScrollAdjustment + element.scrollLeft) *\n        (i.railXWidth - i.scrollbarXWidth)) /\n        (i.contentWidth - i.containerWidth)\n    );\n  } else {\n    i.scrollbarXActive = false;\n  }\n\n  if (\n    !i.settings.suppressScrollY &&\n    i.containerHeight + i.settings.scrollYMarginOffset < i.contentHeight\n  ) {\n    i.scrollbarYActive = true;\n    i.railYHeight = i.containerHeight - i.railYMarginHeight;\n    i.railYRatio = i.containerHeight / i.railYHeight;\n    i.scrollbarYHeight = getThumbSize(\n      i,\n      toInt((i.railYHeight * i.containerHeight) / i.contentHeight)\n    );\n    i.scrollbarYTop = toInt(\n      (roundedScrollTop * (i.railYHeight - i.scrollbarYHeight)) /\n        (i.contentHeight - i.containerHeight)\n    );\n  } else {\n    i.scrollbarYActive = false;\n  }\n\n  if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) {\n    i.scrollbarXLeft = i.railXWidth - i.scrollbarXWidth;\n  }\n  if (i.scrollbarYTop >= i.railYHeight - i.scrollbarYHeight) {\n    i.scrollbarYTop = i.railYHeight - i.scrollbarYHeight;\n  }\n\n  updateCss(element, i);\n\n  if (i.scrollbarXActive) {\n    element.classList.add(cls.state.active('x'));\n  } else {\n    element.classList.remove(cls.state.active('x'));\n    i.scrollbarXWidth = 0;\n    i.scrollbarXLeft = 0;\n    element.scrollLeft = i.isRtl === true ? i.contentWidth : 0;\n  }\n  if (i.scrollbarYActive) {\n    element.classList.add(cls.state.active('y'));\n  } else {\n    element.classList.remove(cls.state.active('y'));\n    i.scrollbarYHeight = 0;\n    i.scrollbarYTop = 0;\n    element.scrollTop = 0;\n  }\n}\n\nfunction getThumbSize(i, thumbSize) {\n  if (i.settings.minScrollbarLength) {\n    thumbSize = Math.max(thumbSize, i.settings.minScrollbarLength);\n  }\n  if (i.settings.maxScrollbarLength) {\n    thumbSize = Math.min(thumbSize, i.settings.maxScrollbarLength);\n  }\n  return thumbSize;\n}\n\nfunction updateCss(element, i) {\n  var xRailOffset = { width: i.railXWidth };\n  var roundedScrollTop = Math.floor(element.scrollTop);\n\n  if (i.isRtl) {\n    xRailOffset.left =\n      i.negativeScrollAdjustment +\n      element.scrollLeft +\n      i.containerWidth -\n      i.contentWidth;\n  } else {\n    xRailOffset.left = element.scrollLeft;\n  }\n  if (i.isScrollbarXUsingBottom) {\n    xRailOffset.bottom = i.scrollbarXBottom - roundedScrollTop;\n  } else {\n    xRailOffset.top = i.scrollbarXTop + roundedScrollTop;\n  }\n  set(i.scrollbarXRail, xRailOffset);\n\n  var yRailOffset = { top: roundedScrollTop, height: i.railYHeight };\n  if (i.isScrollbarYUsingRight) {\n    if (i.isRtl) {\n      yRailOffset.right =\n        i.contentWidth -\n        (i.negativeScrollAdjustment + element.scrollLeft) -\n        i.scrollbarYRight -\n        i.scrollbarYOuterWidth -\n        9;\n    } else {\n      yRailOffset.right = i.scrollbarYRight - element.scrollLeft;\n    }\n  } else {\n    if (i.isRtl) {\n      yRailOffset.left =\n        i.negativeScrollAdjustment +\n        element.scrollLeft +\n        i.containerWidth * 2 -\n        i.contentWidth -\n        i.scrollbarYLeft -\n        i.scrollbarYOuterWidth;\n    } else {\n      yRailOffset.left = i.scrollbarYLeft + element.scrollLeft;\n    }\n  }\n  set(i.scrollbarYRail, yRailOffset);\n\n  set(i.scrollbarX, {\n    left: i.scrollbarXLeft,\n    width: i.scrollbarXWidth - i.railBorderXWidth,\n  });\n  set(i.scrollbarY, {\n    top: i.scrollbarYTop,\n    height: i.scrollbarYHeight - i.railBorderYWidth,\n  });\n}\n\nfunction clickRail(i) {\n  var element = i.element;\n\n  i.event.bind(i.scrollbarY, 'mousedown', function (e) { return e.stopPropagation(); });\n  i.event.bind(i.scrollbarYRail, 'mousedown', function (e) {\n    var positionTop =\n      e.pageY -\n      window.pageYOffset -\n      i.scrollbarYRail.getBoundingClientRect().top;\n    var direction = positionTop > i.scrollbarYTop ? 1 : -1;\n\n    i.element.scrollTop += direction * i.containerHeight;\n    updateGeometry(i);\n\n    e.stopPropagation();\n  });\n\n  i.event.bind(i.scrollbarX, 'mousedown', function (e) { return e.stopPropagation(); });\n  i.event.bind(i.scrollbarXRail, 'mousedown', function (e) {\n    var positionLeft =\n      e.pageX -\n      window.pageXOffset -\n      i.scrollbarXRail.getBoundingClientRect().left;\n    var direction = positionLeft > i.scrollbarXLeft ? 1 : -1;\n\n    i.element.scrollLeft += direction * i.containerWidth;\n    updateGeometry(i);\n\n    e.stopPropagation();\n  });\n}\n\nfunction dragThumb(i) {\n  bindMouseScrollHandler(i, [\n    'containerWidth',\n    'contentWidth',\n    'pageX',\n    'railXWidth',\n    'scrollbarX',\n    'scrollbarXWidth',\n    'scrollLeft',\n    'x',\n    'scrollbarXRail' ]);\n  bindMouseScrollHandler(i, [\n    'containerHeight',\n    'contentHeight',\n    'pageY',\n    'railYHeight',\n    'scrollbarY',\n    'scrollbarYHeight',\n    'scrollTop',\n    'y',\n    'scrollbarYRail' ]);\n}\n\nfunction bindMouseScrollHandler(\n  i,\n  ref\n) {\n  var containerHeight = ref[0];\n  var contentHeight = ref[1];\n  var pageY = ref[2];\n  var railYHeight = ref[3];\n  var scrollbarY = ref[4];\n  var scrollbarYHeight = ref[5];\n  var scrollTop = ref[6];\n  var y = ref[7];\n  var scrollbarYRail = ref[8];\n\n  var element = i.element;\n\n  var startingScrollTop = null;\n  var startingMousePageY = null;\n  var scrollBy = null;\n\n  function mouseMoveHandler(e) {\n    if (e.touches && e.touches[0]) {\n      e[pageY] = e.touches[0].pageY;\n    }\n    element[scrollTop] =\n      startingScrollTop + scrollBy * (e[pageY] - startingMousePageY);\n    addScrollingClass(i, y);\n    updateGeometry(i);\n\n    e.stopPropagation();\n    e.preventDefault();\n  }\n\n  function mouseUpHandler() {\n    removeScrollingClass(i, y);\n    i[scrollbarYRail].classList.remove(cls.state.clicking);\n    i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);\n  }\n\n  function bindMoves(e, touchMode) {\n    startingScrollTop = element[scrollTop];\n    if (touchMode && e.touches) {\n      e[pageY] = e.touches[0].pageY;\n    }\n    startingMousePageY = e[pageY];\n    scrollBy =\n      (i[contentHeight] - i[containerHeight]) /\n      (i[railYHeight] - i[scrollbarYHeight]);\n    if (!touchMode) {\n      i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);\n      i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);\n      e.preventDefault();\n    } else {\n      i.event.bind(i.ownerDocument, 'touchmove', mouseMoveHandler);\n    }\n\n    i[scrollbarYRail].classList.add(cls.state.clicking);\n\n    e.stopPropagation();\n  }\n\n  i.event.bind(i[scrollbarY], 'mousedown', function (e) {\n    bindMoves(e);\n  });\n  i.event.bind(i[scrollbarY], 'touchstart', function (e) {\n    bindMoves(e, true);\n  });\n}\n\nfunction keyboard(i) {\n  var element = i.element;\n\n  var elementHovered = function () { return matches(element, ':hover'); };\n  var scrollbarFocused = function () { return matches(i.scrollbarX, ':focus') || matches(i.scrollbarY, ':focus'); };\n\n  function shouldPreventDefault(deltaX, deltaY) {\n    var scrollTop = Math.floor(element.scrollTop);\n    if (deltaX === 0) {\n      if (!i.scrollbarYActive) {\n        return false;\n      }\n      if (\n        (scrollTop === 0 && deltaY > 0) ||\n        (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)\n      ) {\n        return !i.settings.wheelPropagation;\n      }\n    }\n\n    var scrollLeft = element.scrollLeft;\n    if (deltaY === 0) {\n      if (!i.scrollbarXActive) {\n        return false;\n      }\n      if (\n        (scrollLeft === 0 && deltaX < 0) ||\n        (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)\n      ) {\n        return !i.settings.wheelPropagation;\n      }\n    }\n    return true;\n  }\n\n  i.event.bind(i.ownerDocument, 'keydown', function (e) {\n    if (\n      (e.isDefaultPrevented && e.isDefaultPrevented()) ||\n      e.defaultPrevented\n    ) {\n      return;\n    }\n\n    if (!elementHovered() && !scrollbarFocused()) {\n      return;\n    }\n\n    var activeElement = document.activeElement\n      ? document.activeElement\n      : i.ownerDocument.activeElement;\n    if (activeElement) {\n      if (activeElement.tagName === 'IFRAME') {\n        activeElement = activeElement.contentDocument.activeElement;\n      } else {\n        // go deeper if element is a webcomponent\n        while (activeElement.shadowRoot) {\n          activeElement = activeElement.shadowRoot.activeElement;\n        }\n      }\n      if (isEditable(activeElement)) {\n        return;\n      }\n    }\n\n    var deltaX = 0;\n    var deltaY = 0;\n\n    switch (e.which) {\n      case 37: // left\n        if (e.metaKey) {\n          deltaX = -i.contentWidth;\n        } else if (e.altKey) {\n          deltaX = -i.containerWidth;\n        } else {\n          deltaX = -30;\n        }\n        break;\n      case 38: // up\n        if (e.metaKey) {\n          deltaY = i.contentHeight;\n        } else if (e.altKey) {\n          deltaY = i.containerHeight;\n        } else {\n          deltaY = 30;\n        }\n        break;\n      case 39: // right\n        if (e.metaKey) {\n          deltaX = i.contentWidth;\n        } else if (e.altKey) {\n          deltaX = i.containerWidth;\n        } else {\n          deltaX = 30;\n        }\n        break;\n      case 40: // down\n        if (e.metaKey) {\n          deltaY = -i.contentHeight;\n        } else if (e.altKey) {\n          deltaY = -i.containerHeight;\n        } else {\n          deltaY = -30;\n        }\n        break;\n      case 32: // space bar\n        if (e.shiftKey) {\n          deltaY = i.containerHeight;\n        } else {\n          deltaY = -i.containerHeight;\n        }\n        break;\n      case 33: // page up\n        deltaY = i.containerHeight;\n        break;\n      case 34: // page down\n        deltaY = -i.containerHeight;\n        break;\n      case 36: // home\n        deltaY = i.contentHeight;\n        break;\n      case 35: // end\n        deltaY = -i.contentHeight;\n        break;\n      default:\n        return;\n    }\n\n    if (i.settings.suppressScrollX && deltaX !== 0) {\n      return;\n    }\n    if (i.settings.suppressScrollY && deltaY !== 0) {\n      return;\n    }\n\n    element.scrollTop -= deltaY;\n    element.scrollLeft += deltaX;\n    updateGeometry(i);\n\n    if (shouldPreventDefault(deltaX, deltaY)) {\n      e.preventDefault();\n    }\n  });\n}\n\nfunction wheel(i) {\n  var element = i.element;\n\n  function shouldPreventDefault(deltaX, deltaY) {\n    var roundedScrollTop = Math.floor(element.scrollTop);\n    var isTop = element.scrollTop === 0;\n    var isBottom =\n      roundedScrollTop + element.offsetHeight === element.scrollHeight;\n    var isLeft = element.scrollLeft === 0;\n    var isRight =\n      element.scrollLeft + element.offsetWidth === element.scrollWidth;\n\n    var hitsBound;\n\n    // pick axis with primary direction\n    if (Math.abs(deltaY) > Math.abs(deltaX)) {\n      hitsBound = isTop || isBottom;\n    } else {\n      hitsBound = isLeft || isRight;\n    }\n\n    return hitsBound ? !i.settings.wheelPropagation : true;\n  }\n\n  function getDeltaFromEvent(e) {\n    var deltaX = e.deltaX;\n    var deltaY = -1 * e.deltaY;\n\n    if (typeof deltaX === 'undefined' || typeof deltaY === 'undefined') {\n      // OS X Safari\n      deltaX = (-1 * e.wheelDeltaX) / 6;\n      deltaY = e.wheelDeltaY / 6;\n    }\n\n    if (e.deltaMode && e.deltaMode === 1) {\n      // Firefox in deltaMode 1: Line scrolling\n      deltaX *= 10;\n      deltaY *= 10;\n    }\n\n    if (deltaX !== deltaX && deltaY !== deltaY /* NaN checks */) {\n      // IE in some mouse drivers\n      deltaX = 0;\n      deltaY = e.wheelDelta;\n    }\n\n    if (e.shiftKey) {\n      // reverse axis with shift key\n      return [-deltaY, -deltaX];\n    }\n    return [deltaX, deltaY];\n  }\n\n  function shouldBeConsumedByChild(target, deltaX, deltaY) {\n    // FIXME: this is a workaround for <select> issue in FF and IE #571\n    if (!env.isWebKit && element.querySelector('select:focus')) {\n      return true;\n    }\n\n    if (!element.contains(target)) {\n      return false;\n    }\n\n    var cursor = target;\n\n    while (cursor && cursor !== element) {\n      if (cursor.classList.contains(cls.element.consuming)) {\n        return true;\n      }\n\n      var style = get(cursor);\n\n      // if deltaY && vertical scrollable\n      if (deltaY && style.overflowY.match(/(scroll|auto)/)) {\n        var maxScrollTop = cursor.scrollHeight - cursor.clientHeight;\n        if (maxScrollTop > 0) {\n          if (\n            (cursor.scrollTop > 0 && deltaY < 0) ||\n            (cursor.scrollTop < maxScrollTop && deltaY > 0)\n          ) {\n            return true;\n          }\n        }\n      }\n      // if deltaX && horizontal scrollable\n      if (deltaX && style.overflowX.match(/(scroll|auto)/)) {\n        var maxScrollLeft = cursor.scrollWidth - cursor.clientWidth;\n        if (maxScrollLeft > 0) {\n          if (\n            (cursor.scrollLeft > 0 && deltaX < 0) ||\n            (cursor.scrollLeft < maxScrollLeft && deltaX > 0)\n          ) {\n            return true;\n          }\n        }\n      }\n\n      cursor = cursor.parentNode;\n    }\n\n    return false;\n  }\n\n  function mousewheelHandler(e) {\n    var ref = getDeltaFromEvent(e);\n    var deltaX = ref[0];\n    var deltaY = ref[1];\n\n    if (shouldBeConsumedByChild(e.target, deltaX, deltaY)) {\n      return;\n    }\n\n    var shouldPrevent = false;\n    if (!i.settings.useBothWheelAxes) {\n      // deltaX will only be used for horizontal scrolling and deltaY will\n      // only be used for vertical scrolling - this is the default\n      element.scrollTop -= deltaY * i.settings.wheelSpeed;\n      element.scrollLeft += deltaX * i.settings.wheelSpeed;\n    } else if (i.scrollbarYActive && !i.scrollbarXActive) {\n      // only vertical scrollbar is active and useBothWheelAxes option is\n      // active, so let's scroll vertical bar using both mouse wheel axes\n      if (deltaY) {\n        element.scrollTop -= deltaY * i.settings.wheelSpeed;\n      } else {\n        element.scrollTop += deltaX * i.settings.wheelSpeed;\n      }\n      shouldPrevent = true;\n    } else if (i.scrollbarXActive && !i.scrollbarYActive) {\n      // useBothWheelAxes and only horizontal bar is active, so use both\n      // wheel axes for horizontal bar\n      if (deltaX) {\n        element.scrollLeft += deltaX * i.settings.wheelSpeed;\n      } else {\n        element.scrollLeft -= deltaY * i.settings.wheelSpeed;\n      }\n      shouldPrevent = true;\n    }\n\n    updateGeometry(i);\n\n    shouldPrevent = shouldPrevent || shouldPreventDefault(deltaX, deltaY);\n    if (shouldPrevent && !e.ctrlKey) {\n      e.stopPropagation();\n      e.preventDefault();\n    }\n  }\n\n  if (typeof window.onwheel !== 'undefined') {\n    i.event.bind(element, 'wheel', mousewheelHandler);\n  } else if (typeof window.onmousewheel !== 'undefined') {\n    i.event.bind(element, 'mousewheel', mousewheelHandler);\n  }\n}\n\nfunction touch(i) {\n  if (!env.supportsTouch && !env.supportsIePointer) {\n    return;\n  }\n\n  var element = i.element;\n\n  function shouldPrevent(deltaX, deltaY) {\n    var scrollTop = Math.floor(element.scrollTop);\n    var scrollLeft = element.scrollLeft;\n    var magnitudeX = Math.abs(deltaX);\n    var magnitudeY = Math.abs(deltaY);\n\n    if (magnitudeY > magnitudeX) {\n      // user is perhaps trying to swipe up/down the page\n\n      if (\n        (deltaY < 0 && scrollTop === i.contentHeight - i.containerHeight) ||\n        (deltaY > 0 && scrollTop === 0)\n      ) {\n        // set prevent for mobile Chrome refresh\n        return window.scrollY === 0 && deltaY > 0 && env.isChrome;\n      }\n    } else if (magnitudeX > magnitudeY) {\n      // user is perhaps trying to swipe left/right across the page\n\n      if (\n        (deltaX < 0 && scrollLeft === i.contentWidth - i.containerWidth) ||\n        (deltaX > 0 && scrollLeft === 0)\n      ) {\n        return true;\n      }\n    }\n\n    return true;\n  }\n\n  function applyTouchMove(differenceX, differenceY) {\n    element.scrollTop -= differenceY;\n    element.scrollLeft -= differenceX;\n\n    updateGeometry(i);\n  }\n\n  var startOffset = {};\n  var startTime = 0;\n  var speed = {};\n  var easingLoop = null;\n\n  function getTouch(e) {\n    if (e.targetTouches) {\n      return e.targetTouches[0];\n    } else {\n      // Maybe IE pointer\n      return e;\n    }\n  }\n\n  function shouldHandle(e) {\n    if (e.pointerType && e.pointerType === 'pen' && e.buttons === 0) {\n      return false;\n    }\n    if (e.targetTouches && e.targetTouches.length === 1) {\n      return true;\n    }\n    if (\n      e.pointerType &&\n      e.pointerType !== 'mouse' &&\n      e.pointerType !== e.MSPOINTER_TYPE_MOUSE\n    ) {\n      return true;\n    }\n    return false;\n  }\n\n  function touchStart(e) {\n    if (!shouldHandle(e)) {\n      return;\n    }\n\n    var touch = getTouch(e);\n\n    startOffset.pageX = touch.pageX;\n    startOffset.pageY = touch.pageY;\n\n    startTime = new Date().getTime();\n\n    if (easingLoop !== null) {\n      clearInterval(easingLoop);\n    }\n  }\n\n  function shouldBeConsumedByChild(target, deltaX, deltaY) {\n    if (!element.contains(target)) {\n      return false;\n    }\n\n    var cursor = target;\n\n    while (cursor && cursor !== element) {\n      if (cursor.classList.contains(cls.element.consuming)) {\n        return true;\n      }\n\n      var style = get(cursor);\n\n      // if deltaY && vertical scrollable\n      if (deltaY && style.overflowY.match(/(scroll|auto)/)) {\n        var maxScrollTop = cursor.scrollHeight - cursor.clientHeight;\n        if (maxScrollTop > 0) {\n          if (\n            (cursor.scrollTop > 0 && deltaY < 0) ||\n            (cursor.scrollTop < maxScrollTop && deltaY > 0)\n          ) {\n            return true;\n          }\n        }\n      }\n      // if deltaX && horizontal scrollable\n      if (deltaX && style.overflowX.match(/(scroll|auto)/)) {\n        var maxScrollLeft = cursor.scrollWidth - cursor.clientWidth;\n        if (maxScrollLeft > 0) {\n          if (\n            (cursor.scrollLeft > 0 && deltaX < 0) ||\n            (cursor.scrollLeft < maxScrollLeft && deltaX > 0)\n          ) {\n            return true;\n          }\n        }\n      }\n\n      cursor = cursor.parentNode;\n    }\n\n    return false;\n  }\n\n  function touchMove(e) {\n    if (shouldHandle(e)) {\n      var touch = getTouch(e);\n\n      var currentOffset = { pageX: touch.pageX, pageY: touch.pageY };\n\n      var differenceX = currentOffset.pageX - startOffset.pageX;\n      var differenceY = currentOffset.pageY - startOffset.pageY;\n\n      if (shouldBeConsumedByChild(e.target, differenceX, differenceY)) {\n        return;\n      }\n\n      applyTouchMove(differenceX, differenceY);\n      startOffset = currentOffset;\n\n      var currentTime = new Date().getTime();\n\n      var timeGap = currentTime - startTime;\n      if (timeGap > 0) {\n        speed.x = differenceX / timeGap;\n        speed.y = differenceY / timeGap;\n        startTime = currentTime;\n      }\n\n      if (shouldPrevent(differenceX, differenceY)) {\n        e.preventDefault();\n      }\n    }\n  }\n  function touchEnd() {\n    if (i.settings.swipeEasing) {\n      clearInterval(easingLoop);\n      easingLoop = setInterval(function() {\n        if (i.isInitialized) {\n          clearInterval(easingLoop);\n          return;\n        }\n\n        if (!speed.x && !speed.y) {\n          clearInterval(easingLoop);\n          return;\n        }\n\n        if (Math.abs(speed.x) < 0.01 && Math.abs(speed.y) < 0.01) {\n          clearInterval(easingLoop);\n          return;\n        }\n\n        applyTouchMove(speed.x * 30, speed.y * 30);\n\n        speed.x *= 0.8;\n        speed.y *= 0.8;\n      }, 10);\n    }\n  }\n\n  if (env.supportsTouch) {\n    i.event.bind(element, 'touchstart', touchStart);\n    i.event.bind(element, 'touchmove', touchMove);\n    i.event.bind(element, 'touchend', touchEnd);\n  } else if (env.supportsIePointer) {\n    if (window.PointerEvent) {\n      i.event.bind(element, 'pointerdown', touchStart);\n      i.event.bind(element, 'pointermove', touchMove);\n      i.event.bind(element, 'pointerup', touchEnd);\n    } else if (window.MSPointerEvent) {\n      i.event.bind(element, 'MSPointerDown', touchStart);\n      i.event.bind(element, 'MSPointerMove', touchMove);\n      i.event.bind(element, 'MSPointerUp', touchEnd);\n    }\n  }\n}\n\nvar defaultSettings = function () { return ({\n  handlers: ['click-rail', 'drag-thumb', 'keyboard', 'wheel', 'touch'],\n  maxScrollbarLength: null,\n  minScrollbarLength: null,\n  scrollingThreshold: 1000,\n  scrollXMarginOffset: 0,\n  scrollYMarginOffset: 0,\n  suppressScrollX: false,\n  suppressScrollY: false,\n  swipeEasing: true,\n  useBothWheelAxes: false,\n  wheelPropagation: true,\n  wheelSpeed: 1,\n}); };\n\nvar handlers = {\n  'click-rail': clickRail,\n  'drag-thumb': dragThumb,\n  keyboard: keyboard,\n  wheel: wheel,\n  touch: touch,\n};\n\nvar PerfectScrollbar = function PerfectScrollbar(element, userSettings) {\n  var this$1 = this;\n  if ( userSettings === void 0 ) userSettings = {};\n\n  if (typeof element === 'string') {\n    element = document.querySelector(element);\n  }\n\n  if (!element || !element.nodeName) {\n    throw new Error('no element is specified to initialize PerfectScrollbar');\n  }\n\n  this.element = element;\n\n  element.classList.add(cls.main);\n\n  this.settings = defaultSettings();\n  for (var key in userSettings) {\n    this.settings[key] = userSettings[key];\n  }\n\n  this.containerWidth = null;\n  this.containerHeight = null;\n  this.contentWidth = null;\n  this.contentHeight = null;\n\n  var focus = function () { return element.classList.add(cls.state.focus); };\n  var blur = function () { return element.classList.remove(cls.state.focus); };\n\n  this.isRtl = get(element).direction === 'rtl';\n  if (this.isRtl === true) {\n    element.classList.add(cls.rtl);\n  }\n  this.isNegativeScroll = (function () {\n    var originalScrollLeft = element.scrollLeft;\n    var result = null;\n    element.scrollLeft = -1;\n    result = element.scrollLeft < 0;\n    element.scrollLeft = originalScrollLeft;\n    return result;\n  })();\n  this.negativeScrollAdjustment = this.isNegativeScroll\n    ? element.scrollWidth - element.clientWidth\n    : 0;\n  this.event = new EventManager();\n  this.ownerDocument = element.ownerDocument || document;\n\n  this.scrollbarXRail = div(cls.element.rail('x'));\n  element.appendChild(this.scrollbarXRail);\n  this.scrollbarX = div(cls.element.thumb('x'));\n  this.scrollbarXRail.appendChild(this.scrollbarX);\n  this.scrollbarX.setAttribute('tabindex', 0);\n  this.event.bind(this.scrollbarX, 'focus', focus);\n  this.event.bind(this.scrollbarX, 'blur', blur);\n  this.scrollbarXActive = null;\n  this.scrollbarXWidth = null;\n  this.scrollbarXLeft = null;\n  var railXStyle = get(this.scrollbarXRail);\n  this.scrollbarXBottom = parseInt(railXStyle.bottom, 10);\n  if (isNaN(this.scrollbarXBottom)) {\n    this.isScrollbarXUsingBottom = false;\n    this.scrollbarXTop = toInt(railXStyle.top);\n  } else {\n    this.isScrollbarXUsingBottom = true;\n  }\n  this.railBorderXWidth =\n    toInt(railXStyle.borderLeftWidth) + toInt(railXStyle.borderRightWidth);\n  // Set rail to display:block to calculate margins\n  set(this.scrollbarXRail, { display: 'block' });\n  this.railXMarginWidth =\n    toInt(railXStyle.marginLeft) + toInt(railXStyle.marginRight);\n  set(this.scrollbarXRail, { display: '' });\n  this.railXWidth = null;\n  this.railXRatio = null;\n\n  this.scrollbarYRail = div(cls.element.rail('y'));\n  element.appendChild(this.scrollbarYRail);\n  this.scrollbarY = div(cls.element.thumb('y'));\n  this.scrollbarYRail.appendChild(this.scrollbarY);\n  this.scrollbarY.setAttribute('tabindex', 0);\n  this.event.bind(this.scrollbarY, 'focus', focus);\n  this.event.bind(this.scrollbarY, 'blur', blur);\n  this.scrollbarYActive = null;\n  this.scrollbarYHeight = null;\n  this.scrollbarYTop = null;\n  var railYStyle = get(this.scrollbarYRail);\n  this.scrollbarYRight = parseInt(railYStyle.right, 10);\n  if (isNaN(this.scrollbarYRight)) {\n    this.isScrollbarYUsingRight = false;\n    this.scrollbarYLeft = toInt(railYStyle.left);\n  } else {\n    this.isScrollbarYUsingRight = true;\n  }\n  this.scrollbarYOuterWidth = this.isRtl ? outerWidth(this.scrollbarY) : null;\n  this.railBorderYWidth =\n    toInt(railYStyle.borderTopWidth) + toInt(railYStyle.borderBottomWidth);\n  set(this.scrollbarYRail, { display: 'block' });\n  this.railYMarginHeight =\n    toInt(railYStyle.marginTop) + toInt(railYStyle.marginBottom);\n  set(this.scrollbarYRail, { display: '' });\n  this.railYHeight = null;\n  this.railYRatio = null;\n\n  this.reach = {\n    x:\n      element.scrollLeft <= 0\n        ? 'start'\n        : element.scrollLeft >= this.contentWidth - this.containerWidth\n        ? 'end'\n        : null,\n    y:\n      element.scrollTop <= 0\n        ? 'start'\n        : element.scrollTop >= this.contentHeight - this.containerHeight\n        ? 'end'\n        : null,\n  };\n\n  this.isAlive = true;\n\n  this.settings.handlers.forEach(function (handlerName) { return handlers[handlerName](this$1); });\n\n  this.lastScrollTop = Math.floor(element.scrollTop); // for onScroll only\n  this.lastScrollLeft = element.scrollLeft; // for onScroll only\n  this.event.bind(this.element, 'scroll', function (e) { return this$1.onScroll(e); });\n  updateGeometry(this);\n};\n\nPerfectScrollbar.prototype.update = function update () {\n  if (!this.isAlive) {\n    return;\n  }\n\n  // Recalcuate negative scrollLeft adjustment\n  this.negativeScrollAdjustment = this.isNegativeScroll\n    ? this.element.scrollWidth - this.element.clientWidth\n    : 0;\n\n  // Recalculate rail margins\n  set(this.scrollbarXRail, { display: 'block' });\n  set(this.scrollbarYRail, { display: 'block' });\n  this.railXMarginWidth =\n    toInt(get(this.scrollbarXRail).marginLeft) +\n    toInt(get(this.scrollbarXRail).marginRight);\n  this.railYMarginHeight =\n    toInt(get(this.scrollbarYRail).marginTop) +\n    toInt(get(this.scrollbarYRail).marginBottom);\n\n  // Hide scrollbars not to affect scrollWidth and scrollHeight\n  set(this.scrollbarXRail, { display: 'none' });\n  set(this.scrollbarYRail, { display: 'none' });\n\n  updateGeometry(this);\n\n  processScrollDiff(this, 'top', 0, false, true);\n  processScrollDiff(this, 'left', 0, false, true);\n\n  set(this.scrollbarXRail, { display: '' });\n  set(this.scrollbarYRail, { display: '' });\n};\n\nPerfectScrollbar.prototype.onScroll = function onScroll (e) {\n  if (!this.isAlive) {\n    return;\n  }\n\n  updateGeometry(this);\n  processScrollDiff(this, 'top', this.element.scrollTop - this.lastScrollTop);\n  processScrollDiff(\n    this,\n    'left',\n    this.element.scrollLeft - this.lastScrollLeft\n  );\n\n  this.lastScrollTop = Math.floor(this.element.scrollTop);\n  this.lastScrollLeft = this.element.scrollLeft;\n};\n\nPerfectScrollbar.prototype.destroy = function destroy () {\n  if (!this.isAlive) {\n    return;\n  }\n\n  this.event.unbindAll();\n  remove(this.scrollbarX);\n  remove(this.scrollbarY);\n  remove(this.scrollbarXRail);\n  remove(this.scrollbarYRail);\n  this.removePsClasses();\n\n  // unset elements\n  this.element = null;\n  this.scrollbarX = null;\n  this.scrollbarY = null;\n  this.scrollbarXRail = null;\n  this.scrollbarYRail = null;\n\n  this.isAlive = false;\n};\n\nPerfectScrollbar.prototype.removePsClasses = function removePsClasses () {\n  this.element.className = this.element.className\n    .split(' ')\n    .filter(function (name) { return !name.match(/^ps([-_].+|)$/); })\n    .join(' ');\n};\n\nexport default PerfectScrollbar;\n//# sourceMappingURL=perfect-scrollbar.esm.js.map\n","import { Resources } from '../../resources/resources';\r\nimport { checkBrowserCompatibility } from '../../view/helpers';\r\nimport { GalleryRenderOptions, Events, DragDropMimeType, parseDragData, _sessionList, getBarcodeUrl, getSnapshotUrl, getThumbnailUrl } from './components';\r\nimport { default as Ps } from 'perfect-scrollbar';\r\nimport 'perfect-scrollbar/css/perfect-scrollbar.css';\r\nimport $ from 'jquery';\r\n\r\n// find the currently visible images for horizontal scrolling and loads them\r\nfunction loadVisibleX() {\r\n    var rail = $(this.element).find(\".ps-scrollbar-x-rail\");\r\n    var left = -Infinity;\r\n    var right = Infinity;\r\n\r\n    if (rail && rail.position()) {\r\n        left = rail.position().left;\r\n        right = left + rail.width();\r\n    }\r\n\r\n    if (left === 0 && right === 0) {\r\n        left = -Infinity;\r\n        right = Infinity;\r\n    }\r\n\r\n    var self = this;\r\n\r\n    $(this.element).find(\"li.lazy\").each(function () {\r\n        var el = $(this);\r\n        var elLeft = el.position().left;\r\n        var elRight = elLeft + el.width();\r\n        if (!(elLeft > right || elRight < left)) {\r\n            loadImage.call(self, el);\r\n        }\r\n    });\r\n}\r\n\r\n// find the currently visible images for vertical scrolling and loads them\r\nfunction loadVisibleY() {\r\n    var rail = $(this.element).find(\".ps-scrollbar-y-rail\");\r\n    var top = -Infinity;\r\n    var bottom = Infinity;\r\n\r\n    if (rail && rail.position()) {\r\n        top = rail.position().top;\r\n        bottom = top + rail.height();\r\n    }\r\n\r\n    if (top === bottom) {\r\n        top = -Infinity;\r\n        bottom = Infinity;\r\n    }\r\n\r\n    var self = this;\r\n\r\n    $(this.element).find(\"li.lazy\").each(function () {\r\n        var el = $(this);\r\n        var elTop = el.position().top;\r\n        var elBottom = elTop + el.height();\r\n\r\n        if (!(elTop > bottom || elBottom < top)) {\r\n            loadImage.call(self, el);\r\n        }\r\n    });\r\n}\r\n\r\n// lazy loading background images\r\nfunction loadImage(li) {\r\n    var self = this;\r\n    li.removeClass(\"lazy\");\r\n    var div = li.find(\"div[data-img]\");\r\n    var src = div.data(\"img\");\r\n    var rot = div.data(\"rotation\");\r\n\r\n    $(\"<img />\").bind(\"load\", function () {\r\n        li.removeClass(\"loading\");\r\n        div.css(\"background-image\", \"url(\\\"\" + src + \"\\\")\");\r\n\r\n        if (self.mode === \"vertical\") {\r\n            div.css(\"width\", \"100%\");\r\n        }\r\n        else {\r\n            div.css(\"width\", self.thumbnailWidth + \"px\");\r\n        }\r\n\r\n        div.css(\"height\", self.thumbnailHeight + \"px\");\r\n        div.css(\"margin\", \"0 auto\");\r\n        if (rot) {\r\n            var w = this.width;\r\n            var h = this.height;\r\n            var rad = rot / (180 / Math.PI);\r\n            var factorWidth = w / (w * Math.abs(Math.cos(rad)) + h * Math.abs(Math.sin(rad)));\r\n            var factorHeight = h / (w * Math.abs(Math.sin(rad)) + h * Math.abs(Math.cos(rad)));\r\n            div.css(\"transform\", \"rotate(\" + rot + \"deg) scale(\" + Math.min(factorWidth, factorHeight) + \")\");\r\n        }\r\n    }).bind(\"error\", function () {\r\n        li.removeClass(\"loading\");\r\n        div.addClass(\"no-image\");\r\n        div.html(Resources.translate(\"Failed to load image\"));\r\n\r\n        if (self.mode === \"vertical\") {\r\n            div.css(\"width\", \"100%\");\r\n        }\r\n        else {\r\n            div.css(\"width\", self.thumbnailWidth + \"px\");\r\n        }\r\n\r\n        div.css(\"height\", self.thumbnailHeight + \"px\");\r\n        div.css(\"margin\", \"0 auto\");\r\n        div.css(\"padding-top\", (self.thumbnailHeight / 3) + \"px\");\r\n\r\n        var a = li.find(\"a\");\r\n        var serverUrl = a.data(\"server\");\r\n        var path = a.data(\"path\");\r\n        self.fireEvent(Events.SlideInfoError, { serverUrl: serverUrl, path: path });\r\n    }).attr(\"src\", src);\r\n\r\n    // load barcode if it exists\r\n    var barcodeImage = li.find(\"img.barcode\");\r\n    if (barcodeImage.length !== 0) {\r\n        barcodeImage.bind(\"error\", function () {\r\n            barcodeImage.hide();\r\n        });\r\n\r\n        barcodeImage.attr(\"src\", barcodeImage.data(\"src\"));\r\n        barcodeImage.css(\"width\", Math.round(self.thumbnailWidth * 0.4) + \"px\");\r\n        barcodeImage.css(\"display\", \"block\");\r\n    }\r\n}\r\n\r\nfunction imageClick(element, fromUserInteraction) {\r\n    var $el = $(element);\r\n\r\n    var alreadySelected = $el.parent().hasClass(\"selected\");\r\n    if (alreadySelected) {\r\n        $el.parent().removeClass(\"selected\");\r\n        this.fireEvent(Events.SlideDeSelected, { serverUrl: $el.data(\"server\"), path: $el.data(\"path\"), index: $el.parent().index(), userInteraction: fromUserInteraction === true });\r\n    }\r\n\r\n    if (!this.multiSelect) {\r\n        $(this.element).find(\"ul li\").removeClass(\"selected\");\r\n    }\r\n\r\n    if (!alreadySelected) {\r\n        $el.parent().addClass(\"selected\");\r\n        this.fireEvent(Events.SlideSelected, { serverUrl: $el.data(\"server\"), path: $el.data(\"path\"), index: $el.parent().index(), userInteraction: fromUserInteraction === true });\r\n    }\r\n}\r\n\r\nfunction printMessage(message) {\r\n    var style = \" style=' \";\r\n    if (this.thumbnailHeight > 0) {\r\n        style += \"height: \" + this.thumbnailHeight + \"px!important; \";\r\n    }\r\n\r\n    style += \"' \";\r\n\r\n    this.element.innerHTML = \"<ul><li class='empty-message' \" + style + \"><span>\" + message + \"</span></li></ul>\";\r\n}\r\n\r\nfunction renderImages(serverUrl, sessionId, images, doneCb, append) {\r\n    var _this = this;\r\n    if (images.length === 0) {\r\n        printMessage.call(_this, Resources.translate(\"No images found\"));\r\n        if (typeof doneCb === \"function\") {\r\n            doneCb();\r\n        }\r\n\r\n        return;\r\n    }\r\n\r\n    var showBarcodeNormal = this.renderOptions == GalleryRenderOptions.All;\r\n    var showBarcodeOnly = this.renderOptions == GalleryRenderOptions.Barcode;\r\n\r\n    var imagesObj = [];\r\n    for (var i = 0; i < images.length; i++) {\r\n        var img = { path: images[i], hasBarcode: true, rotation: 0 };\r\n\r\n        if (typeof images[i] === 'object' && images[i].hasOwnProperty('path')) {\r\n            img.path = images[i].path;\r\n        }\r\n\r\n        if (typeof images[i] === 'object' && images[i].hasOwnProperty('rotation')) {\r\n            img.rotation = images[i].rotation;\r\n        }\r\n\r\n        if (typeof images[i] === 'object' && images[i].hasOwnProperty('snapshotParameters')) {\r\n            img.snapshotParameters = images[i].snapshotParameters;\r\n        }\r\n\r\n        img.hasBarcode = true;\r\n        imagesObj.push(img);\r\n    }\r\n\r\n    if (showBarcodeNormal || showBarcodeOnly) {\r\n        this.context.getImagesInfo({\r\n            serverUrl: serverUrl, images: imagesObj.map(function (r) { return r.path; }), success: function (sessionId, imagesInfo) {\r\n                for (var i = 0; i < imagesInfo.length; i++) {\r\n                    var hasBarcode = imagesInfo[i].AssociatedImageTypes.indexOf(\"Barcode\") > -1;\r\n                    for (var j = 0; j < imagesObj.length; j++) {\r\n                        if (imagesObj[j].path == imagesInfo[i].Filename) {\r\n                            imagesObj[j].hasBarcode = hasBarcode;\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                continueRenderImages.call(_this, serverUrl, sessionId, imagesObj, doneCb, append);\r\n            },\r\n            failure: function () {\r\n                continueRenderImages.call(_this, serverUrl, sessionId, imagesObj, doneCb, append);\r\n            }\r\n        });\r\n    }\r\n    else {\r\n        continueRenderImages.call(_this, serverUrl, sessionId, imagesObj, doneCb, append);\r\n    }\r\n}\r\n\r\nfunction continueRenderImages(serverUrl, sessionId, imagesObj, doneCb, append) {\r\n    var _this = this;\r\n\r\n    var showBarcodeNormal = this.renderOptions == GalleryRenderOptions.All;\r\n    var showBarcodeOnly = this.renderOptions == GalleryRenderOptions.Barcode;\r\n\r\n    var loadingImgMarginX = Math.floor(_this.thumbnailWidth / 3);\r\n    var loadingImgMarginY = Math.floor(_this.thumbnailHeight / 3);\r\n    var imageStyle = \"margin: \" + loadingImgMarginY + \"px \" + (_this.mode === \"horizontal\" || _this.mode === \"grid\" ? loadingImgMarginX + \"px\" : \"auto\") + \"; width: \" + loadingImgMarginX + \"px; height: \" + loadingImgMarginY + \"px;\";\r\n    var aStyle = \"\";\r\n    var listStyle = \"\";\r\n    var liStyle = \"\";\r\n    var tw = _this.thumbnailWidth,\r\n        th = _this.thumbnailHeight;\r\n\r\n    if (_this.mode === \"horizontal\") {\r\n        listStyle = \" style='width: \" + (imagesObj.length * _this.thumbnailWidth) + \"px; height: \" + _this.thumbnailHeight + \"px; overflow: hidden;' \";\r\n        aStyle = \" style='max-width: \" + _this.thumbnailWidth + \"px;' \";\r\n        tw = 0;\r\n    }\r\n    else if (_this.mode === \"vertical\") {\r\n        th = 0;\r\n    }\r\n    else if (_this.mode === \"grid\") {\r\n        // aStyle = \" style='width: \" + (_this.thumbnailWidth + 32) + \"px;height: \" + (_this.thumbnailHeight + 32) + \"px;' \";\r\n        aStyle = \" style='width: auto;height: \" + (_this.thumbnailHeight + 32) + \"px;' \";\r\n        liStyle = \" style='width: \" + (_this.thumbnailWidth + 32) + \"px;' \";\r\n        tw = 0;\r\n    }\r\n\r\n    var html = \"<ul\" + listStyle + \">\";\r\n\r\n    $(_this.element).find(\"ul li.emptyli\").remove();\r\n    if (append === true) {\r\n        html = \"\";\r\n    }\r\n\r\n    for (var i = 0; i < imagesObj.length; i++) {\r\n        var path = imagesObj[i].path;\r\n        var extrastyle = '';\r\n        var extradata = '';\r\n\r\n        var thumbUrl = getThumbnailUrl(serverUrl, sessionId, path, 0, tw, th);\r\n\r\n        if (imagesObj[i].hasOwnProperty('snapshotParameters')) {\r\n            thumbUrl = getSnapshotUrl(serverUrl, sessionId, path, imagesObj[i].snapshotParameters, tw, th, \"jpg\");\r\n        }\r\n        else if (imagesObj[i].hasOwnProperty('rotation')) {\r\n            var rInt = parseInt(imagesObj[i].rotation);\r\n            if (!isNaN(rInt) && rInt != 0) {\r\n                extrastyle = 'transform:rotate(' + rInt + 'deg);';\r\n                extradata = 'data-rotation=\"' + rInt + '\"';\r\n            }\r\n        }\r\n\r\n        var barcodeUrl = getBarcodeUrl(serverUrl, sessionId, path, _this.barcodeRotation ? _this.barcodeRotation : 0);\r\n\r\n        html +=\r\n            \"<li draggable='true' class='lazy loading'\" + liStyle + \"><a \" + aStyle + \" data-server='\" + serverUrl + \"' data-path='\" + path + \"' href='#'>\";\r\n        if (_this.showFileName) {\r\n            if (typeof _this.filenameCallback === \"function\") {\r\n                html += \"<span>\" + _this.filenameCallback(serverUrl, path) + \"</span>\";\r\n            }\r\n            else {\r\n                html += \"<span>\" + path.split('/').pop() + \"</span>\";\r\n            }\r\n        }\r\n\r\n        html += \"<div \" + extradata + \" data-img='\" + (showBarcodeOnly ? barcodeUrl : thumbUrl) + \"' style=' \" + imageStyle + extrastyle + \"'></div>\";\r\n\r\n        if (showBarcodeNormal && imagesObj[i].hasBarcode) {\r\n            html += '<img class=\"barcode ' + (showBarcodeNormal ? \"\" : \"hidden\") + ' \" data-src=\"' + barcodeUrl + '\" />';\r\n        }\r\n\r\n        html += '</a>';\r\n\r\n        if (typeof _this.additionalHtmlCallback === \"function\") {\r\n            html += _this.additionalHtmlCallback(imagesObj[i]);\r\n        }\r\n\r\n        html += '</li>';\r\n    }\r\n\r\n    if (this.mode === \"grid\") {\r\n        for (var p = 0; p < 10; p++) {\r\n            html += \"<li class='emptyli' \" + liStyle + \" ></li>\";\r\n        }\r\n    }\r\n\r\n    if (append !== true) {\r\n        html += \"</ul>\";\r\n    }\r\n\r\n    if (append === true) {\r\n        $(_this.element).find(\"ul\").append(html);\r\n    }\r\n    else {\r\n        _this.element.innerHTML = html;\r\n    }\r\n\r\n    $(_this.element).find(\"ul li:not(.emptyli)\").each(function (index, element) {\r\n        element.addEventListener(\"dragstart\", dragstart.bind(this, element), false);\r\n    });\r\n\r\n    if (_this.mode === \"horizontal\") {\r\n        // fix width once loaded\r\n        var horUl = $(_this.element).find(\"ul\");\r\n        var horWidth = horUl.outerWidth(true) - horUl.width();\r\n\r\n        $(_this.element).find(\"ul li\").each(function () {\r\n            horWidth += $(this).outerWidth(true) + 2;\r\n        });\r\n\r\n        horUl.css(\"width\", horWidth + \"px\");\r\n        horUl.css(\"height\", \"\");\r\n        horUl.css(\"overflow\", \"\");\r\n    }\r\n\r\n    $(_this.element).find(\"ul li a\").click(function (ev) {\r\n        ev.preventDefault();\r\n        imageClick.call(_this, this, true);\r\n    });\r\n\r\n    if (append !== true) {\r\n        _this.ps = new Ps(_this.element, { useBothWheelAxes: true, wheelPropagation: true, swipePropagation: true });\r\n    }\r\n    else {\r\n        _this.ps.update();\r\n    }\r\n\r\n    // bind scroll events for lazy loading\r\n    if (_this.mode === \"horizontal\") {\r\n        $(document).on('ps-scroll-x', function () {\r\n            clearTimeout(_this.lazyLoadTimeOut);\r\n            _this.lazyLoadTimeOut = setTimeout(loadVisibleX.bind(_this), 500);\r\n        });\r\n\r\n        loadVisibleX.call(_this);\r\n    }\r\n    else {\r\n        $(document).on('ps-scroll-y', function () {\r\n            clearTimeout(_this.lazyLoadTimeOut);\r\n            _this.lazyLoadTimeOut = setTimeout(loadVisibleY.bind(_this), 500);\r\n        });\r\n\r\n        loadVisibleY.call(_this);\r\n    }\r\n\r\n    if (typeof doneCb === \"function\") {\r\n        doneCb();\r\n    }\r\n}\r\n/**\r\n * A private function which load slides from one server only\r\n * @param  {string} serverUrl - The URL of the PMA.core server to get images from\r\n * @param  {string[]|Object[]} images - An array of strings that contains the paths of the images to load or an array of objects that contains the path and rotation of the images as desribed below\r\n * @param  {string} images.path - The path of the image to load\r\n * @param  {string} images.rotation - The rotation of the image in degrees\r\n * @param  {Components~snapshotParameters} images.snapshotParameters - Optional snapshot parameters to show \r\n * @param  {function} [doneCb] - Called when image loading is complete\r\n */\r\nfunction loadSlides(serverUrl, images, doneCb) {\r\n    if (this.ps) {\r\n        this.ps.destroy();\r\n    }\r\n\r\n    var _this = this;\r\n    _this.context.getSession(serverUrl, function (sessionId) {\r\n        renderImages.call(_this, serverUrl, sessionId, images, doneCb);\r\n    });\r\n}\r\n\r\nfunction refresh() {\r\n    if (this.lastLoadedImages.length > 0) {\r\n        for (var i = 0; i < this.lastLoadedImages.length; i++) {\r\n            renderImages.call(this, this.lastLoadedImages[i].serverUrl, this.lastLoadedImages[i].sessionId, this.lastLoadedImages[i].images, null);\r\n        }\r\n    }\r\n}\r\n\r\nfunction ondragover(ev) {\r\n    ev.preventDefault();\r\n    var types = ev.dataTransfer.types;\r\n    let hasData = false;\r\n    if (types) {\r\n        if (types.indexOf) {\r\n            hasData = types.indexOf(\"application/x-fancytree-node\") > -1 || types.indexOf(DragDropMimeType) > -1;\r\n        }\r\n        else if (types.contains) {\r\n            // in IE and EDGE types is DOMStringList\r\n            hasData = types.contains(\"application/x-fancytree-node\") || types.contains(DragDropMimeType);\r\n        }\r\n\r\n        // var nodeData = PMA.UI.Components.parseDragData(ev.dataTransfer);\r\n        if (hasData) {\r\n            if (ev.altKey) {\r\n                ev.dataTransfer.dropEffect = \"move\";\r\n            }\r\n            else {\r\n                ev.dataTransfer.dropEffect = \"copy\";\r\n            }\r\n\r\n            return;\r\n        }\r\n\r\n        ev.dataTransfer.dropEffect = \"none\";\r\n    }\r\n}\r\n\r\nfunction ondrop(ev) {\r\n    ev.preventDefault();\r\n    var self = this;\r\n    var nodeData = parseDragData(ev.dataTransfer);\r\n    var append = ev.altKey == false;\r\n    if (nodeData && nodeData.path && nodeData.serverUrl && nodeData.source !== \"gallery\") {\r\n        if (nodeData.isFolder) {\r\n            this.context.getSlides({\r\n                serverUrl: nodeData.serverUrl,\r\n                path: nodeData.path,\r\n                success: function (sessionId, files) {\r\n                    if (files == null || files.length == 0) {\r\n                        self.fireEvent(Events.Dropped, { serverUrl: nodeData.serverUrl, path: nodeData.path, isFolder: true, append: append && self.lastLoadedImages.length > 1 });\r\n                        return;\r\n                    }\r\n\r\n                    self.lastLoadedImages.push([{ serverUrl: nodeData.serverUrl, sessionId: sessionId, images: files }]);\r\n                    renderImages.call(self, nodeData.serverUrl, sessionId, files, function () {\r\n                        self.fireEvent(Events.Dropped, { serverUrl: nodeData.serverUrl, path: nodeData.path, isFolder: true, append: append && self.lastLoadedImages.length > 1 });\r\n                    }, append && self.lastLoadedImages.length > 1);\r\n                },\r\n                failure: function (error) {\r\n                    console.error(\"Error loading slides from directory\");\r\n                }\r\n            });\r\n        }\r\n        else {\r\n            var imageArray = [{ serverUrl: nodeData.serverUrl, path: nodeData.path }];\r\n\r\n            self.context.getSession(nodeData.serverUrl, function (sessionId) {\r\n                self.lastLoadedImages.push({ serverUrl: nodeData.serverUrl, sessionId: sessionId, images: imageArray });\r\n                renderImages.call(self, nodeData.serverUrl, sessionId, imageArray, function () {\r\n                    self.fireEvent(Events.Dropped, { serverUrl: nodeData.serverUrl, path: nodeData.path, isFolder: false, append: append && self.lastLoadedImages.length > 1 });\r\n                }, append && self.lastLoadedImages.length > 1);\r\n            });\r\n\r\n            return;\r\n        }\r\n    }\r\n}\r\n\r\nfunction initializeDropZone() {\r\n    if (this.element) {\r\n        this.element.addEventListener(\"drop\", ondrop.bind(this), false);\r\n        this.element.addEventListener(\"dragover\", ondragover.bind(this), false);\r\n    }\r\n}\r\n\r\nfunction dragstart(element, ev) {\r\n    var link = $(element).find(\"a\");\r\n    if (link) {\r\n        var d = JSON.stringify({\r\n            serverUrl: link.data(\"server\"),\r\n            path: link.data(\"path\"),\r\n            isFolder: false,\r\n            source: \"gallery\"\r\n        });\r\n\r\n        ev.dataTransfer.setData(\"text\", d);\r\n        ev.dataTransfer.setData(DragDropMimeType, d);\r\n    }\r\n}\r\n\r\n/**\r\n * Function that returns a string to be displayed on top of a thumbnail\r\n * @callback Gallery~callback\r\n * @param {string} serverUrl - The serverUrl of the image\r\n * @param {string} filename - The virtual path of the image\r\n * @returns {string}\r\n */\r\n/**\r\n * Function that returns a string to be displayed on below a thumbnail\r\n * @callback Gallery~additionalHtmlCallback\r\n * @param {object} image - The image object used to render this thumbnail\r\n * @returns {string}\r\n */\r\n/**\r\n * Represents a UI component that shows image thumbnails. Provides events to handle click and multiple selection, as well as built-in lazy loading functionality.\r\n * @param {Context} context\r\n * @param {object} options - Configuration options\r\n * @param {string|HTMLElement} options.element - The element that hosts the gallery. It can be either a valid CSS selector or an HTMLElement instance.\r\n * @param {Number} options.thumbnailWidth - The desired width of the displayed thumbnails.\r\n * @param {Number} options.thumbnailHeight - The desired height of the displayed thumbnails.\r\n * @param {string} [options.mode=\"horizontal\"] - \"horizontal\", \"vertical\" or \"grid\"\r\n * @param {Gallery~callback} [options.filenameCallback] - Callback to override the displayed name of each image.\r\n * @param {Gallery~additionalHtmlCallback} [options.additionalHtmlCallback] - Callback to provide additional HTML to render on top of the thumbnail.\r\n * @param {boolean} [options.showFileName=false] - Whether or not to print each image's name\r\n * @param {GalleryRenderOptions} [options.renderOptions = PMA.UI.Components.GalleryRenderOptions.All] - Whether to render thumbnail only, barcode only or both\r\n * @param {Number} [options.barcodeRotation=0] - Rotation of the barcode in steps of 90 degrees\r\n * @param {boolean} [options.multiSelect=false] - Whether or not to allow multiple files to be selected\r\n * @fires PMA.UI.Components.Events#SlideInfoError\r\n * @fires PMA.UI.Components.Events#SlideSelected\r\n * @fires PMA.UI.Components.Events#SlideDeSelected\r\n * @fires PMA.UI.Components.Events#Dropped\r\n * @tutorial 03-gallery\r\n * @tutorial 04-tree\r\n */\r\nexport class Gallery {\r\n    constructor(context, options) {\r\n        if (!checkBrowserCompatibility()) {\r\n            return;\r\n        }\r\n\r\n        if (options.element instanceof HTMLElement) {\r\n            this.element = options.element;\r\n        }\r\n        else if (typeof options.element == \"string\") {\r\n            var el = document.querySelector(options.element);\r\n            if (!el) {\r\n                console.error(\"Invalid selector for element\");\r\n            }\r\n            else {\r\n                this.element = el;\r\n            }\r\n        }\r\n        else {\r\n            console.error(\"Invalid element\");\r\n            return;\r\n        }\r\n\r\n        if (isNaN(options.thumbnailHeight) || isNaN(options.thumbnailWidth) || options.thumbnailHeight <= 0 || options.thumbnailWidth <= 0) {\r\n            console.error(\"thumbnailWidth & thumbnailHeight must be positive integers\");\r\n            return;\r\n        }\r\n\r\n        this.listeners = {};\r\n        this.listeners[Events.SlideDeSelected] = [];\r\n        this.listeners[Events.SlideSelected] = [];\r\n        this.listeners[Events.SlideInfoError] = [];\r\n        this.listeners[Events.Dropped] = [];\r\n\r\n        this.filenameCallback = options.filenameCallback;\r\n        this.additionalHtmlCallback = options.additionalHtmlCallback;\r\n        this.multiSelect = options.multiSelect === true;\r\n        this.lazyLoadTimeOut = 0;\r\n        this.showFileName = options.showFileName === true;\r\n        this.barcodeRotation = options.barcodeRotation;\r\n        this.context = context;\r\n        this.thumbnailWidth = options.thumbnailWidth;\r\n        this.thumbnailHeight = options.thumbnailHeight;\r\n\r\n        // a helper array that holds the last loaded images as objects  { serverUrl, sessionId, imageArray }\r\n        this.lastLoadedImages = [];\r\n\r\n        if (options.mode !== \"horizontal\" && options.mode !== \"vertical\" && options.mode !== \"grid\") {\r\n            options.mode = \"horizontal\";\r\n        }\r\n\r\n        this.renderOptions = options.renderOptions ? options.renderOptions : GalleryRenderOptions.All;\r\n\r\n        // for backwards compatibility keep the showBarcode option\r\n        if (options.showBarcode === false) {\r\n            this.renderOptions = GalleryRenderOptions.Thumbnail;\r\n        }\r\n        this.mode = options.mode;\r\n\r\n        $(this.element).addClass(\"pma-ui-gallery\");\r\n        if (this.mode === \"vertical\") {\r\n            $(this.element).addClass(\"vertical\");\r\n        }\r\n        else if (this.mode === \"grid\") {\r\n            $(this.element).addClass(\"grid\");\r\n        }\r\n\r\n        printMessage.call(this, Resources.translate(\"No images found\"));\r\n\r\n        initializeDropZone.call(this);\r\n    }\r\n    /**\r\n     * Attaches an event listener\r\n     * @param {PMA.UI.Components.Events} eventName - The name of the event to listen to\r\n     * @param {function} callback - The function to call when the event occurs\r\n     */\r\n    listen(eventName, callback) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" is not a valid event\");\r\n        }\r\n\r\n        this.listeners[eventName].push(callback);\r\n    }\r\n    // fires an event\r\n    fireEvent(eventName, eventArgs) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" does not exist\");\r\n            return;\r\n        }\r\n\r\n        for (var i = 0, max = this.listeners[eventName].length; i < max; i++) {\r\n            this.listeners[eventName][i].call(this, eventArgs);\r\n        }\r\n    }\r\n    /**\r\n     * Loads the thumbnails of all the images found directly under a given directory\r\n     * @param  {string} serverUrl - The URL of the PMA.core server to get images from\r\n     * @param  {string} directory - The path of a directory to load images from\r\n     * @param  {function} [doneCb] - Called when image loading is complete\r\n     */\r\n    loadDirectory(serverUrl, directory, doneCb) {\r\n        if (this.ps) {\r\n            this.ps.destroy();\r\n        }\r\n        var _this = this;\r\n        this.lastLoadedImages = [];\r\n\r\n        this.context.getSlides({\r\n            serverUrl: serverUrl,\r\n            path: directory,\r\n            success: function (sessionId, files) {\r\n                _this.lastLoadedImages = [{ serverUrl: serverUrl, sessionId: sessionId, images: files }];\r\n                renderImages.call(_this, serverUrl, sessionId, files, doneCb);\r\n            },\r\n            failure: function (error) {\r\n                _this.element.innerHTML = error.Message;\r\n                _this.fireEvent(Events.SlideInfoError, { serverUrl: serverUrl, path: directory, message: error.Message });\r\n            }\r\n        });\r\n    }\r\n    /**\r\n     * Loads the thumbnails of all the provided images\r\n     * @param {Object[]} images - An array of image objects containing the path, rotation and server url for each image to load\r\n     * @param {string} images.serverUrl - The URL of the PMA.core server to load this image from\r\n     * @param {string} images.path - The path of the image to load\r\n     * @param {string} images.rotation - The rotation of the image in degrees\r\n     * @param {function} doneCb - Called when image loading is complete\r\n     */\r\n    loadSlides(images, doneCb) {\r\n        if (typeof images === \"string\") {\r\n            // the old deprecated function is used if the first parameter is of type string, corresponding to the server url\r\n            // loadSlides = function(serverUrl, images, doneCb)\r\n            loadSlides.call(this, arguments[0], arguments[1], arguments[2]);\r\n            return;\r\n        }\r\n\r\n        if (this.ps) {\r\n            this.ps.destroy();\r\n        }\r\n\r\n        var servers = {};\r\n        var serverUrls = [];\r\n        var _this = this;\r\n\r\n        if (!images || images.length == 0) {\r\n            // call with empty parameters to clear all \r\n            renderImages.call(this, \"\", \"\", [], doneCb);\r\n            return;\r\n        }\r\n\r\n        for (var i = 0; i < images.length; i++) {\r\n            if (images[i].serverUrl) {\r\n                if (!servers.hasOwnProperty(images[i].serverUrl)) {\r\n                    servers[images[i].serverUrl] = [];\r\n                    serverUrls.push(images[i].serverUrl);\r\n                }\r\n\r\n                servers[images[i].serverUrl].push({ path: images[i].path, rotation: images[i].rotation });\r\n            }\r\n        }\r\n\r\n        _this.lastLoadedImages = [];\r\n        var c = 0;\r\n        var getSessionFunc = (function (serverUrl, imageArray, gallery, cb, count, done) {\r\n            gallery.context.getSession(serverUrl, function (sessionId) {\r\n                _this.lastLoadedImages.push({ serverUrl: serverUrl, sessionId: sessionId, images: imageArray });\r\n                renderImages.call(gallery, serverUrl, sessionId, imageArray, function () {\r\n                    if (done && typeof cb === \"function\") {\r\n                        cb();\r\n                    }\r\n                }, count != 0);\r\n            });\r\n        });\r\n\r\n        for (i = 0; i < serverUrls.length; i++) {\r\n            getSessionFunc(serverUrls[i], servers[serverUrls[i]], _this, doneCb, c, ++c >= serverUrls.length);\r\n        }\r\n    }\r\n    /**\r\n     * Selects or deselects a slide\r\n     * @param  {Number} index - The index of the slide to select\r\n     * @fires PMA.UI.Components.Events#SlideSelected\r\n     * @fires PMA.UI.Components.Events#SlideDeSelected\r\n     */\r\n    selectSlide(index) {\r\n        if (index === undefined || index === null) {\r\n            $(this.element).find(\"ul li\").removeClass(\"selected\");\r\n            return;\r\n        }\r\n\r\n        var el = $(this.element).find(\"ul li:nth-child(\" + (index + 1) + \") a\")[0];\r\n        imageClick.call(this, el, false);\r\n    }\r\n    /**\r\n     * Highlights or unhighlights a slide\r\n     * @param  {Number} index - The index of the slide to highlight\r\n     * @param  {boolean} highlight - True to highlight, otherwise false\r\n     */\r\n    highlightSlide(index, highlight) {\r\n        if (index === undefined || index === null) {\r\n            $(this.element).find(\"ul li\").removeClass(\"selected\");\r\n            return;\r\n        }\r\n\r\n        var el = $(this.element).find(\"ul li:nth-child(\" + (index + 1) + \") a\");\r\n        if (highlight === true) {\r\n            el.parent().addClass(\"selected\");\r\n        }\r\n        else {\r\n            el.parent().removeClass(\"selected\");\r\n        }\r\n    }\r\n    /**\r\n     * Slide information\r\n     * @typedef {Object} Gallery~slide\r\n     * @property {string} server - The URL of the PMA.core server this slide has been loaded from\r\n     * @property {string} path - The path of the slide\r\n     * @property {Number} index - The index of the slide in the gallery\r\n     */\r\n    /**\r\n     * Returns the first of the currently selected slides, or null\r\n     * @return {Gallery~slide}\r\n     */\r\n    getSelectedSlide() {\r\n        var el = $(this.element).find(\"ul li.selected a:first-child\");\r\n        if (el.length === 0) {\r\n            return null;\r\n        }\r\n        else {\r\n            return { server: el.data(\"server\"), path: el.data(\"path\"), index: el.parent().index() };\r\n        }\r\n    }\r\n    /**\r\n     * Returns the currently selected slides, or null\r\n     * @return {Gallery~slide[]}\r\n     */\r\n    getSelectedSlides() {\r\n        var el = $(this.element).find(\"ul li.selected a:first-child\");\r\n        if (el.length === 0) {\r\n            return null;\r\n        }\r\n        else {\r\n            var result = [];\r\n            el.each(function () {\r\n                result.push({ server: $(this).data(\"server\"), path: $(this).data(\"path\"), index: $(this).parent().index() });\r\n            });\r\n\r\n            return result;\r\n        }\r\n    }\r\n    /**\r\n     * Returns all the currently loaded slides\r\n     * @return {Gallery~slide[]}\r\n     */\r\n    getSlides() {\r\n        var el = $(this.element).find(\"ul li a:first-child\");\r\n        if (el.length === 0) {\r\n            return null;\r\n        }\r\n        else {\r\n            var result = [];\r\n            el.each(function () {\r\n                result.push({ server: $(this).data(\"server\"), path: $(this).data(\"path\") });\r\n            });\r\n\r\n            return result;\r\n        }\r\n    }\r\n    /**\r\n     * Sets the render options\r\n     * @param {PMA.UI.Components.GalleryRenderOptions} option - The render option to set\r\n     */\r\n    setRenderOptions(option) {\r\n        if (option && this.renderOptions != option) {\r\n            this.renderOptions = option;\r\n            refresh.call(this);\r\n        }\r\n    }\r\n    /**\r\n     * Toggles the mode of the gallery\r\n     * @param {String} mode - The mode to set, one of  \"horizontal\", \"vertical\" or \"grid\"\r\n     */\r\n    setMode(mode) {\r\n        if (this.mode !== mode) {\r\n            this.mode = mode;\r\n            $(this.element).removeClass(\"vertical grid\");\r\n            if (this.mode === \"vertical\") {\r\n                $(this.element).addClass(\"vertical\");\r\n            }\r\n            else if (this.mode === \"grid\") {\r\n                $(this.element).addClass(\"grid\");\r\n            }\r\n            refresh.call(this);\r\n        }\r\n    }\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { Resources } from '../../resources/resources';\r\nimport { checkBrowserCompatibility } from '../../view/helpers';\r\nimport { Events, ApiMethods, parseJson, callApiMethod } from './components';\r\n\r\nfunction arrayContains(array, value) {\r\n    for (var i = 0; i < array.length; i++) {\r\n        if (array[i] == value) {\r\n            return true;\r\n        }\r\n    }\r\n\r\n    return false;\r\n}\r\n\r\n/**\r\n * Represents a component that provides both UI and programmatic interaction with PMA.core forms and data.\r\n * @param  {PMA.UI.Components.Context} context\r\n * @param  {Object} options - Reserved for future use\r\n * @tutorial 06-forms\r\n */\r\nexport class Forms {\r\n    constructor(context, options) {\r\n        if (!checkBrowserCompatibility()) {\r\n            return;\r\n        }\r\n\r\n        this.listeners = {};\r\n        this.listeners[Events.FormSaved] = [];\r\n        this.listeners[Events.FormEditClick] = [];\r\n        this.context = context;\r\n    }\r\n    /**\r\n     * Renders a form field in read-only form\r\n     * @param  {Object} field - A PMA.core form field structure\r\n     * @param  {Object} record - A PMA.core form field value structure\r\n     * @param  {string} cssClass - Extra CSS class to add to the container element\r\n     * @returns {string} The HTML output\r\n     */\r\n    renderReadOnlyField(field, record, cssClass) {\r\n        var strVal = (record && record.FormValue ? record.FormValue : '').replace(/\"/g, \"&quot;\");\r\n\r\n        if (strVal.length !== 0 && record && field.FieldType != Forms.FieldType.CheckBox && field.FormList && field.FormList.FormListValues && !record.IsOtherValue && !record.IsBelowDetectableLimit) {\r\n            strVal = field.FormList.FormListValues[strVal].Value;\r\n        }\r\n\r\n        if (record && record.IsBelowDetectableLimit) {\r\n            strVal = Resources.translate(\"Below detectable limit\");\r\n        }\r\n\r\n        var html = \"\";\r\n\r\n        switch (field.FieldType) {\r\n            case Forms.FieldType.Paragraph:\r\n                html += '<p class=\"' + cssClass + '\">' + strVal + '</p>';\r\n                break;\r\n            case Forms.FieldType.CheckBox:\r\n\r\n                if (field.FormList && field.FormList.FormListValues && record && !record.IsOtherValue && strVal.length !== 0 && !record.IsBelowDetectableLimit) {\r\n                    var chkValues = strVal.split(\"|\");\r\n                    html += '<ul class=\"' + cssClass + '\">';\r\n\r\n                    for (k = 0; k < chkValues.length; k++) {\r\n                        html += \"<li>\" + field.FormList.FormListValues[chkValues[k]].Value + \"</li>\";\r\n                    }\r\n\r\n                    html += '</ul>';\r\n                }\r\n                else {\r\n                    html += '<div class=\"' + cssClass + '\">' + strVal + '</div>';\r\n                }\r\n\r\n                break;\r\n            case Forms.FieldType.Percentage:\r\n                html += '<div class=\"' + cssClass + '\">' + strVal + '%</div>';\r\n                break;\r\n            case Forms.FieldType.HyperLink:\r\n                html += '<a class=\"link-field\" title=\"' + field.Tooltip + '\" href=\"' + field.Url + '\" ' + (field.NewWindow === true ? ' target=\"_blank\" ' : '') + '>' + field.Label + '</a>';\r\n                break;\r\n            case Forms.FieldType.Label:\r\n                break;\r\n            default:\r\n                html += '<div class=\"' + cssClass + '\">' + strVal + '</div>';\r\n                break;\r\n        }\r\n\r\n        return html;\r\n    }\r\n    /**\r\n     * Passes a form definition and optionally form data back to the caller\r\n     * @callback Forms~getFormCallback\r\n     * @param {Object} form - The requested form definition\r\n     * @param {Object} [data] - The submitted form data\r\n     */\r\n    /**\r\n     * A callback to filter the data retrieved from the server\r\n     * @callback Forms~filterDataCallback\r\n     * @param {Object} [data] - The retrieved form data\r\n     * @returns {Object} The filtered data\r\n     */\r\n    /**\r\n     * Loads a form definition and optionally the available submitted data\r\n     * @param  {String} serverUrl\r\n     * @param  {Number} formId\r\n     * @param  {Object} [dataOptions] - Used when it is desired to load submitted data as well\r\n     * @param  {string} dataOptions.path - The path to load form submitted data for\r\n     * @param  {boolean} [dataOptions.currentUserOnly=false] - True to load only the current user's data. The user is determined by the server's URL and the authentication providers available in the context.\r\n     * @param  {string | Forms~filterDataCallback} [dataOptions.dataFilter=\"\"] - Optional parameter to filter data results with. If the parameter is a string it is considered a username and data from this user are kept. This is useful when a particular user's data is desired, but not the currently logged on one's. If a callback function is provided it should return the filtered data\r\n     * @param  {Forms~getFormCallback} [success]\r\n     * @param  {function} [failure]\r\n     */\r\n    getForm(serverUrl, formId, dataOptions, success, failure) {\r\n        var _this = this;\r\n\r\n        _this.context.getSession(serverUrl, function (sessionId) {\r\n            callApiMethod({\r\n                serverUrl: serverUrl,\r\n                method: ApiMethods.GetForm,\r\n                data: { sessionID: sessionId, id: formId },\r\n                success: function (http) {\r\n                    var response = parseJson(http.responseText);\r\n                    if (response) {\r\n                        if (dataOptions !== null && dataOptions !== undefined && typeof dataOptions === \"object\") {\r\n                            loadFormData.call(_this, serverUrl, sessionId, response, dataOptions.path, dataOptions.currentUserOnly === true, dataOptions.dataFilter,\r\n                                function (data) {\r\n                                    response.FormData = data;\r\n                                    if (typeof success === \"function\") {\r\n                                        success.call(_this, response, data);\r\n                                    }\r\n                                }, failure);\r\n                        }\r\n                        else if (typeof success === \"function\") {\r\n                            success.call(_this, response, null);\r\n                        }\r\n                    }\r\n                    else if (typeof failure === \"function\") {\r\n                        failure();\r\n                    }\r\n                },\r\n                failure: failure\r\n            });\r\n        }, failure);\r\n    }\r\n    /**\r\n     * Passes form definitions back to the caller\r\n     * @callback Forms~getFormsCallback\r\n     * @param {Object[]} forms - Form definition objects fetched from PMA.core\r\n     */\r\n    /**\r\n     * Loads all the available form definitions from a PMA.core server\r\n     * @param  {String} serverUrl - The PMA.core server URL\r\n     * @param  {Forms~getFormsCallback} success - Called upon successful completion of the data request.\r\n     * @param  {function} [failure]\r\n     */\r\n    getForms(serverUrl, success, failure) {\r\n        var _this = this;\r\n        _this.context.getSession(serverUrl, function (sessionId) {\r\n            callApiMethod({\r\n                serverUrl: serverUrl,\r\n                method: ApiMethods.GetForms,\r\n                data: { sessionID: sessionId },\r\n                success: function (http) {\r\n                    var response = parseJson(http.responseText);\r\n                    if (response && typeof success === \"function\") {\r\n                        success(response);\r\n                    }\r\n                    else if (typeof failure === \"function\") {\r\n                        failure(response);\r\n                    }\r\n                },\r\n                failure: failure\r\n            });\r\n        }, failure);\r\n    }\r\n    /**\r\n     * Called while rendering each field. This function gives the opportunity to the caller to make modifications per element, or return false to prevent rendering of specific fields.\r\n     * @callback Forms~renderFieldCallback\r\n     * @param {Object} form - The definition of the form that is being rendered\r\n     * @param {Object} field - The definition of the field that is being rendered\r\n     * @param {Object} field.fieldGroupClass - The CSS class to assign to the fields group element\r\n     * @param {Object} field.fieldContainerClass - The CSS class to assign to the field's container\r\n     * @param {Object} [record] - The data that will be displayed by the field. Can be null if no data is available or loaded.\r\n     * @returns {boolean} True to render this field, otherwise false\r\n     */\r\n    /**\r\n     * Renders a form and optionally loads the available user submitted data\r\n     * @param  {string} serverUrl\r\n     * @param  {Number} formId\r\n     * @param {string|HTMLElement} element - The element that hosts the form. It can be either a valid CSS selector or an HTMLElement instance.\r\n     * @param  {Object} [dataOptions] - Supplied only when it is desired to load form submitted data as well\r\n     * @param  {string} dataOptions.path - The path to load form submitted data for\r\n     * @param  {boolean} [dataOptions.currentUserOnly=false] - True to load only the current user's data. The user is determined by the server's URL and the authentication providers available in the context.\r\n     * @param  {string | Forms~filterDataCallback} [dataOptions.dataFilter=\"\"] - Optional parameter to filter data results with. If the parameter is a string it is considered a username and data from this user are kept. This is useful when a particular user's data is desired, but not the currently logged on one's. If a callback function is provided it should return the filtered data\r\n     * @param  {string} [dataOptions.btnContainerClass] - CSS class to assign the to element that contains the save and reset buttons\r\n     * @param  {string} [dataOptions.btnResetClass] - CSS class to assign the reset button\r\n     * @param  {string} [dataOptions.btnSaveClass] - CSS class to assign the save button\r\n     * @param  {Forms~renderFieldCallback} [dataOptions.fieldCb] - Called when rendering each field.\r\n     * @param  {string} [dataOptions.fieldContainerClass] - CSS class to assign the to element that contains field controls\r\n     * @param  {string} [dataOptions.fieldValidationClass] - CSS class to assign to error labels that are displayed upon validating the form\r\n     * @param  {string} [dataOptions.formClass] - CSS class to assign to the rendered form element\r\n     * @param  {string} [dataOptions.inputClass] - CSS class to assign the to input elements\r\n     * @param  {boolean} [dataOptions.readOnly=false] - True to render the form in read only mode\r\n     * @param  {boolean} [dataOptions.editButton=false] - True to render an edit button next to the form's name. Only applicable in read only mode\r\n     * @param  {string} [dataOptions.validationClass] - CSS class to assign to generic validation messages (e.g. \"The form could not be saved\")\r\n     * @param  {function} [success]\r\n     * @param  {function} [failure]\r\n     */\r\n    displayForm(serverUrl, formId, element, dataOptions, success, failure) {\r\n        var _this = this;\r\n\r\n        this.getForm(serverUrl, formId, dataOptions,\r\n            function (form, data) {\r\n                _this.serverUrl = serverUrl;\r\n\r\n                if (form) {\r\n                    _this.form = form;\r\n                    _this.form.enabled = true;\r\n\r\n                    if (form.ReadOnly === true) {\r\n                        dataOptions.readOnly = true;\r\n                    }\r\n                }\r\n\r\n                _this.path = dataOptions.path;\r\n                _this.originalData = data;\r\n                renderForm.call(_this, element, form, dataOptions, data, success, failure);\r\n            },\r\n            failure);\r\n    }\r\n    /**\r\n     * Renders a form and optionally loads the available user submitted data without loading from the server\r\n     * @param {string|HTMLElement} element - The element that hosts the form. It can be either a valid CSS selector or an HTMLElement instance.\r\n     * @param {Object} form - The form definition object\r\n     * @param  {Object} [dataOptions] - Supplied only when it is desired to load form submitted data as well\r\n     * @param  {string} dataOptions.path - The path to load form submitted data for\r\n     * @param  {boolean} [dataOptions.currentUserOnly=false] - True to load only the current user's data. The user is determined by the server's URL and the authentication providers available in the context.\r\n     * @param  {string | Forms~filterDataCallback} [dataOptions.dataFilter=\"\"] - Optional parameter to filter data results with. If the parameter is a string it is considered a username and data from this user are kept. This is useful when a particular user's data is desired, but not the currently logged on one's. If a callback function is provided it should return the filtered data\r\n     * @param  {string} [dataOptions.btnContainerClass] - CSS class to assign the to element that contains the save and reset buttons\r\n     * @param  {string} [dataOptions.btnResetClass] - CSS class to assign the reset button\r\n     * @param  {string} [dataOptions.btnSaveClass] - CSS class to assign the save button\r\n     * @param  {Forms~renderFieldCallback} [dataOptions.fieldCb] - Called when rendering each field.\r\n     * @param  {string} [dataOptions.fieldContainerClass] - CSS class to assign the to element that contains field controls\r\n     * @param  {string} [dataOptions.fieldValidationClass] - CSS class to assign to error labels that are displayed upon validating the form\r\n     * @param  {string} [dataOptions.formClass] - CSS class to assign to the rendered form element\r\n     * @param  {string} [dataOptions.inputClass] - CSS class to assign the to input elements\r\n     * @param  {boolean} [dataOptions.readOnly=false] - True to render the form in read only mode\r\n     * @param  {boolean} [dataOptions.editButton=false] - True to render an edit button next to the form's name. Only applicable in read only mode\r\n     * @param  {string} [dataOptions.validationClass] - CSS class to assign to generic validation messages (e.g. \"The form could not be saved\")\r\n     * @param {Object} [data] - The data to load to the form displayed\r\n     * @param  {function} [success]\r\n     * @param  {function} [failure]\r\n     */\r\n    renderForm(element, form, dataOptions, data, success, failure) {\r\n        if (form) {\r\n            this.form = form;\r\n            this.form.enabled = true;\r\n\r\n            if (form.ReadOnly === true) {\r\n                dataOptions.readOnly = true;\r\n            }\r\n        }\r\n\r\n        this.path = dataOptions.path;\r\n        this.originalData = data;\r\n\r\n        renderForm.call(this, element, form, dataOptions, data, success, failure);\r\n    }\r\n    /**\r\n     * Saves the currently rendered form to PMA.core\r\n     * @param  {function} [success]\r\n     * @param  {function} [failure]\r\n     * @fires PMA.UI.Components.Events#FormSaved\r\n     */\r\n    saveForm(success, failure) {\r\n        var _this = this;\r\n        _this.setEnabled(false);\r\n        $(\"#\" + _this.form.ClientID + \" button[type='submit']\").html(Resources.translate(\"Saving...\"));\r\n        submitForm.call(this, function (args) {\r\n            $(\"#\" + _this.form.ClientID + \" button[type='submit']\").html(Resources.translate(\"Save\"));\r\n            _this.setEnabled(true);\r\n            _this.fireEvent(Events.FormSaved, args);\r\n            if (typeof success === \"function\") {\r\n                success(args);\r\n            }\r\n        },\r\n            function (args) {\r\n                $(\"#\" + _this.form.ClientID + \" button[type='submit']\").html(Resources.translate(\"Save\"));\r\n                _this.setEnabled(true);\r\n                _this.fireEvent(Events.FormSaved, args);\r\n                if (typeof failure === \"function\") {\r\n                    failure(args);\r\n                }\r\n            });\r\n    }\r\n    /**\r\n     * Enables or disables the currently rendered form\r\n     * @param  {boolean} enabled\r\n     */\r\n    setEnabled(enabled) {\r\n        if (this.form) {\r\n            this.form.enabled = !!enabled;\r\n            $(\"#\" + this.form.ClientID + \" > fieldset\").prop(\"disabled\", !this.form.enabled);\r\n        }\r\n        else {\r\n            console.error(\"No form\");\r\n        }\r\n    }\r\n    /**\r\n     * Gets the state of the currently rendered form\r\n     * @return {boolean}\r\n     */\r\n    getEnabled() {\r\n        if (this.form) {\r\n            return this.form.enabled;\r\n        }\r\n        else {\r\n            console.error(\"No form\");\r\n        }\r\n    }\r\n    /**\r\n     * Attaches an event listener\r\n     * @param {PMA.UI.Components.Events} eventName - The name of the event to listen to\r\n     * @param {function} callback - The function to call when the event occurs\r\n     */\r\n    listen(eventName, callback) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" is not a valid event\");\r\n        }\r\n\r\n        this.listeners[eventName].push(callback);\r\n    }\r\n    // fires an event\r\n    fireEvent(eventName, eventArgs) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" does not exist\");\r\n            return;\r\n        }\r\n\r\n        for (var i = 0, max = this.listeners[eventName].length; i < max; i++) {\r\n            this.listeners[eventName][i].call(this, eventArgs);\r\n        }\r\n    }\r\n    /**\r\n     * Checks if the currently loaded form has any changes that have not been saved yet.\r\n     * @return {boolean}\r\n     */\r\n    hasChanges() {\r\n        if (!this.form) {\r\n            return false;\r\n        }\r\n\r\n        return this.hasChangesProperty;\r\n    }\r\n    /**\r\n     * Resets the currently loaded form to it's initial state\r\n     */\r\n    reset() {\r\n        if (!this.form) {\r\n            return false;\r\n        }\r\n\r\n        $(\"#\" + this.form.ClientID + \" [type='reset']\").click();\r\n    }\r\n}\r\n\r\n/**\r\n * Available form field types\r\n * @readonly\r\n * @enum {number}\r\n */\r\nForms.FieldType = {\r\n    /**\r\n     * Simple text (input)\r\n     */\r\n    Text: 0,\r\n\r\n    /**\r\n     * Simple paragraph (label)\r\n     */\r\n    Paragraph: 1,\r\n\r\n    /**\r\n     * Dropdown\r\n     */\r\n    ListBox: 2,\r\n\r\n    /**\r\n     * Checkbox list\r\n     */\r\n    CheckBox: 3,\r\n\r\n    /**\r\n     * Radio button list\r\n     */\r\n    RadioButton: 4,\r\n\r\n    /**\r\n     * Integer input\r\n     */\r\n    Integer: 5,\r\n\r\n    /**\r\n     * Decimal input\r\n     */\r\n    Double: 6,\r\n\r\n    /**\r\n     * Datetime input\r\n     */\r\n    DateTime: 7,\r\n\r\n    /**\r\n     * Percentage input\r\n     */\r\n    Percentage: 8,\r\n\r\n    /**\r\n     * Section separator - label\r\n     */\r\n    Label: 9,\r\n\r\n    /**\r\n     * HyperLink\r\n     */\r\n    HyperLink: 10\r\n};\r\n\r\nfunction getCheckboxesValue(el) {\r\n    var value = \"\";\r\n    el.each(function () {\r\n        if (value.length > 0) {\r\n            value += \"|\";\r\n        }\r\n\r\n        value += this.value;\r\n    });\r\n\r\n    return value;\r\n}\r\n\r\nfunction createPostData(sessionId) {\r\n    var values = [];\r\n    var form = this.form;\r\n\r\n    for (var i = 0; i < this.form.FormFields.length; i++) {\r\n        var field = form.FormFields[i];\r\n        var fieldId = getFieldId(this.form, i);\r\n\r\n        var value = null,\r\n            below = false,\r\n            other = false,\r\n            el, otherElVal;\r\n        switch (field.FieldType) {\r\n            case Forms.FieldType.Text:\r\n            case Forms.FieldType.Paragraph:\r\n            case Forms.FieldType.DateTime:\r\n                el = $(\"#\" + fieldId);\r\n                if (el.val() !== \"\") {\r\n                    value = el.val();\r\n                }\r\n\r\n                break;\r\n            case Forms.FieldType.Integer:\r\n            case Forms.FieldType.Double:\r\n            case Forms.FieldType.Percentage:\r\n                el = $(\"#\" + fieldId);\r\n                if (el.val() !== \"\") {\r\n                    value = el.val();\r\n                }\r\n                else if (field.AllowBelowDetectableLimit === true && $(\"#\" + fieldId + \"_below:checked\").length === 1) {\r\n                    below = true;\r\n                }\r\n\r\n                break;\r\n            case Forms.FieldType.ListBox:\r\n                el = $(\"#\" + fieldId);\r\n                if (el.val() !== \"\") {\r\n                    value = el.val();\r\n                }\r\n                else if (field.AllowOther && $(\"#\" + fieldId + \"_other\").val() !== \"\") {\r\n                    value = $(\"#\" + fieldId + \"_other\").val();\r\n                    other = true;\r\n                }\r\n\r\n                break;\r\n            case Forms.FieldType.CheckBox:\r\n                otherElVal = $(\"#\" + fieldId + \"_other\").val();\r\n                el = $(\"input[name='\" + fieldId + \"']:checked\");\r\n                if (el.length !== 0) {\r\n                    value = getCheckboxesValue(el);\r\n                }\r\n                else if (field.AllowOther === true && otherElVal !== \"\") {\r\n                    value = otherElVal;\r\n                    other = true;\r\n                }\r\n\r\n                break;\r\n            case Forms.FieldType.RadioButton:\r\n                otherElVal = $(\"#\" + fieldId + \"_other\").val();\r\n                el = $(\"input[name='\" + fieldId + \"']:not([id$='_other_indicator']):checked\");\r\n\r\n                if (el.length !== 0) {\r\n                    value = el.val();\r\n                }\r\n                else if (field.AllowOther === true && otherElVal !== \"\") {\r\n                    value = otherElVal;\r\n                    other = true;\r\n                }\r\n\r\n                break;\r\n        }\r\n\r\n        values.push({\r\n            FieldId: field.FieldID,\r\n            FormValue: value,\r\n            IsBelowDetectableLimit: below,\r\n            IsOtherValue: other\r\n        });\r\n    }\r\n\r\n    return {\r\n        sessionID: sessionId,\r\n        pathOrUid: this.path,\r\n        formId: this.form.FormID,\r\n        fieldValues: values\r\n    };\r\n}\r\n\r\nfunction submitForm(success, failure) {\r\n    if (!validateForm.call(this)) {\r\n        if (typeof failure === \"function\") {\r\n            failure({ success: false, message: Resources.translate(\"Form validation error\") });\r\n        }\r\n\r\n        return;\r\n    }\r\n\r\n    var _this = this;\r\n    _this.context.getSession(_this.serverUrl, function (sessionId) {\r\n        var postData = createPostData.call(_this, sessionId);\r\n\r\n        callApiMethod({\r\n            serverUrl: _this.serverUrl,\r\n            method: ApiMethods.SaveFormData,\r\n            httpMethod: \"POST\",\r\n            contentType: 'application/json',\r\n            data: postData,\r\n            success: function (http) {\r\n                _this.hasChangesProperty = false;\r\n\r\n                if (typeof success === \"function\") {\r\n                    success({ success: true, message: '' });\r\n                }\r\n            },\r\n            failure: function (http) {\r\n                var errorMsg = Resources.translate(\"Save failed. Check the form values and try again.\");\r\n                if (http && http.responseText) {\r\n                    var errorObj = JSON.parse(http.responseText);\r\n                    if (errorObj && errorObj.Message) {\r\n                        errorMsg = errorObj.Message;\r\n                    }\r\n                }\r\n\r\n                $(\"#\" + _this.form.ClientID + \"_validation\").html(errorMsg);\r\n                if (typeof failure === \"function\") {\r\n                    failure({ success: false, message: errorMsg });\r\n                }\r\n            }\r\n        });\r\n    }, function (args) {\r\n        if (typeof failure === \"function\") {\r\n            failure({ success: false, message: ((args && args.Message) ? args.Message : Resources.translate(\"Authentication error\")) });\r\n        }\r\n    });\r\n}\r\n\r\nfunction clearValidationErrors() {\r\n    if (!this.form) {\r\n        return;\r\n    }\r\n\r\n    $(\"#\" + this.form.ClientID + \" [id$='_validation']\").html(\"\");\r\n    $(\"#\" + this.form.ClientID + \" *\").removeClass(\"invalid\");\r\n}\r\n\r\nfunction validateForm() {\r\n    if (!this.form) {\r\n        return false;\r\n    }\r\n\r\n    clearValidationErrors.call(this);\r\n\r\n    var form = this.form;\r\n    $(\"#\" + form.ClientID + \"_validation\").html(\"\");\r\n\r\n    var el, otherEl, isValid;\r\n\r\n    for (var i = 0; i < this.form.FormFields.length; i++) {\r\n        var field = form.FormFields[i];\r\n        var fieldId = getFieldId(this.form, i);\r\n\r\n        var validationSpan = $(\"#\" + fieldId + \"_validation\");\r\n        validationSpan.html(\"\");\r\n\r\n        switch (field.FieldType) {\r\n            case Forms.FieldType.Text:\r\n            case Forms.FieldType.Paragraph:\r\n            case Forms.FieldType.DateTime:\r\n                el = $(\"#\" + fieldId);\r\n\r\n                if (field.Required === true && el.val() === \"\") {\r\n                    el.addClass(\"invalid\");\r\n                    el.focus();\r\n                    validationSpan.html(Resources.translate(\"Please enter a value\"));\r\n\r\n                    return false;\r\n                }\r\n\r\n                el.removeClass(\"invalid\");\r\n                break;\r\n            case Forms.FieldType.Integer:\r\n            case Forms.FieldType.Double:\r\n            case Forms.FieldType.Percentage:\r\n\r\n                el = $(\"#\" + fieldId);\r\n                if (field.Required === true && el.val() === \"\") {\r\n                    isValid = false;\r\n                    if (field.AllowBelowDetectableLimit === true && $(\"#\" + fieldId + \"_below:checked\").length === 1) {\r\n                        isValid = true;\r\n                    }\r\n\r\n                    if (!isValid) {\r\n                        el.addClass(\"invalid\");\r\n                        el.focus();\r\n                        validationSpan.html(Resources.translate(\"Please enter a value\"));\r\n\r\n                        return false;\r\n                    }\r\n                }\r\n\r\n                var numVal = el.val();\r\n                if (isNaN(numVal)) {\r\n                    el.addClass(\"invalid\");\r\n                    el.focus();\r\n                    validationSpan.html(Resources.translate(\"Please enter a valid value\"));\r\n\r\n                    return false;\r\n                }\r\n\r\n                if (typeof numVal !== \"number\") {\r\n                    numVal = parseFloat(numVal);\r\n                }\r\n\r\n                if (typeof field.LowerBound === \"number\" && numVal < field.LowerBound) {\r\n                    el.addClass(\"invalid\");\r\n                    el.focus();\r\n                    validationSpan.html(Resources.translate(\"Please enter a value larger than or equal to {LowerBound}\", { LowerBound: field.LowerBound }));\r\n\r\n                    return false;\r\n                }\r\n\r\n                if (typeof field.UpperBound === \"number\" && numVal > field.UpperBound) {\r\n                    el.addClass(\"invalid\");\r\n                    el.focus();\r\n                    validationSpan.html(Resources.translate(\"Please enter a value less than or equal to {UpperBound}\", { UpperBound: field.UpperBound }));\r\n\r\n                    return false;\r\n                }\r\n\r\n                el.removeClass(\"invalid\");\r\n                break;\r\n            case Forms.FieldType.ListBox:\r\n                el = $(\"#\" + fieldId);\r\n                if (field.Required === true && el.val() === \"\") {\r\n                    isValid = false;\r\n\r\n                    if (field.AllowOther && $(\"#\" + fieldId + \"_other\").val() !== \"\") {\r\n                        isValid = true;\r\n                    }\r\n\r\n                    if (!isValid) {\r\n                        el.addClass(\"invalid\");\r\n                        el.focus();\r\n                        validationSpan.html(Resources.translate(\"Please select a value\"));\r\n\r\n                        return false;\r\n                    }\r\n                }\r\n\r\n                el.removeClass(\"invalid\");\r\n                break;\r\n            case Forms.FieldType.CheckBox:\r\n            case Forms.FieldType.RadioButton:\r\n                // if the field is required and not option is select apart from the \"other value\" indicator\r\n                if (field.Required === true && $(\"input[name='\" + fieldId + \"']:not([id$='_other_indicator']):checked\").length === 0) {\r\n                    if (field.AllowOther !== true || $(\"#\" + fieldId + \"_other\").val() === \"\") {\r\n                        $(\"input[name='\" + fieldId + \"']\").first().focus();\r\n                        validationSpan.html(Resources.translate(\"Please select a value\"));\r\n                        return false;\r\n                    }\r\n                }\r\n\r\n                break;\r\n            case Forms.FieldType.Label:\r\n            case Forms.FieldType.HyperLink:\r\n                break;\r\n            default:\r\n                console.error(\"Unknown field type \" + field.FieldType);\r\n                return false;\r\n        }\r\n    }\r\n\r\n    return true;\r\n}\r\n\r\nfunction bindClearFieldValueWhenBelowCheckedEvent(field, fieldId) {\r\n    $(\"#\" + fieldId + \"_below\").change(function () {\r\n        if (this.checked) {\r\n            $(\"#\" + fieldId).val(\"\");\r\n        }\r\n    });\r\n}\r\n\r\nfunction bindUncheckBelowEvent(field, fieldId) {\r\n    $(\"#\" + fieldId).change(function () {\r\n        if ($(this).val() !== \"\") {\r\n            $(\"#\" + fieldId + \"_below\").prop(\"checked\", false);\r\n        }\r\n    });\r\n}\r\n\r\nfunction bindClearFieldValueWhenOtherChangedEvent(field, fieldId) {\r\n    $(\"#\" + fieldId + \"_other\").change(function () {\r\n        if ($(this).val() !== \"\") {\r\n            $(\"#\" + fieldId).val(\"\");\r\n            $(\"input[name='\" + fieldId + \"'\").prop(\"checked\", false);\r\n            $(\"#\" + fieldId + \"_other_indicator\").prop(\"checked\", true);\r\n        }\r\n    });\r\n}\r\n\r\nfunction bindClearOtherWhenValueSelectedEvent(field, fieldId) {\r\n    $(\"input[name='\" + fieldId + \"'], #\" + fieldId).change(function () {\r\n        if (this.checked || (this.tagName === \"SELECT\" && this.value !== \"\")) {\r\n            $(\"#\" + fieldId + \"_other\").val(\"\");\r\n        }\r\n    });\r\n}\r\n\r\nfunction bindFormElementEvents() {\r\n    var _this = this;\r\n    $(\"#\" + this.form.ClientID).submit(function (evt) {\r\n        evt.preventDefault();\r\n        _this.saveForm();\r\n    }).change(function () {\r\n        _this.hasChangesProperty = true;\r\n    });\r\n\r\n    $(\"#\" + this.form.ClientID + \" legend .edit-button\").click(function (evt) {\r\n        evt.preventDefault();\r\n        _this.fireEvent(Events.FormEditClick);\r\n    });\r\n\r\n    $(\"#\" + this.form.ClientID + \" [type='reset']\").click(function (evt) {\r\n        clearValidationErrors.call(_this);\r\n        _this.hasChangesProperty = false;\r\n        $(\"#\" + _this.form.ClientID + \" select\").val('');\r\n        $(\"#\" + _this.form.ClientID + \" input[type='text']\").val('');\r\n        $(\"#\" + _this.form.ClientID + \" input[type='number']\").val('');\r\n        $(\"#\" + _this.form.ClientID + \" textarea\").val('');\r\n        $(\"#\" + _this.form.ClientID + \" input[type='checkbox'], #\" + _this.form.ClientID + \" input[type='radio']\").prop('checked', false);\r\n        evt.preventDefault();\r\n    });\r\n\r\n    for (var i = 0; i < this.form.FormFields.length; i++) {\r\n        var fieldId = getFieldId(this.form, i);\r\n\r\n        var field = this.form.FormFields[i];\r\n        if (field.AllowBelowDetectableLimit) {\r\n            bindClearFieldValueWhenBelowCheckedEvent.call(_this, field, fieldId);\r\n            bindUncheckBelowEvent.call(_this, field, fieldId);\r\n        }\r\n\r\n        if (field.AllowOther) {\r\n            bindClearFieldValueWhenOtherChangedEvent.call(_this, field, fieldId);\r\n            bindClearOtherWhenValueSelectedEvent.call(_this, field, fieldId);\r\n            //bindUncheckBelowEvent.call(_this, field, fieldId);\r\n        }\r\n    }\r\n}\r\n\r\nfunction getFieldId(form, fieldIndex) {\r\n    return form.ClientID + \"_field_\" + form.FormFields[fieldIndex].FieldID;\r\n}\r\n\r\nfunction getDataRecord(fieldId) {\r\n    if (!this.originalData) {\r\n        return;\r\n    }\r\n\r\n    for (var i = 0; i < this.originalData.length; i++) {\r\n        var dataSet = this.originalData[i];\r\n        if (!dataSet.FieldValues || !dataSet.FieldValues.length) {\r\n            continue;\r\n        }\r\n\r\n        for (var j = 0; j < dataSet.FieldValues.length; j++) {\r\n            var f = dataSet.FieldValues[j];\r\n            if (f.FieldId === fieldId) {\r\n                return f;\r\n            }\r\n        }\r\n    }\r\n\r\n    return null;\r\n}\r\n\r\nfunction renderField(form, fieldIndex, dataOptions) {\r\n    var field = form.FormFields[fieldIndex];\r\n    var list, k;\r\n\r\n    field.Tooltip = field.Tooltip || \"\";\r\n\r\n    var fieldId = getFieldId(form, fieldIndex);\r\n    var record = getDataRecord.call(this, field.FieldID);\r\n\r\n    if (!record) {\r\n        record = {\r\n            IsOtherValue: false,\r\n            IsBelowDetectableLimit: false,\r\n            FormValue: null\r\n        };\r\n    }\r\n\r\n    if (typeof dataOptions.fieldCb === \"function\") {\r\n        if (dataOptions.fieldCb(form, field, record) === false) {\r\n            return '';\r\n        }\r\n    }\r\n\r\n    var fieldGroupClass = '';\r\n\r\n    if (field.ExtraStyle) {\r\n        fieldGroupClass += \" \" + field.ExtraStyle + \" \";\r\n    }\r\n\r\n    if (field.fieldGroupClass) {\r\n        fieldGroupClass += \" \" + field.fieldGroupClass + \" \";\r\n    }\r\n\r\n    var strVal = record && record.FormValue ? record.FormValue : '';\r\n\r\n    var html = '<div class=\"form-group ' + (field.Required === true ? \"required\" : \"\") + \" \" + fieldGroupClass + '\" title=\"' + field.Tooltip + '\">';\r\n    if (field.FieldType !== Forms.FieldType.HyperLink) {\r\n        html += '<label for=\"' + fieldId + '\">' + field.Label + '</label>';\r\n    }\r\n\r\n    html += \"<div class='field-container \" + (dataOptions.fieldContainerClass ? dataOptions.fieldContainerClass : \"\") + \" \" + (field.fieldContainerClass ? field.fieldContainerClass : \"\") + \" '>\";\r\n\r\n    var requiredStr = \"\";\r\n    if (field.Required === true) {\r\n        requiredStr = ' required=\"required\" ';\r\n    }\r\n\r\n    var inputClassStr = '';\r\n    if (dataOptions.inputClass) {\r\n        inputClassStr += \" \" + dataOptions.inputClass + \" \";\r\n    }\r\n\r\n    if (field.fieldClass) {\r\n        inputClassStr += \" \" + field.fieldClass + \" \";\r\n    }\r\n\r\n    if (field.FieldType === Forms.FieldType.DateTime) {\r\n        console.warn(\"PMA.UI.Components.Forms: No proper date time field support yet.\");\r\n    }\r\n\r\n    if (dataOptions.readOnly === true) {\r\n        html += this.renderReadOnlyField(field, record, inputClassStr);\r\n    }\r\n    else {\r\n        switch (field.FieldType) {\r\n            case Forms.FieldType.Text:\r\n                html += '<input id=\"' + fieldId + '\" name=\"' + fieldId + '\" value=\"' + strVal + '\" type=\"text\" placeholder=\"' + field.Tooltip + '\" ' + requiredStr + ' class=\"' + inputClassStr + '\" />';\r\n                break;\r\n            case Forms.FieldType.DateTime: // no proper date time support yet\r\n                html += '<input id=\"' + fieldId + '\" name=\"' + fieldId + '\" value=\"' + strVal + '\" type=\"text\" placeholder=\"yyyy-MM-dd HH:mm:ss\" ' + requiredStr + ' class=\"' + inputClassStr + '\" />';\r\n                break;\r\n            case Forms.FieldType.Paragraph:\r\n                html += '<textarea id=\"' + fieldId + '\" name=\"' + fieldId + '\" placeholder=\"' + field.Tooltip + '\"' + requiredStr + ' class=\"' + inputClassStr + '\">' + strVal + '</textarea>';\r\n                break;\r\n            case Forms.FieldType.ListBox:\r\n                html += '<select id=\"' + fieldId + '\" name=\"' + fieldId + '\" ' + ' class=\"' + inputClassStr + '\">';\r\n\r\n                if (field.FormList && field.FormList.FormListValues) {\r\n                    html += '<option value=\"\" ' + (strVal.length === 0 ? 'selected=\"selected\"' : \"\") + '>' + field.Tooltip + '</option>';\r\n\r\n                    list = field.FormList.FormListValues;\r\n                    for (k = 0; k < list.length; k++) {\r\n                        html += '<option value=\"' + list[k].ValueID + '\" ' + (strVal.length !== 0 && list[k].ValueID == strVal ? 'selected=\"selected\"' : \"\") + '>' + list[k].Value + '</option>';\r\n                    }\r\n                }\r\n                html += '</select>';\r\n\r\n                break;\r\n            case Forms.FieldType.CheckBox:\r\n                html += '<ul class=\"checkboxlist\">';\r\n\r\n                var strValues = strVal.split(\"|\");\r\n\r\n                if (field.FormList && field.FormList.FormListValues) {\r\n                    list = field.FormList.FormListValues;\r\n                    for (k = 0; k < list.length; k++) {\r\n                        html += '<li>';\r\n                        html += '<input type=\"checkbox\" class=\"' + inputClassStr + '\" id=\"' + fieldId + '_' + list[k].ValueID + '\" name=\"' + fieldId + '\" value=\"' + list[k].ValueID + '\" ' + (arrayContains(strValues, \"\" + list[k].ValueID) ? 'checked=\"checked\"' : \"\") + '/>';\r\n                        html += '<label for=\"' + fieldId + '_' + list[k].ValueID + '\">' + list[k].Value + '</label>';\r\n                        html += \"</li>\";\r\n                    }\r\n                }\r\n\r\n                html += '</ul>';\r\n                break;\r\n            case Forms.FieldType.RadioButton:\r\n                html += '<ul class=\"radiobuttonlist\">';\r\n\r\n                if (field.FormList && field.FormList.FormListValues) {\r\n                    list = field.FormList.FormListValues;\r\n\r\n                    /*\r\n                    if (field.Required === false) {\r\n                        html += '<li>';\r\n                        html += '<input type=\"radio\" id=\"' + fieldId + '_novalue\" name=\"' + fieldId + '\" value=\"\" />';\r\n                        html += '<label for=\"' + fieldId + '_novalue\">' + Resources.translate(\"(No selection)\") + '</label>';\r\n                        html += \"</li>\";\r\n                    }\r\n                    */\r\n\r\n                    for (k = 0; k < list.length; k++) {\r\n                        html += '<li>';\r\n                        html += '<input type=\"radio\" class=\"' + inputClassStr + '\" id=\"' + fieldId + '_' + list[k].ValueID + '\" name=\"' + fieldId + '\" value=\"' + list[k].ValueID + '\" ' + (strVal !== \"\" && list[k].ValueID == strVal ? 'checked=\"checked\"' : \"\") + ' />';\r\n                        html += '<label for=\"' + fieldId + '_' + list[k].ValueID + '\">' + list[k].Value + '</label>';\r\n                        html += \"</li>\";\r\n                    }\r\n\r\n                    if (field.AllowOther === true) {\r\n                        html += '<li>';\r\n                        html += '<input type=\"radio\" class=\"' + inputClassStr + '\" id=\"' + fieldId + '_other_indicator\" name=\"' + fieldId + '\" ' + (record && record.IsOtherValue ? 'checked=\"checked\"' : \"\") + ' value=\"other\" />';\r\n                        html += '<label for=\"' + fieldId + '_other_indicator\">' + Resources.translate(\"Other value\") + '</label>';\r\n                        html += \"</li>\";\r\n                    }\r\n                }\r\n\r\n                html += '</ul>';\r\n                break;\r\n            case Forms.FieldType.Integer:\r\n                var step = 1;\r\n                if (field.Interval) {\r\n                    step = field.Interval | 0;\r\n                }\r\n\r\n                html += '<input id=\"' + fieldId + '\" name=\"' + fieldId + '\"' + requiredStr + ' ' + (field.LowerBound !== null ? 'min=\"' + field.LowerBound + '\"' : \"\") + ' ' + (field.UpperBound !== null ? 'max=\"' + field.UpperBound + '\"' : \"\") + ' type=\"number\" step=\"' + step + '\" value=\"' + strVal + '\"  placeholder=\"' + field.Tooltip + '\" class=\"' + inputClassStr + '\"/>';\r\n                break;\r\n            case Forms.FieldType.Double:\r\n                html += '<input id=\"' + fieldId + '\" name=\"' + fieldId + '\"' + requiredStr + ' ' + (field.LowerBound !== null ? 'min=\"' + field.LowerBound + '\"' : \"\") + ' ' + (field.UpperBound !== null ? 'max=\"' + field.UpperBound + '\"' : \"\") + ' type=\"number\" step=\"' + (field.Interval ? field.Interval : 'any') + '\" value=\"' + strVal + '\" placeholder=\"' + field.Tooltip + '\" class=\"' + inputClassStr + '\" />';\r\n                break;\r\n            case Forms.FieldType.Percentage:\r\n                var minv = 0,\r\n                    maxv = 100;\r\n                if (field.LowerBound !== null && (field.LowerBound | 0) >= 0) {\r\n                    minv = field.LowerBound | 0;\r\n                }\r\n\r\n                if (field.UpperBound !== null && (field.UpperBound | 0) <= 0) {\r\n                    maxv = field.UpperBound | 0;\r\n                }\r\n\r\n                html += '<input id=\"' + fieldId + '\" name=\"' + fieldId + '\"' + requiredStr + ' min=\"' + minv + '\" max=\"' + maxv + '\" type=\"number\" step=\"' + (field.Interval ? field.Interval : 'any') + '\" value=\"' + strVal + '\" placeholder=\"' + field.Tooltip + '\" class=\"' + inputClassStr + '\" />';\r\n                break;\r\n            case Forms.FieldType.Label:\r\n                ////html += '<div class=\"labelfield\" id=\"' + fieldId + '\">' + field.Label + '</div>';\r\n                break;\r\n            case Forms.FieldType.HyperLink:\r\n                html += '<a class=\"link-field\" id=\"' + fieldId + '\" title=\"' + field.Tooltip + '\" href=\"' + field.Url + '\" ' + (field.NewWindow === true ? ' target=\"_blank\" ' : '') + '>' + field.Label + '</a>';\r\n                break;\r\n        }\r\n\r\n        if (field.AllowBelowDetectableLimit === true) {\r\n            html += '<div class=\"below-container\">';\r\n            html += '<input id=\"' + fieldId + '_below\" name=\"' + fieldId + '_below\" type=\"checkbox\"  ' + (record && record.IsBelowDetectableLimit === true ? 'checked=\"checked\"' : \"\") + ' value=\"below\" />';\r\n            html += '<label for=\"' + fieldId + '_below\">' + Resources.translate(\"Below detectable limit\") + '</label>';\r\n            html += '<div>';\r\n        }\r\n\r\n        if (field.AllowOther === true) {\r\n            html += '<input id=\"' + fieldId + '_other\" class=\"other ' + (dataOptions.inputClass ? dataOptions.inputClass : \"\") + '\" name=\"' + fieldId + '_other\" type=\"text\" value=\"' + (strVal !== \"\" && record && record.IsOtherValue === true ? strVal : \"\") + '\" placeholder=\"' + Resources.translate(\"Other value\") + '\" />';\r\n        }\r\n    }\r\n\r\n    html += '<span id=\"' + fieldId + '_validation\" class=\"field-validation ' + (dataOptions.fieldValidationClass ? dataOptions.fieldValidationClass : \"\") + '\"></span>';\r\n\r\n    if (field.additionalHtml) {\r\n        html += field.additionalHtml;\r\n    }\r\n\r\n    html += \"</div></div>\";\r\n\r\n    return html;\r\n}\r\n\r\nfunction renderForm(element, form, dataOptions, data, success, failure) {\r\n    var _this = this;\r\n    _this.form.ClientID = \"frm\" + ((Math.random() * 10000000) | 0);\r\n    _this.hasChangesProperty = false;\r\n\r\n    var html = \"<form class='pma-ui-form \" + (dataOptions.formClass ? dataOptions.formClass : \"\") + \"' name='\" + form.ClientID + \"' id='\" + form.ClientID + \"' autocomplete='off' novalidate><fieldset>\";\r\n\r\n    if (form.FormName) {\r\n        html += \"<legend class='form-name'>\" + form.FormName + (dataOptions.editButton === true && dataOptions.readOnly === true ? \"<span class=\\\"edit-button\\\">\" + Resources.translate(\"[Edit]\") + \"</span>\" : \"\") + \"</legend>\";\r\n    }\r\n\r\n    /*            \r\n    if (form.Description) {\r\n        html += \"<div class='form-description'>\" + form.Description + \"</div>\";\r\n    }\r\n    */\r\n\r\n    if (form.Instructions) {\r\n        html += \"<div class='form-instructions'>\" + form.Instructions + \"</div>\";\r\n    }\r\n\r\n    form.FormFields.sort(function (a, b) {\r\n        return a.DisplayOrder - b.DisplayOrder;\r\n    });\r\n\r\n    for (var i = 0; i < form.FormFields.length; i++) {\r\n        html += renderField.call(_this, form, i, dataOptions);\r\n    }\r\n\r\n    html += \"<div id='\" + form.ClientID + \"_validation' class='form-validation \" + (dataOptions.validationClass ? dataOptions.validationClass : \"\") + \"'></div>\";\r\n\r\n    if (dataOptions.readOnly !== true) {\r\n        html += \"<div class='input-container \" + (dataOptions.btnContainerClass ? dataOptions.btnContainerClass : \"\") + \"'>\";\r\n        html += \"<button type='submit' value='\" + Resources.translate(\"Save\") + \"' class='\" + (dataOptions.btnSaveClass ? dataOptions.btnSaveClass : \"\") + \"' >\" + Resources.translate(\"Save\") + \"</button>\";\r\n        html += \"<button type='reset' value='\" + Resources.translate(\"Reset\") + \"' class='\" + (dataOptions.btnResetClass ? dataOptions.btnResetClass : \"\") + \"' >\" + Resources.translate(\"Reset\") + \"</button>\";\r\n    }\r\n\r\n    html += \"</div>\";\r\n    html += \"</fieldset></form>\";\r\n\r\n    $(element).html(html);\r\n    bindFormElementEvents.call(_this);\r\n    if (typeof success === \"function\") {\r\n        success.call(_this, _this.form, null);\r\n    }\r\n}\r\n\r\nfunction loadFormData(serverUrl, sessionId, form, path, currentUserOnly, dataFilter, success, failure) {\r\n    var _this = this;\r\n    callApiMethod({\r\n        serverUrl: serverUrl,\r\n        method: ApiMethods.GetFormData,\r\n        data: { sessionID: sessionId, pathOrUid: path, formId: form.FormID, currentUserOnly: currentUserOnly },\r\n        success: function (http) {\r\n            var response = parseJson(http.responseText);\r\n            if (typeof success === \"function\") {\r\n                var data = null;\r\n                if (typeof dataFilter === \"string\") {\r\n                    for (var i = 0; i < response.length; i++) {\r\n                        if (response[i].Login == dataFilter) {\r\n                            data = [response[i]];\r\n                            break;\r\n                        }\r\n                    }\r\n                }\r\n                else if (typeof dataFilter === \"function\") {\r\n                    data = dataFilter.call(_this, response);\r\n                }\r\n                else {\r\n                    data = response;\r\n                }\r\n\r\n                success.call(_this, data);\r\n            }\r\n        },\r\n        failure: failure\r\n    });\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { Resources } from '../../resources/resources';\r\nimport { Events } from './components';\r\nimport { checkBrowserCompatibility } from '../../view/helpers';\r\nimport $ from 'jquery';\r\nimport { createTree } from 'jquery.fancytree/dist/modules/jquery.fancytree';\r\nimport 'jquery.fancytree/dist/modules/jquery.fancytree.dnd5';\r\nimport 'jquery.fancytree/dist/skin-win8/ui.fancytree.min.css';\r\nimport 'font-awesome/css/font-awesome.css';\r\n\r\n// meta data tree view class\r\nvar nodeTypes = {\r\n    ServerNode: \"servernode\",\r\n    FormNode: \"formnode\",\r\n    FieldNode: \"fieldnode\",\r\n    ValueNode: \"valuenode\",\r\n    SlideNode: \"slidenode\",\r\n};\r\n\r\nfunction loadServerNode(forms, serverIndex) {\r\n    var result = [];\r\n    for (var i = 0; i < forms.length; i++) {\r\n        var form = forms[i];\r\n        var formNode = {\r\n            title: form.FormName,\r\n            type: nodeTypes.FormNode,\r\n            lazy: false,\r\n            serverIndex: serverIndex,\r\n            folder: true,\r\n            formId: form.FormID,\r\n            children: [],\r\n        };\r\n\r\n        for (var j = 0; j < form.FormFields.length; j++) {\r\n            var field = form.FormFields[j];\r\n            if (this.showAllFields || field.FormList != null) {\r\n                formNode.children.push({\r\n                    title: field.Label,\r\n                    type: nodeTypes.FieldNode,\r\n                    fieldId: field.FieldID,\r\n                    formId: form.FormID,\r\n                    formListValues: field.FormList ? field.FormList.FormListValues : null,\r\n                    lazy: true,\r\n                    serverIndex: serverIndex,\r\n                    folder: true,\r\n                });\r\n            }\r\n        }\r\n\r\n        if (formNode.children.length > 0) {\r\n            result.push(formNode);\r\n        }\r\n\r\n    }\r\n\r\n    return result;\r\n}\r\n\r\nfunction loadNode(event, data) {\r\n    var dfd = new $.Deferred();\r\n    data.result = dfd.promise();\r\n\r\n    var node = data.node;\r\n    var _this = this;\r\n    var serverIndex = node.data.serverIndex;\r\n\r\n    if (node.type == nodeTypes.ServerNode) {\r\n        this.context.getFormDefinitions(_this.servers[serverIndex].url, [], \"\", function (sessionId, forms) {\r\n            var result = loadServerNode.call(_this, forms, serverIndex);\r\n            dfd.resolve(result);\r\n        },\r\n            function (error) {\r\n                dfd.reject(error.Message ? error.Message : Resources.translate(\"Error loading forms\"));\r\n            });\r\n    }\r\n    else if (node.type == nodeTypes.FieldNode) {\r\n        this.context.distinctValues({\r\n            serverUrl: _this.servers[serverIndex].url,\r\n            formId: node.data.formId,\r\n            fieldId: node.data.fieldId,\r\n            success: function (sessionId, values) {\r\n                var result = [];\r\n                for (var i = 0; i < values.length; i++) {\r\n                    var label = values[i];\r\n                    if (node.data.formListValues) {\r\n                        for (var v = 0; v < node.data.formListValues.length; v++) {\r\n                            if (node.data.formListValues[v].ValueID == label) {\r\n                                label = node.data.formListValues[v].Value;\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    result.push({\r\n                        title: label,\r\n                        type: nodeTypes.ValueNode,\r\n                        formId: node.data.formId,\r\n                        fieldId: node.data.fieldId,\r\n                        value: values[i],\r\n                        lazy: true,\r\n                        serverIndex: serverIndex,\r\n                        folder: true,\r\n                    });\r\n                }\r\n\r\n                dfd.resolve(result);\r\n            },\r\n            failure: function (error) {\r\n                dfd.reject(error.Message ? error.Message : Resources.translate(\"Error loading field\"));\r\n            }\r\n        });\r\n    }\r\n    else if (node.type == nodeTypes.ValueNode) {\r\n        this.context.metadata({\r\n            serverUrl: _this.servers[serverIndex].url,\r\n            expressions: [{\r\n                FormID: node.data.formId,\r\n                FieldID: node.data.fieldId,\r\n                Operator: 0,\r\n                Value: node.data.value\r\n            }],\r\n            success: function (sessionId, slides) {\r\n                var result = [];\r\n                for (var i = 0; i < slides.length; i++) {\r\n                    var slide = slides[i];\r\n                    result.push({\r\n                        title: slide,\r\n                        type: nodeTypes.SlideNode,\r\n                        formId: node.data.formId,\r\n                        fieldId: node.data.fieldId,\r\n                        path: slide,\r\n                        lazy: false,\r\n                        serverIndex: serverIndex,\r\n                        folder: false,\r\n                    });\r\n                }\r\n\r\n                dfd.resolve(result);\r\n            },\r\n            failure: function (error) {\r\n                dfd.reject(error.Message ? error.Message : Resources.translate(\"Error loading field\"));\r\n            }\r\n        });\r\n    }\r\n}\r\n\r\nfunction serverVersionResult(server, version) {\r\n    server.version = version;\r\n}\r\n\r\n/**\r\n* Represents a UI component that shows a tree view that allows browsing through the forms and their values submitted from multiple PMA.core servers. This component uses {@link https://github.com/mar10/fancytree|fancytree} under the hood.\r\n* @param  {PMA.UI.Components.Context} context\r\n* @param  {object} options - Configuration options\r\n* @param  {PMA.UI.Components.Tree~server[]} options.servers An array of servers to show files from\r\n* @param {string|HTMLElement} options.element - The element that hosts the tree view. It can be either a valid CSS selector or an HTMLElement instance.\r\n* @param  {function} [options.renderNode] - Allows tweaking after node state was rendered\r\n* @param  {PMA.UI.Components.Tree~rootDirSortCb} [options.rootDirSortCb] - Function that sorts an array of directories\r\n* @param  {boolean} [options.autoExpandNodes=false] - Whether the tree should expand nodes on single click\r\n* @param  {boolean} [options.showAllFields=false] - Whether to show all fields or list fields only\r\n* @fires PMA.UI.Components.Events#ValueExpanded\r\n* @fires PMA.UI.Components.Events#SlideSelected\r\n*/\r\nexport class MetadataTree {\r\n    constructor(context, options) {\r\n        if (!checkBrowserCompatibility()) {\r\n            return;\r\n        }\r\n\r\n        if (options.element instanceof HTMLElement) {\r\n            this.element = element;\r\n        }\r\n        else if (typeof options.element == \"string\") {\r\n            var el = document.querySelector(options.element);\r\n            if (!el) {\r\n                console.error(\"Invalid selector for element\");\r\n            }\r\n            else {\r\n                this.element = el;\r\n            }\r\n        }\r\n\r\n        this.context = context;\r\n        this.servers = options.servers || [];\r\n        var _this = this;\r\n\r\n        this.autoExpand = options.autoExpandNodes === true;\r\n        this.lastSearchResults = {};\r\n        this.showAllFields = options.showAllFields === true ? true : false;\r\n        this.listeners = {};\r\n        this.listeners[Events.ValueExpanded] = [];\r\n        this.listeners[Events.SlideSelected] = [];\r\n\r\n        if (typeof options.rootDirSortCb === \"function\") {\r\n            this.rootDirSortCb = options.rootDirSortCb;\r\n        }\r\n\r\n        var sourceData = [];\r\n        for (var i = 0; i < this.servers.length; i++) {\r\n            sourceData.push({\r\n                title: this.servers[i].name,\r\n                type: nodeTypes.ServerNode,\r\n                serverNode: true,\r\n                key: this.servers[i].url,\r\n                serverIndex: i,\r\n                extraClasses: \"server\",\r\n                dirPath: \"/\",\r\n                lazy: true,\r\n                unselectableStatus: false,\r\n                unselectable: true,\r\n                selected: false,\r\n            });\r\n\r\n            // try get version for each server\r\n            this.context.getVersionInfo(this.servers[i].url, serverVersionResult.bind(this, this.servers[i]));\r\n        }\r\n\r\n        var tree = createTree(this.element, {\r\n            keyPathSeparator: \"?\",\r\n            extensions: [],\r\n            selectMode: 3,\r\n            toggleEffect: { effect: \"drop\", options: { direction: \"left\" }, duration: 400 },\r\n            wide: {\r\n                iconWidth: \"1em\",\r\n                iconSpacing: \"0.5em\",\r\n                levelOfs: \"1.5em\" // Adjust this if ul padding != \"16px\"\r\n            },\r\n            icon: function (event, data) {\r\n                switch (data.node.type) {\r\n                    case nodeTypes.ServerNode:\r\n                        return \"server\";\r\n                    case nodeTypes.FormNode:\r\n                        return \"fa fa-table\";\r\n                    case nodeTypes.SlideNode:\r\n                        return \"image\";\r\n                    case nodeTypes.FieldNode:\r\n                        return \"fa fa-tag\";\r\n                    case nodeTypes.ValueNode:\r\n                        return \"fa fa-code\";\r\n                    default:\r\n                        return \"fa fa-table\";\r\n                }\r\n            },\r\n            renderNode: (typeof options.renderNode === \"function\" ? options.renderNode : null),\r\n            source: sourceData,\r\n            lazyLoad: loadNode.bind(this),\r\n            activate: function (event, data) {\r\n                // A node was activated:\r\n                var node = data.node;\r\n                if (_this.autoExpand === true) {\r\n                    node.setExpanded(true);\r\n                }\r\n\r\n                if (node.type == nodeTypes.SlideNode) {\r\n                    _this.fireEvent(Events.SlideSelected, { serverUrl: _this.servers[node.data.serverIndex].url, path: node.data.path });\r\n                }\r\n            },\r\n            select: function (event, data) {\r\n                var n = data.tree.getSelectedNodes();\r\n                var selectionArray = [];\r\n            },\r\n            expand: function (event, data) {\r\n                var node = data.node;\r\n\r\n                if (node.type == nodeTypes.ValueNode) {\r\n                    var slides = [];\r\n                    if (node.children && node.children.length > 0) {\r\n                        for (var i = 0; i < node.children.length; i++) {\r\n                            slides.push(node.children[i].data.path);\r\n                        }\r\n                    }\r\n\r\n                    _this.fireEvent(Events.ValueExpanded, { serverUrl: _this.servers[node.data.serverIndex].url, slides: slides });\r\n                }\r\n\r\n            },\r\n            dblclick: function (event, data) {\r\n                var node = data.node;\r\n            }\r\n        });\r\n    }\r\n    /**\r\n    * Adds a new server to the tree\r\n    * @param  {PMA.UI.Components.Tree~server} server A server object\r\n    */\r\n    addServer(server) {\r\n        if (server) {\r\n            this.servers.push(server);\r\n\r\n            var serverInfo = {\r\n                title: this.servers[this.servers.length - 1].name,\r\n                serverNode: true,\r\n                key: this.servers[this.servers.length - 1].url,\r\n                serverIndex: this.servers.length - 1,\r\n                extraClasses: \"server\",\r\n                dirPath: \"/\",\r\n                lazy: true,\r\n                unselectableStatus: false,\r\n                unselectable: true,\r\n                selected: false,\r\n            };\r\n\r\n            // try get version for server\r\n            this.context.getVersionInfo(server.url, serverVersionResult.bind(this, server));\r\n            $(this.element).fancytree(\"getRootNode\").addChildren(serverInfo);\r\n        }\r\n    }\r\n    /**\r\n     * Removes a server from the tree\r\n     * @param {number} index The index of the server to remove\r\n     */\r\n    removeServer(index) {\r\n        var children = $(this.element).fancytree(\"getRootNode\").getChildren();\r\n        if (children && children.length && index >= 0 && index < children.length) {\r\n            children[index].remove();\r\n        }\r\n        else {\r\n            console.error(\"No children found or index out of range\");\r\n        }\r\n    }\r\n    /**\r\n    * Attaches an event listener\r\n    * @param {PMA.UI.Components.Events} eventName - The name of the event to listen to\r\n    * @param {function} callback - The function to call when the event occurs\r\n    */\r\n    listen(eventName, callback) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" is not a valid event\");\r\n        }\r\n\r\n        this.listeners[eventName].push(callback);\r\n    }\r\n    // fires an event\r\n    fireEvent(eventName, eventArgs) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" does not exist\");\r\n            return;\r\n        }\r\n\r\n        for (var i = 0, max = this.listeners[eventName].length; i < max; i++) {\r\n            this.listeners[eventName][i].call(this, eventArgs);\r\n        }\r\n    }\r\n}\r\n\r\n\r\n\r\n\r\n","import { Resources } from '../../resources/resources';\r\nimport { Context } from './context';\r\nimport { Events } from './components';\r\nimport { checkBrowserCompatibility } from '../../view/helpers';\r\n\r\n/**\r\n * Represents a component that searches in form meta data for slides. It has a visual representation as a text field and also provides programmatic methods to search.\r\n * @param {Context} context\r\n * @param {object} [options=null] - Configuration options. If not provided, the component has no visual representation.\r\n * @param {string|HTMLElement} options.element - The container in which an input field will be added to function as a search box. It can be either a valid CSS selector or an HTMLElement instance.\r\n * @fires Components.Events#SearchStarted\r\n * @fires Components.Events#SearchFinished\r\n * @tutorial 08-meta-search\r\n */\r\nexport class MetadataSearch {\r\n    constructor(context, options) {\r\n        if (!checkBrowserCompatibility()) {\r\n            return;\r\n        }\r\n\r\n        if (!options) {\r\n            options = {};\r\n        }\r\n\r\n        this.context = context;\r\n        this.servers = {};\r\n        this.currentFocus = null;\r\n        this.searchTimeout = 0;\r\n\r\n        if (options.element instanceof HTMLElement) {\r\n            this.element = options.element;\r\n        }\r\n        else if (typeof options.element == \"string\") {\r\n            var el = document.querySelector(options.element);\r\n            if (!el) {\r\n                console.error(\"Invalid selector for element\");\r\n            }\r\n            else {\r\n                this.element = el;\r\n            }\r\n        }\r\n        else {\r\n            this.element = null;\r\n        }\r\n\r\n        this.listeners = {};\r\n        this.listeners[Events.SearchStarted] = [];\r\n        this.listeners[Events.SearchFinished] = [];\r\n        this.options = options;\r\n        this.query = \"\";\r\n        this.position = 0;\r\n\r\n        if (this.element) {\r\n            initializeTextBox.call(this);\r\n        }\r\n\r\n        this.retries = {};\r\n    }\r\n    /**\r\n     * Attaches an event listener\r\n     * @param {Components.Events} eventName - The name of the event to listen to\r\n     * @param {function} callback - The function to call when the event occurs\r\n     */\r\n    listen(eventName, callback) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" is not a valid event\");\r\n        }\r\n\r\n        this.listeners[eventName].push(callback);\r\n    }\r\n    // fires an event\r\n    fireEvent(eventName, eventArgs) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" does not exist\");\r\n            return;\r\n        }\r\n\r\n        for (var i = 0, max = this.listeners[eventName].length; i < max; i++) {\r\n            this.listeners[eventName][i].call(this, eventArgs);\r\n        }\r\n    }\r\n    /*************** Parsing & searching *************/\r\n    /**\r\n     * Searches for slides in meta data entries\r\n     * @param {string} serverUrl - The url of the PMA.core search to search against\r\n     * @param {string} queryString - The query to search with\r\n     * @returns {Promise}\r\n     */\r\n    search(serverUrl, queryString) {\r\n        var self = this;\r\n\r\n        var searchToken = (new Date()).getTime();\r\n        self.searchToken = searchToken;\r\n        if (self.retries.hasOwnProperty(serverUrl) && self.retries[serverUrl] > 2) {\r\n            return Promise.reject();\r\n        }\r\n\r\n        return initServer.call(this, serverUrl).\r\n            then(function () {\r\n                self.retries[serverUrl] = 0;\r\n                return parse.call(self, queryString);\r\n            }, function () {\r\n                self.retries[serverUrl] = (self.retries[serverUrl] || 0) + 1;\r\n            }).\r\n            then(function (query) {\r\n                if (query.expressions.length === 0) {\r\n                    return getFormSuggestions.call(self, serverUrl, query);\r\n                }\r\n\r\n                return getSuggestions.call(self, serverUrl, query);\r\n            }).\r\n            then(function (processedQuery) {\r\n                if (!processedQuery || self.searchToken !== searchToken) {\r\n                    return null;\r\n                }\r\n\r\n                var searchTerms = {\r\n                    \"sessionID\": self.servers[serverUrl].sessionId,\r\n                    \"expressions\": []\r\n                };\r\n\r\n                for (var i = 0; i < processedQuery.expressions.length; i++) {\r\n                    var expr = processedQuery.expressions[i];\r\n                    if (!isExpressionValid.call(self, expr)) {\r\n                        continue;\r\n                    }\r\n\r\n                    var form = findForm.call(self, serverUrl, expr[0].value);\r\n                    if (!form) {\r\n                        continue;\r\n                    }\r\n\r\n                    var field = findField.call(self, form, expr[1].value);\r\n\r\n                    if (!field) {\r\n                        continue;\r\n                    }\r\n\r\n                    searchTerms.expressions.push({\r\n                        \"FormID\": form.FormID,\r\n                        \"FieldID\": field.FieldID,\r\n                        \"Operator\": 0,\r\n                        \"Value\": field.FormList ? listLabelToID(field.FormList.FormListValues, expr[3].value) : expr[3].value\r\n                    });\r\n                }\r\n\r\n                if (self.searchToken === searchToken) {\r\n                    if (searchTerms.expressions.length === 0) {\r\n                        return { serverUrl: serverUrl, query: processedQuery, results: [] };\r\n                    }\r\n\r\n                    var searchTermsJson = JSON.stringify(searchTerms);\r\n\r\n                    if (self.lastSearchTerms == searchTermsJson) {\r\n                        return { serverUrl: serverUrl, query: processedQuery, results: self.lastSearchResults.slice() };\r\n                    }\r\n\r\n                    self.lastSearchTerms = \"\";\r\n                    self.lastSearchResults = [];\r\n                    return searchWithDelay.call(self, serverUrl, processedQuery, searchTerms, searchToken);\r\n                }\r\n            });\r\n    }\r\n}\r\n\r\n\r\nconst tokenTypeEnum = {\r\n    literal: \"literal\",\r\n    equalOperator: \"equal to\",\r\n    greaterThanOperator: \"greater than\",\r\n    greaterThanOrEqualToOperator: \"greater than or equal to\",\r\n    lessThanOperator: \"less than\",\r\n    lessThanOrEqualToOperator: \"less than or equal to\",\r\n    differentOperator: \"different than\",\r\n    similarOperator: \"similar to\"\r\n};\r\n\r\nfunction initServer(serverUrl) {\r\n    var self = this;\r\n    if (self.inputBox) {\r\n        self.inputBox.readonly = true;\r\n    }\r\n\r\n    return new Promise(function (resolve, reject) {\r\n        self.context.getVersionInfo(serverUrl, function (version) {\r\n            if (!version || version.startsWith(\"1.\")) {\r\n                reject();\r\n                return;\r\n            }\r\n\r\n            self.context.getSession(serverUrl, function (sessionId) {\r\n                self.servers[serverUrl] = self.servers[serverUrl] || {};\r\n                self.servers[serverUrl].sessionId = sessionId;\r\n\r\n                loadForms.call(self, serverUrl, function () {\r\n                    if (self.inputBox) {\r\n                        self.inputBox.readonly = false;\r\n                    }\r\n\r\n                    resolve(sessionId);\r\n                }, reject);\r\n\r\n            }, reject);\r\n        }, reject);\r\n    });\r\n}\r\n\r\nfunction loadForms(serverUrl, resolve, reject) {\r\n    if (this.servers[serverUrl].forms) {\r\n        resolve();\r\n        return;\r\n    }\r\n\r\n    var self = this;\r\n    this.context.getFormDefinitions(serverUrl, [], \"\", function (sessionId, definitions) {\r\n        self.servers[serverUrl].forms = definitions; // .filter(function (x) { return !x.ReadOnly; });\r\n        self.servers[serverUrl].forms.push({ FormID: -1, FormName: \"Slide\", FormFields: [{ FieldID: 0, Label: \"Path\" }, { FieldID: 1, Label: \"Barcode\" }/*, { FieldID: 0, Label: \"Extension\" }*/] });\r\n        resolve();\r\n    }, reject);\r\n}\r\n\r\n\r\nfunction searchWithDelay(serverUrl, processedQuery, searchTerms, searchToken) {\r\n    var self = this;\r\n    clearTimeout(self.searchTimeout);\r\n\r\n    var searchTermsJson = JSON.stringify(searchTerms);\r\n\r\n    var slideSearchExpressions = searchTerms.expressions.filter(function (item) {\r\n        return item.FormID === -1 && item.FieldID === 0;\r\n    });\r\n\r\n    var searchFilesOnly = slideSearchExpressions.length > 0 && slideSearchExpressions.length === searchTerms.expressions.length;\r\n\r\n    var metaSearchQuery = searchTerms;\r\n\r\n    return new Promise(function (resolve) {\r\n        self.searchTimeout = setTimeout(function () {\r\n            self.fireEvent(Events.SearchStarted, { serverUrl: serverUrl, queryString: processedQuery.getText() });\r\n\r\n            if (searchFilesOnly) {\r\n                searchPaths.call(self, serverUrl, slideSearchExpressions).\r\n                    then(function (pathResults) {\r\n                        var results = [];\r\n                        if (pathResults instanceof Array) {\r\n                            results = pathResults;\r\n                        }\r\n\r\n                        if (self.searchToken !== searchToken) {\r\n                            return;\r\n                        }\r\n\r\n                        self.lastSearchTerms = searchTermsJson;\r\n                        self.lastSearchResults = results;\r\n                        self.fireEvent(Events.SearchFinished, results);\r\n                        resolve({ serverUrl: serverUrl, query: processedQuery, results: results });\r\n                    });\r\n            }\r\n            else {\r\n                fetch(serverUrl + \"query/json/Metadata\", {\r\n                    method: \"POST\",\r\n                    mode: \"cors\",\r\n                    credentials: \"same-origin\",\r\n                    headers: { \"Content-Type\": \"application/json; charset=utf-8\" },\r\n                    body: JSON.stringify(metaSearchQuery)\r\n                }).\r\n                    then(function (response) {\r\n                        if (response.ok) {\r\n                            return response.json();\r\n                        }\r\n                        else {\r\n                            return [];\r\n                        }\r\n                    }).\r\n                    then(function (metaResults) {\r\n                        if (self.searchToken !== searchToken) {\r\n                            return;\r\n                        }\r\n\r\n                        self.lastSearchTerms = searchTermsJson;\r\n                        self.lastSearchResults = metaResults;\r\n\r\n                        self.fireEvent(Events.SearchFinished, metaResults);\r\n                        resolve({ serverUrl: serverUrl, query: processedQuery, results: metaResults });\r\n                    });\r\n            }\r\n        }, 1000);\r\n    });\r\n}\r\n\r\nfunction searchPaths(serverUrl, expressions) {\r\n    var self = this;\r\n\r\n    if (!expressions || expressions.length === 0) {\r\n        return Promise.resolve(null);\r\n    }\r\n\r\n    return new Promise(function (resolve, reject) {\r\n        var q = expressions.map(function (item) { return item.Value; }).join(\"|\");\r\n\r\n        self.context.queryFilename(serverUrl, \"\", q, function (sessionId, results) { resolve(results); }, reject);\r\n    });\r\n}\r\n\r\nfunction intersect(a, b) {\r\n    var t;\r\n    if (b.length > a.length) {\r\n        // indexOf to loop over shorter\r\n        t = b;\r\n        b = a;\r\n        a = t;\r\n    }\r\n\r\n    return a.filter(function (e) {\r\n        return b.indexOf(e) > -1;\r\n    }).\r\n        filter(function (e, i, c) { // extra step to remove duplicates\r\n            return c.indexOf(e) === i;\r\n        });\r\n}\r\n\r\nfunction parse(queryString) {\r\n    if (typeof (queryString) !== \"string\") {\r\n        throw \"Query must be a string\";\r\n    }\r\n\r\n    this.query = queryString;\r\n    this.position = 0;\r\n\r\n    var tokens = [];\r\n\r\n    while (canRead.call(this)) {\r\n        skipWhitespace.call(this);\r\n\r\n        var t = parseToken.call(this);\r\n        if (t) {\r\n            tokens.push(t);\r\n        }\r\n    }\r\n\r\n    var query = {\r\n        getText: function () {\r\n            if (!this.expressions || this.expressions.length === 0) {\r\n                return \"\";\r\n            }\r\n\r\n            var result = \"\";\r\n\r\n            for (var i = 0; i < this.expressions.length; i++) {\r\n                if (i > 0) {\r\n                    result += \",\";\r\n                }\r\n\r\n                var expr = this.expressions[i];\r\n\r\n                for (var t = 0; t < expr.length; t++) {\r\n                    if (result.length > 0) {\r\n                        result += \" \";\r\n                    }\r\n\r\n                    if (expr[t].quoted) {\r\n                        result += '\"';\r\n                    }\r\n\r\n                    result += expr[t].value;\r\n\r\n                    if (expr[t].quoted) {\r\n                        result += '\"';\r\n                    }\r\n                }\r\n            }\r\n\r\n            return result;\r\n        },\r\n        getLastToken: function () {\r\n            if (!this.expressions || this.expressions.length === 0) {\r\n                return null;\r\n            }\r\n\r\n            var lastExpr = this.expressions[this.expressions.length - 1];\r\n            if (lastExpr.length === 0) {\r\n                return null;\r\n            }\r\n\r\n            return lastExpr[lastExpr.length - 1];\r\n        },\r\n        expressions: [],\r\n        suggestions: []\r\n    };\r\n\r\n    var i = 0;\r\n    while (i < tokens.length) {\r\n        if (i <= tokens.length - 4 &&\r\n            tokens[i + 0].type === tokenTypeEnum.literal &&\r\n            tokens[i + 1].type === tokenTypeEnum.literal &&\r\n            tokens[i + 2].operator &&\r\n            tokens[i + 3].type === tokenTypeEnum.literal) {\r\n\r\n            query.expressions.push([\r\n                tokens[i + 0],\r\n                tokens[i + 1],\r\n                tokens[i + 2],\r\n                tokens[i + 3]\r\n            ]);\r\n\r\n            i += 4;\r\n        }\r\n        else if (i === tokens.length - 3 &&\r\n            tokens[i + 0].type === tokenTypeEnum.literal &&\r\n            tokens[i + 1].type === tokenTypeEnum.literal &&\r\n            tokens[i + 2].operator) {\r\n\r\n            query.expressions.push([\r\n                tokens[i + 0],\r\n                tokens[i + 1],\r\n                tokens[i + 2]\r\n            ]);\r\n\r\n            i += 3;\r\n        }\r\n        else if (i === tokens.length - 2 &&\r\n            tokens[i + 0].type === tokenTypeEnum.literal &&\r\n            tokens[i + 1].type === tokenTypeEnum.literal) {\r\n\r\n            query.expressions.push([\r\n                tokens[i + 0],\r\n                tokens[i + 1]\r\n            ]);\r\n\r\n            i += 2;\r\n        }\r\n        else if (tokens[i].type === tokenTypeEnum.literal) {\r\n            query.expressions.push([tokens[i]]);\r\n\r\n            i++;\r\n        }\r\n        else {\r\n            i++;\r\n        }\r\n    }\r\n\r\n    return new Promise(function (resolve, reject) { resolve(query); });\r\n}\r\n\r\nfunction canRead() {\r\n    return this.position < this.query.length;\r\n}\r\n\r\nfunction readChar() {\r\n    if (canRead.call(this)) {\r\n        return this.query[this.position++];\r\n    }\r\n    else {\r\n        return \"\";\r\n    }\r\n}\r\n\r\nfunction peekChar() {\r\n    if (canRead.call(this)) {\r\n        return this.query[this.position];\r\n    }\r\n    else {\r\n        return \"\";\r\n    }\r\n}\r\n\r\nfunction isExpressionValid(expression) {\r\n    return expression &&\r\n        expression.length === 4 &&\r\n        expression[0].type === tokenTypeEnum.literal &&\r\n        expression[1].type === tokenTypeEnum.literal &&\r\n        expression[2].operator &&\r\n        expression[3].type === tokenTypeEnum.literal;\r\n}\r\n\r\nfunction isTokenComplete(token) {\r\n    if (!token || (!token.quoted && isWhitespace.call(this, this.query[this.query.length - 1]))) {\r\n        return true;\r\n    }\r\n    else if (token.quoted) {\r\n        var trimmed = this.query.trimRight();\r\n        if (trimmed.length >= 2 && trimmed[trimmed.length - 1] === '\"' && trimmed[trimmed.length - 1] === '\\\\') {\r\n            return false;\r\n        }\r\n        else if (trimmed[trimmed.length - 1] === '\"') {\r\n            return true;\r\n        }\r\n    }\r\n\r\n    return false;\r\n}\r\n\r\nfunction getSuggestions(serverUrl, processedQuery) {\r\n    var lastExpression = processedQuery.expressions[processedQuery.expressions.length - 1];\r\n\r\n    if (lastExpression.length === 1) {\r\n        // either suggest forms or fields\r\n        if (isTokenComplete.call(this, lastExpression[0])) {\r\n            return getFieldSuggestions.call(this, serverUrl, processedQuery, lastExpression[0]);\r\n        }\r\n        else {\r\n            return getFormSuggestions.call(this, serverUrl, processedQuery);\r\n        }\r\n    }\r\n    else if (lastExpression.length === 2) {\r\n        // either suggest fields or operators\r\n        if (isTokenComplete.call(this, lastExpression[1])) {\r\n            return getOperatorSuggestions.call(this, processedQuery);\r\n        }\r\n        else {\r\n            return getFieldSuggestions.call(this, serverUrl, processedQuery, lastExpression[0]);\r\n        }\r\n    }\r\n    else if (lastExpression.length === 3) {\r\n        // either suggest operators or values\r\n        if (isTokenComplete.call(this, lastExpression[2])) {\r\n            return getValueSuggestions.call(this, serverUrl, processedQuery, lastExpression[0], lastExpression[1]);\r\n        }\r\n        else {\r\n            return getOperatorSuggestions.call(this, processedQuery);\r\n        }\r\n    }\r\n    else {\r\n        // either suggest forms or fields\r\n        if (isTokenComplete.call(this, lastExpression[3])) {\r\n            return getFormSuggestions.call(this, serverUrl, processedQuery);\r\n        }\r\n        else {\r\n            return getValueSuggestions.call(this, serverUrl, processedQuery, lastExpression[0], lastExpression[1]);\r\n        }\r\n    }\r\n}\r\n\r\nfunction findForm(serverUrl, name) {\r\n    if (!this.servers[serverUrl] || !this.servers[serverUrl].forms) {\r\n        return null;\r\n    }\r\n\r\n    return this.servers[serverUrl].forms.find(function (x) { return x.FormName.localeCompare(name, {}, { sensitivity: \"base\" }) === 0; });\r\n}\r\n\r\nfunction findField(form, name) {\r\n    if (!form) {\r\n        return null;\r\n    }\r\n\r\n    return form.FormFields.find(function (x) { return x.Label.localeCompare(name, {}, { sensitivity: \"base\" }) === 0; });\r\n}\r\n\r\nfunction getFormSuggestions(serverUrl, processedQuery) {\r\n    processedQuery.suggestions = this.servers[serverUrl].forms.map(function (x) { return x.FormName; });\r\n\r\n    return new Promise(function (resolve, reject) {\r\n        resolve(processedQuery);\r\n    });\r\n}\r\n\r\nfunction getFieldSuggestions(serverUrl, processedQuery, form) {\r\n    var formObj = findForm.call(this, serverUrl, form.value);\r\n    if (formObj) {\r\n        processedQuery.suggestions = formObj.FormFields.map(function (x) { return x.Label; });\r\n    }\r\n\r\n    return new Promise(function (resolve, reject) {\r\n        resolve(processedQuery);\r\n    });\r\n}\r\n\r\nfunction getOperatorSuggestions(processedQuery) {\r\n    var self = this;\r\n    return new Promise(function (resolve, reject) {\r\n        processedQuery.suggestions = getOperators.call(self);\r\n        resolve(processedQuery);\r\n    });\r\n}\r\n\r\nfunction listLabelToID(list, label) {\r\n    var result = [];\r\n    for (var j = 0; j < list.length; j++) {\r\n        if (list[j].Value == label) {\r\n            return list[j].ValueID;\r\n        }\r\n    }\r\n\r\n    return \"\";\r\n}\r\n\r\nfunction valuesToListLabels(list, values) {\r\n    var result = [];\r\n    var i, j;\r\n    for (i = 0; i < values.length; i++) {\r\n        for (j = 0; j < list.length; j++) {\r\n            if (list[j].ValueID == values[i]) {\r\n                result.push(list[j].Value);\r\n                break;\r\n            }\r\n        }\r\n    }\r\n\r\n    return result;\r\n}\r\n\r\nfunction getValueSuggestions(serverUrl, processedQuery, form, field) {\r\n    var self = this;\r\n\r\n    var formObj = findForm.call(this, serverUrl, form.value);\r\n    if (!formObj) {\r\n        return new Promise(function (resolve, reject) {\r\n            resolve(processedQuery);\r\n        });\r\n    }\r\n\r\n    var fieldObject = formObj.FormFields.find(function (x) { return x.Label.localeCompare(field.value, {}, { sensitivity: \"base\" }) === 0; });\r\n    if (!fieldObject) {\r\n        return new Promise(function (resolve, reject) {\r\n            resolve(processedQuery);\r\n        });\r\n    }\r\n\r\n    if (fieldObject.values) {\r\n        processedQuery.suggestions = fieldObject.values;\r\n\r\n        return new Promise(function (resolve, reject) {\r\n            resolve(processedQuery);\r\n        });\r\n    }\r\n\r\n    return fetch(serverUrl + \"query/json/DistinctValues?formID=\" + formObj.FormID + \"&fieldID=\" + fieldObject.FieldID + \"&sessionID=\" + self.servers[serverUrl].sessionId, {\r\n        method: \"GET\",\r\n        mode: \"cors\",\r\n        credentials: \"same-origin\",\r\n        headers: {\r\n            \"Content-Type\": \"application/json; charset=utf-8\"\r\n        }\r\n    }).\r\n        then(function (response) {\r\n            if (response.ok) {\r\n                return response.json();\r\n            }\r\n            else {\r\n                return [];\r\n            }\r\n        }).\r\n        then(function (values) {\r\n            if (fieldObject.FormList) {\r\n                fieldObject.values = valuesToListLabels(fieldObject.FormList.FormListValues, values);\r\n            }\r\n            else {\r\n                fieldObject.values = values.map(function (x) { return x + \"\"; });\r\n            }\r\n\r\n            processedQuery.suggestions = fieldObject.values;\r\n            return processedQuery;\r\n        });\r\n}\r\n\r\nfunction getOperators() {\r\n    return [\"=\"];\r\n    ////return [\"=\", \">\", \"<>\", \"<\", \">=\", \"<=\", \"~=\"];\r\n}\r\n\r\nfunction isWhitespace(char) {\r\n    return [' ', ','].indexOf(char) !== -1;\r\n}\r\n\r\nfunction skipWhitespace() {\r\n    while (isWhitespace.call(this, peekChar.call(this))) {\r\n        readChar.call(this);\r\n    }\r\n}\r\n\r\nfunction isOperatorChar(char) {\r\n    return ['=', '>', '<', '~'].indexOf(char) !== -1;\r\n}\r\n\r\nfunction isTokenChar(char) {\r\n    return !isWhitespace.call(this, char) && !isOperatorChar.call(this, char);\r\n}\r\n\r\nfunction parseToken() {\r\n    if (!canRead.call(this)) {\r\n        return null;\r\n    }\r\n\r\n    var tokenChars = [];\r\n\r\n    var isQuoted = false;\r\n    if (peekChar.call(this) === '\"') {\r\n        readChar.call(this);\r\n        isQuoted = true;\r\n    }\r\n    else if (isOperatorChar.call(this, peekChar.call(this))) {\r\n        return parseOperator.call(this);\r\n    }\r\n\r\n    while (canRead.call(this)) {\r\n        var c = readChar.call(this);\r\n\r\n        if (isQuoted) {\r\n            if (c === \"\\\\\" && peekChar.call(this) === '\"') {\r\n                tokenChars.push(readChar.call(this));\r\n                continue;\r\n            }\r\n            else if (c === '\"') {\r\n                break;\r\n            }\r\n        }\r\n        else if (!isTokenChar.call(this, c)) {\r\n            this.position--;\r\n            break;\r\n        }\r\n\r\n        tokenChars.push(c);\r\n    }\r\n\r\n    if (tokenChars.length === 0) {\r\n        return null;\r\n    }\r\n\r\n    return {\r\n        value: tokenChars.join(\"\"),\r\n        type: tokenTypeEnum.literal,\r\n        operator: false,\r\n        quoted: isQuoted\r\n    };\r\n}\r\n\r\nfunction parseOperator() {\r\n    var tokenChars = [];\r\n    while (canRead.call(this)) {\r\n        if (isOperatorChar.call(this, peekChar.call(this))) {\r\n            tokenChars.push(readChar.call(this));\r\n        }\r\n        else {\r\n            break;\r\n        }\r\n    }\r\n\r\n    if (tokenChars.length === 0) {\r\n        return null;\r\n    }\r\n\r\n    var tokenString = tokenChars.join(\"\");\r\n    var tokenType = tokenTypeEnum.literal;\r\n    switch (tokenString) {\r\n        case \"=\":\r\n            tokenType = tokenTypeEnum.equalOperator;\r\n            break;\r\n        case \"<>\":\r\n            tokenType = tokenTypeEnum.differentOperator;\r\n            break;\r\n        case \">\":\r\n            tokenType = tokenTypeEnum.greaterThanOperator;\r\n            break;\r\n        case \">=\":\r\n            tokenType = tokenTypeEnum.greaterThanOrEqualToOperator;\r\n            break;\r\n        case \"<\":\r\n            tokenType = tokenTypeEnum.lessThanOperator;\r\n            break;\r\n        case \"<=\":\r\n            tokenType = tokenTypeEnum.lessThanOrEqualToOperator;\r\n            break;\r\n        case \"~=\":\r\n            tokenType = tokenTypeEnum.similarOperator;\r\n            break;\r\n        default:\r\n            throw \"Unknown operator\";\r\n    }\r\n\r\n    return {\r\n        value: tokenString,\r\n        type: tokenType,\r\n        operator: true,\r\n        quoted: false\r\n    };\r\n}\r\n\r\n\r\n\r\n/*************** End of parsing & searching *************/\r\n\r\n/*************** Autocomplete UI *************/\r\nfunction initializeTextBox() {\r\n    this.element.classList.add(\"pma-ui-meta-data-search\");\r\n    this.inputBox = document.createElement(\"input\", { type: \"text\", autocomplete: \"off\" });\r\n    this.element.appendChild(this.inputBox);\r\n    this.inputBox.addEventListener(\"input\", inputInput.bind(this));\r\n    this.inputBox.addEventListener(\"keydown\", inputKeyDown.bind(this));\r\n    this.inputBox.addEventListener(\"focus\", inputInput.bind(this));\r\n\r\n    var self = this;\r\n    document.addEventListener(\"click\", function (e) {\r\n        closeAllLists.call(self, e.target);\r\n    });\r\n\r\n    var context = new Context({ caller: \"\" });\r\n    context.getVersionInfo(\r\n        this.options.serverUrl,\r\n        function (version) {\r\n            if (version != null && version.startsWith(\"2\")) {\r\n                //self.inputBox.disabled = false;\r\n            }\r\n            else {\r\n                console.log(version);\r\n                console.warn(\"Metadata search only works with PMA.core version 2.x. Version reported: \" + version);\r\n            }\r\n        },\r\n        function () {\r\n            console.warn(\"Cannot reach PMA.core server. Metadata search only works with PMA.core version 2.x.\");\r\n        });\r\n}\r\n\r\nfunction inputInput(e) {\r\n    var self = this;\r\n    var val = self.inputBox.value;\r\n\r\n    closeAllLists.call(self);\r\n\r\n    self.search(self.options.serverUrl, val).\r\n        then(function (result) {\r\n            showSuggestions.call(self, result.query);\r\n        },\r\n            function () {\r\n            });\r\n}\r\n\r\nfunction showSuggestions(query) {\r\n    var a, b, i;\r\n    a = document.createElement(\"DIV\");\r\n    a.setAttribute(\"class\", \"autocomplete-items\");\r\n    var self = this;\r\n\r\n    this.element.appendChild(a);\r\n\r\n    var arr = query.suggestions;\r\n    var lastToken = query.getLastToken();\r\n    var val = \"\";\r\n    if (lastToken && !isTokenComplete.call(self, lastToken)) {\r\n        val = lastToken.value;\r\n    }\r\n\r\n    function itemSelected() {\r\n        var itemValue = this.getElementsByTagName(\"input\")[0].value;\r\n        if (lastToken && !isTokenComplete.call(self, lastToken)) {\r\n            lastToken.value = itemValue;\r\n            lastToken.quoted = lastToken.value.indexOf(' ') !== -1;\r\n            self.inputBox.value = query.getText();\r\n        }\r\n        else {\r\n            self.inputBox.value = query.getText() + \" \" + (itemValue.indexOf(' ') !== -1 ? '\"' + itemValue + '\"' : itemValue);\r\n        }\r\n\r\n        self.search(self.options.serverUrl, self.inputBox.value);\r\n        closeAllLists.call(self);\r\n    }\r\n\r\n    var io;\r\n    for (i = 0; i < arr.length; i++) {\r\n        if (val.length === 0) {\r\n            b = document.createElement(\"DIV\");\r\n            b.innerHTML = arr[i];\r\n        }\r\n        else {\r\n            io = arr[i].toUpperCase().indexOf(val.toUpperCase());\r\n            if (io === -1) {\r\n                continue;\r\n            }\r\n\r\n            b = document.createElement(\"DIV\");\r\n\r\n            // make the matching letters bold\r\n            b.innerHTML = arr[i].substr(0, io);\r\n            b.innerHTML += \"<strong>\" + arr[i].substr(io, val.length) + \"</strong>\";\r\n            b.innerHTML += arr[i].substr(io + val.length);\r\n        }\r\n\r\n        // insert a input field that will hold the current array item's value\r\n        b.innerHTML += \"<input type='hidden' value='\" + arr[i] + \"'>\";\r\n\r\n        b.addEventListener(\"click\", itemSelected);\r\n\r\n        a.appendChild(b);\r\n    }\r\n}\r\n\r\nfunction inputKeyDown(e) {\r\n    var x = this.element.querySelectorAll(\".autocomplete-items div\");\r\n    if (x.length === 0) {\r\n        return;\r\n    }\r\n\r\n    var curActive = this.element.querySelector(\".autocomplete-active\");\r\n    var index = -1;\r\n    if (curActive) {\r\n        curActive.classList.remove(\"autocomplete-active\");\r\n        for (var count = 0; count < x.length; count++) {\r\n            if (x[count] === curActive) {\r\n                index = count;\r\n                break;\r\n            }\r\n        }\r\n    }\r\n\r\n    if (e.keyCode == 40) {\r\n        index++;\r\n        index = index >= x.length ? 0 : index;\r\n        x[index].classList.add(\"autocomplete-active\");\r\n    }\r\n    else if (e.keyCode == 38) {\r\n        index--;\r\n        index = index < 0 ? x.length - 1 : index;\r\n        x[index].classList.add(\"autocomplete-active\");\r\n    }\r\n    else if (e.keyCode == 13) {\r\n        e.preventDefault();\r\n\r\n        if (index !== -1) {\r\n            x[index].click();\r\n        }\r\n\r\n        closeAllLists.call(this);\r\n    }\r\n    else if (e.keyCode == 27) {\r\n        closeAllLists.call(this);\r\n    }\r\n}\r\n\r\nfunction closeAllLists(element) {\r\n    var x = document.getElementsByClassName(\"autocomplete-items\");\r\n    for (var i = 0; i < x.length; i++) {\r\n        if (element != x[i] && element != this.inputBox) {\r\n            x[i].parentNode.removeChild(x[i]);\r\n        }\r\n    }\r\n}","import { Events } from './components';\r\nimport { Events as ViewEvents } from '../../view/definitions';\r\nimport { rotate } from 'ol/coordinate';\r\n\r\n/**\r\n * Automatically handles syncronization of views between slides\r\n * @param  {SlideLoader[]} slideLoaders - Array of PMA.UI.Components.SlideLoaders.\r\n */\r\nexport class SyncView {\r\n    constructor(slideLoaders) {\r\n        if (!slideLoaders.length) {\r\n            console.error(\"Expected array of PMA.UI.Components.SlideLoader\");\r\n            return;\r\n        }\r\n\r\n        this.slideLoaders = slideLoaders;\r\n\r\n        // for syncing viewers\r\n        this.eventsKeys = [];\r\n        this.posSync = [];\r\n        this.overridePosition = false;\r\n\r\n        this.listeners = {};\r\n        this.listeners[Events.SyncChanged] = [];\r\n\r\n        for (var i = 0; i < this.slideLoaders.length; i++) {\r\n            this.slideLoaders[i].listen(Events.BeforeSlideLoad, this.disableSync.bind(this));\r\n        }\r\n    }\r\n    /**\r\n     * Enables synchronization on the slides\r\n     * @fires PMA.UI.Components.Events#SyncChanged\r\n     */\r\n    enableSync() {\r\n        this.posSync = [];\r\n\r\n        for (var i = 0; i < this.slideLoaders.length; i++) {\r\n            var slideLoader = this.slideLoaders[i];\r\n\r\n            if (slideLoader.mainViewport && slideLoader.mainViewport.map) {\r\n                this.posSync.push(slideLoader.mainViewport.getPosition());\r\n\r\n                var parameter = { index: i, self: this, slideLoaders: this.slideLoaders };\r\n                this.eventsKeys.push({ viewport: slideLoader.mainViewport, callback: viewChanged.bind(this, parameter) });\r\n                slideLoader.mainViewport.listen(ViewEvents.ViewChanged, this.eventsKeys[this.eventsKeys.length - 1].callback);\r\n            }\r\n        }\r\n\r\n        this.fireEvent(Events.SyncChanged, true);\r\n    }\r\n    /**\r\n     * Disables synchronization on the slides\r\n     * @fires PMA.UI.Components.Events#SyncChanged\r\n     */\r\n    disableSync() {\r\n        if (this.eventsKeys) {\r\n            while (this.eventsKeys.length > 0) {\r\n                var ek = this.eventsKeys.pop();\r\n                var result = ek.viewport.unlisten(ViewEvents.ViewChanged, ek.callback);\r\n            }\r\n        }\r\n\r\n        this.posSync = [];\r\n\r\n        this.fireEvent(Events.SyncChanged, false);\r\n    }\r\n    /**\r\n     * Returns a value indicating whether slides are synchronized\r\n     * @fires PMA.UI.Components.Events#SyncChanged\r\n     */\r\n    getStatus() {\r\n        return this.eventsKeys && this.eventsKeys.length > 0;\r\n    }\r\n    /**\r\n     * Attaches an event listener\r\n     * @param {PMA.UI.Components.Events} eventName - The name of the event to listen to\r\n     * @param {function} callback - The function to call when the event occurs\r\n     */\r\n    listen(eventName, callback) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" is not a valid event\");\r\n        }\r\n\r\n        this.listeners[eventName].push(callback);\r\n    }\r\n    // fires an event\r\n    fireEvent(eventName, eventArgs) {\r\n        if (!this.listeners.hasOwnProperty(eventName)) {\r\n            console.error(eventName + \" does not exist\");\r\n            return;\r\n        }\r\n\r\n        for (var i = 0, max = this.listeners[eventName].length; i < max; i++) {\r\n            this.listeners[eventName][i].call(this, eventArgs);\r\n        }\r\n    }\r\n}\r\n\r\n\r\n\r\nvar overridePosition = false;\r\nfunction viewChanged(parameters) {\r\n    if (parameters && !overridePosition) {\r\n        var self = parameters.self;\r\n        var slideLoader = parameters.slideLoaders[parameters.index];\r\n        let flipState = slideLoader.mainViewport.getFlip();\r\n        for (let i = 0; i < parameters.slideLoaders.length; i++) {\r\n            if (parameters.index == i) {\r\n                continue;\r\n            }\r\n\r\n            let sl = parameters.slideLoaders[i];\r\n\r\n            let flipStateI = sl.mainViewport.getFlip();\r\n            if (flipStateI.horizontally != flipState.horizontally || flipStateI.vertically != flipState.vertically) {\r\n                sl.mainViewport.setFlip(flipState.horizontally, flipState.vertically);\r\n            }\r\n\r\n        }\r\n\r\n        var pos = slideLoader.mainViewport.getPosition();\r\n        var oldPos = self.posSync[parameters.index];\r\n\r\n        if (isNaN(pos.zoom)) {\r\n            return;\r\n        }\r\n\r\n        if (oldPos) {\r\n            var diff = {\r\n                zoom: pos.zoom - oldPos.zoom,\r\n                rotation: pos.rotation - oldPos.rotation,\r\n                center: [pos.center[0] - oldPos.center[0], pos.center[1] - oldPos.center[1]]\r\n            };\r\n\r\n            self.posSync[parameters.index] = pos;\r\n            oldPos = self.posSync[parameters.index];\r\n\r\n            overridePosition = true;\r\n            for (var i = 0; i < parameters.slideLoaders.length; i++) {\r\n                if (i == parameters.index) {\r\n                    continue;\r\n                }\r\n\r\n                var p = self.posSync[i];\r\n                if (p) {\r\n                    p.zoom += diff.zoom;\r\n                    p.rotation += diff.rotation;\r\n                    if (p.rotation != oldPos.rotation) {\r\n                        // different rotation \r\n                        var d = rotate([diff.center[0], diff.center[1]], p.rotation - oldPos.rotation);\r\n                        p.center[0] += d[0];\r\n                        p.center[1] += d[1];\r\n                    }\r\n                    else {\r\n                        p.center[0] += diff.center[0];\r\n                        p.center[1] += diff.center[1];\r\n                    }\r\n\r\n                    parameters.slideLoaders[i].mainViewport.setPosition(p, true);\r\n                    parameters.slideLoaders[i].mainViewport.map.getView().dispatchEvent(\"change:center\");\r\n                }\r\n\r\n                self.posSync[i] = p;\r\n            }\r\n\r\n            overridePosition = false;\r\n        }\r\n    }\r\n}","import { getVersion } from './view/version';\r\nimport { Resources } from './resources/resources';\r\nimport { Viewport } from './view/viewport';\r\nimport { Themes, ButtonLocations, ObjectiveResolutions, AnnotationState, Controls as ControlTypes } from './view/definitions';\r\nimport { Tree } from './components/js/tree';\r\nimport { Context } from './components/js/context';\r\nimport { AutoLogin } from './components/js/autologin';\r\nimport { PromptLogin } from './components/js/promptlogin';\r\nimport { SessionLogin } from './components/js/sessionlogin';\r\nimport { CustomLogin } from './components/js/customlogin';\r\nimport { Gallery } from './components/js/gallery';\r\nimport {\r\n    Events as ComponentEvents,\r\n    GalleryRenderOptions,\r\n    GetSlidesScope,\r\n    getThumbnailUrl,\r\n    getBarcodeUrl,\r\n    getSnapshotUrl,\r\n    parseDragData,\r\n    login,\r\n    formify,\r\n    ajax,\r\n    callApiMethod,\r\n    DragDropMimeType\r\n} from './components/js/components';\r\nimport './view/view.css';\r\nimport 'ol/ol.css';\r\nimport './view/ol/ol.css';\r\nimport './components/css/components.css';\r\nimport { Annotations } from './components/js/annotations';\r\nimport { SlideLoader } from './components/js/slideLoader';\r\nimport { Forms } from './components/js/forms';\r\nimport { MetadataTree } from './components/js/metadatatree';\r\nimport { MetadataSearch } from './components/js/metaDataSearch';\r\nimport { SyncView } from './components/js/syncview';\r\nimport { Events as ViewerEvents, Annotation as AnnotationTypes } from './view/definitions';\r\nimport { RotationControl } from './view/controls/rotationControl';\r\nimport { Overview } from './view/controls/overview';\r\nimport { Filename } from './view/controls/filename';\r\nimport { PrevZoom } from './view/controls/prevZoom';\r\nimport { DimensionSelector } from './view/controls/dimensionSelector';\r\nimport { Snapshot } from './view/controls/snapshot';\r\nimport { AssociatedImage } from './view/controls/associatedImage';\r\nimport { PathomationAttribution } from './view/controls/pathomationAttribution';\r\nimport { ColorAdjustment } from './view/controls/colorAdjustment';\r\nimport { LayerSwitch } from './view/controls/layerSwitch';\r\nimport { Magnifier } from './view/controls/magnifier';\r\nimport { unByKey } from 'ol/Observable';\r\nimport { Feature } from 'ol';\r\nimport { Point, Polygon } from 'ol/geom';\r\nimport { Style, Icon, Text, Fill, Stroke } from 'ol/style';\r\nimport { Vector as VectorSource } from 'ol/source';\r\nimport { Vector as VectorLayer } from 'ol/layer';\r\nimport { ApiMethods } from './components/js/components';\r\nimport { MouseWheelZoomMode } from './view/interactions/customMouseWheelZoom';\r\n\r\nexport const\r\n    /**\r\n     * PMA.UI namespace\r\n     * @namespace\r\n     * @memberof PMA\r\n     */\r\n    UI = {\r\n        getVersion: getVersion,\r\n        Resources: Resources,\r\n        View: {\r\n            Viewport: Viewport,\r\n            Themes: Themes,\r\n            ButtonLocations: ButtonLocations,\r\n            Events: ViewerEvents,\r\n            ObjectiveResolutions: ObjectiveResolutions,\r\n            getThumbnailUrl: getThumbnailUrl,\r\n            getBarcodeUrl: getBarcodeUrl,\r\n            Controls: {\r\n                RotationControl: RotationControl,\r\n                Overview: Overview,\r\n                Filename: Filename,\r\n                PrevZoom: PrevZoom,\r\n                DimensionSelector: DimensionSelector,\r\n                AssociatedImage: AssociatedImage,\r\n                Snapshot: Snapshot,\r\n                PathomationAttribution: PathomationAttribution,\r\n                ColorAdjustment: ColorAdjustment,\r\n                LayerSwitch: LayerSwitch,\r\n                Magnifier: Magnifier\r\n            }\r\n        },\r\n        Types: {\r\n            Controls: ControlTypes,\r\n            Annotation: AnnotationTypes,\r\n            AnnotationState: AnnotationState,\r\n            MouseWheelZoomMode: MouseWheelZoomMode,\r\n        },\r\n        Components: {\r\n            Tree: Tree,\r\n            Context: Context,\r\n            Events: ComponentEvents,\r\n            Annotations: Annotations,\r\n            AnnotationState: AnnotationState,\r\n            GalleryRenderOptions: GalleryRenderOptions,\r\n            GetSlidesScope: GetSlidesScope,\r\n            Gallery: Gallery,\r\n            SlideLoader: SlideLoader,\r\n            Forms: Forms,\r\n            MetadataTree: MetadataTree,\r\n            MetadataSearch: MetadataSearch,\r\n            SyncView: SyncView,\r\n            ApiMethods: ApiMethods,\r\n            getThumbnailUrl: getThumbnailUrl,\r\n            login: login,\r\n            getBarcodeUrl: getBarcodeUrl,\r\n            getSnapshotUrl: getSnapshotUrl,\r\n            parseDragData: parseDragData,\r\n            formify: formify,\r\n            ajax: ajax,\r\n            callApiMethod: callApiMethod,\r\n            DragDropMimeType: DragDropMimeType\r\n        },\r\n        Authentication: {\r\n            AutoLogin: AutoLogin,\r\n            PromptLogin: PromptLogin,\r\n            SessionLogin: SessionLogin,\r\n            CustomLogin: CustomLogin,\r\n        },\r\n        OpenLayers: {\r\n            Observable: {\r\n                unByKey: unByKey\r\n            },\r\n            Feature: Feature,\r\n            Geom: {\r\n                Point: Point,\r\n                Polygon: Polygon,\r\n            },\r\n            Style: {\r\n                Style: Style,\r\n                Icon: Icon,\r\n                Text: Text,\r\n                Fill: Fill,\r\n                Stroke: Stroke\r\n            },\r\n            Source: {\r\n                Vector: VectorSource\r\n            },\r\n            Layer: {\r\n                Vector: VectorLayer\r\n            }\r\n        }\r\n    };\r\n\r\n"],"sourceRoot":""}