cccamp19-map/dist/main.js.map

1 line
1.2 MiB
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/rbush/index.js","webpack:///./node_modules/quickselect/quickselect.js","webpack:///./src/app.scss?cb69","webpack:///./node_modules/ol/util.js","webpack:///./node_modules/ol/AssertionError.js","webpack:///./node_modules/ol/CollectionEventType.js","webpack:///./node_modules/ol/ObjectEventType.js","webpack:///./node_modules/ol/obj.js","webpack:///./node_modules/ol/events.js","webpack:///./node_modules/ol/Disposable.js","webpack:///./node_modules/ol/functions.js","webpack:///./node_modules/ol/events/Event.js","webpack:///./node_modules/ol/events/Target.js","webpack:///./node_modules/ol/events/EventType.js","webpack:///./node_modules/ol/Observable.js","webpack:///./node_modules/ol/Object.js","webpack:///./node_modules/ol/Collection.js","webpack:///./node_modules/ol/MapEvent.js","webpack:///./node_modules/ol/MapBrowserEvent.js","webpack:///./node_modules/ol/has.js","webpack:///./node_modules/ol/MapBrowserEventType.js","webpack:///./node_modules/ol/MapBrowserPointerEvent.js","webpack:///./node_modules/ol/pointer/EventType.js","webpack:///./node_modules/ol/pointer/EventSource.js","webpack:///./node_modules/ol/pointer/MouseSource.js","webpack:///./node_modules/ol/pointer/MsSource.js","webpack:///./node_modules/ol/pointer/NativeSource.js","webpack:///./node_modules/ol/pointer/PointerEvent.js","webpack:///./node_modules/ol/array.js","webpack:///./node_modules/ol/pointer/TouchSource.js","webpack:///./node_modules/ol/pointer/PointerEventHandler.js","webpack:///./node_modules/ol/MapBrowserEventHandler.js","webpack:///./node_modules/ol/MapEventType.js","webpack:///./node_modules/ol/MapProperty.js","webpack:///./node_modules/ol/render/EventType.js","webpack:///./node_modules/ol/TileState.js","webpack:///./node_modules/ol/asserts.js","webpack:///./node_modules/ol/structs/PriorityQueue.js","webpack:///./node_modules/ol/TileQueue.js","webpack:///./node_modules/ol/tilegrid/common.js","webpack:///./node_modules/ol/math.js","webpack:///./node_modules/ol/centerconstraint.js","webpack:///./node_modules/ol/resolutionconstraint.js","webpack:///./node_modules/ol/rotationconstraint.js","webpack:///./node_modules/ol/ViewHint.js","webpack:///./node_modules/ol/ViewProperty.js","webpack:///./node_modules/ol/string.js","webpack:///./node_modules/ol/coordinate.js","webpack:///./node_modules/ol/easing.js","webpack:///./node_modules/ol/extent/Corner.js","webpack:///./node_modules/ol/extent/Relationship.js","webpack:///./node_modules/ol/extent.js","webpack:///./node_modules/ol/geom/GeometryType.js","webpack:///./node_modules/ol/geom/GeometryLayout.js","webpack:///./node_modules/ol/geom/flat/transform.js","webpack:///./node_modules/ol/sphere.js","webpack:///./node_modules/ol/proj/Units.js","webpack:///./node_modules/ol/proj/Projection.js","webpack:///./node_modules/ol/proj/epsg3857.js","webpack:///./node_modules/ol/proj/epsg4326.js","webpack:///./node_modules/ol/proj/projections.js","webpack:///./node_modules/ol/proj/transforms.js","webpack:///./node_modules/ol/proj.js","webpack:///./node_modules/ol/transform.js","webpack:///./node_modules/ol/geom/Geometry.js","webpack:///./node_modules/ol/geom/SimpleGeometry.js","webpack:///./node_modules/ol/geom/flat/area.js","webpack:///./node_modules/ol/geom/flat/closest.js","webpack:///./node_modules/ol/geom/flat/deflate.js","webpack:///./node_modules/ol/geom/flat/inflate.js","webpack:///./node_modules/ol/geom/flat/simplify.js","webpack:///./node_modules/ol/geom/LinearRing.js","webpack:///./node_modules/ol/geom/Point.js","webpack:///./node_modules/ol/geom/flat/contains.js","webpack:///./node_modules/ol/geom/flat/interiorpoint.js","webpack:///./node_modules/ol/geom/flat/segments.js","webpack:///./node_modules/ol/geom/flat/intersectsextent.js","webpack:///./node_modules/ol/geom/flat/reverse.js","webpack:///./node_modules/ol/geom/flat/orient.js","webpack:///./node_modules/ol/geom/Polygon.js","webpack:///./node_modules/ol/View.js","webpack:///./node_modules/ol/dom.js","webpack:///./node_modules/ol/layer/Property.js","webpack:///./node_modules/ol/layer/Base.js","webpack:///./node_modules/ol/source/State.js","webpack:///./node_modules/ol/layer/Group.js","webpack:///./node_modules/ol/size.js","webpack:///./node_modules/ol/PluggableMap.js","webpack:///./node_modules/ol/control/Control.js","webpack:///./node_modules/ol/css.js","webpack:///./node_modules/ol/layer/Layer.js","webpack:///./node_modules/ol/control/Attribution.js","webpack:///./node_modules/ol/control/Rotate.js","webpack:///./node_modules/ol/control/Zoom.js","webpack:///./node_modules/ol/control/util.js","webpack:///./node_modules/ol/Kinetic.js","webpack:///./node_modules/ol/interaction/Property.js","webpack:///./node_modules/ol/interaction/Interaction.js","webpack:///./node_modules/ol/interaction/DoubleClickZoom.js","webpack:///./node_modules/ol/events/condition.js","webpack:///./node_modules/ol/interaction/Pointer.js","webpack:///./node_modules/ol/interaction/DragPan.js","webpack:///./node_modules/ol/interaction/DragRotate.js","webpack:///./node_modules/ol/render/Box.js","webpack:///./node_modules/ol/interaction/DragBox.js","webpack:///./node_modules/ol/interaction/DragZoom.js","webpack:///./node_modules/ol/events/KeyCode.js","webpack:///./node_modules/ol/interaction/KeyboardPan.js","webpack:///./node_modules/ol/interaction/KeyboardZoom.js","webpack:///./node_modules/ol/interaction/MouseWheelZoom.js","webpack:///./node_modules/ol/interaction/PinchRotate.js","webpack:///./node_modules/ol/interaction/PinchZoom.js","webpack:///./node_modules/ol/interaction.js","webpack:///./node_modules/ol/reproj/common.js","webpack:///./node_modules/ol/ImageBase.js","webpack:///./node_modules/ol/ImageState.js","webpack:///./node_modules/ol/ImageCanvas.js","webpack:///./node_modules/ol/LayerType.js","webpack:///./node_modules/ol/layer/VectorRenderType.js","webpack:///./node_modules/ol/render/Event.js","webpack:///./node_modules/ol/structs/LRUCache.js","webpack:///./node_modules/ol/render/canvas.js","webpack:///./node_modules/ol/color.js","webpack:///./node_modules/ol/colorlike.js","webpack:///./node_modules/ol/render/VectorContext.js","webpack:///./node_modules/ol/render/canvas/Immediate.js","webpack:///./node_modules/ol/style/IconImageCache.js","webpack:///./node_modules/ol/renderer/Map.js","webpack:///./node_modules/ol/renderer/canvas/Map.js","webpack:///./node_modules/ol/renderer/Layer.js","webpack:///./node_modules/ol/renderer/canvas/Layer.js","webpack:///./node_modules/ol/renderer/canvas/IntermediateCanvas.js","webpack:///./node_modules/ol/renderer/canvas/ImageLayer.js","webpack:///./node_modules/ol/TileRange.js","webpack:///./node_modules/ol/renderer/canvas/TileLayer.js","webpack:///./node_modules/ol/render/ReplayGroup.js","webpack:///./node_modules/ol/render/ReplayType.js","webpack:///./node_modules/ol/geom/flat/length.js","webpack:///./node_modules/ol/geom/flat/textpath.js","webpack:///./node_modules/ol/render/canvas/Instruction.js","webpack:///./node_modules/ol/render/replay.js","webpack:///./node_modules/ol/render/canvas/Replay.js","webpack:///./node_modules/ol/render/canvas/ImageReplay.js","webpack:///./node_modules/ol/render/canvas/LineStringReplay.js","webpack:///./node_modules/ol/render/canvas/PolygonReplay.js","webpack:///./node_modules/ol/geom/flat/straightchunk.js","webpack:///./node_modules/ol/style/TextPlacement.js","webpack:///./node_modules/ol/render/canvas/TextReplay.js","webpack:///./node_modules/ol/render/canvas/ReplayGroup.js","webpack:///./node_modules/ol/renderer/vector.js","webpack:///./node_modules/ol/renderer/canvas/VectorLayer.js","webpack:///./node_modules/ol/layer/VectorTileRenderType.js","webpack:///./node_modules/ol/renderer/canvas/VectorTileLayer.js","webpack:///./node_modules/ol/Map.js","webpack:///./node_modules/ol/layer/TileProperty.js","webpack:///./node_modules/ol/layer/Tile.js","webpack:///./node_modules/ol/Tile.js","webpack:///./node_modules/ol/ImageTile.js","webpack:///./node_modules/ol/tilecoord.js","webpack:///./node_modules/ol/TileCache.js","webpack:///./node_modules/ol/reproj.js","webpack:///./node_modules/ol/reproj/Triangulation.js","webpack:///./node_modules/ol/reproj/Tile.js","webpack:///./node_modules/ol/tileurlfunction.js","webpack:///./node_modules/ol/source/Source.js","webpack:///./node_modules/ol/tilegrid/TileGrid.js","webpack:///./node_modules/ol/tilegrid.js","webpack:///./node_modules/ol/source/Tile.js","webpack:///./node_modules/ol/source/TileEventType.js","webpack:///./node_modules/ol/source/UrlTile.js","webpack:///./node_modules/ol/source/TileImage.js","webpack:///./node_modules/ol/source/XYZ.js","webpack:///./node_modules/ol/source/OSM.js","webpack:///./src/app.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;AClFa;;AAEb;AACA;;AAEA,kBAAkB,mBAAO,CAAC,EAAa;;AAEvC;AACA;;AAEA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,mDAAmD,SAAS;;AAE5D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,mDAAmD,SAAS;;AAE5D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA,8CAA8C,SAAS;AACvD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;;AAEA,4BAA4B;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;;AAEA,aAAa,mBAAmB;AAChC;AACA;AACA;;AAEA,aAAa,kBAAkB;AAC/B;;AAEA;AACA,KAAK;;AAEL,6BAA6B,aAAa,EAAE;;AAE5C;AACA;;AAEA,yBAAyB,kBAAkB,EAAE;;AAE7C;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA,sBAAsB,YAAY;;AAElC;;AAEA;;AAEA,uBAAuB,aAAa;;AAEpC;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA,mDAAmD,SAAS;AAC5D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;;AAEA;;AAEA,mBAAmB,YAAY;AAC/B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA,KAAK;;AAEL;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;;AAEA,iBAAiB;;AAEjB,aAAa;AACb;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA,gDAAgD;;AAEhD;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA;AACA,yCAAyC;AACzC;AACA;;AAEA;AACA;;AAEA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0BAA0B,OAAO;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gCAAgC,wBAAwB;AACxD,gCAAgC,wBAAwB;;AAExD,wBAAwB,8CAA8C;AACtE,wBAAwB,8CAA8C;;AAEtE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACjjBA;AACA,CAAC,KAA4D;AAC7D,CAAC,SACgC;AACjC,CAAC,qBAAqB;;AAEtB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,CAAC;;;;;;;AC9DD,uC;;;;;;;;;;ACAA;AACA;AACA;;AAEA;AACA,YAAY,EAAE;AACd;AACO,SAAS,aAAQ;AACxB,oBAAoB,EAAE;AACtB;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACO;AACP;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACO;;AAEP,gC;;ACpEA;AACA;AACA;AACkC;;AAElC;AACA;AACA;AACA;AACA;AACA,IAAI,6BAAc;AAClB;AACA,eAAe,OAAO,gBAAgB,OAAO,SAAS,OAAO;AAC7D;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;AAEc,mFAAc,EAAC;;AAE9B,0C;;AC9CA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,+C;;ACtBA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,2C;;AChBA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB;AACO,IAAI,UAAM;AACjB;;AAEA;AACA;AACA;;AAEA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB;AACO,SAAS,SAAK;AACrB;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,YAAY;AACvB,YAAY,UAAU;AACtB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACO,SAAS,WAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA,+B;;AC3EA;AACA;AACA;AAC+B;;;AAG/B;AACA,oBAAoB,8CAA8C;AAClE,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,iBAAiB;AAC/B,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,iBAAiB;AAC/B,cAAc,6CAA6C;AAC3D,cAAc,OAAO;AACrB;AACA;;;AAGA;AACA;AACA;AACA;AACA,aAAa,sEAAsE;AACnF;AACA;;;AAGA;AACA,WAAW,UAAU;AACrB,YAAY,iBAAiB;AAC7B;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,uBAAuB,iCAAiC;AACxD;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,sBAAsB,qCAAqC;AAC3D,YAAY,oBAAoB;AAChC;AACO;AACP;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,6CAA6C;AACxD,WAAW,OAAO;AAClB,YAAY,2BAA2B;AACvC;AACO;AACP;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,6CAA6C;AACxD,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA,0CAA0C,QAAQ;AAClD,iBAAiB,qCAAqC;AACtD;AACA,MAAM,SAAK;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qCAAqC;AAC5D;AACA,WAAW,6CAA6C;AACxD,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB,YAAY,UAAU;AACtB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,6BAA6B,UAAU;AACvC;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,qCAAqC;AACpD;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qCAAqC;AACzC;AACA;AACA,SAAS,8BAA8B;AACvC;AACA;AACA;AACA,WAAW,6CAA6C;AACxD,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB;AACA,YAAY,UAAU;AACtB;AACO;AACP;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,4CAA4C,8BAA8B;AAC1E;AACA,WAAW,6CAA6C;AACxD,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI,8BAA8B,KAAK,kCAAkC;AACzE;AACA,WAAW,UAAU;AACrB;AACO;AACP;AACA,eAAe,qCAAqC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,SAAK;AACT;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,6CAA6C;AACxD;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kC;;ACjRA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,qBAAU;AACd;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAU;;AAEK,uEAAU,EAAC;;AAE1B,sC;;ACnCA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACO;AACP;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACO;AACP;AACA;;AAEA;AACA;AACA;AACA,YAAY,KAAK;AACjB;AACO;;AAEP,qC;;AC3BA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qCAAqC;AACzC;AACA;;AAEA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,mCAAmC;AAC9C;AACO;AACP;AACA;;;AAGA;AACA,WAAW,mCAAmC;AAC9C;AACO;AACP;AACA;;AAEe,sDAAK,EAAC;;AAErB,iC;;ACtEA;AACA;AACA;AAC0C;AACD;AACJ;AACN;;;AAG/B;AACA,aAAa,mBAAmB;AAChC;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,aAAM;AACV;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,iDAAiD;AACjD,6CAA6C;AAC7C,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA,8CAA8C,YAAK;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,IAAI;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,WAAW;AACf;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,+CAA+C;AAC7D;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,IAAI;AAC/B;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,aAAU;;;AAGG,+DAAM,EAAC;;AAEtB,kC;;AC5KA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;AACe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,qC;;ACxCA;AACA;AACA;AACwE;AAC3B;AACC;;AAE9C;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA,IAAI,8CAA8C;AAClD;AACA;AACA;AACA;AACA,IAAI,qBAAU;AACd;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,qBAAqB;AAClC,aAAa,eAAe;AAC5B,cAAc,uEAAuE;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,SAAS;AAC9B,kBAAkB,MAAM;AACxB;AACA;AACA,KAAK;AACL,aAAa,MAAM,kBAAkB,OAAO;AAC5C;AACA;;AAEA;AACA;AACA,aAAa,qBAAqB;AAClC,aAAa,eAAe;AAC5B,cAAc,uEAAuE;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,SAAS;AAC9B,kBAAkB,UAAU;AAC5B;AACA;AACA,KAAK;AACL,aAAa,UAAU,kBAAkB,OAAO;AAChD;AACA;;AAEA;AACA;AACA,aAAa,qBAAqB;AAClC,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C,QAAQ,QAAQ;AAChB;AACA;AACA,KAAK;AACL,MAAM,QAAQ,kBAAkB,OAAO;AACvC;AACA;;AAEA;AACA,CAAC,CAAC,aAAW;;;AAGb;AACA;AACA,WAAW,uEAAuE;AAClF;AACA;AACA;AACO;AACP;AACA,oCAAoC,QAAQ;AAC5C,MAAM,aAAa;AACnB;AACA,GAAG;AACH,IAAI,aAAa,YAAY,gCAAgC;AAC7D;AACA;;;AAGe,uEAAU,EAAC;;AAE1B,sC;;AC1IA;AACA;AACA;AACiC;AACkB;AACV;AACH;AACN;;;AAGhC;AACA;AACA,sBAAsB,kCAAkC;AACxD;AACO;AACP;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,YAAK;;;AAGP;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA,iBAAiB,2BAA2B;AAC5C;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD,IAAI,wBAAwB;AAC5B;AACA;AACA;AACA;AACA;AACA,yCAAyC,0BAA0B;AACnE,kEAAkE,IAAI,EAAE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gDAAgD;AACpE;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iBAAU;AACd;AACA;;AAEA,aAAa,4BAA4B;AACzC;AACA;AACA;AACA,IAAI,MAAM;;AAEV;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,EAAE;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA,WAAW,UAAM,GAAG;AACpB;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA,gBAAgB,eAAe;AAC/B;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,EAAE;AACf,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,aAAU;;;AAGZ;AACA,UAAU;AACV;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;;;AAGe,+DAAU,EAAC;;AAE1B,kC;;AClOA;AACA;AACA;AACiD;AACU;AACtB;AACC;;;AAGtC;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,sBAAsB,sCAAsC;AAC5D;AACA;AACO;AACP;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,YAAK;;;AAGP;AACA,aAAa,OAAO;AACpB,cAAc,QAAQ;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qBAAU;AACd;;AAEA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,8CAA8C,QAAQ;AACtD;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,cAAc,cAAc;AAC5B;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iCAAiC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,EAAE;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,mBAAmB;AAC7C;;AAEA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,EAAE;AACf,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,EAAE;AACf,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,mBAAmB;AAC9D;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,mBAAmB;AAC/C;AACA,4BAA4B,mBAAmB;AAC/C,KAAK;AACL,qBAAqB,WAAW;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,EAAE;AACf,aAAa,QAAQ;AACrB;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA,kBAAkB,iBAAc;AAChC;AACA;AACA;;AAEA;AACA,CAAC,CAAC,SAAU;;;AAGG,uEAAU,EAAC;;AAE1B,sC;;AClSA;AACA;AACA;AACsC;;AAEtC;AACA;AACA;AACA,QAAQ,0CAA0C;AAClD;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,YAAK;;AAEQ,wDAAQ,EAAC;;AAExB,oC;;ACxCA;AACA;AACA;AACqC;;AAErC;AACA;AACA;AACA,QAAQ,0CAA0C;AAClD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,WAAQ;;;AAGK,sEAAe,EAAC;;AAE/B,2C;;AChFA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACO;;AAEP;AACA;AACA,UAAU;AACV;AACO;;AAEP;AACA;AACA,UAAU;AACV;AACO;;AAEP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACO;;;AAGP;AACA,2DAA2D,QAAQ;AACnE,UAAU;AACV;AACO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,CAAC;;;AAGD;AACA;AACA;AACA,UAAU;AACV;AACA;AACO;;;AAGP;AACA;AACA;AACA,UAAU;AACV;AACA;AACO;;;AAGP;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGiC;;AAExC,+B;;AC7FA;AACA;AACA;AAC8C;;AAE9C;AACA;AACA,UAAU;AACV;AACe;;AAEf;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS,SAAS;;AAElB;AACA;AACA;AACA;AACA;AACA,YAAY,SAAS;;AAErB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,+C;;ACzDA;AACA;AACA;AACmD;;AAEnD;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,kBAAe;;AAEF,oFAAsB,EAAC;;AAEtC,kD;;AC3BA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,qC;;ACnBA;AACA;AACA;;AAEA,IAAI,uBAAW;;AAEf;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B;AACA,uBAAW;AACX;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,gBAAgB;AAC5B;AACA,uBAAW;AACX;AACA;;AAEe,+EAAW,EAAC;;AAE3B,uC;;ACtCA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D,oBAAoB;AACpB;AACA;AACA;;AAE2C;;;AAG3C;AACA,UAAU;AACV;AACO;;;AAGP;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,WAAW;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA,iDAAiD,uBAAuB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,mBAAW;;;AAGb;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,2CAA2C;AACtD,YAAY,OAAO;AACnB;AACO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGe,mEAAW,EAAC;;AAE3B,uC;;AC1PA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D,oBAAoB;AACpB;AACA;AACA;;AAE2C;;;AAG3C;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAe;AAC5B,cAAc,OAAO;AACrB;AACA;AACA,eAAe,sBAAsB;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,mBAAW;;AAEE,6DAAQ,EAAC;;AAExB,oC;;ACpMA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D,oBAAoB;AACpB;AACA;AACA;;AAE2C;;AAE3C;AACA;AACA;AACA,UAAU;AACV,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,mBAAW;;AAEE,qEAAY,EAAC;;AAE5B,wC;;AC5IA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D,oBAAoB;AACpB;AACA;AACA;;AAEwC;;;AAGxC;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,YAAM;;;AAGR;AACA,WAAW,kBAAkB;AAC7B,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,0BAA0B;AAC1B,0BAA0B;AAC1B,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,kBAAkB;AAC7B,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,sCAAsC,WAAW;AACjD;AACA,GAAG;AACH;AACA;AACA,CAAC;;AAEc,qEAAY,EAAC;;AAE5B,wC;;AC/QA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,WAAW,UAAU;AACrB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB;AACpB;;AAEA,KAAK,OAAO;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,EAAE;AACb,WAAW,EAAE;AACb,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,EAAE;AACb,YAAY,QAAQ;AACpB;AACO;AACP;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA,KAAK;AACL,iBAAiB,OAAO;AACxB;AACA;AACA,SAAS;AACT;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,aAAa;AACxB,WAAW,oBAAoB;AAC/B;AACA;AACO;AACP;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;;;AAGA;AACA,WAAW,aAAa;AACxB,WAAW,MAAM;AACjB;AACA,YAAY,QAAQ;AACpB;AACO,SAAS,YAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,aAAa;AACxB,WAAW,qCAAqC;AAChD;AACA,YAAY,WAAW;AACvB;AACO;AACP;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,wBAAwB;AACnC,WAAW,wBAAwB;AACnC,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA;AACA,iBAAiB,UAAU;AAC3B;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,wBAAwB;AACnC;AACA;AACO;AACP;AACA;AACA;AACA,aAAa,YAAY;AACzB,cAAc;AACd;AACA;AACA;AACA,GAAG;AACH,aAAa,gBAAgB;AAC7B;AACA;AACA;;;AAGA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;AAGA;AACA,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA,iC;;AC1PA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D,oBAAoB;AACpB;AACA;AACA;;AAEmC;AACQ;AACC;;;AAG5C;AACA,UAAU;AACV;AACA;;AAEA;AACA,UAAU;AACV;AACA,IAAI,wBAAY;;AAEhB;AACA;AACA;AACA;AACA,UAAU;AACV,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV,WAAW,WAAW;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV,WAAW,WAAW;AACtB;AACA;AACA;AACA;;;AAGA,IAAI,uBAAW;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,MAAM;AACnB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA,uCAAuC,UAAU;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB,aAAa,MAAM;AACnB,cAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wBAAY;;AAEhC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB,aAAa,mCAAmC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,OAAO;AACpB,cAAc,QAAQ;AACtB;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,WAAW;AAChC;AACA;AACA;AACA;AACA;AACA,mBAAmB,UAAU;AAC7B;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,mBAAmB,OAAO;AAC1B,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,aAAa;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ,YAAM;AACd,OAAO;AACP;AACA;;AAEA;AACA,CAAC,CAAC,mBAAW;;AAEE,+EAAW,EAAC;;AAE3B,uC;;AC1aA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D,oBAAoB;AACpB;AACA;AACA;;AAE8C;AACA;AACM;AACN;AACkC;AAC3C;AACQ;AACA;AACF;;;AAG3C;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,IAAI,uCAAmB;AACvB;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ,OAAO;AACf,wCAAwC,oBAAY;AACpD,KAAK,UAAU,SAAS;AACxB,oCAAoC,gBAAQ;AAC5C,KAAK;AACL,4BAA4B,mBAAW;AACvC;;AAEA,UAAU,KAAK;AACf,yCAAyC,mBAAW;AACpD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,mCAAmC;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA,MAAM,MAAM;AACZ,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA,MAAM,QAAQ;AACd,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,MAAM;AACnB,aAAa,YAAY;AACzB;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;;AAEA;AACA;;AAEA;;;AAGA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA,mBAAmB,iBAAgB;AACnC;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA,mBAAmB,iBAAgB;AACnC;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA,mBAAmB,iBAAgB;AACnC;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA,mBAAmB,iBAAgB;AACnC;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA,mBAAmB,iBAAgB;AACnC;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA,mBAAmB,iBAAgB;AACnC;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA,mBAAmB,iBAAgB;AACnC;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA,mBAAmB,iBAAgB;AACnC;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB,cAAc,aAAa;AAC3B;AACA;AACA,eAAe,oBAAY;AAC3B;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,MAAM;AACnB,cAAc,aAAa;AAC3B;AACA;AACA;AACA,iBAAiB,YAAiB;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,aAAW;;AAEE,uGAAmB,EAAC;;AAEnC,+C;;ACraA;AACA;AACA;AAC4C;AACe;AACM;AACf;AACL;AACS;AACa;;AAEnE,IAAI,6CAAsB;AAC1B;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;AACA,sBAAsB,kBAAkB,GAAG,kBAAkB;;AAE7D;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA,oCAAoC,2BAAmB;;AAEvD;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA,mCAAmC,MAAM;AACzC,MAAM,iBAAgB;AACtB;;AAEA;AACA,cAAc;AACd;AACA;AACA,+BAA+B,MAAM;AACrC,MAAM,iBAAgB;AACtB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,4CAA4C;AACzD;AACA;AACA;AACA;AACA,uBAAuB,yBAAsB;AAC7C,MAAM,mBAAmB;AACzB;AACA;AACA;AACA;AACA;AACA,qBAAqB,yBAAsB;AAC3C,QAAQ,mBAAmB;AAC3B;AACA,KAAK;AACL;AACA;AACA;AACA,2BAA2B,yBAAsB;AACjD,UAAU,mBAAmB;AAC7B;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,aAAa,4CAA4C;AACzD;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,mBAAmB;AACzC,sBAAsB,mBAAmB;AACzC;AACA,KAAK,wBAAwB,mBAAmB;AAChD;AACA;AACA;AACA;;AAEA;AACA,aAAa,4CAA4C;AACzD;AACA;AACA;AACA;AACA;AACA,uBAAuB,yBAAsB;AAC7C,MAAM,mBAAmB;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,aAAa;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,4CAA4C;AACzD;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,4CAA4C;AACzD;AACA;AACA;AACA;AACA;AACA,uBAAuB,yBAAsB;AAC7C,MAAM,mBAAmB;AACzB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,2BAAmB;;AAEjC;AACA,QAAQ,MAAM;AACd,UAAU,mBAAmB;AAC7B;AACA,QAAQ,MAAM;AACd,UAAU,mBAAmB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,MAAM;AACd,UAAU,mBAAmB;AAC7B;AACA;AACA;AACA;;AAEA;AACA,aAAa,4CAA4C;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,yBAAsB;AAC/C,QAAQ,mBAAmB;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,4CAA4C;AACzD;AACA;AACA;AACA;AACA;AACA,2BAA2B,yBAAsB;AACjD;AACA;;AAEA;AACA,aAAa,4CAA4C;AACzD;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa;AACnB;AACA;AACA;AACA,MAAM,aAAa;AACnB;AACA;;AAEA,mCAAmC,aAAa;AAChD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,aAAW;;;AAGE,2GAAsB,EAAC;;AAEtC,kD;;ACvUA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;;AAEf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC,EAAC;;AAEF,wC;;AChCA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,uC;;ACdA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,qC;;AChCA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,qC;;ACpBA;AACA;AACA;AACiD;;AAEjD;AACA,WAAW,EAAE;AACb,WAAW,OAAO;AAClB;AACO;AACP;AACA,cAAc,iBAAc;AAC5B;AACA;;AAEA,mC;;ACfA;AACA;AACA;AACqC;AACL;;;AAGhC;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,2BAAa;;AAEjB;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,2BAAa;AACb;AACA;AACA,EAAE,SAAK;AACP;;;AAGA;AACA;AACA,YAAY,EAAE;AACd;AACA,2BAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,EAAE;AACb,YAAY,QAAQ;AACpB;AACA,2BAAa;AACb,EAAE,MAAM;AACR,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,YAAY,OAAO;AACnB;AACA,2BAAa;AACb;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA,2BAAa;AACb;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA,2BAAa;AACb;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA,2BAAa;AACb;AACA;;;AAGA;AACA;AACA;AACA;AACA,2BAAa;AACb;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;;;AAGA;AACA,YAAY,QAAQ;AACpB;AACA,2BAAa;AACb;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACA,2BAAa;AACb;AACA;;;AAGA;AACA,WAAW,EAAE;AACb,YAAY,QAAQ;AACpB;AACA,2BAAa;AACb;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB;AACA;AACA,2BAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA,2BAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,2BAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGe,qFAAa,EAAC;;AAE7B,yC;;ACnRA;AACA;AACA;AACuC;AACM;AACC;AACS;;;AAGvD;AACA,aAAa,oGAAoG;AACjH;;;AAGA,IAAI,mBAAS;AACb;;AAEA;AACA;AACA,iBAAiB,MAAM;AACvB,kBAAkB,OAAO;AACzB;AACA;AACA;AACA,OAAO;AACP;AACA,iBAAiB,MAAM;AACvB,kBAAkB,OAAO;AACzB;AACA;AACA,2BAA2B,4BAA4B;AACvD,OAAO;;AAEP;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,MAAM,OAAO,SAAS;AAC5B;AACA;AACA;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA,aAAa,oCAAoC;AACjD;AACA;AACA;AACA,0BAA0B,4BAA4B;AACtD;AACA,kBAAkB,SAAS,qBAAqB,SAAS;AACzD,kBAAkB,SAAS,oBAAoB,SAAS;AACxD,MAAM,QAAQ,OAAO,SAAS;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,4BAA4B;AACpD;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA,OAAO,oBAAoB,SAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,qBAAa;;;AAGA,oEAAS,EAAC;;AAEzB,qC;;AClIA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACO;;AAEP;AACA;AACA,UAAU;AACV;AACO;;AAEP,kC;;AChBA;AACA;AACA;AACoC;;AAEpC;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,yBAAyB,KAAK;AAC9B;AACA;AACA;AACA;AACA,CAAC;;;AAGD;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP,EAAE,MAAM,YAAY;AACpB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS,oBAAe;AACxB;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO,SAAS,oBAAe;AAC/B;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;AACA,YAAY,cAAc;AAC1B;AACO;AACP;;AAEA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;AAClB;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,OAAO;AAC9B;AACA,qBAAqB,WAAW;AAChC;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,QAAQ;AAC7B;AACA,uBAAuB,QAAQ;AAC/B;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;;;AAGA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;;AAEA,gC;;ACvMA;AACA;AACA;AACgC;;;AAGhC;AACA,aAAa,6GAA6G;AAC1H;;;AAGA;AACA,WAAW,6BAA6B;AACxC,YAAY,KAAK;AACjB;AACO;AACP;AACA;AACA,eAAe,sCAAsC;AACrD,gBAAgB,+CAA+C;AAC/D;AACA;AACA;AACA;AACA,UAAU,KAAK;AACf,UAAU,KAAK;AACf;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,sCAAsC;AACjD,YAAY,+CAA+C;AAC3D;AACO;AACP;AACA;;AAEA,4C;;AC3CA;AACA;AACA;AAC6C;AACb;;;AAGhC;AACA,aAAa,iEAAiE;AAC9E;;;AAGA;AACA,WAAW,cAAc;AACzB,YAAY,KAAK;AACjB;AACO;AACP;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC,YAAY,KAAK;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,YAAY,KAAK;AACjB;AACO;AACP;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;;AAEA,gD;;ACzEA;AACA;AACA;AACoC;;;AAGpC;AACA,aAAa,yDAAyD;AACtE;;;AAGA;AACA,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB,YAAY,iBAAiB;AAC7B;AACO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB,YAAY,iBAAiB;AAC7B;AACO,SAAS,uBAAI;AACpB;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,YAAY,KAAK;AACjB;AACO;AACP;AACA;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,OAAO;AACtB,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;;;AAGA;AACA,WAAW,QAAQ;AACnB,YAAY,KAAK;AACjB;AACO;AACP,mCAAmC,SAAS;AAC5C;AACA;AACA,eAAe,iBAAiB;AAChC,eAAe,OAAO;AACtB,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;;AAEA,8C;;ACvFA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA,CAAC,EAAC;;AAEF,oC;;ACZA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA,CAAC,EAAC;;AAEF,wC;;ACbA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,cAAc;AACzB,aAAa,OAAO;AACpB;AACO;AACP;AACA;;AAEA,iBAAiB,oCAAoC;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kC;;AC3CA;AACA;AACA;AACiC;AACK;;;AAGtC;AACA;AACA,aAAa,cAAc;AAC3B;AACA;;;AAGA;AACA,4BAA4B,sCAAsC;AAClE,0BAA0B,OAAO;AACjC;AACA,aAAa,yCAAyC;AACtD;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB,YAAY,WAAW;AACvB;AACA;AACA;AACO;AACP;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,mCAAmC;AAC9C,YAAY,WAAW;AACvB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,kBAAkB;AAC7B;AACA,YAAY,WAAW;AACvB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;;AAGA;AACA,cAAc,4CAA4C;AAC1D;AACA,MAAM,WAAW;AACjB;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,iBAAiB;AAC7B;AACA;AACO;AACP;AACA;AACA,eAAe,WAAW;AAC1B,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACO;AACP,0BAA0B,MAAM;AAChC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,2BAA2B,SAAS;AACpC,IAAI,SAAS;AACb;AACA;;;AAGA;AACA,yBAAyB,sCAAsC;AAC/D,kDAAkD,EAAE,QAAQ,EAAE;AAC9D;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,uCAAuC,EAAE,EAAE,EAAE;AAC7C;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,uCAAuC,EAAE,EAAE,EAAE;AAC7C;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO,mCAAmC,EAAE,QAAQ,EAAE;AACjE;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;AACA,iBAAiB,EAAE;AACnB,iBAAiB,EAAE;AACnB,GAAG;AACH;AACA;AACA;;;AAGA;AACA,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB,YAAY,QAAQ;AACpB;AACO,SAAS,iBAAM;AACtB;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,YAAY,WAAW;AACvB;AACA;AACO,SAAS,iBAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,YAAY,WAAW;AACvB;AACO,SAAS,gBAAK;AACrB;AACA;AACA;AACA;;;AAGA;AACA,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB,YAAY,OAAO;AACnB;AACO,SAAS,0BAAe;AAC/B;AACA;AACA;AACA;;;AAGA;AACA,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB,YAAY,OAAO;AACnB;AACO,SAAS,mBAAQ;AACxB,mBAAmB,0BAAe;AAClC;;;AAGA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,kBAAkB;AAC7B;AACA,YAAY,OAAO;AACnB;AACO;AACP,SAAS,0BAAe;AACxB;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACO;AACP,8BAA8B,EAAE,GAAG,EAAE;AACrC;;AAEA,sC;;ACrZA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,6BAA6B,gCAAgC;AAC7D;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA,kC;;ACjEA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,kC;;ACfA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,wC;;ACjBA;AACA;AACA;AACoC;AACI;AACY;;;AAGpD;AACA;AACA,aAAa,cAAc;AAC3B;AACA;;AAEA;AACA;AACA;AACA,WAAW,4CAA4C;AACvD,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACO,SAAS,YAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,qCAAqC;AAChD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,SAAS,iBAAU;AACnB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACA;AACA;AACO;AACP;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACA;AACO,SAAS,iBAAU;AAC1B;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,qCAAqC;AAChD,YAAY,aAAa;AACzB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA,kCAAkC,YAAY;AAC9C,GAAG;AACH,kCAAkC,YAAY;AAC9C;AACA;AACA,kCAAkC,YAAY;AAC9C,GAAG;AACH,kCAAkC,YAAY;AAC9C;AACA,uBAAuB,YAAY;AACnC,mBAAmB,YAAY;AAC/B;AACA;AACA;;;AAGA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;;;AAGA;AACA,WAAW,qCAAqC;AAChD,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;;;AAGA;AACA,WAAW,4CAA4C;AACvD,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;;AAEA;AACA,WAAW,mDAAmD;AAC9D,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACA;AACO,SAAS,aAAM;AACtB;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO,SAAS,aAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,qCAAqC;AAChD;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,4CAA4C;AACvD,YAAY,OAAO;AACnB;AACO;AACP,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP,QAAQ,cAAc;AACtB;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,mDAAmD;AAC9D,YAAY,OAAO;AACnB;AACO;AACP,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACO;AACP;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,0DAA0D;AACrE,WAAW,GAAG;AACd,YAAY,UAAU;AACtB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO,SAAS,cAAO;AACvB;AACA,OAAO,cAAO;AACd;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,qCAAqC;AACjD;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,qCAAqC;AACjD;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,qCAAqC;AACjD;AACA;AACO,SAAS,gBAAS;AACzB;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,qCAAqC;AACjD;AACO;AACP;AACA,iBAAiB,MAAM;AACvB;AACA,GAAG,qBAAqB,MAAM;AAC9B;AACA,GAAG,qBAAqB,MAAM;AAC9B;AACA,GAAG,qBAAqB,MAAM;AAC9B;AACA,GAAG;AACH,IAAI,MAAM,YAAY;AACtB;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,yBAAyB;AACpC,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA,SAAS,cAAO;AAChB;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA,MAAM,iBAAU;AAChB;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,yBAAyB;AACrC;AACA;AACO,SAAS,cAAO;AACvB;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,qCAAqC;AACjD;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,qCAAqC;AACjD;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACA;AACO,SAAS,iBAAU;AAC1B;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACA;AACO,SAAS,cAAO;AACvB;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,qCAAqC;AAChD,WAAW,qCAAqC;AAChD,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA,mBAAmB,YAAY;AAC/B,iBAAiB,YAAY;AAC7B;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,YAAY;AAChC,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA,mCAAmC,YAAY;AAC/C,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA,mCAAmC,YAAY;AAC/C,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA,mCAAmC,YAAY;AAC/C,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,sCAAsC;AACjD;AACA,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB;AACA;AACO,SAAS,qBAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kC;;AC7xBA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,wC;;ACtBA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,0C;;ACjBA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,uCAAuC;AAClD,WAAW,eAAe;AAC1B,YAAY,cAAc;AAC1B;AACO;AACP;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,eAAe;AAC1B,YAAY,cAAc;AAC1B;AACO,SAAS,gBAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,eAAe;AAC1B,YAAY,cAAc;AAC1B;AACO,SAAS,eAAK;AACrB;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,eAAe;AAC1B,YAAY,cAAc;AAC1B;AACO,SAAS,mBAAS;AACzB;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qC;;AC1HA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAC+C;AACG;;;AAGlD;AACA,wCAAwC,gBAAgB,KAAK;AAC7D;AACA,aAAa,OAAO;AACpB,cAAc,mCAAmC;AACjD;AACA;AACA,cAAc,OAAO;AACrB;AACA;;;AAGA;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA,0CAA0C,YAAY;AACtD;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,qBAAqB;AAChC;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB;AACA;AACA,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,+BAA+B,2CAA2C;AAC1E;AACA;AACA;AACA,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,+BAA+B,2CAA2C;AAC1E,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;AACA,SAAS,YAAY;AACrB,+BAA+B,2CAA2C;AAC1E,0CAA0C,QAAQ;AAClD;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY;AACrB,kCAAkC,+CAA+C;AACjF,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4CAA4C;AACvD;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA,YAAY,SAAS;AACrB,sBAAsB,SAAS;AAC/B,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,qBAAqB;AAChC;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACO,SAAS,cAAO;AACvB;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB;AACA;AACA,SAAS,YAAY;AACrB,+BAA+B,oCAAoC;AACnE;AACA,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;AACA,SAAS,YAAY;AACrB,+BAA+B,2CAA2C;AAC1E,0CAA0C,QAAQ;AAClD;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;AACA;AACA,SAAS,YAAY;AACrB,kCAAkC,+CAA+C;AACjF,yCAAyC,QAAQ;AACjD,gBAAgB,cAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA,YAAY,qCAAqC;AACjD;AACO,SAAS,aAAM;AACtB;AACA,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,SAAS,OAAO,SAAS;AACnC;;AAEA,kC;;AChQA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,UAAU;AACV;AACA;AACO;AACP;AACA;AACA;AACA;AACA;;AAEe,oDAAK,EAAC;;AAErB,iC;;AClCA;AACA;AACA;AAC2C;;;AAG3C;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,oCAAoC;AAClD;AACA,cAAc,8BAA8B;AAC5C,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,8EAA8E;AAC9E;AACA,cAAc,8BAA8B;AAC5C,cAAc,+DAA+D;AAC7E;AACA,KAAK,OAAO,2BAA2B,sCAAsC;AAC7E,SAAS,OAAO;AAChB,gBAAgB,wCAAwC;AACxD;;;AAGA;AACA;AACA;AACA,mDAAmD,qBAAqB;AACxE;AACA,oBAAoB,oCAAoC;AACxD;AACA;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oCAAoC;AACxD;AACA;AACA;AACA,IAAI,qBAAU;AACd;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,2BAA2B,6BAA6B;;AAExD;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,YAAY,QAAQ;AACpB;AACA,qBAAU;AACV;AACA;;AAEA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA,qBAAU;AACV;AACA;;AAEA;AACA;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA,qBAAU;AACV;AACA;;AAEA;AACA;AACA,YAAY,6BAA6B;AACzC;AACA;AACA,qBAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA,qBAAU;AACV,gCAAgC,eAAe;AAC/C;;AAEA;AACA;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA,qBAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA,qBAAU;AACV;AACA;;AAEA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA,qBAAU;AACV;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA,qBAAU;AACV;AACA;AACA;;AAEA;AACA,YAAY,0CAA0C;AACtD;AACA,qBAAU;AACV;AACA;;AAEA;AACA,WAAW,0CAA0C;AACrD;AACA,qBAAU;AACV;AACA;;AAEA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA,qBAAU;AACV;AACA;AACA;;AAEA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA;AACA,qBAAU;AACV;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA,WAAW,+DAA+D;AAC1E;AACA;AACA,qBAAU;AACV;AACA;;AAEA;AACA;AACA,YAAY,yEAAyE;AACrF;AACA;AACA,qBAAU;AACV;AACA;;AAEe,yEAAU,EAAC;;AAE1B,sC;;AC7QA;AACA;AACA;AACgC;AACS;AACV;;;AAG/B;AACA;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;AACP;AACA;AACA;;;AAGA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA;AACA,IAAI,2BAAkB;AACtB;AACA;AACA;AACA,aAAa,UAAK;AAClB;AACA;AACA;AACA;AACA,4BAA4B,IAAI;AAChC;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,eAAU;;;AAGZ;AACA;AACA;AACA;AACA,UAAU;AACV;AACO;AACP,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB;;;AAGA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,YAAY,cAAc;AAC1B;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,YAAY,cAAc;AAC1B;AACO,SAAS,mBAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA,oC;;ACrJA;AACA;AACA;AACyC;AACV;;;AAG/B;AACA;AACA;AACA;AACA,UAAU;AACV;AACO,IAAI,eAAM;;;AAGjB;AACA;AACA;AACA;AACA,UAAU;AACV;AACO,IAAI,eAAM;;;AAGjB;AACA;AACA,UAAU;AACV;AACO,IAAI,wBAAe,aAAa,eAAM;;;AAG7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,2BAAkB;AACtB;AACA;AACA;AACA,aAAa,UAAK;AAClB,cAAc,eAAM;AACpB;AACA;AACA,qBAAqB,wBAAe;AACpC,mBAAmB,eAAM;AACzB,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,eAAU;;;AAGZ;AACA;AACA;AACA;AACA,UAAU;AACV;AACO,IAAI,oBAAW;AACtB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB,MAAM,2BAAkB;AACxB;;AAEA,oC;;AC/EA;AACA;AACA;;;AAGA;AACA,UAAU;AACV;AACA,IAAI,iBAAK;;;AAGT;AACA;AACA;AACO,SAAS,iBAAK;AACrB,EAAE,iBAAK;AACP;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,kCAAkC;AAC9C;AACO,SAAS,eAAG;AACnB,SAAS,iBAAK;AACd;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,kCAAkC;AAC7C;AACO,SAAS,eAAG;AACnB,EAAE,iBAAK;AACP;;AAEA,uC;;ACtCA;AACA;AACA;AACkC;;;AAGlC;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA;AACA;AACO,SAAS,gBAAK;AACrB;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,kCAAkC;AAC7C,WAAW,kCAAkC;AAC7C,WAAW,uCAAuC;AAClD;AACO,SAAS,cAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,kCAAkC;AAC7C,WAAW,kCAAkC;AAC7C,YAAY,uCAAuC;AACnD;AACO,SAAS,iBAAM;AACtB;AACA;AACA;AACA;AACA,MAAM,WAAO;AACb;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,iDAAiD;AAC7D;AACO,SAAS,cAAG;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA,sC;;AC1EA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,6CAA6C;AACjD,MAAM,gCAAgC;AACtC,IAAI,mCAAmC;AACvC,mBAAmB,6CAA6C;AAChE;AACA;AACA;AACA,2BAA2B,gCAAgC;AAC3D,IAAI,mCAAmC;AACvC;AACA;AACwC;AACG;AACV;AACgE;AAC1B;AACzB;AACS;AACF;AAC+D;;;AAGpH;AACA,oBAAoB,gCAAgC;AACpD;AACA,aAAa,4BAA4B;AACzC;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,gEAAgE;AAC7E;AACA;;;AAGyB;;AAEL;;AAEpB;AACA,WAAW,cAAc;AACzB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,YAAY,cAAc;AAC1B;AACA;AACO;AACP;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,YAAY,cAAc;AAC1B;AACO;AACP;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACO;AACP,EAAE,eAAe;AACjB,EAAE,cAAgB;AAClB;;;AAGA;AACA,WAAW,kBAAkB;AAC7B;AACO;AACP;AACA;;;AAGA;AACA;AACA;AACA,WAAW,eAAe;AAC1B;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACO,SAAS,QAAG;AACnB;AACA,IAAI,eAAe,YAAY,OAAO;AACtC,gBAAgB,WAAW;AAC3B;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,2CAA2C;AAC/C,IAAI,iEAAiE;AACrE;AACA,WAAW,eAAe;AAC1B,WAAW,OAAO;AAClB,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB;AACA,YAAY,OAAO;AACnB;AACA;AACO;AACP,eAAe,QAAG;AAClB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,iBAAiB,UAAK,uCAAuC,UAAK;AAClE;AACA,KAAK;AACL;AACA;AACA;AACA,+DAA+D,QAAG;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,WAAW;AAC7B,mBAAmB,WAAW;AAC9B;AACA;AACA,QAAQ,eAAe;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACO;AACP;AACA;AACA;AACA;AACA,QAAQ,cAAgB;AACxB;AACA,KAAK;AACL,GAAG;AACH;;;AAGA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA,WAAW,kBAAkB;AAC7B;AACA,WAAW,kBAAkB;AAC7B;AACA,WAAW,kBAAkB;AAC7B;AACA;AACO;AACP;AACA;AACA,MAAM,cAAgB;AACtB,MAAM,cAAgB;AACtB,KAAK;AACL,GAAG;AACH;;;AAGA;AACA;AACA;AACO;AACP,EAAE,iBAAiB;AACnB,EAAE,gBAAmB;AACrB;;;AAGA;AACA,WAAW,4BAA4B;AACvC,WAAW,OAAO;AAClB,YAAY,WAAW;AACvB;AACO;AACP;AACA,WAAW,QAAG;AACd,GAAG;AACH,WAAW,QAAG;AACd,GAAG;AACH;AACA,iBAAiB,WAAW;AAC5B;AACA;AACA;;;AAGA;AACA,cAAc,uCAAuC;AACrD;AACA,WAAW,qFAAqF;AAChG;AACA,YAAY,kBAAkB;AAC9B;AACO;AACP;AACA;AACA,eAAe,cAAc;AAC7B,eAAe,eAAe;AAC9B,eAAe,QAAQ;AACvB,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA,KAAK;AACL;;;AAGA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA,WAAW,eAAe;AAC1B,WAAW,eAAe;AAC1B,WAAW,qFAAqF;AAChG;AACA,iCAAiC,sCAAsC;AACvE,wBAAwB,sCAAsC;AAC9D,WAAW,qFAAqF;AAChG;AACA,iCAAiC,sCAAsC;AACvE,wBAAwB,sCAAsC;AAC9D;AACA;AACO;AACP,mBAAmB,QAAG;AACtB,iBAAiB,QAAG;AACpB,EAAE,cAAgB;AAClB,EAAE,cAAgB;AAClB;;;AAGA;AACA;AACA,WAAW,qCAAqC;AAChD;AACA,WAAW,gBAAgB;AAC3B;AACA,YAAY,qCAAqC;AACjD;AACA;AACO;AACP,SAAS,cAAS;AAClB;AACA;;;AAGA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,gBAAgB;AAC3B;AACA,YAAY,qCAAqC;AACjD;AACA;AACA;AACO;AACP,eAAe,cAAS;AACxB;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB,YAAY,QAAQ;AACpB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB;AACA,YAAY,kBAAkB;AAC9B;AACO;AACP;AACA;AACA,sBAAsB,cAAgB;AACtC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,WAAW,eAAe;AAC1B,YAAY,kBAAkB;AAC9B;AACA;AACO,SAAS,iBAAY;AAC5B,yBAAyB,QAAG;AAC5B,8BAA8B,QAAG;AACjC;AACA;;;AAGA;AACA;AACA;AACA;AACA,QAAQ,qCAAqC;AAC7C,gCAAgC,uCAAuC;AACvE;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,eAAe;AAC1B,WAAW,eAAe;AAC1B,YAAY,qCAAqC;AACjD;AACA;AACO,SAAS,cAAS;AACzB,sBAAsB,iBAAY;AAClC;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,6BAA6B;AACxC,WAAW,eAAe;AAC1B,WAAW,eAAe;AAC1B,YAAY,6BAA6B;AACzC;AACA;AACO;AACP,sBAAsB,iBAAY;AAClC,SAAS,qBAAc;AACvB;;;AAGA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB,YAAY,qCAAqC;AACjD;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,2BAA2B,WAAoB;AAC/C,2BAA2B,oBAAoB;AAC/C;AACA;AACA,0BAA0B,oBAAoB,EAAE,WAAoB,EAAE,YAAY,EAAE,mBAAU;AAC9F;;AAEA;;AAEA,gC;;AC/fA;AACA;AACA;AACoC;;;AAGpC;AACA;AACA,IAAI,0BAA0B;AAC9B,aAAa,eAAe;AAC5B;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA;AACA,YAAY,WAAW;AACvB;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,WAAW;AACtB,YAAY,WAAW;AACvB;AACO,SAAS,eAAK;AACrB,SAAS,aAAG;AACZ;;;AAGA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB,YAAY,WAAW;AACvB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,WAAW;AACvB;AACO,SAAS,aAAG;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB,YAAY,WAAW;AACvB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,gEAAgE;AAC3E,YAAY,gEAAgE;AAC5E;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,YAAY,WAAW;AACvB;AACO,SAAS,mBAAM;AACtB;AACA;AACA,6BAA6B,aAAG;AAChC;;;AAGA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,WAAW;AACvB;AACO,SAAS,kBAAK;AACrB,6BAA6B,aAAG;AAChC;;;AAGA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,WAAW;AACvB;AACO,SAAS,sBAAS;AACzB,6BAA6B,aAAG;AAChC;;;AAGA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,WAAW;AACvB;AACO,SAAS,iBAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,WAAW;AACtB,YAAY,WAAW;AACvB;AACO;AACP;AACA,EAAE,MAAM,gBAAgB;;AAExB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA,WAAW,WAAW;AACtB,YAAY,OAAO;AACnB;AACO;AACP;AACA;;AAEA,qC;;AC/OA;AACA;AACA;AACoC;AACE;AAC8B;AACpB;AACc;AACzB;AACkD;;;AAGvF;AACA,UAAU;AACV;AACA,mBAAmB,MAAe;;;AAGlC;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iBAAQ;AACZ;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA,mBAAmB,WAAW;;AAE9B;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,UAAU;AACxB;AACA;AACA,WAAW,aAAQ;AACnB;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,sCAAsC;AACnD,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA,WAAW,aAAQ;AACnB;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,iDAAiD;AACvD,aAAa,sCAAsC;AACnD,aAAa,uCAAuC;AACpD,cAAc,sCAAsC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,sCAAsC;AACnD,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA,cAAc,8BAA8B;AAC5C;AACA;AACA,WAAW,aAAQ;AACnB;;AAEA;AACA;AACA,aAAa,+BAA+B;AAC5C,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,sCAAsC;AACnD;AACA;AACA;AACA,IAAI,aAAQ;AACZ;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,QAAQ;AACrB;AACA,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;AACA,IAAI,aAAQ;AACZ;;AAEA;AACA;AACA,cAAc;AACd;AACA,qBAAqB;AACrB;AACA,aAAa,OAAO;AACpB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,SAAS;AACvB;AACA;AACA,WAAW,aAAQ;AACnB;;AAEA;AACA;AACA;AACA,cAAc,oCAAoC;AAClD;AACA;AACA,WAAW,aAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uCAAuC;AACpD;AACA;AACA,IAAI,aAAQ;AACZ;;AAEA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C,cAAc,QAAQ;AACtB;AACA;AACA,WAAW,aAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA,IAAI,aAAQ;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oCAAoC;AACjD,iCAAiC,2CAA2C;AAC5E,aAAa,oCAAoC;AACjD,iCAAiC,2CAA2C;AAC5E,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA,eAAe,wCAAwC;AACvD,qBAAqB,QAAa;AAClC,+CAA+C,UAAK;AACpD;AACA;AACA;AACA,oBAAoB,SAAS,oBAAoB,SAAS;AAC1D,QAAQ,iBAAgB;AACxB;AACA;AACA;AACA,QAAQ,WAAW;AACnB;AACA,eAAe,iBAAY;AAC3B,OAAO;AACP,MAAM,iBAAY;AAClB;AACA;AACA;;AAEA;AACA,CAAC,CAAC,SAAU;;;AAGG,mEAAQ,EAAC;;AAExB,oC;;AChSA;AACA;AACA;AACoC;AACsC;AACrC;AACY;AACyB;AAC1C;;AAEhC;AACA;AACA,uBAAuB,mCAAmC;AAC1D;AACA;AACA;AACA;AACA;AACA,IAAI,6BAAc;AAClB;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA,kBAAkB,cAAc;;AAEhC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,iCAAiC;AAC5C;AACA;;AAEA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA,WAAW,aAAQ;AACnB;;AAEA;AACA;AACA,cAAc,sCAAsC;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,sCAAsC;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,2CAA2C;AAC5D,cAAc,eAAe;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM,SAAK;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,cAAc,eAAe;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA,aAAa,eAAe;AAC5B,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,gBAAgB;AAC7B;AACA;AACA,IAAI,aAAQ;AACZ;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,MAAM;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA,KAAK;AACL,qBAAqB,aAAa;AAClC;AACA,wBAAwB,cAAc;AACtC;AACA;AACA,SAAS;AACT,mCAAmC,MAAM;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,gBAAM;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAS;AACxB;AACA;AACA;AACA;AACA,MAAM,eAAK;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,mBAAS;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,aAAQ;;;AAGV;AACA,WAAW,OAAO;AAClB,YAAY,eAAe;AAC3B;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B,GAAG;AACH,aAAa,cAAc;AAC3B,GAAG;AACH,aAAa,cAAc;AAC3B;AACA;AACA,eAAe,eAAe;AAC9B;AACA;;;AAGA;AACA,WAAW,eAAe;AAC1B,YAAY,OAAO;AACnB;AACO;AACP;AACA,gBAAgB,cAAc;AAC9B;AACA,GAAG,oBAAoB,cAAc,kBAAkB,cAAc;AACrE;AACA,GAAG,oBAAoB,cAAc;AACrC;AACA;AACA,oBAAoB,OAAO;AAC3B;;;AAGA;AACA,WAAW,eAAe;AAC1B,WAAW,oCAAoC;AAC/C,WAAW,eAAe;AAC1B,YAAY,cAAc;AAC1B;AACO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA,WAAW,WAAW;AACtB;AACA;AACA;AACA;;AAEe,qFAAc,EAAC;;AAE9B,0C;;ACnUA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO,SAAS,eAAU;AAC1B;AACA;AACA;AACA,QAAQ,cAAc;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO,SAAS,gBAAW;AAC3B;AACA,mCAAmC,QAAQ;AAC3C;AACA,YAAY,eAAU;AACtB;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA,oCAAoC,QAAQ;AAC5C;AACA,YAAY,gBAAW;AACvB;AACA;AACA;AACA;;AAEA,gC;;AC9DA;AACA;AACA;AACiE;;;AAGjE;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL,qBAAqB,YAAY;AACjC,0BAA0B,IAAI;AAC9B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA,wBAAwB,cAAc;AACtC;AACA;AACA,uBAAuB,oBAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,eAAe;AAC1B,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,oBAAS;AAC/B;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,oBAAS;AAC/B;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,oBAAS;AAC/B;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,eAAe;AAC1B,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,eAAe;AAC1B,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mC;;AC3PA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,yCAAyC;AACpD,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,gDAAgD;AAC3D,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP,0CAA0C,QAAQ;AAClD;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,uDAAuD;AAClE,WAAW,OAAO;AAClB,WAAW,eAAe;AAC1B,YAAY,cAAc;AAC1B;AACO;AACP;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,8DAA8D;AACzE,WAAW,OAAO;AAClB,WAAW,sBAAsB;AACjC,YAAY,qBAAqB;AACjC;AACO;AACP;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mC;;ACjFA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iDAAiD;AAC5D,YAAY,gDAAgD;AAC5D;AACO;AACP;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,wDAAwD;AACnE,YAAY,uDAAuD;AACnE;AACO;AACP;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,+DAA+D;AAC1E;AACA,YAAY,8DAA8D;AAC1E;AACO;AACP;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mC;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,+BAA+B;AAC/D;AACA;AACA;AACA;;AAEsE;;;AAGtE;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,eAAe;AAC1B;AACA,YAAY,cAAc;AAC1B;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA,UAAU,cAAc;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,UAAU;AAC1C;AACA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB;AACA,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB;AACA,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA,UAAU,cAAc;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,cAAc;AACtC;AACA;AACA,QAAQ,oBAAe;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB;AACA,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB;AACA,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oC;;AC5YA;AACA;AACA;AACsD;AACL;AACJ;AACI;AACW;AACU;AACjB;AACA;AACH;;AAElD;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA,IAAI,qBAAU;AACd;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,qDAAqD,cAAc;AACnE,KAAK;AACL,qCAAqC,6CAA6C;AAClF;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6BAA6B,wBAAwB;AACrD;AACA;AACA;AACA,iCAAiC,eAAe;AAChD;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,WAAW,eAAc;AACzB;;AAEA;AACA;AACA,cAAc,6CAA6C;AAC3D;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA,qDAAqD,cAAc;AACnE;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,8CAA8C;AAC3D,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,kBAAkB;AACpD;AACA;AACA;;AAEA;AACA,CAAC,CAAC,mBAAc;;;AAGD,yEAAU,EAAC;;AAE1B,sC;;ACjJA;AACA;AACA;AACsE;AACzB;AACI;AACG;AACI;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,WAAK;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAS;AACnC;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,cAAc,sCAAsC;AACpD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,4BAA4B;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD;AACA;AACA;;AAEA;AACA,CAAC,CAAC,mBAAc;;;AAGD,0DAAK,EAAC;;AAErB,iC;;AC3GA;AACA;AACA;AAC8C;;;AAG9C;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,YAAY,QAAQ;AACpB;AACO;AACP,gBAAgB,aAAa;AAC7B;AACA,eAAe,yCAAyC;AACxD,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,KAAK;AACL;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,cAAc;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oC;;AChHA;AACA;AACA;AACyD;AACL;;;AAGpD;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,eAAe;AAC1B,YAAY,cAAc;AAC1B;AACA;AACO;AACP;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,yBAAyB;AAC9C;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA,UAAU,qBAAqB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,YAAY,cAAc;AAC1B;AACA;AACO;AACP;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yC;;AC9FA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,yGAAyG;AACpH;AACA,WAAW,GAAG;AACd;AACA,YAAY,UAAU;AACtB;AACA;AACO;AACP;AACA;AACA;AACA,QAAQ,yBAAyB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oC;;ACrCA;AACA;AACA;AACkH;AACrC;AACrB;;;AAGxD;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,YAAY,QAAQ;AACpB;AACO;AACP,0BAA0B,qBAAqB;AAC/C,IAAI,WAAW;AACf,OAAO,iBAAU;AACjB;AACA;AACA,MAAM,cAAc;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,OAAc;AACvB;AACA,eAAe,yCAAyC;AACxD,eAAe,yCAAyC;AACxD,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B,KAAK;AACL;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,YAAY,QAAQ;AACpB;AACO;AACP,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA;AACA,MAAM,oBAAoB;AAC1B;AACA;AACA,MAAM,oBAAoB;AAC1B;AACA;AACA,MAAM,oBAAoB;AAC1B;AACA;AACA,MAAM,oBAAoB;AAC1B;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C,QAAQ,wBAAwB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,iCAAiC;AAC5C,YAAY,QAAQ;AACpB;AACO;AACP,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,4C;;AC9IA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACO,SAAS,mBAAW;AAC3B;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mC;;ACvBA;AACA;AACA;AAC+D;;;AAG/D;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;AACA;AACA;AACA,QAAQ,cAAc;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACO;AACP;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA,YAAY,QAAQ;AACpB;AACO;AACP,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,YAAY,OAAO;AACnB;AACO;AACP;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,mBAAkB;AACxB;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,YAAY,OAAO;AACnB;AACO;AACP,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;;AAEA,kC;;AC5IA;AACA;AACA;AACmC;AAC8B;AAChB;AACJ;AACJ;AACV;AACkB;AACG;AACU;AACkB;AACvB;AACC;AACA;AACM;AACK;AACI;AACxB;AACf;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAO;AACX;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,qDAAqD,cAAc;AACnE;AACA,KAAK;AACL,qCAAqC,oDAAoD;AACzF;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,MAAM,MAAM;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6BAA6B,wBAAwB;AACrD;AACA;AACA;AACA,iCAAiC,oBAAoB;AACrD;AACA;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,WAAW,gBAAe;AAC1B;;AAEA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,cAAc,oDAAoD;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,iBAAiB;AACvB;AACA,KAAK;AACL;AACA;;AAEA,WAAW,uBAAuB;AAClC;AACA;;AAEA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;;AAEA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA,uBAAuB,gBAAS;AAChC,gCAAgC,uBAAuB;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA,eAAe,UAAK,8BAA8B,cAAc;AAChE;;AAEA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,WAAW;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAU;AACzB;AACA;;AAEA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA,2BAA2B,eAAU;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,aAAa;AACpD;AACA;AACA;AACA,kDAAkD,cAAc;AAChE;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;;AAEA;AACA;AACA,aAAa,qDAAqD;AAClE,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,mBAAc;;;AAGD,gEAAO,EAAC;;;AAGvB;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB;AACA,WAAW,QAAQ;AACnB;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACO;AACP;AACA,aAAa,cAAc;AAC3B;AACA,iBAAiB,OAAO;AACxB,IAAI,MAAM,kBAAkB,aAAY;AACxC;AACA;AACA,aAAa,eAAO,kBAAkB,cAAc;AACpD;;;AAGA;AACA;AACA,WAAW,8BAA8B;AACzC,YAAY,QAAQ;AACpB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,eAAO,kBAAkB,cAAc;AACpD;;;AAGA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,YAAY,QAAQ;AACpB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA,oBAAoB,eAAO;AAC3B;AACA;AACA;;;AAGA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACO;AACP;AACA;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA,8BAA8B,MAAM;AACpC;AACA;AACA;AACA;AACA;;AAEA,mC;;ACtaA;AACA;AACA;AACuD;AACtB;AACG;AACmC;AAClC;AACgD;AACkB;AAClE;AACQ;AACA;AACT;AACyE;AACxE;AACkD;AACrC;AACgB;AAC1B;AACR;AAC4B;AACxB;;;AAGpC;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,qCAAqC;AACnD,cAAc,qCAAqC;AACnD,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,qCAAqC;AACnD,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,wBAAwB;AACtC,cAAc,kBAAkB;AAChC;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,qCAAqC;AACnD,cAAc,yCAAyC;AACvD,cAAc,uCAAuC;AACrD;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,yBAAyB;AACvC;AACA;AACA,cAAc,eAAe;AAC7B;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA,cAAc,wBAAwB;AACtC,+BAA+B,gCAAgC;AAC/D;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,qCAAqC;AACnD;AACA;AACA,yCAAyC,iBAAiB;AAC1D,cAAc,eAAe;AAC7B;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,cAAc,6BAA6B;AAC3C;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,cAAc,mCAAmC;AACjD;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,SAAS,eAAe,KAAK,qBAAqB;AAClD,cAAc,cAAc;AAC5B;AACA;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA,uCAAuC,2BAA2B;AAClE,cAAc,OAAO;AACrB;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,qCAAqC;AACnD;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA,cAAc,qCAAqC;AACnD;AACA,cAAc,OAAO;AACrB,cAAc,wBAAwB;AACtC,sCAAsC,gCAAgC;AACtE;AACA;AACA;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,qCAAqC;AACnD,cAAc,uCAAuC;AACrD,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,SAAI;AACR;AACA;;AAEA,kBAAkB,UAAM,GAAG;;AAE3B;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA,uBAAuB,gBAAgB;;AAEvC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,YAAY;AACzB;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA,eAAe,YAAY;AAC3B;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,YAAY;AAC7B,KAAK;AACL,iBAAiB,YAAY;AAC7B;;AAEA,8BAA8B;AAC9B,mBAAmB,YAAY,eAAe,KAAK;AACnD,oDAAoD,YAAY;AAChE;AACA;AACA;AACA,eAAe,YAAY;AAC3B;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,cAAc,YAAY;AAC1B;AACA;AACA,kBAAkB,UAAM,GAAG;;AAE3B;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,WAAW,UAAM,GAAG;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,uBAAuB,yBAAyB;AAChD;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,eAAe;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC,+BAA+B,iBAAiB;;AAEhD,iCAAiC,UAAU;AAC3C;AACA;AACA;AACA;AACA,kCAAkC,QAAQ;AAC1C,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,MAAM;AAC1B;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,uBAAuB,QAAQ;AAC/B;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,uBAAuB,QAAQ;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,QAAQ,yBAAyB,QAAQ;AAC1D,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA,YAAY,MAAM;AAClB;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,QAAQ;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,qCAAqC;AAClD,cAAc,+CAA+C;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,iBAAgB;AACtB,MAAM,GAAa;AACnB;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,qCAAqC;AAClD,cAAc,+CAA+C;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,yBAAyB;AACvC;AACA;AACA;AACA,gDAAgD,MAAM;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+CAA+C;AAC5D,cAAc,+CAA+C;AAC7D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B,aAAa,QAAQ;AACrB,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,+CAA+C;AAC7D;AACA;AACA;AACA;AACA;AACA,iBAAiB,+CAA+C,cAAc,YAAY;AAC1F;AACA;;AAEA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;;AAEA;AACA,aAAa,eAAe;AAC5B,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,0BAA0B;AACvC;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA,4BAA4B,sCAAsC;AAClE,IAAI,MAAM,YAAY;AACtB,gCAAgC,QAAQ;AACxC,IAAI,MAAM,8BAA8B;AACxC,8BAA8B,QAAQ;AACtC,IAAI,MAAM,4BAA4B;;AAEtC,WAAW,iBAAiB;AAC5B;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA,gDAAgD,cAAc;AAC9D;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA,gDAAgD,cAAc;AAC9D;;AAEA;AACA;AACA,cAAc,uCAAuC;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB,cAAc,YAAY;AACjE;;AAEA;AACA;AACA;AACA,cAAc,wBAAwB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,6BAA6B;AAC1C,aAAa,0BAA0B;AACvC,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B,sBAAsB,SAAS;AAC/B;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,yBAAyB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA,sBAAsB,OAAO,cAAc,YAAY;AACvD;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,yBAAyB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,aAAa,OAAO;AACpB,cAAc,MAAM;AACpB;AACA;AACA,4BAA4B,qCAAqC;AACjE;AACA,gCAAgC,OAAO;AACvC;AACA;AACA;AACA,iBAAiB,MAAM;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;AACA,sBAAsB,OAAO;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,wEAAwE;AACrF;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,2CAA2C;AAC1D;AACA,IAAI,MAAM,sDAAsD,EAAE;AAClE,UAAU;AACV;AACA,MAAM,MAAM,EAAE,cAAO;AACrB,YAAY;AACZ,iBAAiB,UAAiB;AAClC,KAAK,yCAAyC,YAAY;AAC1D;AACA,iBAAiB,UAAiB;AAClC,0CAA0C,gBAAS;AACnD,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,IAAI;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,qCAAqC;AAClD,aAAa,yBAAyB;AACtC,aAAa,2BAA2B;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB;AACA;;AAEA;AACA;;AAEA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,sCAAsC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+CAA+C;AAC5D;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;;AAEA;AACA,aAAa,SAAS;AACtB,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,SAAU;;;AAGZ;AACA,WAAW,SAAS;AACpB,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA,GAAG;AACH;;;AAGA;AACA,WAAW,YAAY;AACvB,YAAY,qCAAqC;AACjD;AACO;AACP;AACA,WAAW,YAAY;AACvB,GAAG;AACH,WAAW,IAAU;AACrB;AACA;;;AAGA;AACA,WAAW,YAAY;AACvB,aAAa;AACb,mEAAmE;AACnE;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA,GAAG;AACH;AACA,qBAAqB,gBAAgB;AACrC;AACA;AACA;AACA,YAAY,eAAe,CAAC,UAAK;AACjC;AACA,eAAe,QAAQ,UAAU,SAAS;;AAE1C,sCAAsC,iBAAiB;AACvD;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,2BAA2B,iBAAiB;AAC5C;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA,WAAW,YAAY;AACvB,YAAY,uCAAuC;AACnD;AACO;AACP;AACA;AACA;AACA;AACA;AACA,aAAa,gBAAgB;AAC7B,KAAK;AACL,aAAa,uBAAY;AACzB,KAAK;AACL,aAAa,aAAa;AAC1B,KAAK;AACL,aAAa,uBAAY;AACzB;AACA,GAAG;AACH,WAAW,OAAO;AAClB;AACA;;;AAGA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB;AACO;AACP;AACA,SAAS,iBAAgB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEe,qDAAI,EAAC;;AAEpB,gC;;AC3zCA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,yBAAyB;AACrC;AACO;AACP,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;;;AAGA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY,OAAO;AACnB;AACO,SAAS,cAAU;AAC1B;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY,OAAO;AACnB;AACO,SAAS,eAAW;AAC3B;AACA;AACA;;AAEA;AACA;;AAEA;AACA,WAAW,KAAK;AAChB,WAAW,KAAK;AAChB;AACO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,KAAK;AAChB,aAAa,KAAK;AAClB;AACO;AACP;AACA;;AAEA;AACA,WAAW,KAAK;AAChB;AACO;AACP;AACA;AACA;AACA;;AAEA,+B;;AClFA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,oC;;ACjBA;AACA;AACA;AACoC;AACE;AACI;AACT;AACA;;;AAGjC;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,8BAA8B;AAC5C;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA;;;AAGA;AACA;AACA,uBAAuB;AACvB;AACA,mBAAmB,2BAA2B;AAC9C,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA,IAAI,cAAS;AACb;;AAEA;;AAEA;AACA,cAAc;AACd;AACA,qBAAqB,UAAM,GAAG;AAC9B,eAAe,cAAa;AAC5B;AACA,eAAe,cAAa;AAC5B;AACA,eAAe,cAAa;AAC5B,eAAe,cAAa;AAC5B;AACA,eAAe,cAAa;AAC5B;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;;AAEA;AACA,cAAc,2BAA2B;AACzC;AACA;AACA,eAAe,2BAA2B;AAC1C,0CAA0C,EAAE;AAC5C;AACA;AACA,KAAK;AACL,oBAAoB,KAAK;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,qCAAqC;AAClD;AACA,cAAc,oCAAoC;AAClD;AACA;AACA,WAAW,aAAQ;AACnB;;AAEA;AACA;AACA,aAAa,mCAAmC;AAChD;AACA,cAAc,kCAAkC;AAChD;AACA;AACA,WAAW,aAAQ;AACnB;;AAEA;AACA,iBAAiB,qCAAqC;AACtD;AACA,cAAc,wCAAwC;AACtD;AACA;AACA;AACA;AACA;AACA,iBAAiB,wCAAwC,cAAc,cAAa;AACpF;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA,sBAAsB,OAAO,cAAc,cAAa;AACxD;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA,sBAAsB,OAAO,cAAc,cAAa;AACxD;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA,sBAAsB,OAAO,cAAc,cAAa;AACxD;;AAEA;AACA;AACA,cAAc,qCAAqC;AACnD;AACA;AACA,WAAW,aAAQ;AACnB;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA,sBAAsB,QAAQ,cAAc,cAAa;AACzD;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA,sBAAsB,OAAO,cAAc,cAAa;AACxD;;AAEA;AACA;AACA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA,aAAa,cAAa;AAC1B;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,aAAa,cAAa;AAC1B;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,aAAa,cAAa;AAC1B;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,aAAa,cAAa;AAC1B;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,aAAa,cAAa;AAC1B;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,aAAa,cAAa;AAC1B;;AAEA;AACA,CAAC,CAAC,SAAU;;;AAGG,uDAAS,EAAC;;AAEzB,gC;;AC1QA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;AACe;AACf;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,iC;;ACfA;AACA;AACA;AACkC;AACQ;AACkB;AACZ;AACI;AACf;AACc;AACJ;AACF;AACX;AACM;AACK;;;AAG7C;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,8BAA8B;AAC5C;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA,cAAc,mGAAmG;AACjH;;;AAGA;AACA,UAAU;AACV;AACA;AACA,IAAI,cAAQ;AACZ;AACA;;;AAGA;AACA;AACA,MAAM,sCAAsC;AAC5C;AACA;AACA;AACA;AACA;AACA,IAAI,gBAAU;AACd;;AAEA;AACA,iCAAiC,QAAQ,KAAK,UAAM,GAAG;AACvD;;AAEA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA,IAAI,MAAM;AACV,MAAM,kBAAkB,CAAC,cAAQ;AACjC;;AAEA;AACA;AACA,qBAAqB,aAAU,kBAAkB,aAAa;AAC9D,OAAO;AACP,QAAQ,MAAM,mBAAmB,EAAE;AACnC,cAAc;AACd;AACA,KAAK;AACL,mBAAmB,aAAU,aAAa,aAAa;AACvD;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qCAAqC,aAAa;AAClD;;AAEA;AACA;AACA,MAAM,MAAM,SAAS,mBAAmB;AACxC,MAAM,MAAM,SAAS,mBAAmB;AACxC;;AAEA;AACA,qCAAqC,aAAa;AAClD;AACA,IAAI,SAAK;;AAET;AACA,4CAA4C,QAAQ;AACpD;AACA,yBAAyB,MAAM;AAC/B,QAAQ,MAAM,QAAQ,eAAe;AACrC,QAAQ,MAAM,QAAQ,SAAS;AAC/B;AACA;;AAEA;AACA;;AAEA;AACA,aAAa,2CAA2C;AACxD;AACA;AACA;AACA,2BAA2B,4BAA4B;AACvD,uBAAuB,MAAM;AAC7B,MAAM,MAAM,QAAQ,eAAe;AACnC,MAAM,MAAM,QAAQ,SAAS;AAC7B;AACA;AACA;;AAEA;AACA,aAAa,2CAA2C;AACxD;AACA;AACA;AACA,2BAA2B,4BAA4B;AACvD,cAAc,MAAM;AACpB,oCAAoC,aAAa;AACjD;AACA;AACA;;AAEA;AACA,kBAAkB,sCAAsC,KAAK;AAC7D;AACA,cAAc,iEAAiE;AAC/E,QAAQ,kCAAkC;AAC1C;AACA;AACA;AACA;AACA;AACA,iBAAiB,iEAAiE,cAAc,cAAQ;AACxG;AACA;;AAEA;AACA,cAAc,sCAAsC,KAAK;AACzD;AACA,aAAa,iEAAiE;AAC9E,QAAQ,kCAAkC;AAC1C;AACA;AACA;AACA;AACA,aAAa,cAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,eAAe;AAC7C,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,KAAW;AACtB;;AAEA;AACA,CAAC,CAAC,IAAS;;;AAGI,0DAAU,EAAC;;AAE1B,iC;;ACnPA;AACA;AACA;;;AAGA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;;;AAGA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB,YAAY,KAAK;AACjB;AACO,SAAS,WAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,WAAW,KAAK;AAChB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB,YAAY,KAAK;AACjB;AACO,SAAS,UAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,MAAM;AACjB,YAAY,KAAK;AACjB;AACA;AACO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA,KAAK;AACL,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;;AAEA,gC;;AC9EA;AACA;AACA;AACiC;AACQ;AACkB;AACR;AACc;AACN;AACtB;AACQ;AACF;AACS;AACO;AACR;AACZ;AACV;AACQ;AACD;AACA;AACwB;AACV;AACJ;AAC0D;AACpE;AACe;AACT;AACR;AACc;AACkC;;;AAGlF;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,0BAA0B;AACxC,cAAc,QAAQ;AACtB,cAAc,mCAAmC;AACjD,cAAc,kCAAkC;AAChD,cAAc,qCAAqC;AACnD,cAAc,OAAO;AACrB,cAAc,iDAAiD;AAC/D,cAAc,wCAAwC;AACtD,cAAc,mCAAmC;AACjD,cAAc,0BAA0B;AACxC,cAAc,yBAAyB;AACvC,cAAc,yBAAyB;AACvC,cAAc,UAAU;AACxB,cAAc,iEAAiE;AAC/E,cAAc,cAAc;AAC5B,cAAc,yCAAyC;AACvD;;;AAGA;AACA,aAAa,6CAA6C;AAC1D;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,gEAAgE;AAC9E;AACA,IAAI,4CAA4C;AAChD;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,mDAAmD;AACjE,cAAc,2DAA2D;AACzE,cAAc,qBAAqB;AACnC,cAAc,2CAA2C;AACzD,cAAc,kBAAkB;AAChC;;;AAGA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,iGAAiG;AAC/G;AACA,IAAI,iCAAiC;AACrC,cAAc,OAAO;AACrB;AACA,cAAc,iHAAiH;AAC/H;AACA,IAAI,qCAAqC;AACzC,cAAc,4BAA4B;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kGAAkG;AAChH;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA,cAAc,iFAAiF;AAC/F;AACA,cAAc,mBAAmB;AACjC;AACA,UAAU,kCAAkC;AAC5C;AACA,cAAc,KAAK;AACnB;AACA,IAAI,gCAAgC;AACpC;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,yBAAY;AAChB;;AAEA;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,2BAA2B,kBAAkB;;AAE7C;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,cAAc;AACd;AACA,uCAAuC,MAAe;;AAEtD;AACA;AACA,cAAc;AACd;AACA,uCAAuC,MAAe;;AAEtD;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,gDAAgD,KAAK;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,MAAM,SAAS;AACf,MAAM,SAAS;AACf,MAAM,SAAS;AACf,MAAM,SAAS;AACf,MAAM,SAAS;AACf,MAAM,mBAAmB;AACzB,MAAM,SAAS;AACf,MAAM,SAAS;AACf;AACA,8CAA8C,QAAQ;AACtD,MAAM,MAAM,oDAAoD,eAAe;AAC/E;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,uCAAuC,yBAAsB;AAC7D,oBAAoB,mBAAmB;AACvC,MAAM,MAAM,+BAA+B,mBAAmB;AAC9D;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA,IAAI,MAAM,iBAAiB,SAAS;AACpC,IAAI,MAAM,iBAAiB,SAAS;AACpC,IAAI,MAAM,iBAAiB,SAAS;;AAEpC;AACA,cAAc;AACd;AACA;AACA,oDAAoD,aAAU;;AAE9D;AACA,cAAc;AACd;AACA;AACA,4DAA4D,aAAU;;AAEtE;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,0BAA0B,YAAS;AACnC;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA,IAAI,MAAM;AACV,YAAY,kBAAkB,CAAC,WAAW;AAC1C;AACA,IAAI,MAAM,OAAO,kBAAkB,CAAC,WAAW;AAC/C;AACA,IAAI,MAAM,OAAO,kBAAkB,CAAC,WAAW;AAC/C;AACA,IAAI,MAAM,OAAO,kBAAkB,CAAC,WAAW;AAC/C;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,uCAAuC;AACxD,gBAAgB;AAChB;AACA;AACA;AACA,OAAO;;AAEP,IAAI,MAAM,gBAAgB,mBAAmB;AAC7C;AACA,iBAAiB,0CAA0C;AAC3D;AACA;AACA;AACA,OAAO;;AAEP,IAAI,MAAM,gBAAgB,mBAAmB;AAC7C;AACA,iBAAiB,0CAA0C;AAC3D;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,iBAAiB,+CAA+C;AAChE,gBAAgB;AAChB;AACA;AACA;AACA,OAAO;;AAEP,IAAI,MAAM,oBAAoB,mBAAmB;AACjD;AACA,iBAAiB,0CAA0C;AAC3D;AACA;AACA;AACA,OAAO;;AAEP,IAAI,MAAM,oBAAoB,mBAAmB;AACjD;AACA,iBAAiB,0CAA0C;AAC3D;AACA;AACA;AACA,OAAO;;AAEP;;AAEA,IAAI,MAAM,iBAAiB,mBAAmB;AAC9C;AACA,iBAAiB,0CAA0C;AAC3D;AACA;AACA,4CAA4C,+BAA+B;AAC3E,OAAO;;AAEP,IAAI,MAAM,iBAAiB,mBAAmB;AAC9C;AACA,iBAAiB,0CAA0C;AAC3D;AACA;AACA,iCAAiC,+BAA+B;AAChE;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,oCAAoC;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+CAA+C;AAC5D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,sCAAsC;AAC5C,aAAa,kCAAkC;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,QAAQ,iBAAiB,SAAS;AACtC,IAAI,QAAQ,iBAAiB,SAAS;AACtC,IAAI,QAAQ,iBAAiB,SAAS;AACtC;AACA,0BAA0B,SAAS;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,2BAA2B;AACxC,aAAa;AACb,gDAAgD;AAChD;AACA,UAAU,gCAAgC;AAC1C,UAAU,8CAA8C;AACxD,cAAc,kCAAkC;AAChD;AACA;AACA,aAAa,gBAAgB;AAC7B,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,eAAe,OAAO;AACvC;AACA;AACA;AACA,gCAAgC,IAAI;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,2BAA2B;AACxC,aAAa,gBAAgB;AAC7B,cAAc,0CAA0C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,2BAA2B;AACxC,aAAa,yFAAyF;AACtG;AACA,UAAU,kCAAkC;AAC5C;AACA;AACA;AACA,aAAa,gBAAgB;AAC7B,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,eAAe,OAAO;AAClE;AACA;AACA,6CAA6C,IAAI;AACjD;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,2BAA2B;AACxC,aAAa,gBAAgB;AAC7B,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,eAAe,OAAO;AACvC,wFAAwF,IAAI;AAC5F;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,MAAM;AACnB,cAAc,qCAAqC;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B,cAAc,2BAA2B;AACzC;AACA;AACA;AACA;AACA;AACA,iBAAiB,WAAW;AAC5B,iBAAiB,WAAW;;AAE5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mDAAmD;AACnD,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B,cAAc,WAAW;AAC5E;;AAEA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,2BAA2B;AACxC,cAAc,qCAAqC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,aAAa,KAAc;AAC3B;AACA;;AAEA;AACA;AACA;AACA,cAAc,mDAAmD;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,2CAA2C;AACzD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B,cAAc,+BAA+B;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc,2DAA2D;AACzE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,WAAW;AACzB;AACA;AACA;AACA;AACA;AACA,iBAAiB,WAAW,cAAc,WAAW;AACrD;AACA;;AAEA;AACA;AACA,cAAc,+CAA+C;AAC7D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,qCAAqC;AAClD,cAAc,2BAA2B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,aAAa,KAAc;AAC3B;AACA;;AAEA;AACA;AACA,cAAc,oCAAoC;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,mCAAmC;AACjD;AACA;AACA;AACA;AACA;AACA,iBAAiB,mCAAmC,cAAc,WAAW;AAC7E;AACA;;AAEA;AACA;AACA;AACA,cAAc,KAAK;AACnB;AACA;AACA;AACA;AACA;AACA,iBAAiB,KAAK,cAAc,WAAW;AAC/C;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD;AACxD;AACA,cAAc,aAAa;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB,gDAAgD;AACxE,cAAc,aAAa;AAC3B;AACA;AACA;AACA;;AAEA;AACA,aAAa,4BAA4B;AACzC,aAAa,OAAO;AACpB,aAAa,qCAAqC;AAClD,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,IAAI;AACjB;AACA;AACA,aAAa,IAAI;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,MAAM;AACnB,aAAa,QAAQ;AACrB;AACA;AACA;AACA,8BAA8B,kBAAe;AAC7C;AACA;;AAEA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA,uCAAuC,gBAAe;AACtD;AACA,yCAAyC,gBAAe;AACxD;;AAEA;AACA,oDAAoD,QAAQ;AAC5D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uDAAuD,QAAQ;AAC/D,QAAQ,aAAa;AACrB;AACA;AACA;;AAEA;AACA;AACA,MAAM,UAAU;AAChB;AACA,4BAA4B,SAAS;AACrC;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,QAAQ,MAAM,sBAAsB,SAAS;AAC7C,QAAQ,MAAM,sBAAsB,SAAS;AAC7C;;AAEA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa;AACnB;AACA;AACA;AACA,MAAM,aAAa;AACnB;AACA;AACA;AACA;AACA,+CAA+C,MAAM;AACrD,sCAAsC,MAAM;AAC5C,cAAc,eAAe;AAC7B;AACA,oCAAoC,MAAM;AAC1C,cAAc,SAAS;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mDAAmD,aAAa;AAChE;AACA;AACA;AACA;AACA;AACA,QAAQ,MAAM;AACd,sBAAsB,eAAe;AACrC;AACA,QAAQ,MAAM;AACd,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,uCAAuC;AACpD,cAAc,iDAAiD;AAC/D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+CAA+C;AAC5D,cAAc,yDAAyD;AACvE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,kCAAkC;AAC/C,cAAc,4CAA4C;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+BAA+B;AAC5C,cAAc,yCAAyC;AACvD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,WAAW;AAC5B;AACA,eAAe,YAAY;AAC3B;AACA,8BAA8B,OAAO;AACrC;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D,oBAAoB,MAAM;AAC1B;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,0BAA0B,iBAAiB;AAC3C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB,cAAO;AAC7B,qBAAqB,aAAM;AAC3B;AACA;AACA,gBAAgB,WAAQ,CAAC,YAAY;AACrC,iCAAiC,mBAAmB;AACpD;AACA;;AAEA;AACA,gCAAgC,QAAQ;AACxC,gCAAgC,QAAQ;AACxC,WAAW,aAAM;;AAEjB;AACA,+BAA+B,WAAQ,CAAC,YAAY;AACpD,QAAQ,YAAK;AACb;AACA;;AAEA,2BAA2B,WAAQ,CAAC,YAAY;;AAEhD;;AAEA;;AAEA;AACA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB;;AAEA;AACA;AACA,aAAa,mCAAmC;AAChD;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB;;AAEA;AACA;AACA,aAAa,6BAA6B;AAC1C;AACA;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB;;AAEA;AACA;AACA,aAAa,KAAK;AAClB;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB;;AAEA;AACA,aAAa,+BAA+B;AAC5C;AACA;AACA,6BAA6B,MAAM;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,+BAA+B;AAC5C;AACA;AACA,oCAAoC,MAAM;AAC1C;AACA;;AAEA;AACA,CAAC,CAAC,SAAU;;;AAGZ;AACA,WAAW,WAAW;AACtB,YAAY,mBAAmB;AAC/B;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;;AAEA,uDAAuD,EAAE;AACzD,eAAe,WAAW,2BAA2B,KAAU,EAAE,mBAAmB,WAAW,qBAAqB;AACpH,SAAS,WAAW;;AAEpB,SAAS,WAAW;;AAEpB,SAAS,WAAW;AACpB,uBAAuB,OAAI;;AAE3B;AACA;AACA;AACA,qBAAqB,aAAU;AAC/B,KAAK;AACL,MAAM,MAAM,mBAAmB,EAAE;AACjC,YAAY;AACZ,4BAA4B,WAAW;AACvC;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,aAAU;AACnC,KAAK;AACL,MAAM,MAAM,mBAAmB,EAAE;AACjC,YAAY;AACZ,gCAAgC,WAAW;AAC3C;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,aAAU;AAC/B,KAAK;AACL,MAAM,MAAM,mBAAmB,EAAE;AACjC,YAAY;AACZ;AACA;AACA,GAAG;AACH,mBAAmB,aAAU;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACe,6EAAY,EAAC;;AAE5B;AACA,YAAY,yCAAyC;AACrD,YAAY,QAAQ;AACpB;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA,0BAA0B,EAAE;AAC5B,mCAAmC,WAAW;AAC9C,KAAK;AACL,8BAA8B,mCAAmC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,wC;;ACr6CA;AACA;AACA;AACqC;AACS;AACR;AACD;AACc;;;AAGnD;AACA,aAAa,OAAO;AACpB,cAAc,YAAY;AAC1B;AACA;AACA,cAAc,2CAA2C;AACzD;AACA;AACA,cAAc,mBAAmB;AACjC;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,mBAAmB;AACnD;AACA;AACA;AACA;AACA;AACA,8BAA8B,sCAAsC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAO;AACX;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA,oDAAoD,IAAI;;AAExD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,UAAU;AACd;AACA;;AAEA;AACA;AACA,cAAc,qCAAqC;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA;AACA,MAAM,UAAU;AAChB;AACA,kDAAkD,QAAQ;AAC1D,MAAM,aAAa;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,IAAI;AAC9B,+BAA+B,MAAM;AACrC,UAAU,YAAY;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,SAAU;;;AAGG,mEAAO,EAAC;;AAEvB,mC;;AC7JA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,eAAe;AAC3B;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED,+B;;ACtFA;AACA;AACA;AACmD;AACJ;AACb;AACc;AACd;AACQ;AACT;AACoB;AACR;;;AAG7C;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,8BAA8B;AAC5C;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA,cAAc,sCAAsC;AACpD,qCAAqC,8DAA8D;AACnG;AACA,cAAc,qCAAqC;AACnD;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,4BAA4B;AAC1C,cAAc,OAAO;AACrB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,8BAA8B;AAC5C,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;AAEA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,2CAA2C,6BAA6B;AACxE,SAAS,0CAA0C;AACnD;AACA,IAAI,yCAAyC;AAC7C;AACA;AACA;AACA;AACA;AACA,IAAI,WAAK;AACT;;AAEA,sBAAsB,UAAM,GAAG;AAC/B;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;;AAEA,IAAI,MAAM;AACV,MAAM,kBAAkB,CAAC,cAAa;AACtC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,sCAAsC;AACpD;AACA;AACA;AACA;AACA,0BAA0B,cAAa;AACvC;AACA,iBAAiB,sCAAsC;AACvD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qBAAqB,KAAW;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa;AACnB;AACA;AACA;AACA;AACA,8BAA8B,MAAM;AACpC,QAAQ,SAAS;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,wCAAwC;AAC9C;AACA;AACA;AACA;AACA,MAAM,6BAA6B;AACnC,aAAa,qCAAqC;AAClD;AACA;AACA;AACA;AACA,MAAM,aAAa;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,aAAa;AACnB;AACA;AACA;AACA,+BAA+B,MAAM,MAAM,gBAAe;AAC1D,qCAAqC,qCAAqC;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,MAAM;AACjD,OAAO;AACP,2BAA2B,MAAM,OAAO,SAAS;AACjD;AACA;AACA;;AAEA;AACA;AACA,aAAa,sCAAsC;AACnD;AACA;AACA;AACA;AACA,aAAa,cAAa;AAC1B;;AAEA;AACA,CAAC,CAAC,IAAS;;;AAGX;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;;;AAGe,2DAAK,EAAC;;AAErB,iC;;AC/OA;AACA;AACA;AACmC;AACA;AAC0C;AACvB;AAClB;AACW;AACO;;;AAGtD;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,mBAAmB;AACjC;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;AACA,cAAc,mBAAmB;AACjC;AACA;AACA,cAAc,2CAA2C;AACzD;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uBAAW;AACf;;AAEA;;AAEA;AACA;AACA,gCAAgC,kBAAM;AACtC;AACA,KAAK;;AAEL;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,KAAK;AACL;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI,MAAM,SAAS,SAAS;;AAE5B,uCAAuC,kBAAkB,SAAS,aAAa;AAC/E,sDAAsD,eAAe;AACrE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,wCAAwC;AACrD,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,iDAAiD,QAAQ;AACzD;AACA,WAAW,mBAAmB;AAC9B;AACA;;AAEA,8BAA8B,oCAAoC;AAClE;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,yCAAyC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,QAAQ,MAAM;AACd;AACA;;AAEA,IAAI,cAAc;;AAElB;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA,MAAM,WAAW;AACjB,KAAK;AACL,MAAM,WAAW;AACjB;AACA;AACA;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,eAAO;;;AAGT;AACA;AACA,WAAW,iCAAiC;AAC5C,UAAU;AACV;AACA;AACO,SAAS,kBAAM;AACtB;AACA;;;AAGe,+EAAW,EAAC;;AAE3B,uC;;ACpVA;AACA;AACA;AACmC;AACuC;AACrC;AACD;AACW;;;AAG/C;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,mBAAmB;AACjC;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,2CAA2C;AACzD;AACA,cAAc,WAAW;AACzB;AACA,cAAc,mBAAmB;AACjC;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,aAAM;AACV;;AAEA;;AAEA;AACA;AACA,gCAAgC,aAAM;AACtC;AACA,KAAK;;AAEL;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,IAAI,MAAM,SAAS,SAAS;;AAE5B,uCAAuC,kBAAkB,SAAS,aAAa;AAC/E;AACA;AACA;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,iCAAiC,YAAY;AAC7C;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,eAAO;;;AAGT;AACA;AACA,WAAW,iCAAiC;AAC5C,UAAU;AACV;AACA;AACO,SAAS,aAAM;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,YAAY;AACjE;AACA,mCAAmC,YAAY;AAC/C,OAAO;AACP,sCAAsC,YAAY;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEe,gEAAM,EAAC;;AAEtB,kC;;ACtLA;AACA;AACA;AACoC;AACW;AACZ;AACyB;AACvB;;;AAGrC;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,mBAAmB;AACjC;AACA,cAAc,mBAAmB;AACjC;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,mBAAmB;AACjC;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,SAAI;AACR;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI,MAAM,YAAY,SAAS;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI,MAAM,aAAa,SAAS;;AAEhC,uCAAuC,kBAAkB,SAAS,aAAa;AAC/E;AACA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,eAAO;;;AAGM,0DAAI,EAAC;;AAEpB,gC;;AC5IA;AACA;AACA;AAC0C;AACC;AACV;AACJ;;;AAG7B;AACA,aAAa,OAAO;AACpB,cAAc,QAAQ;AACtB,IAAI,gDAAgD;AACpD,cAAc,mCAAmC;AACjD,gBAAgB,gDAAgD;AAChE,cAAc,QAAQ;AACtB,IAAI,sCAAsC;AAC1C,cAAc,8BAA8B;AAC5C,QAAQ,sCAAsC;AAC9C,cAAc,QAAQ,iBAAiB,kCAAkC;AACzE,cAAc,4BAA4B;AAC1C,IAAI,kCAAkC;AACtC;AACA;;;AAGA;AACA;AACA;AACA;AACA,MAAM;AACN,MAAM;AACN,MAAM;AACN;AACA,WAAW,iBAAiB;AAC5B;AACA,YAAY;AACZ;AACA;AACA;AACA;AACO;;AAEP;;AAEA,qBAAqB,aAAU;;AAE/B;AACA;AACA,sBAAsB,YAAI;AAC1B;;AAEA;AACA;AACA,sBAAsB,cAAM;AAC5B;;AAEA;AACA;AACA;AACA,sBAAsB,mBAAW;AACjC;;AAEA;AACA;;AAEA,gC;;AClEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEe,sDAAO,EAAC;;AAEvB,mC;;ACxHA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA,CAAC,EAAC;;AAEF,oC;;ACXA;AACA;AACA;AACsC;AACO;AACG;AACf;;;AAGjC;AACA;AACA,aAAa,OAAO;AACpB,cAAc,0DAA0D;AACxE;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA,iBAAiB,sDAAsD;AACvE,6BAA6B,kCAAkC;AAC/D;AACA;AACA;AACA;AACA;AACA,IAAI,uBAAW;AACf;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA,sBAAsB,QAAQ,cAAc,oBAAmB;AAC/D;;AAEA;AACA;AACA,cAAc,qCAAqC;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,kDAAkD;AACpE,aAAa,wCAAwC;AACrD,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,aAAa,oBAAmB;AAChC;;AAEA;AACA;AACA;AACA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,SAAU;;;AAGZ;AACA,WAAW,6BAA6B;AACxC,WAAW,sCAAsC;AACjD,WAAW,QAAQ;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;;AAGA;AACA,WAAW,6BAA6B;AACxC,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,QAAQ;AACnB;AACO,SAAS,kBAAM;AACtB;AACA;AACA;;;AAGA;AACA,WAAW,6BAA6B;AACxC,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,QAAQ;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;;AAGA;AACA,WAAW,6BAA6B;AACxC,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,QAAQ;AACnB,WAAW,QAAQ,iCAAiC;AACpD;AACA,sCAAsC;AACtC;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACO;AACP;AACA;AACA;;;AAGA;AACA,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,uCAAuC;AAClD,WAAW,QAAQ;AACnB;AACO;AACP;AACA;;AAEA;AACA;AACA,iBAAiB,KAAK;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA,WAAW,6BAA6B;AACxC,WAAW,iBAAiB;AAC5B,WAAW,uCAAuC;AAClD,WAAW,QAAQ;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEe,mFAAW,EAAC;;AAE3B,uC;;AC9PA;AACA;AACA;AAC4D;AACF;;;AAG1D;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2BAAW;AAC9B,KAAK;;AAEL;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,uBAAW;;;AAGb;AACA,gBAAgB,kDAAkD;AAClE;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB,UAAU;AACV;AACA,SAAS,2BAAW;AACpB;AACA,8BAA8B,mBAAmB;AACjD,kCAAkC,WAAW;AAC7C;AACA;AACA;AACA;AACA,IAAI,WAAW;AACf;AACA;AACA;AACA;AACA;;AAEe,+EAAe,EAAC;;AAE/B,2C;;ACzEA;AACA;AACA;AAC4D;AACvB;AACO;AACN;;;AAGtC;AACA,6BAA6B,gCAAgC;AAC7D,KAAK,QAAQ;AACb;AACA,aAAa,oEAAoE;AACjF;;;AAGA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,iCAAiC,oCAAoC;AACrE;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,iCAAiC,oCAAoC;AACrE;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO,IAAI,eAAK;AAChB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO,aAAa,IAAI;;;AAGxB;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,iCAAiC,mBAAmB;AACpD;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACO;AACP,iCAAiC,WAAW;AAC5C;AACA,QAAQ,MAAM,IAAI,GAAG;AACrB;;;AAGA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO,YAAY,KAAK;;;AAGxB;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO,IAAI,qBAAW;AACtB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,iCAAiC,mBAAmB;AACpD;;;AAGA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,iCAAiC,mBAAmB;AACpD;;;AAGA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,iCAAiC,oCAAoC;AACrE;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,iCAAiC,oCAAoC;AACrE;AACA,KAAK,GAAG;AACR;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,iCAAiC,oCAAoC;AACrE;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,gCAAgC,4CAA4C;AAC5E,EAAE,MAAM,iCAAiC;AACzC;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB;AACA;AACO;AACP,gCAAgC,4CAA4C;AAC5E,EAAE,MAAM,iCAAiC;AACzC;AACA;;AAEA,qC;;ACxPA;AACA;AACA;AAC4D;AACjB;AACP;;;AAGpC;AACA,aAAa,OAAO;AACpB,cAAc,iEAAiE;AAC/E;AACA;AACA,cAAc,yDAAyD;AACvE;AACA;AACA,cAAc,0DAA0D;AACxE;AACA;AACA;AACA;AACA,cAAc,yDAAyD;AACvE;AACA;AACA;AACA,cAAc,iEAAiE;AAC/E;AACA;AACA,cAAc,0BAA0B;AACxC;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,0BAAkB;AACtB;;AAEA;;AAEA,gCAAgC,8CAA8C;;AAE9E;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+CAA+C;AAC5D,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+CAA+C;AAC5D;AACA;AACA;;AAEA;AACA,kBAAkB,kDAAkD;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,+CAA+C;AACpE;AACA;;AAEA;AACA;AACA;AACA,kCAAkC,mBAAmB;AACrD;AACA,OAAO,kCAAkC,mBAAmB;AAC5D;AACA;AACA;AACA,KAAK;AACL,kCAAkC,mBAAmB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,kCAAkC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+CAA+C;AAC5D;AACA;AACA;;AAEA;AACA;AACA,aAAa,+CAA+C;AAC5D,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA,aAAa,+CAA+C;AAC5D;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAkC,mBAAmB;AACrD;AACA,OAAO;AACP,UAAU,mBAAmB;AAC7B;AACA,OAAO;AACP;AACA;AACA;AACA,4BAA4B,SAAS;AACrC;AACA;;AAEA;AACA,CAAC,CAAC,uBAAW;;;AAGb;AACA,WAAW,oDAAoD;AAC/D,YAAY,4BAA4B;AACxC;AACO,SAAS,gBAAQ;AACxB;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,+CAA+C;AAC1D,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,kBAAkB,mBAAmB;AACrC,aAAa,mBAAmB;AAChC,aAAa,mBAAmB;AAChC;;;AAGe,sEAAkB,EAAC;;AAElC,mC;;ACzOA;AACA;AACA;AACsC;AACsE;AACvE;AACiB;AAChB;AAC4C;;;AAGlF;AACA,aAAa,OAAO;AACpB,cAAc,2CAA2C,uCAAuC,gDAAgD;AAChJ;AACA,eAAe,gDAAgD;AAC/D,cAAc,gCAAgC;AAC9C;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAO;AACX;;AAEA;AACA,gBAAgB,KAAK;AACrB,KAAK;;AAEL;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,8DAA8D,cAAc;;AAE5E;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA,mBAAmB,gBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,gBAAe;AACvB,QAAQ,iBAAgB;AACxB,QAAQ,GAAa;AACrB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,uCAAuC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB,SAAS;AACT;AACA;AACA;AACA,qBAAqB,QAAQ;AAC7B;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,CAAC,CAAC,OAAkB;;AAEL,uEAAO,EAAC;;AAEvB,mC;;AC/KA;AACA;AACA;AACiD;AACX;AACgD;AAChD;AAC4B;AACpB;;;AAG9C;AACA,aAAa,OAAO;AACpB,cAAc,2CAA2C;AACzD,IAAI,gDAAgD;AACpD;AACA,eAAe,kDAAkD;AACjE,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA;AACA,8BAA8B,iCAAiC;AAC/D;AACA;AACA;AACA;AACA;AACA,IAAI,qBAAU;AACd;;AAEA;;AAEA;AACA,gBAAgB,KAAK;AACrB,KAAK;;AAEL;AACA;AACA,cAAc;AACd;AACA,8DAA8D,gBAAgB;;AAE9E;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,SAAS;AAClB;AACA;;AAEA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,wBAAwB;AAC9B;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,SAAS,SAAS;AAClB;AACA;;AAEA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA,IAAI,kBAAM;AACV;AACA;;;AAGA;AACA;AACA;AACA;AACA,SAAS,SAAS;AAClB;AACA;;AAEA,QAAQ,iBAAiB;AACzB;AACA,4BAA4B,QAAQ;AACpC;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,CAAC,CAAC,OAAkB;;AAEL,gFAAU,EAAC;;AAE1B,sC;;ACjIA;AACA;AACA;;AAE0C;AACD;;AAEzC,IAAI,aAAS;AACb;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,4BAA4B;AACzC,aAAa,4BAA4B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,YAAO;AAClC,KAAK;AACL;AACA;AACA;;AAEA;AACA,cAAc,qCAAqC;AACnD;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,aAAU;;;AAGG,qDAAS,EAAC;;AAEzB,+B;;ACnIA;AACA;AACA;AACA;AACuC;AACqC;AACvC;AACS;AACL;;;AAGzC;AACA,4BAA4B,gCAAgC;AAC5D,IAAI,4BAA4B,kBAAkB,QAAQ;AAC1D;AACA,aAAa,6HAA6H;AAC1I;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,2CAA2C,uCAAuC,gDAAgD;AAChJ;AACA,eAAe,iCAAiC;AAChD,cAAc,OAAO;AACrB;AACA,cAAc,aAAa,4CAA4C,gDAAgD;AACvH,IAAI,4BAA4B;AAChC;AACA,cAAc,gEAAgE;AAC9E;AACA;;;AAGA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,sBAAsB,4CAA4C;AAClE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,YAAK;;;AAGP;AACA;AACA;AACA,8BAA8B,iCAAiC;AAC/D;AACA;AACA,SAAS,8CAA8C;AACvD,IAAI,8CAA8C;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAO;AACX;;AAEA;;AAEA;;AAEA;AACA,aAAa;AACb;AACA;AACA,oBAAoB,GAAS;;AAE7B;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,2DAA2D,IAAI;;AAE/D;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA,8DAA8D,MAAM;;AAEpE;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,wCAAwC;AACrD;AACA,aAAa,4BAA4B;AACzC,aAAa,4BAA4B;AACzC,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,SAAS;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,SAAS;AAClB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,SAAS;AAClB;AACA;;AAEA,QAAQ,iBAAiB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,CAAC,CAAC,OAAkB;;;AAGL,uEAAO,EAAC;;AAEvB,mC;;ACnPA;AACA;AACA;AACqC;AACe;AAC+D;AAChF;;;AAGnC;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA,cAAc,2CAA2C;AACzD,aAAa,gDAAgD;AAC7D;AACA,eAAe,8CAA8C;AAC7D,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB;;;AAGA;AACA;AACA;AACA,8BAA8B,iCAAiC;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iBAAQ;AACZ;AACA;;AAEA,4DAA4D,YAAY;;AAExE;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,mBAAO;;;AAGT;AACA,UAAU;AACV;AACA;AACA;AACA,wBAAwB,8BAA8B;AACtD,wBAAwB,2BAA2B;AACnD;;AAEA;AACA;AACA,yBAAyB,6BAA6B;AACtD,iCAAiC,aAAa;AAC9C,iCAAiC,WAAW;AAC5C;;AAEA,IAAI,eAAe;AACnB;AACA;;AAEA;AACA;;AAEA,eAAe,gBAAS;AACxB;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,GAAG;AACH;;;AAGe,0EAAQ,EAAC;;AAExB,oC;;ACtGA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;AACe;AACf;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,mC;;ACfA;AACA;AACA;AAC4D;AACb;AACJ;AAC8B;AACvB;;;AAGlD;AACA,aAAa,OAAO;AACpB,cAAc,2CAA2C;AACzD,aAAa,gDAAgD;AAC7D;AACA,IAAI,gDAAgD;AACpD,IAAI,mDAAmD;AACvD,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,wBAAwB;AAC5B;AACA;AACA,aAAa,sDAAsD;AACnE;AACA;AACA,IAAI,uBAAW;AACf;;AAEA;AACA,mBAAmB,uBAAW;AAC9B,KAAK;;AAEL;;AAEA;AACA;AACA,eAAe,wCAAwC;AACvD,gBAAgB,QAAQ;AACxB;AACA;AACA,aAAa,cAAc;AAC3B,QAAQ,iBAAiB;AACzB;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,uBAAW;;;AAGb;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB,UAAU;AACV;AACA,SAAS,uBAAW;AACpB;AACA,8BAA8B,SAAS;AACvC,8BAA8B,cAAc;AAC5C;AACA;AACA,oBAAoB,OAAO;AAC3B,mBAAmB,OAAO;AAC1B,mBAAmB,OAAO;AAC1B,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA,OAAO,qBAAqB,OAAO;AACnC;AACA,OAAO,qBAAqB,OAAO;AACnC;AACA,OAAO;AACP;AACA;AACA;AACA,MAAM,iBAAgB;AACtB,MAAM,GAAG;AACT;AACA;AACA;AACA;AACA;AACA;;AAEe,mFAAW,EAAC;;AAE3B,uC;;AChIA;AACA;AACA;AAC+C;AACU;AACC;;;AAG1D;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,2CAA2C;AACzD,aAAa,gDAAgD;AAC7D;AACA,IAAI,mDAAmD;AACvD,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,wBAAwB;AAC5B;AACA;AACA,aAAa,oDAAoD;AACjE;AACA;AACA,IAAI,yBAAY;AAChB;;AAEA;AACA,mBAAmB,wBAAW;AAC9B,KAAK;;AAEL;;AAEA;AACA;AACA,cAAc;AACd;AACA,8DAA8D,iBAAiB;;AAE/E;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,uBAAW;;;AAGb;AACA,gBAAgB,kDAAkD;AAClE;AACA;AACA,WAAW,wCAAwC;AACnD,YAAY,QAAQ;AACpB,UAAU;AACV;AACA,SAAS,wBAAW;AACpB;AACA,8BAA8B,SAAS;AACvC,8BAA8B,SAAS;AACvC,8BAA8B,cAAc;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEe,sFAAY,EAAC;;AAE5B,wC;;AClGA;AACA;AACA;AACsC;AACQ;AACT;AACU;AACe;AACJ;AACzB;;;AAGjC;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA,UAAU;AACV;AACO;AACP;AACA;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,2CAA2C;AACzD,aAAa,gDAAgD;AAC7D;AACA,IAAI,wCAAwC;AAC5C,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI,6BAAc;AAClB;;AAEA;;AAEA,gCAAgC,8CAA8C;;AAE9E;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,8DAA8D,MAAM;;AAEpE;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,QAAQ;AACzB;;AAEA;AACA,kBAAkB,kDAAkD;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS,mBAAmB,SAAS;AACtD;AACA;;AAEA;;AAEA;AACA,gCAAgC,WAAW;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA,UAAU,OAAO;AACjB;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA,KAAK,kCAAkC,SAAS;AAChD;AACA,UAAU,MAAM;AAChB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,qBAAqB,QAAQ;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,KAAK;AACrB,IAAI,WAAW;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,uBAAW;;AAEE,4FAAc,EAAC;;AAE9B,0C;;AC5TA;AACA;AACA;AACsC;AACA;AAC4B;AACgB;AACjC;;;AAGjD;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,uBAAW;AACf;;AAEA;;AAEA,oCAAoC,+BAA+B;;AAEnE;AACA,gCAAgC,KAAK;AACrC;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,gBAAoB;AACvC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM,wBAAwB;AAC9B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B;AACA;AACA,QAAQ,kBAAM;AACd;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,QAAQ;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,CAAC,CAAC,OAAkB;;AAEL,mFAAW,EAAC;;AAE3B,uC;;ACzKA;AACA;AACA;AACsC;AACA;AACwB;AACoB;;;AAGlF;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,mBAAS;AACb;;AAEA;;AAEA,oCAAoC,+BAA+B;;AAEnE;AACA,gCAAgC,KAAK;AACrC;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,gBAAoB;AACvC;AACA;AACA;;AAEA;AACA;AACA,IAAI,sBAAsB;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,IAAI;AACZ;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,QAAQ;AACtC;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,CAAC,CAAC,OAAkB;;AAEL,6EAAS,EAAC;;AAEzB,qC;;ACzKA;AACA;AACA;AACyC;AACN;AAC4B;AAChB;AACM;AACJ;AACM;AACE;AACI;AACN;AACJ;AACP;;AAEgC;AACR;AACR;AACA;AACM;AACc;AAClB;AACR;AACI;AACU;AACA;AACE;AACZ;AACgB;AACN;AACJ;AACJ;AACF;AACJ;AACU;;;AAGhE;AACA,aAAa,OAAO;AACpB,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI,wCAAwC;AAC5C,gBAAgB,2BAA2B;AAC3C,yBAAyB,wBAAwB;AACjD;AACA,MAAM;AACN,MAAM;AACN,MAAM;AACN,MAAM;AACN,MAAM;AACN,MAAM;AACN,MAAM;AACN,MAAM;AACN,MAAM;AACN;AACA,WAAW,iBAAiB;AAC5B,YAAY;AACZ,qDAAqD;AACrD;AACA;AACA;AACO,SAAS,oBAAQ;;AAExB;;AAEA,yBAAyB,aAAU;;AAEnC,oBAAoB,UAAO;;AAE3B;AACA;AACA;AACA,0BAA0B,sBAAU;AACpC;;AAEA;AACA;AACA;AACA,0BAA0B,2BAAe;AACzC;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,0BAA0B,mBAAO;AACjC,uCAAuC,eAAK;AAC5C;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,0BAA0B,uBAAW;AACrC;;AAEA;AACA;AACA,0BAA0B,qBAAS;AACnC;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,0BAA0B,uBAAW;AACrC,0BAA0B,wBAAY;AACtC;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,0BAA0B,0BAAc;AACxC,uCAAuC,eAAK;AAC5C;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,0BAA0B,oBAAQ;AAClC;AACA,KAAK;AACL;;AAEA;;AAEA;;AAEA,uC;;ACpKA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACO;;AAEP;AACA;AACA;AACA,UAAU;AACV;AACO;;AAEP,kC;;AClBA;AACA;AACA;AACmC;AACU;AACC;;AAE9C;AACA;AACA;AACA,IAAI,mBAAS;AACb;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;;AAEA;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,oDAAoD;AAClE;AACA;AACA,WAAW,aAAQ;AACnB;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;AACA,sBAAsB,OAAO;AAC7B;;AAEA;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI,aAAQ;AACZ;;AAEA;AACA,CAAC,CAAC,aAAW;;;AAGE,oEAAS,EAAC;;AAEzB,qC;;ACtGA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,sC;;ACdA;AACA;AACA;AACuC;AACE;;;AAGzC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,2BAA2B;AACxC;;;AAGA,IAAI,uBAAW;AACf;;AAEA,2CAA2C,UAAU,QAAQ,UAAU;;AAEvE;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,mBAAmB,UAAU;AAC7B,KAAK;AACL,mBAAmB,UAAU;AAC7B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,UAAU;AAChC,mBAAmB,UAAU;AAC7B;AACA;AACA;AACA;;AAEA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,YAAS;;;AAGI,0EAAW,EAAC;;AAE3B,uC;;AChGA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,qC;;ACfA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA,CAAC,EAAC;;AAEF,4C;;ACnBA;AACA;AACA;;AAEuC;;AAEvC;AACA;;AAEA;;AAEA;AACA,2CAA2C,wCAAwC;AACnF,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,YAAK;;AAEQ,4DAAW,EAAC;;AAE3B,iC;;ACpDA;AACA;AACA;;AAEqC;AACS;AACC;;;AAG/C;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,EAAE;AAChB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iBAAQ;AACZ;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;;AAGA;AACA,aAAa,0CAA0C;AACvD;AACA;AACA;AACA,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,EAAE;AAChB;AACA;AACA;AACA,IAAI,MAAM;AACV,UAAU;AACV;AACA;AACA,KAAK;AACL,gCAAgC,MAAM;AACtC;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,EAAE;AAChB;AACA;AACA;AACA,IAAI,MAAM,0BAA0B;AACpC;AACA,gCAAgC,MAAM;AACtC;AACA;AACA;AACA,KAAK;AACL,gCAAgC,MAAM;AACtC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;;AAGA;AACA,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA,8BAA8B,OAAO;AACrC;AACA;AACA;AACA;;;AAGA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA,8BAA8B,OAAO;AACrC;AACA;AACA;AACA;;;AAGA;AACA,cAAc,EAAE;AAChB;AACA;AACA;AACA;;;AAGA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;;AAGA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;;AAGA;AACA,cAAc,EAAE;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,MAAM;AACpC;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,aAAa,EAAE;AACf;AACA;AACA,kBAAkB;AAClB;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,aAAa,EAAE;AACf;AACA;AACA,IAAI,MAAM;AACV,UAAU;AACV,2BAA2B,MAAM;AACjC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,aAAW;;AAEE,sEAAQ,EAAC;;AAExB,oC;;AChTA;AACA;AACA;AAC0C;AACM;AAChB;AACc;AACY;;;AAG1D;AACA,aAAa,OAAO;AACpB,cAAc,oCAAoC;AAClD;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,oCAAoC;AAClD,cAAc,oCAAoC;AAClD,cAAc,OAAO;AACrB,cAAc,cAAc;AAC5B,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,oCAAoC;AAClD,cAAc,oCAAoC;AAClD,cAAc,OAAO;AACrB,cAAc,cAAc;AAC5B,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,cAAc;AAC5B,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,oCAAoC;AAClD;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,mCAAmC;AACjD,cAAc,qCAAqC;AACnD,cAAc,OAAO;AACrB,cAAc,cAAc;AAC5B;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,wCAAwC;AACzD,aAAa,SAAS;AACtB;;;AAGA;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,iBAAiB,yCAAyC;AAC1D,UAAU;AACV;AACA;AACO,qBAAqB,gBAAQ;;;AAGpC;AACA,UAAU;AACV;AACO;;;AAGP;AACA,UAAU;AACV;AACA;;;AAGA;AACA,UAAU;AACV;AACO;;;AAGP;AACA;AACA,WAAW,OAAO;AAClB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,eAAe;AACzC;AACA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,SAAK;AACf;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,eAAe;AACtC;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;AAGD;AACA,YAAY,yBAAyB;AACrC;AACA;AACA;AACA,qBAAqB,qBAAqB;AAC1C;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,YAAY,0BAA0B;AACtC;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;AAGD;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,yBAAyB;AACpC,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;;AAGO,qBAAqB,MAAe;;;AAG3C;AACA,WAAW,yBAAyB;AACpC,WAAW,yCAAyC;AACpD,WAAW,OAAO;AAClB,WAAW,oDAAoD;AAC/D,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kC;;AC1XA;AACA;AACA;AACoC;AACJ;;;AAGhC;AACA;AACA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;;;AAGA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,iCAAiC,EAAE,UAAU,EAAE,YAAY,EAAE,EAAE,IAAI;;;AAGnE;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;;AAGA;AACA;AACA,WAAW,aAAa;AACxB,YAAY,OAAO;AACnB;AACA;AACO;AACP;AACA;AACA,GAAG;AACH,WAAW,cAAQ;AACnB;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,YAAY,MAAM;AAClB;AACO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,iBAAiB,OAAO;AACxB,kBAAkB,MAAM;AACxB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAG;;AAEH;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY,MAAM;AAClB;AACA;AACO;AACP;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,MAAM;AAClB;AACA;AACA;;AAEA;AACA;AACA;;AAEA,8BAA8B;AAC9B,yBAAyB;AACzB,UAAU;AACV;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,oCAAoC;AACvC;AACA;AACA,GAAG,mCAAmC;AACtC;AACA;AACA;AACA,GAAG;AACH,IAAI,MAAM,YAAY;AACtB;AACA;AACA;;;AAGA;AACA;AACA,WAAW,MAAM;AACjB,YAAY,MAAM;AAClB;AACO;AACP,aAAa,KAAK;AAClB,aAAa,KAAK;AAClB,aAAa,KAAK;AAClB,aAAa,KAAK;AAClB;AACA;;;AAGA;AACA,WAAW,MAAM;AACjB,YAAY,OAAO;AACnB;AACO,SAAS,cAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iC;;AClOA;AACA;AACA;AACoC;;;AAGpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oCAAoC;AACjD;AACA;;;AAGA;AACA,WAAW,qCAAqC;AAChD,YAAY,UAAU,kBAAkB,6BAA6B;AACrE;AACA;AACO;AACP;AACA,WAAW,cAAQ;AACnB,GAAG;AACH;AACA;AACA;;AAEA,qC;;AChCA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,2BAAa;;AAEjB,2BAAa;;AAEb;AACA;AACA;AACA,WAAW,sCAAsC;AACjD;AACA,2BAAa;;AAEb;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C;AACA,2BAAa;;AAEb;AACA,WAAW,oCAAoC;AAC/C,WAAW,gCAAgC;AAC3C;AACA,2BAAa;;AAEb;AACA,WAAW,gCAAgC;AAC3C,WAAW,oCAAoC;AAC/C;AACA,2BAAa;;AAEb;AACA,WAAW,gDAAgD;AAC3D,WAAW,gCAAgC;AAC3C;AACA,2BAAa;;AAEb;AACA,WAAW,uEAAuE;AAClF,WAAW,+DAA+D;AAC1E;AACA,2BAAa;;AAEb;AACA,WAAW,4EAA4E;AACvF,WAAW,+DAA+D;AAC1E;AACA,2BAAa;;AAEb;AACA,WAAW,uEAAuE;AAClF,WAAW,+DAA+D;AAC1E;AACA,2BAAa;;AAEb;AACA,WAAW,0CAA0C;AACrD,WAAW,+DAA+D;AAC1E;AACA,2BAAa;;AAEb;AACA,WAAW,kEAAkE;AAC7E,WAAW,+DAA+D;AAC1E;AACA,2BAAa;;AAEb;AACA,WAAW,oEAAoE;AAC/E,WAAW,+DAA+D;AAC1E;AACA,2BAAa;;AAEb;AACA,WAAW,qEAAqE;AAChF,WAAW,+DAA+D;AAC1E;AACA,2BAAa;;AAEb;AACA,WAAW,mCAAmC;AAC9C,WAAW,qCAAqC;AAChD;AACA,2BAAa;;AAEb;AACA,WAAW,oCAAoC;AAC/C,WAAW,sCAAsC;AACjD;AACA,2BAAa;;AAEb;AACA,WAAW,mCAAmC;AAC9C,WAAW,sCAAsC;AACjD;AACA,2BAAa;;AAEE,oFAAa,EAAC;;AAE7B,yC;;AC5GA;AACA;AACA;AACA;AACA;AACA;;AAEsC;AACS;AACJ;AACW;AACO;AACJ;AACX;AACE;AACoL;AAC1I;;AAE1F;AACA;AACA,2BAA2B,qCAAqC;AAChE;AACA;AACA;AACA,IAAI,yCAAyC;AAC7C;AACA;AACA,IAAI,iCAAuB;AAC3B;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,8BAA8B,MAAe;;AAE7C;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA;AACA,QAAQ,iBAAgB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,cAAc;AACxB;AACA;AACA;AACA,6BAA6B,iBAAgB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,QAAQ;AACrB;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB;AACA,cAAc,OAAO;AACrB;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;AACA,SAAS,iBAAU;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,eAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,iDAAiD;AACvD;AACA,aAAa,yEAAyE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,kCAAkC,sCAAsC;AACxE;AACA,WAAW,YAAY;AACvB,uCAAuC,2CAA2C;AAClF;AACA,WAAW,YAAY;AACvB,oCAAoC,wCAAwC;AAC5E;AACA,WAAW,YAAY;AACvB,uCAAuC,2CAA2C;AAClF;AACA,WAAW,YAAY;AACvB,4CAA4C,gDAAgD;AAC5F;AACA,WAAW,YAAY;AACvB,yCAAyC,6CAA6C;AACtF;AACA,WAAW,YAAY;AACvB,+CAA+C,mDAAmD;AAClG;AACA,WAAW,YAAY;AACvB,mCAAmC,uCAAuC;AAC1E;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM,yCAAyC;AAC/C;AACA,aAAa,mCAAmC;AAChD,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAU;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,mDAAmD;AAChE;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,sEAAsE;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,2EAA2E;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,2EAA2E;AACxF;AACA;AACA;AACA,SAAS,iBAAU;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,gFAAgF;AAC7F;AACA;AACA;AACA;AACA,SAAS,iBAAU;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,cAAc;AAC1C;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,wEAAwE;AACrF;AACA;AACA;AACA,SAAS,iBAAU;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,cAAc;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,6CAA6C;AAC1D;AACA;AACA;AACA,SAAS,iBAAU;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,iCAAiC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,mCAAmC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc;AACjD,UAAU,gBAAgB;AAC1B;AACA;AACA;AACA,oCAAoC,eAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,kEAAkE,cAAc;AAChF;AACA,UAAU,gBAAgB;AAC1B,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,eAAe;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,iCAAiC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA;AACA,qCAAqC,gBAAgB;AACrD,wCAAwC,mBAAmB;AAC3D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,oEAAoE,gBAAgB;AACpF;AACA;AACA;AACA,qBAAqB,mBAAmB;AACxC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,sCAAsC;AACnD,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,mBAAmB,WAAW;AAC9B,2BAA2B,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA,gCAAgC,eAAe;AAC/C;AACA,sCAAsC,qBAAqB;AAC3D;AACA,gCAAgC,eAAe;AAC/C;AACA,6BAA6B,gBAAgB;AAC7C;AACA,kCAAkC,iBAAiB;AACnD,qBAAqB,WAAW;AAChC,6BAA6B,kBAAkB;AAC/C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,sCAAsC;AACnD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,qBAAqB,WAAW;AAChC,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,cAAc;AACnD;AACA,sCAAsC,eAAe;AACrD;AACA,4CAA4C,qBAAqB;AACjE;AACA,sCAAsC,eAAe;AACrD;AACA,mCAAmC,gBAAgB;AACnD;AACA,wCAAwC,iBAAiB;AACzD,uBAAuB,WAAW;AAClC,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,WAAW;AAChC;AACA,0BAA0B,gBAAgB;AAC1C;AACA,6BAA6B,mBAAmB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,oBAAa;;;AAGA,+EAAuB,EAAC;;AAEvC,qC;;ACr6BA;AACA;AACA;AACqC;;AAErC;AACA;AACA,uCAAuC,4CAA4C;AACnF;AACA;;AAEA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,OAAO;AACjB,UAAU,QAAQ;AAClB,UAAU,4BAA4B;AACtC,WAAW,iCAAiC;AAC5C;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU,OAAO;AACjB,UAAU,QAAQ;AAClB,UAAU,4BAA4B;AACtC,UAAU,iCAAiC;AAC3C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU,OAAO;AACjB;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,WAAW,4BAA4B;AACvC,YAAY,OAAO;AACnB;AACA;AACA,4BAA4B,QAAQ;AACpC;AACA;;;AAGe,uEAAc,EAAC;;;AAG9B;AACA,QAAQ,oDAAoD;AAC5D,IAAI,gCAAgC;AACpC;AACA;AACO;;AAEP,0C;;AChHA;AACA;AACA;AAC4C;AACF;AACS;AACJ;AACT;AACD;AACiB;AACc;AAC0D;;AAE9H;AACA;AACA;AACA,IAAI,eAAW;AACf;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,yCAAyC;AACtD,aAAa,wCAAwC;AACrD;AACA;AACA,IAAI,aAAQ;AACZ;;AAEA;AACA;AACA,aAAa,2CAA2C;AACxD;AACA;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI,iBAAgB;AACpB;AACA;AACA;AACA;;AAEA,IAAI,MAAe;AACnB,MAAM,YAAqB;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,sCAAsC;AACnD,aAAa,wCAAwC;AACrD,aAAa,OAAO;AACpB,aAAa;AACb,iDAAiD;AACjD,aAAa,EAAE;AACf,aAAa,gEAAgE;AAC7E;AACA;AACA;AACA,aAAa,EAAE;AACf,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,oCAAoC;AACnD,eAAe,oCAAoC;AACnD,gBAAgB,EAAE;AAClB;AACA;AACA,2CAA2C,MAAM;AACjD,YAAY,MAAM;AAClB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,uBAAuB,QAAQ;AAC/B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA,UAAU,mBAAmB;AAC7B;AACA,gCAAgC,oCAAoC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,4BAA4B;AACzC,aAAa,wCAAwC;AACrD,aAAa,OAAO;AACpB,aAAa,0FAA0F;AACvG;AACA,aAAa,EAAE;AACf,aAAa,gEAAgE;AAC7E;AACA;AACA;AACA,aAAa,EAAE;AACf,cAAc,YAAY;AAC1B;AACA;AACA;AACA,WAAW,aAAQ;AACnB;;AAEA;AACA,aAAa,sCAAsC;AACnD,aAAa,wCAAwC;AACrD,aAAa,OAAO;AACpB,aAAa,gEAAgE;AAC7E;AACA;AACA;AACA,aAAa,EAAE;AACf,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA,4CAA4C,IAAI;;AAEhD;AACA;;AAEA;AACA,aAAa,mCAAmC;AAChD;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA,mBAAmB,MAAM;AACzB;AACA;AACA,KAAK;AACL;AACA,kEAAkE,QAAQ;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,MAAM;AACvD,UAAU,SAAS;AACnB,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB;AACA,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,6CAA6C;AAC3D;AACA;AACA;AACA;;AAEA;AACA,cAAc,qCAAqC;AACnD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,cAAc,6BAA6B;AAC3C;AACA;AACA;AACA;AACA;;AAEA,IAAI,aAAa;AACjB;;AAEA;AACA;;AAEA;AACA,aAAa,qCAAqC;AAClD,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,yCAAyC;AACtD;AACA;AACA,IAAI,aAAQ;AACZ;;AAEA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA,mDAAmD,gDAAgD;AACnG;;AAEA;AACA,aAAa,yCAAyC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,gDAAgD;AACrE;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,aAAU;;;AAGZ;AACA,WAAW,qCAAqC;AAChD,WAAW,wCAAwC;AACnD;AACA;AACA,EAAE,MAAc;AAChB;;;AAGA;AACA,WAAW,kCAAkC;AAC7C,WAAW,kCAAkC;AAC7C,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACe,gEAAW,EAAC;;AAE3B,+B;;ACjWA;AACA;AACA;AACmH;AAC/D;AACJ;AACG;AACM;AACT;AACQ;AACF;AACiB;AACnB;AACJ;;;AAGhD;AACA,UAAU;AACV;AACO;;AAEP;AACA;AACA;AACA;AACA;AACA,IAAI,qBAAiB;AACrB;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA,oBAAoB,qBAAqB;;AAEzC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,6BAA6B,kBAAkB;AAC/C;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,sBAAsB,MAAe;;AAErC;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,4CAA4C;AACzD,aAAa,2CAA2C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,8BAA8B,SAAuB;AACrD;AACA,6BAA6B,YAAW;AACxC;AACA;AACA;AACA;;AAEA;AACA,aAAa,2CAA2C;AACxD;AACA,cAAc,wCAAwC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAgB;AAC3B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;;AAEA,6BAA6B,gBAAe;;AAE5C;AACA,IAAI,UAAU,mBAAmB,YAAY;;AAE7C;AACA;AACA,MAAM,cAAc;AACpB;;AAEA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA,qCAAqC,6BAA6B;AAClE,WAAW,mBAAmB;AAC9B,oCAAoC,KAAW;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAA6B,gBAAe;;AAE5C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qBAAqB,KAAc;AACnC;;AAEA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA,UAAU,mBAAmB;AAC7B,uCAAuC,6BAA6B;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,YAAW;;;AAGE,oEAAiB,EAAC;;AAEjC,+B;;ACjOA;AACA;AACA;AACkC;AACQ;AACA;AACF;AACJ;AACW;AACF;;AAE7C,IAAI,mBAAa;AACjB;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,oCAAoC;AACjD,aAAa,wCAAwC;AACrD,aAAa,6DAA6D;AAC1E,cAAc,4DAA4D;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB,iBAAiB,kCAAkC;AACnD,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,sCAAsC;AACnD,aAAa,wCAAwC;AACrD,aAAa,OAAO;AACpB,aAAa,sFAAsF;AACnG,cAAc,OAAO;AACrB;AACA;AACA;;AAEA;AACA,cAAc,oCAAoC;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA,2BAA2B,8BAA8B;AACzD,6BAA6B,UAAU;AACvC;AACA;AACA;;AAEA;AACA,aAAa,sCAAsC;AACnD,aAAa,wCAAwC;AACrD,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,kCAAkC;AAC/C,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA,sBAAsB,UAAU,yBAAyB,UAAU;AACnE,MAAM,MAAM,QAAQ,SAAS;AAC7B;AACA,sBAAsB,UAAU;AAChC;AACA;AACA;AACA,yBAAyB,UAAU;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA,wDAAwD,KAAW;AACnE;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD,aAAa,oCAAoC;AACjD;AACA;AACA;AACA;AACA;AACA,iBAAiB,oCAAoC;AACrD,iBAAiB,qCAAqC;AACtD,iBAAiB,wCAAwC;AACzD;AACA;AACA,4BAA4B,MAAM;AAClC;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA,mBAAmB,gDAAgD;AACnE;AACA;AACA;;AAEA;AACA,aAAa,oEAAoE;AACjF,aAAa,oCAAoC;AACjD,aAAa,OAAO;AACpB,aAAa,kCAAkC;AAC/C;AACA;AACA;AACA;AACA,wBAAwB,MAAM;AAC9B;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,wCAAwC;AACrD,aAAa,oCAAoC;AACjD,aAAa,0CAA0C;AACvD,aAAa,OAAO;AACpB,aAAa,wCAAwC;AACrD,aAAa,8BAA8B;AAC3C,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,iDAAiD;AAC9D,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,MAAM;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,eAAe;AACpC;AACA;AACA,8BAA8B,qBAAqB;AACnD,gCAAgC,qBAAqB;AACrD;AACA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,aAAU;;AAEG,sEAAa,EAAC;;AAE7B,iC;;ACtPA;AACA;AACA;AACuC;AACgD;AAC/C;AACQ;AACQ;AACF;AACiB;AAC/B;AAC2E;;AAEnH;AACA;AACA;AACA,IAAI,yBAAmB;AACvB;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,sBAAsB,MAAe;;AAErC;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,2CAA2C;AACxD,aAAa,iCAAiC;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,UAAU;AAC5B,mBAAmB,WAAW;AAC9B,sBAAsB,cAAc;AACpC,qBAAqB,aAAa;;AAElC,IAAI,KAAc;AAClB,IAAI,KAAc;AAClB,IAAI,KAAc;AAClB,IAAI,KAAc;;AAElB;AACA,IAAI,cAAc;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,cAAc;AAClB;;AAEA;AACA,aAAa,4CAA4C;AACzD,aAAa,yBAAyB;AACtC,aAAa,2CAA2C;AACxD,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,cAAc;AACpB;AACA;AACA,uBAAuB,SAAuB;AAC9C;AACA;AACA,6BAA6B,YAAW;AACxC;AACA;AACA,MAAM,cAAc;AACpB;AACA;;AAEA;AACA,aAAa,yCAAyC;AACtD,aAAa,2CAA2C;AACxD,aAAa,OAAO;AACpB,aAAa,6FAA6F;AAC1G;AACA,aAAa,EAAE;AACf,cAAc,YAAY;AAC1B;AACA;AACA;AACA,2FAA2F,IAAI;;AAE/F;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,2CAA2C;AACxD,aAAa,qCAAqC;AAClD,aAAa,wCAAwC;AACrD;AACA;AACA;AACA,+BAA+B,gBAAe;AAC9C;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,2CAA2C;AACxD,aAAa,wCAAwC;AACrD;AACA;AACA;AACA,+BAA+B,gBAAe;AAC9C;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,2CAA2C;AACxD,aAAa,wCAAwC;AACrD;AACA;AACA;AACA,+BAA+B,gBAAe;AAC9C;;AAEA;AACA,aAAa,2CAA2C;AACxD,aAAa,OAAO;AACpB;AACA,cAAc,wCAAwC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAgB;AAC3B;;AAEA;AACA;AACA,aAAa,2CAA2C;AACxD,aAAa,qCAAqC;AAClD,aAAa,yBAAyB;AACtC;AACA;AACA,IAAI,aAAQ;AACZ;;AAEA;AACA;AACA,aAAa,2CAA2C;AACxD,aAAa,qCAAqC;AAClD,cAAc,QAAQ;AACtB;AACA;AACA,WAAW,aAAQ;AACnB;;AAEA;AACA,CAAC,CAAC,cAAa;;AAEA,0EAAmB,EAAC;;AAEnC,iC;;AChMA;AACA;AACA;AACuC;AACsB;AACV;AACQ;AACd;AACyC;;AAEtF;AACA;AACA;AACA,IAAI,6CAA0B;AAC9B;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA,4CAA4C,MAAe;;AAE3D;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,UAAU,iBAAU;AACpB;AACA,kDAAkD,iCAAiC;AACnF;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,cAAc,oDAAoD;AAClE;AACA;AACA,WAAW,aAAQ;AACnB;;AAEA;AACA;AACA,cAAc,wCAAwC;AACtD;AACA;AACA,WAAW,aAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB,KAAc;AAC9B,IAAI,gBAAe;;AAEnB;AACA,+BAA+B,qBAAqB;AACpD;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,CAAC,CAAC,YAAmB;;;AAGN,oGAA0B,EAAC;;AAE1C,8C;;AClIA;AACA;AACA;AACkE;AACnB;AACJ;AACF;AACH;AACwC;AACf;AAC3B;AACe;AACc;AACyB;;AAE1F;AACA;AACA;AACA;AACA;AACA,IAAI,mCAAwB;AAC5B;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,2BAA2B,MAAe;;AAE1C;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA,iCAAiC,SAAS;AAC1C,2BAA2B,yBAAyB,QAAQ,QAAQ;AACpE,mBAAmB,yBAAyB;AAC5C;AACA,4CAA4C,mCAAmC;AAC/E;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC,uCAAuC;AACvE,iCAAiC,wCAAwC;;AAEzE;;AAEA;AACA;AACA;AACA,uBAAuB,eAAe;AACtC;;AAEA,eAAe,QAAQ,sBAAsB,QAAQ;AACrD,SAAS,cAAO;AAChB;AACA,WAAW,0BAA0B;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,2CAA2C,KAAK,UAAM,GAAG;AAClG;AACA,YAAY,QAAQ;AACpB,YAAY,SAAS;AACrB;AACA,gCAAgC,8BAA8B,KAAK,UAAM,GAAG;AAC5E;AACA,WAAW;AACX,SAAS;AACT;AACA,oBAAoB,cAAW;AAC/B;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAgB;AACtC;AACA;AACA;AACA;AACA;AACA,MAAM,iBAAgB;AACtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,CAAC,CAAC,kBAA0B;;;AAG5B;AACA;AACA,WAAW,uCAAuC;AAClD,YAAY,QAAQ;AACpB;AACA,mCAAwB;AACxB,6BAA6B,SAAS;AACtC,wBAAwB,SAAS;AACjC,eAAe,wCAAwC,gCAAgC,gBAAgB;AACvG;;;AAGA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uCAAuC;AAClD,YAAY,yBAAyB;AACrC;AACA,mCAAwB;AACxB,aAAa,mCAAwB,YAAY,uCAAuC;AACxF;;;AAGe,kFAAwB,EAAC;;AAExC,sC;;AC3NA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;;AAEA;AACA,YAAY;AACZ;AACA;;AAEA;AACA,YAAY;AACZ;AACA;;AAEA;AACA,YAAY;AACZ;AACA;;AAEA;;AAEA;AACA,WAAW,mCAAmC;AAC9C,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA,YAAY,yBAAyB;AACrC;AACA;AACA;AACA;;AAEA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA,WAAW,UAAU;AACrB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,YAAY,UAAU;AACtB;AACO,SAAS,wBAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGe,0DAAS,EAAC;;AAEzB,qC;;AC7IA;AACA;AACA;AACqC;AACM;AACA;AACA;AACF;AACU;AAC2C;AAC7B;AACyB;;AAE1F;AACA;AACA;AACA;AACA;AACA,IAAI,iCAAuB;AAC3B;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA,0CAA0C,qBAAqB;;AAE/D;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,qBAAqB,WAAW;;AAEhC;AACA;AACA,cAAc;AACd;AACA,6BAA6B,YAAS;;AAEtC;AACA;AACA,cAAc;AACd;AACA,2BAA2B,MAAe;;AAE1C;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,gCAAgC;AAC7C,cAAc,QAAQ;AACtB;AACA;AACA,+BAA+B,sCAAsC;AACrE;AACA;AACA,wBAAwB,SAAS;AACjC,qBAAqB,SAAS;AAC9B,qBAAqB,SAAS;AAC9B;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,2CAA2C;AACxD,cAAc,iCAAiC;AAC/C;AACA;AACA,+BAA+B,sCAAsC;AACrE,gCAAgC,uCAAuC;AACvE;AACA,2BAA2B,SAAS;AACpC;AACA;AACA,sBAAsB,SAAS;AAC/B,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,+BAA+B,sCAAsC;AACrE,gCAAgC,uCAAuC;AACvE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,eAAe;AAC9B;AACA,QAAQ,cAAO;AACf;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;;AAEA;AACA,uCAAuC,QAAQ,qBAAqB,QAAQ;;AAE5E;AACA;AACA;AACA;AACA,4BAA4B,qBAAqB;AACjD,8BAA8B,qBAAqB;AACnD;AACA;AACA;AACA;AACA;AACA,oBAAoB,MAAM;AAC1B,iCAAiC,SAAS;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,oCAAoC,cAAc;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,wCAAwC,aAAM;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,iBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA,IAAI,iBAAgB;AACpB;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,aAAa,gCAAgC;AAC7C,aAAa,2CAA2C;AACxD,aAAa,qCAAqC;AAClD,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,MAAM;AACpB;AACA,+BAA+B,sCAAsC;AACrE,gCAAgC,uCAAuC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,gCAAgC;AAC7C,cAAc,oDAAoD;AAClE;AACA;AACA;AACA,sBAAsB,qCAAqC;AAC3D;;AAEA;AACA,CAAC,CAAC,kBAA0B;;;AAG5B;AACA;AACA,WAAW,uCAAuC;AAClD,YAAY,QAAQ;AACpB;AACA,iCAAuB;AACvB,6BAA6B,SAAS;AACtC;;;AAGA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uCAAuC;AAClD,YAAY,wBAAwB;AACpC;AACA,iCAAuB;AACvB,aAAa,iCAAuB,YAAY,sCAAsC;AACtF;;;AAGA;AACA;AACA,YAAY;AACZ;AACA,iCAAuB;;;AAGR,sFAAuB,EAAC;;AAEvC,qC;;;;;;ACnZA;AACA;AACA;AACoC;;AAEpC;AACA;AACA;AACA,IAAI,uBAAW;;AAEf,uBAAW;AACX,SAAS,aAAQ;AACjB;;AAEA;AACA;AACA,YAAY,QAAQ;AACpB;AACA,uBAAW;AACX,SAAS,aAAQ;AACjB;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA,uBAAW;AACX,SAAS,aAAQ;AACjB;;AAEe,8EAAW,EAAC;;AAE3B,uC;;ACjCA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;AAEF,sC;;AChBA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA,+BAA+B,SAAS;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA,kC;;AC1CA;AACA;AACA;AACmC;;;AAGnC;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,wBAAwB;AACnC;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,gBAAgB;AAC5B;AACA;AACO;AACP;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,cAAc;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,IAAI;AAChB,YAAY,IAAI;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oC;;AC7FA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,UAAU;AACV;AACO,IAAI,2BAAe;;;AAG1B;AACA,UAAU;AACV;AACO,IAAI,6BAAiB;;;AAG5B;AACA,UAAU;AACV;AACO;;;AAGP;AACA,UAAU;AACV;AACO;;;AAGQ,kEAAW,EAAC;;AAE3B,uC;;AClDA;AACA;AACA;AACyC;;;AAGzC;AACA;AACA,UAAU;AACV;AACO;AACP,EAAE,UAAU;AACZ,EAAE,UAAU;AACZ,EAAE,UAAU;AACZ,EAAE,UAAU;AACZ,EAAE,UAAU;AACZ,EAAE,UAAU;AACZ;;AAEA;AACA;AACA,UAAU;AACV;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kC;;ACpCA;AACA;AACA;AACqC;AACkB;AACR;AAEqC;AAC5B;AACF;AAC+D;AAC1D;AACA;AACF;AACX;AACT;AACW;AAGO;AACN;AACT;AAMZ;;;AAG5B;AACA,UAAU;AACV;AACA,IAAI,gBAAS,GAAG,WAAW;;;AAG3B;AACA,UAAU;AACV;AACA,IAAI,mBAAY,GAAG,MAAe;;;AAGlC,IAAI,mBAAY;AAChB;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,8BAA8B,MAAe;;AAE7C;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,4BAA4B,uCAAuC,OAAO;;AAE1E;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,yCAAyC;AACtD,aAAa,yCAAyC;AACtD,aAAa,yCAAyC;AACtD,aAAa,yCAAyC;AACtD,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,oDAAoD;AACjE,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,sCAAsC;AACnD,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,QAAQ;AACrB,aAAa,OAAO;AACpB,aAAa,cAAc;AAC3B,aAAa,SAAS;AACtB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,yCAAyC;AACxD;AACA,eAAe,yCAAyC;AACxD;AACA,eAAe,yCAAyC;AACxD;AACA,eAAe,yCAAyC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,iBAAgB,CAAC,mBAAY;;AAE/C,MAAM,mBAAmB,CAAC,gBAAS;AACnC,MAAM,gBAAgB,CAAC,gBAAS,EAAE,KAAc,CAAC,mBAAY;AAC7D,MAAM,gBAAgB,CAAC,gBAAS,EAAE,KAAc,CAAC,mBAAY;AAC7D,MAAM,gBAAgB,CAAC,gBAAS,EAAE,KAAc,CAAC,mBAAY;AAC7D,MAAM,gBAAgB,CAAC,gBAAS,EAAE,KAAc,CAAC,mBAAY;AAC7D,KAAK;AACL,MAAM,cAAc,uCAAuC,gBAAS;AACpE;AACA;AACA;AACA;AACA,QAAQ,gBAAS,uCAAuC,gBAAS;AACjE,QAAQ,gBAAS,wCAAwC,gBAAS;;AAElE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM,aAAM,iBAAiB,gBAAS;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,qBAAqB,SAAS;AAC9B,qBAAqB,SAAS;AAC9B;AACA,MAAM,SAAS;AACf;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA,cAAc,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6BAA6B,SAAS;AACtC;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,sBAAsB,YAAY;AACzC;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,cAAc;AAC3B,cAAc,OAAO;AACrB;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,YAAY;AAC5B,4BAA4B,6CAA6C;AACzE;AACA;AACA;AACA;AACA,wCAAwC,QAAQ;AAChD;AACA;AACA;AACA;AACA,8BAA8B,kBAAiB;AAC/C,sDAAsD,4BAA4B;AAClF,KAAK,kBAAkB,YAAY,oBAAoB,YAAY;AACnE;AACA,iCAAiC,YAAY;AAC7C,mBAAmB,wCAAwC;AAC3D;AACA;AACA,mBAAmB,wFAAwF;AAC3G;AACA,8BAA8B,kBAAiB;AAC/C,qDAAqD,uBAAuB;AAC5E,KAAK,kBAAkB,YAAY,wBAAwB,YAAY;AACvE;AACA;AACA;AACA,8BAA8B,kBAAiB;AAC/C,oDAAoD,kBAAkB;AACtE,KAAK,kBAAkB,YAAY;AACnC;AACA;AACA;AACA,8BAA8B,kBAAiB;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,yEAAyE;AACtF,aAAa,mEAAmE;AAChF;AACA;AACA,uCAAuC,kBAAiB;AACxD;AACA,uCAAuC,kBAAiB;AACxD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,yBAAyB;AACtC;AACA;AACA;AACA,mBAAmB,KAAc;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,cAAc;AACxD;AACA;;AAEA;AACA;AACA,aAAa,yBAAyB;AACtC,aAAa,SAAS;AACtB;AACA;AACA,qCAAqC,uCAAuC;AAC5E,mCAAmC,OAAO;AAC1C,iCAAiC,cAAc;AAC/C,kCAAkC,eAAe;AACjD,oCAAoC,OAAO;AAC3C,QAAQ,gBAAgB;AACxB,0CAA0C,OAAO;AACjD,qCAAqC,cAAc;AACnD;AACA;;AAEA;AACA,aAAa,sCAAsC;AACnD,aAAa,mEAAmE;AAChF;AACA;AACA;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D;AACA,2BAA2B,OAAO;AAClC,2BAA2B,OAAO;AAClC,2BAA2B,OAAO;AAClC,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA,qDAAqD,QAAQ;AAC7D,2CAA2C,MAAM;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA,QAAQ,mBAAmB;AAC3B;AACA;AACA;;AAEA;AACA;AACA,aAAa,yBAAyB;AACtC,aAAa,uCAAuC;AACpD,aAAa,wBAAwB;AACrC;AACA,aAAa,SAAS;AACtB,aAAa,QAAQ;AACrB,aAAa,4FAA4F;AACzG,aAAa,kCAAkC;AAC/C;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA,kCAAkC,MAAM;AACxC;AACA,KAAK;AACL;AACA;AACA;AACA,yBAAyB,WAAW;AACpC;AACA;AACA,MAAM,YAAqB;AAC3B;AACA,wBAAwB,WAAO;AAC/B,cAAc;AACd,iCAAiC;AACjC,cAAc;AACd,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,gCAAgC;AAC3D;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,mBAAmB,mEAAmE;AACtF;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA,aAAa,kBAAiB;AAC9B,+BAA+B,mEAAmE;AAClG,mDAAmD,MAAM;AACzD,2BAA2B,OAAO;AAClC,WAAW,0CAA0C,iBAAU;AAC/D;AACA,2BAA2B,OAAO;AAClC,WAAW;AACX;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B,yBAAyB,OAAO;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B,yBAAyB,OAAO;AAChC;AACA,oCAAoC,+CAA+C;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B,yBAAyB,OAAO;AAChC,0BAA0B,OAAO;AACjC,6BAA6B,oDAAoD;AACjF;AACA;AACA,+BAA+B,OAAO;AACtC,+BAA+B,OAAO;AACtC,+DAA+D,sCAAsC;AACrG,kCAAkC,OAAO;AACzC,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C,mCAAmC,OAAO;AAC1C,0CAA0C,QAAQ;AAClD,oCAAoC,OAAO;AAC3C,iCAAiC,OAAO;AACxC,iCAAiC,OAAO;;AAExC;AACA;AACA,iCAAiC,cAAc;AAC/C,wCAAwC,QAAQ;AAChD,0CAA0C,QAAQ;AAClD,WAAW;AACX,sBAAsB,cAAc;AACpC;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA,0CAA0C,SAAS;AACnD,4CAA4C,SAAS;AACrD;AACA;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B,iCAAiC,OAAO;AACxC,+BAA+B,OAAO;AACtC,oCAAoC,OAAO;AAC3C,+DAA+D,sCAAsC;AACrG,oCAAoC,OAAO;AAC3C,mCAAmC,OAAO;AAC1C,oCAAoC,OAAO;AAC3C,mCAAmC,wBAAwB;AAC3D,mCAAmC,OAAO;AAC1C,qCAAqC,OAAO;AAC5C,uCAAuC,OAAO;AAC9C,gCAAgC,OAAO;AACvC,mCAAmC,OAAO;AAC1C,qCAAqC,OAAO;;AAE5C,2BAA2B,gBAAgB;AAC3C;AACA;AACA,uBAAuB,kCAAkC;AACzD,wCAAwC,EAAE;AAC1C;AACA,qDAAqD,UAAU;AAC/D,wBAAwB,cAAc;AACtC;AACA;AACA;AACA;AACA,8CAA8C,QAAQ;AACtD,kCAAkC;AAClC,qCAAqC,OAAO;AAC5C;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA,+BAA+B,OAAO,0BAA0B,OAAO;AACvE;AACA,+BAA+B,OAAO;AACtC,oBAAoB,cAAc;AAClC;AACA;AACA;AACA,8CAA8C,QAAQ;AACtD,kCAAkC;AAClC,qCAAqC,OAAO;AAC5C;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA,+BAA+B,OAAO,0BAA0B,OAAO;AACvE;AACA,+BAA+B,OAAO;AACtC,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B;AACA,iCAAiC,mEAAmE;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B,yBAAyB,OAAO;AAChC,0BAA0B,OAAO;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAiB;AAC9B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC,uCAAuC;AAChF;AACA;AACA,aAAa,kBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA,aAAa,kBAAiB;AAC9B;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,uCAAuC;AACpD,aAAa,OAAO;AACpB,aAAa,wBAAwB;AACrC;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,uCAAuC;AACpD,aAAa,OAAO;AACpB,aAAa,wBAAwB;AACrC;AACA,aAAa,mFAAmF;AAChG;AACA,aAAa,kCAAkC;AAC/C;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,wBAAwB,kBAAkB;AAC1C,kBAAkB,kBAAiB;AACnC;AACA,OAAO,kBAAkB,kBAAiB;AAC1C;AACA,QAAQ,eAAe;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW;AACnC,yBAAyB,gBAAgB;AACzC,KAAK;AACL;AACA;AACA;AACA;AACA,0BAA0B,WAAW;AACrC,2BAA2B,kBAAkB;AAC7C;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA,sCAAsC,eAAe;AACrD;AACA;AACA,oCAAoC,qBAAqB;AACzD;AACA;AACA,8BAA8B,eAAe;AAC7C;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;AACA,gCAAgC,iBAAiB;;AAEjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,uCAAuC;AACpD,aAAa,yEAAyE;AACtF,cAAc,SAAS;AACvB;AACA;AACA;AACA,eAAe,SAAS;AACxB,2BAA2B,kBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;;AAEA;AACA,aAAa,uCAAuC;AACpD,cAAc,SAAS;AACvB;AACA;AACA;AACA,MAAM,kBAAiB;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,uCAAuC;AACpD,aAAa,yJAAyJ;AACtK,aAAa,yEAAyE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,uCAAuC;AACpD,aAAa,oEAAoE;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,MAAM;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,yEAAyE;AACtF,aAAa,mEAAmE;AAChF;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,kBAAiB;AACnD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA;AACA;AACA,gCAAgC,YAAK;AACrC;AACA;AACA,QAAQ,MAAM;AACd;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,oBAAa;;;AAGA,8DAAY,EAAC;;AAE5B,kC;;AChkCA;AACA;AACA;AACiD;AACV;;AAEvC,IAAI,6BAAiB;AACrB;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kBAAiB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kBAAiB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kBAAiB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kBAAiB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,sCAAsC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,MAAY;;;AAGC,6EAAiB,EAAC;;AAEjC,uC;;ACvNA;AACA;AACA;AAC4F;AACrD;;AAEvC,IAAI,uCAAsB;AAC1B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA,mCAAmC,kBAAiB;AACpD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kBAAiB;AACvB;AACA;AACA,OAAO,oBAAoB;AAC3B;AACA;AACA;AACA,uCAAuC,6BAAiB;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,kBAAiB;AACvB;AACA;AACA,OAAO,oBAAoB;AAC3B;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA,uCAAuC,6BAAiB;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,6BAAiB;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6BAA6B,6BAAiB;AAC9C;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C;;AAEA;AACA,CAAC,CAAC,MAAY;;;AAGC,4FAAsB,EAAC;;AAEtC,4C;;ACpHA;AACA;AACA;AACwC;AACS;AACH;AAGpB;AACa;;;AAGvC,IAAI,iCAAmB;AACvB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB,aAAa,cAAc;AAC3B,aAAa,OAAO;AACpB;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oBAAoB;AAC/C,uCAAuC,oBAAoB;AAC3D,mBAAmB,aAAa;AAChC;AACA;AACA;AACA,qCAAqC,kBAAiB;AACtD;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD,2CAA2C,oBAAoB;AAC/D;AACA;AACA;AACA;AACA,6BAA6B,2BAAe;AAC5C,yCAAyC,2BAAe;AACxD;AACA;AACA,6BAA6B,6BAAiB;AAC9C,yCAAyC,6BAAiB;AAC1D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,kBAAiB;AACzB,QAAQ,QAAQ,CAAC,gBAAgB;AACjC;AACA;AACA;AACA;AACA,QAAQ,kBAAiB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,kBAAiB;AAC9C,2BAA2B,oBAAoB;AAC/C,uCAAuC,oBAAoB;AAC3D,uCAAuC,2BAAe;AACtD;AACA,6BAA6B,2BAAe;AAC5C;AACA;AACA,6BAA6B,6BAAiB;AAC9C,yCAAyC,6BAAiB;AAC1D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,kBAAiB;AACzB,QAAQ,QAAQ,CAAC,gBAAgB;AACjC;AACA;AACA;AACA;AACA,QAAQ,kBAAiB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,kBAAiB;AACzB,QAAQ,QAAQ,CAAC,gBAAgB;AACjC;AACA;AACA;AACA;AACA,QAAQ,kBAAiB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,QAAQ;AACtD,yBAAyB,IAAI;AAC7B;AACA;AACA;;AAEA;AACA;AACA,aAAa,yEAAyE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,MAAY;;;AAGC,mFAAmB,EAAC;;AAEnC,yC;;ACrNA;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,cAAc;AAC1B;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yC;;ACpDA;AACA;AACA;;AAEA;AACA;AACA,sDAAsD,2CAA2C;AACjG,IAAI,qCAAqC,GAAG,qDAAqD;AACjG,IAAI,+CAA+C;AACnD,UAAU;AACV;AACe;AACf;AACA;AACA,CAAC,EAAC;;AAEF,yC;;AChBA;AACA;AACA;AACqC;AACU;AACI;AACR;AACoB;AACT;AACR;AACkQ;AAC/P;AACV;AACC;AACiB;;AAEzD,IAAI,2BAAgB;AACpB;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,iCAAiC,iCAAiC,OAAO;;AAEzE;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA,IAAI,UAAU;;AAEd;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gCAAgC,aAAa;AAC7C,WAAW,iBAAU;AACrB;AACA;AACA;AACA;AACA;AACA,0BAA0B,YAAY;AACtC;AACA,OAAO,0BAA0B,YAAY;AAC7C;AACA,OAAO,0BAA0B,YAAY;AAC7C;AACA,OAAO,0BAA0B,YAAY;AAC7C;AACA;AACA,sCAAsC,QAAQ;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA,sBAAsB,aAAa;AACnC;AACA;AACA,SAAS;AACT;AACA;AACA,4BAA4B,aAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAK;AACL;AACA;AACA;AACA,aAAa,YAAY;AACzB,aAAa,YAAY;AACzB;AACA;AACA;AACA,aAAa,YAAY;AACzB,uCAAuC,2CAA2C;AAClF;AACA,aAAa,YAAY;AACzB,uCAAuC,uCAAuC;AAC9E;AACA,aAAa,YAAY;AACzB,uCAAuC,gDAAgD;AACvF;AACA;AACA,aAAa,YAAY;AACzB,uCAAuC,wCAAwC;AAC/E;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB,0CAA0C,6CAA6C;AACvF;AACA,iDAAiD,QAAQ;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;;AAEA,SAAS,UAAU;AACnB;AACA;AACA;AACA;AACA;AACA,kBAAkB,UAAU,wBAAwB,gBAAgB;AACpE;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA,MAAM,UAAU;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,cAAc;AACnD,sCAAsC,eAAe;AACrD;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;;AAEA;AACA;AACA,aAAa,kBAAkB;AAC/B,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU,wBAAwB,gBAAgB;AAClE,mBAAmB,UAAU;AAC7B;;AAEA;AACA;AACA,4BAA4B,kBAAiB;AAC7C;AACA;AACA;AACA,2BAA2B,cAAc;AACzC,QAAQ,cAAc;AACtB;AACA,SAAS;AACT;AACA;AACA,wCAAwC,kBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,sCAAsC;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kDAAkD,mCAAmC;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,kDAAkD,iCAAiC;AACnF;AACA,0CAA0C,gBAAgB;AAC1D;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,8CAA8C,iCAAiC;AAC/E;AACA,SAAS;AACT;AACA;;AAEA;AACA,mBAAmB,UAAU;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,kBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA,OAAO;AACP;AACA;AACA,wCAAwC,kBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,wCAAwC,sCAAsC;;AAE9E;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,uDAAuD,iCAAiC,OAAO;AAC/F;AACA,8BAA8B,WAAW;AACzC,sCAAsC,gBAAgB;AACtD;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,2DAA2D,mCAAmC,OAAO;AACrG;AACA;AACA;AACA;AACA;AACA,8DAA8D,cAAc;AAC5E,6DAA6D,eAAe;AAC5E;AACA,2CAA2C,qBAAqB;AAChE,gEAAgE,eAAe;AAC/E;AACA,sCAAsC,gBAAgB;AACtD;AACA,uCAAuC,iBAAiB;AACxD,kCAAkC,WAAW;AAC7C,wCAAwC,kBAAkB;AAC1D;;AAEA;AACA,wCAAwC,WAAW;AACnD,MAAM,SAAS;AACf;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,mBAAmB;AACjF;AACA;AACA,oDAAoD,cAAc;AAClE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gFAAgF,MAAM;AACtF;AACA;AACA;AACA;AACA;AACA,+EAA+E,MAAM;AACrF;AACA;AACA;;AAEA;AACA,CAAC,CAAC,MAAY;;;AAGd;AACA,WAAW,OAAO;AAClB,WAAW,cAAc;AACzB,WAAW,cAAc;AACzB;AACA,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA,iBAAiB,cAAc;AAC/B,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;;;AAGe,0EAAgB,EAAC;;AAEhC,sC;;AC3hBA;AACA;AACA;;AAEyD;AACN;AACmB;AACb;AACpB;AACO;AACF;AACH;AACU;AACU;AACN;AACN;AACZ;AACuD;;;AAG1F;AACA,UAAU;AACV;AACA;AACA,YAAY,aAAmB;AAC/B,aAAa,MAAY;AACzB,WAAW,WAAiB;AAC5B,gBAAgB,gBAAsB;AACtC,aAAa,aAAmB;AAChC,UAAU,UAAgB;AAC1B;;;AAGA,IAAI,6BAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,gCAAgC,qBAAqB;;AAErD;AACA;AACA,cAAc;AACd;AACA,kCAAkC,MAAe;AACjD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B,OAAO;AACP,2CAA2C,WAAW;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,uCAAuC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,kBAAkB;AAC/B,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,yCAAyC;AACtD,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,wBAAwB;AACrC,aAAa,kFAAkF;AAC/F,aAAa,sDAAsD;AACnE,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,iBAAgB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;AACA,kBAAkB,WAAW;AAC7B,MAAM,gBAAgB;AACtB,MAAM,MAAM;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;;AAEA;AACA,eAAe,mEAAmE;AAClF,gBAAgB,EAAE;AAClB;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA,0DAA0D,UAAU,wBAAwB,UAAU;AACtG;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,cAAc;AAC7B;AACA,YAAY,yBAAyB;;AAErC;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA,eAAe,KAAK,YAAY,QAAQ;AACxC,qBAAqB,KAAK;AAC1B;AACA;AACA;AACA,6BAA6B,UAAU,wBAAwB,UAAU;AACzE;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,uCAAuC;AACpD,cAAc,cAAc;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,iDAAiD;AAC/D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,WAAO;AAClB;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,uCAAuC;AACpD,aAAa,OAAO;AACpB,aAAa,wBAAwB;AACrC,aAAa,QAAQ;AACrB,aAAa,mBAAmB;AAChC,qBAAqB;AACrB,aAAa,uDAAuD;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,cAAc;AAC7B;AACA,YAAY,yBAAyB;;AAErC;AACA;AACA;AACA;;AAEA,0DAA0D,KAAK;AAC/D;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;AACA,6BAA6B,UAAU,wBAAwB,UAAU;AACzE;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,CAAC,CAAC,kBAAW;;;AAGb;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,kCAAkC;AAC7C,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA,GAAG;AACH,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,kCAAkC;AAC/C;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,eAAe;AAChC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA,WAAW,0BAA0B;AACrC,WAAW,yBAAyB;AACpC,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACO;AACP,0DAA0D,yBAAyB;AACnF;AACA,iCAAiC,QAAQ;AACzC;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;;;AAGe,oFAAiB,EAAC;;AAEjC,uC;;ACtfA;AACA;AACA;AACkC;AACQ;AACS;AACF;;;AAGjD;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C,YAAY,OAAO;AACnB;AACO;AACP,kBAAkB,MAAM,2BAA2B,MAAM;AACzD;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C,WAAW,gCAAgC;AAC3C;AACA;AACA;AACA;AACA;AACA,gEAAgE,UAAU;AAC1E;AACA;AACA;AACA;AACA;AACA,8DAA8D,UAAU;AACxE;AACA;AACA;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C,WAAW,OAAO;AAClB,WAAW,wDAAwD;AACnE,WAAW,EAAE;AACb,YAAY,QAAQ;AACpB;AACA;AACO;AACP;AACA;AACA;AACA;AACA,sBAAsB,UAAU,yBAAyB,UAAU;AACnE;AACA,KAAK;AACL,wBAAwB,UAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,6EAA6E;AACxF,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C;AACA;AACA,4BAA4B,YAAY;AACxC,gCAAgC,gDAAgD;AAChF,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA,wDAAwD,UAAU;AAClE,+BAA+B,4CAA4C;AAC3E;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,gDAAgD;AAC3D,WAAW,oCAAoC;AAC/C,WAAW,gCAAgC;AAC3C;AACA;AACA;AACA;AACA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,+EAA+E;AAC1F,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C;AACA;AACA;AACA;AACA,oEAAoE,UAAU;AAC9E;AACA;AACA;AACA;AACA;AACA,8DAA8D,UAAU;AACxE;AACA;AACA;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,oFAAoF;AAC/F,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C;AACA;AACA;AACA;AACA,oEAAoE,UAAU;AAC9E;AACA;AACA;AACA;AACA;AACA,8DAA8D,UAAU;AACxE;AACA;AACA;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,0CAA0C;AACrD,WAAW,oCAAoC;AAC/C,WAAW,gCAAgC;AAC3C;AACA;AACA;AACA;AACA;AACA,iEAAiE,UAAU;AAC3E;AACA;AACA;AACA;AACA;AACA,8DAA8D,UAAU;AACxE;AACA;AACA;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,0EAA0E;AACrF,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA,+DAA+D,UAAU;AACzE;AACA;AACA;AACA;AACA;AACA,8DAA8D,UAAU;AACxE;AACA;AACA;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,+EAA+E;AAC1F,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C;AACA;AACA;AACA;AACA,sCAAsC,UAAU;AAChD;AACA;AACA,+DAA+D,UAAU;AACzE;AACA;AACA;AACA;AACA;AACA,8DAA8D,UAAU;AACxE;AACA;AACA;AACA;;;AAGA;AACA,WAAW,2CAA2C;AACtD,WAAW,4EAA4E;AACvF,WAAW,oCAAoC;AAC/C,WAAW,oCAAoC;AAC/C;AACA;AACA;AACA;AACA;AACA,iEAAiE,UAAU;AAC3E;AACA;AACA;AACA;AACA;AACA,8DAA8D,UAAU;AACxE;AACA;AACA;AACA;;AAEA,kC;;AC7TA;AACA;AACA;AACqC;AACM;AACF;AACU;AACF;AACC;AACxB;AACoD;AACtB;AACU;AACC;AACtB;AACwH;;AAErK;AACA;AACA;AACA;AACA;AACA,IAAI,qCAAyB;AAC7B;;AAEA;;AAEA;AACA;AACA;AACA;AACA,uDAAuD,eAAK;;AAE5D;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,2BAA2B,WAAW;;AAEtC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA,cAAc;AACd;AACA,mBAAmB,qBAAqB;;AAExC,IAAI,MAAM,CAAC,UAAU,EAAE,SAAS;;AAEhC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,QAAQ,CAAC,UAAU,EAAE,SAAS;AAClC;AACA;;AAEA;AACA,aAAa,yBAAyB;AACtC,aAAa,2CAA2C;AACxD,aAAa,qCAAqC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,yCAAyC;;AAE3E;;AAEA;AACA;AACA;AACA;AACA,gDAAgD,iCAAiC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,wCAAwC;AACrE;AACA;AACA;AACA;AACA,iDAAiD,gBAAe;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,QAAQ,yBAAyB,QAAQ;AAC7E;AACA;AACA,MAAM,cAAc;AACpB;AACA;AACA;AACA,WAAW,cAAc;AACzB;AACA,yBAAyB,QAAQ;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,cAAc;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,6BAA6B,wCAAwC;AACrE,iBAAiB,yBAAyB;AAC1C;AACA,kHAAkH;AAClH;AACA,mBAAmB,uCAAuC;AAC1D,oBAAoB,EAAE;AACtB;AACA;AACA,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iCAAiC,wCAAwC;AACzE,kCAAkC,yCAAyC;;AAE3E,yCAAyC,QAAQ;AACjD,2CAA2C,QAAQ;AACnD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,YAAkB;AACjD;;AAEA,iBAAiB,MAAM;AACvB;AACA;;AAEA;AACA,SAAS,cAAc;AACvB;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ;AAC/B,4BAA4B,QAAQ;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ,cAAc;AACtB;AACA;AACA;;AAEA;;AAEA;;AAEA,0BAA0B,kBAAiB;AAC3C,MAAM,YAAkB;AACxB;AACA;AACA;AACA,eAAe,mCAAmC;AAClD,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,iBAAiB,0CAA0C;AAC3D;AACA;AACA;AACA,mBAAmB,mCAAmC;AACtD;AACA;AACA;AACA,SAAS;AACT;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,mCAAmC;AAChD,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,qFAAqF;AAClG,aAAa,qDAAqD;AAClE,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD,kBAAkB,aAAa;AAC/B;AACA,UAAU,mBAAyB;AACnC;AACA;AACA,KAAK;AACL,gBAAgB,aAAa;AAC7B;AACA,QAAQ,mBAAyB;AACjC;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,YAAmB;;;AAGrB;AACA;AACA,WAAW,uCAAuC;AAClD,YAAY,QAAQ;AACpB;AACA,qCAAyB;AACzB,6BAA6B,SAAS;AACtC;;;AAGA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uCAAuC;AAClD,YAAY,0BAA0B;AACtC;AACA,qCAAyB;AACzB,aAAa,qCAAyB,YAAY,wCAAwC;AAC1F;;;AAGe,qFAAyB,EAAC;;AAEzC,uC;;ACxbA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe;AACf;AACA;AACA;AACA,CAAC,EAAC;;AAEF,gD;;ACvBA;AACA;AACA;AACqC;AACM;AACA;AACF;AACU;AACF;AACC;AACxB;AACkF;AACrC;AACN;AACzB;AACY;AACc;AACoB;AACzC;AACQ;AACwC;AAOjE;;;AAG5B;AACA,UAAU;AACV;AACA;AACA,YAAY,UAAU,UAAU,UAAU;AAC1C,IAAI,UAAU,cAAc,UAAU,QAAQ,UAAU;AACxD,aAAa,UAAU,UAAU,UAAU;AAC3C;;;AAGA;AACA,UAAU;AACV;AACA;AACA,YAAY,UAAU;AACtB,aAAa,UAAU,QAAQ,UAAU,OAAO,UAAU;AAC1D,YAAY,KAAK;AACjB;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI,6CAA6B;AACjC;;AAEA;;AAEA;AACA;AACA;AACA;AACA,iDAAiD,eAAK;;AAEtD;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,yBAAyB,MAAe;;AAExC;;AAEA;AACA,qCAAqC,oBAAoB;;AAEzD,uBAAuB,oBAAoB;AAC3C,qBAAqB,qBAAqB;AAC1C;;;AAGA,IAAI,MAAM,CAAC,UAAU,EAAE,SAAS;;AAEhC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,QAAQ,CAAC,UAAU,EAAE,SAAS;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4BAA4B,SAAS;AACrC,yCAAyC,2CAA2C;AACpF;AACA,yCAAyC,2CAA2C;AACpF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,+BAA+B,sCAAsC;AACrE,sBAAsB,2CAA2C;AACjE;;AAEA;AACA;AACA;AACA;AACA,2BAA2B,wCAAwC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,2CAA2C;AACxD,aAAa,OAAO;AACpB,aAAa,2CAA2C;AACxD;AACA;AACA;AACA;;AAEA,2BAA2B,wCAAwC;AACnE;AACA,iCAAiC,wCAAwC;;AAEzE;AACA;AACA;AACA;AACA;;AAEA,4BAA4B,6CAA6C;AACzE;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,SAAS;AAC5C;AACA;;AAEA;AACA;AACA,yBAAyB,eAAe;AACxC,2BAA2B,aAAM;AACjC,QAAQ,MAAM;AACd;AACA;AACA,WAAW,UAAoB;AAC/B;AACA;AACA;AACA;AACA,4BAA4B,kBAAiB;AAC7C;AACA,6BAA6B,mBAAyB;;AAEtD;AACA,iBAAiB,uCAAuC;AACxD,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA,2CAA2C,UAAK;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAU;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C,QAAQ;AACtD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,yBAAyB;AACxC;;AAEA,mCAAmC,kDAAkD;;AAErF;AACA;AACA,0CAA0C,QAAQ;AAClD;AACA,uBAAuB,MAAM;AAC7B,WAAW,kBAAkB;AAC7B;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,qCAAqC,kBAAkB;AACvD;AACA,kHAAkH;AAClH;AACA,qBAAqB,uCAAuC;AAC5D,sBAAsB,EAAE;AACxB;AACA;AACA,sBAAsB,MAAM;AAC5B;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA,aAAa,sCAAsC;AACnD,aAAa,2CAA2C;AACxD,cAAc,uCAAuC;AACrD;AACA;AACA;AACA;AACA,4BAA4B,6CAA6C;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,UAAU;AAC3B;AACA;AACA;AACA,WAAW,iBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2BAA2B,wCAAwC;AACnE;AACA,sBAAsB,oBAAoB;AAC1C,sDAAsD;AACtD,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,cAAc;AACtB;AACA;AACA;AACA;AACA;AACA,oCAAoC,QAAQ,yBAAyB,QAAQ;AAC7E;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C,8BAA8B,2CAA2C;AACzE,+BAA+B,SAAS;AACxC;AACA;AACA;AACA;AACA;AACA,kDAAkD,QAAQ;AAC1D;AACA,uCAAuC,SAAS;AAChD;AACA;AACA,uCAAuC,kBAAkB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,eAAe;AACvB;AACA;AACA,QAAQ,cAAc;AACtB,qBAAqB,OAAO,0BAA0B,OAAO;AAC7D;AACA;AACA;AACA;;AAEA;AACA,aAAa,uCAAuC;AACpD,aAAa,OAAO;AACpB,aAAa,qFAAqF;AAClG,aAAa,qDAAqD;AAClE,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD,kBAAkB,aAAa;AAC/B;AACA;AACA;AACA,KAAK;AACL,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,2CAA2C;AACxD,aAAa,OAAO;AACpB,aAAa,2CAA2C;AACxD;AACA;AACA;AACA,2BAA2B,wCAAwC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA;AACA,wBAAwB,eAAc;AACtC,QAAQ,kBAAc;AACtB,QAAQ,sBAAkB;AAC1B,qCAAqC,kBAAkB;AACvD;AACA,oDAAoD;AACpD;AACA;AACA;;AAEA;AACA,CAAC,CAAC,gBAAuB;;;AAGzB;AACA;AACA,WAAW,uCAAuC;AAClD,YAAY,QAAQ;AACpB;AACA,6CAA6B;AAC7B,6BAA6B,SAAS;AACtC;;;AAGA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,uCAAuC;AAClD,YAAY,8BAA8B;AAC1C;AACA,6CAA6B;AAC7B,aAAa,6CAA6B,YAAY,4CAA4C;AAClG;;;AAGe,iGAA6B,EAAC;;AAE7C,2C;;AChgBA;AACA;AACA;AAC6C;AACiB;AACG;AACjC;AACuC;AACd;AACY;AACI;AACQ;;AAEjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,QAAQ;AACR;AACA,4CAA4C,2BAA2B;AACvE,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,gCAAgC;AAC9C;AACA;AACA,2BAA2B,sCAAsC;AACjE;AACA;AACA;AACA;AACA,6CAA6C;AAC7C,qBAAqB,2BAA2B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAG;AACP;AACA,cAAc,UAAM,GAAG;AACvB;AACA,yBAAyB,QAAe;AACxC;AACA;AACA,6BAA6B,oBAAmB;AAChD;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,uBAAuB,UAAiB;AACxC;AACA,MAAM,UAAwB;AAC9B,MAAM,gBAAuB;AAC7B,MAAM,WAAyB;AAC/B,MAAM,eAA6B;AACnC;AACA;AACA;;AAEA;AACA,CAAC,CAAC,eAAY;;;AAGC,kDAAG,EAAC;;AAEnB,+B;;AClGA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;AACf;AACA;AACA,CAAC,EAAC;;AAEF,wC;;ACZA;AACA;AACA;AACwC;AACT;AACc;AACZ;;;AAGjC;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,8BAA8B;AAC5C;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;AACA,cAAc,oCAAoC;AAClD,cAAc,qCAAqC;AACnD;AACA;AACA,QAAQ,6BAA6B;AACrC,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D,gCAAgC;AAChC;AACA;AACA;AACA;AACA,IAAI,cAAS;AACb;AACA;;AAEA,sBAAsB,UAAM,GAAG;;AAE/B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA,gBAAgB,SAAS;;AAEzB;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,sBAAsB,OAAO,cAAc,YAAY;AACvD;;AAEA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,sBAAsB,QAAQ,cAAc,YAAY;AACxD;;AAEA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;;AAEA;AACA,CAAC,CAAC,WAAK;;;AAGP;AACA,0BAA0B,uCAAuC;AACjE;AACA,YAAY,oCAAoC;AAChD;AACA;AACA,cAAS;;;AAGM,6DAAS,EAAC;;AAEzB,gC;;AC7HA;AACA;AACA;AACuC;AACJ;AACU;AACC;;;AAG9C;AACA,6BAA6B,qBAAqB;AAClD,KAAK,OAAO;AACZ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;;AAEA;AACA,IAAI,iCAAiC;AACrC;AACA;AACA,2BAA2B,oCAAoC;AAC/D,mBAAmB,OAAO;AAC1B,IAAI,gCAAgC;AACpC,mBAAmB,OAAO;AAC1B;AACA;AACA,aAAa;AACb,yEAAyE;AACzE;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,SAAI;AACR;AACA;;AAEA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6BAA6B,SAAS;AACtC;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,KAAK;;AAE/B;AACA,6BAA6B,SAAS;AACtC;AACA;AACA;AACA;AACA;AACA,OAAO,6BAA6B,SAAS;AAC7C;AACA;AACA;AACA,OAAO,6BAA6B,SAAS;AAC7C;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,cAAc,mCAAmC;AACjD;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,UAAU;AACxB;AACA;AACA;AACA;;AAEA;AACA,yDAAyD,mDAAmD;AAC5G,oDAAoD;AACpD;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA,2CAA2C;AAC3C;AACA;AACA;AACA,WAAW,MAAM;AACjB;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,aAAW;;;AAGE,qDAAI,EAAC;;AAEpB,gC;;AC1SA;AACA;AACA;AAC6B;AACU;AACQ;AACO;AACR;;;AAG9C,IAAI,mBAAS;AACb;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;;AAEA;AACA;AACA,cAAc,oDAAoD;AAClE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA,mBAAmB,SAAS;AAC5B,KAAK;AACL,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B,mBAAmB,SAAS;AAC5B;AACA;AACA,QAAQ,UAAU,cAAc,SAAS;AACzC;AACA,QAAQ,UAAU,cAAc,SAAS;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,aAAa;AACjD;AACA;;AAEA;AACA,CAAC,CAAC,OAAI;;;AAGN;AACA;AACA,YAAY,kBAAkB;AAC9B;AACA;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;;AAEe,oEAAS,EAAC;;AAEzB,qC;;ACxKA;AACA;AACA;;;AAGA;AACA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,WAAW;AACtB,YAAY,UAAU;AACtB;AACO,SAAS,wBAAc;AAC9B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;AACA;;;AAGA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,OAAO;AACnB;AACO,SAAS,gBAAM;AACtB;AACA;;;AAGA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,UAAU;AACtB;AACO;AACP;AACA;;;AAGA;AACA,WAAW,UAAU;AACrB,YAAY,OAAO;AACnB;AACO;AACP;AACA;;;AAGA;AACA,WAAW,UAAU;AACrB,YAAY,OAAO;AACnB;AACO;AACP;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,UAAU;AACrB,WAAW,0CAA0C;AACrD,YAAY,QAAQ;AACpB;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA,qC;;AC5HA;AACA;AACA;AAC6C;AACE;;AAE/C,IAAI,mBAAS;AACb;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,kDAAkD;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA,oBAAoB,gBAAM;AAC1B;AACA;AACA,KAAK;AACL;;AAEA;AACA,CAAC,CAAC,gBAAQ;;;AAGK,oEAAS,EAAC;;AAEzB,qC;;ACxDA;AACA;AACA;AAC+C;AACsD;AACzD;AACY;;;AAGxD;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uCAAuC;AAClD,WAAW,uCAAuC;AAClD,WAAW,qCAAqC;AAChD,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACO;AACP;;AAEA,qBAAqB,cAAS;;AAE9B;AACA,yBAAyB,kBAAkB;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,uBAAuB,kBAAkB;AACzC,6BAA6B,kBAAkB;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,qCAAqC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,6BAA6B;AACxC,WAAW,OAAO;AAClB,WAAW,6BAA6B;AACxC,WAAW,4CAA4C;AACvD;AACA,WAAW,OAAO;AAClB,gFAAgF,EAAE;AAClF;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,YAAY,kBAAkB;AAC9B;AACO,SAAS,aAAM;AACtB;AACA;;AAEA,gBAAgB,qBAAqB;AACrC;;AAEA;AACA;AACA;;AAEA;;AAEA,yBAAyB,WAAW;AACpC;AACA,IAAI,aAAM;AACV,GAAG;;AAEH,2BAA2B,QAAQ;AACnC,4BAA4B,SAAS;AACrC,sBAAsB,qBAAqB;AAC3C;AACA;;AAEA;;AAEA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,oBAAoB,SAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH,sBAAsB,UAAU;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA,kC;;ACpPA;AACA;AACA;AAEqE;AACnC;AACM;;;AAGxC;AACA,mBAAmB;AACnB,aAAa,OAAO;AACpB,cAAc,6CAA6C;AAC3D,cAAc,6CAA6C;AAC3D;;;AAGA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA;AACA;AACA;AACA,iEAAiE;AACjE;AACA,UAAU;AACV;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,IAAI,2BAAa;;AAEjB;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;;AAEA,aAAa,uDAAuD;AACpE;AACA,qBAAqB,iBAAY;;AAEjC;AACA,aAAa,sCAAsC;AACnD,cAAc,sCAAsC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,OAAO,QAAQ,qBAAqB,QAAQ;;AAE5C;AACA,YAAY;AACZ;AACA;AACA;AACA,IAAI,QAAQ;;AAEZ;AACA,YAAY;AACZ;AACA;AACA;AACA,IAAI,QAAQ;;AAEZ,2BAA2B,UAAU;AACrC,4BAA4B,WAAW;AACvC,+BAA+B,cAAc;AAC7C,8BAA8B,aAAa;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD;AACA;AACA,2BAAa;AACb;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB;AACA;AACA,2BAAa;;AAEb,yBAAyB,cAAc;AACvC;AACA,IAAI,QAAQ;AACZ,oCAAoC,OAAO;;AAE3C;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,6BAA6B,cAAc;AAC3C,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS,iBAAU;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,MAAM;AACnB,aAAa,MAAM;AACnB;AACA,YAAY,MAAM;AAClB,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,8BAA8B;AAC1C;AACA,2BAAa;AACb,eAAe,WAAW;;AAE1B;AACA;AACA,IAAI,gBAAgB;AACpB,IAAI,gBAAgB;AACpB,IAAI,gBAAgB;AACpB,GAAG;;AAEH;AACA;;AAEA;AACA,YAAY,gBAAgB;AAC5B;AACA,2BAAa;AACb;AACA;;AAEe,oFAAa,EAAC;;AAE7B,yC;;ACxVA;AACA;AACA;AAC4C;;AAEd;AACU;AACW;AACJ;AACkB;AAChC;AACmD;AACrC;;;AAG/C;AACA,aAAa,wEAAwE;AACrF;;;AAGA;AACA;AACA;AACA,QAAQ,2CAA2C;AACnD;AACA;AACA,IAAI,eAAU;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,SAAS;;AAExC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAM,eAAe;;AAErB,QAAQ,cAAO;AACf;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,0BAA0B,eAAe;AACzC;AACA;;AAEA;AACA;;AAEA,uBAAuB,gBAAS;AAChC,2BAA2B,yBAAyB;AACpD;;AAEA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA,2BAA2B,eAAe;;AAE1C;AACA;AACA,cAAc;AACd;AACA,8BAA8B,oBAAa;AAC3C;AACA;;AAEA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0BAA0B,KAAK;AAC/B;AACA,0BAA0B,KAAK;AAC/B;AACA,OAAO;AACP,uBAAuB,eAAe;AACtC;AACA;;AAEA,SAAS,cAAO;AAChB,mBAAmB,SAAS;AAC5B,KAAK;AACL;AACA;;AAEA,uCAAuC,0BAA0B;AACjE,yCAAyC,0BAA0B;AACnE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;;AAEA;AACA,mBAAmB,SAAS;AAC5B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,aAAiB;AACtC;AACA;AACA;;AAEA,mBAAmB,SAAS;AAC5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B,mBAAmB,SAAS;AAC5B;;AAEA;;AAEA;AACA;AACA;AACA,qBAAqB,SAAS,kBAAkB,SAAS;AACzD;;AAEA,gCAAgC,MAAM,OAAO,SAAS;AACtD;AACA;AACA,2BAA2B,SAAS;AACpC,6BAA6B,SAAS;AACtC,6BAA6B,SAAS;AACtC,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,OAAO;;AAEP;AACA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sCAAsC,aAAa;AACnD;AACA;;AAEA;AACA,CAAC,CAAC,OAAI;;;AAGS,+DAAU,EAAC;;AAE1B,gC;;ACvTA;AACA;AACA;AACoC;AACH;AACoB;;;AAGrD;AACA,WAAW,OAAO;AAClB,WAAW,yCAAyC;AACpD,YAAY,gCAAgC;AAC5C;AACO;AACP,kBAAkB,GAAG;AACrB,kBAAkB,GAAG;AACrB,kBAAkB,GAAG;AACrB,sBAAsB,IAAI;AAC1B;AACA;AACA,eAAe,mCAAmC;AAClD,eAAe,OAAO;AACtB,eAAe,uCAAuC;AACtD,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,YAAY,MAAM,YAAY,SAAS,GAAG;AAC1C;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;;AAGA;AACA,WAAW,cAAc;AACzB,WAAW,yCAAyC;AACpD,YAAY,gCAAgC;AAC5C;AACO;AACP;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;;;AAGA;AACA,WAAW,uCAAuC;AAClD,YAAY,gCAAgC;AAC5C;AACO;AACP;AACA;AACA;AACA;AACA;AACA,eAAe,mCAAmC;AAClD,eAAe,OAAO;AACtB,eAAe,uCAAuC;AACtD,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,OAAO;AACP,gBAAgB,IAAa;AAC7B,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,mCAAmC;AAC9C,WAAW,OAAO;AAClB,WAAW,uCAAuC;AAClD,YAAY,iBAAiB;AAC7B;AACO;AACP;AACA;;;AAGA;AACA,WAAW,OAAO;AAClB,YAAY,cAAc;AAC1B;AACO;AACP;AACA,iBAAiB,iBAAiB;AAClC;AACA;AACA;AACA;AACA;AACA,kCAAkC,0BAA0B;AAC5D;AACA;AACA;AACA;AACA,qBAAqB,aAAa;AAClC;AACA;AACA;AACA,wCAAwC,WAAW;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2C;;ACpIA;AACA;AACA;AACoC;AACE;AACU;AACX;;;AAGrC;AACA;AACA;AACA;AACA,aAAa,0EAA0E;AACvF;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,0CAA0C;AACvG;AACA,aAAa,iCAAiC;AAC9C;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,gBAAgB;AAC9B,cAAc,QAAQ;AACtB,cAAc,oCAAoC;AAClD,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB;;;AAGA;AACA;AACA,uBAAuB;AACvB;AACA,mBAAmB,kCAAkC;AACrD;AACA;AACA;AACA;AACA;AACA,IAAI,aAAM;AACV;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA,uBAAuB,QAAa;;AAEpC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,sBAAsB,KAAW;;AAEjC;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,aAAa;AAC3B;AACA;AACA;AACA;;AAEA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,wCAAwC;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,wBAAwB;AACtC;AACA;AACA,WAAW,aAAQ;AACnB;;AAEA;AACA,uCAAuC,mCAAmC;AAC1E,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,0BAA0B;AACvC,uDAAuD,0CAA0C;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,SAAU;;;AAGZ;AACA;AACA,WAAW,0BAA0B;AACrC,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGe,+DAAM,EAAC;;AAEtB,kC;;AChNA;AACA;AACA;AAC8C;AACT;AACgD;AAC7B;AACA;AACvB;AACC;AACwC;;;AAG1E;AACA;AACA,UAAU;AACV;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,8BAA8B;AAC5C,gCAAgC,4BAA4B;AAC5D;AACA,cAAc,OAAO;AACrB,cAAc,sCAAsC;AACpD;AACA;AACA,cAAc,6CAA6C;AAC3D;AACA;AACA;AACA;AACA,cAAc,eAAe;AAC7B;AACA;AACA,cAAc,iCAAiC;AAC/C,cAAc,iCAAiC;AAC/C;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iBAAQ;;AAEZ;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA,EAAE,MAAM,CAAC,QAAQ;AACjB;AACA,GAAG,aAAa;;;AAGhB;AACA;AACA;AACA,sDAAsD,QAAQ;AAC9D;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,YAAY;AACZ;AACA;;;AAGA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,IAAI,MAAM;AACV,UAAU;AACV;;AAEA;;AAEA;AACA;AACA,mBAAmB,UAAU;AAC7B;;AAEA,EAAE,MAAM;AACR;AACA,QAAQ;;AAER;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,IAAI,MAAM;AACV,UAAU;AACV;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC,EAAE,MAAM;AACR;AACA;AACA,QAAQ;;AAER;AACA;AACA,YAAY;AACZ;AACA;;;AAGA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA,0BAA0B,YAAS;AACnC;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,OAAO;AAClB,WAAW,8CAA8C;AACzD;AACA;AACA,iBAAQ;AACR;AACA,mDAAmD,SAAS;AAC5D,qDAAqD,SAAS;AAC9D;AACA;AACA;AACA;;AAEA;AACA,WAAW,oCAAoC;AAC/C,WAAW,sEAAsE;AACjF,WAAW,GAAG;AACd,WAAW,mCAAmC;AAC9C,WAAW,+BAA+B;AAC1C,YAAY,QAAQ;AACpB;AACA;AACA,iBAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,wBAAuB;AACzC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,8BAA8B;AAC1C;AACA,iBAAQ;AACR;AACA;;AAEA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA,iBAAQ;AACR;AACA;;AAEA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA,iBAAQ;AACR;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,sCAAsC;AAClD;AACA;AACA,iBAAQ;AACR;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA,iBAAQ;AACR;AACA;;AAEA;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA,iBAAQ;AACR;AACA;;AAEA;AACA,WAAW,oCAAoC;AAC/C,WAAW,mCAAmC;AAC9C,WAAW,+BAA+B;AAC1C,YAAY,kCAAkC;AAC9C;AACA,iBAAQ;AACR;AACA;AACA;AACA;AACA,aAAa,wBAAuB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,kCAAkC;AAC7C,WAAW,+BAA+B;AAC1C,YAAY,8BAA8B;AAC1C;AACA,iBAAQ;AACR;AACA;AACA,iBAAiB,MAAM;AACvB;AACA;AACA;AACA;AACA,SAAS,cAAc;AACvB;;AAEA;AACA;AACA,WAAW,8BAA8B;AACzC,WAAW,OAAO;AAClB,WAAW,mCAAmC;AAC9C,YAAY,kCAAkC;AAC9C;AACA,iBAAQ;AACR;AACA;AACA;AACA;AACA;AACA,SAAS,wBAAuB;AAChC;;AAEA;AACA,WAAW,oCAAoC;AAC/C,YAAY,sCAAsC;AAClD;AACA,iBAAQ;AACR;AACA;AACA,iBAAiB,MAAM;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,oCAAoC;AAC/C,WAAW,+BAA+B;AAC1C,YAAY,8BAA8B;AAC1C;AACA;AACA,iBAAQ;AACR;AACA;AACA,iBAAiB,MAAM;AACvB;AACA;AACA;AACA;AACA,SAAS,cAAc;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB,WAAW,qCAAqC;AAChD,YAAY,oCAAoC;AAChD;AACA;AACA,iBAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,qCAAqC;AAChD,YAAY,oCAAoC;AAChD;AACA;AACA,iBAAQ;AACR;AACA;AACA;AACA,iBAAiB,MAAM;;AAEvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA,SAAS,wBAAuB;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA,WAAW,qCAAqC;AAChD,YAAY,oCAAoC;AAChD;AACA;AACA,iBAAQ;AACR;AACA;AACA,iBAAiB,MAAM;;AAEvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA,SAAS,wBAAuB;AAChC;;AAEA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,OAAO;AAClB,WAAW,qCAAqC;AAChD,YAAY,oCAAoC;AAChD;AACA;AACA,iBAAQ;AACR;AACA;AACA;;AAEA;AACA,WAAW,oCAAoC;AAC/C,YAAY,OAAO;AACnB;AACA,iBAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,iCAAiC;AAC7C;AACA;AACA,iBAAQ;AACR;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,YAAY,kCAAkC;AAC9C;AACA,iBAAQ;AACR;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA,iBAAQ;AACR,UAAU,iBAAiB;AAC3B,SAAS,KAAK;AACd;;AAEA;AACA,WAAW,+BAA+B;AAC1C;AACA;AACA,iBAAQ;AACR;AACA;AACA,4BAA4B,YAAY;AACxC;AACA;AACA;AACA;;;AAGe,uEAAQ,EAAC;;AAExB,oC;;ACriBA;AACA;AACA;AACyE;AACxC;AAC8D;AACvD;AACwB;AAC5B;AACU;;;AAG9C;AACA,WAAW,uCAAuC;AAClD,YAAY,UAAU;AACtB;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW,SAAS;AACpB,WAAW,mCAAmC;AAC9C,WAAW,uCAAuC;AAClD,YAAY,mCAAmC;AAC/C;AACO;AACP;AACA;AACA;AACA,OAAO,kBAAkB;AACzB,qBAAqB,QAAQ;AAC7B;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA,WAAW,6BAA6B;AACxC,WAAW,QAAQ;AACnB;AACA,WAAW,iCAAiC;AAC5C;AACA,WAAW,QAAQ;AACnB,YAAY,UAAU;AACtB;AACO;AACP,uDAAuD,MAAM;;AAE7D;;AAEA,aAAa,iBAAQ;AACrB;AACA,YAAY,SAAS;AACrB;AACA;AACA,GAAG;AACH;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,6BAA6B;AAC3C;AACA;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB,cAAc,gCAAgC;AAC9C;;;AAGA;AACA;AACA,WAAW,YAAY;AACvB,YAAY,UAAU;AACtB;AACA;AACO;AACP,aAAa,WAAW;AACxB;;AAEA,oCAAoC,QAAa;;AAEjD,aAAa,yCAAyC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAQ;AACrB;;;AAGA;AACA;AACA,WAAW,6BAA6B;AACxC,WAAW,QAAQ;AACnB;AACA,WAAW,iCAAiC;AAC5C;AACA,YAAY,eAAe;AAC3B;AACA;AACA;AACA,kBAAkB,gBAAgB;;AAElC,eAAe,SAAS;AACxB,cAAc,QAAQ;;AAEtB,iBAAiB,MAAM;AACvB,mBAAmB,iBAAiB;AACpC;AACA;;AAEA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;;;AAGA;AACA,WAAW,mCAAmC;AAC9C,WAAW,QAAQ;AACnB;AACA,WAAW,iCAAiC;AAC5C;AACA,WAAW,QAAQ;AACnB,YAAY,UAAU;AACtB;AACO;AACP;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,mCAAmC;AAC9C,YAAY,6BAA6B;AACzC;AACO;AACP,eAAe,QAAa;AAC5B;AACA;AACA,qBAAqB,eAAe,CAAC,UAAK;AAC1C,aAAa,cAAc;AAC3B;AACA;AACA;;AAEA,oC;;AC3KA;AACA;AACA;AACoC;AACI;AACA;AACD;AACD;AACgB;AACrB;AAC2B;AACuB;;AAEnF;AACA,aAAa,OAAO;AACpB,cAAc,sCAAsC;AACpD,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,oCAAoC;AAClD,cAAc,6BAA6B;AAC3C,cAAc,0CAA0C;AACxD,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA,IAAI,eAAU;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,yBAAyB,YAAS;;AAElC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,wBAAwB;;AAExB;;AAEA;AACA;AACA;;AAEA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD,aAAa,mDAAmD;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD,aAAa,OAAO;AACpB,aAAa,kCAAkC;AAC/C,aAAa,sDAAsD;AACnE;AACA;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,qBAAqB;AACrD,kCAAkC,qBAAqB;AACvD,uBAAuB,SAAS;AAChC;AACA;AACA,4BAA4B,8BAA8B;AAC1D,uCAAuC,SAAS;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD,cAAc,QAAQ;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,wCAAwC;AACrD,cAAc,8BAA8B;AAC5C;AACA;AACA,WAAW,aAAQ;AACnB;;AAEA;AACA;AACA,cAAc,0CAA0C;AACxD;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD,cAAc,2CAA2C;AACzD;AACA;AACA;AACA,aAAa,gBAAwB;AACrC,KAAK;AACL;AACA;AACA;;AAEA;AACA,aAAa,wCAAwC;AACrD,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;AACA,qBAAqB,UAAU;AAC/B;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,wCAAwC;AACrD,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB;AACA;AACA,KAAK;AACL,aAAa,UAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,oCAAoC;AACjD,aAAa,yCAAyC;AACtD,cAAc,oCAAoC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,KAAK;AACvB;AACA,WAAW,gBAAgB;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,wCAAwC;AACrD;AACA;;AAEA;AACA,CAAC,CAAC,aAAM;;;AAGR;AACA;AACA,sBAAsB,uCAAuC;AAC7D;AACA;AACO;AACP;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,YAAK;;AAEQ,+DAAU,EAAC;;AAE1B,gC;;ACpVA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACe;;AAEf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,CAAC,EAAC;;AAEF,yC;;ACjCA;AACA;AACA;AACkC;AACM;AACkD;AACpC;AACP;AACL;;AAE1C;AACA,aAAa,OAAO;AACpB,cAAc,sCAAsC;AACpD,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,oCAAoC;AAClD,cAAc,6BAA6B;AAC3C,cAAc,0CAA0C;AACxD,cAAc,kCAAkC;AAChD,cAAc,OAAO;AACrB,cAAc,iCAAiC;AAC/C,cAAc,OAAO;AACrB,cAAc,cAAc;AAC5B,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAO;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA,0FAA0F,mBAAmB;;AAE7G;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,iCAAiC;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,oBAAoB;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA,0BAA0B,6BAA6B;AACvD,cAAc,MAAM;AACpB;AACA;AACA,qBAAqB,SAAS;AAC9B;AACA,aAAa,aAAa;AAC1B,KAAK;AACL;AACA,0BAA0B,SAAS,SAAS,aAAa;AACzD,sBAAsB,SAAS,wBAAwB,SAAS;AAChE,UAAU,aAAa;AACvB;AACA;AACA,6BAA6B,eAAe;AAC5C;AACA;;AAEA;AACA;AACA,aAAa,kCAAkC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iCAAiC;AAC9C,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,WAAU;;;AAGG,kEAAO,EAAC;;AAEvB,mC;;AC5NA;AACA;AACA;AAC+D;AAC7B;AACM;AACA;AACA;AACJ;AACW;AACa;AACjB;AACR;AACe;AAC0B;;AAE5E;AACA,aAAa,OAAO;AACpB,cAAc,sCAAsC;AACpD,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,YAAY;AAC1B;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,oCAAoC;AAClD,cAAc,OAAO;AACrB;AACA,cAAc,6BAA6B;AAC3C,cAAc,yCAAyC;AACvD,eAAe,oCAAoC;AACnD,cAAc,0CAA0C;AACxD,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,cAAc,OAAO,oCAAoC,EAAE,KAAK,EAAE,OAAO,GAAG,SAAS,EAAE;AACvF,OAAO,IAAI,2CAA2C,IAAI;AAC1D;AACA,cAAc,cAAc;AAC5B,cAAc,QAAQ;AACtB;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,mBAAS;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,0BAA0B,YAAS;;AAEnC;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,0BAA0B;AACnC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,0BAA0B;AACnC;AACA;AACA;AACA;;AAEA,+EAA+E;AAC/E;AACA;AACA,uEAAuE;AACvE;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ,0BAA0B;AAClC,+CAA+C,UAAU;AACzD;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ,0BAA0B;AAClC,+CAA+C,UAAU;AACzD;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,0BAA0B;AACnC;AACA;AACA;AACA,uCAAuC,UAAU;AACjD;AACA,KAAK;AACL,oBAAoB,MAAM;AAC1B;AACA,8CAA8C,gBAAwB;AACtE;AACA;AACA,mBAAmB,2CAA2C;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,0BAA0B;AACnC;AACA;AACA,wCAAwC,kBAAkB,UAAU;AACpE;AACA,KAAK;AACL,oBAAoB,MAAM;AAC1B;AACA,mDAAmD,YAAS;AAC5D;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,wCAAwC;AACrD,aAAa,OAAO;AACpB,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,SAAS,QAAQ,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA,IAAI,MAAM,OAAO,SAAS;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sCAAsC,yCAAyC;AAC/E,SAAS,0BAA0B;AACnC,4CAA4C,UAAU;AACtD;AACA,KAAK;AACL;AACA;AACA;AACA,yBAAyB,gBAAM;AAC/B;AACA,0BAA0B,8BAA8B;AACxD;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,0BAA0B,WAAU;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,OAAO;AACpB,aAAa,yCAAyC;AACtD,cAAc,8BAA8B;AAC5C;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,SAAS,0BAA0B;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,oCAAoC;AACjD,aAAa,0CAA0C;AACvD;AACA;AACA;AACA,QAAQ,0BAA0B;AAClC,iBAAiB,QAAa;AAC9B;AACA,sBAAsB,MAAM;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,cAAO;;;AAGT;AACA,WAAW,UAAU;AACrB,WAAW,OAAO;AAClB;AACA;AACA,aAAa,kCAAkC;AAC/C;;AAEe,wEAAS,EAAC;;AAEzB,qC;;ACtZA;AACA;AACA;;AAEuC;AACwB;;AAE/D;AACA,aAAa,OAAO;AACpB,cAAc,sCAAsC;AACpD,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB,cAAc,YAAY;AAC1B;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,oCAAoC;AAClD,cAAc,OAAO;AACrB;AACA,cAAc,OAAO;AACrB,cAAc,OAAO;AACrB,cAAc,0CAA0C;AACxD,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA,cAAc,iCAAiC;AAC/C,cAAc,iCAAiC;AAC/C;AACA;AACA,cAAc,OAAO,oCAAoC,EAAE,KAAK,EAAE,OAAO,GAAG;AAC5E,SAAS,EAAE,oBAAoB,IAAI,2CAA2C,IAAI;AAClF;AACA,cAAc,cAAc;AAC5B,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB;AACA,IAAI,iCAAiC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAG;AACP;AACA;AACA;AACA;;AAEA;AACA,MAAM,SAAS;AACf,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,gBAAS;;AAEI,sDAAG,EAAC;;AAEnB,+B;;AC5GA;AACA;AACA;;AAE2B;;;AAG3B;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACO,yBAAyB;AAChC;AACA;;;AAGA;AACA,aAAa,OAAO;AACpB,cAAc,sCAAsC;AACpD,cAAc,OAAO;AACrB,cAAc,YAAY;AAC1B;AACA;AACA;AACA,cAAc,OAAO;AACrB,cAAc,QAAQ;AACtB,cAAc,OAAO;AACrB;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;AACA;AACA,cAAc,OAAO,gBAAgB,IAAI,yBAAyB,EAAE,EAAE,EAAE,EAAE,EAAE;AAC5E,kBAAkB,EAAE,KAAK,EAAE,OAAO,GAAG,SAAS,EAAE;AAChD,cAAc,QAAQ;AACtB;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA,8BAA8B,IAAI,yBAAyB,EAAE,EAAE,EAAE,EAAE,EAAE;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,UAAG;;AAEU,kDAAG,EAAC;;AAEnB,+B;;AC1F6B;AACS;AACJ;;AAElC,IAAI,MAAG;AACP;AACA;AACA,QAAQ,UAAS;AACjB,cAAc,UAAG;AACjB,KAAK;AACL;AACA,YAAY,OAAI;AAChB;AACA;AACA,GAAG;AACH,CAAC","file":"main.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 = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n","'use strict';\n\nmodule.exports = rbush;\nmodule.exports.default = rbush;\n\nvar quickselect = require('quickselect');\n\nfunction rbush(maxEntries, format) {\n if (!(this instanceof rbush)) return new rbush(maxEntries, format);\n\n // max entries in a node is 9 by default; min node fill is 40% for best performance\n this._maxEntries = Math.max(4, maxEntries || 9);\n this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));\n\n if (format) {\n this._initFormat(format);\n }\n\n this.clear();\n}\n\nrbush.prototype = {\n\n all: function () {\n return this._all(this.data, []);\n },\n\n search: function (bbox) {\n\n var node = this.data,\n result = [],\n toBBox = this.toBBox;\n\n if (!intersects(bbox, node)) return result;\n\n var nodesToSearch = [],\n i, len, child, childBBox;\n\n while (node) {\n for (i = 0, len = node.children.length; i < len; i++) {\n\n child = node.children[i];\n childBBox = node.leaf ? toBBox(child) : child;\n\n if (intersects(bbox, childBBox)) {\n if (node.leaf) result.push(child);\n else if (contains(bbox, childBBox)) this._all(child, result);\n else nodesToSearch.push(child);\n }\n }\n node = nodesToSearch.pop();\n }\n\n return result;\n },\n\n collides: function (bbox) {\n\n var node = this.data,\n toBBox = this.toBBox;\n\n if (!intersects(bbox, node)) return false;\n\n var nodesToSearch = [],\n i, len, child, childBBox;\n\n while (node) {\n for (i = 0, len = node.children.length; i < len; i++) {\n\n child = node.children[i];\n childBBox = node.leaf ? toBBox(child) : child;\n\n if (intersects(bbox, childBBox)) {\n if (node.leaf || contains(bbox, childBBox)) return true;\n nodesToSearch.push(child);\n }\n }\n node = nodesToSearch.pop();\n }\n\n return false;\n },\n\n load: function (data) {\n if (!(data && data.length)) return this;\n\n if (data.length < this._minEntries) {\n for (var i = 0, len = data.length; i < len; i++) {\n this.insert(data[i]);\n }\n return this;\n }\n\n // recursively build the tree with the given data from scratch using OMT algorithm\n var node = this._build(data.slice(), 0, data.length - 1, 0);\n\n if (!this.data.children.length) {\n // save as is if tree is empty\n this.data = node;\n\n } else if (this.data.height === node.height) {\n // split root if trees have the same height\n this._splitRoot(this.data, node);\n\n } else {\n if (this.data.height < node.height) {\n // swap trees if inserted one is bigger\n var tmpNode = this.data;\n this.data = node;\n node = tmpNode;\n }\n\n // insert the small tree into the large tree at appropriate level\n this._insert(node, this.data.height - node.height - 1, true);\n }\n\n return this;\n },\n\n insert: function (item) {\n if (item) this._insert(item, this.data.height - 1);\n return this;\n },\n\n clear: function () {\n this.data = createNode([]);\n return this;\n },\n\n remove: function (item, equalsFn) {\n if (!item) return this;\n\n var node = this.data,\n bbox = this.toBBox(item),\n path = [],\n indexes = [],\n i, parent, index, goingUp;\n\n // depth-first iterative tree traversal\n while (node || path.length) {\n\n if (!node) { // go up\n node = path.pop();\n parent = path[path.length - 1];\n i = indexes.pop();\n goingUp = true;\n }\n\n if (node.leaf) { // check current node\n index = findItem(item, node.children, equalsFn);\n\n if (index !== -1) {\n // item found, remove the item and condense tree upwards\n node.children.splice(index, 1);\n path.push(node);\n this._condense(path);\n return this;\n }\n }\n\n if (!goingUp && !node.leaf && contains(node, bbox)) { // go down\n path.push(node);\n indexes.push(i);\n i = 0;\n parent = node;\n node = node.children[0];\n\n } else if (parent) { // go right\n i++;\n node = parent.children[i];\n goingUp = false;\n\n } else node = null; // nothing found\n }\n\n return this;\n },\n\n toBBox: function (item) { return item; },\n\n compareMinX: compareNodeMinX,\n compareMinY: compareNodeMinY,\n\n toJSON: function () { return this.data; },\n\n fromJSON: function (data) {\n this.data = data;\n return this;\n },\n\n _all: function (node, result) {\n var nodesToSearch = [];\n while (node) {\n if (node.leaf) result.push.apply(result, node.children);\n else nodesToSearch.push.apply(nodesToSearch, node.children);\n\n node = nodesToSearch.pop();\n }\n return result;\n },\n\n _build: function (items, left, right, height) {\n\n var N = right - left + 1,\n M = this._maxEntries,\n node;\n\n if (N <= M) {\n // reached leaf level; return leaf\n node = createNode(items.slice(left, right + 1));\n calcBBox(node, this.toBBox);\n return node;\n }\n\n if (!height) {\n // target height of the bulk-loaded tree\n height = Math.ceil(Math.log(N) / Math.log(M));\n\n // target number of root entries to maximize storage utilization\n M = Math.ceil(N / Math.pow(M, height - 1));\n }\n\n node = createNode([]);\n node.leaf = false;\n node.height = height;\n\n // split the items into M mostly square tiles\n\n var N2 = Math.ceil(N / M),\n N1 = N2 * Math.ceil(Math.sqrt(M)),\n i, j, right2, right3;\n\n multiSelect(items, left, right, N1, this.compareMinX);\n\n for (i = left; i <= right; i += N1) {\n\n right2 = Math.min(i + N1 - 1, right);\n\n multiSelect(items, i, right2, N2, this.compareMinY);\n\n for (j = i; j <= right2; j += N2) {\n\n right3 = Math.min(j + N2 - 1, right2);\n\n // pack each entry recursively\n node.children.push(this._build(items, j, right3, height - 1));\n }\n }\n\n calcBBox(node, this.toBBox);\n\n return node;\n },\n\n _chooseSubtree: function (bbox, node, level, path) {\n\n var i, len, child, targetNode, area, enlargement, minArea, minEnlargement;\n\n while (true) {\n path.push(node);\n\n if (node.leaf || path.length - 1 === level) break;\n\n minArea = minEnlargement = Infinity;\n\n for (i = 0, len = node.children.length; i < len; i++) {\n child = node.children[i];\n area = bboxArea(child);\n enlargement = enlargedArea(bbox, child) - area;\n\n // choose entry with the least area enlargement\n if (enlargement < minEnlargement) {\n minEnlargement = enlargement;\n minArea = area < minArea ? area : minArea;\n targetNode = child;\n\n } else if (enlargement === minEnlargement) {\n // otherwise choose one with the smallest area\n if (area < minArea) {\n minArea = area;\n targetNode = child;\n }\n }\n }\n\n node = targetNode || node.children[0];\n }\n\n return node;\n },\n\n _insert: function (item, level, isNode) {\n\n var toBBox = this.toBBox,\n bbox = isNode ? item : toBBox(item),\n insertPath = [];\n\n // find the best node for accommodating the item, saving all nodes along the path too\n var node = this._chooseSubtree(bbox, this.data, level, insertPath);\n\n // put the item into the node\n node.children.push(item);\n extend(node, bbox);\n\n // split on node overflow; propagate upwards if necessary\n while (level >= 0) {\n if (insertPath[level].children.length > this._maxEntries) {\n this._split(insertPath, level);\n level--;\n } else break;\n }\n\n // adjust bboxes along the insertion path\n this._adjustParentBBoxes(bbox, insertPath, level);\n },\n\n // split overflowed node into two\n _split: function (insertPath, level) {\n\n var node = insertPath[level],\n M = node.children.length,\n m = this._minEntries;\n\n this._chooseSplitAxis(node, m, M);\n\n var splitIndex = this._chooseSplitIndex(node, m, M);\n\n var newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));\n newNode.height = node.height;\n newNode.leaf = node.leaf;\n\n calcBBox(node, this.toBBox);\n calcBBox(newNode, this.toBBox);\n\n if (level) insertPath[level - 1].children.push(newNode);\n else this._splitRoot(node, newNode);\n },\n\n _splitRoot: function (node, newNode) {\n // split root node\n this.data = createNode([node, newNode]);\n this.data.height = node.height + 1;\n this.data.leaf = false;\n calcBBox(this.data, this.toBBox);\n },\n\n _chooseSplitIndex: function (node, m, M) {\n\n var i, bbox1, bbox2, overlap, area, minOverlap, minArea, index;\n\n minOverlap = minArea = Infinity;\n\n for (i = m; i <= M - m; i++) {\n bbox1 = distBBox(node, 0, i, this.toBBox);\n bbox2 = distBBox(node, i, M, this.toBBox);\n\n overlap = intersectionArea(bbox1, bbox2);\n area = bboxArea(bbox1) + bboxArea(bbox2);\n\n // choose distribution with minimum overlap\n if (overlap < minOverlap) {\n minOverlap = overlap;\n index = i;\n\n minArea = area < minArea ? area : minArea;\n\n } else if (overlap === minOverlap) {\n // otherwise choose distribution with minimum area\n if (area < minArea) {\n minArea = area;\n index = i;\n }\n }\n }\n\n return index;\n },\n\n // sorts node children by the best axis for split\n _chooseSplitAxis: function (node, m, M) {\n\n var compareMinX = node.leaf ? this.compareMinX : compareNodeMinX,\n compareMinY = node.leaf ? this.compareMinY : compareNodeMinY,\n xMargin = this._allDistMargin(node, m, M, compareMinX),\n yMargin = this._allDistMargin(node, m, M, compareMinY);\n\n // if total distributions margin value is minimal for x, sort by minX,\n // otherwise it's already sorted by minY\n if (xMargin < yMargin) node.children.sort(compareMinX);\n },\n\n // total margin of all possible split distributions where each node is at least m full\n _allDistMargin: function (node, m, M, compare) {\n\n node.children.sort(compare);\n\n var toBBox = this.toBBox,\n leftBBox = distBBox(node, 0, m, toBBox),\n rightBBox = distBBox(node, M - m, M, toBBox),\n margin = bboxMargin(leftBBox) + bboxMargin(rightBBox),\n i, child;\n\n for (i = m; i < M - m; i++) {\n child = node.children[i];\n extend(leftBBox, node.leaf ? toBBox(child) : child);\n margin += bboxMargin(leftBBox);\n }\n\n for (i = M - m - 1; i >= m; i--) {\n child = node.children[i];\n extend(rightBBox, node.leaf ? toBBox(child) : child);\n margin += bboxMargin(rightBBox);\n }\n\n return margin;\n },\n\n _adjustParentBBoxes: function (bbox, path, level) {\n // adjust bboxes along the given tree path\n for (var i = level; i >= 0; i--) {\n extend(path[i], bbox);\n }\n },\n\n _condense: function (path) {\n // go through the path, removing empty nodes and updating bboxes\n for (var i = path.length - 1, siblings; i >= 0; i--) {\n if (path[i].children.length === 0) {\n if (i > 0) {\n siblings = path[i - 1].children;\n siblings.splice(siblings.indexOf(path[i]), 1);\n\n } else this.clear();\n\n } else calcBBox(path[i], this.toBBox);\n }\n },\n\n _initFormat: function (format) {\n // data format (minX, minY, maxX, maxY accessors)\n\n // uses eval-type function compilation instead of just accepting a toBBox function\n // because the algorithms are very sensitive to sorting functions performance,\n // so they should be dead simple and without inner calls\n\n var compareArr = ['return a', ' - b', ';'];\n\n this.compareMinX = new Function('a', 'b', compareArr.join(format[0]));\n this.compareMinY = new Function('a', 'b', compareArr.join(format[1]));\n\n this.toBBox = new Function('a',\n 'return {minX: a' + format[0] +\n ', minY: a' + format[1] +\n ', maxX: a' + format[2] +\n ', maxY: a' + format[3] + '};');\n }\n};\n\nfunction findItem(item, items, equalsFn) {\n if (!equalsFn) return items.indexOf(item);\n\n for (var i = 0; i < items.length; i++) {\n if (equalsFn(item, items[i])) return i;\n }\n return -1;\n}\n\n// calculate node's bbox from bboxes of its children\nfunction calcBBox(node, toBBox) {\n distBBox(node, 0, node.children.length, toBBox, node);\n}\n\n// min bounding rectangle of node children from k to p-1\nfunction distBBox(node, k, p, toBBox, destNode) {\n if (!destNode) destNode = createNode(null);\n destNode.minX = Infinity;\n destNode.minY = Infinity;\n destNode.maxX = -Infinity;\n destNode.maxY = -Infinity;\n\n for (var i = k, child; i < p; i++) {\n child = node.children[i];\n extend(destNode, node.leaf ? toBBox(child) : child);\n }\n\n return destNode;\n}\n\nfunction extend(a, b) {\n a.minX = Math.min(a.minX, b.minX);\n a.minY = Math.min(a.minY, b.minY);\n a.maxX = Math.max(a.maxX, b.maxX);\n a.maxY = Math.max(a.maxY, b.maxY);\n return a;\n}\n\nfunction compareNodeMinX(a, b) { return a.minX - b.minX; }\nfunction compareNodeMinY(a, b) { return a.minY - b.minY; }\n\nfunction bboxArea(a) { return (a.maxX - a.minX) * (a.maxY - a.minY); }\nfunction bboxMargin(a) { return (a.maxX - a.minX) + (a.maxY - a.minY); }\n\nfunction enlargedArea(a, b) {\n return (Math.max(b.maxX, a.maxX) - Math.min(b.minX, a.minX)) *\n (Math.max(b.maxY, a.maxY) - Math.min(b.minY, a.minY));\n}\n\nfunction intersectionArea(a, b) {\n var minX = Math.max(a.minX, b.minX),\n minY = Math.max(a.minY, b.minY),\n maxX = Math.min(a.maxX, b.maxX),\n maxY = Math.min(a.maxY, b.maxY);\n\n return Math.max(0, maxX - minX) *\n Math.max(0, maxY - minY);\n}\n\nfunction contains(a, b) {\n return a.minX <= b.minX &&\n a.minY <= b.minY &&\n b.maxX <= a.maxX &&\n b.maxY <= a.maxY;\n}\n\nfunction intersects(a, b) {\n return b.minX <= a.maxX &&\n b.minY <= a.maxY &&\n b.maxX >= a.minX &&\n b.maxY >= a.minY;\n}\n\nfunction createNode(children) {\n return {\n children: children,\n height: 1,\n leaf: true,\n minX: Infinity,\n minY: Infinity,\n maxX: -Infinity,\n maxY: -Infinity\n };\n}\n\n// sort an array so that items come in groups of n unsorted items, with groups sorted between each other;\n// combines selection algorithm with binary divide & conquer approach\n\nfunction multiSelect(arr, left, right, n, compare) {\n var stack = [left, right],\n mid;\n\n while (stack.length) {\n right = stack.pop();\n left = stack.pop();\n\n if (right - left <= n) continue;\n\n mid = left + Math.ceil((right - left) / n / 2) * n;\n quickselect(arr, mid, left, right, compare);\n\n stack.push(left, mid, mid, right);\n }\n}\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.quickselect = factory());\n}(this, (function () { 'use strict';\n\nfunction quickselect(arr, k, left, right, compare) {\n quickselectStep(arr, k, left || 0, right || (arr.length - 1), compare || defaultCompare);\n}\n\nfunction quickselectStep(arr, k, left, right, compare) {\n\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n quickselectStep(arr, k, newLeft, newRight, compare);\n }\n\n var t = arr[k];\n var i = left;\n var j = right;\n\n swap(arr, left, k);\n if (compare(arr[right], t) > 0) swap(arr, left, right);\n\n while (i < j) {\n swap(arr, i, j);\n i++;\n j--;\n while (compare(arr[i], t) < 0) i++;\n while (compare(arr[j], t) > 0) j--;\n }\n\n if (compare(arr[left], t) === 0) swap(arr, left, j);\n else {\n j++;\n swap(arr, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\nfunction defaultCompare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\nreturn quickselect;\n\n})));\n","// extracted by mini-css-extract-plugin","/**\n * @module ol/util\n */\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/**\n * Inherit the prototype methods from one constructor into another.\n *\n * Usage:\n *\n * function ParentClass(a, b) { }\n * ParentClass.prototype.foo = function(a) { }\n *\n * function ChildClass(a, b, c) {\n * // Call parent constructor\n * ParentClass.call(this, a, b);\n * }\n * inherits(ChildClass, ParentClass);\n *\n * var child = new ChildClass('a', 'b', 'see');\n * child.foo(); // This works.\n *\n * @param {!Function} childCtor Child constructor.\n * @param {!Function} parentCtor Parent constructor.\n * @function module:ol.inherits\n * @deprecated\n * @api\n */\nexport function inherits(childCtor, parentCtor) {\n childCtor.prototype = Object.create(parentCtor.prototype);\n childCtor.prototype.constructor = childCtor;\n}\n\n/**\n * Counter for getUid.\n * @type {number}\n * @private\n */\nvar uidCounter_ = 0;\n\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 * @function module:ol.getUid\n * @api\n */\nexport function getUid(obj) {\n return obj.ol_uid || (obj.ol_uid = String(++uidCounter_));\n}\n\n/**\n * OpenLayers version.\n * @type {string}\n */\nexport var VERSION = '5.3.3';\n\n//# sourceMappingURL=util.js.map","/**\n * @module ol/AssertionError\n */\nimport {VERSION} from './util.js';\n\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 = /*@__PURE__*/(function (Error) {\n function AssertionError(code) {\n var path = VERSION === 'latest' ? VERSION : 'v' + VERSION.split('-')[0];\n var message = 'Assertion failed. See https://openlayers.org/en/' + path +\n '/doc/errors/#' + code + ' for details.';\n\n Error.call(this, message);\n\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 /**\n * @type {string}\n */\n this.name = 'AssertionError';\n\n // Re-assign message, see https://github.com/Rich-Harris/buble/issues/40\n this.message = message;\n }\n\n if ( Error ) AssertionError.__proto__ = Error;\n AssertionError.prototype = Object.create( Error && Error.prototype );\n AssertionError.prototype.constructor = AssertionError;\n\n return AssertionError;\n}(Error));\n\nexport default AssertionError;\n\n//# sourceMappingURL=AssertionError.js.map","/**\n * @module ol/CollectionEventType\n */\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\n//# sourceMappingURL=CollectionEventType.js.map","/**\n * @module ol/ObjectEventType\n */\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//# sourceMappingURL=ObjectEventType.js.map","/**\n * @module ol/obj\n */\n\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') ? Object.assign : function(target, var_sources) {\n var arguments$1 = arguments;\n\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n for (var i = 1, ii = arguments.length; i < ii; ++i) {\n var source = arguments$1[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\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\n/**\n * Get an array of property values from an object.\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 function getValues(object) {\n var values = [];\n for (var property in object) {\n values.push(object[property]);\n }\n return values;\n}\n\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\n//# sourceMappingURL=obj.js.map","/**\n * @module ol/events\n */\nimport {clear} from './obj.js';\n\n\n/**\n * Key to use with {@link module:ol/Observable~Observable#unByKey}.\n * @typedef {Object} EventsKey\n * @property {Object} [bindTo]\n * @property {ListenerFunction} [boundListener]\n * @property {boolean} callOnce\n * @property {number} [deleteIndex]\n * @property {ListenerFunction} listener\n * @property {import(\"./events/Target.js\").EventTargetLike} target\n * @property {string} type\n * @api\n */\n\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\n/**\n * @param {EventsKey} listenerObj Listener object.\n * @return {ListenerFunction} Bound listener.\n */\nexport function bindListener(listenerObj) {\n var boundListener = function(evt) {\n var listener = listenerObj.listener;\n var bindTo = listenerObj.bindTo || listenerObj.target;\n if (listenerObj.callOnce) {\n unlistenByKey(listenerObj);\n }\n return listener.call(bindTo, evt);\n };\n listenerObj.boundListener = boundListener;\n return boundListener;\n}\n\n\n/**\n * Finds the matching {@link module:ol/events~EventsKey} in the given listener\n * array.\n *\n * @param {!Array<!EventsKey>} listeners Array of listeners.\n * @param {!Function} listener The listener function.\n * @param {Object=} opt_this The `this` value inside the listener.\n * @param {boolean=} opt_setDeleteIndex Set the deleteIndex on the matching\n * listener, for {@link module:ol/events~unlistenByKey}.\n * @return {EventsKey|undefined} The matching listener object.\n */\nexport function findListener(listeners, listener, opt_this, opt_setDeleteIndex) {\n var listenerObj;\n for (var i = 0, ii = listeners.length; i < ii; ++i) {\n listenerObj = listeners[i];\n if (listenerObj.listener === listener &&\n listenerObj.bindTo === opt_this) {\n if (opt_setDeleteIndex) {\n listenerObj.deleteIndex = i;\n }\n return listenerObj;\n }\n }\n return undefined;\n}\n\n\n/**\n * @param {import(\"./events/Target.js\").EventTargetLike} target Target.\n * @param {string} type Type.\n * @return {Array<EventsKey>|undefined} Listeners.\n */\nexport function getListeners(target, type) {\n var listenerMap = getListenerMap(target);\n return listenerMap ? listenerMap[type] : undefined;\n}\n\n\n/**\n * Get the lookup of listeners.\n * @param {Object} target Target.\n * @param {boolean=} opt_create If a map should be created if it doesn't exist.\n * @return {!Object<string, Array<EventsKey>>} Map of\n * listeners by event type.\n */\nfunction getListenerMap(target, opt_create) {\n var listenerMap = target.ol_lm;\n if (!listenerMap && opt_create) {\n listenerMap = target.ol_lm = {};\n }\n return listenerMap;\n}\n\n\n/**\n * Remove the listener map from a target.\n * @param {Object} target Target.\n */\nfunction removeListenerMap(target) {\n delete target.ol_lm;\n}\n\n\n/**\n * Clean up all listener objects of the given type. All properties on the\n * listener objects will be removed, and if no listeners remain in the listener\n * map, it will be removed from the target.\n * @param {import(\"./events/Target.js\").EventTargetLike} target Target.\n * @param {string} type Type.\n */\nfunction removeListeners(target, type) {\n var listeners = getListeners(target, type);\n if (listeners) {\n for (var i = 0, ii = listeners.length; i < ii; ++i) {\n /** @type {import(\"./events/Target.js\").default} */ (target).\n removeEventListener(type, listeners[i].boundListener);\n clear(listeners[i]);\n }\n listeners.length = 0;\n var listenerMap = getListenerMap(target);\n if (listenerMap) {\n delete listenerMap[type];\n if (Object.keys(listenerMap).length === 0) {\n removeListenerMap(target);\n }\n }\n }\n}\n\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 var listenerMap = getListenerMap(target, true);\n var listeners = listenerMap[type];\n if (!listeners) {\n listeners = listenerMap[type] = [];\n }\n var listenerObj = findListener(listeners, listener, opt_this, false);\n if (listenerObj) {\n if (!opt_once) {\n // Turn one-off listener into a permanent one.\n listenerObj.callOnce = false;\n }\n } else {\n listenerObj = /** @type {EventsKey} */ ({\n bindTo: opt_this,\n callOnce: !!opt_once,\n listener: listener,\n target: target,\n type: type\n });\n /** @type {import(\"./events/Target.js\").default} */ (target).\n addEventListener(type, bindListener(listenerObj));\n listeners.push(listenerObj);\n }\n\n return listenerObj;\n}\n\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\n/**\n * Unregisters 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 * To return a listener, this function needs to be called with the exact same\n * arguments that were used for a previous {@link module:ol/events~listen} call.\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 */\nexport function unlisten(target, type, listener, opt_this) {\n var listeners = getListeners(target, type);\n if (listeners) {\n var listenerObj = findListener(listeners, listener, opt_this, true);\n if (listenerObj) {\n unlistenByKey(listenerObj);\n }\n }\n}\n\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 /** @type {import(\"./events/Target.js\").default} */ (key.target).\n removeEventListener(key.type, key.boundListener);\n var listeners = getListeners(key.target, key.type);\n if (listeners) {\n var i = 'deleteIndex' in key ? key.deleteIndex : listeners.indexOf(key);\n if (i !== -1) {\n listeners.splice(i, 1);\n }\n if (listeners.length === 0) {\n removeListeners(key.target, key.type);\n }\n }\n clear(key);\n }\n}\n\n\n/**\n * Unregisters all 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 * @param {import(\"./events/Target.js\").EventTargetLike} target Target.\n */\nexport function unlistenAll(target) {\n var listenerMap = getListenerMap(target);\n if (listenerMap) {\n for (var type in listenerMap) {\n removeListeners(target, type);\n }\n }\n}\n\n//# sourceMappingURL=events.js.map","/**\n * @module ol/Disposable\n */\n\n/**\n * @classdesc\n * Objects that need to clean up after themselves.\n */\nvar Disposable = function Disposable() {\n /**\n * The object has already been disposed.\n * @type {boolean}\n * @private\n */\n this.disposed_ = false;\n};\n\n/**\n * Clean up.\n */\nDisposable.prototype.dispose = function dispose () {\n if (!this.disposed_) {\n this.disposed_ = true;\n this.disposeInternal();\n }\n};\n\n/**\n * Extension point for disposable objects.\n * @protected\n */\nDisposable.prototype.disposeInternal = function disposeInternal () {};\n\nexport default Disposable;\n\n//# sourceMappingURL=Disposable.js.map","/**\n * @module ol/functions\n */\n\n/**\n * Always returns true.\n * @returns {boolean} true.\n */\nexport function TRUE() {\n return true;\n}\n\n/**\n * Always returns false.\n * @returns {boolean} false.\n */\nexport function FALSE() {\n return false;\n}\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//# sourceMappingURL=functions.js.map","/**\n * @module ol/events/Event\n */\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 Event = function Event(type) {\n\n /**\n * @type {boolean}\n */\n this.propagationStopped;\n\n /**\n * The event type.\n * @type {string}\n * @api\n */\n this.type = type;\n\n /**\n * The event target.\n * @type {Object}\n * @api\n */\n this.target = null;\n};\n\n/**\n * Stop event propagation.\n * @api\n */\nEvent.prototype.preventDefault = function preventDefault () {\n this.propagationStopped = true;\n};\n\n/**\n * Stop event propagation.\n * @api\n */\nEvent.prototype.stopPropagation = function stopPropagation () {\n this.propagationStopped = true;\n};\n\n\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function stopPropagation(evt) {\n evt.stopPropagation();\n}\n\n\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function preventDefault(evt) {\n evt.preventDefault();\n}\n\nexport default Event;\n\n//# sourceMappingURL=Event.js.map","/**\n * @module ol/events/Target\n */\nimport Disposable from '../Disposable.js';\nimport {unlistenAll} from '../events.js';\nimport {VOID} from '../functions.js';\nimport Event from './Event.js';\n\n\n/**\n * @typedef {EventTarget|Target} EventTargetLike\n */\n\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 = /*@__PURE__*/(function (Disposable) {\n function Target() {\n\n Disposable.call(this);\n\n /**\n * @private\n * @type {!Object<string, number>}\n */\n this.pendingRemovals_ = {};\n\n /**\n * @private\n * @type {!Object<string, number>}\n */\n this.dispatching_ = {};\n\n /**\n * @private\n * @type {!Object<string, Array<import(\"../events.js\").ListenerFunction>>}\n */\n this.listeners_ = {};\n\n }\n\n if ( Disposable ) Target.__proto__ = Disposable;\n Target.prototype = Object.create( Disposable && Disposable.prototype );\n Target.prototype.constructor = Target;\n\n /**\n * @param {string} type Type.\n * @param {import(\"../events.js\").ListenerFunction} listener Listener.\n */\n Target.prototype.addEventListener = function addEventListener (type, listener) {\n var listeners = this.listeners_[type];\n if (!listeners) {\n listeners = this.listeners_[type] = [];\n }\n if (listeners.indexOf(listener) === -1) {\n listeners.push(listener);\n }\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 {{type: string,\n * target: (EventTargetLike|undefined),\n * propagationStopped: (boolean|undefined)}|\n * 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 dispatchEvent (event) {\n var evt = typeof event === 'string' ? new Event(event) : event;\n var type = evt.type;\n evt.target = this;\n var listeners = this.listeners_[type];\n var propagate;\n if (listeners) {\n if (!(type in this.dispatching_)) {\n this.dispatching_[type] = 0;\n this.pendingRemovals_[type] = 0;\n }\n ++this.dispatching_[type];\n for (var i = 0, ii = listeners.length; i < ii; ++i) {\n if (listeners[i].call(this, evt) === false || evt.propagationStopped) {\n propagate = false;\n break;\n }\n }\n --this.dispatching_[type];\n if (this.dispatching_[type] === 0) {\n var pendingRemovals = this.pendingRemovals_[type];\n delete this.pendingRemovals_[type];\n while (pendingRemovals--) {\n this.removeEventListener(type, VOID);\n }\n delete this.dispatching_[type];\n }\n return propagate;\n }\n };\n\n /**\n * @inheritDoc\n */\n Target.prototype.disposeInternal = function disposeInternal () {\n unlistenAll(this);\n };\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\").ListenerFunction>} Listeners.\n */\n Target.prototype.getListeners = function getListeners (type) {\n return this.listeners_[type];\n };\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 hasListener (opt_type) {\n return opt_type ?\n opt_type in this.listeners_ :\n Object.keys(this.listeners_).length > 0;\n };\n\n /**\n * @param {string} type Type.\n * @param {import(\"../events.js\").ListenerFunction} listener Listener.\n */\n Target.prototype.removeEventListener = function removeEventListener (type, listener) {\n var listeners = this.listeners_[type];\n if (listeners) {\n var index = listeners.indexOf(listener);\n if (type in this.pendingRemovals_) {\n // make listener a no-op, and remove later in #dispatchEvent()\n listeners[index] = VOID;\n ++this.pendingRemovals_[type];\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));\n\n\nexport default Target;\n\n//# sourceMappingURL=Target.js.map","/**\n * @module ol/events/EventType\n */\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~Event#change\n * @api\n */\n CHANGE: 'change',\n\n CLEAR: 'clear',\n CONTEXTMENU: 'contextmenu',\n CLICK: 'click',\n DBLCLICK: 'dblclick',\n DRAGENTER: 'dragenter',\n DRAGOVER: 'dragover',\n DROP: 'drop',\n ERROR: 'error',\n KEYDOWN: 'keydown',\n KEYPRESS: 'keypress',\n LOAD: 'load',\n MOUSEDOWN: 'mousedown',\n MOUSEMOVE: 'mousemove',\n MOUSEOUT: 'mouseout',\n MOUSEUP: 'mouseup',\n MOUSEWHEEL: 'mousewheel',\n MSPOINTERDOWN: 'MSPointerDown',\n RESIZE: 'resize',\n TOUCHSTART: 'touchstart',\n TOUCHMOVE: 'touchmove',\n TOUCHEND: 'touchend',\n WHEEL: 'wheel'\n};\n\n//# sourceMappingURL=EventType.js.map","/**\n * @module ol/Observable\n */\nimport {listen, unlistenByKey, unlisten, listenOnce} from './events.js';\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\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\").Event\n * @api\n */\nvar Observable = /*@__PURE__*/(function (EventTarget) {\n function Observable() {\n\n EventTarget.call(this);\n\n /**\n * @private\n * @type {number}\n */\n this.revision_ = 0;\n\n }\n\n if ( EventTarget ) Observable.__proto__ = EventTarget;\n Observable.prototype = Object.create( EventTarget && EventTarget.prototype );\n Observable.prototype.constructor = Observable;\n\n /**\n * Increases the revision counter and dispatches a 'change' event.\n * @api\n */\n Observable.prototype.changed = function changed () {\n ++this.revision_;\n this.dispatchEvent(EventType.CHANGE);\n };\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 getRevision () {\n return this.revision_;\n };\n\n /**\n * Listen for a certain type of event.\n * @param {string|Array<string>} type The event type or array of event types.\n * @param {function(?): ?} 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 */\n Observable.prototype.on = function on (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 } else {\n return listen(this, /** @type {string} */ (type), listener);\n }\n };\n\n /**\n * Listen once for a certain type of event.\n * @param {string|Array<string>} type The event type or array of event types.\n * @param {function(?): ?} 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 */\n Observable.prototype.once = function once (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] = listenOnce(this, type[i], listener);\n }\n return keys;\n } else {\n return listenOnce(this, /** @type {string} */ (type), listener);\n }\n };\n\n /**\n * Unlisten for a certain type of event.\n * @param {string|Array<string>} type The event type or array of event types.\n * @param {function(?): ?} listener The listener function.\n * @api\n */\n Observable.prototype.un = function un (type, listener) {\n if (Array.isArray(type)) {\n for (var i = 0, ii = type.length; i < ii; ++i) {\n unlisten(this, type[i], listener);\n }\n return;\n } else {\n unlisten(this, /** @type {string} */ (type), listener);\n }\n };\n\n return Observable;\n}(EventTarget));\n\n\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 } else {\n unlistenByKey(/** @type {import(\"./events.js\").EventsKey} */ (key));\n }\n}\n\n\nexport default Observable;\n\n//# sourceMappingURL=Observable.js.map","/**\n * @module ol/Object\n */\nimport {getUid} from './util.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport Observable from './Observable.js';\nimport Event from './events/Event.js';\nimport {assign} from './obj.js';\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Object~BaseObject} instances are instances of this type.\n */\nexport var ObjectEvent = /*@__PURE__*/(function (Event) {\n function ObjectEvent(type, key, oldValue) {\n Event.call(this, type);\n\n /**\n * The name of the property whose value is changing.\n * @type {string}\n * @api\n */\n this.key = key;\n\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\n }\n\n if ( Event ) ObjectEvent.__proto__ = Event;\n ObjectEvent.prototype = Object.create( Event && Event.prototype );\n ObjectEvent.prototype.constructor = ObjectEvent;\n\n return ObjectEvent;\n}(Event));\n\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 = /*@__PURE__*/(function (Observable) {\n function BaseObject(opt_values) {\n Observable.call(this);\n\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 /**\n * @private\n * @type {!Object<string, *>}\n */\n this.values_ = {};\n\n if (opt_values !== undefined) {\n this.setProperties(opt_values);\n }\n }\n\n if ( Observable ) BaseObject.__proto__ = Observable;\n BaseObject.prototype = Object.create( Observable && Observable.prototype );\n BaseObject.prototype.constructor = BaseObject;\n\n /**\n * Gets a value.\n * @param {string} key Key name.\n * @return {*} Value.\n * @api\n */\n BaseObject.prototype.get = function get (key) {\n var value;\n if (this.values_.hasOwnProperty(key)) {\n value = this.values_[key];\n }\n return value;\n };\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 getKeys () {\n return Object.keys(this.values_);\n };\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 getProperties () {\n return assign({}, this.values_);\n };\n\n /**\n * @param {string} key Key name.\n * @param {*} oldValue Old value.\n */\n BaseObject.prototype.notify = function notify (key, oldValue) {\n var eventType;\n eventType = getChangeEventType(key);\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n eventType = ObjectEventType.PROPERTYCHANGE;\n this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n };\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 set (key, value, opt_silent) {\n if (opt_silent) {\n this.values_[key] = value;\n } else {\n var oldValue = this.values_[key];\n this.values_[key] = value;\n if (oldValue !== value) {\n this.notify(key, oldValue);\n }\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 setProperties (values, opt_silent) {\n for (var key in values) {\n this.set(key, values[key], opt_silent);\n }\n };\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 unset (key, opt_silent) {\n if (key in this.values_) {\n var oldValue = this.values_[key];\n delete this.values_[key];\n if (!opt_silent) {\n this.notify(key, oldValue);\n }\n }\n };\n\n return BaseObject;\n}(Observable));\n\n\n/**\n * @type {Object<string, string>}\n */\nvar changeEventTypeCache = {};\n\n\n/**\n * @param {string} key Key name.\n * @return {string} Change name.\n */\nexport function getChangeEventType(key) {\n return changeEventTypeCache.hasOwnProperty(key) ?\n changeEventTypeCache[key] :\n (changeEventTypeCache[key] = 'change:' + key);\n}\n\n\nexport default BaseObject;\n\n//# sourceMappingURL=Object.js.map","/**\n * @module ol/Collection\n */\nimport AssertionError from './AssertionError.js';\nimport CollectionEventType from './CollectionEventType.js';\nimport BaseObject from './Object.js';\nimport Event from './events/Event.js';\n\n\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n LENGTH: 'length'\n};\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Collection~Collection} instances are instances of this\n * type.\n */\nexport var CollectionEvent = /*@__PURE__*/(function (Event) {\n function CollectionEvent(type, opt_element) {\n Event.call(this, type);\n\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 }\n\n if ( Event ) CollectionEvent.__proto__ = Event;\n CollectionEvent.prototype = Object.create( Event && Event.prototype );\n CollectionEvent.prototype.constructor = CollectionEvent;\n\n return CollectionEvent;\n}(Event));\n\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/**\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 = /*@__PURE__*/(function (BaseObject) {\n function Collection(opt_array, opt_options) {\n\n BaseObject.call(this);\n\n var options = opt_options || {};\n\n /**\n * @private\n * @type {boolean}\n */\n this.unique_ = !!options.unique;\n\n /**\n * @private\n * @type {!Array<T>}\n */\n this.array_ = opt_array ? opt_array : [];\n\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\n this.updateLength_();\n\n }\n\n if ( BaseObject ) Collection.__proto__ = BaseObject;\n Collection.prototype = Object.create( BaseObject && BaseObject.prototype );\n Collection.prototype.constructor = Collection;\n\n /**\n * Remove all elements from the collection.\n * @api\n */\n Collection.prototype.clear = function clear () {\n while (this.getLength() > 0) {\n this.pop();\n }\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 extend (arr) {\n for (var i = 0, ii = arr.length; i < ii; ++i) {\n this.push(arr[i]);\n }\n return this;\n };\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 forEach (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 /**\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 getArray () {\n return this.array_;\n };\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 item (index) {\n return this.array_[index];\n };\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 getLength () {\n return this.get(Property.LENGTH);\n };\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 insertAt (index, elem) {\n if (this.unique_) {\n this.assertUnique_(elem);\n }\n this.array_.splice(index, 0, elem);\n this.updateLength_();\n this.dispatchEvent(\n new CollectionEvent(CollectionEventType.ADD, elem));\n };\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 pop () {\n return this.removeAt(this.getLength() - 1);\n };\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 push (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 /**\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 remove (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 /**\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 removeAt (index) {\n var prev = this.array_[index];\n this.array_.splice(index, 1);\n this.updateLength_();\n this.dispatchEvent(new CollectionEvent(CollectionEventType.REMOVE, prev));\n return prev;\n };\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 setAt (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(\n new CollectionEvent(CollectionEventType.REMOVE, prev));\n this.dispatchEvent(\n new CollectionEvent(CollectionEventType.ADD, elem));\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 /**\n * @private\n */\n Collection.prototype.updateLength_ = function updateLength_ () {\n this.set(Property.LENGTH, this.array_.length);\n };\n\n /**\n * @private\n * @param {T} elem Element.\n * @param {number=} opt_except Optional index to ignore.\n */\n Collection.prototype.assertUnique_ = function assertUnique_ (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\n return Collection;\n}(BaseObject));\n\n\nexport default Collection;\n\n//# sourceMappingURL=Collection.js.map","/**\n * @module ol/MapEvent\n */\nimport Event from './events/Event.js';\n\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 = /*@__PURE__*/(function (Event) {\n function MapEvent(type, map, opt_frameState) {\n\n Event.call(this, type);\n\n /**\n * The map where the event occurred.\n * @type {import(\"./PluggableMap.js\").default}\n * @api\n */\n this.map = map;\n\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\n }\n\n if ( Event ) MapEvent.__proto__ = Event;\n MapEvent.prototype = Object.create( Event && Event.prototype );\n MapEvent.prototype.constructor = MapEvent;\n\n return MapEvent;\n}(Event));\n\nexport default MapEvent;\n\n//# sourceMappingURL=MapEvent.js.map","/**\n * @module ol/MapBrowserEvent\n */\nimport MapEvent from './MapEvent.js';\n\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 */\nvar MapBrowserEvent = /*@__PURE__*/(function (MapEvent) {\n function MapBrowserEvent(type, map, browserEvent, opt_dragging, opt_frameState) {\n\n MapEvent.call(this, type, map, opt_frameState);\n\n /**\n * The original browser event.\n * @const\n * @type {Event}\n * @api\n */\n this.originalEvent = browserEvent;\n\n /**\n * The map pixel relative to the viewport corresponding to the original browser event.\n * @type {import(\"./pixel.js\").Pixel}\n * @api\n */\n this.pixel = map.getEventPixel(browserEvent);\n\n /**\n * The coordinate in view projection corresponding to the original browser event.\n * @type {import(\"./coordinate.js\").Coordinate}\n * @api\n */\n this.coordinate = map.getCoordinateFromPixel(this.pixel);\n\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\n }\n\n if ( MapEvent ) MapBrowserEvent.__proto__ = MapEvent;\n MapBrowserEvent.prototype = Object.create( MapEvent && MapEvent.prototype );\n MapBrowserEvent.prototype.constructor = MapBrowserEvent;\n\n /**\n * Prevents the default browser action.\n * See https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault.\n * @override\n * @api\n */\n MapBrowserEvent.prototype.preventDefault = function preventDefault () {\n MapEvent.prototype.preventDefault.call(this);\n 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 * @override\n * @api\n */\n MapBrowserEvent.prototype.stopPropagation = function stopPropagation () {\n MapEvent.prototype.stopPropagation.call(this);\n this.originalEvent.stopPropagation();\n };\n\n return MapBrowserEvent;\n}(MapEvent));\n\n\nexport default MapBrowserEvent;\n\n//# sourceMappingURL=MapBrowserEvent.js.map","/**\n * @module ol/has\n */\n\nvar ua = typeof navigator !== '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/**\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/**\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/**\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\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 = window.devicePixelRatio || 1;\n\n\n/**\n * True if the browser's Canvas implementation implements {get,set}LineDash.\n * @type {boolean}\n */\nexport var CANVAS_LINE_DASH = function() {\n var has = false;\n try {\n has = !!document.createElement('canvas').getContext('2d').setLineDash;\n } catch (e) {\n // pass\n }\n return has;\n}();\n\n\n/**\n * Is HTML5 geolocation supported in the current browser?\n * @const\n * @type {boolean}\n * @api\n */\nexport var GEOLOCATION = 'geolocation' in navigator;\n\n\n/**\n * True if browser supports touch events.\n * @const\n * @type {boolean}\n * @api\n */\nexport var TOUCH = 'ontouchstart' in window;\n\n\n/**\n * True if browser supports pointer events.\n * @const\n * @type {boolean}\n */\nexport var POINTER = 'PointerEvent' in window;\n\n\n/**\n * True if browser supports ms pointer events (IE 10).\n * @const\n * @type {boolean}\n */\nexport var MSPOINTER = !!(navigator.msPointerEnabled);\n\n\nexport {HAS as WEBGL} from './webgl.js';\n\n//# sourceMappingURL=has.js.map","/**\n * @module ol/MapBrowserEventType\n */\nimport EventType from './events/EventType.js';\n\n/**\n * Constants for event names.\n * @enum {string}\n */\nexport default {\n\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 /**\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 /**\n * A true double click, with no dragging.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#dblclick\n * @api\n */\n DBLCLICK: EventType.DBLCLICK,\n\n /**\n * Triggered when a pointer is dragged.\n * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointerdrag\n * @api\n */\n POINTERDRAG: 'pointerdrag',\n\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\n POINTERDOWN: 'pointerdown',\n POINTERUP: 'pointerup',\n POINTEROVER: 'pointerover',\n POINTEROUT: 'pointerout',\n POINTERENTER: 'pointerenter',\n POINTERLEAVE: 'pointerleave',\n POINTERCANCEL: 'pointercancel'\n};\n\n//# sourceMappingURL=MapBrowserEventType.js.map","/**\n * @module ol/MapBrowserPointerEvent\n */\nimport MapBrowserEvent from './MapBrowserEvent.js';\n\nvar MapBrowserPointerEvent = /*@__PURE__*/(function (MapBrowserEvent) {\n function MapBrowserPointerEvent(type, map, pointerEvent, opt_dragging, opt_frameState) {\n\n MapBrowserEvent.call(this, type, map, pointerEvent.originalEvent, opt_dragging, opt_frameState);\n\n /**\n * @const\n * @type {import(\"./pointer/PointerEvent.js\").default}\n */\n this.pointerEvent = pointerEvent;\n\n }\n\n if ( MapBrowserEvent ) MapBrowserPointerEvent.__proto__ = MapBrowserEvent;\n MapBrowserPointerEvent.prototype = Object.create( MapBrowserEvent && MapBrowserEvent.prototype );\n MapBrowserPointerEvent.prototype.constructor = MapBrowserPointerEvent;\n\n return MapBrowserPointerEvent;\n}(MapBrowserEvent));\n\nexport default MapBrowserPointerEvent;\n\n//# sourceMappingURL=MapBrowserPointerEvent.js.map","/**\n * @module ol/pointer/EventType\n */\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\n//# sourceMappingURL=EventType.js.map","/**\n * @module ol/pointer/EventSource\n */\n\nvar EventSource = function EventSource(dispatcher, mapping) {\n\n /**\n * @type {import(\"./PointerEventHandler.js\").default}\n */\n this.dispatcher = dispatcher;\n\n /**\n * @private\n * @const\n * @type {!Object<string, function(Event)>}\n */\n this.mapping_ = mapping;\n};\n\n/**\n * List of events supported by this source.\n * @return {Array<string>} Event names\n */\nEventSource.prototype.getEvents = function getEvents () {\n return Object.keys(this.mapping_);\n};\n\n/**\n * Returns the handler that should handle a given event type.\n * @param {string} eventType The event type.\n * @return {function(Event)} Handler\n */\nEventSource.prototype.getHandlerForEvent = function getHandlerForEvent (eventType) {\n return this.mapping_[eventType];\n};\n\nexport default EventSource;\n\n//# sourceMappingURL=EventSource.js.map","/**\n * @module ol/pointer/MouseSource\n */\n\n// Based on https://github.com/Polymer/PointerEvents\n\n// Copyright (c) 2013 The Polymer Authors. 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\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY 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\nimport EventSource from './EventSource.js';\n\n\n/**\n * @type {number}\n */\nexport var POINTER_ID = 1;\n\n\n/**\n * @type {string}\n */\nexport var POINTER_TYPE = 'mouse';\n\n\n/**\n * Radius around touchend that swallows mouse events.\n *\n * @type {number}\n */\nvar DEDUP_DIST = 25;\n\n/**\n * Handler for `mousedown`.\n *\n * @this {MouseSource}\n * @param {MouseEvent} inEvent The in event.\n */\nfunction mousedown(inEvent) {\n if (!this.isEventSimulatedFromTouch_(inEvent)) {\n // TODO(dfreedman) workaround for some elements not sending mouseup\n // http://crbug/149091\n if (POINTER_ID.toString() in this.pointerMap) {\n this.cancel(inEvent);\n }\n var e = prepareEvent(inEvent, this.dispatcher);\n this.pointerMap[POINTER_ID.toString()] = inEvent;\n this.dispatcher.down(e, inEvent);\n }\n}\n\n/**\n * Handler for `mousemove`.\n *\n * @this {MouseSource}\n * @param {MouseEvent} inEvent The in event.\n */\nfunction mousemove(inEvent) {\n if (!this.isEventSimulatedFromTouch_(inEvent)) {\n var e = prepareEvent(inEvent, this.dispatcher);\n this.dispatcher.move(e, inEvent);\n }\n}\n\n/**\n * Handler for `mouseup`.\n *\n * @this {MouseSource}\n * @param {MouseEvent} inEvent The in event.\n */\nfunction mouseup(inEvent) {\n if (!this.isEventSimulatedFromTouch_(inEvent)) {\n var p = this.pointerMap[POINTER_ID.toString()];\n\n if (p && p.button === inEvent.button) {\n var e = prepareEvent(inEvent, this.dispatcher);\n this.dispatcher.up(e, inEvent);\n this.cleanupMouse();\n }\n }\n}\n\n/**\n * Handler for `mouseover`.\n *\n * @this {MouseSource}\n * @param {MouseEvent} inEvent The in event.\n */\nfunction mouseover(inEvent) {\n if (!this.isEventSimulatedFromTouch_(inEvent)) {\n var e = prepareEvent(inEvent, this.dispatcher);\n this.dispatcher.enterOver(e, inEvent);\n }\n}\n\n/**\n * Handler for `mouseout`.\n *\n * @this {MouseSource}\n * @param {MouseEvent} inEvent The in event.\n */\nfunction mouseout(inEvent) {\n if (!this.isEventSimulatedFromTouch_(inEvent)) {\n var e = prepareEvent(inEvent, this.dispatcher);\n this.dispatcher.leaveOut(e, inEvent);\n }\n}\n\n\nvar MouseSource = /*@__PURE__*/(function (EventSource) {\n function MouseSource(dispatcher) {\n var mapping = {\n 'mousedown': mousedown,\n 'mousemove': mousemove,\n 'mouseup': mouseup,\n 'mouseover': mouseover,\n 'mouseout': mouseout\n };\n EventSource.call(this, dispatcher, mapping);\n\n /**\n * @const\n * @type {!Object<string, Event|Object>}\n */\n this.pointerMap = dispatcher.pointerMap;\n\n /**\n * @const\n * @type {Array<import(\"../pixel.js\").Pixel>}\n */\n this.lastTouches = [];\n }\n\n if ( EventSource ) MouseSource.__proto__ = EventSource;\n MouseSource.prototype = Object.create( EventSource && EventSource.prototype );\n MouseSource.prototype.constructor = MouseSource;\n\n /**\n * Detect if a mouse event was simulated from a touch by\n * checking if previously there was a touch event at the\n * same position.\n *\n * FIXME - Known problem with the native Android browser on\n * Samsung GT-I9100 (Android 4.1.2):\n * In case the page is scrolled, this function does not work\n * correctly when a canvas is used (WebGL or canvas renderer).\n * Mouse listeners on canvas elements (for this browser), create\n * two mouse events: One 'good' and one 'bad' one (on other browsers or\n * when a div is used, there is only one event). For the 'bad' one,\n * clientX/clientY and also pageX/pageY are wrong when the page\n * is scrolled. Because of that, this function can not detect if\n * the events were simulated from a touch event. As result, a\n * pointer event at a wrong position is dispatched, which confuses\n * the map interactions.\n * It is unclear, how one can get the correct position for the event\n * or detect that the positions are invalid.\n *\n * @private\n * @param {MouseEvent} inEvent The in event.\n * @return {boolean} True, if the event was generated by a touch.\n */\n MouseSource.prototype.isEventSimulatedFromTouch_ = function isEventSimulatedFromTouch_ (inEvent) {\n var lts = this.lastTouches;\n var x = inEvent.clientX;\n var y = inEvent.clientY;\n for (var i = 0, l = lts.length, t = (void 0); i < l && (t = lts[i]); i++) {\n // simulated mouse events will be swallowed near a primary touchend\n var dx = Math.abs(x - t[0]);\n var dy = Math.abs(y - t[1]);\n if (dx <= DEDUP_DIST && dy <= DEDUP_DIST) {\n return true;\n }\n }\n return false;\n };\n\n /**\n * Dispatches a `pointercancel` event.\n *\n * @param {Event} inEvent The in event.\n */\n MouseSource.prototype.cancel = function cancel (inEvent) {\n var e = prepareEvent(inEvent, this.dispatcher);\n this.dispatcher.cancel(e, inEvent);\n this.cleanupMouse();\n };\n\n /**\n * Remove the mouse from the list of active pointers.\n */\n MouseSource.prototype.cleanupMouse = function cleanupMouse () {\n delete this.pointerMap[POINTER_ID.toString()];\n };\n\n return MouseSource;\n}(EventSource));\n\n\n/**\n * Creates a copy of the original event that will be used\n * for the fake pointer event.\n *\n * @param {Event} inEvent The in event.\n * @param {import(\"./PointerEventHandler.js\").default} dispatcher Event handler.\n * @return {Object} The copied event.\n */\nexport function prepareEvent(inEvent, dispatcher) {\n var e = dispatcher.cloneEvent(inEvent, inEvent);\n\n // forward mouse preventDefault\n var pd = e.preventDefault;\n e.preventDefault = function() {\n inEvent.preventDefault();\n pd();\n };\n\n e.pointerId = POINTER_ID;\n e.isPrimary = true;\n e.pointerType = POINTER_TYPE;\n\n return e;\n}\n\n\nexport default MouseSource;\n\n//# sourceMappingURL=MouseSource.js.map","/**\n * @module ol/pointer/MsSource\n */\n// Based on https://github.com/Polymer/PointerEvents\n\n// Copyright (c) 2013 The Polymer Authors. 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\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY 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\nimport EventSource from './EventSource.js';\n\n\n/**\n * @const\n * @type {Array<string>}\n */\nvar POINTER_TYPES = [\n '',\n 'unavailable',\n 'touch',\n 'pen',\n 'mouse'\n];\n\n/**\n * Handler for `msPointerDown`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msPointerDown(inEvent) {\n this.pointerMap[inEvent.pointerId.toString()] = inEvent;\n var e = this.prepareEvent_(inEvent);\n this.dispatcher.down(e, inEvent);\n}\n\n/**\n * Handler for `msPointerMove`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msPointerMove(inEvent) {\n var e = this.prepareEvent_(inEvent);\n this.dispatcher.move(e, inEvent);\n}\n\n/**\n * Handler for `msPointerUp`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msPointerUp(inEvent) {\n var e = this.prepareEvent_(inEvent);\n this.dispatcher.up(e, inEvent);\n this.cleanup(inEvent.pointerId);\n}\n\n/**\n * Handler for `msPointerOut`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msPointerOut(inEvent) {\n var e = this.prepareEvent_(inEvent);\n this.dispatcher.leaveOut(e, inEvent);\n}\n\n/**\n * Handler for `msPointerOver`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msPointerOver(inEvent) {\n var e = this.prepareEvent_(inEvent);\n this.dispatcher.enterOver(e, inEvent);\n}\n\n/**\n * Handler for `msPointerCancel`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msPointerCancel(inEvent) {\n var e = this.prepareEvent_(inEvent);\n this.dispatcher.cancel(e, inEvent);\n this.cleanup(inEvent.pointerId);\n}\n\n/**\n * Handler for `msLostPointerCapture`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msLostPointerCapture(inEvent) {\n var e = this.dispatcher.makeEvent('lostpointercapture', inEvent, inEvent);\n this.dispatcher.dispatchEvent(e);\n}\n\n/**\n * Handler for `msGotPointerCapture`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msGotPointerCapture(inEvent) {\n var e = this.dispatcher.makeEvent('gotpointercapture', inEvent, inEvent);\n this.dispatcher.dispatchEvent(e);\n}\n\nvar MsSource = /*@__PURE__*/(function (EventSource) {\n function MsSource(dispatcher) {\n var mapping = {\n 'MSPointerDown': msPointerDown,\n 'MSPointerMove': msPointerMove,\n 'MSPointerUp': msPointerUp,\n 'MSPointerOut': msPointerOut,\n 'MSPointerOver': msPointerOver,\n 'MSPointerCancel': msPointerCancel,\n 'MSGotPointerCapture': msGotPointerCapture,\n 'MSLostPointerCapture': msLostPointerCapture\n };\n EventSource.call(this, dispatcher, mapping);\n\n /**\n * @const\n * @type {!Object<string, MSPointerEvent|Object>}\n */\n this.pointerMap = dispatcher.pointerMap;\n }\n\n if ( EventSource ) MsSource.__proto__ = EventSource;\n MsSource.prototype = Object.create( EventSource && EventSource.prototype );\n MsSource.prototype.constructor = MsSource;\n\n /**\n * Creates a copy of the original event that will be used\n * for the fake pointer event.\n *\n * @private\n * @param {MSPointerEvent} inEvent The in event.\n * @return {Object} The copied event.\n */\n MsSource.prototype.prepareEvent_ = function prepareEvent_ (inEvent) {\n /** @type {MSPointerEvent|Object} */\n var e = inEvent;\n if (typeof inEvent.pointerType === 'number') {\n e = this.dispatcher.cloneEvent(inEvent, inEvent);\n e.pointerType = POINTER_TYPES[inEvent.pointerType];\n }\n\n return e;\n };\n\n /**\n * Remove this pointer from the list of active pointers.\n * @param {number} pointerId Pointer identifier.\n */\n MsSource.prototype.cleanup = function cleanup (pointerId) {\n delete this.pointerMap[pointerId.toString()];\n };\n\n return MsSource;\n}(EventSource));\n\nexport default MsSource;\n\n//# sourceMappingURL=MsSource.js.map","/**\n * @module ol/pointer/NativeSource\n */\n\n// Based on https://github.com/Polymer/PointerEvents\n\n// Copyright (c) 2013 The Polymer Authors. 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\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY 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\nimport EventSource from './EventSource.js';\n\n/**\n * Handler for `pointerdown`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction pointerDown(inEvent) {\n this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `pointermove`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction pointerMove(inEvent) {\n this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `pointerup`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction pointerUp(inEvent) {\n this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `pointerout`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction pointerOut(inEvent) {\n this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `pointerover`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction pointerOver(inEvent) {\n this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `pointercancel`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction pointerCancel(inEvent) {\n this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `lostpointercapture`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction lostPointerCapture(inEvent) {\n this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `gotpointercapture`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction gotPointerCapture(inEvent) {\n this.dispatcher.fireNativeEvent(inEvent);\n}\n\nvar NativeSource = /*@__PURE__*/(function (EventSource) {\n function NativeSource(dispatcher) {\n var mapping = {\n 'pointerdown': pointerDown,\n 'pointermove': pointerMove,\n 'pointerup': pointerUp,\n 'pointerout': pointerOut,\n 'pointerover': pointerOver,\n 'pointercancel': pointerCancel,\n 'gotpointercapture': gotPointerCapture,\n 'lostpointercapture': lostPointerCapture\n };\n EventSource.call(this, dispatcher, mapping);\n }\n\n if ( EventSource ) NativeSource.__proto__ = EventSource;\n NativeSource.prototype = Object.create( EventSource && EventSource.prototype );\n NativeSource.prototype.constructor = NativeSource;\n\n return NativeSource;\n}(EventSource));\n\nexport default NativeSource;\n\n//# sourceMappingURL=NativeSource.js.map","/**\n * @module ol/pointer/PointerEvent\n */\n\n// Based on https://github.com/Polymer/PointerEvents\n\n// Copyright (c) 2013 The Polymer Authors. 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\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY 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\nimport _Event from '../events/Event.js';\n\n\n/**\n * Is the `buttons` property supported?\n * @type {boolean}\n */\nvar HAS_BUTTONS = false;\n\n\nvar PointerEvent = /*@__PURE__*/(function (_Event) {\n function PointerEvent(type, originalEvent, opt_eventDict) {\n _Event.call(this, type);\n\n /**\n * @const\n * @type {Event}\n */\n this.originalEvent = originalEvent;\n\n var eventDict = opt_eventDict ? opt_eventDict : {};\n\n /**\n * @type {number}\n */\n this.buttons = getButtons(eventDict);\n\n /**\n * @type {number}\n */\n this.pressure = getPressure(eventDict, this.buttons);\n\n // MouseEvent related properties\n\n /**\n * @type {boolean}\n */\n this.bubbles = 'bubbles' in eventDict ? eventDict['bubbles'] : false;\n\n /**\n * @type {boolean}\n */\n this.cancelable = 'cancelable' in eventDict ? eventDict['cancelable'] : false;\n\n /**\n * @type {Object}\n */\n this.view = 'view' in eventDict ? eventDict['view'] : null;\n\n /**\n * @type {number}\n */\n this.detail = 'detail' in eventDict ? eventDict['detail'] : null;\n\n /**\n * @type {number}\n */\n this.screenX = 'screenX' in eventDict ? eventDict['screenX'] : 0;\n\n /**\n * @type {number}\n */\n this.screenY = 'screenY' in eventDict ? eventDict['screenY'] : 0;\n\n /**\n * @type {number}\n */\n this.clientX = 'clientX' in eventDict ? eventDict['clientX'] : 0;\n\n /**\n * @type {number}\n */\n this.clientY = 'clientY' in eventDict ? eventDict['clientY'] : 0;\n\n /**\n * @type {boolean}\n */\n this.ctrlKey = 'ctrlKey' in eventDict ? eventDict['ctrlKey'] : false;\n\n /**\n * @type {boolean}\n */\n this.altKey = 'altKey' in eventDict ? eventDict['altKey'] : false;\n\n /**\n * @type {boolean}\n */\n this.shiftKey = 'shiftKey' in eventDict ? eventDict['shiftKey'] : false;\n\n /**\n * @type {boolean}\n */\n this.metaKey = 'metaKey' in eventDict ? eventDict['metaKey'] : false;\n\n /**\n * @type {number}\n */\n this.button = 'button' in eventDict ? eventDict['button'] : 0;\n\n /**\n * @type {Node}\n */\n this.relatedTarget = 'relatedTarget' in eventDict ?\n eventDict['relatedTarget'] : null;\n\n // PointerEvent related properties\n\n /**\n * @const\n * @type {number}\n */\n this.pointerId = 'pointerId' in eventDict ? eventDict['pointerId'] : 0;\n\n /**\n * @type {number}\n */\n this.width = 'width' in eventDict ? eventDict['width'] : 0;\n\n /**\n * @type {number}\n */\n this.height = 'height' in eventDict ? eventDict['height'] : 0;\n\n /**\n * @type {number}\n */\n this.tiltX = 'tiltX' in eventDict ? eventDict['tiltX'] : 0;\n\n /**\n * @type {number}\n */\n this.tiltY = 'tiltY' in eventDict ? eventDict['tiltY'] : 0;\n\n /**\n * @type {string}\n */\n this.pointerType = 'pointerType' in eventDict ? eventDict['pointerType'] : '';\n\n /**\n * @type {number}\n */\n this.hwTimestamp = 'hwTimestamp' in eventDict ? eventDict['hwTimestamp'] : 0;\n\n /**\n * @type {boolean}\n */\n this.isPrimary = 'isPrimary' in eventDict ? eventDict['isPrimary'] : false;\n\n // keep the semantics of preventDefault\n if (originalEvent.preventDefault) {\n this.preventDefault = function() {\n originalEvent.preventDefault();\n };\n }\n }\n\n if ( _Event ) PointerEvent.__proto__ = _Event;\n PointerEvent.prototype = Object.create( _Event && _Event.prototype );\n PointerEvent.prototype.constructor = PointerEvent;\n\n return PointerEvent;\n}(_Event));\n\n\n/**\n * @param {Object<string, ?>} eventDict The event dictionary.\n * @return {number} Button indicator.\n */\nfunction getButtons(eventDict) {\n // According to the w3c spec,\n // http://www.w3.org/TR/DOM-Level-3-Events/#events-MouseEvent-button\n // MouseEvent.button == 0 can mean either no mouse button depressed, or the\n // left mouse button depressed.\n //\n // As of now, the only way to distinguish between the two states of\n // MouseEvent.button is by using the deprecated MouseEvent.which property, as\n // this maps mouse buttons to positive integers > 0, and uses 0 to mean that\n // no mouse button is held.\n //\n // MouseEvent.which is derived from MouseEvent.button at MouseEvent creation,\n // but initMouseEvent does not expose an argument with which to set\n // MouseEvent.which. Calling initMouseEvent with a buttonArg of 0 will set\n // MouseEvent.button == 0 and MouseEvent.which == 1, breaking the expectations\n // of app developers.\n //\n // The only way to propagate the correct state of MouseEvent.which and\n // MouseEvent.button to a new MouseEvent.button == 0 and MouseEvent.which == 0\n // is to call initMouseEvent with a buttonArg value of -1.\n //\n // This is fixed with DOM Level 4's use of buttons\n var buttons;\n if (eventDict.buttons || HAS_BUTTONS) {\n buttons = eventDict.buttons;\n } else {\n switch (eventDict.which) {\n case 1: buttons = 1; break;\n case 2: buttons = 4; break;\n case 3: buttons = 2; break;\n default: buttons = 0;\n }\n }\n return buttons;\n}\n\n\n/**\n * @param {Object<string, ?>} eventDict The event dictionary.\n * @param {number} buttons Button indicator.\n * @return {number} The pressure.\n */\nfunction getPressure(eventDict, buttons) {\n // Spec requires that pointers without pressure specified use 0.5 for down\n // state and 0 for up state.\n var pressure = 0;\n if (eventDict.pressure) {\n pressure = eventDict.pressure;\n } else {\n pressure = buttons ? 0.5 : 0;\n }\n return pressure;\n}\n\n\n/**\n * Checks if the `buttons` property is supported.\n */\n(function() {\n try {\n var ev = new MouseEvent('click', {buttons: 1});\n HAS_BUTTONS = ev.buttons === 1;\n } catch (e) {\n // pass\n }\n})();\n\nexport default PointerEvent;\n\n//# sourceMappingURL=PointerEvent.js.map","/**\n * @module ol/array\n */\n\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\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\n if (cmp < 0.0) { /* Too low. */\n low = mid + 1;\n\n } else { /* Key found or too high */\n high = mid;\n found = !cmp;\n }\n }\n\n /* Key not found. */\n return found ? low : ~low;\n}\n\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\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\n/**\n * @param {Array<number>} arr Array.\n * @param {number} target Target.\n * @param {number} direction 0 means return the nearest, > 0\n * means return the largest nearest, < 0 means return the\n * 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 } else if (target <= arr[n - 1]) {\n return n - 1;\n } else {\n var i;\n if (direction > 0) {\n for (i = 1; i < n; ++i) {\n if (arr[i] < target) {\n return i - 1;\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 } else {\n for (i = 1; i < n; ++i) {\n if (arr[i] == target) {\n return i;\n } else if (arr[i] < target) {\n if (arr[i - 1] - target < target - arr[i]) {\n return i - 1;\n } else {\n return i;\n }\n }\n }\n }\n return n - 1;\n }\n}\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\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\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\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\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\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\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\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\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\n//# sourceMappingURL=array.js.map","/**\n * @module ol/pointer/TouchSource\n */\n\n// Based on https://github.com/Polymer/PointerEvents\n\n// Copyright (c) 2013 The Polymer Authors. 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\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY 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\nimport {remove} from '../array.js';\nimport EventSource from './EventSource.js';\nimport {POINTER_ID} from './MouseSource.js';\n\n\n/**\n * @type {number}\n */\nvar CLICK_COUNT_TIMEOUT = 200;\n\n/**\n * @type {string}\n */\nvar POINTER_TYPE = 'touch';\n\n/**\n * Handler for `touchstart`, triggers `pointerover`,\n * `pointerenter` and `pointerdown` events.\n *\n * @this {TouchSource}\n * @param {TouchEvent} inEvent The in event.\n */\nfunction touchstart(inEvent) {\n this.vacuumTouches_(inEvent);\n this.setPrimaryTouch_(inEvent.changedTouches[0]);\n this.dedupSynthMouse_(inEvent);\n this.clickCount_++;\n this.processTouches_(inEvent, this.overDown_);\n}\n\n/**\n * Handler for `touchmove`.\n *\n * @this {TouchSource}\n * @param {TouchEvent} inEvent The in event.\n */\nfunction touchmove(inEvent) {\n this.processTouches_(inEvent, this.moveOverOut_);\n}\n\n/**\n * Handler for `touchend`, triggers `pointerup`,\n * `pointerout` and `pointerleave` events.\n *\n * @this {TouchSource}\n * @param {TouchEvent} inEvent The event.\n */\nfunction touchend(inEvent) {\n this.dedupSynthMouse_(inEvent);\n this.processTouches_(inEvent, this.upOut_);\n}\n\n/**\n * Handler for `touchcancel`, triggers `pointercancel`,\n * `pointerout` and `pointerleave` events.\n *\n * @this {TouchSource}\n * @param {TouchEvent} inEvent The in event.\n */\nfunction touchcancel(inEvent) {\n this.processTouches_(inEvent, this.cancelOut_);\n}\n\n\nvar TouchSource = /*@__PURE__*/(function (EventSource) {\n function TouchSource(dispatcher, mouseSource) {\n var mapping = {\n 'touchstart': touchstart,\n 'touchmove': touchmove,\n 'touchend': touchend,\n 'touchcancel': touchcancel\n };\n EventSource.call(this, dispatcher, mapping);\n\n /**\n * @const\n * @type {!Object<string, Event|Object>}\n */\n this.pointerMap = dispatcher.pointerMap;\n\n /**\n * @const\n * @type {import(\"./MouseSource.js\").default}\n */\n this.mouseSource = mouseSource;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.firstTouchId_ = undefined;\n\n /**\n * @private\n * @type {number}\n */\n this.clickCount_ = 0;\n\n /**\n * @private\n * @type {?}\n */\n this.resetId_;\n\n /**\n * Mouse event timeout: This should be long enough to\n * ignore compat mouse events made by touch.\n * @private\n * @type {number}\n */\n this.dedupTimeout_ = 2500;\n }\n\n if ( EventSource ) TouchSource.__proto__ = EventSource;\n TouchSource.prototype = Object.create( EventSource && EventSource.prototype );\n TouchSource.prototype.constructor = TouchSource;\n\n /**\n * @private\n * @param {Touch} inTouch The in touch.\n * @return {boolean} True, if this is the primary touch.\n */\n TouchSource.prototype.isPrimaryTouch_ = function isPrimaryTouch_ (inTouch) {\n return this.firstTouchId_ === inTouch.identifier;\n };\n\n /**\n * Set primary touch if there are no pointers, or the only pointer is the mouse.\n * @param {Touch} inTouch The in touch.\n * @private\n */\n TouchSource.prototype.setPrimaryTouch_ = function setPrimaryTouch_ (inTouch) {\n var count = Object.keys(this.pointerMap).length;\n if (count === 0 || (count === 1 && POINTER_ID.toString() in this.pointerMap)) {\n this.firstTouchId_ = inTouch.identifier;\n this.cancelResetClickCount_();\n }\n };\n\n /**\n * @private\n * @param {PointerEvent} inPointer The in pointer object.\n */\n TouchSource.prototype.removePrimaryPointer_ = function removePrimaryPointer_ (inPointer) {\n if (inPointer.isPrimary) {\n this.firstTouchId_ = undefined;\n this.resetClickCount_();\n }\n };\n\n /**\n * @private\n */\n TouchSource.prototype.resetClickCount_ = function resetClickCount_ () {\n this.resetId_ = setTimeout(\n this.resetClickCountHandler_.bind(this),\n CLICK_COUNT_TIMEOUT);\n };\n\n /**\n * @private\n */\n TouchSource.prototype.resetClickCountHandler_ = function resetClickCountHandler_ () {\n this.clickCount_ = 0;\n this.resetId_ = undefined;\n };\n\n /**\n * @private\n */\n TouchSource.prototype.cancelResetClickCount_ = function cancelResetClickCount_ () {\n if (this.resetId_ !== undefined) {\n clearTimeout(this.resetId_);\n }\n };\n\n /**\n * @private\n * @param {TouchEvent} browserEvent Browser event\n * @param {Touch} inTouch Touch event\n * @return {PointerEvent} A pointer object.\n */\n TouchSource.prototype.touchToPointer_ = function touchToPointer_ (browserEvent, inTouch) {\n var e = this.dispatcher.cloneEvent(browserEvent, inTouch);\n // Spec specifies that pointerId 1 is reserved for Mouse.\n // Touch identifiers can start at 0.\n // Add 2 to the touch identifier for compatibility.\n e.pointerId = inTouch.identifier + 2;\n // TODO: check if this is necessary?\n //e.target = findTarget(e);\n e.bubbles = true;\n e.cancelable = true;\n e.detail = this.clickCount_;\n e.button = 0;\n e.buttons = 1;\n e.width = inTouch.radiusX || 0;\n e.height = inTouch.radiusY || 0;\n e.pressure = inTouch.force || 0.5;\n e.isPrimary = this.isPrimaryTouch_(inTouch);\n e.pointerType = POINTER_TYPE;\n\n // make sure that the properties that are different for\n // each `Touch` object are not copied from the BrowserEvent object\n e.clientX = inTouch.clientX;\n e.clientY = inTouch.clientY;\n e.screenX = inTouch.screenX;\n e.screenY = inTouch.screenY;\n\n return e;\n };\n\n /**\n * @private\n * @param {TouchEvent} inEvent Touch event\n * @param {function(TouchEvent, PointerEvent)} inFunction In function.\n */\n TouchSource.prototype.processTouches_ = function processTouches_ (inEvent, inFunction) {\n var touches = Array.prototype.slice.call(inEvent.changedTouches);\n var count = touches.length;\n function preventDefault() {\n inEvent.preventDefault();\n }\n for (var i = 0; i < count; ++i) {\n var pointer = this.touchToPointer_(inEvent, touches[i]);\n // forward touch preventDefaults\n pointer.preventDefault = preventDefault;\n inFunction.call(this, inEvent, pointer);\n }\n };\n\n /**\n * @private\n * @param {TouchList} touchList The touch list.\n * @param {number} searchId Search identifier.\n * @return {boolean} True, if the `Touch` with the given id is in the list.\n */\n TouchSource.prototype.findTouch_ = function findTouch_ (touchList, searchId) {\n var l = touchList.length;\n for (var i = 0; i < l; i++) {\n var touch = touchList[i];\n if (touch.identifier === searchId) {\n return true;\n }\n }\n return false;\n };\n\n /**\n * In some instances, a touchstart can happen without a touchend. This\n * leaves the pointermap in a broken state.\n * Therefore, on every touchstart, we remove the touches that did not fire a\n * touchend event.\n * To keep state globally consistent, we fire a pointercancel for\n * this \"abandoned\" touch\n *\n * @private\n * @param {TouchEvent} inEvent The in event.\n */\n TouchSource.prototype.vacuumTouches_ = function vacuumTouches_ (inEvent) {\n var touchList = inEvent.touches;\n // pointerMap.getCount() should be < touchList.length here,\n // as the touchstart has not been processed yet.\n var keys = Object.keys(this.pointerMap);\n var count = keys.length;\n if (count >= touchList.length) {\n var d = [];\n for (var i = 0; i < count; ++i) {\n var key = Number(keys[i]);\n var value = this.pointerMap[key];\n // Never remove pointerId == 1, which is mouse.\n // Touch identifiers are 2 smaller than their pointerId, which is the\n // index in pointermap.\n if (key != POINTER_ID && !this.findTouch_(touchList, key - 2)) {\n d.push(value.out);\n }\n }\n for (var i$1 = 0; i$1 < d.length; ++i$1) {\n this.cancelOut_(inEvent, d[i$1]);\n }\n }\n };\n\n /**\n * @private\n * @param {TouchEvent} browserEvent The event.\n * @param {PointerEvent} inPointer The in pointer object.\n */\n TouchSource.prototype.overDown_ = function overDown_ (browserEvent, inPointer) {\n this.pointerMap[inPointer.pointerId] = {\n target: inPointer.target,\n out: inPointer,\n outTarget: inPointer.target\n };\n this.dispatcher.over(inPointer, browserEvent);\n this.dispatcher.enter(inPointer, browserEvent);\n this.dispatcher.down(inPointer, browserEvent);\n };\n\n /**\n * @private\n * @param {TouchEvent} browserEvent The event.\n * @param {PointerEvent} inPointer The in pointer.\n */\n TouchSource.prototype.moveOverOut_ = function moveOverOut_ (browserEvent, inPointer) {\n var event = inPointer;\n var pointer = this.pointerMap[event.pointerId];\n // a finger drifted off the screen, ignore it\n if (!pointer) {\n return;\n }\n var outEvent = pointer.out;\n var outTarget = pointer.outTarget;\n this.dispatcher.move(event, browserEvent);\n if (outEvent && outTarget !== event.target) {\n outEvent.relatedTarget = event.target;\n /** @type {Object} */ (event).relatedTarget = outTarget;\n // recover from retargeting by shadow\n outEvent.target = outTarget;\n if (event.target) {\n this.dispatcher.leaveOut(outEvent, browserEvent);\n this.dispatcher.enterOver(event, browserEvent);\n } else {\n // clean up case when finger leaves the screen\n /** @type {Object} */ (event).target = outTarget;\n /** @type {Object} */ (event).relatedTarget = null;\n this.cancelOut_(browserEvent, event);\n }\n }\n pointer.out = event;\n pointer.outTarget = event.target;\n };\n\n /**\n * @private\n * @param {TouchEvent} browserEvent An event.\n * @param {PointerEvent} inPointer The inPointer object.\n */\n TouchSource.prototype.upOut_ = function upOut_ (browserEvent, inPointer) {\n this.dispatcher.up(inPointer, browserEvent);\n this.dispatcher.out(inPointer, browserEvent);\n this.dispatcher.leave(inPointer, browserEvent);\n this.cleanUpPointer_(inPointer);\n };\n\n /**\n * @private\n * @param {TouchEvent} browserEvent The event.\n * @param {PointerEvent} inPointer The in pointer.\n */\n TouchSource.prototype.cancelOut_ = function cancelOut_ (browserEvent, inPointer) {\n this.dispatcher.cancel(inPointer, browserEvent);\n this.dispatcher.out(inPointer, browserEvent);\n this.dispatcher.leave(inPointer, browserEvent);\n this.cleanUpPointer_(inPointer);\n };\n\n /**\n * @private\n * @param {PointerEvent} inPointer The inPointer object.\n */\n TouchSource.prototype.cleanUpPointer_ = function cleanUpPointer_ (inPointer) {\n delete this.pointerMap[inPointer.pointerId];\n this.removePrimaryPointer_(inPointer);\n };\n\n /**\n * Prevent synth mouse events from creating pointer events.\n *\n * @private\n * @param {TouchEvent} inEvent The in event.\n */\n TouchSource.prototype.dedupSynthMouse_ = function dedupSynthMouse_ (inEvent) {\n var lts = this.mouseSource.lastTouches;\n var t = inEvent.changedTouches[0];\n // only the primary finger will synth mouse events\n if (this.isPrimaryTouch_(t)) {\n // remember x/y of last touch\n var lt = [t.clientX, t.clientY];\n lts.push(lt);\n\n setTimeout(function() {\n // remove touch after timeout\n remove(lts, lt);\n }, this.dedupTimeout_);\n }\n };\n\n return TouchSource;\n}(EventSource));\n\nexport default TouchSource;\n\n//# sourceMappingURL=TouchSource.js.map","/**\n * @module ol/pointer/PointerEventHandler\n */\n\n// Based on https://github.com/Polymer/PointerEvents\n\n// Copyright (c) 2013 The Polymer Authors. 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\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY 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\nimport {listen, unlisten} from '../events.js';\nimport EventTarget from '../events/Target.js';\nimport {POINTER, MSPOINTER, TOUCH} from '../has.js';\nimport PointerEventType from './EventType.js';\nimport MouseSource, {prepareEvent as prepareMouseEvent} from './MouseSource.js';\nimport MsSource from './MsSource.js';\nimport NativeSource from './NativeSource.js';\nimport PointerEvent from './PointerEvent.js';\nimport TouchSource from './TouchSource.js';\n\n\n/**\n * Properties to copy when cloning an event, with default values.\n * @type {Array<Array>}\n */\nvar CLONE_PROPS = [\n // MouseEvent\n ['bubbles', false],\n ['cancelable', false],\n ['view', null],\n ['detail', null],\n ['screenX', 0],\n ['screenY', 0],\n ['clientX', 0],\n ['clientY', 0],\n ['ctrlKey', false],\n ['altKey', false],\n ['shiftKey', false],\n ['metaKey', false],\n ['button', 0],\n ['relatedTarget', null],\n // DOM Level 3\n ['buttons', 0],\n // PointerEvent\n ['pointerId', 0],\n ['width', 0],\n ['height', 0],\n ['pressure', 0],\n ['tiltX', 0],\n ['tiltY', 0],\n ['pointerType', ''],\n ['hwTimestamp', 0],\n ['isPrimary', false],\n // event instance\n ['type', ''],\n ['target', null],\n ['currentTarget', null],\n ['which', 0]\n];\n\n\nvar PointerEventHandler = /*@__PURE__*/(function (EventTarget) {\n function PointerEventHandler(element) {\n EventTarget.call(this);\n\n /**\n * @const\n * @private\n * @type {Element|HTMLDocument}\n */\n this.element_ = element;\n\n /**\n * @const\n * @type {!Object<string, Event|Object>}\n */\n this.pointerMap = {};\n\n /**\n * @type {Object<string, function(Event)>}\n * @private\n */\n this.eventMap_ = {};\n\n /**\n * @type {Array<import(\"./EventSource.js\").default>}\n * @private\n */\n this.eventSourceList_ = [];\n\n this.registerSources();\n }\n\n if ( EventTarget ) PointerEventHandler.__proto__ = EventTarget;\n PointerEventHandler.prototype = Object.create( EventTarget && EventTarget.prototype );\n PointerEventHandler.prototype.constructor = PointerEventHandler;\n\n /**\n * Set up the event sources (mouse, touch and native pointers)\n * that generate pointer events.\n */\n PointerEventHandler.prototype.registerSources = function registerSources () {\n if (POINTER) {\n this.registerSource('native', new NativeSource(this));\n } else if (MSPOINTER) {\n this.registerSource('ms', new MsSource(this));\n } else {\n var mouseSource = new MouseSource(this);\n this.registerSource('mouse', mouseSource);\n\n if (TOUCH) {\n this.registerSource('touch', new TouchSource(this, mouseSource));\n }\n }\n\n // register events on the viewport element\n this.register_();\n };\n\n /**\n * Add a new event source that will generate pointer events.\n *\n * @param {string} name A name for the event source\n * @param {import(\"./EventSource.js\").default} source The source event.\n */\n PointerEventHandler.prototype.registerSource = function registerSource (name, source) {\n var s = source;\n var newEvents = s.getEvents();\n\n if (newEvents) {\n newEvents.forEach(function(e) {\n var handler = s.getHandlerForEvent(e);\n\n if (handler) {\n this.eventMap_[e] = handler.bind(s);\n }\n }.bind(this));\n this.eventSourceList_.push(s);\n }\n };\n\n /**\n * Set up the events for all registered event sources.\n * @private\n */\n PointerEventHandler.prototype.register_ = function register_ () {\n var l = this.eventSourceList_.length;\n for (var i = 0; i < l; i++) {\n var eventSource = this.eventSourceList_[i];\n this.addEvents_(eventSource.getEvents());\n }\n };\n\n /**\n * Remove all registered events.\n * @private\n */\n PointerEventHandler.prototype.unregister_ = function unregister_ () {\n var l = this.eventSourceList_.length;\n for (var i = 0; i < l; i++) {\n var eventSource = this.eventSourceList_[i];\n this.removeEvents_(eventSource.getEvents());\n }\n };\n\n /**\n * Calls the right handler for a new event.\n * @private\n * @param {Event} inEvent Browser event.\n */\n PointerEventHandler.prototype.eventHandler_ = function eventHandler_ (inEvent) {\n var type = inEvent.type;\n var handler = this.eventMap_[type];\n if (handler) {\n handler(inEvent);\n }\n };\n\n /**\n * Setup listeners for the given events.\n * @private\n * @param {Array<string>} events List of events.\n */\n PointerEventHandler.prototype.addEvents_ = function addEvents_ (events) {\n events.forEach(function(eventName) {\n listen(this.element_, eventName, this.eventHandler_, this);\n }.bind(this));\n };\n\n /**\n * Unregister listeners for the given events.\n * @private\n * @param {Array<string>} events List of events.\n */\n PointerEventHandler.prototype.removeEvents_ = function removeEvents_ (events) {\n events.forEach(function(e) {\n unlisten(this.element_, e, this.eventHandler_, this);\n }.bind(this));\n };\n\n /**\n * Returns a snapshot of inEvent, with writable properties.\n *\n * @param {Event} event Browser event.\n * @param {Event|Touch} inEvent An event that contains\n * properties to copy.\n * @return {Object} An object containing shallow copies of\n * `inEvent`'s properties.\n */\n PointerEventHandler.prototype.cloneEvent = function cloneEvent (event, inEvent) {\n var eventCopy = {};\n for (var i = 0, ii = CLONE_PROPS.length; i < ii; i++) {\n var p = CLONE_PROPS[i][0];\n eventCopy[p] = event[p] || inEvent[p] || CLONE_PROPS[i][1];\n }\n\n return eventCopy;\n };\n\n // EVENTS\n\n\n /**\n * Triggers a 'pointerdown' event.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.down = function down (data, event) {\n this.fireEvent(PointerEventType.POINTERDOWN, data, event);\n };\n\n /**\n * Triggers a 'pointermove' event.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.move = function move (data, event) {\n this.fireEvent(PointerEventType.POINTERMOVE, data, event);\n };\n\n /**\n * Triggers a 'pointerup' event.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.up = function up (data, event) {\n this.fireEvent(PointerEventType.POINTERUP, data, event);\n };\n\n /**\n * Triggers a 'pointerenter' event.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.enter = function enter (data, event) {\n data.bubbles = false;\n this.fireEvent(PointerEventType.POINTERENTER, data, event);\n };\n\n /**\n * Triggers a 'pointerleave' event.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.leave = function leave (data, event) {\n data.bubbles = false;\n this.fireEvent(PointerEventType.POINTERLEAVE, data, event);\n };\n\n /**\n * Triggers a 'pointerover' event.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.over = function over (data, event) {\n data.bubbles = true;\n this.fireEvent(PointerEventType.POINTEROVER, data, event);\n };\n\n /**\n * Triggers a 'pointerout' event.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.out = function out (data, event) {\n data.bubbles = true;\n this.fireEvent(PointerEventType.POINTEROUT, data, event);\n };\n\n /**\n * Triggers a 'pointercancel' event.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.cancel = function cancel (data, event) {\n this.fireEvent(PointerEventType.POINTERCANCEL, data, event);\n };\n\n /**\n * Triggers a combination of 'pointerout' and 'pointerleave' events.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.leaveOut = function leaveOut (data, event) {\n this.out(data, event);\n if (!this.contains_(data.target, data.relatedTarget)) {\n this.leave(data, event);\n }\n };\n\n /**\n * Triggers a combination of 'pointerover' and 'pointerevents' events.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.enterOver = function enterOver (data, event) {\n this.over(data, event);\n if (!this.contains_(data.target, data.relatedTarget)) {\n this.enter(data, event);\n }\n };\n\n /**\n * @private\n * @param {Element} container The container element.\n * @param {Element} contained The contained element.\n * @return {boolean} Returns true if the container element\n * contains the other element.\n */\n PointerEventHandler.prototype.contains_ = function contains_ (container, contained) {\n if (!container || !contained) {\n return false;\n }\n return container.contains(contained);\n };\n\n // EVENT CREATION AND TRACKING\n /**\n * Creates a new Event of type `inType`, based on the information in\n * `data`.\n *\n * @param {string} inType A string representing the type of event to create.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n * @return {PointerEvent} A PointerEvent of type `inType`.\n */\n PointerEventHandler.prototype.makeEvent = function makeEvent (inType, data, event) {\n return new PointerEvent(inType, event, data);\n };\n\n /**\n * Make and dispatch an event in one call.\n * @param {string} inType A string representing the type of event.\n * @param {Object} data Pointer event data.\n * @param {Event} event The event.\n */\n PointerEventHandler.prototype.fireEvent = function fireEvent (inType, data, event) {\n var e = this.makeEvent(inType, data, event);\n this.dispatchEvent(e);\n };\n\n /**\n * Creates a pointer event from a native pointer event\n * and dispatches this event.\n * @param {Event} event A platform event with a target.\n */\n PointerEventHandler.prototype.fireNativeEvent = function fireNativeEvent (event) {\n var e = this.makeEvent(event.type, event, event);\n this.dispatchEvent(e);\n };\n\n /**\n * Wrap a native mouse event into a pointer event.\n * This proxy method is required for the legacy IE support.\n * @param {string} eventType The pointer event type.\n * @param {Event} event The event.\n * @return {PointerEvent} The wrapped event.\n */\n PointerEventHandler.prototype.wrapMouseEvent = function wrapMouseEvent (eventType, event) {\n var pointerEvent = this.makeEvent(\n eventType, prepareMouseEvent(event, this), event);\n return pointerEvent;\n };\n\n /**\n * @inheritDoc\n */\n PointerEventHandler.prototype.disposeInternal = function disposeInternal () {\n this.unregister_();\n EventTarget.prototype.disposeInternal.call(this);\n };\n\n return PointerEventHandler;\n}(EventTarget));\n\nexport default PointerEventHandler;\n\n//# sourceMappingURL=PointerEventHandler.js.map","/**\n * @module ol/MapBrowserEventHandler\n */\nimport {DEVICE_PIXEL_RATIO} from './has.js';\nimport MapBrowserEventType from './MapBrowserEventType.js';\nimport MapBrowserPointerEvent from './MapBrowserPointerEvent.js';\nimport {listen, unlistenByKey} from './events.js';\nimport EventTarget from './events/Target.js';\nimport PointerEventType from './pointer/EventType.js';\nimport PointerEventHandler from './pointer/PointerEventHandler.js';\n\nvar MapBrowserEventHandler = /*@__PURE__*/(function (EventTarget) {\n function MapBrowserEventHandler(map, moveTolerance) {\n\n EventTarget.call(this);\n\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 /**\n * @type {any}\n * @private\n */\n this.clickTimeoutId_;\n\n /**\n * @type {boolean}\n * @private\n */\n this.dragging_ = false;\n\n /**\n * @type {!Array<import(\"./events.js\").EventsKey>}\n * @private\n */\n this.dragListenerKeys_ = [];\n\n /**\n * @type {number}\n * @private\n */\n this.moveTolerance_ = moveTolerance ?\n moveTolerance * DEVICE_PIXEL_RATIO : DEVICE_PIXEL_RATIO;\n\n /**\n * The most recent \"down\" type event (or null if none have occurred).\n * Set on pointerdown.\n * @type {import(\"./pointer/PointerEvent.js\").default}\n * @private\n */\n this.down_ = null;\n\n var element = this.map_.getViewport();\n\n /**\n * @type {number}\n * @private\n */\n this.activePointers_ = 0;\n\n /**\n * @type {!Object<number, boolean>}\n * @private\n */\n this.trackedTouches_ = {};\n\n /**\n * Event handler which generates pointer events for\n * the viewport element.\n *\n * @type {PointerEventHandler}\n * @private\n */\n this.pointerEventHandler_ = new PointerEventHandler(element);\n\n /**\n * Event handler which generates pointer events for\n * the document (used when dragging).\n *\n * @type {PointerEventHandler}\n * @private\n */\n this.documentPointerEventHandler_ = null;\n\n /**\n * @type {?import(\"./events.js\").EventsKey}\n * @private\n */\n this.pointerdownListenerKey_ = listen(this.pointerEventHandler_,\n PointerEventType.POINTERDOWN,\n this.handlePointerDown_, this);\n\n /**\n * @type {?import(\"./events.js\").EventsKey}\n * @private\n */\n this.relayedListenerKey_ = listen(this.pointerEventHandler_,\n PointerEventType.POINTERMOVE,\n this.relayEvent_, this);\n\n }\n\n if ( EventTarget ) MapBrowserEventHandler.__proto__ = EventTarget;\n MapBrowserEventHandler.prototype = Object.create( EventTarget && EventTarget.prototype );\n MapBrowserEventHandler.prototype.constructor = MapBrowserEventHandler;\n\n /**\n * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n * event.\n * @private\n */\n MapBrowserEventHandler.prototype.emulateClick_ = function emulateClick_ (pointerEvent) {\n var newEvent = new MapBrowserPointerEvent(\n 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 MapBrowserPointerEvent(\n MapBrowserEventType.DBLCLICK, this.map_, pointerEvent);\n this.dispatchEvent(newEvent);\n } else {\n // click\n this.clickTimeoutId_ = setTimeout(function() {\n this.clickTimeoutId_ = undefined;\n var newEvent = new MapBrowserPointerEvent(\n MapBrowserEventType.SINGLECLICK, this.map_, pointerEvent);\n this.dispatchEvent(newEvent);\n }.bind(this), 250);\n }\n };\n\n /**\n * Keeps track on how many pointers are currently active.\n *\n * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n * event.\n * @private\n */\n MapBrowserEventHandler.prototype.updateActivePointers_ = function updateActivePointers_ (pointerEvent) {\n var event = pointerEvent;\n\n if (event.type == MapBrowserEventType.POINTERUP ||\n event.type == MapBrowserEventType.POINTERCANCEL) {\n delete this.trackedTouches_[event.pointerId];\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 /**\n * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n * event.\n * @private\n */\n MapBrowserEventHandler.prototype.handlePointerUp_ = function handlePointerUp_ (pointerEvent) {\n this.updateActivePointers_(pointerEvent);\n var newEvent = new MapBrowserPointerEvent(\n MapBrowserEventType.POINTERUP, this.map_, pointerEvent);\n this.dispatchEvent(newEvent);\n\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.stopPropagation() or event.preventDefault().\n if (!newEvent.propagationStopped && !this.dragging_ && this.isMouseActionButton_(pointerEvent)) {\n this.emulateClick_(this.down_);\n }\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 this.documentPointerEventHandler_.dispose();\n this.documentPointerEventHandler_ = null;\n }\n };\n\n /**\n * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n * event.\n * @return {boolean} If the left mouse button was pressed.\n * @private\n */\n MapBrowserEventHandler.prototype.isMouseActionButton_ = function isMouseActionButton_ (pointerEvent) {\n return pointerEvent.button === 0;\n };\n\n /**\n * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n * event.\n * @private\n */\n MapBrowserEventHandler.prototype.handlePointerDown_ = function handlePointerDown_ (pointerEvent) {\n this.updateActivePointers_(pointerEvent);\n var newEvent = new MapBrowserPointerEvent(\n MapBrowserEventType.POINTERDOWN, this.map_, pointerEvent);\n this.dispatchEvent(newEvent);\n\n this.down_ = pointerEvent;\n\n if (this.dragListenerKeys_.length === 0) {\n /* Set up a pointer event handler on the `document`,\n * which is required when the pointer is moved outside\n * the viewport when dragging.\n */\n this.documentPointerEventHandler_ =\n new PointerEventHandler(document);\n\n this.dragListenerKeys_.push(\n listen(this.documentPointerEventHandler_,\n MapBrowserEventType.POINTERMOVE,\n this.handlePointerMove_, this),\n listen(this.documentPointerEventHandler_,\n MapBrowserEventType.POINTERUP,\n 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.pointerEventHandler_,\n MapBrowserEventType.POINTERCANCEL,\n this.handlePointerUp_, this)\n );\n }\n };\n\n /**\n * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n * event.\n * @private\n */\n MapBrowserEventHandler.prototype.handlePointerMove_ = function handlePointerMove_ (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 MapBrowserPointerEvent(\n MapBrowserEventType.POINTERDRAG, this.map_, pointerEvent,\n this.dragging_);\n this.dispatchEvent(newEvent);\n }\n\n // Some native android browser triggers mousemove events during small period\n // of time. See: https://code.google.com/p/android/issues/detail?id=5491 or\n // https://code.google.com/p/android/issues/detail?id=19827\n // ex: Galaxy Tab P3110 + Android 4.1.1\n pointerEvent.preventDefault();\n };\n\n /**\n * Wrap and relay a pointer event. Note that this requires that the type\n * string for the MapBrowserPointerEvent matches the PointerEvent type.\n * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n * event.\n * @private\n */\n MapBrowserEventHandler.prototype.relayEvent_ = function relayEvent_ (pointerEvent) {\n var dragging = !!(this.down_ && this.isMoving_(pointerEvent));\n this.dispatchEvent(new MapBrowserPointerEvent(\n pointerEvent.type, this.map_, pointerEvent, dragging));\n };\n\n /**\n * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n * event.\n * @return {boolean} Is moving.\n * @private\n */\n MapBrowserEventHandler.prototype.isMoving_ = function isMoving_ (pointerEvent) {\n return this.dragging_ ||\n Math.abs(pointerEvent.clientX - this.down_.clientX) > this.moveTolerance_ ||\n Math.abs(pointerEvent.clientY - this.down_.clientY) > this.moveTolerance_;\n };\n\n /**\n * @inheritDoc\n */\n MapBrowserEventHandler.prototype.disposeInternal = function disposeInternal () {\n if (this.relayedListenerKey_) {\n unlistenByKey(this.relayedListenerKey_);\n this.relayedListenerKey_ = null;\n }\n if (this.pointerdownListenerKey_) {\n unlistenByKey(this.pointerdownListenerKey_);\n this.pointerdownListenerKey_ = null;\n }\n\n this.dragListenerKeys_.forEach(unlistenByKey);\n this.dragListenerKeys_.length = 0;\n\n if (this.documentPointerEventHandler_) {\n this.documentPointerEventHandler_.dispose();\n this.documentPointerEventHandler_ = null;\n }\n if (this.pointerEventHandler_) {\n this.pointerEventHandler_.dispose();\n this.pointerEventHandler_ = null;\n }\n EventTarget.prototype.disposeInternal.call(this);\n };\n\n return MapBrowserEventHandler;\n}(EventTarget));\n\n\nexport default MapBrowserEventHandler;\n\n//# sourceMappingURL=MapBrowserEventHandler.js.map","/**\n * @module ol/MapEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n\n /**\n * Triggered after a map frame is rendered.\n * @event module:ol/MapEvent~MapEvent#postrender\n * @api\n */\n POSTRENDER: 'postrender',\n\n /**\n * Triggered when the map starts moving.\n * @event module:ol/MapEvent~MapEvent#movestart\n * @api\n */\n MOVESTART: 'movestart',\n\n /**\n * Triggered after the map is moved.\n * @event module:ol/MapEvent~MapEvent#moveend\n * @api\n */\n MOVEEND: 'moveend'\n\n};\n\n//# sourceMappingURL=MapEventType.js.map","/**\n * @module ol/MapProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n LAYERGROUP: 'layergroup',\n SIZE: 'size',\n TARGET: 'target',\n VIEW: 'view'\n};\n\n//# sourceMappingURL=MapProperty.js.map","/**\n * @module ol/render/EventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n /**\n * @event module:ol/render/Event~RenderEvent#postcompose\n * @api\n */\n POSTCOMPOSE: 'postcompose',\n /**\n * @event module:ol/render/Event~RenderEvent#precompose\n * @api\n */\n PRECOMPOSE: 'precompose',\n /**\n * @event module:ol/render/Event~RenderEvent#render\n * @api\n */\n RENDER: 'render',\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 * @event module:ol/render/Event~RenderEvent#rendercomplete\n * @api\n */\n RENDERCOMPLETE: 'rendercomplete'\n};\n\n//# sourceMappingURL=EventType.js.map","/**\n * @module ol/TileState\n */\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 ABORT: 5\n};\n\n//# sourceMappingURL=TileState.js.map","/**\n * @module ol/asserts\n */\nimport AssertionError from './AssertionError.js';\n\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\n//# sourceMappingURL=asserts.js.map","/**\n * @module ol/structs/PriorityQueue\n */\nimport {assert} from '../asserts.js';\nimport {clear} from '../obj.js';\n\n\n/**\n * @type {number}\n */\nexport var DROP = Infinity;\n\n\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 http://closure-library.googlecode.com/svn/docs/closure_goog_structs_heap.js.source.html\n * and http://hg.python.org/cpython/file/2.7/Lib/heapq.py.\n *\n * @template T\n */\nvar PriorityQueue = function PriorityQueue(priorityFunction, keyFunction) {\n\n /**\n * @type {function(T): number}\n * @private\n */\n this.priorityFunction_ = priorityFunction;\n\n /**\n * @type {function(T): string}\n * @private\n */\n this.keyFunction_ = keyFunction;\n\n /**\n * @type {Array<T>}\n * @private\n */\n this.elements_ = [];\n\n /**\n * @type {Array<number>}\n * @private\n */\n this.priorities_ = [];\n\n /**\n * @type {!Object<string, boolean>}\n * @private\n */\n this.queuedElements_ = {};\n\n};\n\n/**\n * FIXME empty description for jsdoc\n */\nPriorityQueue.prototype.clear = function clear$1 () {\n this.elements_.length = 0;\n this.priorities_.length = 0;\n clear(this.queuedElements_);\n};\n\n\n/**\n * Remove and return the highest-priority element. O(log N).\n * @return {T} Element.\n */\nPriorityQueue.prototype.dequeue = function dequeue () {\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 } 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\n/**\n * Enqueue an element. O(log N).\n * @param {T} element Element.\n * @return {boolean} The element was added to the queue.\n */\nPriorityQueue.prototype.enqueue = function enqueue (element) {\n assert(!(this.keyFunction_(element) in this.queuedElements_),\n 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\n/**\n * @return {number} Count.\n */\nPriorityQueue.prototype.getCount = function getCount () {\n return this.elements_.length;\n};\n\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 */\nPriorityQueue.prototype.getLeftChildIndex_ = function getLeftChildIndex_ (index) {\n return index * 2 + 1;\n};\n\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 */\nPriorityQueue.prototype.getRightChildIndex_ = function getRightChildIndex_ (index) {\n return index * 2 + 2;\n};\n\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 */\nPriorityQueue.prototype.getParentIndex_ = function getParentIndex_ (index) {\n return (index - 1) >> 1;\n};\n\n\n/**\n * Make this a heap. O(N).\n * @private\n */\nPriorityQueue.prototype.heapify_ = function heapify_ () {\n var i;\n for (i = (this.elements_.length >> 1) - 1; i >= 0; i--) {\n this.siftUp_(i);\n }\n};\n\n\n/**\n * @return {boolean} Is empty.\n */\nPriorityQueue.prototype.isEmpty = function isEmpty () {\n return this.elements_.length === 0;\n};\n\n\n/**\n * @param {string} key Key.\n * @return {boolean} Is key queued.\n */\nPriorityQueue.prototype.isKeyQueued = function isKeyQueued (key) {\n return key in this.queuedElements_;\n};\n\n\n/**\n * @param {T} element Element.\n * @return {boolean} Is queued.\n */\nPriorityQueue.prototype.isQueued = function isQueued (element) {\n return this.isKeyQueued(this.keyFunction_(element));\n};\n\n\n/**\n * @param {number} index The index of the node to move down.\n * @private\n */\nPriorityQueue.prototype.siftUp_ = function siftUp_ (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\n while (index < (count >> 1)) {\n var lIndex = this.getLeftChildIndex_(index);\n var rIndex = this.getRightChildIndex_(index);\n\n var smallerChildIndex = rIndex < count &&\n priorities[rIndex] < priorities[lIndex] ?\n rIndex : lIndex;\n\n elements[index] = elements[smallerChildIndex];\n priorities[index] = priorities[smallerChildIndex];\n index = smallerChildIndex;\n }\n\n elements[index] = element;\n priorities[index] = priority;\n this.siftDown_(startIndex, index);\n};\n\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 */\nPriorityQueue.prototype.siftDown_ = function siftDown_ (startIndex, index) {\n var elements = this.elements_;\n var priorities = this.priorities_;\n var element = elements[index];\n var priority = priorities[index];\n\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 } else {\n break;\n }\n }\n elements[index] = element;\n priorities[index] = priority;\n};\n\n\n/**\n * FIXME empty description for jsdoc\n */\nPriorityQueue.prototype.reprioritize = function reprioritize () {\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 } else {\n priorities[index] = priority;\n elements[index++] = element;\n }\n }\n elements.length = index;\n priorities.length = index;\n this.heapify_();\n};\n\n\nexport default PriorityQueue;\n\n//# sourceMappingURL=PriorityQueue.js.map","/**\n * @module ol/TileQueue\n */\nimport TileState from './TileState.js';\nimport {listen, unlisten} from './events.js';\nimport EventType from './events/EventType.js';\nimport PriorityQueue from './structs/PriorityQueue.js';\n\n\n/**\n * @typedef {function(import(\"./Tile.js\").default, string, import(\"./coordinate.js\").Coordinate, number): number} PriorityFunction\n */\n\n\nvar TileQueue = /*@__PURE__*/(function (PriorityQueue) {\n function TileQueue(tilePriorityFunction, tileChangeCallback) {\n\n PriorityQueue.call(\n /**\n * @param {Array} element Element.\n * @return {number} Priority.\n */\n this, 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 });\n\n /**\n * @private\n * @type {function(): ?}\n */\n this.tileChangeCallback_ = tileChangeCallback;\n\n /**\n * @private\n * @type {number}\n */\n this.tilesLoading_ = 0;\n\n /**\n * @private\n * @type {!Object<string,boolean>}\n */\n this.tilesLoadingKeys_ = {};\n\n }\n\n if ( PriorityQueue ) TileQueue.__proto__ = PriorityQueue;\n TileQueue.prototype = Object.create( PriorityQueue && PriorityQueue.prototype );\n TileQueue.prototype.constructor = TileQueue;\n\n /**\n * @inheritDoc\n */\n TileQueue.prototype.enqueue = function enqueue (element) {\n var added = PriorityQueue.prototype.enqueue.call(this, element);\n if (added) {\n var tile = element[0];\n listen(tile, EventType.CHANGE, this.handleTileChange, this);\n }\n return added;\n };\n\n /**\n * @return {number} Number of tiles loading.\n */\n TileQueue.prototype.getTilesLoading = function getTilesLoading () {\n return this.tilesLoading_;\n };\n\n /**\n * @param {import(\"./events/Event.js\").default} event Event.\n * @protected\n */\n TileQueue.prototype.handleTileChange = function handleTileChange (event) {\n var tile = /** @type {import(\"./Tile.js\").default} */ (event.target);\n var state = tile.getState();\n if (state === TileState.LOADED || state === TileState.ERROR ||\n state === TileState.EMPTY || state === TileState.ABORT) {\n unlisten(tile, EventType.CHANGE, this.handleTileChange, this);\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 /**\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 loadMoreTiles (maxTotalLoading, maxNewLoads) {\n var newLoads = 0;\n var abortedTiles = false;\n var state, tile, tileKey;\n while (this.tilesLoading_ < maxTotalLoading && 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.ABORT) {\n abortedTiles = true;\n } else if (state === TileState.IDLE && !(tileKey in this.tilesLoadingKeys_)) {\n this.tilesLoadingKeys_[tileKey] = true;\n ++this.tilesLoading_;\n ++newLoads;\n tile.load();\n }\n }\n if (newLoads === 0 && abortedTiles) {\n // Do not stop the render loop when all wanted tiles were aborted due to\n // a small, saturated tile cache.\n this.tileChangeCallback_();\n }\n };\n\n return TileQueue;\n}(PriorityQueue));\n\n\nexport default TileQueue;\n\n//# sourceMappingURL=TileQueue.js.map","/**\n * @module ol/tilegrid/common\n */\n\n/**\n * Default maximum zoom for default tile grids.\n * @type {number}\n */\nexport var DEFAULT_MAX_ZOOM = 42;\n\n/**\n * Default tile size.\n * @type {number}\n */\nexport var DEFAULT_TILE_SIZE = 256;\n\n//# sourceMappingURL=common.js.map","/**\n * @module ol/math\n */\nimport {assert} from './asserts.js';\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\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 } 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\n/**\n * @param {number} x X.\n * @return {number} The smallest power of two greater than or equal to x.\n */\nexport function roundUpToPowerOfTwo(x) {\n assert(0 < x, 29); // `x` must be greater than `0`\n return Math.pow(2, Math.ceil(Math.log(x) / Math.LN2));\n}\n\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 } else if (t > 0) {\n x1 += dx * t;\n y1 += dy * t;\n }\n }\n return squaredDistance(x, y, x1, y1);\n}\n\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\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\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\n if (maxEl === 0) {\n return null; // matrix is singular\n }\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\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 } else {\n mat[j][k] += coef * mat[i][k];\n }\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\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\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/**\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/**\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\n//# sourceMappingURL=math.js.map","/**\n * @module ol/centerconstraint\n */\nimport {clamp} from './math.js';\n\n\n/**\n * @typedef {function((import(\"./coordinate.js\").Coordinate|undefined)): (import(\"./coordinate.js\").Coordinate|undefined)} Type\n */\n\n\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @return {Type} The constraint.\n */\nexport function createExtent(extent) {\n return (\n /**\n * @param {import(\"./coordinate.js\").Coordinate=} center Center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\n function(center) {\n if (center) {\n return [\n clamp(center[0], extent[0], extent[2]),\n clamp(center[1], extent[1], extent[3])\n ];\n } else {\n return undefined;\n }\n }\n );\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\n//# sourceMappingURL=centerconstraint.js.map","/**\n * @module ol/resolutionconstraint\n */\nimport {linearFindNearest} from './array.js';\nimport {clamp} from './math.js';\n\n\n/**\n * @typedef {function((number|undefined), number, number): (number|undefined)} Type\n */\n\n\n/**\n * @param {Array<number>} resolutions Resolutions.\n * @return {Type} Zoom function.\n */\nexport function createSnapToResolutions(resolutions) {\n return (\n /**\n * @param {number|undefined} resolution Resolution.\n * @param {number} delta Delta.\n * @param {number} direction Direction.\n * @return {number|undefined} Resolution.\n */\n function(resolution, delta, direction) {\n if (resolution !== undefined) {\n var z = linearFindNearest(resolutions, resolution, direction);\n z = clamp(z + delta, 0, resolutions.length - 1);\n var index = Math.floor(z);\n if (z != index && index < resolutions.length - 1) {\n var power = resolutions[index] / resolutions[index + 1];\n return resolutions[index] / Math.pow(power, z - index);\n } else {\n return resolutions[index];\n }\n } else {\n return undefined;\n }\n }\n );\n}\n\n\n/**\n * @param {number} power Power.\n * @param {number} maxResolution Maximum resolution.\n * @param {number=} opt_maxLevel Maximum level.\n * @return {Type} Zoom function.\n */\nexport function createSnapToPower(power, maxResolution, opt_maxLevel) {\n return (\n /**\n * @param {number|undefined} resolution Resolution.\n * @param {number} delta Delta.\n * @param {number} direction Direction.\n * @return {number|undefined} Resolution.\n */\n function(resolution, delta, direction) {\n if (resolution !== undefined) {\n var offset = -direction / 2 + 0.5;\n var oldLevel = Math.floor(\n Math.log(maxResolution / resolution) / Math.log(power) + offset);\n var newLevel = Math.max(oldLevel + delta, 0);\n if (opt_maxLevel !== undefined) {\n newLevel = Math.min(newLevel, opt_maxLevel);\n }\n return maxResolution / Math.pow(power, newLevel);\n } else {\n return undefined;\n }\n });\n}\n\n//# sourceMappingURL=resolutionconstraint.js.map","/**\n * @module ol/rotationconstraint\n */\nimport {toRadians} from './math.js';\n\n\n/**\n * @typedef {function((number|undefined), number): (number|undefined)} Type\n */\n\n\n/**\n * @param {number|undefined} rotation Rotation.\n * @param {number} delta Delta.\n * @return {number|undefined} Rotation.\n */\nexport function disable(rotation, delta) {\n if (rotation !== undefined) {\n return 0;\n } else {\n return undefined;\n }\n}\n\n\n/**\n * @param {number|undefined} rotation Rotation.\n * @param {number} delta Delta.\n * @return {number|undefined} Rotation.\n */\nexport function none(rotation, delta) {\n if (rotation !== undefined) {\n return rotation + delta;\n } else {\n return undefined;\n }\n}\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 {number} delta Delta.\n * @return {number|undefined} Rotation.\n */\n function(rotation, delta) {\n if (rotation !== undefined) {\n rotation = Math.floor((rotation + delta) / theta + 0.5) * theta;\n return rotation;\n } else {\n return undefined;\n }\n });\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 {number} delta Delta.\n * @return {number|undefined} Rotation.\n */\n function(rotation, delta) {\n if (rotation !== undefined) {\n if (Math.abs(rotation + delta) <= tolerance) {\n return 0;\n } else {\n return rotation + delta;\n }\n } else {\n return undefined;\n }\n });\n}\n\n//# sourceMappingURL=rotationconstraint.js.map","/**\n * @module ol/ViewHint\n */\n\n/**\n * @enum {number}\n */\nexport default {\n ANIMATING: 0,\n INTERACTING: 1\n};\n\n//# sourceMappingURL=ViewHint.js.map","/**\n * @module ol/ViewProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n CENTER: 'center',\n RESOLUTION: 'resolution',\n ROTATION: 'rotation'\n};\n\n//# sourceMappingURL=ViewProperty.js.map","/**\n * @module ol/string\n */\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 * @returns {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 ? numberString : new Array(1 + width - decimal).join('0') + numberString;\n}\n\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 * @returns {number} Value\n */\nexport function compareVersions(v1, v2) {\n var s1 = ('' + v1).split('.');\n var s2 = ('' + v2).split('.');\n\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\n if (n1 > n2) {\n return 1;\n }\n if (n2 > n1) {\n return -1;\n }\n }\n\n return 0;\n}\n\n//# sourceMappingURL=string.js.map","/**\n * @module ol/coordinate\n */\nimport {modulo} from './math.js';\nimport {padNumber} from './string.js';\n\n\n/**\n * An array of numbers representing an xy coordinate. Example: `[16, 48]`.\n * @typedef {Array<number>} Coordinate\n * @api\n */\n\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\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\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\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\n var x = x0 + r * dx / d;\n var y = y0 + r * dy / d;\n\n return [x, y];\n}\n\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) ? 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 } else if (along >= 1) {\n x = x2;\n y = y2;\n } else {\n x = x1 + along * dx;\n y = y1 + along * dy;\n }\n return [x, y];\n}\n\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\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\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\n if (sec >= 60) {\n sec = 0;\n min += 1;\n }\n\n if (min >= 60) {\n min = 0;\n deg += 1;\n }\n\n return deg + '\\u00b0 ' + padNumber(min, 2) + '\\u2032 ' +\n padNumber(sec, 2, dflPrecision) + '\\u2033' +\n (normalizedDegrees == 0 ? '' : ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0));\n}\n\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 } else {\n return '';\n }\n}\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\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\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\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\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\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,\n closestOnSegment(coordinate, segment));\n}\n\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 degreesToStringHDMS('EW', coordinate[0], opt_fractionDigits);\n } else {\n return '';\n }\n}\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//# sourceMappingURL=coordinate.js.map","/**\n * @module ol/easing\n */\n\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\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\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\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\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 } else {\n return 1 - inAndOut(2 * (t - 0.5));\n }\n}\n\n//# sourceMappingURL=easing.js.map","/**\n * @module ol/extent/Corner\n */\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\n//# sourceMappingURL=Corner.js.map","/**\n * @module ol/extent/Relationship\n */\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\n//# sourceMappingURL=Relationship.js.map","/**\n * @module ol/extent\n */\nimport {assert} from './asserts.js';\nimport Corner from './extent/Corner.js';\nimport Relationship from './extent/Relationship.js';\n\n\n/**\n * An array of numbers representing an extent: `[minx, miny, maxx, maxy]`.\n * @typedef {Array<number>} Extent\n * @api\n */\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\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\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 } else {\n return [\n extent[0] - value,\n extent[1] - value,\n extent[2] + value,\n extent[3] + value\n ];\n }\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 } else {\n return extent.slice();\n }\n}\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 } else if (extent[2] < x) {\n dx = x - extent[2];\n } else {\n dx = 0;\n }\n if (y < extent[1]) {\n dy = extent[1] - y;\n } else if (extent[3] < y) {\n dy = y - extent[3];\n } else {\n dy = 0;\n }\n return dx * dx + dy * dy;\n}\n\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\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] && extent2[2] <= extent1[2] &&\n extent1[1] <= extent2[1] && extent2[3] <= extent1[3];\n}\n\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\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 {Relationship} 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 } else if (x > maxX) {\n relationship = relationship | Relationship.RIGHT;\n }\n if (y < minY) {\n relationship = relationship | Relationship.BELOW;\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\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\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 } else {\n return [minX, minY, maxX, maxY];\n }\n}\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(\n Infinity, Infinity, -Infinity, -Infinity, opt_extent);\n}\n\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\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\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/**\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\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] && extent1[2] == extent2[2] &&\n extent1[1] == extent2[1] && extent1[3] == extent2[3];\n}\n\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\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\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\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\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\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\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(this:T, import(\"./coordinate.js\").Coordinate): S} callback Callback.\n * @param {T=} opt_this Value to use as `this` when executing `callback`.\n * @return {S|boolean} Value.\n * @template S, T\n */\nexport function forEachCorner(extent, callback, opt_this) {\n var val;\n val = callback.call(opt_this, getBottomLeft(extent));\n if (val) {\n return val;\n }\n val = callback.call(opt_this, getBottomRight(extent));\n if (val) {\n return val;\n }\n val = callback.call(opt_this, getTopRight(extent));\n if (val) {\n return val;\n }\n val = callback.call(opt_this, getTopLeft(extent));\n if (val) {\n return val;\n }\n return false;\n}\n\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\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\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\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\n/**\n * Get a corner coordinate of an extent.\n * @param {Extent} extent Extent.\n * @param {Corner} 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 } else if (corner === Corner.BOTTOM_RIGHT) {\n coordinate = getBottomRight(extent);\n } else if (corner === Corner.TOP_LEFT) {\n coordinate = getTopLeft(extent);\n } else if (corner === Corner.TOP_RIGHT) {\n coordinate = getTopRight(extent);\n } else {\n assert(false, 13); // Invalid corner\n }\n return coordinate;\n}\n\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\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(\n Math.min(x0, x1, x2, x3), Math.min(y0, y1, y2, y3),\n Math.max(x0, x1, x2, x3), Math.max(y0, y1, y2, y3),\n opt_extent);\n}\n\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\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\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 } else {\n intersection[0] = extent2[0];\n }\n if (extent1[1] > extent2[1]) {\n intersection[1] = extent1[1];\n } else {\n intersection[1] = extent2[1];\n }\n if (extent1[2] < extent2[2]) {\n intersection[2] = extent1[2];\n } else {\n intersection[2] = extent2[2];\n }\n if (extent1[3] < extent2[3]) {\n intersection[3] = extent1[3];\n } else {\n intersection[3] = extent2[3];\n }\n } else {\n createOrUpdateEmpty(intersection);\n }\n return intersection;\n}\n\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\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\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\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\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\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\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\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 } else {\n return extent;\n }\n}\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\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 } 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, y;\n if (!!(endRel & Relationship.ABOVE) &&\n !(startRel & Relationship.ABOVE)) {\n // potentially intersects top\n x = endX - ((endY - maxY) / slope);\n intersects = x >= minX && x <= maxX;\n }\n if (!intersects && !!(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 && !!(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 && !!(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 }\n return intersects;\n}\n\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 * @return {Extent} Extent.\n * @api\n */\nexport function applyTransform(extent, transformFn, opt_extent) {\n var coordinates = [\n extent[0], extent[1],\n extent[0], extent[3],\n extent[2], extent[1],\n extent[2], extent[3]\n ];\n transformFn(coordinates, coordinates, 2);\n var xs = [coordinates[0], coordinates[2], coordinates[4], coordinates[6]];\n var ys = [coordinates[1], coordinates[3], coordinates[5], coordinates[7]];\n return _boundingExtentXYs(xs, ys, opt_extent);\n}\n\n//# sourceMappingURL=extent.js.map","/**\n * @module ol/geom/GeometryType\n */\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\n//# sourceMappingURL=GeometryType.js.map","/**\n * @module ol/geom/GeometryLayout\n */\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\n//# sourceMappingURL=GeometryLayout.js.map","/**\n * @module ol/geom/flat/transform\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 {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\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\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\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\n//# sourceMappingURL=transform.js.map","/**\n * @license\n * Latitude/longitude spherical geodesy formulae taken from\n * http://www.movable-type.co.uk/scripts/latlong.html\n * Licensed under CC-BY-3.0.\n */\n\n/**\n * @module ol/sphere\n */\nimport {toRadians, toDegrees} from './math.js';\nimport GeometryType from './geom/GeometryType.js';\n\n\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 radius of the\n * earth is used (Clarke 1866 Authalic Sphere).\n */\n\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\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) * Math.sin(deltaLonBy2) *\n Math.cos(lat1) * Math.cos(lat2);\n return 2 * radius * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n}\n\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\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 = /** @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\n/**\n * Returns the spherical area for a list of coordinates.\n *\n * [Reference](https://trs-new.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 += toRadians(x2 - x1) *\n (2 + Math.sin(toRadians(y1)) +\n Math.sin(toRadians(y2)));\n x1 = x2;\n y1 = y2;\n }\n return area * radius * radius / 2.0;\n}\n\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 = /** @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\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(\n Math.sin(lat1) * Math.cos(dByR) +\n Math.cos(lat1) * Math.sin(dByR) * Math.cos(bearing));\n var lon = lon1 + Math.atan2(\n Math.sin(bearing) * Math.sin(dByR) * Math.cos(lat1),\n Math.cos(dByR) - Math.sin(lat1) * Math.sin(lat));\n return [toDegrees(lon), toDegrees(lat)];\n}\n\n//# sourceMappingURL=sphere.js.map","/**\n * @module ol/proj/Units\n */\n\n/**\n * Projection units: `'degrees'`, `'ft'`, `'m'`, `'pixels'`, `'tile-pixels'` or\n * `'us-ft'`.\n * @enum {string}\n */\nvar Units = {\n DEGREES: 'degrees',\n FEET: 'ft',\n METERS: 'm',\n PIXELS: 'pixels',\n TILE_PIXELS: 'tile-pixels',\n USFEET: 'us-ft'\n};\n\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;\n\nexport default Units;\n\n//# sourceMappingURL=Units.js.map","/**\n * @module ol/proj/Projection\n */\nimport {METERS_PER_UNIT} from './Units.js';\n\n\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 an `{import(\"../coordinate.js\").Coordinate}` as arguments, and returns\n * the `{number}` resolution at the passed coordinate. If this is `undefined`,\n * the default {@link module:ol/proj#getPointResolution} function will be used.\n */\n\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 = function Projection(options) {\n /**\n * @private\n * @type {string}\n */\n this.code_ = options.code;\n\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 /**\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 /**\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_ = options.worldExtent !== undefined ?\n options.worldExtent : null;\n\n /**\n * @private\n * @type {string}\n */\n this.axisOrientation_ = options.axisOrientation !== undefined ?\n options.axisOrientation : 'enu';\n\n /**\n * @private\n * @type {boolean}\n */\n this.global_ = options.global !== undefined ? options.global : false;\n\n /**\n * @private\n * @type {boolean}\n */\n this.canWrapX_ = !!(this.global_ && this.extent_);\n\n /**\n * @private\n * @type {function(number, import(\"../coordinate.js\").Coordinate):number|undefined}\n */\n this.getPointResolutionFunc_ = options.getPointResolution;\n\n /**\n * @private\n * @type {import(\"../tilegrid/TileGrid.js\").default}\n */\n this.defaultTileGrid_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.metersPerUnit_ = options.metersPerUnit;\n};\n\n/**\n * @return {boolean} The projection is suitable for wrapping the x-axis\n */\nProjection.prototype.canWrapX = function canWrapX () {\n return this.canWrapX_;\n};\n\n/**\n * Get the code for this projection, e.g. 'EPSG:4326'.\n * @return {string} Code.\n * @api\n */\nProjection.prototype.getCode = function getCode () {\n return this.code_;\n};\n\n/**\n * Get the validity extent for this projection.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\nProjection.prototype.getExtent = function getExtent () {\n return this.extent_;\n};\n\n/**\n * Get the units of this projection.\n * @return {import(\"./Units.js\").default} Units.\n * @api\n */\nProjection.prototype.getUnits = function getUnits () {\n return this.units_;\n};\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 */\nProjection.prototype.getMetersPerUnit = function getMetersPerUnit () {\n return this.metersPerUnit_ || METERS_PER_UNIT[this.units_];\n};\n\n/**\n * Get the world extent for this projection.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\nProjection.prototype.getWorldExtent = function getWorldExtent () {\n return this.worldExtent_;\n};\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 */\nProjection.prototype.getAxisOrientation = function getAxisOrientation () {\n return this.axisOrientation_;\n};\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 */\nProjection.prototype.isGlobal = function isGlobal () {\n return this.global_;\n};\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 */\nProjection.prototype.setGlobal = function setGlobal (global) {\n this.global_ = global;\n this.canWrapX_ = !!(global && this.extent_);\n};\n\n/**\n * @return {import(\"../tilegrid/TileGrid.js\").default} The default tile grid.\n */\nProjection.prototype.getDefaultTileGrid = function getDefaultTileGrid () {\n return this.defaultTileGrid_;\n};\n\n/**\n * @param {import(\"../tilegrid/TileGrid.js\").default} tileGrid The default tile grid.\n */\nProjection.prototype.setDefaultTileGrid = function setDefaultTileGrid (tileGrid) {\n this.defaultTileGrid_ = tileGrid;\n};\n\n/**\n * Set the validity extent for this projection.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @api\n */\nProjection.prototype.setExtent = function setExtent (extent) {\n this.extent_ = extent;\n this.canWrapX_ = !!(this.global_ && extent);\n};\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 */\nProjection.prototype.setWorldExtent = function setWorldExtent (worldExtent) {\n this.worldExtent_ = worldExtent;\n};\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 */\nProjection.prototype.setGetPointResolution = function setGetPointResolution (func) {\n this.getPointResolutionFunc_ = func;\n};\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 */\nProjection.prototype.getPointResolutionFunc = function getPointResolutionFunc () {\n return this.getPointResolutionFunc_;\n};\n\nexport default Projection;\n\n//# sourceMappingURL=Projection.js.map","/**\n * @module ol/proj/epsg3857\n */\nimport {cosh} from '../math.js';\nimport Projection from './Projection.js';\nimport Units from './Units.js';\n\n\n/**\n * Radius of WGS84 sphere\n *\n * @const\n * @type {number}\n */\nexport var RADIUS = 6378137;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var HALF_SIZE = Math.PI * RADIUS;\n\n\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport var EXTENT = [\n -HALF_SIZE, -HALF_SIZE,\n HALF_SIZE, HALF_SIZE\n];\n\n\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport var WORLD_EXTENT = [-180, -85, 180, 85];\n\n\n/**\n * @classdesc\n * Projection object for web/spherical Mercator (EPSG:3857).\n */\nvar EPSG3857Projection = /*@__PURE__*/(function (Projection) {\n function EPSG3857Projection(code) {\n Projection.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 });\n\n }\n\n if ( Projection ) EPSG3857Projection.__proto__ = Projection;\n EPSG3857Projection.prototype = Object.create( Projection && Projection.prototype );\n EPSG3857Projection.prototype.constructor = EPSG3857Projection;\n\n return EPSG3857Projection;\n}(Projection));\n\n\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('urn:ogc:def:crs:EPSG:6.18:3:3857'),\n new EPSG3857Projection('urn:ogc:def:crs:EPSG::3857'),\n new EPSG3857Projection('http://www.opengis.net/gml/srs/epsg.xml#3857')\n];\n\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 } else {\n output = new Array(length);\n }\n }\n var halfSize = HALF_SIZE;\n for (var i = 0; i < length; i += dimension) {\n output[i] = halfSize * input[i] / 180;\n var y = RADIUS *\n Math.log(Math.tan(Math.PI * (input[i + 1] + 90) / 360));\n if (y > halfSize) {\n y = halfSize;\n } else if (y < -halfSize) {\n y = -halfSize;\n }\n output[i + 1] = y;\n }\n return output;\n}\n\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 } 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] = 360 * Math.atan(\n Math.exp(input[i + 1] / RADIUS)) / Math.PI - 90;\n }\n return output;\n}\n\n//# sourceMappingURL=epsg3857.js.map","/**\n * @module ol/proj/epsg4326\n */\nimport Projection from './Projection.js';\nimport Units from './Units.js';\n\n\n/**\n * Semi-major radius of the WGS84 ellipsoid.\n *\n * @const\n * @type {number}\n */\nexport var RADIUS = 6378137;\n\n\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\n/**\n * @const\n * @type {number}\n */\nexport var METERS_PER_UNIT = Math.PI * RADIUS / 180;\n\n\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 = /*@__PURE__*/(function (Projection) {\n function EPSG4326Projection(code, opt_axisOrientation) {\n Projection.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 });\n\n }\n\n if ( Projection ) EPSG4326Projection.__proto__ = Projection;\n EPSG4326Projection.prototype = Object.create( Projection && Projection.prototype );\n EPSG4326Projection.prototype.constructor = EPSG4326Projection;\n\n return EPSG4326Projection;\n}(Projection));\n\n\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:EPSG::4326', 'neu'),\n new EPSG4326Projection('urn:ogc:def:crs:EPSG:6.6: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 new EPSG4326Projection('urn:x-ogc:def:crs:EPSG:4326', 'neu')\n];\n\n//# sourceMappingURL=epsg4326.js.map","/**\n * @module ol/proj/projections\n */\n\n\n/**\n * @type {Object<string, import(\"./Projection.js\").default>}\n */\nvar cache = {};\n\n\n/**\n * Clear the projections cache.\n */\nexport function clear() {\n cache = {};\n}\n\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] || null;\n}\n\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\n//# sourceMappingURL=projections.js.map","/**\n * @module ol/proj/transforms\n */\nimport {isEmpty} from '../obj.js';\n\n\n/**\n * @private\n * @type {!Object<string, Object<string, import(\"../proj.js\").TransformFunction>>}\n */\nvar transforms = {};\n\n\n/**\n * Clear the transform cache.\n */\nexport function clear() {\n transforms = {};\n}\n\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\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\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\n//# sourceMappingURL=transforms.js.map","/**\n * @module ol/proj\n */\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 {getDistance} from './sphere.js';\nimport {applyTransform} from './extent.js';\nimport {modulo} from './math.js';\nimport {toEPSG4326, fromEPSG4326, PROJECTIONS as EPSG3857_PROJECTIONS} from './proj/epsg3857.js';\nimport {PROJECTIONS as EPSG4326_PROJECTIONS} from './proj/epsg4326.js';\nimport Projection from './proj/Projection.js';\nimport Units, {METERS_PER_UNIT} from './proj/Units.js';\nimport * as projections from './proj/projections.js';\nimport {add as addTransformFunc, clear as clearTransformFuncs, get as getTransformFunc} from './proj/transforms.js';\n\n\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\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 */\n\n\nexport {METERS_PER_UNIT};\n\nexport {Projection};\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>} 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 } else {\n output = input.slice();\n }\n return output;\n}\n\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\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 projections.add(projection.getCode(), projection);\n addTransformFunc(projection, projection, cloneTransform);\n}\n\n\n/**\n * @param {Array<Projection>} projections Projections.\n */\nexport function addProjections(projections) {\n projections.forEach(addProjection);\n}\n\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 projections.get(/** @type {string} */ (projectionLike)) :\n (/** @type {Projection} */ (projectionLike) || null);\n}\n\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 {Units=} 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 } else {\n var units = projection.getUnits();\n if (units == Units.DEGREES && !opt_units || opt_units == Units.DEGREES) {\n pointResolution = resolution;\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 = getTransformFromProjections(projection, get('EPSG:4326'));\n var vertices = [\n point[0] - resolution / 2, point[1],\n point[0] + resolution / 2, point[1],\n point[0], point[1] - resolution / 2,\n point[0], point[1] + resolution / 2\n ];\n vertices = toEPSG4326(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 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\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\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\n/**\n * Clear all cached projections and transforms.\n */\nexport function clearAllProjections() {\n projections.clear();\n clearTransformFuncs();\n}\n\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 } else if (typeof projection === 'string') {\n return get(projection);\n } else {\n return (\n /** @type {Projection} */ (projection)\n );\n }\n}\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\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\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',\n opt_projection !== undefined ? opt_projection : 'EPSG:3857');\n}\n\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,\n 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\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 } else {\n var transformFunc = getTransformFromProjections(projection1, projection2);\n return transformFunc === cloneTransform && equalUnits;\n }\n}\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\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\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\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 * @return {import(\"./extent.js\").Extent} The transformed extent.\n * @api\n */\nexport function transformExtent(extent, source, destination) {\n var transformFunc = getTransform(source, destination);\n return applyTransform(extent, transformFunc);\n}\n\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/**\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}\n\naddCommon();\n\n//# sourceMappingURL=proj.js.map","/**\n * @module ol/transform\n */\nimport {assert} from './asserts.js';\n\n\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 */\n\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\n/**\n * @private\n * @type {Transform}\n */\nvar tmp_ = new Array(6);\n\n\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\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\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\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\n return transform1;\n}\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\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\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\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\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\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\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\n/**\n * Invert the given transform.\n * @param {!Transform} transform Transform.\n * @return {!Transform} Inverse of the transform.\n */\nexport function invert(transform) {\n var det = determinant(transform);\n assert(det !== 0, 32); // Transformation matrix cannot be inverted\n\n var a = transform[0];\n var b = transform[1];\n var c = transform[2];\n var d = transform[3];\n var e = transform[4];\n var f = transform[5];\n\n transform[0] = d / det;\n transform[1] = -b / det;\n transform[2] = -c / det;\n transform[3] = a / det;\n transform[4] = (c * f - d * e) / det;\n transform[5] = -(a * f - b * e) / det;\n\n return transform;\n}\n\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//# sourceMappingURL=transform.js.map","/**\n * @module ol/geom/Geometry\n */\nimport {abstract} from '../util.js';\nimport BaseObject from '../Object.js';\nimport {createEmpty, getHeight, returnOrUpdate} from '../extent.js';\nimport {transform2D} from './flat/transform.js';\nimport {get as getProjection, getTransform} from '../proj.js';\nimport Units from '../proj/Units.js';\nimport {create as createTransform, compose as composeTransform} from '../transform.js';\n\n\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nvar tmpTransform = createTransform();\n\n\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 = /*@__PURE__*/(function (BaseObject) {\n function Geometry() {\n\n BaseObject.call(this);\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.extent_ = createEmpty();\n\n /**\n * @private\n * @type {number}\n */\n this.extentRevision_ = -1;\n\n /**\n * @protected\n * @type {Object<string, Geometry>}\n */\n this.simplifiedGeometryCache = {};\n\n /**\n * @protected\n * @type {number}\n */\n this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n\n /**\n * @protected\n * @type {number}\n */\n this.simplifiedGeometryRevision = 0;\n\n }\n\n if ( BaseObject ) Geometry.__proto__ = BaseObject;\n Geometry.prototype = Object.create( BaseObject && BaseObject.prototype );\n Geometry.prototype.constructor = Geometry;\n\n /**\n * Make a complete copy of the geometry.\n * @abstract\n * @return {!Geometry} Clone.\n */\n Geometry.prototype.clone = function clone () {\n return abstract();\n };\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 closestPointXY (x, y, closestPoint, minSquaredDistance) {\n return abstract();\n };\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\n Geometry.prototype.containsXY = function containsXY (x, y) {\n return false;\n };\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 getClosestPoint (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 /**\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 intersectsCoordinate (coordinate) {\n return this.containsXY(coordinate[0], coordinate[1]);\n };\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 computeExtent (extent) {\n return abstract();\n };\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 getExtent (opt_extent) {\n if (this.extentRevision_ != this.getRevision()) {\n this.extent_ = this.computeExtent(this.extent_);\n this.extentRevision_ = this.getRevision();\n }\n return returnOrUpdate(this.extent_, opt_extent);\n };\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 rotate (angle, anchor) {\n abstract();\n };\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\n * 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 scale (sx, opt_sy, opt_anchor) {\n abstract();\n };\n\n /**\n * Create a simplified version of this geometry. For linestrings, this uses\n * the the {@link\n * https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm\n * Douglas Peucker} 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 simplify (tolerance) {\n return this.getSimplifiedGeometry(tolerance * tolerance);\n };\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 getSimplifiedGeometry (squaredTolerance) {\n return abstract();\n };\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 getType () {\n return abstract();\n };\n\n /**\n * Apply a transform function to each coordinate 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.\n */\n Geometry.prototype.applyTransform = function applyTransform (transformFn) {\n abstract();\n };\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 intersectsExtent (extent) {\n return abstract();\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 * @abstract\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @api\n */\n Geometry.prototype.translate = function translate (deltaX, deltaY) {\n abstract();\n };\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 transform (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,\n projectedExtent[0], projectedExtent[3],\n scale, -scale, 0,\n 0, 0);\n transform2D(inCoordinates, 0, inCoordinates.length, stride,\n tmpTransform, outCoordinates);\n return getTransform(sourceProj, destination)(inCoordinates, outCoordinates, stride);\n } :\n getTransform(sourceProj, destination);\n this.applyTransform(transformFn);\n return this;\n };\n\n return Geometry;\n}(BaseObject));\n\n\nexport default Geometry;\n\n//# sourceMappingURL=Geometry.js.map","/**\n * @module ol/geom/SimpleGeometry\n */\nimport {abstract} from '../util.js';\nimport {createOrUpdateFromFlatCoordinates, getCenter} from '../extent.js';\nimport Geometry from './Geometry.js';\nimport GeometryLayout from './GeometryLayout.js';\nimport {rotate, scale, translate, transform2D} from './flat/transform.js';\nimport {clear} from '../obj.js';\n\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 = /*@__PURE__*/(function (Geometry) {\n function SimpleGeometry() {\n\n Geometry.call(this);\n\n /**\n * @protected\n * @type {GeometryLayout}\n */\n this.layout = GeometryLayout.XY;\n\n /**\n * @protected\n * @type {number}\n */\n this.stride = 2;\n\n /**\n * @protected\n * @type {Array<number>}\n */\n this.flatCoordinates = null;\n\n }\n\n if ( Geometry ) SimpleGeometry.__proto__ = Geometry;\n SimpleGeometry.prototype = Object.create( Geometry && Geometry.prototype );\n SimpleGeometry.prototype.constructor = SimpleGeometry;\n\n /**\n * @inheritDoc\n */\n SimpleGeometry.prototype.computeExtent = function computeExtent (extent) {\n return createOrUpdateFromFlatCoordinates(this.flatCoordinates,\n 0, this.flatCoordinates.length, this.stride, extent);\n };\n\n /**\n * @abstract\n * @return {Array} Coordinates.\n */\n SimpleGeometry.prototype.getCoordinates = function getCoordinates () {\n return abstract();\n };\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 getFirstCoordinate () {\n return this.flatCoordinates.slice(0, this.stride);\n };\n\n /**\n * @return {Array<number>} Flat coordinates.\n */\n SimpleGeometry.prototype.getFlatCoordinates = function getFlatCoordinates () {\n return this.flatCoordinates;\n };\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 getLastCoordinate () {\n return this.flatCoordinates.slice(this.flatCoordinates.length - this.stride);\n };\n\n /**\n * Return the {@link module:ol/geom/GeometryLayout layout} of the geometry.\n * @return {GeometryLayout} Layout.\n * @api\n */\n SimpleGeometry.prototype.getLayout = function getLayout () {\n return this.layout;\n };\n\n /**\n * @inheritDoc\n */\n SimpleGeometry.prototype.getSimplifiedGeometry = function getSimplifiedGeometry (squaredTolerance) {\n if (this.simplifiedGeometryRevision != this.getRevision()) {\n clear(this.simplifiedGeometryCache);\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 key = squaredTolerance.toString();\n if (this.simplifiedGeometryCache.hasOwnProperty(key)) {\n return this.simplifiedGeometryCache[key];\n } else {\n var simplifiedGeometry =\n this.getSimplifiedGeometryInternal(squaredTolerance);\n var simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates();\n if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) {\n this.simplifiedGeometryCache[key] = simplifiedGeometry;\n return simplifiedGeometry;\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\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {SimpleGeometry} Simplified geometry.\n * @protected\n */\n SimpleGeometry.prototype.getSimplifiedGeometryInternal = function getSimplifiedGeometryInternal (squaredTolerance) {\n return this;\n };\n\n /**\n * @return {number} Stride.\n */\n SimpleGeometry.prototype.getStride = function getStride () {\n return this.stride;\n };\n\n /**\n * @param {GeometryLayout} layout Layout.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n */\n SimpleGeometry.prototype.setFlatCoordinates = function setFlatCoordinates (layout, flatCoordinates) {\n this.stride = getStrideForLayout(layout);\n this.layout = layout;\n this.flatCoordinates = flatCoordinates;\n };\n\n /**\n * @abstract\n * @param {!Array} coordinates Coordinates.\n * @param {GeometryLayout=} opt_layout Layout.\n */\n SimpleGeometry.prototype.setCoordinates = function setCoordinates (coordinates, opt_layout) {\n abstract();\n };\n\n /**\n * @param {GeometryLayout|undefined} layout Layout.\n * @param {Array} coordinates Coordinates.\n * @param {number} nesting Nesting.\n * @protected\n */\n SimpleGeometry.prototype.setLayout = function setLayout (layout, coordinates, nesting) {\n /** @type {number} */\n var stride;\n if (layout) {\n stride = getStrideForLayout(layout);\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 } 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 /**\n * @inheritDoc\n * @api\n */\n SimpleGeometry.prototype.applyTransform = function applyTransform (transformFn) {\n if (this.flatCoordinates) {\n transformFn(this.flatCoordinates, this.flatCoordinates, this.stride);\n this.changed();\n }\n };\n\n /**\n * @inheritDoc\n * @api\n */\n SimpleGeometry.prototype.rotate = function rotate$1 (angle, anchor) {\n var flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n var stride = this.getStride();\n rotate(\n flatCoordinates, 0, flatCoordinates.length,\n stride, angle, anchor, flatCoordinates);\n this.changed();\n }\n };\n\n /**\n * @inheritDoc\n * @api\n */\n SimpleGeometry.prototype.scale = function scale$1 (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(\n flatCoordinates, 0, flatCoordinates.length,\n stride, sx, sy, anchor, flatCoordinates);\n this.changed();\n }\n };\n\n /**\n * @inheritDoc\n * @api\n */\n SimpleGeometry.prototype.translate = function translate$1 (deltaX, deltaY) {\n var flatCoordinates = this.getFlatCoordinates();\n if (flatCoordinates) {\n var stride = this.getStride();\n translate(\n flatCoordinates, 0, flatCoordinates.length, stride,\n deltaX, deltaY, flatCoordinates);\n this.changed();\n }\n };\n\n return SimpleGeometry;\n}(Geometry));\n\n\n/**\n * @param {number} stride Stride.\n * @return {GeometryLayout} layout Layout.\n */\nfunction getLayoutForStride(stride) {\n var layout;\n if (stride == 2) {\n layout = GeometryLayout.XY;\n } else if (stride == 3) {\n layout = GeometryLayout.XYZ;\n } else if (stride == 4) {\n layout = GeometryLayout.XYZM;\n }\n return (\n /** @type {GeometryLayout} */ (layout)\n );\n}\n\n\n/**\n * @param {GeometryLayout} layout Layout.\n * @return {number} Stride.\n */\nexport function getStrideForLayout(layout) {\n var stride;\n if (layout == GeometryLayout.XY) {\n stride = 2;\n } else if (layout == GeometryLayout.XYZ || layout == GeometryLayout.XYM) {\n stride = 3;\n } else if (layout == GeometryLayout.XYZM) {\n stride = 4;\n }\n return /** @type {number} */ (stride);\n}\n\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 } else {\n var stride = simpleGeometry.getStride();\n return transform2D(\n flatCoordinates, 0, flatCoordinates.length, stride,\n transform, opt_dest);\n }\n}\n\nexport default SimpleGeometry;\n\n//# sourceMappingURL=SimpleGeometry.js.map","/**\n * @module ol/geom/flat/area\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 * @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\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\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\n//# sourceMappingURL=area.js.map","/**\n * @module ol/geom/flat/closest\n */\nimport {lerp, squaredDistance as squaredDx} from '../../math.js';\n\n\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 } else {\n var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n if (t > 1) {\n offset = offset2;\n } else if (t > 0) {\n for (var i = 0; i < stride; ++i) {\n closestPoint[i] = lerp(flatCoordinates[offset1 + i],\n flatCoordinates[offset2 + i], t);\n }\n closestPoint.length = stride;\n return;\n } else {\n offset = offset1;\n }\n }\n for (var i$1 = 0; i$1 < stride; ++i$1) {\n closestPoint[i$1] = flatCoordinates[offset + i$1];\n }\n closestPoint.length = stride;\n}\n\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\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(\n flatCoordinates, offset, end, stride, max);\n offset = end;\n }\n return max;\n}\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 {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(\n flatCoordinates, offset, ends, stride, max);\n offset = ends[ends.length - 1];\n }\n return max;\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 {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,\n stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance,\n 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(\n 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 } 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(\n 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 } 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 += stride * Math.max(\n ((Math.sqrt(squaredDistance) -\n Math.sqrt(minSquaredDistance)) / maxDelta) | 0, 1);\n }\n }\n if (isRing) {\n // Check the closing segment.\n assignClosest(\n 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\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,\n stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance,\n 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(\n flatCoordinates, offset, end, stride,\n maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);\n offset = end;\n }\n return minSquaredDistance;\n}\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 {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,\n endss, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance,\n 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(\n flatCoordinates, offset, ends, stride,\n maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);\n offset = ends[ends.length - 1];\n }\n return minSquaredDistance;\n}\n\n//# sourceMappingURL=closest.js.map","/**\n * @module ol/geom/flat/deflate\n */\n\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\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\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(\n flatCoordinates, offset, coordinatess[j], stride);\n ends[i++] = end;\n offset = end;\n }\n ends.length = i;\n return ends;\n}\n\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(\n 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\n//# sourceMappingURL=deflate.js.map","/**\n * @module ol/geom/flat/inflate\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 {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\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(\n flatCoordinates, offset, end, stride, coordinatess[i]);\n offset = end;\n }\n coordinatess.length = i;\n return coordinatess;\n}\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<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(\n flatCoordinates, offset, ends, stride, coordinatesss[i]);\n offset = ends[ends.length - 1];\n }\n coordinatesss.length = i;\n return coordinatesss;\n}\n\n//# sourceMappingURL=inflate.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.\n\nimport {squaredSegmentDistance, squaredDistance} from '../../math.js';\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 {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,\n stride, squaredTolerance, highQuality, opt_simplifiedFlatCoordinates) {\n var simplifiedFlatCoordinates = opt_simplifiedFlatCoordinates !== undefined ?\n opt_simplifiedFlatCoordinates : [];\n if (!highQuality) {\n end = radialDistance(flatCoordinates, offset, end,\n stride, squaredTolerance,\n simplifiedFlatCoordinates, 0);\n flatCoordinates = simplifiedFlatCoordinates;\n offset = 0;\n stride = 2;\n }\n simplifiedFlatCoordinates.length = douglasPeucker(\n flatCoordinates, offset, end, stride, squaredTolerance,\n simplifiedFlatCoordinates, 0);\n return simplifiedFlatCoordinates;\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 {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,\n stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n var n = (end - offset) / stride;\n if (n < 3) {\n for (; offset < end; offset += stride) {\n simplifiedFlatCoordinates[simplifiedOffset++] =\n 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 = squaredSegmentDistance(\n x, y, x1, y1, x2, y2);\n if (squaredDistance > maxSquaredDistance) {\n index = i;\n maxSquaredDistance = squaredDistance;\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$1 = 0; i$1 < n; ++i$1) {\n if (markers[i$1]) {\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + i$1 * stride];\n simplifiedFlatCoordinates[simplifiedOffset++] =\n flatCoordinates[offset + i$1 * stride + 1];\n }\n }\n return simplifiedOffset;\n}\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 {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,\n ends, stride, squaredTolerance, simplifiedFlatCoordinates,\n simplifiedOffset, simplifiedEnds) {\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n simplifiedOffset = douglasPeucker(\n flatCoordinates, offset, end, stride, squaredTolerance,\n simplifiedFlatCoordinates, simplifiedOffset);\n simplifiedEnds.push(simplifiedOffset);\n offset = end;\n }\n return simplifiedOffset;\n}\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 {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(\n flatCoordinates, offset, endss, stride, squaredTolerance,\n 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(\n flatCoordinates, offset, ends, stride, squaredTolerance,\n simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);\n simplifiedEndss.push(simplifiedEnds);\n offset = ends[ends.length - 1];\n }\n return simplifiedOffset;\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 {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,\n 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\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\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,\n 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\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(\n flatCoordinates, offset, ends, stride,\n tolerance,\n simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds) {\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n simplifiedOffset = quantize(\n flatCoordinates, offset, end, stride,\n tolerance,\n simplifiedFlatCoordinates, simplifiedOffset);\n simplifiedEnds.push(simplifiedOffset);\n offset = end;\n }\n return simplifiedOffset;\n}\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 {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(\n flatCoordinates, offset, endss, stride,\n tolerance,\n 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(\n flatCoordinates, offset, ends, stride,\n tolerance,\n simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);\n simplifiedEndss.push(simplifiedEnds);\n offset = ends[ends.length - 1];\n }\n return simplifiedOffset;\n}\n\n//# sourceMappingURL=simplify.js.map","/**\n * @module ol/geom/LinearRing\n */\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {linearRing as linearRingArea} from './flat/area.js';\nimport {assignClosestPoint, maxSquaredDelta} from './flat/closest.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {inflateCoordinates} from './flat/inflate.js';\nimport {douglasPeucker} from './flat/simplify.js';\n\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 = /*@__PURE__*/(function (SimpleGeometry) {\n function LinearRing(coordinates, opt_layout) {\n\n SimpleGeometry.call(this);\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n if (opt_layout !== undefined && !Array.isArray(coordinates[0])) {\n this.setFlatCoordinates(opt_layout, /** @type {Array<number>} */ (coordinates));\n } else {\n this.setCoordinates(/** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates), opt_layout);\n }\n\n }\n\n if ( SimpleGeometry ) LinearRing.__proto__ = SimpleGeometry;\n LinearRing.prototype = Object.create( SimpleGeometry && SimpleGeometry.prototype );\n LinearRing.prototype.constructor = LinearRing;\n\n /**\n * Make a complete copy of the geometry.\n * @return {!LinearRing} Clone.\n * @override\n * @api\n */\n LinearRing.prototype.clone = function clone () {\n return new LinearRing(this.flatCoordinates.slice(), this.layout);\n };\n\n /**\n * @inheritDoc\n */\n LinearRing.prototype.closestPointXY = function closestPointXY (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(\n this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestPoint(\n this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,\n this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n };\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 getArea () {\n return linearRingArea(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n };\n\n /**\n * Return the coordinates of the linear ring.\n * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n * @override\n * @api\n */\n LinearRing.prototype.getCoordinates = function getCoordinates () {\n return inflateCoordinates(\n this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n };\n\n /**\n * @inheritDoc\n */\n LinearRing.prototype.getSimplifiedGeometryInternal = function getSimplifiedGeometryInternal (squaredTolerance) {\n var simplifiedFlatCoordinates = [];\n simplifiedFlatCoordinates.length = douglasPeucker(\n this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,\n squaredTolerance, simplifiedFlatCoordinates, 0);\n return new LinearRing(simplifiedFlatCoordinates, GeometryLayout.XY);\n };\n\n /**\n * @inheritDoc\n * @api\n */\n LinearRing.prototype.getType = function getType () {\n return GeometryType.LINEAR_RING;\n };\n\n /**\n * @inheritDoc\n */\n LinearRing.prototype.intersectsExtent = function intersectsExtent (extent) {\n return false;\n };\n\n /**\n * Set the coordinates of the linear ring.\n * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {GeometryLayout=} opt_layout Layout.\n * @override\n * @api\n */\n LinearRing.prototype.setCoordinates = function setCoordinates (coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 1);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = deflateCoordinates(\n this.flatCoordinates, 0, coordinates, this.stride);\n this.changed();\n };\n\n return LinearRing;\n}(SimpleGeometry));\n\n\nexport default LinearRing;\n\n//# sourceMappingURL=LinearRing.js.map","/**\n * @module ol/geom/Point\n */\nimport {createOrUpdateFromCoordinate, containsXY} from '../extent.js';\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {deflateCoordinate} from './flat/deflate.js';\nimport {squaredDistance as squaredDx} from '../math.js';\n\n/**\n * @classdesc\n * Point geometry.\n *\n * @api\n */\nvar Point = /*@__PURE__*/(function (SimpleGeometry) {\n function Point(coordinates, opt_layout) {\n SimpleGeometry.call(this);\n this.setCoordinates(coordinates, opt_layout);\n }\n\n if ( SimpleGeometry ) Point.__proto__ = SimpleGeometry;\n Point.prototype = Object.create( SimpleGeometry && SimpleGeometry.prototype );\n Point.prototype.constructor = Point;\n\n /**\n * Make a complete copy of the geometry.\n * @return {!Point} Clone.\n * @override\n * @api\n */\n Point.prototype.clone = function clone () {\n var point = new Point(this.flatCoordinates.slice(), this.layout);\n return point;\n };\n\n /**\n * @inheritDoc\n */\n Point.prototype.closestPointXY = function closestPointXY (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 } else {\n return minSquaredDistance;\n }\n };\n\n /**\n * Return the coordinate of the point.\n * @return {import(\"../coordinate.js\").Coordinate} Coordinates.\n * @override\n * @api\n */\n Point.prototype.getCoordinates = function getCoordinates () {\n return !this.flatCoordinates ? [] : this.flatCoordinates.slice();\n };\n\n /**\n * @inheritDoc\n */\n Point.prototype.computeExtent = function computeExtent (extent) {\n return createOrUpdateFromCoordinate(this.flatCoordinates, extent);\n };\n\n /**\n * @inheritDoc\n * @api\n */\n Point.prototype.getType = function getType () {\n return GeometryType.POINT;\n };\n\n /**\n * @inheritDoc\n * @api\n */\n Point.prototype.intersectsExtent = function intersectsExtent (extent) {\n return containsXY(extent, this.flatCoordinates[0], this.flatCoordinates[1]);\n };\n\n /**\n * @inheritDoc\n * @api\n */\n Point.prototype.setCoordinates = function setCoordinates (coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 0);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = deflateCoordinate(\n this.flatCoordinates, 0, coordinates, this.stride);\n this.changed();\n };\n\n return Point;\n}(SimpleGeometry));\n\n\nexport default Point;\n\n//# sourceMappingURL=Point.js.map","/**\n * @module ol/geom/flat/contains\n */\nimport {forEachCorner} from '../../extent.js';\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 {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\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 // http://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 } 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\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\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\n//# sourceMappingURL=contains.js.map","/**\n * @module ol/geom/flat/interiorpoint\n */\nimport {numberSafeCompareFunction} from '../../array.js';\nimport {linearRingsContainsXY} from './contains.js';\n\n\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,\n 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 } else {\n return [pointX, y, maxSegmentLength];\n }\n}\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,\n offset, ends, stride, flatCenters, 2 * i, interiorPoints);\n offset = ends[ends.length - 1];\n }\n return interiorPoints;\n}\n\n//# sourceMappingURL=interiorpoint.js.map","/**\n * @module ol/geom/flat/segments\n */\n\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(this: S, import(\"../../coordinate.js\").Coordinate, import(\"../../coordinate.js\").Coordinate): T} callback Function\n * called for each segment.\n * @param {S=} opt_this The object to be used as the value of 'this'\n * within callback.\n * @return {T|boolean} Value.\n * @template T,S\n */\nexport function forEach(flatCoordinates, offset, end, stride, callback, opt_this) {\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.call(opt_this, 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\n//# sourceMappingURL=segments.js.map","/**\n * @module ol/geom/flat/intersectsextent\n */\nimport {containsExtent, createEmpty, extendFlatCoordinates, intersects, intersectsSegment} from '../../extent.js';\nimport {linearRingContainsXY, linearRingContainsExtent} from './contains.js';\nimport {forEach as forEachSegment} from './segments.js';\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 {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(\n 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] &&\n coordinatesExtent[2] <= extent[2]) {\n return true;\n }\n if (coordinatesExtent[1] >= extent[1] &&\n 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\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(\n flatCoordinates, offset, ends[i], stride, extent)) {\n return true;\n }\n offset = ends[i];\n }\n return false;\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 {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(\n 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\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(\n 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\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(\n flatCoordinates, offset, ends, stride, extent)) {\n return true;\n }\n offset = ends[ends.length - 1];\n }\n return false;\n}\n\n//# sourceMappingURL=intersectsextent.js.map","/**\n * @module ol/geom/flat/reverse\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 */\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\n//# sourceMappingURL=reverse.js.map","/**\n * @module ol/geom/flat/orient\n */\nimport {coordinates as reverseCoordinates} from './reverse.js';\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 * @return {boolean} Is clockwise.\n */\nexport function linearRingIsClockwise(flatCoordinates, offset, end, stride) {\n // http://tinyurl.com/clockwise-method\n // https://github.com/OSGeo/gdal/blob/trunk/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;\n}\n\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 linearRingIsOriented(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(\n flatCoordinates, offset, end, stride);\n if (i === 0) {\n if ((right && isClockwise) || (!right && !isClockwise)) {\n return false;\n }\n } else {\n if ((right && !isClockwise) || (!right && isClockwise)) {\n return false;\n }\n }\n offset = end;\n }\n return true;\n}\n\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 linearRingsAreOriented(flatCoordinates, offset, endss, stride, opt_right) {\n for (var i = 0, ii = endss.length; i < ii; ++i) {\n if (!linearRingIsOriented(\n flatCoordinates, offset, endss[i], stride, opt_right)) {\n return false;\n }\n }\n return true;\n}\n\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(\n 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\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(\n flatCoordinates, offset, endss[i], stride, opt_right);\n }\n return offset;\n}\n\n//# sourceMappingURL=orient.js.map","/**\n * @module ol/geom/Polygon\n */\nimport {extend} from '../array.js';\nimport {closestSquaredDistanceXY, getCenter} from '../extent.js';\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 {offset as sphereOffset} from '../sphere.js';\nimport {linearRings as linearRingsArea} from './flat/area.js';\nimport {assignClosestArrayPoint, arrayMaxSquaredDelta} from './flat/closest.js';\nimport {linearRingsContainsXY} from './flat/contains.js';\nimport {deflateCoordinatesArray} from './flat/deflate.js';\nimport {inflateCoordinatesArray} from './flat/inflate.js';\nimport {getInteriorPointOfArray} from './flat/interiorpoint.js';\nimport {intersectsLinearRingArray} from './flat/intersectsextent.js';\nimport {linearRingIsOriented, orientLinearRings} from './flat/orient.js';\nimport {quantizeArray} from './flat/simplify.js';\nimport {modulo} from '../math.js';\n\n/**\n * @classdesc\n * Polygon geometry.\n *\n * @api\n */\nvar Polygon = /*@__PURE__*/(function (SimpleGeometry) {\n function Polygon(coordinates, opt_layout, opt_ends) {\n\n SimpleGeometry.call(this);\n\n /**\n * @type {Array<number>}\n * @private\n */\n this.ends_ = [];\n\n /**\n * @private\n * @type {number}\n */\n this.flatInteriorPointRevision_ = -1;\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.flatInteriorPoint_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.orientedRevision_ = -1;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.orientedFlatCoordinates_ = null;\n\n if (opt_layout !== undefined && opt_ends) {\n this.setFlatCoordinates(opt_layout, /** @type {Array<number>} */ (coordinates));\n this.ends_ = opt_ends;\n } else {\n this.setCoordinates(/** @type {Array<Array<import(\"../coordinate.js\").Coordinate>>} */ (coordinates), opt_layout);\n }\n\n }\n\n if ( SimpleGeometry ) Polygon.__proto__ = SimpleGeometry;\n Polygon.prototype = Object.create( SimpleGeometry && SimpleGeometry.prototype );\n Polygon.prototype.constructor = Polygon;\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 appendLinearRing (linearRing) {\n if (!this.flatCoordinates) {\n this.flatCoordinates = linearRing.getFlatCoordinates().slice();\n } else {\n extend(this.flatCoordinates, linearRing.getFlatCoordinates());\n }\n this.ends_.push(this.flatCoordinates.length);\n this.changed();\n };\n\n /**\n * Make a complete copy of the geometry.\n * @return {!Polygon} Clone.\n * @override\n * @api\n */\n Polygon.prototype.clone = function clone () {\n return new Polygon(this.flatCoordinates.slice(), this.layout, this.ends_.slice());\n };\n\n /**\n * @inheritDoc\n */\n Polygon.prototype.closestPointXY = function closestPointXY (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(\n this.flatCoordinates, 0, this.ends_, this.stride, 0));\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestArrayPoint(\n this.flatCoordinates, 0, this.ends_, this.stride,\n this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n };\n\n /**\n * @inheritDoc\n */\n Polygon.prototype.containsXY = function containsXY (x, y) {\n return linearRingsContainsXY(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, x, y);\n };\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 getArea () {\n return linearRingsArea(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride);\n };\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 * @override\n * @api\n */\n Polygon.prototype.getCoordinates = function getCoordinates (opt_right) {\n var flatCoordinates;\n if (opt_right !== undefined) {\n flatCoordinates = this.getOrientedFlatCoordinates().slice();\n orientLinearRings(\n flatCoordinates, 0, this.ends_, this.stride, opt_right);\n } else {\n flatCoordinates = this.flatCoordinates;\n }\n\n return inflateCoordinatesArray(\n flatCoordinates, 0, this.ends_, this.stride);\n };\n\n /**\n * @return {Array<number>} Ends.\n */\n Polygon.prototype.getEnds = function getEnds () {\n return this.ends_;\n };\n\n /**\n * @return {Array<number>} Interior point.\n */\n Polygon.prototype.getFlatInteriorPoint = function getFlatInteriorPoint () {\n if (this.flatInteriorPointRevision_ != this.getRevision()) {\n var flatCenter = getCenter(this.getExtent());\n this.flatInteriorPoint_ = getInteriorPointOfArray(\n this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride,\n flatCenter, 0);\n this.flatInteriorPointRevision_ = this.getRevision();\n }\n return this.flatInteriorPoint_;\n };\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 getInteriorPoint () {\n return new Point(this.getFlatInteriorPoint(), GeometryLayout.XYM);\n };\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 getLinearRingCount () {\n return this.ends_.length;\n };\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 getLinearRing (index) {\n if (index < 0 || this.ends_.length <= index) {\n return null;\n }\n return new LinearRing(this.flatCoordinates.slice(\n index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]), this.layout);\n };\n\n /**\n * Return the linear rings of the polygon.\n * @return {Array<LinearRing>} Linear rings.\n * @api\n */\n Polygon.prototype.getLinearRings = function getLinearRings () {\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 /**\n * @return {Array<number>} Oriented flat coordinates.\n */\n Polygon.prototype.getOrientedFlatCoordinates = function getOrientedFlatCoordinates () {\n if (this.orientedRevision_ != this.getRevision()) {\n var flatCoordinates = this.flatCoordinates;\n if (linearRingIsOriented(\n flatCoordinates, 0, this.ends_, this.stride)) {\n this.orientedFlatCoordinates_ = flatCoordinates;\n } else {\n this.orientedFlatCoordinates_ = flatCoordinates.slice();\n this.orientedFlatCoordinates_.length =\n orientLinearRings(\n this.orientedFlatCoordinates_, 0, this.ends_, this.stride);\n }\n this.orientedRevision_ = this.getRevision();\n }\n return this.orientedFlatCoordinates_;\n };\n\n /**\n * @inheritDoc\n */\n Polygon.prototype.getSimplifiedGeometryInternal = function getSimplifiedGeometryInternal (squaredTolerance) {\n var simplifiedFlatCoordinates = [];\n var simplifiedEnds = [];\n simplifiedFlatCoordinates.length = quantizeArray(\n this.flatCoordinates, 0, this.ends_, this.stride,\n Math.sqrt(squaredTolerance),\n simplifiedFlatCoordinates, 0, simplifiedEnds);\n return new Polygon(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEnds);\n };\n\n /**\n * @inheritDoc\n * @api\n */\n Polygon.prototype.getType = function getType () {\n return GeometryType.POLYGON;\n };\n\n /**\n * @inheritDoc\n * @api\n */\n Polygon.prototype.intersectsExtent = function intersectsExtent (extent) {\n return intersectsLinearRingArray(\n this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, extent);\n };\n\n /**\n * Set the coordinates of the polygon.\n * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>} coordinates Coordinates.\n * @param {GeometryLayout=} opt_layout Layout.\n * @override\n * @api\n */\n Polygon.prototype.setCoordinates = function setCoordinates (coordinates, opt_layout) {\n this.setLayout(opt_layout, coordinates, 2);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n var ends = deflateCoordinatesArray(\n 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\n return Polygon;\n}(SimpleGeometry));\n\n\nexport default Polygon;\n\n\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.\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, [flatCoordinates.length]);\n}\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, minY, minX, maxY, maxX, maxY, maxX, minY, minX, minY];\n return new Polygon(flatCoordinates, GeometryLayout.XY, [flatCoordinates.length]);\n}\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 * radians. 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\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 * radians. 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\n//# sourceMappingURL=Polygon.js.map","/**\n * @module ol/View\n */\nimport {DEFAULT_TILE_SIZE} from './tilegrid/common.js';\nimport {getUid} from './util.js';\nimport {VOID} from './functions.js';\nimport {createExtent, none as centerNone} from './centerconstraint.js';\nimport BaseObject from './Object.js';\nimport {createSnapToResolutions, createSnapToPower} from './resolutionconstraint.js';\nimport {createSnapToZero, createSnapToN, none as rotationNone, disable} from './rotationconstraint.js';\nimport ViewHint from './ViewHint.js';\nimport ViewProperty from './ViewProperty.js';\nimport {linearFindNearest} from './array.js';\nimport {assert} from './asserts.js';\nimport {add as addCoordinate, rotate as rotateCoordinate, equals as coordinatesEqual} from './coordinate.js';\nimport {inAndOut} from './easing.js';\nimport {getForViewAndSize, getCenter, getHeight, getWidth, isEmpty} from './extent.js';\nimport GeometryType from './geom/GeometryType.js';\nimport {fromExtent as polygonFromExtent} from './geom/Polygon.js';\nimport {clamp, modulo} from './math.js';\nimport {assign} from './obj.js';\nimport {createProjection, METERS_PER_UNIT} from './proj.js';\nimport Units from './proj/Units.js';\n\n\n/**\n * An animation configuration\n *\n * @typedef {Object} Animation\n * @property {import(\"./coordinate.js\").Coordinate} [sourceCenter]\n * @property {import(\"./coordinate.js\").Coordinate} [targetCenter]\n * @property {number} [sourceResolution]\n * @property {number} [targetResolution]\n * @property {number} [sourceRotation]\n * @property {number} [targetRotation]\n * @property {import(\"./coordinate.js\").Coordinate} [anchor]\n * @property {number} start\n * @property {number} duration\n * @property {boolean} complete\n * @property {function(number):number} easing\n * @property {function(boolean)} callback\n */\n\n\n/**\n * @typedef {Object} Constraints\n * @property {import(\"./centerconstraint.js\").Type} center\n * @property {import(\"./resolutionconstraint.js\").Type} resolution\n * @property {import(\"./rotationconstraint.js\").Type} rotation\n */\n\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} [constrainResolution=true] Constrain the resolution.\n * @property {boolean} [nearest=false] If `constrainResolution` is `true`, get\n * 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)} [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\n/**\n * @typedef {Object} ViewOptions\n * @property {import(\"./coordinate.js\").Coordinate} [center] The initial center for\n * the view. The coordinate system for the center is specified with the\n * `projection` option. Layer sources will not be fetched if this is not set,\n * 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 * center, in other words, center cannot be set outside this 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 {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 to determine the\n * resolution constraint. If set the `maxResolution`, `minResolution`,\n * `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. The initial\n * resolution is determined using the {@link #constrainResolution} method.\n * @property {number} [zoomFactor=2] The zoom factor used to determine the\n * resolution constraint.\n */\n\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 remained 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\n/**\n * @typedef {Object} State\n * @property {import(\"./coordinate.js\").Coordinate} center\n * @property {import(\"./proj/Projection.js\").default} projection\n * @property {number} resolution\n * @property {number} rotation\n * @property {number} zoom\n */\n\n\n/**\n * Default min zoom level for the map view.\n * @type {number}\n */\nvar DEFAULT_MIN_ZOOM = 0;\n\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 * ### The view states\n *\n * An 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 * An 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 constraints\n *\n * `setCenter`, `setResolution` and `setRotation` can be used to change the\n * states of the view. Any value can be passed to the setters. And the value\n * that is passed to a setter will effectively be the value set in the view,\n * and returned by the corresponding getter.\n *\n * But a View object also has a *resolution constraint*, a\n * *rotation constraint* and a *center constraint*.\n *\n * As said above, no constraints are applied when the setters are used to set\n * new states for the view. Applying constraints is done explicitly through\n * the use of the `constrain*` functions (`constrainResolution` and\n * `constrainRotation` and `constrainCenter`).\n *\n * The main users of the constraints are the interactions and the\n * controls. For example, double-clicking on the map changes the view to\n * the \"next\" resolution. And releasing the fingers after pinch-zooming\n * snaps to the closest resolution (with an animation).\n *\n * The *resolution constraint* snaps to specific resolutions. It is\n * determined by the following options: `resolutions`, `maxResolution`,\n * `maxZoom`, and `zoomFactor`. If `resolutions` is set, the other three\n * options are ignored. See documentation for each option for more\n * information.\n *\n * The *rotation constraint* snaps to specific angles. It is determined\n * by the following options: `enableRotation` and `constrainRotation`.\n * By default the rotation 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 center is not constrained at all.\n *\n * @api\n */\nvar View = /*@__PURE__*/(function (BaseObject) {\n function View(opt_options) {\n BaseObject.call(this);\n\n var options = assign({}, opt_options);\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.hints_ = [0, 0];\n\n /**\n * @private\n * @type {Array<Array<Animation>>}\n */\n this.animations_ = [];\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.updateAnimationKey_;\n\n this.updateAnimations_ = this.updateAnimations_.bind(this);\n\n /**\n * @private\n * @const\n * @type {import(\"./proj/Projection.js\").default}\n */\n this.projection_ = createProjection(options.projection, 'EPSG:3857');\n\n this.applyOptions_(options);\n }\n\n if ( BaseObject ) View.__proto__ = BaseObject;\n View.prototype = Object.create( BaseObject && BaseObject.prototype );\n View.prototype.constructor = View;\n\n /**\n * Set up the view with the given options.\n * @param {ViewOptions} options View options.\n */\n View.prototype.applyOptions_ = function applyOptions_ (options) {\n\n /**\n * @type {Object<string, *>}\n */\n var properties = {};\n properties[ViewProperty.CENTER] = options.center !== undefined ?\n options.center : null;\n\n var resolutionConstraintInfo = createResolutionConstraint(options);\n\n /**\n * @private\n * @type {number}\n */\n this.maxResolution_ = resolutionConstraintInfo.maxResolution;\n\n /**\n * @private\n * @type {number}\n */\n this.minResolution_ = resolutionConstraintInfo.minResolution;\n\n /**\n * @private\n * @type {number}\n */\n this.zoomFactor_ = resolutionConstraintInfo.zoomFactor;\n\n /**\n * @private\n * @type {Array<number>|undefined}\n */\n this.resolutions_ = options.resolutions;\n\n /**\n * @private\n * @type {number}\n */\n this.minZoom_ = resolutionConstraintInfo.minZoom;\n\n var centerConstraint = createCenterConstraint(options);\n var resolutionConstraint = resolutionConstraintInfo.constraint;\n var rotationConstraint = createRotationConstraint(options);\n\n /**\n * @private\n * @type {Constraints}\n */\n this.constraints_ = {\n center: centerConstraint,\n resolution: resolutionConstraint,\n rotation: rotationConstraint\n };\n\n if (options.resolution !== undefined) {\n properties[ViewProperty.RESOLUTION] = options.resolution;\n } else if (options.zoom !== undefined) {\n properties[ViewProperty.RESOLUTION] = this.constrainResolution(\n this.maxResolution_, options.zoom - this.minZoom_);\n\n if (this.resolutions_) { // in case map zoom is out of min/max zoom range\n properties[ViewProperty.RESOLUTION] = clamp(\n Number(this.getResolution() || properties[ViewProperty.RESOLUTION]),\n this.minResolution_, this.maxResolution_);\n }\n }\n properties[ViewProperty.ROTATION] = options.rotation !== undefined ? options.rotation : 0;\n this.setProperties(properties);\n\n /**\n * @private\n * @type {ViewOptions}\n */\n this.options_ = options;\n\n };\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 getUpdatedOptions_ (newOptions) {\n var options = assign({}, this.options_);\n\n // preserve resolution (or zoom)\n if (options.resolution !== undefined) {\n options.resolution = this.getResolution();\n } else {\n options.zoom = this.getZoom();\n }\n\n // preserve center\n options.center = this.getCenter();\n\n // preserve rotation\n options.rotation = this.getRotation();\n\n return assign({}, options, newOptions);\n };\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))} 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 animate (var_args) {\n var arguments$1 = arguments;\n\n var animationCount = arguments.length;\n var callback;\n if (animationCount > 1 && 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.setCenter(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.getCenter().slice();\n var resolution = this.getResolution();\n var rotation = this.getRotation();\n var series = [];\n for (var i = 0; i < animationCount; ++i) {\n var options = /** @type {AnimationOptions} */ (arguments$1[i]);\n\n var animation = /** @type {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 });\n\n if (options.center) {\n animation.sourceCenter = center;\n animation.targetCenter = options.center;\n center = animation.targetCenter;\n }\n\n if (options.zoom !== undefined) {\n animation.sourceResolution = resolution;\n animation.targetResolution = this.constrainResolution(\n this.maxResolution_, options.zoom - this.minZoom_, 0);\n resolution = animation.targetResolution;\n } else if (options.resolution) {\n animation.sourceResolution = resolution;\n animation.targetResolution = options.resolution;\n resolution = animation.targetResolution;\n }\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\n animation.callback = callback;\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 } 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 /**\n * Determine if the view is being animated.\n * @return {boolean} The view is being animated.\n * @api\n */\n View.prototype.getAnimating = function getAnimating () {\n return this.hints_[ViewHint.ANIMATING] > 0;\n };\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 getInteracting () {\n return this.hints_[ViewHint.INTERACTING] > 0;\n };\n\n /**\n * Cancel any ongoing animations.\n * @api\n */\n View.prototype.cancelAnimations = function cancelAnimations () {\n this.setHint(ViewHint.ANIMATING, -this.hints_[ViewHint.ANIMATING]);\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 }\n this.animations_.length = 0;\n };\n\n /**\n * Update all animations.\n */\n View.prototype.updateAnimations_ = function updateAnimations_ () {\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 } 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.set(ViewProperty.CENTER, [x, y]);\n }\n if (animation.sourceResolution && animation.targetResolution) {\n var resolution = progress === 1 ?\n animation.targetResolution :\n animation.sourceResolution + progress * (animation.targetResolution - animation.sourceResolution);\n if (animation.anchor) {\n this.set(ViewProperty.CENTER,\n this.calculateCenterZoom(resolution, animation.anchor));\n }\n this.set(ViewProperty.RESOLUTION, resolution);\n }\n if (animation.sourceRotation !== undefined && animation.targetRotation !== undefined) {\n var rotation = progress === 1 ?\n modulo(animation.targetRotation + Math.PI, 2 * Math.PI) - Math.PI :\n animation.sourceRotation + progress * (animation.targetRotation - animation.sourceRotation);\n if (animation.anchor) {\n this.set(ViewProperty.CENTER,\n this.calculateCenterRotate(rotation, animation.anchor));\n }\n this.set(ViewProperty.ROTATION, rotation);\n }\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_);\n }\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 calculateCenterRotate (rotation, anchor) {\n var center;\n var currentCenter = this.getCenter();\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 /**\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 calculateCenterZoom (resolution, anchor) {\n var center;\n var currentCenter = this.getCenter();\n var currentResolution = this.getResolution();\n if (currentCenter !== undefined && currentResolution !== undefined) {\n var x = anchor[0] - resolution * (anchor[0] - currentCenter[0]) / currentResolution;\n var y = anchor[1] - resolution * (anchor[1] - currentCenter[1]) / currentResolution;\n center = [x, y];\n }\n return center;\n };\n\n /**\n * @private\n * @return {import(\"./size.js\").Size} Viewport size or `[100, 100]` when no viewport is found.\n */\n View.prototype.getSizeFromViewport_ = function getSizeFromViewport_ () {\n var size = [100, 100];\n var selector = '.ol-viewport[data-view=\"' + getUid(this) + '\"]';\n var element = document.querySelector(selector);\n if (element) {\n var metrics = getComputedStyle(element);\n size[0] = parseInt(metrics.width, 10);\n size[1] = parseInt(metrics.height, 10);\n }\n return size;\n };\n\n /**\n * Get the constrained center of this view.\n * @param {import(\"./coordinate.js\").Coordinate|undefined} center Center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Constrained center.\n * @api\n */\n View.prototype.constrainCenter = function constrainCenter (center) {\n return this.constraints_.center(center);\n };\n\n /**\n * Get the constrained resolution of this view.\n * @param {number|undefined} resolution Resolution.\n * @param {number=} opt_delta Delta. Default is `0`.\n * @param {number=} opt_direction Direction. Default is `0`.\n * @return {number|undefined} Constrained resolution.\n * @api\n */\n View.prototype.constrainResolution = function constrainResolution (resolution, opt_delta, opt_direction) {\n var delta = opt_delta || 0;\n var direction = opt_direction || 0;\n return this.constraints_.resolution(resolution, delta, direction);\n };\n\n /**\n * Get the constrained rotation of this view.\n * @param {number|undefined} rotation Rotation.\n * @param {number=} opt_delta Delta. Default is `0`.\n * @return {number|undefined} Constrained rotation.\n * @api\n */\n View.prototype.constrainRotation = function constrainRotation (rotation, opt_delta) {\n var delta = opt_delta || 0;\n return this.constraints_.rotation(rotation, delta);\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 getCenter () {\n return (\n /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (this.get(ViewProperty.CENTER))\n );\n };\n\n /**\n * @return {Constraints} Constraints.\n */\n View.prototype.getConstraints = function getConstraints () {\n return this.constraints_;\n };\n\n /**\n * @param {Array<number>=} opt_hints Destination array.\n * @return {Array<number>} Hint.\n */\n View.prototype.getHints = function getHints (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 } else {\n return this.hints_.slice();\n }\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 of the\n * first map that uses this view will be used.\n * @return {import(\"./extent.js\").Extent} Extent.\n * @api\n */\n View.prototype.calculateExtent = function calculateExtent (opt_size) {\n var size = opt_size || this.getSizeFromViewport_();\n var center = /** @type {!import(\"./coordinate.js\").Coordinate} */ (this.getCenter());\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\n return getForViewAndSize(center, resolution, rotation, size);\n };\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 getMaxResolution () {\n return this.maxResolution_;\n };\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 getMinResolution () {\n return this.minResolution_;\n };\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 getMaxZoom () {\n return /** @type {number} */ (this.getZoomForResolution(this.minResolution_));\n };\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 setMaxZoom (zoom) {\n this.applyOptions_(this.getUpdatedOptions_({maxZoom: zoom}));\n };\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 getMinZoom () {\n return /** @type {number} */ (this.getZoomForResolution(this.maxResolution_));\n };\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 setMinZoom (zoom) {\n this.applyOptions_(this.getUpdatedOptions_({minZoom: zoom}));\n };\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 getProjection () {\n return this.projection_;\n };\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 getResolution () {\n return /** @type {number|undefined} */ (this.get(ViewProperty.RESOLUTION));\n };\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 getResolutions () {\n return this.resolutions_;\n };\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 getResolutionForExtent (extent, opt_size) {\n var size = opt_size || this.getSizeFromViewport_();\n var xResolution = getWidth(extent) / size[0];\n var yResolution = getHeight(extent) / size[1];\n return Math.max(xResolution, yResolution);\n };\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 getResolutionForValueFunction (opt_power) {\n var power = opt_power || 2;\n var maxResolution = 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 /**\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 getRotation () {\n return /** @type {number} */ (this.get(ViewProperty.ROTATION));\n };\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 getValueForResolutionFunction (opt_power) {\n var power = opt_power || 2;\n var maxResolution = this.maxResolution_;\n var minResolution = this.minResolution_;\n var max = Math.log(maxResolution / minResolution) / Math.log(power);\n return (\n /**\n * @param {number} resolution Resolution.\n * @return {number} Value.\n */\n function(resolution) {\n var value = (Math.log(maxResolution / resolution) / Math.log(power)) / max;\n return value;\n });\n };\n\n /**\n * @param {number} pixelRatio Pixel ratio for center rounding.\n * @return {State} View state.\n */\n View.prototype.getState = function getState (pixelRatio) {\n var center = /** @type {import(\"./coordinate.js\").Coordinate} */ (this.getCenter());\n var projection = this.getProjection();\n var resolution = /** @type {number} */ (this.getResolution());\n var pixelResolution = resolution / pixelRatio;\n var rotation = this.getRotation();\n return (\n /** @type {State} */ ({\n center: [\n Math.round(center[0] / pixelResolution) * pixelResolution,\n Math.round(center[1] / pixelResolution) * pixelResolution\n ],\n projection: projection !== undefined ? projection : null,\n resolution: resolution,\n rotation: rotation,\n zoom: this.getZoom()\n })\n );\n };\n\n /**\n * Get the current zoom level. If you configured your view with a resolutions\n * array (this is rare), this method may return non-integer zoom levels (so\n * the zoom level is not safe to use as an index into a resolutions array).\n * @return {number|undefined} Zoom.\n * @api\n */\n View.prototype.getZoom = function getZoom () {\n var zoom;\n var resolution = this.getResolution();\n if (resolution !== undefined) {\n zoom = this.getZoomForResolution(resolution);\n }\n return zoom;\n };\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 getZoomForResolution (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 } else {\n zoomFactor = max / this.resolutions_[nearest + 1];\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 /**\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 getResolutionForZoom (zoom) {\n return /** @type {number} */ (this.constrainResolution(\n this.maxResolution_, zoom - this.minZoom_, 0));\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 fit (geometryOrExtent, opt_options) {\n var options = opt_options || {};\n var size = options.size;\n if (!size) {\n size = this.getSizeFromViewport_();\n }\n /** @type {import(\"./geom/SimpleGeometry.js\").default} */\n var geometry;\n assert(Array.isArray(geometryOrExtent) || typeof /** @type {?} */ (geometryOrExtent).getSimplifiedGeometry === 'function',\n 24); // Invalid extent or geometry provided as `geometry`\n if (Array.isArray(geometryOrExtent)) {\n assert(!isEmpty(geometryOrExtent),\n 25); // Cannot fit empty extent provided as `geometry`\n geometry = polygonFromExtent(geometryOrExtent);\n } else if (geometryOrExtent.getType() === GeometryType.CIRCLE) {\n geometryOrExtent = geometryOrExtent.getExtent();\n geometry = polygonFromExtent(geometryOrExtent);\n geometry.rotate(this.getRotation(), getCenter(geometryOrExtent));\n } else {\n geometry = geometryOrExtent;\n }\n\n var padding = options.padding !== undefined ? options.padding : [0, 0, 0, 0];\n var constrainResolution = options.constrainResolution !== undefined ?\n options.constrainResolution : true;\n var nearest = options.nearest !== undefined ? options.nearest : false;\n var minResolution;\n if (options.minResolution !== undefined) {\n minResolution = options.minResolution;\n } else if (options.maxZoom !== undefined) {\n minResolution = this.constrainResolution(\n this.maxResolution_, options.maxZoom - this.minZoom_, 0);\n } else {\n minResolution = 0;\n }\n var coords = geometry.getFlatCoordinates();\n\n // calculate rotated extent\n var rotation = this.getRotation();\n var cosAngle = Math.cos(-rotation);\n var sinAngle = Math.sin(-rotation);\n var minRotX = +Infinity;\n var minRotY = +Infinity;\n var maxRotX = -Infinity;\n var maxRotY = -Infinity;\n var stride = geometry.getStride();\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\n // calculate resolution\n var resolution = this.getResolutionForExtent(\n [minRotX, minRotY, maxRotX, maxRotY],\n [size[0] - padding[1] - padding[3], size[1] - padding[0] - padding[2]]);\n resolution = isNaN(resolution) ? minResolution :\n Math.max(resolution, minResolution);\n if (constrainResolution) {\n var constrainedResolution = this.constrainResolution(resolution, 0, 0);\n if (!nearest && constrainedResolution < resolution) {\n constrainedResolution = this.constrainResolution(\n constrainedResolution, -1, 0);\n }\n resolution = constrainedResolution;\n }\n\n // calculate center\n sinAngle = -sinAngle; // go back to original rotation\n var centerRotX = (minRotX + maxRotX) / 2;\n var centerRotY = (minRotY + maxRotY) / 2;\n centerRotX += (padding[1] - padding[3]) / 2 * resolution;\n centerRotY += (padding[0] - padding[2]) / 2 * resolution;\n var centerX = centerRotX * cosAngle - centerRotY * sinAngle;\n var centerY = centerRotY * cosAngle + centerRotX * sinAngle;\n var center = [centerX, centerY];\n var callback = options.callback ? options.callback : VOID;\n\n if (options.duration !== undefined) {\n this.animate({\n resolution: resolution,\n center: center,\n duration: options.duration,\n easing: options.easing\n }, callback);\n } else {\n this.setResolution(resolution);\n this.setCenter(center);\n animationCallback(callback, true);\n }\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 centerOn (coordinate, size, position) {\n // calculate rotated position\n var rotation = this.getRotation();\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 var resolution = this.getResolution();\n rotX += (size[0] / 2 - position[0]) * resolution;\n rotY += (position[1] - size[1] / 2) * resolution;\n\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\n this.setCenter([centerX, centerY]);\n };\n\n /**\n * @return {boolean} Is defined.\n */\n View.prototype.isDef = function isDef () {\n return !!this.getCenter() && this.getResolution() !== undefined;\n };\n\n /**\n * Rotate the view around a given coordinate.\n * @param {number} rotation New rotation value for the view.\n * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The rotation center.\n * @api\n */\n View.prototype.rotate = function rotate (rotation, opt_anchor) {\n if (opt_anchor !== undefined) {\n var center = this.calculateCenterRotate(rotation, opt_anchor);\n this.setCenter(center);\n }\n this.setRotation(rotation);\n };\n\n /**\n * Set the center of the current view.\n * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n * @observable\n * @api\n */\n View.prototype.setCenter = function setCenter (center) {\n this.set(ViewProperty.CENTER, center);\n if (this.getAnimating()) {\n this.cancelAnimations();\n }\n };\n\n /**\n * @param {ViewHint} hint Hint.\n * @param {number} delta Delta.\n * @return {number} New value.\n */\n View.prototype.setHint = function setHint (hint, delta) {\n this.hints_[hint] += delta;\n this.changed();\n return this.hints_[hint];\n };\n\n /**\n * Set the resolution for this view.\n * @param {number|undefined} resolution The resolution of the view.\n * @observable\n * @api\n */\n View.prototype.setResolution = function setResolution (resolution) {\n this.set(ViewProperty.RESOLUTION, resolution);\n if (this.getAnimating()) {\n this.cancelAnimations();\n }\n };\n\n /**\n * Set the rotation for this view.\n * @param {number} rotation The rotation of the view in radians.\n * @observable\n * @api\n */\n View.prototype.setRotation = function setRotation (rotation) {\n this.set(ViewProperty.ROTATION, rotation);\n if (this.getAnimating()) {\n this.cancelAnimations();\n }\n };\n\n /**\n * Zoom to a specific zoom level.\n * @param {number} zoom Zoom level.\n * @api\n */\n View.prototype.setZoom = function setZoom (zoom) {\n this.setResolution(this.getResolutionForZoom(zoom));\n };\n\n return View;\n}(BaseObject));\n\n\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\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 return createExtent(options.extent);\n } else {\n return centerNone;\n }\n}\n\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\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\n var minZoom = options.minZoom !== undefined ?\n options.minZoom : DEFAULT_MIN_ZOOM;\n\n var maxZoom = options.maxZoom !== undefined ?\n options.maxZoom : defaultMaxZoom;\n\n var zoomFactor = options.zoomFactor !== undefined ?\n options.zoomFactor : defaultZoomFactor;\n\n if (options.resolutions !== undefined) {\n var resolutions = options.resolutions;\n maxResolution = resolutions[minZoom];\n minResolution = resolutions[maxZoom] !== undefined ?\n resolutions[maxZoom] : resolutions[resolutions.length - 1];\n resolutionConstraint = createSnapToResolutions(\n resolutions);\n } else {\n // calculate the default min and max resolution\n var projection = createProjection(options.projection, 'EPSG:3857');\n var extent = projection.getExtent();\n var size = !extent ?\n // use an extent that can fit the whole world if need be\n 360 * METERS_PER_UNIT[Units.DEGREES] /\n projection.getMetersPerUnit() :\n Math.max(getWidth(extent), getHeight(extent));\n\n var defaultMaxResolution = size / DEFAULT_TILE_SIZE / Math.pow(\n defaultZoomFactor, DEFAULT_MIN_ZOOM);\n\n var defaultMinResolution = defaultMaxResolution / Math.pow(\n defaultZoomFactor, defaultMaxZoom - DEFAULT_MIN_ZOOM);\n\n // user provided maxResolution takes precedence\n maxResolution = options.maxResolution;\n if (maxResolution !== undefined) {\n minZoom = 0;\n } else {\n maxResolution = defaultMaxResolution / Math.pow(zoomFactor, minZoom);\n }\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 } else {\n minResolution = defaultMaxResolution / Math.pow(zoomFactor, maxZoom);\n }\n } else {\n minResolution = defaultMinResolution;\n }\n }\n\n // given discrete zoom levels, minResolution may be different than provided\n maxZoom = minZoom + Math.floor(\n Math.log(maxResolution / minResolution) / Math.log(zoomFactor));\n minResolution = maxResolution / Math.pow(zoomFactor, maxZoom - minZoom);\n\n resolutionConstraint = createSnapToPower(\n zoomFactor, maxResolution, maxZoom - minZoom);\n }\n return {constraint: resolutionConstraint, maxResolution: maxResolution,\n minResolution: minResolution, minZoom: minZoom, zoomFactor: zoomFactor};\n}\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 ?\n options.enableRotation : true;\n if (enableRotation) {\n var constrainRotation = options.constrainRotation;\n if (constrainRotation === undefined || constrainRotation === true) {\n return createSnapToZero();\n } else if (constrainRotation === false) {\n return rotationNone;\n } else if (typeof constrainRotation === 'number') {\n return createSnapToN(constrainRotation);\n } else {\n return rotationNone;\n }\n } else {\n return disable;\n }\n}\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\nexport default View;\n\n//# sourceMappingURL=View.js.map","/**\n * @module ol/dom\n */\n\n\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 * @return {CanvasRenderingContext2D} The context.\n */\nexport function createCanvasContext2D(opt_width, opt_height) {\n var canvas = /** @type {HTMLCanvasElement} */ (document.createElement('canvas'));\n if (opt_width) {\n canvas.width = opt_width;\n }\n if (opt_height) {\n canvas.height = opt_height;\n }\n return /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d'));\n}\n\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\n return width;\n}\n\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\n return height;\n}\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/**\n * @param {Node} node The node to remove.\n * @returns {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/**\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//# sourceMappingURL=dom.js.map","/**\n * @module ol/layer/Property\n */\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 SOURCE: 'source'\n};\n\n//# sourceMappingURL=Property.js.map","/**\n * @module ol/layer/Base\n */\nimport {abstract} from '../util.js';\nimport BaseObject from '../Object.js';\nimport LayerProperty from './Property.js';\nimport {clamp} from '../math.js';\nimport {assign} from '../obj.js';\n\n\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 */\n\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 = /*@__PURE__*/(function (BaseObject) {\n function BaseLayer(options) {\n\n BaseObject.call(this);\n\n /**\n * @type {Object<string, *>}\n */\n var properties = assign({}, options);\n properties[LayerProperty.OPACITY] =\n options.opacity !== undefined ? options.opacity : 1;\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\n this.setProperties(properties);\n\n /**\n * @type {import(\"./Layer.js\").State}\n * @private\n */\n this.state_ = null;\n\n /**\n * The layer type.\n * @type {import(\"../LayerType.js\").default}\n * @protected;\n */\n this.type;\n\n }\n\n if ( BaseObject ) BaseLayer.__proto__ = BaseObject;\n BaseLayer.prototype = Object.create( BaseObject && BaseObject.prototype );\n BaseLayer.prototype.constructor = BaseLayer;\n\n /**\n * Get the layer type (used when creating a layer renderer).\n * @return {import(\"../LayerType.js\").default} The layer type.\n */\n BaseLayer.prototype.getType = function getType () {\n return this.type;\n };\n\n /**\n * @return {import(\"./Layer.js\").State} Layer state.\n */\n BaseLayer.prototype.getLayerState = function getLayerState () {\n /** @type {import(\"./Layer.js\").State} */\n var state = this.state_ || /** @type {?} */ ({\n layer: this,\n managed: true\n });\n state.opacity = clamp(this.getOpacity(), 0, 1);\n state.sourceState = this.getSourceState();\n state.visible = this.getVisible();\n state.extent = this.getExtent();\n state.zIndex = this.getZIndex() || 0;\n state.maxResolution = this.getMaxResolution();\n state.minResolution = Math.max(this.getMinResolution(), 0);\n this.state_ = state;\n\n return state;\n };\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 getLayersArray (opt_array) {\n return abstract();\n };\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 getLayerStatesArray (opt_states) {\n return abstract();\n };\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 getExtent () {\n return (\n /** @type {import(\"../extent.js\").Extent|undefined} */ (this.get(LayerProperty.EXTENT))\n );\n };\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 getMaxResolution () {\n return /** @type {number} */ (this.get(LayerProperty.MAX_RESOLUTION));\n };\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 getMinResolution () {\n return /** @type {number} */ (this.get(LayerProperty.MIN_RESOLUTION));\n };\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 getOpacity () {\n return /** @type {number} */ (this.get(LayerProperty.OPACITY));\n };\n\n /**\n * @abstract\n * @return {import(\"../source/State.js\").default} Source state.\n */\n BaseLayer.prototype.getSourceState = function getSourceState () {\n return abstract();\n };\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 getVisible () {\n return /** @type {boolean} */ (this.get(LayerProperty.VISIBLE));\n };\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 getZIndex () {\n return /** @type {number} */ (this.get(LayerProperty.Z_INDEX));\n };\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 setExtent (extent) {\n this.set(LayerProperty.EXTENT, extent);\n };\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 setMaxResolution (maxResolution) {\n this.set(LayerProperty.MAX_RESOLUTION, maxResolution);\n };\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 setMinResolution (minResolution) {\n this.set(LayerProperty.MIN_RESOLUTION, minResolution);\n };\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 setOpacity (opacity) {\n this.set(LayerProperty.OPACITY, opacity);\n };\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 setVisible (visible) {\n this.set(LayerProperty.VISIBLE, visible);\n };\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 setZIndex (zindex) {\n this.set(LayerProperty.Z_INDEX, zindex);\n };\n\n return BaseLayer;\n}(BaseObject));\n\n\nexport default BaseLayer;\n\n//# sourceMappingURL=Base.js.map","/**\n * @module ol/source/State\n */\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\n//# sourceMappingURL=State.js.map","/**\n * @module ol/layer/Group\n */\nimport {getUid} from '../util.js';\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport {getChangeEventType} from '../Object.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport {assert} from '../asserts.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {getIntersection} from '../extent.js';\nimport BaseLayer from './Base.js';\nimport {assign, clear} from '../obj.js';\nimport SourceState from '../source/State.js';\n\n\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 {Array<import(\"./Base.js\").default>|import(\"../Collection.js\").default<import(\"./Base.js\").default>} [layers] Child layers.\n */\n\n\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n LAYERS: 'layers'\n};\n\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 = /*@__PURE__*/(function (BaseLayer) {\n function LayerGroup(opt_options) {\n\n var options = opt_options || {};\n var baseOptions = /** @type {Options} */ (assign({}, options));\n delete baseOptions.layers;\n\n var layers = options.layers;\n\n BaseLayer.call(this, baseOptions);\n\n /**\n * @private\n * @type {Array<import(\"../events.js\").EventsKey>}\n */\n this.layersListenerKeys_ = [];\n\n /**\n * @private\n * @type {Object<string, Array<import(\"../events.js\").EventsKey>>}\n */\n this.listenerKeys_ = {};\n\n listen(this,\n getChangeEventType(Property.LAYERS),\n this.handleLayersChanged_, this);\n\n if (layers) {\n if (Array.isArray(layers)) {\n layers = new Collection(layers.slice(), {unique: true});\n } else {\n assert(typeof /** @type {?} */ (layers).getArray === 'function',\n 43); // Expected `layers` to be an array or a `Collection`\n }\n } else {\n layers = new Collection(undefined, {unique: true});\n }\n\n this.setLayers(layers);\n\n }\n\n if ( BaseLayer ) LayerGroup.__proto__ = BaseLayer;\n LayerGroup.prototype = Object.create( BaseLayer && BaseLayer.prototype );\n LayerGroup.prototype.constructor = LayerGroup;\n\n /**\n * @private\n */\n LayerGroup.prototype.handleLayerChange_ = function handleLayerChange_ () {\n this.changed();\n };\n\n /**\n * @private\n */\n LayerGroup.prototype.handleLayersChanged_ = function handleLayersChanged_ () {\n this.layersListenerKeys_.forEach(unlistenByKey);\n this.layersListenerKeys_.length = 0;\n\n var layers = this.getLayers();\n this.layersListenerKeys_.push(\n listen(layers, CollectionEventType.ADD, this.handleLayersAdd_, this),\n listen(layers, CollectionEventType.REMOVE, this.handleLayersRemove_, this)\n );\n\n for (var id in this.listenerKeys_) {\n this.listenerKeys_[id].forEach(unlistenByKey);\n }\n clear(this.listenerKeys_);\n\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\n this.changed();\n };\n\n /**\n * @param {import(\"../Collection.js\").CollectionEvent} collectionEvent CollectionEvent.\n * @private\n */\n LayerGroup.prototype.handleLayersAdd_ = function handleLayersAdd_ (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 /**\n * @param {import(\"../Collection.js\").CollectionEvent} collectionEvent CollectionEvent.\n * @private\n */\n LayerGroup.prototype.handleLayersRemove_ = function handleLayersRemove_ (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 /**\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 getLayers () {\n return (\n /** @type {!import(\"../Collection.js\").default<import(\"./Base.js\").default>} */ (this.get(Property.LAYERS))\n );\n };\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 setLayers (layers) {\n this.set(Property.LAYERS, layers);\n };\n\n /**\n * @inheritDoc\n */\n LayerGroup.prototype.getLayersArray = function getLayersArray (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 /**\n * @inheritDoc\n */\n LayerGroup.prototype.getLayerStatesArray = function getLayerStatesArray (opt_states) {\n var states = opt_states !== undefined ? opt_states : [];\n\n var pos = states.length;\n\n this.getLayers().forEach(function(layer) {\n layer.getLayerStatesArray(states);\n });\n\n var ownLayerState = this.getLayerState();\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(\n layerState.maxResolution, ownLayerState.maxResolution);\n layerState.minResolution = Math.max(\n layerState.minResolution, ownLayerState.minResolution);\n if (ownLayerState.extent !== undefined) {\n if (layerState.extent !== undefined) {\n layerState.extent = getIntersection(layerState.extent, ownLayerState.extent);\n } else {\n layerState.extent = ownLayerState.extent;\n }\n }\n }\n\n return states;\n };\n\n /**\n * @inheritDoc\n */\n LayerGroup.prototype.getSourceState = function getSourceState () {\n return SourceState.READY;\n };\n\n return LayerGroup;\n}(BaseLayer));\n\n\nexport default LayerGroup;\n\n//# sourceMappingURL=Group.js.map","/**\n * @module ol/size\n */\n\n\n/**\n * An array of numbers representing a size: `[width, height]`.\n * @typedef {Array<number>} Size\n * @api\n */\n\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\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\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\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 } else {\n if (opt_size === undefined) {\n opt_size = [size, size];\n } else {\n opt_size[0] = opt_size[1] = /** @type {number} */ (size);\n }\n return opt_size;\n }\n}\n\n//# sourceMappingURL=size.js.map","/**\n * @module ol/PluggableMap\n */\nimport {getUid} from './util.js';\nimport Collection from './Collection.js';\nimport CollectionEventType from './CollectionEventType.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 RenderEventType from './render/EventType.js';\nimport BaseObject, {getChangeEventType} from './Object.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport TileQueue from './TileQueue.js';\nimport View from './View.js';\nimport ViewHint from './ViewHint.js';\nimport {assert} from './asserts.js';\nimport {removeNode} from './dom.js';\nimport {listen, unlistenByKey, unlisten} from './events.js';\nimport {stopPropagation} from './events/Event.js';\nimport EventType from './events/EventType.js';\nimport {createEmpty, clone, createOrUpdateEmpty, equals, getForViewAndSize, isEmpty} from './extent.js';\nimport {TRUE} from './functions.js';\nimport {DEVICE_PIXEL_RATIO, TOUCH} from './has.js';\nimport LayerGroup from './layer/Group.js';\nimport {hasArea} from './size.js';\nimport {DROP} from './structs/PriorityQueue.js';\nimport {create as createTransform, apply as applyTransform} from './transform.js';\n\n\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\n * @property {import(\"./transform.js\").Transform} coordinateToPixelTransform\n * @property {null|import(\"./extent.js\").Extent} extent\n * @property {import(\"./coordinate.js\").Coordinate} focus\n * @property {number} index\n * @property {Object<string, import(\"./layer/Layer.js\").State>} layerStates\n * @property {Array<import(\"./layer/Layer.js\").State>} layerStatesArray\n * @property {import(\"./transform.js\").Transform} pixelToCoordinateTransform\n * @property {Array<PostRenderFunction>} postRenderFunctions\n * @property {import(\"./size.js\").Size} size\n * @property {!Object<string, boolean>} skippedFeatureUids\n * @property {TileQueue} tileQueue\n * @property {Object<string, Object<string, import(\"./TileRange.js\").default>>} usedTiles\n * @property {Array<number>} viewHints\n * @property {!Object<string, Object<string, boolean>>} wantedTiles\n */\n\n\n/**\n * @typedef {function(PluggableMap, ?FrameState): boolean} PostRenderFunction\n */\n\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 pixels. Pixels\n * inside the radius around the given position will be checked for features. This only\n * works for the canvas renderer and not for WebGL.\n */\n\n\n/**\n * @typedef {Object} MapOptionsInternal\n * @property {Collection<import(\"./control/Control.js\").default>} [controls]\n * @property {Collection<import(\"./interaction/Interaction.js\").default>} [interactions]\n * @property {HTMLElement|Document} keyboardEventTarget\n * @property {Collection<import(\"./Overlay.js\").default>} overlays\n * @property {Object<string, *>} values\n */\n\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 {boolean} [loadTilesWhileAnimating=false] When set to `true`, tiles\n * will be loaded during animations. This may improve the user experience, but\n * can also make animations stutter on devices with slow memory.\n * @property {boolean} [loadTilesWhileInteracting=false] When set to `true`,\n * tiles will be loaded while interacting with the map. This may improve the\n * user experience, but can also make map panning and zooming choppy on devices\n * with slow memory.\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.\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\n/**\n * @fires import(\"./MapBrowserEvent.js\").MapBrowserEvent\n * @fires import(\"./MapEvent.js\").MapEvent\n * @fires module:ol/render/Event~RenderEvent#postcompose\n * @fires module:ol/render/Event~RenderEvent#precompose\n * @fires module:ol/render/Event~RenderEvent#rendercomplete\n * @api\n */\nvar PluggableMap = /*@__PURE__*/(function (BaseObject) {\n function PluggableMap(options) {\n\n BaseObject.call(this);\n\n var optionsInternal = createOptionsInternal(options);\n\n /**\n * @type {number}\n * @private\n */\n this.maxTilesLoading_ = options.maxTilesLoading !== undefined ? options.maxTilesLoading : 16;\n\n /**\n * @type {boolean}\n * @private\n */\n this.loadTilesWhileAnimating_ =\n options.loadTilesWhileAnimating !== undefined ?\n options.loadTilesWhileAnimating : false;\n\n /**\n * @type {boolean}\n * @private\n */\n this.loadTilesWhileInteracting_ =\n options.loadTilesWhileInteracting !== undefined ?\n options.loadTilesWhileInteracting : false;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = options.pixelRatio !== undefined ?\n options.pixelRatio : DEVICE_PIXEL_RATIO;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.animationDelayKey_;\n\n /**\n * @private\n */\n this.animationDelay_ = function() {\n this.animationDelayKey_ = undefined;\n this.renderFrame_.call(this, Date.now());\n }.bind(this);\n\n /**\n * @private\n * @type {import(\"./transform.js\").Transform}\n */\n this.coordinateToPixelTransform_ = createTransform();\n\n /**\n * @private\n * @type {import(\"./transform.js\").Transform}\n */\n this.pixelToCoordinateTransform_ = createTransform();\n\n /**\n * @private\n * @type {number}\n */\n this.frameIndex_ = 0;\n\n /**\n * @private\n * @type {?FrameState}\n */\n this.frameState_ = null;\n\n /**\n * The extent at the previous 'moveend' event.\n * @private\n * @type {import(\"./extent.js\").Extent}\n */\n this.previousExtent_ = null;\n\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.viewPropertyListenerKey_ = null;\n\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.viewChangeListenerKey_ = null;\n\n /**\n * @private\n * @type {Array<import(\"./events.js\").EventsKey>}\n */\n this.layerGroupPropertyListenerKeys_ = null;\n\n /**\n * @private\n * @type {!HTMLElement}\n */\n this.viewport_ = document.createElement('div');\n this.viewport_.className = 'ol-viewport' + (TOUCH ? ' 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 // prevent page zoom on IE >= 10 browsers\n this.viewport_.style.msTouchAction = 'none';\n this.viewport_.style.touchAction = 'none';\n\n /**\n * @private\n * @type {!HTMLElement}\n */\n this.overlayContainer_ = document.createElement('div');\n this.overlayContainer_.className = 'ol-overlaycontainer';\n this.viewport_.appendChild(this.overlayContainer_);\n\n /**\n * @private\n * @type {!HTMLElement}\n */\n this.overlayContainerStopEvent_ = document.createElement('div');\n this.overlayContainerStopEvent_.className = 'ol-overlaycontainer-stopevent';\n var overlayEvents = [\n EventType.CLICK,\n EventType.DBLCLICK,\n EventType.MOUSEDOWN,\n EventType.TOUCHSTART,\n EventType.MSPOINTERDOWN,\n MapBrowserEventType.POINTERDOWN,\n EventType.MOUSEWHEEL,\n EventType.WHEEL\n ];\n for (var i = 0, ii = overlayEvents.length; i < ii; ++i) {\n listen(this.overlayContainerStopEvent_, overlayEvents[i], stopPropagation);\n }\n this.viewport_.appendChild(this.overlayContainerStopEvent_);\n\n /**\n * @private\n * @type {MapBrowserEventHandler}\n */\n this.mapBrowserEventHandler_ = new MapBrowserEventHandler(this, options.moveTolerance);\n for (var key in MapBrowserEventType) {\n listen(this.mapBrowserEventHandler_, MapBrowserEventType[key],\n this.handleMapBrowserEvent, this);\n }\n\n /**\n * @private\n * @type {HTMLElement|Document}\n */\n this.keyboardEventTarget_ = optionsInternal.keyboardEventTarget;\n\n /**\n * @private\n * @type {Array<import(\"./events.js\").EventsKey>}\n */\n this.keyHandlerKeys_ = null;\n\n listen(this.viewport_, EventType.CONTEXTMENU, this.handleBrowserEvent, this);\n listen(this.viewport_, EventType.WHEEL, this.handleBrowserEvent, this);\n listen(this.viewport_, EventType.MOUSEWHEEL, this.handleBrowserEvent, this);\n\n /**\n * @type {Collection<import(\"./control/Control.js\").default>}\n * @protected\n */\n this.controls = optionsInternal.controls || new Collection();\n\n /**\n * @type {Collection<import(\"./interaction/Interaction.js\").default>}\n * @protected\n */\n this.interactions = optionsInternal.interactions || new Collection();\n\n /**\n * @type {Collection<import(\"./Overlay.js\").default>}\n * @private\n */\n this.overlays_ = optionsInternal.overlays;\n\n /**\n * A lookup of overlays by id.\n * @private\n * @type {Object<string, import(\"./Overlay.js\").default>}\n */\n this.overlayIdIndex_ = {};\n\n /**\n * @type {import(\"./renderer/Map.js\").default}\n * @private\n */\n this.renderer_ = this.createRenderer();\n\n /**\n * @type {function(Event)|undefined}\n * @private\n */\n this.handleResize_;\n\n /**\n * @private\n * @type {import(\"./coordinate.js\").Coordinate}\n */\n this.focus_ = null;\n\n /**\n * @private\n * @type {!Array<PostRenderFunction>}\n */\n this.postRenderFunctions_ = [];\n\n /**\n * @private\n * @type {TileQueue}\n */\n this.tileQueue_ = new TileQueue(\n this.getTilePriority.bind(this),\n this.handleTileChange_.bind(this));\n\n /**\n * Uids of features to skip at rendering time.\n * @type {Object<string, boolean>}\n * @private\n */\n this.skippedFeatureUids_ = {};\n\n listen(\n this, getChangeEventType(MapProperty.LAYERGROUP),\n this.handleLayerGroupChanged_, this);\n listen(this, getChangeEventType(MapProperty.VIEW),\n this.handleViewChanged_, this);\n listen(this, getChangeEventType(MapProperty.SIZE),\n this.handleSizeChanged_, this);\n listen(this, getChangeEventType(MapProperty.TARGET),\n this.handleTargetChanged_, this);\n\n // setProperties will trigger the rendering of the map if the map\n // is \"defined\" already.\n this.setProperties(optionsInternal.values);\n\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\n listen(this.controls, CollectionEventType.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function(event) {\n event.element.setMap(this);\n }, this);\n\n listen(this.controls, CollectionEventType.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function(event) {\n event.element.setMap(null);\n }, this);\n\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\n listen(this.interactions, CollectionEventType.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function(event) {\n event.element.setMap(this);\n }, this);\n\n listen(this.interactions, CollectionEventType.REMOVE,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function(event) {\n event.element.setMap(null);\n }, this);\n\n this.overlays_.forEach(this.addOverlayInternal_.bind(this));\n\n listen(this.overlays_, CollectionEventType.ADD,\n /**\n * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n */\n function(event) {\n this.addOverlayInternal_(/** @type {import(\"./Overlay.js\").default} */ (event.element));\n }, this);\n\n listen(this.overlays_, 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 }, this);\n\n }\n\n if ( BaseObject ) PluggableMap.__proto__ = BaseObject;\n PluggableMap.prototype = Object.create( BaseObject && BaseObject.prototype );\n PluggableMap.prototype.constructor = PluggableMap;\n\n /**\n * @abstract\n * @return {import(\"./renderer/Map.js\").default} The map renderer\n */\n PluggableMap.prototype.createRenderer = function createRenderer () {\n throw new Error('Use a map type that has a createRenderer method');\n };\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 addControl (control) {\n this.getControls().push(control);\n };\n\n /**\n * Add the given interaction to the map.\n * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to add.\n * @api\n */\n PluggableMap.prototype.addInteraction = function addInteraction (interaction) {\n this.getInteractions().push(interaction);\n };\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 addLayer (layer) {\n var layers = this.getLayerGroup().getLayers();\n layers.push(layer);\n };\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 addOverlay (overlay) {\n this.getOverlays().push(overlay);\n };\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 addOverlayInternal_ (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 *\n * @inheritDoc\n */\n PluggableMap.prototype.disposeInternal = function disposeInternal () {\n this.mapBrowserEventHandler_.dispose();\n unlisten(this.viewport_, EventType.CONTEXTMENU, this.handleBrowserEvent, this);\n unlisten(this.viewport_, EventType.WHEEL, this.handleBrowserEvent, this);\n unlisten(this.viewport_, EventType.MOUSEWHEEL, this.handleBrowserEvent, this);\n if (this.handleResize_ !== undefined) {\n removeEventListener(EventType.RESIZE, this.handleResize_, false);\n this.handleResize_ = undefined;\n }\n if (this.animationDelayKey_) {\n cancelAnimationFrame(this.animationDelayKey_);\n this.animationDelayKey_ = undefined;\n }\n this.setTarget(null);\n BaseObject.prototype.disposeInternal.call(this);\n };\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(this: S, import(\"./Feature.js\").FeatureLike,\n * import(\"./layer/Layer.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 forEachFeatureAtPixel (pixel, callback, opt_options) {\n if (!this.frameState_) {\n return;\n }\n var coordinate = this.getCoordinateFromPixel(pixel);\n opt_options = opt_options !== undefined ? opt_options :\n /** @type {AtPixelOptions} */ ({});\n var hitTolerance = opt_options.hitTolerance !== undefined ?\n opt_options.hitTolerance * this.frameState_.pixelRatio : 0;\n var layerFilter = opt_options.layerFilter !== undefined ?\n opt_options.layerFilter : TRUE;\n return this.renderer_.forEachFeatureAtCoordinate(\n coordinate, this.frameState_, hitTolerance, callback, null,\n layerFilter, null);\n };\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 * `null` if none were found.\n * @api\n */\n PluggableMap.prototype.getFeaturesAtPixel = function getFeaturesAtPixel (pixel, opt_options) {\n var features = null;\n this.forEachFeatureAtPixel(pixel, function(feature) {\n if (!features) {\n features = [];\n }\n features.push(feature);\n }, opt_options);\n return features;\n };\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 * @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 forEachLayerAtPixel (pixel, callback, opt_options) {\n if (!this.frameState_) {\n return;\n }\n var options = opt_options || /** @type {AtPixelOptions} */ ({});\n var hitTolerance = options.hitTolerance !== undefined ?\n opt_options.hitTolerance * this.frameState_.pixelRatio : 0;\n var layerFilter = options.layerFilter || TRUE;\n return this.renderer_.forEachLayerAtPixel(\n pixel, this.frameState_, hitTolerance, callback, null, layerFilter, null);\n };\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 * @template U\n * @api\n */\n PluggableMap.prototype.hasFeatureAtPixel = function hasFeatureAtPixel (pixel, opt_options) {\n if (!this.frameState_) {\n return false;\n }\n var coordinate = this.getCoordinateFromPixel(pixel);\n opt_options = opt_options !== undefined ? opt_options :\n /** @type {AtPixelOptions} */ ({});\n var layerFilter = opt_options.layerFilter !== undefined ? opt_options.layerFilter : TRUE;\n var hitTolerance = opt_options.hitTolerance !== undefined ?\n opt_options.hitTolerance * this.frameState_.pixelRatio : 0;\n return this.renderer_.hasFeatureAtCoordinate(\n coordinate, this.frameState_, hitTolerance, layerFilter, null);\n };\n\n /**\n * Returns the coordinate in view projection for a browser event.\n * @param {Event} event Event.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n * @api\n */\n PluggableMap.prototype.getEventCoordinate = function getEventCoordinate (event) {\n return this.getCoordinateFromPixel(this.getEventPixel(event));\n };\n\n /**\n * Returns the map pixel position for a browser event relative to the viewport.\n * @param {Event|TouchEvent} event Event.\n * @return {import(\"./pixel.js\").Pixel} Pixel.\n * @api\n */\n PluggableMap.prototype.getEventPixel = function getEventPixel (event) {\n var viewportPosition = this.viewport_.getBoundingClientRect();\n var eventPosition = 'changedTouches' in event ?\n /** @type {TouchEvent} */ (event).changedTouches[0] :\n /** @type {MouseEvent} */ (event);\n\n return [\n eventPosition.clientX - viewportPosition.left,\n eventPosition.clientY - viewportPosition.top\n ];\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 getTarget () {\n return /** @type {HTMLElement|string|undefined} */ (this.get(MapProperty.TARGET));\n };\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 getTargetElement () {\n var target = this.getTarget();\n if (target !== undefined) {\n return typeof target === 'string' ? document.getElementById(target) : target;\n } else {\n return null;\n }\n };\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 * @api\n */\n PluggableMap.prototype.getCoordinateFromPixel = function getCoordinateFromPixel (pixel) {\n var frameState = this.frameState_;\n if (!frameState) {\n return null;\n } else {\n return applyTransform(frameState.pixelToCoordinateTransform, pixel.slice());\n }\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 getControls () {\n return this.controls;\n };\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 getOverlays () {\n return this.overlays_;\n };\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 getOverlayById (id) {\n var overlay = this.overlayIdIndex_[id.toString()];\n return overlay !== undefined ? overlay : null;\n };\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 getInteractions () {\n return this.interactions;\n };\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 getLayerGroup () {\n return (\n /** @type {LayerGroup} */ (this.get(MapProperty.LAYERGROUP))\n );\n };\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 getLayers () {\n var layers = this.getLayerGroup().getLayers();\n return layers;\n };\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 * @api\n */\n PluggableMap.prototype.getPixelFromCoordinate = function getPixelFromCoordinate (coordinate) {\n var frameState = this.frameState_;\n if (!frameState) {\n return null;\n } else {\n return applyTransform(frameState.coordinateToPixelTransform, coordinate.slice(0, 2));\n }\n };\n\n /**\n * Get the map renderer.\n * @return {import(\"./renderer/Map.js\").default} Renderer\n */\n PluggableMap.prototype.getRenderer = function getRenderer () {\n return this.renderer_;\n };\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 getSize () {\n return (\n /** @type {import(\"./size.js\").Size|undefined} */ (this.get(MapProperty.SIZE))\n );\n };\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 getView () {\n return (\n /** @type {View} */ (this.get(MapProperty.VIEW))\n );\n };\n\n /**\n * Get the element that serves as the map viewport.\n * @return {HTMLElement} Viewport.\n * @api\n */\n PluggableMap.prototype.getViewport = function getViewport () {\n return this.viewport_;\n };\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 getOverlayContainer () {\n return this.overlayContainer_;\n };\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 getOverlayContainerStopEvent () {\n return this.overlayContainerStopEvent_;\n };\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 getTilePriority (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 var frameState = this.frameState_;\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\n // between the center of the tile and the focus. The factor of 65536 means\n // that the prioritization should behave as desired for tiles up to\n // 65536 * Math.log(2) = 45426 pixels from the focus.\n var deltaX = tileCenter[0] - frameState.focus[0];\n var deltaY = tileCenter[1] - frameState.focus[1];\n return 65536 * Math.log(tileResolution) +\n Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution;\n };\n\n /**\n * @param {Event} browserEvent Browser event.\n * @param {string=} opt_type Type.\n */\n PluggableMap.prototype.handleBrowserEvent = function handleBrowserEvent (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 /**\n * @param {MapBrowserEvent} mapBrowserEvent The event to handle.\n */\n PluggableMap.prototype.handleMapBrowserEvent = function handleMapBrowserEvent (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 this.focus_ = mapBrowserEvent.coordinate;\n mapBrowserEvent.frameState = this.frameState_;\n var interactionsArray = this.getInteractions().getArray();\n if (this.dispatchEvent(mapBrowserEvent) !== false) {\n for (var i = interactionsArray.length - 1; i >= 0; i--) {\n var interaction = interactionsArray[i];\n if (!interaction.getActive()) {\n continue;\n }\n var cont = interaction.handleEvent(mapBrowserEvent);\n if (!cont) {\n break;\n }\n }\n }\n };\n\n /**\n * @protected\n */\n PluggableMap.prototype.handlePostRender = function handlePostRender () {\n\n var frameState = this.frameState_;\n\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]) {\n maxTotalLoading = this.loadTilesWhileAnimating_ ? 8 : 0;\n maxNewLoads = 2;\n }\n if (hints[ViewHint.INTERACTING]) {\n maxTotalLoading = this.loadTilesWhileInteracting_ ? 8 : 0;\n maxNewLoads = 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 && this.hasListener(RenderEventType.RENDERCOMPLETE) && !frameState.animate &&\n !this.tileQueue_.getTilesLoading() && !getLoading(this.getLayers().getArray())) {\n this.renderer_.dispatchRenderEvent(RenderEventType.RENDERCOMPLETE, frameState);\n }\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 /**\n * @private\n */\n PluggableMap.prototype.handleSizeChanged_ = function handleSizeChanged_ () {\n this.render();\n };\n\n /**\n * @private\n */\n PluggableMap.prototype.handleTargetChanged_ = function handleTargetChanged_ () {\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\n var targetElement;\n if (this.getTarget()) {\n targetElement = this.getTargetElement();\n }\n\n if (this.keyHandlerKeys_) {\n for (var i = 0, ii = this.keyHandlerKeys_.length; i < ii; ++i) {\n unlistenByKey(this.keyHandlerKeys_[i]);\n }\n this.keyHandlerKeys_ = null;\n }\n\n if (!targetElement) {\n this.renderer_.removeLayerRenderers();\n removeNode(this.viewport_);\n if (this.handleResize_ !== undefined) {\n removeEventListener(EventType.RESIZE, this.handleResize_, false);\n this.handleResize_ = undefined;\n }\n } else {\n targetElement.appendChild(this.viewport_);\n\n var keyboardEventTarget = !this.keyboardEventTarget_ ?\n targetElement : this.keyboardEventTarget_;\n this.keyHandlerKeys_ = [\n listen(keyboardEventTarget, EventType.KEYDOWN, this.handleBrowserEvent, this),\n listen(keyboardEventTarget, EventType.KEYPRESS, this.handleBrowserEvent, this)\n ];\n\n if (!this.handleResize_) {\n this.handleResize_ = this.updateSize.bind(this);\n window.addEventListener(EventType.RESIZE, this.handleResize_, false);\n }\n }\n\n this.updateSize();\n // updateSize calls setSize, so no need to call this.render\n // ourselves here.\n };\n\n /**\n * @private\n */\n PluggableMap.prototype.handleTileChange_ = function handleTileChange_ () {\n this.render();\n };\n\n /**\n * @private\n */\n PluggableMap.prototype.handleViewPropertyChanged_ = function handleViewPropertyChanged_ () {\n this.render();\n };\n\n /**\n * @private\n */\n PluggableMap.prototype.handleViewChanged_ = function handleViewChanged_ () {\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.viewport_.setAttribute('data-view', getUid(view));\n this.viewPropertyListenerKey_ = listen(\n view, ObjectEventType.PROPERTYCHANGE,\n this.handleViewPropertyChanged_, this);\n this.viewChangeListenerKey_ = listen(\n view, EventType.CHANGE,\n this.handleViewPropertyChanged_, this);\n }\n this.render();\n };\n\n /**\n * @private\n */\n PluggableMap.prototype.handleLayerGroupChanged_ = function handleLayerGroupChanged_ () {\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(\n layerGroup, ObjectEventType.PROPERTYCHANGE,\n this.render, this),\n listen(\n layerGroup, EventType.CHANGE,\n this.render, this)\n ];\n }\n this.render();\n };\n\n /**\n * @return {boolean} Is rendered.\n */\n PluggableMap.prototype.isRendered = function isRendered () {\n return !!this.frameState_;\n };\n\n /**\n * Requests an immediate render in a synchronous manner.\n * @api\n */\n PluggableMap.prototype.renderSync = function renderSync () {\n if (this.animationDelayKey_) {\n cancelAnimationFrame(this.animationDelayKey_);\n }\n this.animationDelay_();\n };\n\n /**\n * Request a map rendering (at the next animation frame).\n * @api\n */\n PluggableMap.prototype.render = function render () {\n if (this.animationDelayKey_ === undefined) {\n this.animationDelayKey_ = requestAnimationFrame(this.animationDelay_);\n }\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 removeControl (control) {\n return this.getControls().remove(control);\n };\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 removeInteraction (interaction) {\n return this.getInteractions().remove(interaction);\n };\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 removeLayer (layer) {\n var layers = this.getLayerGroup().getLayers();\n return layers.remove(layer);\n };\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 removeOverlay (overlay) {\n return this.getOverlays().remove(overlay);\n };\n\n /**\n * @param {number} time Time.\n * @private\n */\n PluggableMap.prototype.renderFrame_ = function renderFrame_ (time) {\n var viewState;\n\n var size = this.getSize();\n var view = this.getView();\n var extent = createEmpty();\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 layerStatesArray = this.getLayerGroup().getLayerStatesArray();\n var layerStates = {};\n for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n layerStates[getUid(layerStatesArray[i].layer)] = layerStatesArray[i];\n }\n viewState = view.getState(this.pixelRatio_);\n frameState = /** @type {FrameState} */ ({\n animate: false,\n coordinateToPixelTransform: this.coordinateToPixelTransform_,\n extent: extent,\n focus: this.focus_ ? this.focus_ : viewState.center,\n index: this.frameIndex_++,\n layerStates: layerStates,\n layerStatesArray: layerStatesArray,\n pixelRatio: this.pixelRatio_,\n pixelToCoordinateTransform: this.pixelToCoordinateTransform_,\n postRenderFunctions: [],\n size: size,\n skippedFeatureUids: this.skippedFeatureUids_,\n tileQueue: this.tileQueue_,\n time: time,\n usedTiles: {},\n viewState: viewState,\n viewHints: viewHints,\n wantedTiles: {}\n });\n }\n\n if (frameState) {\n frameState.extent = getForViewAndSize(viewState.center,\n viewState.resolution, viewState.rotation, frameState.size, extent);\n }\n\n this.frameState_ = frameState;\n this.renderer_.renderFrame(frameState);\n\n if (frameState) {\n if (frameState.animate) {\n this.render();\n }\n Array.prototype.push.apply(this.postRenderFunctions_, frameState.postRenderFunctions);\n\n if (previousFrameState) {\n var moveStart = !this.previousExtent_ ||\n (!isEmpty(this.previousExtent_) &&\n !equals(frameState.extent, this.previousExtent_));\n if (moveStart) {\n this.dispatchEvent(\n new MapEvent(MapEventType.MOVESTART, this, previousFrameState));\n this.previousExtent_ = createOrUpdateEmpty(this.previousExtent_);\n }\n }\n\n var idle = this.previousExtent_ &&\n !frameState.viewHints[ViewHint.ANIMATING] &&\n !frameState.viewHints[ViewHint.INTERACTING] &&\n !equals(frameState.extent, this.previousExtent_);\n\n if (idle) {\n this.dispatchEvent(new MapEvent(MapEventType.MOVEEND, this, frameState));\n clone(frameState.extent, this.previousExtent_);\n }\n }\n\n this.dispatchEvent(new MapEvent(MapEventType.POSTRENDER, this, frameState));\n\n setTimeout(this.handlePostRender.bind(this), 0);\n\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 setLayerGroup (layerGroup) {\n this.set(MapProperty.LAYERGROUP, layerGroup);\n };\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 setSize (size) {\n this.set(MapProperty.SIZE, size);\n };\n\n /**\n * Set the target element to render this map into.\n * @param {HTMLElement|string|undefined} 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 setTarget (target) {\n this.set(MapProperty.TARGET, target);\n };\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 setView (view) {\n this.set(MapProperty.VIEW, view);\n };\n\n /**\n * @param {import(\"./Feature.js\").default} feature Feature.\n */\n PluggableMap.prototype.skipFeature = function skipFeature (feature) {\n this.skippedFeatureUids_[getUid(feature)] = true;\n this.render();\n };\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 updateSize () {\n var targetElement = this.getTargetElement();\n\n if (!targetElement) {\n this.setSize(undefined);\n } else {\n var computedStyle = getComputedStyle(targetElement);\n this.setSize([\n targetElement.offsetWidth -\n parseFloat(computedStyle['borderLeftWidth']) -\n parseFloat(computedStyle['paddingLeft']) -\n parseFloat(computedStyle['paddingRight']) -\n parseFloat(computedStyle['borderRightWidth']),\n targetElement.offsetHeight -\n parseFloat(computedStyle['borderTopWidth']) -\n parseFloat(computedStyle['paddingTop']) -\n parseFloat(computedStyle['paddingBottom']) -\n parseFloat(computedStyle['borderBottomWidth'])\n ]);\n }\n };\n\n /**\n * @param {import(\"./Feature.js\").default} feature Feature.\n */\n PluggableMap.prototype.unskipFeature = function unskipFeature (feature) {\n delete this.skippedFeatureUids_[getUid(feature)];\n this.render();\n };\n\n return PluggableMap;\n}(BaseObject));\n\n\n/**\n * @param {MapOptions} options Map options.\n * @return {MapOptionsInternal} Internal map options.\n */\nfunction createOptionsInternal(options) {\n\n /**\n * @type {HTMLElement|Document}\n */\n var keyboardEventTarget = null;\n if (options.keyboardEventTarget !== undefined) {\n keyboardEventTarget = typeof options.keyboardEventTarget === 'string' ?\n document.getElementById(options.keyboardEventTarget) :\n options.keyboardEventTarget;\n }\n\n /**\n * @type {Object<string, *>}\n */\n var values = {};\n\n var layerGroup = options.layers && typeof /** @type {?} */ (options.layers).getLayers === 'function' ?\n /** @type {LayerGroup} */ (options.layers) : new LayerGroup({layers: /** @type {Collection} */ (options.layers)});\n values[MapProperty.LAYERGROUP] = layerGroup;\n\n values[MapProperty.TARGET] = options.target;\n\n values[MapProperty.VIEW] = options.view !== undefined ?\n options.view : new View();\n\n var controls;\n if (options.controls !== undefined) {\n if (Array.isArray(options.controls)) {\n controls = new Collection(options.controls.slice());\n } else {\n assert(typeof /** @type {?} */ (options.controls).getArray === 'function',\n 47); // Expected `controls` to be an array or an `import(\"./Collection.js\").Collection`\n controls = /** @type {Collection} */ (options.controls);\n }\n }\n\n var interactions;\n if (options.interactions !== undefined) {\n if (Array.isArray(options.interactions)) {\n interactions = new Collection(options.interactions.slice());\n } else {\n assert(typeof /** @type {?} */ (options.interactions).getArray === 'function',\n 48); // Expected `interactions` to be an array or an `import(\"./Collection.js\").Collection`\n interactions = /** @type {Collection} */ (options.interactions);\n }\n }\n\n var overlays;\n if (options.overlays !== undefined) {\n if (Array.isArray(options.overlays)) {\n overlays = new Collection(options.overlays.slice());\n } else {\n assert(typeof /** @type {?} */ (options.overlays).getArray === 'function',\n 49); // Expected `overlays` to be an array or an `import(\"./Collection.js\").Collection`\n overlays = options.overlays;\n }\n } else {\n overlays = new Collection();\n }\n\n return {\n controls: controls,\n interactions: interactions,\n keyboardEventTarget: keyboardEventTarget,\n overlays: overlays,\n values: values\n };\n\n}\nexport default PluggableMap;\n\n/**\n * @param {Array<import(\"./layer/Base.js\").default>} layers Layers.\n * @return {boolean} Layers have sources that are still loading.\n */\nfunction getLoading(layers) {\n for (var i = 0, ii = layers.length; i < ii; ++i) {\n var layer = layers[i];\n if (typeof /** @type {?} */ (layer).getLayers === 'function') {\n return getLoading(/** @type {LayerGroup} */ (layer).getLayers().getArray());\n } else {\n var source = /** @type {import(\"./layer/Layer.js\").default} */ (\n layer).getSource();\n if (source && source.loading) {\n return true;\n }\n }\n }\n return false;\n}\n\n//# sourceMappingURL=PluggableMap.js.map","/**\n * @module ol/control/Control\n */\nimport {VOID} from '../functions.js';\nimport MapEventType from '../MapEventType.js';\nimport BaseObject from '../Object.js';\nimport {removeNode} from '../dom.js';\nimport {listen, unlistenByKey} from '../events.js';\n\n\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)} [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\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 = /*@__PURE__*/(function (BaseObject) {\n function Control(options) {\n\n BaseObject.call(this);\n\n /**\n * @protected\n * @type {HTMLElement}\n */\n this.element = options.element ? options.element : null;\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.target_ = null;\n\n /**\n * @private\n * @type {import(\"../PluggableMap.js\").default}\n */\n this.map_ = null;\n\n /**\n * @protected\n * @type {!Array<import(\"../events.js\").EventsKey>}\n */\n this.listenerKeys = [];\n\n /**\n * @type {function(import(\"../MapEvent.js\").default)}\n */\n this.render = options.render ? options.render : VOID;\n\n if (options.target) {\n this.setTarget(options.target);\n }\n\n }\n\n if ( BaseObject ) Control.__proto__ = BaseObject;\n Control.prototype = Object.create( BaseObject && BaseObject.prototype );\n Control.prototype.constructor = Control;\n\n /**\n * @inheritDoc\n */\n Control.prototype.disposeInternal = function disposeInternal () {\n removeNode(this.element);\n BaseObject.prototype.disposeInternal.call(this);\n };\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 getMap () {\n return this.map_;\n };\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 setMap (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_ : map.getOverlayContainerStopEvent();\n target.appendChild(this.element);\n if (this.render !== VOID) {\n this.listenerKeys.push(listen(map,\n MapEventType.POSTRENDER, this.render, this));\n }\n map.render();\n }\n };\n\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 setTarget (target) {\n this.target_ = typeof target === 'string' ?\n document.getElementById(target) :\n target;\n };\n\n return Control;\n}(BaseObject));\n\n\nexport default Control;\n\n//# sourceMappingURL=Control.js.map","/**\n * @module ol/css\n */\n\n\n/**\n * The CSS class for hidden feature.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_HIDDEN = 'ol-hidden';\n\n\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\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\n/**\n * The CSS class for unsupported feature.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_UNSUPPORTED = 'ol-unsupported';\n\n\n/**\n * The CSS class for controls.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_CONTROL = 'ol-control';\n\n\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\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} The CSS font property.\n * @return {Object<string>} The font families (or null if the input spec is invalid).\n */\nexport var getFontFamilies = (function() {\n var style;\n var cache = {};\n return function(font) {\n if (!style) {\n style = document.createElement('div').style;\n }\n if (!(font in cache)) {\n style.font = font;\n var family = style.fontFamily;\n style.font = '';\n if (!family) {\n return null;\n }\n cache[font] = family.split(/,\\s?/);\n }\n return cache[font];\n };\n})();\n\n//# sourceMappingURL=css.js.map","/**\n * @module ol/layer/Layer\n */\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {getUid} from '../util.js';\nimport {getChangeEventType} from '../Object.js';\nimport BaseLayer from './Base.js';\nimport LayerProperty from './Property.js';\nimport {assign} from '../obj.js';\nimport RenderEventType from '../render/EventType.js';\nimport SourceState from '../source/State.js';\n\n\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 {import(\"../source/Source.js\").default} [source] Source for this layer. If not provided to the constructor,\n * the source can be set by calling {@link module:ol/layer/Layer#setSource layer.setSource(source)} after\n * construction.\n * @property {import(\"../PluggableMap.js\").default} [map] Map.\n */\n\n\n/**\n * @typedef {Object} State\n * @property {import(\"./Base.js\").default} layer\n * @property {number} opacity\n * @property {SourceState} sourceState\n * @property {boolean} visible\n * @property {boolean} managed\n * @property {import(\"../extent.js\").Extent} [extent]\n * @property {number} zIndex\n * @property {number} maxResolution\n * @property {number} minResolution\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\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 module:ol/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 * @fires import(\"../render/Event.js\").RenderEvent\n */\nvar Layer = /*@__PURE__*/(function (BaseLayer) {\n function Layer(options) {\n\n var baseOptions = assign({}, options);\n delete baseOptions.source;\n\n BaseLayer.call(this, baseOptions);\n\n /**\n * @private\n * @type {?import(\"../events.js\").EventsKey}\n */\n this.mapPrecomposeKey_ = null;\n\n /**\n * @private\n * @type {?import(\"../events.js\").EventsKey}\n */\n this.mapRenderKey_ = null;\n\n /**\n * @private\n * @type {?import(\"../events.js\").EventsKey}\n */\n this.sourceChangeKey_ = null;\n\n if (options.map) {\n this.setMap(options.map);\n }\n\n listen(this,\n getChangeEventType(LayerProperty.SOURCE),\n this.handleSourcePropertyChange_, this);\n\n var source = options.source ? options.source : null;\n this.setSource(source);\n }\n\n if ( BaseLayer ) Layer.__proto__ = BaseLayer;\n Layer.prototype = Object.create( BaseLayer && BaseLayer.prototype );\n Layer.prototype.constructor = Layer;\n\n /**\n * @inheritDoc\n */\n Layer.prototype.getLayersArray = function getLayersArray (opt_array) {\n var array = opt_array ? opt_array : [];\n array.push(this);\n return array;\n };\n\n /**\n * @inheritDoc\n */\n Layer.prototype.getLayerStatesArray = function getLayerStatesArray (opt_states) {\n var states = opt_states ? opt_states : [];\n states.push(this.getLayerState());\n return states;\n };\n\n /**\n * Get the layer source.\n * @return {import(\"../source/Source.js\").default} The layer source (or `null` if not yet set).\n * @observable\n * @api\n */\n Layer.prototype.getSource = function getSource () {\n var source = this.get(LayerProperty.SOURCE);\n return (\n /** @type {import(\"../source/Source.js\").default} */ (source) || null\n );\n };\n\n /**\n * @inheritDoc\n */\n Layer.prototype.getSourceState = function getSourceState () {\n var source = this.getSource();\n return !source ? SourceState.UNDEFINED : source.getState();\n };\n\n /**\n * @private\n */\n Layer.prototype.handleSourceChange_ = function handleSourceChange_ () {\n this.changed();\n };\n\n /**\n * @private\n */\n Layer.prototype.handleSourcePropertyChange_ = function handleSourcePropertyChange_ () {\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,\n EventType.CHANGE, this.handleSourceChange_, this);\n }\n this.changed();\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#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#addLayer} instead.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @api\n */\n Layer.prototype.setMap = function setMap (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 = /** @type {import(\"../render/Event.js\").default} */ (evt);\n var layerState = this.getLayerState();\n layerState.managed = false;\n if (this.getZIndex() === undefined) {\n layerState.zIndex = Infinity;\n }\n renderEvent.frameState.layerStatesArray.push(layerState);\n renderEvent.frameState.layerStates[getUid(this)] = layerState;\n }, this);\n this.mapRenderKey_ = listen(this, EventType.CHANGE, map.render, map);\n this.changed();\n }\n };\n\n /**\n * Set the layer source.\n * @param {import(\"../source/Source.js\").default} source The layer source.\n * @observable\n * @api\n */\n Layer.prototype.setSource = function setSource (source) {\n this.set(LayerProperty.SOURCE, source);\n };\n\n return Layer;\n}(BaseLayer));\n\n\n/**\n * Return `true` if the layer is visible, and if the passed resolution is\n * between the layer's minResolution and maxResolution. The comparison is\n * inclusive for `minResolution` and exclusive for `maxResolution`.\n * @param {State} layerState Layer state.\n * @param {number} resolution Resolution.\n * @return {boolean} The layer is visible at the given resolution.\n */\nexport function visibleAtResolution(layerState, resolution) {\n return layerState.visible && resolution >= layerState.minResolution &&\n resolution < layerState.maxResolution;\n}\n\n\nexport default Layer;\n\n//# sourceMappingURL=Layer.js.map","/**\n * @module ol/control/Attribution\n */\nimport {equals} from '../array.js';\nimport Control from './Control.js';\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE, CLASS_COLLAPSED} from '../css.js';\nimport {removeChildren, replaceNode} from '../dom.js';\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {visibleAtResolution} from '../layer/Layer.js';\n\n\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|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 {function(import(\"../MapEvent.js\").default)} [render] Function called when\n * the control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n */\n\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 = /*@__PURE__*/(function (Control) {\n function Attribution(opt_options) {\n\n var options = opt_options ? opt_options : {};\n\n Control.call(this, {\n element: document.createElement('div'),\n render: options.render || render,\n target: options.target\n });\n\n /**\n * @private\n * @type {HTMLElement}\n */\n this.ulElement_ = document.createElement('ul');\n\n /**\n * @private\n * @type {boolean}\n */\n this.collapsed_ = options.collapsed !== undefined ? options.collapsed : true;\n\n /**\n * @private\n * @type {boolean}\n */\n this.overrideCollapsible_ = options.collapsible !== undefined;\n\n /**\n * @private\n * @type {boolean}\n */\n this.collapsible_ = options.collapsible !== undefined ?\n options.collapsible : true;\n\n if (!this.collapsible_) {\n this.collapsed_ = false;\n }\n\n var className = options.className !== undefined ? options.className : 'ol-attribution';\n\n var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Attributions';\n\n var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\\u00BB';\n\n if (typeof collapseLabel === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n this.collapseLabel_ = document.createElement('span');\n this.collapseLabel_.textContent = collapseLabel;\n } else {\n this.collapseLabel_ = collapseLabel;\n }\n\n var label = options.label !== undefined ? options.label : 'i';\n\n if (typeof label === 'string') {\n /**\n * @private\n * @type {HTMLElement}\n */\n this.label_ = document.createElement('span');\n this.label_.textContent = label;\n } else {\n this.label_ = label;\n }\n\n\n var activeLabel = (this.collapsible_ && !this.collapsed_) ?\n this.collapseLabel_ : this.label_;\n var button = document.createElement('button');\n button.setAttribute('type', 'button');\n button.title = tipLabel;\n button.appendChild(activeLabel);\n\n listen(button, EventType.CLICK, this.handleClick_, this);\n\n var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + 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.ulElement_);\n element.appendChild(button);\n\n /**\n * A list of currently rendered resolutions.\n * @type {Array<string>}\n * @private\n */\n this.renderedAttributions_ = [];\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderedVisible_ = true;\n\n }\n\n if ( Control ) Attribution.__proto__ = Control;\n Attribution.prototype = Object.create( Control && Control.prototype );\n Attribution.prototype.constructor = Attribution;\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 collectSourceAttributions_ (frameState) {\n /**\n * Used to determine if an attribution already exists.\n * @type {!Object<string, boolean>}\n */\n var lookup = {};\n\n /**\n * A list of visible attributions.\n * @type {Array<string>}\n */\n var visibleAttributions = [];\n\n var layerStatesArray = frameState.layerStatesArray;\n var resolution = frameState.viewState.resolution;\n for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n var layerState = layerStatesArray[i];\n if (!visibleAtResolution(layerState, resolution)) {\n continue;\n }\n\n var source = /** @type {import(\"../layer/Layer.js\").default} */ (layerState.layer).getSource();\n if (!source) {\n continue;\n }\n\n var attributionGetter = source.getAttributions();\n if (!attributionGetter) {\n continue;\n }\n\n var attributions = attributionGetter(frameState);\n if (!attributions) {\n continue;\n }\n\n if (!this.overrideCollapsible_ && source.getAttributionsCollapsible() === false) {\n this.setCollapsible(false);\n }\n\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 } else {\n if (!(attributions in lookup)) {\n visibleAttributions.push(attributions);\n lookup[attributions] = true;\n }\n }\n }\n return visibleAttributions;\n };\n\n /**\n * @private\n * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n */\n Attribution.prototype.updateElement_ = function updateElement_ (frameState) {\n if (!frameState) {\n if (this.renderedVisible_) {\n this.element.style.display = 'none';\n this.renderedVisible_ = false;\n }\n return;\n }\n\n var attributions = this.collectSourceAttributions_(frameState);\n\n var visible = attributions.length > 0;\n if (this.renderedVisible_ != visible) {\n this.element.style.display = visible ? '' : 'none';\n this.renderedVisible_ = visible;\n }\n\n if (equals(attributions, this.renderedAttributions_)) {\n return;\n }\n\n removeChildren(this.ulElement_);\n\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\n this.renderedAttributions_ = attributions;\n };\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n Attribution.prototype.handleClick_ = function handleClick_ (event) {\n event.preventDefault();\n this.handleToggle_();\n };\n\n /**\n * @private\n */\n Attribution.prototype.handleToggle_ = function handleToggle_ () {\n this.element.classList.toggle(CLASS_COLLAPSED);\n if (this.collapsed_) {\n replaceNode(this.collapseLabel_, this.label_);\n } else {\n replaceNode(this.label_, this.collapseLabel_);\n }\n this.collapsed_ = !this.collapsed_;\n };\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 getCollapsible () {\n return this.collapsible_;\n };\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 setCollapsible (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 /**\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 setCollapsed (collapsed) {\n if (!this.collapsible_ || this.collapsed_ === collapsed) {\n return;\n }\n this.handleToggle_();\n };\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 getCollapsed () {\n return this.collapsed_;\n };\n\n return Attribution;\n}(Control));\n\n\n/**\n * Update the attribution element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @this {Attribution}\n * @api\n */\nexport function render(mapEvent) {\n this.updateElement_(mapEvent.frameState);\n}\n\n\nexport default Attribution;\n\n//# sourceMappingURL=Attribution.js.map","/**\n * @module ol/control/Rotate\n */\nimport Control from './Control.js';\nimport {CLASS_CONTROL, CLASS_HIDDEN, CLASS_UNSELECTABLE} from '../css.js';\nimport {easeOut} from '../easing.js';\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\n\n\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 {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)} [render] Function called when the control should\n * be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {function()} [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\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 = /*@__PURE__*/(function (Control) {\n function Rotate(opt_options) {\n\n var options = opt_options ? opt_options : {};\n\n Control.call(this, {\n element: document.createElement('div'),\n render: options.render || render,\n target: options.target\n });\n\n var className = options.className !== undefined ? options.className : 'ol-rotate';\n\n var label = options.label !== undefined ? options.label : '\\u21E7';\n\n /**\n * @type {HTMLElement}\n * @private\n */\n this.label_ = null;\n\n if (typeof label === 'string') {\n this.label_ = document.createElement('span');\n this.label_.className = 'ol-compass';\n this.label_.textContent = label;\n } else {\n this.label_ = label;\n this.label_.classList.add('ol-compass');\n }\n\n var tipLabel = options.tipLabel ? options.tipLabel : 'Reset rotation';\n\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\n listen(button, EventType.CLICK, this.handleClick_, this);\n\n var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n var element = this.element;\n element.className = cssClasses;\n element.appendChild(button);\n\n this.callResetNorth_ = options.resetNorth ? options.resetNorth : undefined;\n\n /**\n * @type {number}\n * @private\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n /**\n * @type {boolean}\n * @private\n */\n this.autoHide_ = options.autoHide !== undefined ? options.autoHide : true;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.rotation_ = undefined;\n\n if (this.autoHide_) {\n this.element.classList.add(CLASS_HIDDEN);\n }\n\n }\n\n if ( Control ) Rotate.__proto__ = Control;\n Rotate.prototype = Object.create( Control && Control.prototype );\n Rotate.prototype.constructor = Rotate;\n\n /**\n * @param {MouseEvent} event The event to handle\n * @private\n */\n Rotate.prototype.handleClick_ = function handleClick_ (event) {\n event.preventDefault();\n if (this.callResetNorth_ !== undefined) {\n this.callResetNorth_();\n } else {\n this.resetNorth_();\n }\n };\n\n /**\n * @private\n */\n Rotate.prototype.resetNorth_ = function resetNorth_ () {\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 if (view.getRotation() !== undefined) {\n if (this.duration_ > 0) {\n view.animate({\n rotation: 0,\n duration: this.duration_,\n easing: easeOut\n });\n } else {\n view.setRotation(0);\n }\n }\n };\n\n return Rotate;\n}(Control));\n\n\n/**\n * Update the rotate control element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @this {Rotate}\n * @api\n */\nexport function render(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 } else if (contains && rotation !== 0) {\n this.element.classList.remove(CLASS_HIDDEN);\n }\n }\n this.label_.style.msTransform = transform;\n this.label_.style.webkitTransform = transform;\n this.label_.style.transform = transform;\n }\n this.rotation_ = rotation;\n}\n\nexport default Rotate;\n\n//# sourceMappingURL=Rotate.js.map","/**\n * @module ol/control/Zoom\n */\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport Control from './Control.js';\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';\nimport {easeOut} from '../easing.js';\n\n\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|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\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 = /*@__PURE__*/(function (Control) {\n function Zoom(opt_options) {\n\n var options = opt_options ? opt_options : {};\n\n Control.call(this, {\n element: document.createElement('div'),\n target: options.target\n });\n\n var className = options.className !== undefined ? options.className : 'ol-zoom';\n\n var delta = options.delta !== undefined ? options.delta : 1;\n\n var zoomInLabel = options.zoomInLabel !== undefined ? options.zoomInLabel : '+';\n var zoomOutLabel = options.zoomOutLabel !== undefined ? options.zoomOutLabel : '\\u2212';\n\n var zoomInTipLabel = options.zoomInTipLabel !== undefined ?\n options.zoomInTipLabel : 'Zoom in';\n var zoomOutTipLabel = options.zoomOutTipLabel !== undefined ?\n options.zoomOutTipLabel : 'Zoom out';\n\n var inElement = document.createElement('button');\n inElement.className = className + '-in';\n inElement.setAttribute('type', 'button');\n inElement.title = zoomInTipLabel;\n inElement.appendChild(\n typeof zoomInLabel === 'string' ? document.createTextNode(zoomInLabel) : zoomInLabel\n );\n\n listen(inElement, EventType.CLICK, this.handleClick_.bind(this, delta));\n\n var outElement = document.createElement('button');\n outElement.className = className + '-out';\n outElement.setAttribute('type', 'button');\n outElement.title = zoomOutTipLabel;\n outElement.appendChild(\n typeof zoomOutLabel === 'string' ? document.createTextNode(zoomOutLabel) : zoomOutLabel\n );\n\n listen(outElement, EventType.CLICK, this.handleClick_.bind(this, -delta));\n\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 /**\n * @type {number}\n * @private\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n }\n\n if ( Control ) Zoom.__proto__ = Control;\n Zoom.prototype = Object.create( Control && Control.prototype );\n Zoom.prototype.constructor = Zoom;\n\n /**\n * @param {number} delta Zoom delta.\n * @param {MouseEvent} event The event to handle\n * @private\n */\n Zoom.prototype.handleClick_ = function handleClick_ (delta, event) {\n event.preventDefault();\n this.zoomByDelta_(delta);\n };\n\n /**\n * @param {number} delta Zoom delta.\n * @private\n */\n Zoom.prototype.zoomByDelta_ = function zoomByDelta_ (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 currentResolution = view.getResolution();\n if (currentResolution) {\n var newResolution = view.constrainResolution(currentResolution, delta);\n if (this.duration_ > 0) {\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n view.animate({\n resolution: newResolution,\n duration: this.duration_,\n easing: easeOut\n });\n } else {\n view.setResolution(newResolution);\n }\n }\n };\n\n return Zoom;\n}(Control));\n\n\nexport default Zoom;\n\n//# sourceMappingURL=Zoom.js.map","/**\n * @module ol/control/util\n */\nimport Collection from '../Collection.js';\nimport Attribution from './Attribution.js';\nimport Rotate from './Rotate.js';\nimport Zoom from './Zoom.js';\n\n\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [attribution=true] Include\n * {@link module:ol/control/Attribution~Attribution}.\n * @property {import(\"./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(\"./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(\"./Zoom.js\").Options} [zoomOptions] Options for\n * {@link module:ol/control/Zoom~Zoom}.\n * @api\n */\n\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.js\").default>}\n * Controls.\n * @function module:ol/control.defaults\n * @api\n */\nexport function defaults(opt_options) {\n\n var options = opt_options ? opt_options : {};\n\n var controls = new Collection();\n\n var zoomControl = options.zoom !== undefined ? options.zoom : true;\n if (zoomControl) {\n controls.push(new Zoom(options.zoomOptions));\n }\n\n var rotateControl = options.rotate !== undefined ? options.rotate : true;\n if (rotateControl) {\n controls.push(new Rotate(options.rotateOptions));\n }\n\n var attributionControl = options.attribution !== undefined ?\n options.attribution : true;\n if (attributionControl) {\n controls.push(new Attribution(options.attributionOptions));\n }\n\n return controls;\n}\n\n//# sourceMappingURL=util.js.map","/**\n * @module ol/Kinetic\n */\n\n/**\n * @classdesc\n * Implementation of inertial deceleration for map movement.\n *\n * @api\n */\nvar Kinetic = function Kinetic(decay, minVelocity, delay) {\n\n /**\n * @private\n * @type {number}\n */\n this.decay_ = decay;\n\n /**\n * @private\n * @type {number}\n */\n this.minVelocity_ = minVelocity;\n\n /**\n * @private\n * @type {number}\n */\n this.delay_ = delay;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.points_ = [];\n\n /**\n * @private\n * @type {number}\n */\n this.angle_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.initialVelocity_ = 0;\n};\n\n/**\n * FIXME empty description for jsdoc\n */\nKinetic.prototype.begin = function begin () {\n this.points_.length = 0;\n this.angle_ = 0;\n this.initialVelocity_ = 0;\n};\n\n/**\n * @param {number} x X.\n * @param {number} y Y.\n */\nKinetic.prototype.update = function update (x, y) {\n this.points_.push(x, y, Date.now());\n};\n\n/**\n * @return {boolean} Whether we should do kinetic animation.\n */\nKinetic.prototype.end = function end () {\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\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\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\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/**\n * @return {number} Total distance travelled (pixels).\n */\nKinetic.prototype.getDistance = function getDistance () {\n return (this.minVelocity_ - this.initialVelocity_) / this.decay_;\n};\n\n/**\n * @return {number} Angle of the kinetic panning animation (radians).\n */\nKinetic.prototype.getAngle = function getAngle () {\n return this.angle_;\n};\n\nexport default Kinetic;\n\n//# sourceMappingURL=Kinetic.js.map","/**\n * @module ol/interaction/Property\n */\n\n/**\n * @enum {string}\n */\nexport default {\n ACTIVE: 'active'\n};\n\n//# sourceMappingURL=Property.js.map","/**\n * @module ol/interaction/Interaction\n */\nimport BaseObject from '../Object.js';\nimport {easeOut, linear} from '../easing.js';\nimport InteractionProperty from './Property.js';\nimport {clamp} from '../math.js';\n\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).\n */\n\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 = /*@__PURE__*/(function (BaseObject) {\n function Interaction(options) {\n BaseObject.call(this);\n\n if (options.handleEvent) {\n this.handleEvent = options.handleEvent;\n }\n\n /**\n * @private\n * @type {import(\"../PluggableMap.js\").default}\n */\n this.map_ = null;\n\n this.setActive(true);\n }\n\n if ( BaseObject ) Interaction.__proto__ = BaseObject;\n Interaction.prototype = Object.create( BaseObject && BaseObject.prototype );\n Interaction.prototype.constructor = Interaction;\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 getActive () {\n return /** @type {boolean} */ (this.get(InteractionProperty.ACTIVE));\n };\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 getMap () {\n return this.map_;\n };\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 handleEvent (mapBrowserEvent) {\n return true;\n };\n\n /**\n * Activate or deactivate the interaction.\n * @param {boolean} active Active.\n * @observable\n * @api\n */\n Interaction.prototype.setActive = function setActive (active) {\n this.set(InteractionProperty.ACTIVE, active);\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 Interaction.prototype.setMap = function setMap (map) {\n this.map_ = map;\n };\n\n return Interaction;\n}(BaseObject));\n\n\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.getCenter();\n if (currentCenter) {\n var center = view.constrainCenter(\n [currentCenter[0] + delta[0], currentCenter[1] + delta[1]]);\n if (opt_duration) {\n view.animate({\n duration: opt_duration,\n easing: linear,\n center: center\n });\n } else {\n view.setCenter(center);\n }\n }\n}\n\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number|undefined} rotation Rotation.\n * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor Anchor coordinate.\n * @param {number=} opt_duration Duration.\n */\nexport function rotate(view, rotation, opt_anchor, opt_duration) {\n rotation = view.constrainRotation(rotation, 0);\n rotateWithoutConstraints(view, rotation, opt_anchor, opt_duration);\n}\n\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number|undefined} rotation Rotation.\n * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor Anchor coordinate.\n * @param {number=} opt_duration Duration.\n */\nexport function rotateWithoutConstraints(view, rotation, opt_anchor, opt_duration) {\n if (rotation !== undefined) {\n var currentRotation = view.getRotation();\n var currentCenter = view.getCenter();\n if (currentRotation !== undefined && currentCenter && opt_duration > 0) {\n view.animate({\n rotation: rotation,\n anchor: opt_anchor,\n duration: opt_duration,\n easing: easeOut\n });\n } else {\n view.rotate(rotation, opt_anchor);\n }\n }\n}\n\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number|undefined} resolution Resolution to go to.\n * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor Anchor coordinate.\n * @param {number=} opt_duration Duration.\n * @param {number=} opt_direction Zooming direction; > 0 indicates\n * zooming out, in which case the constraints system will select\n * the largest nearest resolution; < 0 indicates zooming in, in\n * which case the constraints system will select the smallest\n * nearest resolution; == 0 indicates that the zooming direction\n * is unknown/not relevant, in which case the constraints system\n * will select the nearest resolution. If not defined 0 is\n * assumed.\n */\nexport function zoom(view, resolution, opt_anchor, opt_duration, opt_direction) {\n resolution = view.constrainResolution(resolution, 0, opt_direction);\n zoomWithoutConstraints(view, resolution, opt_anchor, opt_duration);\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.\n * @param {number=} opt_duration Duration.\n */\nexport function zoomByDelta(view, delta, opt_anchor, opt_duration) {\n var currentResolution = view.getResolution();\n var resolution = view.constrainResolution(currentResolution, delta, 0);\n\n if (resolution !== undefined) {\n var resolutions = view.getResolutions();\n resolution = clamp(\n resolution,\n view.getMinResolution() || resolutions[resolutions.length - 1],\n view.getMaxResolution() || resolutions[0]);\n }\n\n // If we have a constraint on center, we need to change the anchor so that the\n // new center is within the extent. We first calculate the new center, apply\n // the constraint to it, and then calculate back the anchor\n if (opt_anchor && resolution !== undefined && resolution !== currentResolution) {\n var currentCenter = view.getCenter();\n var center = view.calculateCenterZoom(resolution, opt_anchor);\n center = view.constrainCenter(center);\n\n opt_anchor = [\n (resolution * currentCenter[0] - currentResolution * center[0]) /\n (resolution - currentResolution),\n (resolution * currentCenter[1] - currentResolution * center[1]) /\n (resolution - currentResolution)\n ];\n }\n\n zoomWithoutConstraints(view, resolution, opt_anchor, opt_duration);\n}\n\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number|undefined} resolution Resolution to go to.\n * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor Anchor coordinate.\n * @param {number=} opt_duration Duration.\n */\nexport function zoomWithoutConstraints(view, resolution, opt_anchor, opt_duration) {\n if (resolution) {\n var currentResolution = view.getResolution();\n var currentCenter = view.getCenter();\n if (currentResolution !== undefined && currentCenter &&\n resolution !== currentResolution && opt_duration) {\n view.animate({\n resolution: resolution,\n anchor: opt_anchor,\n duration: opt_duration,\n easing: easeOut\n });\n } else {\n if (opt_anchor) {\n var center = view.calculateCenterZoom(resolution, opt_anchor);\n view.setCenter(center);\n }\n view.setResolution(resolution);\n }\n }\n}\n\nexport default Interaction;\n\n//# sourceMappingURL=Interaction.js.map","/**\n * @module ol/interaction/DoubleClickZoom\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport Interaction, {zoomByDelta} from './Interaction.js';\n\n\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\n/**\n * @classdesc\n * Allows the user to zoom by double-clicking on the map.\n * @api\n */\nvar DoubleClickZoom = /*@__PURE__*/(function (Interaction) {\n function DoubleClickZoom(opt_options) {\n Interaction.call(this, {\n handleEvent: handleEvent\n });\n\n var options = opt_options ? opt_options : {};\n\n /**\n * @private\n * @type {number}\n */\n this.delta_ = options.delta ? options.delta : 1;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n }\n\n if ( Interaction ) DoubleClickZoom.__proto__ = Interaction;\n DoubleClickZoom.prototype = Object.create( Interaction && Interaction.prototype );\n DoubleClickZoom.prototype.constructor = DoubleClickZoom;\n\n return DoubleClickZoom;\n}(Interaction));\n\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 * @this {DoubleClickZoom}\n */\nfunction handleEvent(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 mapBrowserEvent.preventDefault();\n stopEvent = true;\n }\n return !stopEvent;\n}\n\nexport default DoubleClickZoom;\n\n//# sourceMappingURL=DoubleClickZoom.js.map","/**\n * @module ol/events/condition\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport {assert} from '../asserts.js';\nimport {TRUE, FALSE} from '../functions.js';\nimport {WEBKIT, MAC} from '../has.js';\n\n\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\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 (\n originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n !originalEvent.shiftKey);\n};\n\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 (\n originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n originalEvent.shiftKey);\n};\n\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() === document.activeElement;\n};\n\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\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\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 &&\n !(WEBKIT && MAC && originalEvent.ctrlKey);\n};\n\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\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\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\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\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 (\n !originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n !originalEvent.shiftKey);\n};\n\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\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 (\n !originalEvent.altKey &&\n !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n originalEvent.shiftKey);\n};\n\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 target = mapBrowserEvent.originalEvent.target;\n var tagName = /** @type {Element} */ (target).tagName;\n return (\n tagName !== 'INPUT' &&\n tagName !== 'SELECT' &&\n tagName !== 'TEXTAREA');\n};\n\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(\"../MapBrowserPointerEvent\").default} */ (mapBrowserEvent).pointerEvent;\n assert(pointerEvent !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n // see http://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n return pointerEvent.pointerType == 'mouse';\n};\n\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 http://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(\"../MapBrowserPointerEvent\").default} */ (mapBrowserEvent).pointerEvent;\n assert(pointerEvent !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n return pointerEvent.isPrimary && pointerEvent.button === 0;\n};\n\n//# sourceMappingURL=condition.js.map","/**\n * @module ol/interaction/Pointer\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport Interaction from './Interaction.js';\nimport {getValues} from '../obj.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {function(import(\"../MapBrowserPointerEvent.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(\"../MapBrowserPointerEvent.js\").default)} [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(\"../MapBrowserPointerEvent.js\").default)} [handleMoveEvent]\n * Function handling \"move\" events. This function is called on \"move\" events,\n * also during a drag sequence (so during a drag sequence both the\n * `handleDragEvent` function and this function are called).\n * @property {function(import(\"../MapBrowserPointerEvent.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\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 = /*@__PURE__*/(function (Interaction) {\n function PointerInteraction(opt_options) {\n\n var options = opt_options ? opt_options : {};\n\n Interaction.call(/** @type {import(\"./Interaction.js\").InteractionOptions} */ this, (options));\n\n if (options.handleDownEvent) {\n this.handleDownEvent = options.handleDownEvent;\n }\n\n if (options.handleDragEvent) {\n this.handleDragEvent = options.handleDragEvent;\n }\n\n if (options.handleMoveEvent) {\n this.handleMoveEvent = options.handleMoveEvent;\n }\n\n if (options.handleUpEvent) {\n this.handleUpEvent = options.handleUpEvent;\n }\n\n if (options.stopDown) {\n this.stopDown = options.stopDown;\n }\n\n /**\n * @type {boolean}\n * @protected\n */\n this.handlingDownUpSequence = false;\n\n /**\n * @type {!Object<string, import(\"../pointer/PointerEvent.js\").default>}\n * @private\n */\n this.trackedPointers_ = {};\n\n /**\n * @type {Array<import(\"../pointer/PointerEvent.js\").default>}\n * @protected\n */\n this.targetPointers = [];\n\n }\n\n if ( Interaction ) PointerInteraction.__proto__ = Interaction;\n PointerInteraction.prototype = Object.create( Interaction && Interaction.prototype );\n PointerInteraction.prototype.constructor = PointerInteraction;\n\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserPointerEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @protected\n */\n PointerInteraction.prototype.handleDownEvent = function handleDownEvent (mapBrowserEvent) {\n return false;\n };\n\n /**\n * Handle pointer drag events.\n * @param {import(\"../MapBrowserPointerEvent.js\").default} mapBrowserEvent Event.\n * @protected\n */\n PointerInteraction.prototype.handleDragEvent = function handleDragEvent (mapBrowserEvent) {};\n\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 * @override\n * @api\n */\n PointerInteraction.prototype.handleEvent = function handleEvent (mapBrowserEvent) {\n if (!(/** @type {import(\"../MapBrowserPointerEvent.js\").default} */ (mapBrowserEvent).pointerEvent)) {\n return true;\n }\n\n var stopEvent = false;\n this.updateTrackedPointers_(mapBrowserEvent);\n if (this.handlingDownUpSequence) {\n if (mapBrowserEvent.type == MapBrowserEventType.POINTERDRAG) {\n this.handleDragEvent(mapBrowserEvent);\n } else if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {\n var handledUp = this.handleUpEvent(mapBrowserEvent);\n this.handlingDownUpSequence = handledUp && this.targetPointers.length > 0;\n }\n } else {\n if (mapBrowserEvent.type == MapBrowserEventType.POINTERDOWN) {\n var handled = this.handleDownEvent(mapBrowserEvent);\n if (handled) {\n mapBrowserEvent.preventDefault();\n }\n this.handlingDownUpSequence = handled;\n stopEvent = this.stopDown(handled);\n } else if (mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE) {\n this.handleMoveEvent(mapBrowserEvent);\n }\n }\n return !stopEvent;\n };\n\n /**\n * Handle pointer move events.\n * @param {import(\"../MapBrowserPointerEvent.js\").default} mapBrowserEvent Event.\n * @protected\n */\n PointerInteraction.prototype.handleMoveEvent = function handleMoveEvent (mapBrowserEvent) {};\n\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserPointerEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} If the event was consumed.\n * @protected\n */\n PointerInteraction.prototype.handleUpEvent = function handleUpEvent (mapBrowserEvent) {\n return false;\n };\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 stopDown (handled) {\n return handled;\n };\n\n /**\n * @param {import(\"../MapBrowserPointerEvent.js\").default} mapBrowserEvent Event.\n * @private\n */\n PointerInteraction.prototype.updateTrackedPointers_ = function updateTrackedPointers_ (mapBrowserEvent) {\n if (isPointerDraggingEvent(mapBrowserEvent)) {\n var event = mapBrowserEvent.pointerEvent;\n\n var id = event.pointerId.toString();\n if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {\n delete this.trackedPointers_[id];\n } else if (mapBrowserEvent.type ==\n MapBrowserEventType.POINTERDOWN) {\n this.trackedPointers_[id] = event;\n } else if (id in this.trackedPointers_) {\n // update only when there was a pointerdown event for this pointer\n this.trackedPointers_[id] = event;\n }\n this.targetPointers = getValues(this.trackedPointers_);\n }\n };\n\n return PointerInteraction;\n}(Interaction));\n\n\n/**\n * @param {Array<import(\"../pointer/PointerEvent.js\").default>} 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\n/**\n * @param {import(\"../MapBrowserPointerEvent.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}\n\n\nexport default PointerInteraction;\n\n//# sourceMappingURL=Pointer.js.map","/**\n * @module ol/interaction/DragPan\n */\nimport ViewHint from '../ViewHint.js';\nimport {scale as scaleCoordinate, rotate as rotateCoordinate, add as addCoordinate} from '../coordinate.js';\nimport {easeOut} from '../easing.js';\nimport {noModifierKeys} from '../events/condition.js';\nimport {FALSE} from '../functions.js';\nimport PointerInteraction, {centroid as centroidFromPointers} from './Pointer.js';\n\n\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}.\n * @property {import(\"../Kinetic.js\").default} [kinetic] Kinetic inertia to apply to the pan.\n */\n\n\n/**\n * @classdesc\n * Allows the user to pan the map by dragging the map.\n * @api\n */\nvar DragPan = /*@__PURE__*/(function (PointerInteraction) {\n function DragPan(opt_options) {\n\n PointerInteraction.call(this, {\n stopDown: FALSE\n });\n\n var options = opt_options ? opt_options : {};\n\n /**\n * @private\n * @type {import(\"../Kinetic.js\").default|undefined}\n */\n this.kinetic_ = options.kinetic;\n\n /**\n * @type {import(\"../pixel.js\").Pixel}\n */\n this.lastCentroid = null;\n\n /**\n * @type {number}\n */\n this.lastPointersCount_;\n\n /**\n * @type {boolean}\n */\n this.panning_ = false;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : noModifierKeys;\n\n /**\n * @private\n * @type {boolean}\n */\n this.noKinetic_ = false;\n\n }\n\n if ( PointerInteraction ) DragPan.__proto__ = PointerInteraction;\n DragPan.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n DragPan.prototype.constructor = DragPan;\n\n /**\n * @inheritDoc\n */\n DragPan.prototype.handleDragEvent = function handleDragEvent (mapBrowserEvent) {\n if (!this.panning_) {\n this.panning_ = true;\n this.getMap().getView().setHint(ViewHint.INTERACTING, 1);\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 deltaX = this.lastCentroid[0] - centroid[0];\n var deltaY = centroid[1] - this.lastCentroid[1];\n var map = mapBrowserEvent.map;\n var view = map.getView();\n var center = [deltaX, deltaY];\n scaleCoordinate(center, view.getResolution());\n rotateCoordinate(center, view.getRotation());\n addCoordinate(center, view.getCenter());\n center = view.constrainCenter(center);\n view.setCenter(center);\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 };\n\n /**\n * @inheritDoc\n */\n DragPan.prototype.handleUpEvent = function handleUpEvent (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 = /** @type {!import(\"../coordinate.js\").Coordinate} */ (view.getCenter());\n var centerpx = map.getPixelFromCoordinate(center);\n var dest = map.getCoordinateFromPixel([\n centerpx[0] - distance * Math.cos(angle),\n centerpx[1] - distance * Math.sin(angle)\n ]);\n view.animate({\n center: view.constrainCenter(dest),\n duration: 500,\n easing: easeOut\n });\n }\n if (this.panning_) {\n this.panning_ = false;\n view.setHint(ViewHint.INTERACTING, -1);\n }\n return false;\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 /**\n * @inheritDoc\n */\n DragPan.prototype.handleDownEvent = function handleDownEvent (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.setCenter(mapBrowserEvent.frameState.viewState.center);\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 } else {\n return false;\n }\n };\n\n return DragPan;\n}(PointerInteraction));\n\nexport default DragPan;\n\n//# sourceMappingURL=DragPan.js.map","/**\n * @module ol/interaction/DragRotate\n */\nimport {disable} from '../rotationconstraint.js';\nimport ViewHint from '../ViewHint.js';\nimport {altShiftKeysOnly, mouseOnly, mouseActionButton} from '../events/condition.js';\nimport {FALSE} from '../functions.js';\nimport {rotate, rotateWithoutConstraints} from './Interaction.js';\nimport PointerInteraction from './Pointer.js';\n\n\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\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 = /*@__PURE__*/(function (PointerInteraction) {\n function DragRotate(opt_options) {\n\n var options = opt_options ? opt_options : {};\n\n PointerInteraction.call(this, {\n stopDown: FALSE\n });\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : altShiftKeysOnly;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastAngle_ = undefined;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n }\n\n if ( PointerInteraction ) DragRotate.__proto__ = PointerInteraction;\n DragRotate.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n DragRotate.prototype.constructor = DragRotate;\n\n /**\n * @inheritDoc\n */\n DragRotate.prototype.handleDragEvent = function handleDragEvent (mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return;\n }\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 =\n Math.atan2(size[1] / 2 - offset[1], offset[0] - size[0] / 2);\n if (this.lastAngle_ !== undefined) {\n var delta = theta - this.lastAngle_;\n var rotation = view.getRotation();\n rotateWithoutConstraints(view, rotation - delta);\n }\n this.lastAngle_ = theta;\n };\n\n\n /**\n * @inheritDoc\n */\n DragRotate.prototype.handleUpEvent = function handleUpEvent (mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return true;\n }\n\n var map = mapBrowserEvent.map;\n var view = map.getView();\n view.setHint(ViewHint.INTERACTING, -1);\n var rotation = view.getRotation();\n rotate(view, rotation, undefined, this.duration_);\n return false;\n };\n\n\n /**\n * @inheritDoc\n */\n DragRotate.prototype.handleDownEvent = function handleDownEvent (mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return false;\n }\n\n if (mouseActionButton(mapBrowserEvent) && this.condition_(mapBrowserEvent)) {\n var map = mapBrowserEvent.map;\n map.getView().setHint(ViewHint.INTERACTING, 1);\n this.lastAngle_ = undefined;\n return true;\n } else {\n return false;\n }\n };\n\n return DragRotate;\n}(PointerInteraction));\n\nexport default DragRotate;\n\n//# sourceMappingURL=DragRotate.js.map","/**\n * @module ol/render/Box\n */\n\nimport Disposable from '../Disposable.js';\nimport Polygon from '../geom/Polygon.js';\n\nvar RenderBox = /*@__PURE__*/(function (Disposable) {\n function RenderBox(className) {\n Disposable.call(this);\n\n /**\n * @type {import(\"../geom/Polygon.js\").default}\n * @private\n */\n this.geometry_ = null;\n\n /**\n * @type {HTMLDivElement}\n * @private\n */\n this.element_ = /** @type {HTMLDivElement} */ (document.createElement('div'));\n this.element_.style.position = 'absolute';\n this.element_.className = 'ol-box ' + className;\n\n /**\n * @private\n * @type {import(\"../PluggableMap.js\").default}\n */\n this.map_ = null;\n\n /**\n * @private\n * @type {import(\"../pixel.js\").Pixel}\n */\n this.startPixel_ = null;\n\n /**\n * @private\n * @type {import(\"../pixel.js\").Pixel}\n */\n this.endPixel_ = null;\n\n }\n\n if ( Disposable ) RenderBox.__proto__ = Disposable;\n RenderBox.prototype = Object.create( Disposable && Disposable.prototype );\n RenderBox.prototype.constructor = RenderBox;\n\n /**\n * @inheritDoc\n */\n RenderBox.prototype.disposeInternal = function disposeInternal () {\n this.setMap(null);\n };\n\n /**\n * @private\n */\n RenderBox.prototype.render_ = function render_ () {\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 /**\n * @param {import(\"../PluggableMap.js\").default} map Map.\n */\n RenderBox.prototype.setMap = function setMap (map) {\n if (this.map_) {\n this.map_.getOverlayContainer().removeChild(this.element_);\n var style = this.element_.style;\n style.left = style.top = style.width = style.height = 'inherit';\n }\n this.map_ = map;\n if (this.map_) {\n this.map_.getOverlayContainer().appendChild(this.element_);\n }\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 setPixels (startPixel, endPixel) {\n this.startPixel_ = startPixel;\n this.endPixel_ = endPixel;\n this.createOrUpdateGeometry();\n this.render_();\n };\n\n /**\n * Creates or updates the cached geometry.\n */\n RenderBox.prototype.createOrUpdateGeometry = function createOrUpdateGeometry () {\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_.getCoordinateFromPixel, this.map_);\n // close the polygon\n coordinates[4] = coordinates[0].slice();\n if (!this.geometry_) {\n this.geometry_ = new Polygon([coordinates]);\n } else {\n this.geometry_.setCoordinates([coordinates]);\n }\n };\n\n /**\n * @return {import(\"../geom/Polygon.js\").default} Geometry.\n */\n RenderBox.prototype.getGeometry = function getGeometry () {\n return this.geometry_;\n };\n\n return RenderBox;\n}(Disposable));\n\n\nexport default RenderBox;\n\n//# sourceMappingURL=Box.js.map","/**\n * @module ol/interaction/DragBox\n */\n// FIXME draw drag box\nimport Event from '../events/Event.js';\nimport {always, mouseOnly, mouseActionButton} from '../events/condition.js';\nimport {VOID} from '../functions.js';\nimport PointerInteraction from './Pointer.js';\nimport RenderBox from '../render/Box.js';\n\n\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\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~always}.\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)} onBoxEnd Code to execute just\n * before `boxend` is fired.\n */\n\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 /**\n * Triggered on drag when box is active.\n * @event DragBoxEvent#boxdrag\n * @api\n */\n BOXDRAG: 'boxdrag',\n\n /**\n * Triggered upon drag box end.\n * @event DragBoxEvent#boxend\n * @api\n */\n BOXEND: 'boxend'\n};\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/DragBox~DragBox} instances are instances of\n * this type.\n */\nvar DragBoxEvent = /*@__PURE__*/(function (Event) {\n function DragBoxEvent(type, coordinate, mapBrowserEvent) {\n Event.call(this, type);\n\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 /**\n * @const\n * @type {import(\"../MapBrowserEvent.js\").default}\n * @api\n */\n this.mapBrowserEvent = mapBrowserEvent;\n\n }\n\n if ( Event ) DragBoxEvent.__proto__ = Event;\n DragBoxEvent.prototype = Object.create( Event && Event.prototype );\n DragBoxEvent.prototype.constructor = DragBoxEvent;\n\n return DragBoxEvent;\n}(Event));\n\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 * This interaction is only supported for mouse devices.\n *\n * @fires DragBoxEvent\n * @api\n */\nvar DragBox = /*@__PURE__*/(function (PointerInteraction) {\n function DragBox(opt_options) {\n\n PointerInteraction.call(this);\n\n var options = opt_options ? opt_options : {};\n\n /**\n * @type {import(\"../render/Box.js\").default}\n * @private\n */\n this.box_ = new RenderBox(options.className || 'ol-dragbox');\n\n /**\n * @type {number}\n * @private\n */\n this.minArea_ = options.minArea !== undefined ? options.minArea : 64;\n\n /**\n * Function to execute just before `onboxend` is fired\n * @type {function(this:DragBox, import(\"../MapBrowserEvent.js\").default)}\n * @private\n */\n this.onBoxEnd_ = options.onBoxEnd ? options.onBoxEnd : VOID;\n\n /**\n * @type {import(\"../pixel.js\").Pixel}\n * @private\n */\n this.startPixel_ = null;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : always;\n\n /**\n * @private\n * @type {EndCondition}\n */\n this.boxEndCondition_ = options.boxEndCondition ?\n options.boxEndCondition : this.defaultBoxEndCondition;\n }\n\n if ( PointerInteraction ) DragBox.__proto__ = PointerInteraction;\n DragBox.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n DragBox.prototype.constructor = DragBox;\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 defaultBoxEndCondition (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 /**\n * Returns geometry of last drawn box.\n * @return {import(\"../geom/Polygon.js\").default} Geometry.\n * @api\n */\n DragBox.prototype.getGeometry = function getGeometry () {\n return this.box_.getGeometry();\n };\n\n /**\n * @inheritDoc\n */\n DragBox.prototype.handleDragEvent = function handleDragEvent (mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return;\n }\n\n this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel);\n\n this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXDRAG,\n mapBrowserEvent.coordinate, mapBrowserEvent));\n };\n\n /**\n * @inheritDoc\n */\n DragBox.prototype.handleUpEvent = function handleUpEvent (mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return true;\n }\n\n this.box_.setMap(null);\n\n if (this.boxEndCondition_(mapBrowserEvent, this.startPixel_, mapBrowserEvent.pixel)) {\n this.onBoxEnd_(mapBrowserEvent);\n this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXEND,\n mapBrowserEvent.coordinate, mapBrowserEvent));\n }\n return false;\n };\n\n /**\n * @inheritDoc\n */\n DragBox.prototype.handleDownEvent = function handleDownEvent (mapBrowserEvent) {\n if (!mouseOnly(mapBrowserEvent)) {\n return false;\n }\n\n if (mouseActionButton(mapBrowserEvent) &&\n 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,\n mapBrowserEvent.coordinate, mapBrowserEvent));\n return true;\n } else {\n return false;\n }\n };\n\n return DragBox;\n}(PointerInteraction));\n\n\nexport default DragBox;\n\n//# sourceMappingURL=DragBox.js.map","/**\n * @module ol/interaction/DragZoom\n */\nimport {easeOut} from '../easing.js';\nimport {shiftKeyOnly} from '../events/condition.js';\nimport {createOrUpdateFromCoordinates, getBottomLeft, getCenter, getTopRight, scaleFromCenter} from '../extent.js';\nimport DragBox from './DragBox.js';\n\n\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 */\n\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 = /*@__PURE__*/(function (DragBox) {\n function DragZoom(opt_options) {\n var options = opt_options ? opt_options : {};\n\n var condition = options.condition ? options.condition : shiftKeyOnly;\n\n DragBox.call(this, {\n condition: condition,\n className: options.className || 'ol-dragzoom',\n onBoxEnd: onBoxEnd\n });\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 200;\n\n /**\n * @private\n * @type {boolean}\n */\n this.out_ = options.out !== undefined ? options.out : false;\n }\n\n if ( DragBox ) DragZoom.__proto__ = DragBox;\n DragZoom.prototype = Object.create( DragBox && DragBox.prototype );\n DragZoom.prototype.constructor = DragZoom;\n\n return DragZoom;\n}(DragBox));\n\n\n/**\n * @this {DragZoom}\n */\nfunction onBoxEnd() {\n var map = this.getMap();\n var view = /** @type {!import(\"../View.js\").default} */ (map.getView());\n var size = /** @type {!import(\"../size.js\").Size} */ (map.getSize());\n var extent = this.getGeometry().getExtent();\n\n if (this.out_) {\n var mapExtent = view.calculateExtent(size);\n var boxPixelExtent = createOrUpdateFromCoordinates([\n map.getPixelFromCoordinate(getBottomLeft(extent)),\n map.getPixelFromCoordinate(getTopRight(extent))]);\n var factor = view.getResolutionForExtent(boxPixelExtent, size);\n\n scaleFromCenter(mapExtent, 1 / factor);\n extent = mapExtent;\n }\n\n var resolution = view.constrainResolution(\n view.getResolutionForExtent(extent, size));\n\n var center = getCenter(extent);\n center = view.constrainCenter(center);\n\n view.animate({\n resolution: resolution,\n center: center,\n duration: this.duration_,\n easing: easeOut\n });\n}\n\n\nexport default DragZoom;\n\n//# sourceMappingURL=DragZoom.js.map","/**\n * @module ol/events/KeyCode\n */\n\n/**\n * @enum {number}\n * @const\n */\nexport default {\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40\n};\n\n//# sourceMappingURL=KeyCode.js.map","/**\n * @module ol/interaction/KeyboardPan\n */\nimport {rotate as rotateCoordinate} from '../coordinate.js';\nimport EventType from '../events/EventType.js';\nimport KeyCode from '../events/KeyCode.js';\nimport {noModifierKeys, targetNotEditable} from '../events/condition.js';\nimport Interaction, {pan} from './Interaction.js';\n\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~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\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 = /*@__PURE__*/(function (Interaction) {\n function KeyboardPan(opt_options) {\n\n Interaction.call(this, {\n handleEvent: handleEvent\n });\n\n var options = opt_options || {};\n\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) &&\n targetNotEditable(mapBrowserEvent);\n };\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition !== undefined ?\n options.condition : this.defaultCondition_;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 100;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelDelta_ = options.pixelDelta !== undefined ?\n options.pixelDelta : 128;\n\n }\n\n if ( Interaction ) KeyboardPan.__proto__ = Interaction;\n KeyboardPan.prototype = Object.create( Interaction && Interaction.prototype );\n KeyboardPan.prototype.constructor = KeyboardPan;\n\n return KeyboardPan;\n}(Interaction));\n\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 */\nfunction handleEvent(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 } else if (keyCode == KeyCode.LEFT) {\n deltaX = -mapUnitsDelta;\n } else if (keyCode == KeyCode.RIGHT) {\n deltaX = mapUnitsDelta;\n } else {\n deltaY = mapUnitsDelta;\n }\n var delta = [deltaX, deltaY];\n rotateCoordinate(delta, view.getRotation());\n pan(view, delta, this.duration_);\n mapBrowserEvent.preventDefault();\n stopEvent = true;\n }\n }\n return !stopEvent;\n}\n\nexport default KeyboardPan;\n\n//# sourceMappingURL=KeyboardPan.js.map","/**\n * @module ol/interaction/KeyboardZoom\n */\nimport EventType from '../events/EventType.js';\nimport {targetNotEditable} from '../events/condition.js';\nimport Interaction, {zoomByDelta} from './Interaction.js';\n\n\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\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 = /*@__PURE__*/(function (Interaction) {\n function KeyboardZoom(opt_options) {\n\n Interaction.call(this, {\n handleEvent: handleEvent\n });\n\n var options = opt_options ? opt_options : {};\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : targetNotEditable;\n\n /**\n * @private\n * @type {number}\n */\n this.delta_ = options.delta ? options.delta : 1;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 100;\n\n }\n\n if ( Interaction ) KeyboardZoom.__proto__ = Interaction;\n KeyboardZoom.prototype = Object.create( Interaction && Interaction.prototype );\n KeyboardZoom.prototype.constructor = KeyboardZoom;\n\n return KeyboardZoom;\n}(Interaction));\n\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 */\nfunction handleEvent(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 mapBrowserEvent.preventDefault();\n stopEvent = true;\n }\n }\n return !stopEvent;\n}\n\nexport default KeyboardZoom;\n\n//# sourceMappingURL=KeyboardZoom.js.map","/**\n * @module ol/interaction/MouseWheelZoom\n */\nimport ViewHint from '../ViewHint.js';\nimport {always} from '../events/condition.js';\nimport {easeOut} from '../easing.js';\nimport EventType from '../events/EventType.js';\nimport {DEVICE_PIXEL_RATIO, FIREFOX, SAFARI} from '../has.js';\nimport Interaction, {zoomByDelta} from './Interaction.js';\nimport {clamp} from '../math.js';\n\n\n/**\n * Maximum mouse wheel delta.\n * @type {number}\n */\nvar MAX_DELTA = 1;\n\n\n/**\n * @enum {string}\n */\nexport var Mode = {\n TRACKPAD: 'trackpad',\n WHEEL: 'wheel'\n};\n\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 {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [timeout=80] Mouse wheel timeout duration in milliseconds.\n * @property {boolean} [constrainResolution=false] When using a trackpad or\n * magic mouse, zoom to the closest integer zoom level after the scroll gesture\n * ends.\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 */\n\n\n/**\n * @classdesc\n * Allows the user to zoom the map by scrolling the mouse wheel.\n * @api\n */\nvar MouseWheelZoom = /*@__PURE__*/(function (Interaction) {\n function MouseWheelZoom(opt_options) {\n\n var options = opt_options ? opt_options : {};\n\n Interaction.call(/** @type {import(\"./Interaction.js\").InteractionOptions} */ this, (options));\n\n /**\n * @private\n * @type {number}\n */\n this.delta_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n /**\n * @private\n * @type {number}\n */\n this.timeout_ = options.timeout !== undefined ? options.timeout : 80;\n\n /**\n * @private\n * @type {boolean}\n */\n this.useAnchor_ = options.useAnchor !== undefined ? options.useAnchor : true;\n\n /**\n * @private\n * @type {boolean}\n */\n this.constrainResolution_ = options.constrainResolution || false;\n\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n this.condition_ = options.condition ? options.condition : always;\n\n /**\n * @private\n * @type {?import(\"../coordinate.js\").Coordinate}\n */\n this.lastAnchor_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.startTime_ = undefined;\n\n /**\n * @private\n * @type {?}\n */\n this.timeoutId_;\n\n /**\n * @private\n * @type {Mode|undefined}\n */\n this.mode_ = undefined;\n\n /**\n * Trackpad events separated by this delay will be considered separate\n * interactions.\n * @type {number}\n */\n this.trackpadEventGap_ = 400;\n\n /**\n * @type {?}\n */\n this.trackpadTimeoutId_;\n\n /**\n * The number of delta values per zoom level\n * @private\n * @type {number}\n */\n this.trackpadDeltaPerZoom_ = 300;\n\n /**\n * The zoom factor by which scroll zooming is allowed to exceed the limits.\n * @private\n * @type {number}\n */\n this.trackpadZoomBuffer_ = 1.5;\n\n }\n\n if ( Interaction ) MouseWheelZoom.__proto__ = Interaction;\n MouseWheelZoom.prototype = Object.create( Interaction && Interaction.prototype );\n MouseWheelZoom.prototype.constructor = MouseWheelZoom;\n\n /**\n * @private\n */\n MouseWheelZoom.prototype.decrementInteractingHint_ = function decrementInteractingHint_ () {\n this.trackpadTimeoutId_ = undefined;\n var view = this.getMap().getView();\n view.setHint(ViewHint.INTERACTING, -1);\n };\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 * @override\n */\n MouseWheelZoom.prototype.handleEvent = function handleEvent (mapBrowserEvent) {\n if (!this.condition_(mapBrowserEvent)) {\n return true;\n }\n var type = mapBrowserEvent.type;\n if (type !== EventType.WHEEL && type !== EventType.MOUSEWHEEL) {\n return true;\n }\n\n mapBrowserEvent.preventDefault();\n\n var map = mapBrowserEvent.map;\n var wheelEvent = /** @type {WheelEvent} */ (mapBrowserEvent.originalEvent);\n\n if (this.useAnchor_) {\n this.lastAnchor_ = mapBrowserEvent.coordinate;\n }\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 &&\n 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 } else if (mapBrowserEvent.type == EventType.MOUSEWHEEL) {\n delta = -wheelEvent.wheelDeltaY;\n if (SAFARI) {\n delta /= 3;\n }\n }\n\n if (delta === 0) {\n return false;\n }\n\n var now = Date.now();\n\n if (this.startTime_ === undefined) {\n this.startTime_ = now;\n }\n\n if (!this.mode_ || now - this.startTime_ > this.trackpadEventGap_) {\n this.mode_ = Math.abs(delta) < 4 ?\n Mode.TRACKPAD :\n Mode.WHEEL;\n }\n\n if (this.mode_ === Mode.TRACKPAD) {\n var view = map.getView();\n if (this.trackpadTimeoutId_) {\n clearTimeout(this.trackpadTimeoutId_);\n } else {\n view.setHint(ViewHint.INTERACTING, 1);\n }\n this.trackpadTimeoutId_ = setTimeout(this.decrementInteractingHint_.bind(this), this.trackpadEventGap_);\n var resolution = view.getResolution() * Math.pow(2, delta / this.trackpadDeltaPerZoom_);\n var minResolution = view.getMinResolution();\n var maxResolution = view.getMaxResolution();\n var rebound = 0;\n if (resolution < minResolution) {\n resolution = Math.max(resolution, minResolution / this.trackpadZoomBuffer_);\n rebound = 1;\n } else if (resolution > maxResolution) {\n resolution = Math.min(resolution, maxResolution * this.trackpadZoomBuffer_);\n rebound = -1;\n }\n if (this.lastAnchor_) {\n var center = view.calculateCenterZoom(resolution, this.lastAnchor_);\n view.setCenter(view.constrainCenter(center));\n }\n view.setResolution(resolution);\n\n if (rebound === 0 && this.constrainResolution_) {\n view.animate({\n resolution: view.constrainResolution(resolution, delta > 0 ? -1 : 1),\n easing: easeOut,\n anchor: this.lastAnchor_,\n duration: this.duration_\n });\n }\n\n if (rebound > 0) {\n view.animate({\n resolution: minResolution,\n easing: easeOut,\n anchor: this.lastAnchor_,\n duration: 500\n });\n } else if (rebound < 0) {\n view.animate({\n resolution: maxResolution,\n easing: easeOut,\n anchor: this.lastAnchor_,\n duration: 500\n });\n }\n this.startTime_ = now;\n return false;\n }\n\n this.delta_ += delta;\n\n var timeLeft = Math.max(this.timeout_ - (now - this.startTime_), 0);\n\n clearTimeout(this.timeoutId_);\n this.timeoutId_ = setTimeout(this.handleWheelZoom_.bind(this, map), timeLeft);\n\n return false;\n };\n\n /**\n * @private\n * @param {import(\"../PluggableMap.js\").default} map Map.\n */\n MouseWheelZoom.prototype.handleWheelZoom_ = function handleWheelZoom_ (map) {\n var view = map.getView();\n if (view.getAnimating()) {\n view.cancelAnimations();\n }\n var maxDelta = MAX_DELTA;\n var delta = clamp(this.delta_, -maxDelta, maxDelta);\n zoomByDelta(view, -delta, this.lastAnchor_, this.duration_);\n this.mode_ = undefined;\n this.delta_ = 0;\n this.lastAnchor_ = null;\n this.startTime_ = undefined;\n this.timeoutId_ = undefined;\n };\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 setMouseAnchor (useAnchor) {\n this.useAnchor_ = useAnchor;\n if (!useAnchor) {\n this.lastAnchor_ = null;\n }\n };\n\n return MouseWheelZoom;\n}(Interaction));\n\nexport default MouseWheelZoom;\n\n//# sourceMappingURL=MouseWheelZoom.js.map","/**\n * @module ol/interaction/PinchRotate\n */\nimport ViewHint from '../ViewHint.js';\nimport {FALSE} from '../functions.js';\nimport {rotate, rotateWithoutConstraints} from './Interaction.js';\nimport PointerInteraction, {centroid as centroidFromPointers} from './Pointer.js';\nimport {disable} from '../rotationconstraint.js';\n\n\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\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 = /*@__PURE__*/(function (PointerInteraction) {\n function PinchRotate(opt_options) {\n\n var options = opt_options ? opt_options : {};\n\n var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n\n if (!pointerOptions.stopDown) {\n pointerOptions.stopDown = FALSE;\n }\n\n PointerInteraction.call(this, pointerOptions);\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.anchor_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastAngle_ = undefined;\n\n /**\n * @private\n * @type {boolean}\n */\n this.rotating_ = false;\n\n /**\n * @private\n * @type {number}\n */\n this.rotationDelta_ = 0.0;\n\n /**\n * @private\n * @type {number}\n */\n this.threshold_ = options.threshold !== undefined ? options.threshold : 0.3;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n }\n\n if ( PointerInteraction ) PinchRotate.__proto__ = PointerInteraction;\n PinchRotate.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n PinchRotate.prototype.constructor = PinchRotate;\n\n /**\n * @inheritDoc\n */\n PinchRotate.prototype.handleDragEvent = function handleDragEvent (mapBrowserEvent) {\n var rotationDelta = 0.0;\n\n var touch0 = this.targetPointers[0];\n var touch1 = this.targetPointers[1];\n\n // angle between touches\n var angle = Math.atan2(\n touch1.clientY - touch0.clientY,\n touch1.clientX - touch0.clientX);\n\n if (this.lastAngle_ !== undefined) {\n var delta = angle - this.lastAngle_;\n this.rotationDelta_ += delta;\n if (!this.rotating_ &&\n Math.abs(this.rotationDelta_) > this.threshold_) {\n this.rotating_ = true;\n }\n rotationDelta = delta;\n }\n this.lastAngle_ = angle;\n\n var map = mapBrowserEvent.map;\n var view = map.getView();\n if (view.getConstraints().rotation === disable) {\n return;\n }\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.getCoordinateFromPixel(centroid);\n\n // rotate\n if (this.rotating_) {\n var rotation = view.getRotation();\n map.render();\n rotateWithoutConstraints(view, rotation + rotationDelta, this.anchor_);\n }\n };\n\n /**\n * @inheritDoc\n */\n PinchRotate.prototype.handleUpEvent = function handleUpEvent (mapBrowserEvent) {\n if (this.targetPointers.length < 2) {\n var map = mapBrowserEvent.map;\n var view = map.getView();\n view.setHint(ViewHint.INTERACTING, -1);\n if (this.rotating_) {\n var rotation = view.getRotation();\n rotate(view, rotation, this.anchor_, this.duration_);\n }\n return false;\n } else {\n return true;\n }\n };\n\n /**\n * @inheritDoc\n */\n PinchRotate.prototype.handleDownEvent = function handleDownEvent (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().setHint(ViewHint.INTERACTING, 1);\n }\n return true;\n } else {\n return false;\n }\n };\n\n return PinchRotate;\n}(PointerInteraction));\n\nexport default PinchRotate;\n\n//# sourceMappingURL=PinchRotate.js.map","/**\n * @module ol/interaction/PinchZoom\n */\nimport ViewHint from '../ViewHint.js';\nimport {FALSE} from '../functions.js';\nimport {zoom, zoomWithoutConstraints} from './Interaction.js';\nimport PointerInteraction, {centroid as centroidFromPointers} from './Pointer.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=400] Animation duration in milliseconds.\n * @property {boolean} [constrainResolution=false] Zoom to the closest integer\n * zoom level after the pinch gesture ends.\n */\n\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 = /*@__PURE__*/(function (PointerInteraction) {\n function PinchZoom(opt_options) {\n\n var options = opt_options ? opt_options : {};\n\n var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n\n if (!pointerOptions.stopDown) {\n pointerOptions.stopDown = FALSE;\n }\n\n PointerInteraction.call(this, pointerOptions);\n\n /**\n * @private\n * @type {boolean}\n */\n this.constrainResolution_ = options.constrainResolution || false;\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.anchor_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.duration_ = options.duration !== undefined ? options.duration : 400;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.lastDistance_ = undefined;\n\n /**\n * @private\n * @type {number}\n */\n this.lastScaleDelta_ = 1;\n\n }\n\n if ( PointerInteraction ) PinchZoom.__proto__ = PointerInteraction;\n PinchZoom.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n PinchZoom.prototype.constructor = PinchZoom;\n\n /**\n * @inheritDoc\n */\n PinchZoom.prototype.handleDragEvent = function handleDragEvent (mapBrowserEvent) {\n var scaleDelta = 1.0;\n\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\n // distance between touches\n var distance = Math.sqrt(dx * dx + dy * dy);\n\n if (this.lastDistance_ !== undefined) {\n scaleDelta = this.lastDistance_ / distance;\n }\n this.lastDistance_ = distance;\n\n\n var map = mapBrowserEvent.map;\n var view = map.getView();\n var resolution = view.getResolution();\n var maxResolution = view.getMaxResolution();\n var minResolution = view.getMinResolution();\n var newResolution = resolution * scaleDelta;\n if (newResolution > maxResolution) {\n scaleDelta = maxResolution / resolution;\n newResolution = maxResolution;\n } else if (newResolution < minResolution) {\n scaleDelta = minResolution / resolution;\n newResolution = minResolution;\n }\n\n if (scaleDelta != 1.0) {\n this.lastScaleDelta_ = scaleDelta;\n }\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.getCoordinateFromPixel(centroid);\n\n // scale, bypass the resolution constraint\n map.render();\n zoomWithoutConstraints(view, newResolution, this.anchor_);\n };\n\n /**\n * @inheritDoc\n */\n PinchZoom.prototype.handleUpEvent = function handleUpEvent (mapBrowserEvent) {\n if (this.targetPointers.length < 2) {\n var map = mapBrowserEvent.map;\n var view = map.getView();\n view.setHint(ViewHint.INTERACTING, -1);\n var resolution = view.getResolution();\n if (this.constrainResolution_ ||\n resolution < view.getMinResolution() ||\n resolution > view.getMaxResolution()) {\n // Zoom to final resolution, with an animation, and provide a\n // direction not to zoom out/in if user was pinching in/out.\n // Direction is > 0 if pinching out, and < 0 if pinching in.\n var direction = this.lastScaleDelta_ - 1;\n zoom(view, resolution, this.anchor_, this.duration_, direction);\n }\n return false;\n } else {\n return true;\n }\n };\n\n /**\n * @inheritDoc\n */\n PinchZoom.prototype.handleDownEvent = function handleDownEvent (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().setHint(ViewHint.INTERACTING, 1);\n }\n return true;\n } else {\n return false;\n }\n };\n\n return PinchZoom;\n}(PointerInteraction));\n\nexport default PinchZoom;\n\n//# sourceMappingURL=PinchZoom.js.map","/**\n * @module ol/interaction\n */\nimport Collection from './Collection.js';\nimport Kinetic from './Kinetic.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 MouseWheelZoom from './interaction/MouseWheelZoom.js';\nimport PinchRotate from './interaction/PinchRotate.js';\nimport PinchZoom from './interaction/PinchZoom.js';\nimport {focus} from './events/condition.js';\n\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\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} [constrainResolution=false] Zoom to the closest integer\n * zoom level after the wheel/trackpad or pinch gesture ends.\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\n * mousewheel zoom.\n * @property {number} [zoomDuration] Duration of the zoom animation in\n * milliseconds.\n */\n\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. The default set of\n * 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\n var options = opt_options ? opt_options : {};\n\n var interactions = new Collection();\n\n var kinetic = new Kinetic(-0.005, 0.05, 100);\n\n var altShiftDragRotate = options.altShiftDragRotate !== undefined ?\n options.altShiftDragRotate : true;\n if (altShiftDragRotate) {\n interactions.push(new DragRotate());\n }\n\n var doubleClickZoom = options.doubleClickZoom !== undefined ?\n options.doubleClickZoom : true;\n if (doubleClickZoom) {\n interactions.push(new DoubleClickZoom({\n delta: options.zoomDelta,\n duration: options.zoomDuration\n }));\n }\n\n var dragPan = options.dragPan !== undefined ? options.dragPan : true;\n if (dragPan) {\n interactions.push(new DragPan({\n condition: options.onFocusOnly ? focus : undefined,\n kinetic: kinetic\n }));\n }\n\n var pinchRotate = options.pinchRotate !== undefined ? options.pinchRotate :\n true;\n if (pinchRotate) {\n interactions.push(new PinchRotate());\n }\n\n var pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true;\n if (pinchZoom) {\n interactions.push(new PinchZoom({\n constrainResolution: options.constrainResolution,\n duration: options.zoomDuration\n }));\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\n var mouseWheelZoom = options.mouseWheelZoom !== undefined ?\n options.mouseWheelZoom : true;\n if (mouseWheelZoom) {\n interactions.push(new MouseWheelZoom({\n condition: options.onFocusOnly ? focus : undefined,\n constrainResolution: options.constrainResolution,\n duration: options.zoomDuration\n }));\n }\n\n var shiftDragZoom = options.shiftDragZoom !== undefined ?\n options.shiftDragZoom : true;\n if (shiftDragZoom) {\n interactions.push(new DragZoom({\n duration: options.zoomDuration\n }));\n }\n\n return interactions;\n\n}\n\n//# sourceMappingURL=interaction.js.map","/**\n * @module ol/reproj/common\n */\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/**\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\n//# sourceMappingURL=common.js.map","/**\n * @module ol/ImageBase\n */\nimport {abstract} from './util.js';\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\n\n/**\n * @abstract\n */\nvar ImageBase = /*@__PURE__*/(function (EventTarget) {\n function ImageBase(extent, resolution, pixelRatio, state) {\n\n EventTarget.call(this);\n\n /**\n * @protected\n * @type {import(\"./extent.js\").Extent}\n */\n this.extent = extent;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @protected\n * @type {number|undefined}\n */\n this.resolution = resolution;\n\n /**\n * @protected\n * @type {import(\"./ImageState.js\").default}\n */\n this.state = state;\n\n }\n\n if ( EventTarget ) ImageBase.__proto__ = EventTarget;\n ImageBase.prototype = Object.create( EventTarget && EventTarget.prototype );\n ImageBase.prototype.constructor = ImageBase;\n\n /**\n * @protected\n */\n ImageBase.prototype.changed = function changed () {\n this.dispatchEvent(EventType.CHANGE);\n };\n\n /**\n * @return {import(\"./extent.js\").Extent} Extent.\n */\n ImageBase.prototype.getExtent = function getExtent () {\n return this.extent;\n };\n\n /**\n * @abstract\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n */\n ImageBase.prototype.getImage = function getImage () {\n return abstract();\n };\n\n /**\n * @return {number} PixelRatio.\n */\n ImageBase.prototype.getPixelRatio = function getPixelRatio () {\n return this.pixelRatio_;\n };\n\n /**\n * @return {number} Resolution.\n */\n ImageBase.prototype.getResolution = function getResolution () {\n return /** @type {number} */ (this.resolution);\n };\n\n /**\n * @return {import(\"./ImageState.js\").default} State.\n */\n ImageBase.prototype.getState = function getState () {\n return this.state;\n };\n\n /**\n * Load not yet loaded URI.\n * @abstract\n */\n ImageBase.prototype.load = function load () {\n abstract();\n };\n\n return ImageBase;\n}(EventTarget));\n\n\nexport default ImageBase;\n\n//# sourceMappingURL=ImageBase.js.map","/**\n * @module ol/ImageState\n */\n\n/**\n * @enum {number}\n */\nexport default {\n IDLE: 0,\n LOADING: 1,\n LOADED: 2,\n ERROR: 3\n};\n\n//# sourceMappingURL=ImageState.js.map","/**\n * @module ol/ImageCanvas\n */\nimport ImageBase from './ImageBase.js';\nimport ImageState from './ImageState.js';\n\n\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=))} Loader\n */\n\n\nvar ImageCanvas = /*@__PURE__*/(function (ImageBase) {\n function ImageCanvas(extent, resolution, pixelRatio, canvas, opt_loader) {\n\n var state = opt_loader !== undefined ? ImageState.IDLE : ImageState.LOADED;\n\n ImageBase.call(this, extent, resolution, pixelRatio, state);\n\n /**\n * Optional canvas loader function.\n * @type {?Loader}\n * @private\n */\n this.loader_ = opt_loader !== undefined ? opt_loader : null;\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.canvas_ = canvas;\n\n /**\n * @private\n * @type {Error}\n */\n this.error_ = null;\n\n }\n\n if ( ImageBase ) ImageCanvas.__proto__ = ImageBase;\n ImageCanvas.prototype = Object.create( ImageBase && ImageBase.prototype );\n ImageCanvas.prototype.constructor = ImageCanvas;\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 getError () {\n return this.error_;\n };\n\n /**\n * Handle async drawing complete.\n * @param {Error=} err Any error during drawing.\n * @private\n */\n ImageCanvas.prototype.handleLoad_ = function handleLoad_ (err) {\n if (err) {\n this.error_ = err;\n this.state = ImageState.ERROR;\n } else {\n this.state = ImageState.LOADED;\n }\n this.changed();\n };\n\n /**\n * @inheritDoc\n */\n ImageCanvas.prototype.load = function load () {\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 /**\n * @return {HTMLCanvasElement} Canvas element.\n */\n ImageCanvas.prototype.getImage = function getImage () {\n return this.canvas_;\n };\n\n return ImageCanvas;\n}(ImageBase));\n\n\nexport default ImageCanvas;\n\n//# sourceMappingURL=ImageCanvas.js.map","/**\n * @module ol/LayerType\n */\n\n/**\n * A layer type used when creating layer renderers.\n * @enum {string}\n */\nexport default {\n IMAGE: 'IMAGE',\n TILE: 'TILE',\n VECTOR_TILE: 'VECTOR_TILE',\n VECTOR: 'VECTOR'\n};\n\n//# sourceMappingURL=LayerType.js.map","/**\n * @module ol/layer/VectorRenderType\n */\n\n/**\n * @enum {string}\n * Render mode for vector layers:\n * * `'image'`: Vector layers 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 * * `'vector'`: Vector layers are rendered as vectors. Most accurate rendering\n * even during animations, but slower performance.\n * @api\n */\nexport default {\n IMAGE: 'image',\n VECTOR: 'vector'\n};\n\n//# sourceMappingURL=VectorRenderType.js.map","/**\n * @module ol/render/Event\n */\n\nimport Event from '../events/Event.js';\n\nvar RenderEvent = /*@__PURE__*/(function (Event) {\n function RenderEvent(type, opt_vectorContext, opt_frameState, opt_context, opt_glContext) {\n\n Event.call(this, type);\n\n /**\n * For canvas, this is an instance of {@link module:ol/render/canvas/Immediate}.\n * @type {import(\"./VectorContext.js\").default|undefined}\n * @api\n */\n this.vectorContext = opt_vectorContext;\n\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 /**\n * Canvas context. Only available when a Canvas renderer is used, null\n * otherwise.\n * @type {CanvasRenderingContext2D|null|undefined}\n * @api\n */\n this.context = opt_context;\n\n /**\n * WebGL context. Only available when a WebGL renderer is used, null\n * otherwise.\n * @type {import(\"../webgl/Context.js\").default|null|undefined}\n * @api\n */\n this.glContext = opt_glContext;\n\n }\n\n if ( Event ) RenderEvent.__proto__ = Event;\n RenderEvent.prototype = Object.create( Event && Event.prototype );\n RenderEvent.prototype.constructor = RenderEvent;\n\n return RenderEvent;\n}(Event));\n\nexport default RenderEvent;\n\n//# sourceMappingURL=Event.js.map","/**\n * @module ol/structs/LRUCache\n */\n\nimport {assert} from '../asserts.js';\nimport EventTarget from '../events/Target.js';\nimport EventType from '../events/EventType.js';\n\n\n/**\n * @typedef {Object} Entry\n * @property {string} key_\n * @property {Object} newer\n * @property {Object} older\n * @property {*} value_\n */\n\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\").Event\n * @template T\n */\nvar LRUCache = /*@__PURE__*/(function (EventTarget) {\n function LRUCache(opt_highWaterMark) {\n\n EventTarget.call(this);\n\n /**\n * @type {number}\n */\n this.highWaterMark = opt_highWaterMark !== undefined ? opt_highWaterMark : 2048;\n\n /**\n * @private\n * @type {number}\n */\n this.count_ = 0;\n\n /**\n * @private\n * @type {!Object<string, Entry>}\n */\n this.entries_ = {};\n\n /**\n * @private\n * @type {?Entry}\n */\n this.oldest_ = null;\n\n /**\n * @private\n * @type {?Entry}\n */\n this.newest_ = null;\n\n }\n\n if ( EventTarget ) LRUCache.__proto__ = EventTarget;\n LRUCache.prototype = Object.create( EventTarget && EventTarget.prototype );\n LRUCache.prototype.constructor = LRUCache;\n\n\n /**\n * @return {boolean} Can expire cache.\n */\n LRUCache.prototype.canExpireCache = function canExpireCache () {\n return this.getCount() > this.highWaterMark;\n };\n\n\n /**\n * FIXME empty description for jsdoc\n */\n LRUCache.prototype.clear = function clear () {\n this.count_ = 0;\n this.entries_ = {};\n this.oldest_ = null;\n this.newest_ = null;\n this.dispatchEvent(EventType.CLEAR);\n };\n\n\n /**\n * @param {string} key Key.\n * @return {boolean} Contains key.\n */\n LRUCache.prototype.containsKey = function containsKey (key) {\n return this.entries_.hasOwnProperty(key);\n };\n\n\n /**\n * @param {function(this: S, T, string, LRUCache): ?} 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 * @param {S=} opt_this The object to use as `this` in `f`.\n * @template S\n */\n LRUCache.prototype.forEach = function forEach (f, opt_this) {\n var entry = this.oldest_;\n while (entry) {\n f.call(opt_this, entry.value_, entry.key_, this);\n entry = entry.newer;\n }\n };\n\n\n /**\n * @param {string} key Key.\n * @return {T} Value.\n */\n LRUCache.prototype.get = function get (key) {\n var entry = this.entries_[key];\n assert(entry !== undefined,\n 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 } else if (entry === this.oldest_) {\n this.oldest_ = /** @type {Entry} */ (this.oldest_.newer);\n this.oldest_.older = null;\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\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 remove (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 } else if (entry === this.oldest_) {\n this.oldest_ = /** @type {Entry} */ (entry.newer);\n if (this.oldest_) {\n this.oldest_.older = null;\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\n /**\n * @return {number} Count.\n */\n LRUCache.prototype.getCount = function getCount () {\n return this.count_;\n };\n\n\n /**\n * @return {Array<string>} Keys.\n */\n LRUCache.prototype.getKeys = function getKeys () {\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\n /**\n * @return {Array<T>} Values.\n */\n LRUCache.prototype.getValues = function getValues () {\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\n /**\n * @return {T} Last value.\n */\n LRUCache.prototype.peekLast = function peekLast () {\n return this.oldest_.value_;\n };\n\n\n /**\n * @return {string} Last key.\n */\n LRUCache.prototype.peekLastKey = function peekLastKey () {\n return this.oldest_.key_;\n };\n\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 peekFirstKey () {\n return this.newest_.key_;\n };\n\n\n /**\n * @return {T} value Value.\n */\n LRUCache.prototype.pop = function pop () {\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\n /**\n * @param {string} key Key.\n * @param {T} value Value.\n */\n LRUCache.prototype.replace = function replace (key, value) {\n this.get(key); // update `newest_`\n this.entries_[key].value_ = value;\n };\n\n\n /**\n * @param {string} key Key.\n * @param {T} value Value.\n */\n LRUCache.prototype.set = function set (key, value) {\n assert(!(key in this.entries_),\n 16); // Tried to set a value for a key that is used already\n var entry = /** @type {Entry} */ ({\n key_: key,\n newer: null,\n older: this.newest_,\n value_: value\n });\n if (!this.newest_) {\n this.oldest_ = entry;\n } else {\n this.newest_.newer = entry;\n }\n this.newest_ = entry;\n this.entries_[key] = entry;\n ++this.count_;\n };\n\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 setSize (size) {\n this.highWaterMark = size;\n };\n\n\n /**\n * Prune the cache.\n */\n LRUCache.prototype.prune = function prune () {\n while (this.canExpireCache()) {\n this.pop();\n }\n };\n\n return LRUCache;\n}(EventTarget));\n\nexport default LRUCache;\n\n//# sourceMappingURL=LRUCache.js.map","/**\n * @module ol/render/canvas\n */\nimport {getFontFamilies} from '../css.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {clear} from '../obj.js';\nimport LRUCache from '../structs/LRUCache.js';\nimport {create as createTransform} from '../transform.js';\n\n\n/**\n * @typedef {Object} FillState\n * @property {import(\"../colorlike.js\").ColorLike} fillStyle\n */\n\n\n/**\n * @typedef {Object} FillStrokeState\n * @property {import(\"../colorlike.js\").ColorLike} [currentFillStyle]\n * @property {import(\"../colorlike.js\").ColorLike} [currentStrokeStyle]\n * @property {string} [currentLineCap]\n * @property {Array<number>} currentLineDash\n * @property {number} [currentLineDashOffset]\n * @property {string} [currentLineJoin]\n * @property {number} [currentLineWidth]\n * @property {number} [currentMiterLimit]\n * @property {number} [lastStroke]\n * @property {import(\"../colorlike.js\").ColorLike} [fillStyle]\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle]\n * @property {string} [lineCap]\n * @property {Array<number>} lineDash\n * @property {number} [lineDashOffset]\n * @property {string} [lineJoin]\n * @property {number} [lineWidth]\n * @property {number} [miterLimit]\n */\n\n\n/**\n * @typedef {Object} StrokeState\n * @property {string} lineCap\n * @property {Array<number>} lineDash\n * @property {number} lineDashOffset\n * @property {string} lineJoin\n * @property {number} lineWidth\n * @property {number} miterLimit\n * @property {import(\"../colorlike.js\").ColorLike} strokeStyle\n */\n\n\n/**\n * @typedef {Object} TextState\n * @property {string} font\n * @property {string} [textAlign]\n * @property {string} textBaseline\n * @property {string} [placement]\n * @property {number} [maxAngle]\n * @property {boolean} [overflow]\n * @property {import(\"../style/Fill.js\").default} [backgroundFill]\n * @property {import(\"../style/Stroke.js\").default} [backgroundStroke]\n * @property {number} [scale]\n * @property {Array<number>} [padding]\n */\n\n\n/**\n * Container for decluttered replay instructions that need to be rendered or\n * omitted together, i.e. when styles render both an image and text, or for the\n * characters that form text along lines. The basic elements of this array are\n * `[minX, minY, maxX, maxY, count]`, where the first four entries are the\n * rendered extent of the group in pixel space. `count` is the number of styles\n * in the group, i.e. 2 when an image and a text are grouped, or 1 otherwise.\n * In addition to these four elements, declutter instruction arrays (i.e. the\n * arguments to {@link module:ol/render/canvas~drawImage} are appended to the array.\n * @typedef {Array<*>} DeclutterGroup\n */\n\n\n/**\n * @const\n * @type {string}\n */\nexport var defaultFont = '10px sans-serif';\n\n\n/**\n * @const\n * @type {import(\"../color.js\").Color}\n */\nexport var defaultFillStyle = [0, 0, 0, 1];\n\n\n/**\n * @const\n * @type {string}\n */\nexport var defaultLineCap = 'round';\n\n\n/**\n * @const\n * @type {Array<number>}\n */\nexport var defaultLineDash = [];\n\n\n/**\n * @const\n * @type {number}\n */\nexport var defaultLineDashOffset = 0;\n\n\n/**\n * @const\n * @type {string}\n */\nexport var defaultLineJoin = 'round';\n\n\n/**\n * @const\n * @type {number}\n */\nexport var defaultMiterLimit = 10;\n\n\n/**\n * @const\n * @type {import(\"../color.js\").Color}\n */\nexport var defaultStrokeStyle = [0, 0, 0, 1];\n\n\n/**\n * @const\n * @type {string}\n */\nexport var defaultTextAlign = 'center';\n\n\n/**\n * @const\n * @type {string}\n */\nexport var defaultTextBaseline = 'middle';\n\n\n/**\n * @const\n * @type {Array<number>}\n */\nexport var defaultPadding = [0, 0, 0, 0];\n\n\n/**\n * @const\n * @type {number}\n */\nexport var defaultLineWidth = 1;\n\n\n/**\n * The label cache for text rendering. To change the default cache size of 2048\n * entries, use {@link module:ol/structs/LRUCache#setSize}.\n * @type {LRUCache<HTMLCanvasElement>}\n * @api\n */\nexport var labelCache = new LRUCache();\n\n\n/**\n * @type {!Object<string, number>}\n */\nexport var checkedFonts = {};\n\n\n/**\n * @type {CanvasRenderingContext2D}\n */\nvar measureContext = null;\n\n\n/**\n * @type {!Object<string, number>}\n */\nexport var textHeights = {};\n\n\n/**\n * Clears the label cache when a font becomes available.\n * @param {string} fontSpec CSS font spec.\n */\nexport var checkFont = (function() {\n var retries = 60;\n var checked = checkedFonts;\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 function isAvailable(font) {\n var context = getMeasureContext();\n // Check weight ranges according to\n // https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#Fallback_weights\n for (var weight = 100; weight <= 700; weight += 300) {\n var fontWeight = weight + ' ';\n var available = true;\n for (var i = 0; i < len; ++i) {\n var referenceFont = referenceFonts[i];\n context.font = fontWeight + size + referenceFont;\n referenceWidth = context.measureText(text).width;\n if (font != referenceFont) {\n context.font = fontWeight + size + font + ',' + referenceFont;\n var width = context.measureText(text).width;\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 // Consider font available when it is available in one weight range.\n //FIXME With this we miss rare corner cases, so we should consider\n //FIXME checking availability for each requested weight range.\n return true;\n }\n }\n return false;\n }\n\n function check() {\n var done = true;\n for (var font in checked) {\n if (checked[font] < retries) {\n if (isAvailable(font)) {\n checked[font] = retries;\n clear(textHeights);\n // Make sure that loaded fonts are picked up by Safari\n measureContext = null;\n labelCache.clear();\n } else {\n ++checked[font];\n done = false;\n }\n }\n }\n if (done) {\n clearInterval(interval);\n interval = undefined;\n }\n }\n\n return function(fontSpec) {\n var fontFamilies = getFontFamilies(fontSpec);\n if (!fontFamilies) {\n return;\n }\n for (var i = 0, ii = fontFamilies.length; i < ii; ++i) {\n var fontFamily = fontFamilies[i];\n if (!(fontFamily in checked)) {\n checked[fontFamily] = retries;\n if (!isAvailable(fontFamily)) {\n checked[fontFamily] = 0;\n if (interval === undefined) {\n interval = setInterval(check, 32);\n }\n }\n }\n }\n };\n})();\n\n\n/**\n * @return {CanvasRenderingContext2D} Measure context.\n */\nfunction getMeasureContext() {\n if (!measureContext) {\n measureContext = createCanvasContext2D(1, 1);\n }\n return measureContext;\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 var span;\n var heights = textHeights;\n return function(font) {\n var height = heights[font];\n if (height == undefined) {\n if (!span) {\n span = document.createElement('span');\n span.textContent = 'M';\n span.style.margin = span.style.padding = '0 !important';\n span.style.position = 'absolute !important';\n span.style.left = '-99999px !important';\n }\n span.style.font = font;\n document.body.appendChild(span);\n height = heights[font] = span.offsetHeight;\n document.body.removeChild(span);\n }\n return height;\n };\n})();\n\n\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {number} Width.\n */\nexport function measureTextWidth(font, text) {\n var measureContext = getMeasureContext();\n if (font != measureContext.font) {\n measureContext.font = font;\n }\n return measureContext.measureText(text).width;\n}\n\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\nexport var resetTransform = createTransform();\n\n\n/**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../transform.js\").Transform|null} transform Transform.\n * @param {number} opacity Opacity.\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} image Image.\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 {number} scale Scale.\n */\nexport function drawImage(context,\n transform, opacity, image, originX, originY, w, h, x, y, scale) {\n var alpha;\n if (opacity != 1) {\n alpha = context.globalAlpha;\n context.globalAlpha = alpha * opacity;\n }\n if (transform) {\n context.setTransform.apply(context, transform);\n }\n\n context.drawImage(image, originX, originY, w, h, x, y, w * scale, h * scale);\n\n if (alpha) {\n context.globalAlpha = alpha;\n }\n if (transform) {\n context.setTransform.apply(context, resetTransform);\n }\n}\n\n//# sourceMappingURL=canvas.js.map","/**\n * @module ol/color\n */\nimport {assert} from './asserts.js';\nimport {clamp} from './math.js';\n\n\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\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\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]*)$/i;\n\n\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 } else {\n return toString(color);\n }\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 } else {\n return '';\n }\n}\n\n\n/**\n * @param {string} s String.\n * @return {Color} Color.\n */\nexport var fromString = (\n function() {\n\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 /**\n * @const\n * @type {number}\n */\n var MAX_CACHE_SIZE = 1024;\n\n /**\n * @type {Object<string, Color>}\n */\n var cache = {};\n\n /**\n * @type {number}\n */\n var cacheSize = 0;\n\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 } 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 })();\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 } else {\n return fromString(color);\n }\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\n if (NAMED_COLOR_RE_.exec(s)) {\n s = fromNamed(s);\n }\n\n if (HEX_COLOR_RE_.exec(s)) { // hex\n var n = s.length - 1; // number of hex digits\n var d; // number of digits per channel\n if (n <= 4) {\n d = 1;\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 } 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 } else if (s.indexOf('rgba(') == 0) { // rgba()\n color = s.slice(5, -1).split(',').map(Number);\n normalize(color);\n } else if (s.indexOf('rgb(') == 0) { // rgb()\n color = s.slice(4, -1).split(',').map(Number);\n color.push(1);\n normalize(color);\n } else {\n assert(false, 14); // Invalid color\n }\n return color;\n}\n\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\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//# sourceMappingURL=color.js.map","/**\n * @module ol/colorlike\n */\nimport {toString} from './color.js';\n\n\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\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 } else {\n return color;\n }\n}\n\n//# sourceMappingURL=colorlike.js.map","/**\n * @module ol/render/VectorContext\n */\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 = function VectorContext () {};\n\nVectorContext.prototype.drawCustom = function drawCustom (geometry, feature, renderer) {};\n\n/**\n * Render a geometry.\n *\n * @param {import(\"../geom/Geometry.js\").default} geometry The geometry to render.\n */\nVectorContext.prototype.drawGeometry = function drawGeometry (geometry) {};\n\n/**\n * Set the rendering style.\n *\n * @param {import(\"../style/Style.js\").default} style The rendering style.\n */\nVectorContext.prototype.setStyle = function setStyle (style) {};\n\n/**\n * @param {import(\"../geom/Circle.js\").default} circleGeometry Circle geometry.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawCircle = function drawCircle (circleGeometry, feature) {};\n\n/**\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n */\nVectorContext.prototype.drawFeature = function drawFeature (feature, style) {};\n\n/**\n * @param {import(\"../geom/GeometryCollection.js\").default} geometryCollectionGeometry Geometry collection.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawGeometryCollection = function drawGeometryCollection (geometryCollectionGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/LineString.js\").default|import(\"./Feature.js\").default} lineStringGeometry Line string geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawLineString = function drawLineString (lineStringGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/MultiLineString.js\").default|import(\"./Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawMultiLineString = function drawMultiLineString (multiLineStringGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/MultiPoint.js\").default|import(\"./Feature.js\").default} multiPointGeometry MultiPoint geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawMultiPoint = function drawMultiPoint (multiPointGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawMultiPolygon = function drawMultiPolygon (multiPolygonGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/Point.js\").default|import(\"./Feature.js\").default} pointGeometry Point geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawPoint = function drawPoint (pointGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/Polygon.js\").default|import(\"./Feature.js\").default} polygonGeometry Polygon geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawPolygon = function drawPolygon (polygonGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/Geometry.js\").default|import(\"./Feature.js\").default} geometry Geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawText = function drawText (geometry, feature) {};\n\n/**\n * @param {import(\"../style/Fill.js\").default} fillStyle Fill style.\n * @param {import(\"../style/Stroke.js\").default} strokeStyle Stroke style.\n */\nVectorContext.prototype.setFillStrokeStyle = function setFillStrokeStyle (fillStyle, strokeStyle) {};\n\n/**\n * @param {import(\"../style/Image.js\").default} imageStyle Image style.\n * @param {import(\"./canvas.js\").DeclutterGroup=} opt_declutterGroup Declutter.\n */\nVectorContext.prototype.setImageStyle = function setImageStyle (imageStyle, opt_declutterGroup) {};\n\n/**\n * @param {import(\"../style/Text.js\").default} textStyle Text style.\n * @param {import(\"./canvas.js\").DeclutterGroup=} opt_declutterGroup Declutter.\n */\nVectorContext.prototype.setTextStyle = function setTextStyle (textStyle, opt_declutterGroup) {};\n\nexport default VectorContext;\n\n//# sourceMappingURL=VectorContext.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?\n\nimport {equals} from '../../array.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {intersects} from '../../extent.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport {transformGeom2D} from '../../geom/SimpleGeometry.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {CANVAS_LINE_DASH} from '../../has.js';\nimport VectorContext from '../VectorContext.js';\nimport {defaultTextAlign, defaultFillStyle, defaultLineCap, defaultLineDash, defaultLineDashOffset, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, defaultTextBaseline, defaultFont} from '../canvas.js';\nimport {create as createTransform, compose as composeTransform} from '../../transform.js';\n\n/**\n * @classdesc\n * A concrete subclass of {@link module:ol/render/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} object associated with postcompose, precompose and\n * render events emitted by layers and maps.\n */\nvar CanvasImmediateRenderer = /*@__PURE__*/(function (VectorContext) {\n function CanvasImmediateRenderer(context, pixelRatio, extent, transform, viewRotation) {\n VectorContext.call(this);\n\n /**\n * @private\n * @type {CanvasRenderingContext2D}\n */\n this.context_ = context;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.extent_ = extent;\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.transform_ = transform;\n\n /**\n * @private\n * @type {number}\n */\n this.viewRotation_ = viewRotation;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").FillState}\n */\n this.contextFillState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").StrokeState}\n */\n this.contextStrokeState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").TextState}\n */\n this.contextTextState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").FillState}\n */\n this.fillState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").StrokeState}\n */\n this.strokeState_ = null;\n\n /**\n * @private\n * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n */\n this.image_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.imageAnchorX_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageAnchorY_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageHeight_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageOpacity_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageOriginX_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageOriginY_ = 0;\n\n /**\n * @private\n * @type {boolean}\n */\n this.imageRotateWithView_ = false;\n\n /**\n * @private\n * @type {number}\n */\n this.imageRotation_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageScale_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageWidth_ = 0;\n\n /**\n * @private\n * @type {string}\n */\n this.text_ = '';\n\n /**\n * @private\n * @type {number}\n */\n this.textOffsetX_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.textOffsetY_ = 0;\n\n /**\n * @private\n * @type {boolean}\n */\n this.textRotateWithView_ = false;\n\n /**\n * @private\n * @type {number}\n */\n this.textRotation_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.textScale_ = 0;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").FillState}\n */\n this.textFillState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").StrokeState}\n */\n this.textStrokeState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").TextState}\n */\n this.textState_ = null;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.pixelCoordinates_ = [];\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.tmpLocalTransform_ = createTransform();\n\n }\n\n if ( VectorContext ) CanvasImmediateRenderer.__proto__ = VectorContext;\n CanvasImmediateRenderer.prototype = Object.create( VectorContext && VectorContext.prototype );\n CanvasImmediateRenderer.prototype.constructor = CanvasImmediateRenderer;\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 drawImages_ (flatCoordinates, offset, end, stride) {\n if (!this.image_) {\n return;\n }\n var pixelCoordinates = transform2D(\n flatCoordinates, offset, end, 2, this.transform_,\n 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 || this.imageScale_ != 1) {\n var centerX = x + this.imageAnchorX_;\n var centerY = y + this.imageAnchorY_;\n composeTransform(localTransform,\n centerX, centerY,\n this.imageScale_, this.imageScale_,\n rotation,\n -centerX, -centerY);\n context.setTransform.apply(context, localTransform);\n }\n context.drawImage(this.image_, this.imageOriginX_, this.imageOriginY_,\n this.imageWidth_, this.imageHeight_, x, y,\n this.imageWidth_, this.imageHeight_);\n }\n if (rotation !== 0 || this.imageScale_ != 1) {\n context.setTransform(1, 0, 0, 1, 0, 0);\n }\n if (this.imageOpacity_ != 1) {\n context.globalAlpha = alpha;\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 * @private\n */\n CanvasImmediateRenderer.prototype.drawText_ = function drawText_ (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(\n flatCoordinates, offset, end, stride, this.transform_,\n 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 || this.textScale_ != 1) {\n var localTransform = composeTransform(this.tmpLocalTransform_,\n x, y,\n this.textScale_, this.textScale_,\n rotation,\n -x, -y);\n context.setTransform.apply(context, localTransform);\n }\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 if (rotation !== 0 || this.textScale_ != 1) {\n context.setTransform(1, 0, 0, 1, 0, 0);\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 moveToLineTo_ (flatCoordinates, offset, end, stride, close) {\n var context = this.context_;\n var pixelCoordinates = transform2D(\n flatCoordinates, offset, end, stride, this.transform_,\n 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 /**\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 drawRings_ (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 /**\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 * @override\n * @api\n */\n CanvasImmediateRenderer.prototype.drawCircle = function drawCircle (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(\n 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(\n 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 /**\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 * @override\n * @api\n */\n CanvasImmediateRenderer.prototype.setStyle = function setStyle (style) {\n this.setFillStrokeStyle(style.getFill(), style.getStroke());\n this.setImageStyle(style.getImage());\n this.setTextStyle(style.getText());\n };\n\n /**\n * Render a geometry into the canvas. Call\n * {@link module:ol/render/canvas/Immediate#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 * @override\n * @api\n */\n CanvasImmediateRenderer.prototype.drawGeometry = function drawGeometry (geometry) {\n var type = geometry.getType();\n switch (type) {\n case GeometryType.POINT:\n this.drawPoint(/** @type {import(\"../../geom/Point.js\").default} */ (geometry));\n break;\n case GeometryType.LINE_STRING:\n this.drawLineString(/** @type {import(\"../../geom/LineString.js\").default} */ (geometry));\n break;\n case GeometryType.POLYGON:\n this.drawPolygon(/** @type {import(\"../../geom/Polygon.js\").default} */ (geometry));\n break;\n case GeometryType.MULTI_POINT:\n this.drawMultiPoint(/** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry));\n break;\n case GeometryType.MULTI_LINE_STRING:\n this.drawMultiLineString(/** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry));\n break;\n case GeometryType.MULTI_POLYGON:\n this.drawMultiPolygon(/** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry));\n break;\n case GeometryType.GEOMETRY_COLLECTION:\n this.drawGeometryCollection(/** @type {import(\"../../geom/GeometryCollection.js\").default} */ (geometry));\n break;\n case GeometryType.CIRCLE:\n this.drawCircle(/** @type {import(\"../../geom/Circle.js\").default} */ (geometry));\n break;\n default:\n }\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} instead.\n *\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @param {import(\"../../style/Style.js\").default} style Style.\n * @override\n * @api\n */\n CanvasImmediateRenderer.prototype.drawFeature = function drawFeature (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 /**\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 * @override\n */\n CanvasImmediateRenderer.prototype.drawGeometryCollection = function drawGeometryCollection (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 /**\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 * @override\n */\n CanvasImmediateRenderer.prototype.drawPoint = function drawPoint (geometry) {\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 /**\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 * @override\n */\n CanvasImmediateRenderer.prototype.drawMultiPoint = function drawMultiPoint (geometry) {\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 /**\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 * @override\n */\n CanvasImmediateRenderer.prototype.drawLineString = function drawLineString (geometry) {\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,\n 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 /**\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 * @override\n */\n CanvasImmediateRenderer.prototype.drawMultiLineString = function drawMultiLineString (geometry) {\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 /**\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 * @override\n */\n CanvasImmediateRenderer.prototype.drawPolygon = function drawPolygon (geometry) {\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(),\n 0, /** @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 /**\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 * @override\n */\n CanvasImmediateRenderer.prototype.drawMultiPolygon = function drawMultiPolygon (geometry) {\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 /**\n * @param {import(\"../canvas.js\").FillState} fillState Fill state.\n * @private\n */\n CanvasImmediateRenderer.prototype.setContextFillState_ = function setContextFillState_ (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 } else {\n if (contextFillState.fillStyle != fillState.fillStyle) {\n contextFillState.fillStyle = context.fillStyle = fillState.fillStyle;\n }\n }\n };\n\n /**\n * @param {import(\"../canvas.js\").StrokeState} strokeState Stroke state.\n * @private\n */\n CanvasImmediateRenderer.prototype.setContextStrokeState_ = function setContextStrokeState_ (strokeState) {\n var context = this.context_;\n var contextStrokeState = this.contextStrokeState_;\n if (!contextStrokeState) {\n context.lineCap = /** @type {CanvasLineCap} */ (strokeState.lineCap);\n if (CANVAS_LINE_DASH) {\n context.setLineDash(strokeState.lineDash);\n context.lineDashOffset = strokeState.lineDashOffset;\n }\n context.lineJoin = /** @type {CanvasLineJoin} */ (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 } else {\n if (contextStrokeState.lineCap != strokeState.lineCap) {\n contextStrokeState.lineCap = context.lineCap = /** @type {CanvasLineCap} */ (strokeState.lineCap);\n }\n if (CANVAS_LINE_DASH) {\n if (!equals(contextStrokeState.lineDash, strokeState.lineDash)) {\n context.setLineDash(contextStrokeState.lineDash = strokeState.lineDash);\n }\n if (contextStrokeState.lineDashOffset != strokeState.lineDashOffset) {\n contextStrokeState.lineDashOffset = context.lineDashOffset =\n strokeState.lineDashOffset;\n }\n }\n if (contextStrokeState.lineJoin != strokeState.lineJoin) {\n contextStrokeState.lineJoin = context.lineJoin = /** @type {CanvasLineJoin} */ (strokeState.lineJoin);\n }\n if (contextStrokeState.lineWidth != strokeState.lineWidth) {\n contextStrokeState.lineWidth = context.lineWidth = strokeState.lineWidth;\n }\n if (contextStrokeState.miterLimit != strokeState.miterLimit) {\n contextStrokeState.miterLimit = context.miterLimit =\n strokeState.miterLimit;\n }\n if (contextStrokeState.strokeStyle != strokeState.strokeStyle) {\n contextStrokeState.strokeStyle = context.strokeStyle =\n strokeState.strokeStyle;\n }\n }\n };\n\n /**\n * @param {import(\"../canvas.js\").TextState} textState Text state.\n * @private\n */\n CanvasImmediateRenderer.prototype.setContextTextState_ = function setContextTextState_ (textState) {\n var context = this.context_;\n var contextTextState = this.contextTextState_;\n var textAlign = textState.textAlign ?\n textState.textAlign : 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 } else {\n if (contextTextState.font != textState.font) {\n contextTextState.font = context.font = textState.font;\n }\n if (contextTextState.textAlign != textAlign) {\n contextTextState.textAlign = context.textAlign = /** @type {CanvasTextAlign} */ (textAlign);\n }\n if (contextTextState.textBaseline != textState.textBaseline) {\n contextTextState.textBaseline = context.textBaseline =\n /** @type {CanvasTextBaseline} */ (textState.textBaseline);\n }\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 * @override\n */\n CanvasImmediateRenderer.prototype.setFillStrokeStyle = function setFillStrokeStyle (fillStyle, strokeStyle) {\n if (!fillStyle) {\n this.fillState_ = null;\n } else {\n var fillStyleColor = fillStyle.getColor();\n this.fillState_ = {\n fillStyle: asColorLike(fillStyleColor ?\n fillStyleColor : defaultFillStyle)\n };\n }\n if (!strokeStyle) {\n this.strokeState_ = null;\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 this.strokeState_ = {\n lineCap: strokeStyleLineCap !== undefined ?\n strokeStyleLineCap : defaultLineCap,\n lineDash: strokeStyleLineDash ?\n strokeStyleLineDash : defaultLineDash,\n lineDashOffset: strokeStyleLineDashOffset ?\n strokeStyleLineDashOffset : defaultLineDashOffset,\n lineJoin: strokeStyleLineJoin !== undefined ?\n strokeStyleLineJoin : defaultLineJoin,\n lineWidth: this.pixelRatio_ * (strokeStyleWidth !== undefined ?\n strokeStyleWidth : defaultLineWidth),\n miterLimit: strokeStyleMiterLimit !== undefined ?\n strokeStyleMiterLimit : defaultMiterLimit,\n strokeStyle: asColorLike(strokeStyleColor ?\n strokeStyleColor : defaultStrokeStyle)\n };\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 * @override\n */\n CanvasImmediateRenderer.prototype.setImageStyle = function setImageStyle (imageStyle) {\n if (!imageStyle) {\n this.image_ = null;\n } else {\n var imageAnchor = imageStyle.getAnchor();\n // FIXME pixel ratio\n var imageImage = imageStyle.getImage(1);\n var imageOrigin = imageStyle.getOrigin();\n var imageSize = imageStyle.getSize();\n this.imageAnchorX_ = imageAnchor[0];\n this.imageAnchorY_ = imageAnchor[1];\n this.imageHeight_ = imageSize[1];\n this.image_ = imageImage;\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.getScale() * this.pixelRatio_;\n this.imageWidth_ = imageSize[0];\n }\n };\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 * @override\n */\n CanvasImmediateRenderer.prototype.setTextStyle = function setTextStyle (textStyle) {\n if (!textStyle) {\n this.text_ = '';\n } else {\n var textFillStyle = textStyle.getFill();\n if (!textFillStyle) {\n this.textFillState_ = null;\n } else {\n var textFillStyleColor = textFillStyle.getColor();\n this.textFillState_ = {\n fillStyle: asColorLike(textFillStyleColor ?\n textFillStyleColor : defaultFillStyle)\n };\n }\n var textStrokeStyle = textStyle.getStroke();\n if (!textStrokeStyle) {\n this.textStrokeState_ = null;\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 : defaultLineCap,\n lineDash: textStrokeStyleLineDash ?\n textStrokeStyleLineDash : defaultLineDash,\n lineDashOffset: textStrokeStyleLineDashOffset ?\n textStrokeStyleLineDashOffset : defaultLineDashOffset,\n lineJoin: textStrokeStyleLineJoin !== undefined ?\n textStrokeStyleLineJoin : defaultLineJoin,\n lineWidth: textStrokeStyleWidth !== undefined ?\n textStrokeStyleWidth : defaultLineWidth,\n miterLimit: textStrokeStyleMiterLimit !== undefined ?\n textStrokeStyleMiterLimit : defaultMiterLimit,\n strokeStyle: asColorLike(textStrokeStyleColor ?\n 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.getScale();\n var textText = textStyle.getText();\n var textTextAlign = textStyle.getTextAlign();\n var textTextBaseline = textStyle.getTextBaseline();\n this.textState_ = {\n font: textFont !== undefined ?\n textFont : defaultFont,\n textAlign: textTextAlign !== undefined ?\n textTextAlign : defaultTextAlign,\n textBaseline: textTextBaseline !== undefined ?\n textTextBaseline : 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_ = textRotateWithView !== undefined ? textRotateWithView : false;\n this.textRotation_ = textRotation !== undefined ? textRotation : 0;\n this.textScale_ = this.pixelRatio_ * (textScale !== undefined ?\n textScale : 1);\n }\n };\n\n return CanvasImmediateRenderer;\n}(VectorContext));\n\n\nexport default CanvasImmediateRenderer;\n\n//# sourceMappingURL=Immediate.js.map","/**\n * @module ol/style/IconImageCache\n */\nimport {asString} from '../color.js';\n\n/**\n * @classdesc\n * Singleton class. Available through {@link module:ol/style/IconImageCache~shared}.\n */\nvar IconImageCache = function IconImageCache() {\n\n /**\n * @type {!Object<string, import(\"./IconImage.js\").default>}\n * @private\n */\n this.cache_ = {};\n\n /**\n * @type {number}\n * @private\n */\n this.cacheSize_ = 0;\n\n /**\n * @type {number}\n * @private\n */\n this.maxCacheSize_ = 32;\n};\n\n/**\n* FIXME empty description for jsdoc\n*/\nIconImageCache.prototype.clear = function clear () {\n this.cache_ = {};\n this.cacheSize_ = 0;\n};\n\n/**\n* FIXME empty description for jsdoc\n*/\nIconImageCache.prototype.expire = function expire () {\n if (this.cacheSize_ > this.maxCacheSize_) {\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/**\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*/\nIconImageCache.prototype.get = function get (src, crossOrigin, color) {\n var key = getKey(src, crossOrigin, color);\n return key in this.cache_ ? this.cache_[key] : null;\n};\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*/\nIconImageCache.prototype.set = function set (src, crossOrigin, color, iconImage) {\n var key = getKey(src, crossOrigin, color);\n this.cache_[key] = iconImage;\n ++this.cacheSize_;\n};\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*/\nIconImageCache.prototype.setSize = function setSize (maxCacheSize) {\n this.maxCacheSize_ = maxCacheSize;\n this.expire();\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 {string} Cache key.\n */\nfunction getKey(src, crossOrigin, color) {\n var colorString = color ? asString(color) : 'null';\n return crossOrigin + ':' + src + ':' + colorString;\n}\n\n\nexport default IconImageCache;\n\n\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\n//# sourceMappingURL=IconImageCache.js.map","/**\n * @module ol/renderer/Map\n */\nimport {abstract, getUid} from '../util.js';\nimport Disposable from '../Disposable.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {getWidth} from '../extent.js';\nimport {TRUE} from '../functions.js';\nimport {visibleAtResolution} from '../layer/Layer.js';\nimport {shared as iconImageCache} from '../style/IconImageCache.js';\nimport {compose as composeTransform, invert as invertTransform, setFromArray as transformSetFromArray} from '../transform.js';\n\n/**\n * @abstract\n */\nvar MapRenderer = /*@__PURE__*/(function (Disposable) {\n function MapRenderer(map) {\n Disposable.call(this);\n\n /**\n * @private\n * @type {import(\"../PluggableMap.js\").default}\n */\n this.map_ = map;\n\n /**\n * @private\n * @type {!Object<string, import(\"./Layer.js\").default>}\n */\n this.layerRenderers_ = {};\n\n /**\n * @private\n * @type {Object<string, import(\"../events.js\").EventsKey>}\n */\n this.layerRendererListeners_ = {};\n\n /**\n * @private\n * @type {Array<typeof import(\"./Layer.js\").default>}\n */\n this.layerRendererConstructors_ = [];\n\n }\n\n if ( Disposable ) MapRenderer.__proto__ = Disposable;\n MapRenderer.prototype = Object.create( Disposable && Disposable.prototype );\n MapRenderer.prototype.constructor = MapRenderer;\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 dispatchRenderEvent (type, frameState) {\n abstract();\n };\n\n /**\n * Register layer renderer constructors.\n * @param {Array<typeof import(\"./Layer.js\").default>} constructors Layer renderers.\n */\n MapRenderer.prototype.registerLayerRenderers = function registerLayerRenderers (constructors) {\n this.layerRendererConstructors_.push.apply(this.layerRendererConstructors_, constructors);\n };\n\n /**\n * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n * @protected\n */\n MapRenderer.prototype.calculateMatrices2D = function calculateMatrices2D (frameState) {\n var viewState = frameState.viewState;\n var coordinateToPixelTransform = frameState.coordinateToPixelTransform;\n var pixelToCoordinateTransform = frameState.pixelToCoordinateTransform;\n\n composeTransform(coordinateToPixelTransform,\n frameState.size[0] / 2, frameState.size[1] / 2,\n 1 / viewState.resolution, -1 / viewState.resolution,\n -viewState.rotation,\n -viewState.center[0], -viewState.center[1]);\n\n invertTransform(\n transformSetFromArray(pixelToCoordinateTransform, coordinateToPixelTransform));\n };\n\n /**\n * Removes all layer renderers.\n */\n MapRenderer.prototype.removeLayerRenderers = function removeLayerRenderers () {\n for (var key in this.layerRenderers_) {\n this.removeLayerRendererByKey_(key).dispose();\n }\n };\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 {function(this: S, import(\"../Feature.js\").FeatureLike,\n * import(\"../layer/Layer.js\").default): 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 forEachFeatureAtCoordinate (\n coordinate,\n frameState,\n hitTolerance,\n callback,\n thisArg,\n layerFilter,\n thisArg2\n ) {\n var result;\n var viewState = frameState.viewState;\n var viewResolution = viewState.resolution;\n\n /**\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../layer/Layer.js\").default} layer Layer.\n * @return {?} Callback result.\n */\n function forEachFeatureAtCoordinate(feature, layer) {\n var managed = frameState.layerStates[getUid(layer)].managed;\n if (!(getUid(feature) in frameState.skippedFeatureUids && !managed)) {\n return callback.call(thisArg, feature, managed ? layer : null);\n }\n }\n\n var projection = viewState.projection;\n\n var translatedCoordinate = coordinate;\n if (projection.canWrapX()) {\n var projectionExtent = projection.getExtent();\n var worldWidth = getWidth(projectionExtent);\n var x = coordinate[0];\n if (x < projectionExtent[0] || x > projectionExtent[2]) {\n var worldsAway = Math.ceil((projectionExtent[0] - x) / worldWidth);\n translatedCoordinate = [x + worldWidth * worldsAway, coordinate[1]];\n }\n }\n\n var layerStates = frameState.layerStatesArray;\n var numLayers = layerStates.length;\n var i;\n for (i = numLayers - 1; i >= 0; --i) {\n var layerState = layerStates[i];\n var layer = layerState.layer;\n if (visibleAtResolution(layerState, viewResolution) && layerFilter.call(thisArg2, layer)) {\n var layerRenderer = this.getLayerRenderer(layer);\n var source = /** @type {import(\"../layer/Layer.js\").default} */ (layer).getSource();\n if (source) {\n result = layerRenderer.forEachFeatureAtCoordinate(\n source.getWrapX() ? translatedCoordinate : coordinate,\n frameState, hitTolerance, forEachFeatureAtCoordinate);\n }\n if (result) {\n return result;\n }\n }\n }\n return undefined;\n };\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(this: S, import(\"../layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer\n * 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.forEachLayerAtPixel = function forEachLayerAtPixel (pixel, frameState, hitTolerance, callback, thisArg, layerFilter, thisArg2) {\n return abstract();\n };\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 {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 hasFeatureAtCoordinate (coordinate, frameState, hitTolerance, layerFilter, thisArg) {\n var hasFeature = this.forEachFeatureAtCoordinate(\n coordinate, frameState, hitTolerance, TRUE, this, layerFilter, thisArg);\n\n return hasFeature !== undefined;\n };\n\n /**\n * @param {import(\"../layer/Base.js\").default} layer Layer.\n * @protected\n * @return {import(\"./Layer.js\").default} Layer renderer.\n */\n MapRenderer.prototype.getLayerRenderer = function getLayerRenderer (layer) {\n var layerKey = getUid(layer);\n if (layerKey in this.layerRenderers_) {\n return this.layerRenderers_[layerKey];\n } else {\n var renderer;\n for (var i = 0, ii = this.layerRendererConstructors_.length; i < ii; ++i) {\n var candidate = this.layerRendererConstructors_[i];\n if (candidate['handles'](layer)) {\n renderer = candidate['create'](this, layer);\n break;\n }\n }\n if (renderer) {\n this.layerRenderers_[layerKey] = renderer;\n this.layerRendererListeners_[layerKey] = listen(renderer,\n EventType.CHANGE, this.handleLayerRendererChange_, this);\n } else {\n throw new Error('Unable to create renderer for layer: ' + layer.getType());\n }\n return renderer;\n }\n };\n\n /**\n * @param {string} layerKey Layer key.\n * @protected\n * @return {import(\"./Layer.js\").default} Layer renderer.\n */\n MapRenderer.prototype.getLayerRendererByKey = function getLayerRendererByKey (layerKey) {\n return this.layerRenderers_[layerKey];\n };\n\n /**\n * @protected\n * @return {Object<string, import(\"./Layer.js\").default>} Layer renderers.\n */\n MapRenderer.prototype.getLayerRenderers = function getLayerRenderers () {\n return this.layerRenderers_;\n };\n\n /**\n * @return {import(\"../PluggableMap.js\").default} Map.\n */\n MapRenderer.prototype.getMap = function getMap () {\n return this.map_;\n };\n\n /**\n * Handle changes in a layer renderer.\n * @private\n */\n MapRenderer.prototype.handleLayerRendererChange_ = function handleLayerRendererChange_ () {\n this.map_.render();\n };\n\n /**\n * @param {string} layerKey Layer key.\n * @return {import(\"./Layer.js\").default} Layer renderer.\n * @private\n */\n MapRenderer.prototype.removeLayerRendererByKey_ = function removeLayerRendererByKey_ (layerKey) {\n var layerRenderer = this.layerRenderers_[layerKey];\n delete this.layerRenderers_[layerKey];\n\n unlistenByKey(this.layerRendererListeners_[layerKey]);\n delete this.layerRendererListeners_[layerKey];\n\n return layerRenderer;\n };\n\n /**\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @private\n */\n MapRenderer.prototype.removeUnusedLayerRenderers_ = function removeUnusedLayerRenderers_ (map, frameState) {\n for (var layerKey in this.layerRenderers_) {\n if (!frameState || !(layerKey in frameState.layerStates)) {\n this.removeLayerRendererByKey_(layerKey).dispose();\n }\n }\n };\n\n /**\n * Render.\n * @abstract\n * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n */\n MapRenderer.prototype.renderFrame = function renderFrame (frameState) {\n abstract();\n };\n\n /**\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @protected\n */\n MapRenderer.prototype.scheduleExpireIconCache = function scheduleExpireIconCache (frameState) {\n frameState.postRenderFunctions.push(/** @type {import(\"../PluggableMap.js\").PostRenderFunction} */ (expireIconCache));\n };\n\n /**\n * @param {!import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @protected\n */\n MapRenderer.prototype.scheduleRemoveUnusedLayerRenderers = function scheduleRemoveUnusedLayerRenderers (frameState) {\n for (var layerKey in this.layerRenderers_) {\n if (!(layerKey in frameState.layerStates)) {\n frameState.postRenderFunctions.push(\n /** @type {import(\"../PluggableMap.js\").PostRenderFunction} */ (this.removeUnusedLayerRenderers_.bind(this))\n );\n return;\n }\n }\n };\n\n return MapRenderer;\n}(Disposable));\n\n\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}\n\n\n/**\n * @param {import(\"../layer/Layer.js\").State} state1 First layer state.\n * @param {import(\"../layer/Layer.js\").State} state2 Second layer state.\n * @return {number} The zIndex difference.\n */\nexport function sortByZIndex(state1, state2) {\n return state1.zIndex - state2.zIndex;\n}\nexport default MapRenderer;\n\n//# sourceMappingURL=Map.js.map","/**\n * @module ol/renderer/canvas/Map\n */\nimport {create as createTransform, apply as applyTransform, compose as composeTransform} from '../../transform.js';\nimport {includes, stableSort} from '../../array.js';\nimport {CLASS_UNSELECTABLE} from '../../css.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {visibleAtResolution} from '../../layer/Layer.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport {rotateAtOffset} from '../../render/canvas.js';\nimport CanvasImmediateRenderer from '../../render/canvas/Immediate.js';\nimport MapRenderer, {sortByZIndex} from '../Map.js';\nimport SourceState from '../../source/State.js';\n\n\n/**\n * @type {Array<typeof import(\"../Layer.js\").default>}\n */\nexport var layerRendererConstructors = [];\n\n/**\n * @classdesc\n * Canvas map renderer.\n * @api\n */\nvar CanvasMapRenderer = /*@__PURE__*/(function (MapRenderer) {\n function CanvasMapRenderer(map) {\n MapRenderer.call(this, map);\n\n var container = map.getViewport();\n\n /**\n * @private\n * @type {CanvasRenderingContext2D}\n */\n this.context_ = createCanvasContext2D();\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.canvas_ = this.context_.canvas;\n\n this.canvas_.style.width = '100%';\n this.canvas_.style.height = '100%';\n this.canvas_.style.display = 'block';\n this.canvas_.className = CLASS_UNSELECTABLE;\n container.insertBefore(this.canvas_, container.childNodes[0] || null);\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderedVisible_ = true;\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.transform_ = createTransform();\n\n }\n\n if ( MapRenderer ) CanvasMapRenderer.__proto__ = MapRenderer;\n CanvasMapRenderer.prototype = Object.create( MapRenderer && MapRenderer.prototype );\n CanvasMapRenderer.prototype.constructor = CanvasMapRenderer;\n\n /**\n * @param {import(\"../../render/EventType.js\").default} type Event type.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n */\n CanvasMapRenderer.prototype.dispatchRenderEvent = function dispatchRenderEvent (type, frameState) {\n var map = this.getMap();\n var context = this.context_;\n if (map.hasListener(type)) {\n var extent = frameState.extent;\n var pixelRatio = frameState.pixelRatio;\n var viewState = frameState.viewState;\n var rotation = viewState.rotation;\n\n var transform = this.getTransform(frameState);\n\n var vectorContext = new CanvasImmediateRenderer(context, pixelRatio,\n extent, transform, rotation);\n var composeEvent = new RenderEvent(type, vectorContext,\n frameState, context, null);\n map.dispatchEvent(composeEvent);\n }\n };\n\n /**\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @protected\n * @return {!import(\"../../transform.js\").Transform} Transform.\n */\n CanvasMapRenderer.prototype.getTransform = function getTransform (frameState) {\n var viewState = frameState.viewState;\n var dx1 = this.canvas_.width / 2;\n var dy1 = this.canvas_.height / 2;\n var sx = frameState.pixelRatio / viewState.resolution;\n var sy = -sx;\n var angle = -viewState.rotation;\n var dx2 = -viewState.center[0];\n var dy2 = -viewState.center[1];\n return composeTransform(this.transform_, dx1, dy1, sx, sy, angle, dx2, dy2);\n };\n\n /**\n * @inheritDoc\n */\n CanvasMapRenderer.prototype.renderFrame = function renderFrame (frameState) {\n\n if (!frameState) {\n if (this.renderedVisible_) {\n this.canvas_.style.display = 'none';\n this.renderedVisible_ = false;\n }\n return;\n }\n\n var context = this.context_;\n var pixelRatio = frameState.pixelRatio;\n var width = Math.round(frameState.size[0] * pixelRatio);\n var height = Math.round(frameState.size[1] * pixelRatio);\n if (this.canvas_.width != width || this.canvas_.height != height) {\n this.canvas_.width = width;\n this.canvas_.height = height;\n } else {\n context.clearRect(0, 0, width, height);\n }\n\n var rotation = frameState.viewState.rotation;\n\n this.calculateMatrices2D(frameState);\n\n this.dispatchRenderEvent(RenderEventType.PRECOMPOSE, frameState);\n\n var layerStatesArray = frameState.layerStatesArray;\n stableSort(layerStatesArray, sortByZIndex);\n\n if (rotation) {\n context.save();\n rotateAtOffset(context, rotation, width / 2, height / 2);\n }\n\n var viewResolution = frameState.viewState.resolution;\n var i, ii;\n for (i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n var layerState = layerStatesArray[i];\n var layer = layerState.layer;\n var layerRenderer = /** @type {import(\"./Layer.js\").default} */ (this.getLayerRenderer(layer));\n if (!visibleAtResolution(layerState, viewResolution) ||\n layerState.sourceState != SourceState.READY) {\n continue;\n }\n if (layerRenderer.prepareFrame(frameState, layerState)) {\n layerRenderer.composeFrame(frameState, layerState, context);\n }\n }\n\n if (rotation) {\n context.restore();\n }\n\n this.dispatchRenderEvent(RenderEventType.POSTCOMPOSE, frameState);\n\n if (!this.renderedVisible_) {\n this.canvas_.style.display = '';\n this.renderedVisible_ = true;\n }\n\n this.scheduleRemoveUnusedLayerRenderers(frameState);\n this.scheduleExpireIconCache(frameState);\n };\n\n /**\n * @inheritDoc\n */\n CanvasMapRenderer.prototype.forEachLayerAtPixel = function forEachLayerAtPixel (pixel, frameState, hitTolerance, callback, thisArg, layerFilter, thisArg2) {\n var result;\n var viewState = frameState.viewState;\n var viewResolution = viewState.resolution;\n\n var layerStates = frameState.layerStatesArray;\n var numLayers = layerStates.length;\n\n var coordinate = applyTransform(\n frameState.pixelToCoordinateTransform, pixel.slice());\n\n var i;\n for (i = numLayers - 1; i >= 0; --i) {\n var layerState = layerStates[i];\n var layer = layerState.layer;\n if (visibleAtResolution(layerState, viewResolution) && layerFilter.call(thisArg2, layer)) {\n var layerRenderer = /** @type {import(\"./Layer.js\").default} */ (this.getLayerRenderer(layer));\n result = layerRenderer.forEachLayerAtCoordinate(\n coordinate, frameState, hitTolerance, callback, thisArg);\n if (result) {\n return result;\n }\n }\n }\n return undefined;\n };\n\n /**\n * @inheritDoc\n */\n CanvasMapRenderer.prototype.registerLayerRenderers = function registerLayerRenderers (constructors) {\n MapRenderer.prototype.registerLayerRenderers.call(this, constructors);\n for (var i = 0, ii = constructors.length; i < ii; ++i) {\n var ctor = constructors[i];\n if (!includes(layerRendererConstructors, ctor)) {\n layerRendererConstructors.push(ctor);\n }\n }\n };\n\n return CanvasMapRenderer;\n}(MapRenderer));\n\n\nexport default CanvasMapRenderer;\n\n//# sourceMappingURL=Map.js.map","/**\n * @module ol/renderer/Layer\n */\nimport {getUid} from '../util.js';\nimport ImageState from '../ImageState.js';\nimport Observable from '../Observable.js';\nimport TileState from '../TileState.js';\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport SourceState from '../source/State.js';\n\nvar LayerRenderer = /*@__PURE__*/(function (Observable) {\n function LayerRenderer(layer) {\n\n Observable.call(this);\n\n /**\n * @private\n * @type {import(\"../layer/Layer.js\").default}\n */\n this.layer_ = layer;\n\n }\n\n if ( Observable ) LayerRenderer.__proto__ = Observable;\n LayerRenderer.prototype = Object.create( Observable && Observable.prototype );\n LayerRenderer.prototype.constructor = LayerRenderer;\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 createLoadedTileFinder (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 */\n function(zoom, tileRange) {\n /**\n * @param {import(\"../Tile.js\").default} tile Tile.\n */\n function callback(tile) {\n if (!tiles[zoom]) {\n tiles[zoom] = {};\n }\n tiles[zoom][tile.tileCoord.toString()] = tile;\n }\n return source.forEachLoadedTile(projection, zoom, tileRange, callback);\n }\n );\n };\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 {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default): T} callback Feature callback.\n * @return {T|void} Callback result.\n * @template T\n */\n LayerRenderer.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (coordinate, frameState, hitTolerance, callback) {};\n\n /**\n * @return {import(\"../layer/Layer.js\").default} Layer.\n */\n LayerRenderer.prototype.getLayer = function getLayer () {\n return this.layer_;\n };\n\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 handleImageChange_ (event) {\n var image = /** @type {import(\"../Image.js\").default} */ (event.target);\n if (image.getState() === ImageState.LOADED) {\n this.renderIfReadyAndVisible();\n }\n };\n\n /**\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n * @return {boolean} Is there a feature at the given coordinate?\n */\n LayerRenderer.prototype.hasFeatureAtCoordinate = function hasFeatureAtCoordinate (coordinate, frameState) {\n return false;\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 loadImage (image) {\n var imageState = image.getState();\n if (imageState != ImageState.LOADED && imageState != ImageState.ERROR) {\n listen(image, EventType.CHANGE, this.handleImageChange_, this);\n }\n if (imageState == ImageState.IDLE) {\n image.load();\n imageState = image.getState();\n }\n return imageState == ImageState.LOADED;\n };\n\n /**\n * @protected\n */\n LayerRenderer.prototype.renderIfReadyAndVisible = function renderIfReadyAndVisible () {\n var layer = this.getLayer();\n if (layer.getVisible() && layer.getSourceState() == SourceState.READY) {\n this.changed();\n }\n };\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 LayerRenderer.prototype.scheduleExpireCache = function scheduleExpireCache (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,\n frameState.usedTiles[tileSourceKey]);\n }\n }.bind(null, tileSource);\n\n frameState.postRenderFunctions.push(\n /** @type {import(\"../PluggableMap.js\").PostRenderFunction} */ (postRenderFunction)\n );\n }\n };\n\n /**\n * @param {!Object<string, !Object<string, import(\"../TileRange.js\").default>>} usedTiles Used tiles.\n * @param {import(\"../source/Tile.js\").default} tileSource Tile source.\n * @param {number} z Z.\n * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n * @protected\n */\n LayerRenderer.prototype.updateUsedTiles = function updateUsedTiles (usedTiles, tileSource, z, tileRange) {\n // FIXME should we use tilesToDrawByZ instead?\n var tileSourceKey = getUid(tileSource);\n var zKey = z.toString();\n if (tileSourceKey in usedTiles) {\n if (zKey in usedTiles[tileSourceKey]) {\n usedTiles[tileSourceKey][zKey].extend(tileRange);\n } else {\n usedTiles[tileSourceKey][zKey] = tileRange;\n }\n } else {\n usedTiles[tileSourceKey] = {};\n usedTiles[tileSourceKey][zKey] = tileRange;\n }\n };\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(this: T, import(\"../Tile.js\").default)=} opt_tileCallback Tile callback.\n * @param {T=} opt_this Object to use as `this` in `opt_tileCallback`.\n * @protected\n * @template T\n */\n LayerRenderer.prototype.manageTilePyramid = function manageTilePyramid (\n frameState,\n tileSource,\n tileGrid,\n pixelRatio,\n projection,\n extent,\n currentZ,\n preload,\n opt_tileCallback,\n opt_this\n ) {\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 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 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([tile, tileSourceKey,\n tileGrid.getTileCoordCenter(tile.tileCoord), tileResolution]);\n }\n }\n if (opt_tileCallback !== undefined) {\n opt_tileCallback.call(opt_this, tile);\n }\n } else {\n tileSource.useTile(z, x, y, projection);\n }\n }\n }\n }\n };\n\n return LayerRenderer;\n}(Observable));\n\nexport default LayerRenderer;\n\n//# sourceMappingURL=Layer.js.map","/**\n * @module ol/renderer/canvas/Layer\n */\nimport {abstract} from '../../util.js';\nimport {getBottomLeft, getBottomRight, getTopLeft, getTopRight} from '../../extent.js';\nimport {TRUE} from '../../functions.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport {rotateAtOffset} from '../../render/canvas.js';\nimport CanvasImmediateRenderer from '../../render/canvas/Immediate.js';\nimport LayerRenderer from '../Layer.js';\nimport {create as createTransform, apply as applyTransform, compose as composeTransform} from '../../transform.js';\n\n/**\n * @abstract\n */\nvar CanvasLayerRenderer = /*@__PURE__*/(function (LayerRenderer) {\n function CanvasLayerRenderer(layer) {\n\n LayerRenderer.call(this, layer);\n\n /**\n * @protected\n * @type {number}\n */\n this.renderedResolution;\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.transform_ = createTransform();\n\n }\n\n if ( LayerRenderer ) CanvasLayerRenderer.__proto__ = LayerRenderer;\n CanvasLayerRenderer.prototype = Object.create( LayerRenderer && LayerRenderer.prototype );\n CanvasLayerRenderer.prototype.constructor = CanvasLayerRenderer;\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.clip = function clip (context, frameState, extent) {\n var pixelRatio = frameState.pixelRatio;\n var width = frameState.size[0] * pixelRatio;\n var height = frameState.size[1] * pixelRatio;\n var rotation = frameState.viewState.rotation;\n var topLeft = getTopLeft(extent);\n var topRight = getTopRight(extent);\n var bottomRight = getBottomRight(extent);\n var bottomLeft = getBottomLeft(extent);\n\n applyTransform(frameState.coordinateToPixelTransform, topLeft);\n applyTransform(frameState.coordinateToPixelTransform, topRight);\n applyTransform(frameState.coordinateToPixelTransform, bottomRight);\n applyTransform(frameState.coordinateToPixelTransform, bottomLeft);\n\n context.save();\n rotateAtOffset(context, -rotation, width / 2, height / 2);\n context.beginPath();\n context.moveTo(topLeft[0] * pixelRatio, topLeft[1] * pixelRatio);\n context.lineTo(topRight[0] * pixelRatio, topRight[1] * pixelRatio);\n context.lineTo(bottomRight[0] * pixelRatio, bottomRight[1] * pixelRatio);\n context.lineTo(bottomLeft[0] * pixelRatio, bottomLeft[1] * pixelRatio);\n context.clip();\n rotateAtOffset(context, rotation, width / 2, height / 2);\n };\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 * @param {import(\"../../transform.js\").Transform=} opt_transform Transform.\n * @private\n */\n CanvasLayerRenderer.prototype.dispatchComposeEvent_ = function dispatchComposeEvent_ (type, context, frameState, opt_transform) {\n var layer = this.getLayer();\n if (layer.hasListener(type)) {\n var width = frameState.size[0] * frameState.pixelRatio;\n var height = frameState.size[1] * frameState.pixelRatio;\n var rotation = frameState.viewState.rotation;\n rotateAtOffset(context, -rotation, width / 2, height / 2);\n var transform = opt_transform !== undefined ?\n opt_transform : this.getTransform(frameState, 0);\n var render = new CanvasImmediateRenderer(\n context, frameState.pixelRatio, frameState.extent, transform,\n frameState.viewState.rotation);\n var composeEvent = new RenderEvent(type, render, frameState,\n context, null);\n layer.dispatchEvent(composeEvent);\n rotateAtOffset(context, rotation, width / 2, height / 2);\n }\n };\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 {function(this: S, import(\"../../layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer\n * callback.\n * @param {S} thisArg Value to use as `this` when executing `callback`.\n * @return {T|undefined} Callback result.\n * @template S,T,U\n */\n CanvasLayerRenderer.prototype.forEachLayerAtCoordinate = function forEachLayerAtCoordinate (coordinate, frameState, hitTolerance, callback, thisArg) {\n var hasFeature = this.forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, TRUE);\n\n if (hasFeature) {\n return callback.call(thisArg, this.getLayer(), null);\n } else {\n return undefined;\n }\n };\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n * @param {import(\"../../transform.js\").Transform=} opt_transform Transform.\n * @protected\n */\n CanvasLayerRenderer.prototype.postCompose = function postCompose (context, frameState, layerState, opt_transform) {\n this.dispatchComposeEvent_(RenderEventType.POSTCOMPOSE, context, frameState, opt_transform);\n };\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../transform.js\").Transform=} opt_transform Transform.\n * @protected\n */\n CanvasLayerRenderer.prototype.preCompose = function preCompose (context, frameState, opt_transform) {\n this.dispatchComposeEvent_(RenderEventType.PRECOMPOSE, context, frameState, opt_transform);\n };\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../transform.js\").Transform=} opt_transform Transform.\n * @protected\n */\n CanvasLayerRenderer.prototype.dispatchRenderEvent = function dispatchRenderEvent (context, frameState, opt_transform) {\n this.dispatchComposeEvent_(RenderEventType.RENDER, context, frameState, opt_transform);\n };\n\n /**\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\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.getTransform = function getTransform (frameState, offsetX) {\n var viewState = frameState.viewState;\n var pixelRatio = frameState.pixelRatio;\n var dx1 = pixelRatio * frameState.size[0] / 2;\n var dy1 = pixelRatio * frameState.size[1] / 2;\n var sx = pixelRatio / viewState.resolution;\n var sy = -sx;\n var angle = -viewState.rotation;\n var dx2 = -viewState.center[0] + offsetX;\n var dy2 = -viewState.center[1];\n return composeTransform(this.transform_, dx1, dy1, sx, sy, angle, dx2, dy2);\n };\n\n /**\n * @abstract\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n * @param {CanvasRenderingContext2D} context Context.\n */\n CanvasLayerRenderer.prototype.composeFrame = function composeFrame (frameState, layerState, context) {\n abstract();\n };\n\n /**\n * @abstract\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n * @return {boolean} whether composeFrame should be called.\n */\n CanvasLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState) {\n return abstract();\n };\n\n return CanvasLayerRenderer;\n}(LayerRenderer));\n\nexport default CanvasLayerRenderer;\n\n//# sourceMappingURL=Layer.js.map","/**\n * @module ol/renderer/canvas/IntermediateCanvas\n */\nimport {abstract} from '../../util.js';\nimport {scale as scaleCoordinate} from '../../coordinate.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {containsExtent, intersects} from '../../extent.js';\nimport CanvasLayerRenderer from './Layer.js';\nimport {create as createTransform, apply as applyTransform} from '../../transform.js';\n\n/**\n * @abstract\n */\nvar IntermediateCanvasRenderer = /*@__PURE__*/(function (CanvasLayerRenderer) {\n function IntermediateCanvasRenderer(layer) {\n\n CanvasLayerRenderer.call(this, layer);\n\n /**\n * @protected\n * @type {import(\"../../transform.js\").Transform}\n */\n this.coordinateToCanvasPixelTransform = createTransform();\n\n /**\n * @private\n * @type {CanvasRenderingContext2D}\n */\n this.hitCanvasContext_ = null;\n\n }\n\n if ( CanvasLayerRenderer ) IntermediateCanvasRenderer.__proto__ = CanvasLayerRenderer;\n IntermediateCanvasRenderer.prototype = Object.create( CanvasLayerRenderer && CanvasLayerRenderer.prototype );\n IntermediateCanvasRenderer.prototype.constructor = IntermediateCanvasRenderer;\n\n /**\n * @inheritDoc\n */\n IntermediateCanvasRenderer.prototype.composeFrame = function composeFrame (frameState, layerState, context) {\n\n this.preCompose(context, frameState);\n\n var image = this.getImage();\n if (image) {\n\n // clipped rendering if layer extent is set\n var extent = layerState.extent;\n var clipped = extent !== undefined &&\n !containsExtent(extent, frameState.extent) &&\n intersects(extent, frameState.extent);\n if (clipped) {\n this.clip(context, frameState, /** @type {import(\"../../extent.js\").Extent} */ (extent));\n }\n\n var imageTransform = this.getImageTransform();\n // for performance reasons, context.save / context.restore is not used\n // to save and restore the transformation matrix and the opacity.\n // see http://jsperf.com/context-save-restore-versus-variable\n var alpha = context.globalAlpha;\n context.globalAlpha = layerState.opacity;\n\n // for performance reasons, context.setTransform is only used\n // when the view is rotated. see http://jsperf.com/canvas-transform\n var dx = imageTransform[4];\n var dy = imageTransform[5];\n var dw = image.width * imageTransform[0];\n var dh = image.height * imageTransform[3];\n if (dw >= 0.5 && dh >= 0.5) {\n context.drawImage(image, 0, 0, +image.width, +image.height,\n Math.round(dx), Math.round(dy), Math.round(dw), Math.round(dh));\n }\n context.globalAlpha = alpha;\n\n if (clipped) {\n context.restore();\n }\n }\n\n this.postCompose(context, frameState, layerState);\n };\n\n /**\n * @abstract\n * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Canvas.\n */\n IntermediateCanvasRenderer.prototype.getImage = function getImage () {\n return abstract();\n };\n\n /**\n * @abstract\n * @return {!import(\"../../transform.js\").Transform} Image transform.\n */\n IntermediateCanvasRenderer.prototype.getImageTransform = function getImageTransform () {\n return abstract();\n };\n\n /**\n * @inheritDoc\n */\n IntermediateCanvasRenderer.prototype.forEachLayerAtCoordinate = function forEachLayerAtCoordinate (coordinate, frameState, hitTolerance, callback, thisArg) {\n if (!this.getImage()) {\n return undefined;\n }\n\n var pixel = applyTransform(this.coordinateToCanvasPixelTransform, coordinate.slice());\n scaleCoordinate(pixel, frameState.viewState.resolution / this.renderedResolution);\n\n if (!this.hitCanvasContext_) {\n this.hitCanvasContext_ = createCanvasContext2D(1, 1);\n }\n\n this.hitCanvasContext_.clearRect(0, 0, 1, 1);\n this.hitCanvasContext_.drawImage(this.getImage(), pixel[0], pixel[1], 1, 1, 0, 0, 1, 1);\n\n var imageData = this.hitCanvasContext_.getImageData(0, 0, 1, 1).data;\n if (imageData[3] > 0) {\n return callback.call(thisArg, this.getLayer(), imageData);\n } else {\n return undefined;\n }\n };\n\n return IntermediateCanvasRenderer;\n}(CanvasLayerRenderer));\n\n\nexport default IntermediateCanvasRenderer;\n\n//# sourceMappingURL=IntermediateCanvas.js.map","/**\n * @module ol/renderer/canvas/ImageLayer\n */\nimport {ENABLE_RASTER_REPROJECTION} from '../../reproj/common.js';\nimport ImageCanvas from '../../ImageCanvas.js';\nimport LayerType from '../../LayerType.js';\nimport ViewHint from '../../ViewHint.js';\nimport {equals} from '../../array.js';\nimport {getHeight, getIntersection, getWidth, isEmpty} from '../../extent.js';\nimport VectorRenderType from '../../layer/VectorRenderType.js';\nimport {assign} from '../../obj.js';\nimport {layerRendererConstructors} from './Map.js';\nimport IntermediateCanvasRenderer from './IntermediateCanvas.js';\nimport {create as createTransform, compose as composeTransform} from '../../transform.js';\n\n/**\n * @classdesc\n * Canvas renderer for image layers.\n * @api\n */\nvar CanvasImageLayerRenderer = /*@__PURE__*/(function (IntermediateCanvasRenderer) {\n function CanvasImageLayerRenderer(imageLayer) {\n\n IntermediateCanvasRenderer.call(this, imageLayer);\n\n /**\n * @private\n * @type {?import(\"../../ImageBase.js\").default}\n */\n this.image_ = null;\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.imageTransform_ = createTransform();\n\n /**\n * @type {!Array<string>}\n */\n this.skippedFeatures_ = [];\n\n /**\n * @private\n * @type {import(\"./VectorLayer.js\").default}\n */\n this.vectorRenderer_ = null;\n\n if (imageLayer.getType() === LayerType.VECTOR) {\n for (var i = 0, ii = layerRendererConstructors.length; i < ii; ++i) {\n var ctor = layerRendererConstructors[i];\n if (ctor !== CanvasImageLayerRenderer && ctor['handles'](imageLayer)) {\n this.vectorRenderer_ = /** @type {import(\"./VectorLayer.js\").default} */ (new ctor(imageLayer));\n break;\n }\n }\n }\n\n }\n\n if ( IntermediateCanvasRenderer ) CanvasImageLayerRenderer.__proto__ = IntermediateCanvasRenderer;\n CanvasImageLayerRenderer.prototype = Object.create( IntermediateCanvasRenderer && IntermediateCanvasRenderer.prototype );\n CanvasImageLayerRenderer.prototype.constructor = CanvasImageLayerRenderer;\n\n /**\n * @inheritDoc\n */\n CanvasImageLayerRenderer.prototype.disposeInternal = function disposeInternal () {\n if (this.vectorRenderer_) {\n this.vectorRenderer_.dispose();\n }\n IntermediateCanvasRenderer.prototype.disposeInternal.call(this);\n };\n\n /**\n * @inheritDoc\n */\n CanvasImageLayerRenderer.prototype.getImage = function getImage () {\n return !this.image_ ? null : this.image_.getImage();\n };\n\n /**\n * @inheritDoc\n */\n CanvasImageLayerRenderer.prototype.getImageTransform = function getImageTransform () {\n return this.imageTransform_;\n };\n\n /**\n * @inheritDoc\n */\n CanvasImageLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState) {\n\n var pixelRatio = frameState.pixelRatio;\n var size = frameState.size;\n var viewState = frameState.viewState;\n var viewCenter = viewState.center;\n var viewResolution = viewState.resolution;\n\n var image;\n var imageLayer = /** @type {import(\"../../layer/Image.js\").default} */ (this.getLayer());\n var imageSource = /** @type {import(\"../../source/Image.js\").default} */ (imageLayer.getSource());\n\n var hints = frameState.viewHints;\n\n var vectorRenderer = this.vectorRenderer_;\n var renderedExtent = frameState.extent;\n if (!vectorRenderer && layerState.extent !== undefined) {\n renderedExtent = getIntersection(renderedExtent, layerState.extent);\n }\n\n if (!hints[ViewHint.ANIMATING] && !hints[ViewHint.INTERACTING] &&\n !isEmpty(renderedExtent)) {\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 skippedFeatures = this.skippedFeatures_;\n if (vectorRenderer) {\n var context = vectorRenderer.context;\n var imageFrameState = /** @type {import(\"../../PluggableMap.js\").FrameState} */ (assign({}, frameState, {\n size: [\n getWidth(renderedExtent) / viewResolution,\n getHeight(renderedExtent) / viewResolution\n ],\n viewState: /** @type {import(\"../../View.js\").State} */ (assign({}, frameState.viewState, {\n rotation: 0\n }))\n }));\n var newSkippedFeatures = Object.keys(imageFrameState.skippedFeatureUids).sort();\n image = new ImageCanvas(renderedExtent, viewResolution, pixelRatio, context.canvas, function(callback) {\n if (vectorRenderer.prepareFrame(imageFrameState, layerState) &&\n (vectorRenderer.replayGroupChanged ||\n !equals(skippedFeatures, newSkippedFeatures))) {\n context.canvas.width = imageFrameState.size[0] * pixelRatio;\n context.canvas.height = imageFrameState.size[1] * pixelRatio;\n vectorRenderer.compose(context, imageFrameState, layerState);\n skippedFeatures = newSkippedFeatures;\n callback();\n }\n });\n } else {\n image = imageSource.getImage(\n renderedExtent, viewResolution, pixelRatio, projection);\n }\n if (image && this.loadImage(image)) {\n this.image_ = image;\n this.skippedFeatures_ = skippedFeatures;\n }\n }\n\n if (this.image_) {\n image = this.image_;\n var imageExtent = image.getExtent();\n var imageResolution = image.getResolution();\n var imagePixelRatio = image.getPixelRatio();\n var scale = pixelRatio * imageResolution /\n (viewResolution * imagePixelRatio);\n var transform = composeTransform(this.imageTransform_,\n pixelRatio * size[0] / 2, pixelRatio * size[1] / 2,\n scale, scale,\n 0,\n imagePixelRatio * (imageExtent[0] - viewCenter[0]) / imageResolution,\n imagePixelRatio * (viewCenter[1] - imageExtent[3]) / imageResolution);\n composeTransform(this.coordinateToCanvasPixelTransform,\n pixelRatio * size[0] / 2 - transform[4], pixelRatio * size[1] / 2 - transform[5],\n pixelRatio / viewResolution, -pixelRatio / viewResolution,\n 0,\n -viewCenter[0], -viewCenter[1]);\n\n this.renderedResolution = imageResolution * pixelRatio / imagePixelRatio;\n }\n\n return !!this.image_;\n };\n\n /**\n * @inheritDoc\n */\n CanvasImageLayerRenderer.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (coordinate, frameState, hitTolerance, callback) {\n if (this.vectorRenderer_) {\n return this.vectorRenderer_.forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, callback);\n } else {\n return IntermediateCanvasRenderer.prototype.forEachFeatureAtCoordinate.call(this, coordinate, frameState, hitTolerance, callback);\n }\n };\n\n return CanvasImageLayerRenderer;\n}(IntermediateCanvasRenderer));\n\n\n/**\n * Determine if this renderer handles the provided layer.\n * @param {import(\"../../layer/Layer.js\").default} layer The candidate layer.\n * @return {boolean} The renderer can render the layer.\n */\nCanvasImageLayerRenderer['handles'] = function(layer) {\n return layer.getType() === LayerType.IMAGE ||\n layer.getType() === LayerType.VECTOR &&\n /** @type {import(\"../../layer/Vector.js\").default} */ (layer).getRenderMode() === VectorRenderType.IMAGE;\n};\n\n\n/**\n * Create a layer renderer.\n * @param {import(\"../Map.js\").default} mapRenderer The map renderer.\n * @param {import(\"../../layer/Layer.js\").default} layer The layer to be rendererd.\n * @return {CanvasImageLayerRenderer} The layer renderer.\n */\nCanvasImageLayerRenderer['create'] = function(mapRenderer, layer) {\n return new CanvasImageLayerRenderer(/** @type {import(\"../../layer/Image.js\").default} */ (layer));\n};\n\n\nexport default CanvasImageLayerRenderer;\n\n//# sourceMappingURL=ImageLayer.js.map","/**\n * @module ol/TileRange\n */\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 = function TileRange(minX, maxX, minY, maxY) {\n\n /**\n * @type {number}\n */\n this.minX = minX;\n\n /**\n * @type {number}\n */\n this.maxX = maxX;\n\n /**\n * @type {number}\n */\n this.minY = minY;\n\n /**\n * @type {number}\n */\n this.maxY = maxY;\n\n};\n\n/**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @return {boolean} Contains tile coordinate.\n */\nTileRange.prototype.contains = function contains (tileCoord) {\n return this.containsXY(tileCoord[1], tileCoord[2]);\n};\n\n/**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Contains.\n */\nTileRange.prototype.containsTileRange = function containsTileRange (tileRange) {\n return this.minX <= tileRange.minX && tileRange.maxX <= this.maxX &&\n this.minY <= tileRange.minY && tileRange.maxY <= this.maxY;\n};\n\n/**\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @return {boolean} Contains coordinate.\n */\nTileRange.prototype.containsXY = function containsXY (x, y) {\n return this.minX <= x && x <= this.maxX && this.minY <= y && y <= this.maxY;\n};\n\n/**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Equals.\n */\nTileRange.prototype.equals = function equals (tileRange) {\n return this.minX == tileRange.minX && this.minY == tileRange.minY &&\n this.maxX == tileRange.maxX && this.maxY == tileRange.maxY;\n};\n\n/**\n * @param {TileRange} tileRange Tile range.\n */\nTileRange.prototype.extend = function extend (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/**\n * @return {number} Height.\n */\nTileRange.prototype.getHeight = function getHeight () {\n return this.maxY - this.minY + 1;\n};\n\n/**\n * @return {import(\"./size.js\").Size} Size.\n */\nTileRange.prototype.getSize = function getSize () {\n return [this.getWidth(), this.getHeight()];\n};\n\n/**\n * @return {number} Width.\n */\nTileRange.prototype.getWidth = function getWidth () {\n return this.maxX - this.minX + 1;\n};\n\n/**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Intersects.\n */\nTileRange.prototype.intersects = function intersects (tileRange) {\n return this.minX <= tileRange.maxX &&\n this.maxX >= tileRange.minX &&\n this.minY <= tileRange.maxY &&\n this.maxY >= tileRange.minY;\n};\n\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 } else {\n return new TileRange(minX, maxX, minY, maxY);\n }\n}\n\n\nexport default TileRange;\n\n//# sourceMappingURL=TileRange.js.map","/**\n * @module ol/renderer/canvas/TileLayer\n */\nimport {getUid} from '../../util.js';\nimport LayerType from '../../LayerType.js';\nimport TileRange from '../../TileRange.js';\nimport TileState from '../../TileState.js';\nimport ViewHint from '../../ViewHint.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {containsExtent, createEmpty, equals, getIntersection, isEmpty} from '../../extent.js';\nimport IntermediateCanvasRenderer from './IntermediateCanvas.js';\nimport {create as createTransform, compose as composeTransform} from '../../transform.js';\n\n/**\n * @classdesc\n * Canvas renderer for tile layers.\n * @api\n */\nvar CanvasTileLayerRenderer = /*@__PURE__*/(function (IntermediateCanvasRenderer) {\n function CanvasTileLayerRenderer(tileLayer, opt_noContext) {\n\n IntermediateCanvasRenderer.call(this, tileLayer);\n\n /**\n * @protected\n * @type {CanvasRenderingContext2D}\n */\n this.context = opt_noContext ? null : createCanvasContext2D();\n\n /**\n * @private\n * @type {number}\n */\n this.oversampling_;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.renderedExtent_ = null;\n\n /**\n * @protected\n * @type {number}\n */\n this.renderedRevision;\n\n /**\n * @protected\n * @type {!Array<import(\"../../Tile.js\").default>}\n */\n this.renderedTiles = [];\n\n /**\n * @private\n * @type {boolean}\n */\n this.newTiles_ = false;\n\n /**\n * @protected\n * @type {import(\"../../extent.js\").Extent}\n */\n this.tmpExtent = createEmpty();\n\n /**\n * @private\n * @type {import(\"../../TileRange.js\").default}\n */\n this.tmpTileRange_ = new TileRange(0, 0, 0, 0);\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.imageTransform_ = createTransform();\n\n /**\n * @protected\n * @type {number}\n */\n this.zDirection = 0;\n\n }\n\n if ( IntermediateCanvasRenderer ) CanvasTileLayerRenderer.__proto__ = IntermediateCanvasRenderer;\n CanvasTileLayerRenderer.prototype = Object.create( IntermediateCanvasRenderer && IntermediateCanvasRenderer.prototype );\n CanvasTileLayerRenderer.prototype.constructor = CanvasTileLayerRenderer;\n\n /**\n * @private\n * @param {import(\"../../Tile.js\").default} tile Tile.\n * @return {boolean} Tile is drawable.\n */\n CanvasTileLayerRenderer.prototype.isDrawableTile_ = function isDrawableTile_ (tile) {\n var tileLayer = /** @type {import(\"../../layer/Tile.js\").default} */ (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 /**\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 CanvasTileLayerRenderer.prototype.getTile = function getTile (z, x, y, pixelRatio, projection) {\n var tileLayer = /** @type {import(\"../../layer/Tile.js\").default} */ (this.getLayer());\n var tileSource = /** @type {import(\"../../source/Tile.js\").default} */ (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 } 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 /**\n * @inheritDoc\n */\n CanvasTileLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState) {\n\n var pixelRatio = frameState.pixelRatio;\n var size = frameState.size;\n var viewState = frameState.viewState;\n var projection = viewState.projection;\n var viewResolution = viewState.resolution;\n var viewCenter = viewState.center;\n\n var tileLayer = /** @type {import(\"../../layer/Tile.js\").default} */ (this.getLayer());\n var tileSource = /** @type {import(\"../../source/Tile.js\").default} */ (tileLayer.getSource());\n var sourceRevision = tileSource.getRevision();\n var tileGrid = tileSource.getTileGridForProjection(projection);\n var z = tileGrid.getZForResolution(viewResolution, this.zDirection);\n var tileResolution = tileGrid.getResolution(z);\n var oversampling = Math.round(viewResolution / tileResolution) || 1;\n var extent = frameState.extent;\n\n if (layerState.extent !== undefined) {\n extent = getIntersection(extent, layerState.extent);\n }\n if (isEmpty(extent)) {\n // Return false to prevent the rendering of the layer.\n return false;\n }\n\n var tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n var imageExtent = tileGrid.getTileRangeExtent(z, tileRange);\n\n var tilePixelRatio = tileSource.getTilePixelRatio(pixelRatio);\n\n /**\n * @type {Object<number, Object<string, import(\"../../Tile.js\").default>>}\n */\n var tilesToDrawByZ = {};\n tilesToDrawByZ[z] = {};\n\n var findLoadedTiles = this.createLoadedTileFinder(\n tileSource, projection, tilesToDrawByZ);\n\n var hints = frameState.viewHints;\n var animatingOrInteracting = hints[ViewHint.ANIMATING] || hints[ViewHint.INTERACTING];\n\n var tmpExtent = this.tmpExtent;\n var tmpTileRange = this.tmpTileRange_;\n this.newTiles_ = false;\n var tile, x, y;\n for (x = tileRange.minX; x <= tileRange.maxX; ++x) {\n for (y = tileRange.minY; y <= tileRange.maxY; ++y) {\n if (Date.now() - frameState.time > 16 && animatingOrInteracting) {\n continue;\n }\n tile = this.getTile(z, x, y, pixelRatio, projection);\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_ && (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\n var childTileRange = tileGrid.getTileCoordChildTileRange(\n tile.tileCoord, tmpTileRange, tmpExtent);\n var covered = false;\n if (childTileRange) {\n covered = findLoadedTiles(z + 1, childTileRange);\n }\n if (!covered) {\n tileGrid.forEachTileCoordParentTileRange(\n tile.tileCoord, findLoadedTiles, null, tmpTileRange, tmpExtent);\n }\n\n }\n }\n\n var renderedResolution = tileResolution * pixelRatio / tilePixelRatio * oversampling;\n if (!(this.renderedResolution && Date.now() - frameState.time > 16 && animatingOrInteracting) && (\n this.newTiles_ ||\n !(this.renderedExtent_ && containsExtent(this.renderedExtent_, extent)) ||\n this.renderedRevision != sourceRevision ||\n oversampling != this.oversampling_ ||\n !animatingOrInteracting && renderedResolution != this.renderedResolution\n )) {\n\n var context = this.context;\n if (context) {\n var tilePixelSize = tileSource.getTilePixelSize(z, pixelRatio, projection);\n var width = Math.round(tileRange.getWidth() * tilePixelSize[0] / oversampling);\n var height = Math.round(tileRange.getHeight() * tilePixelSize[1] / oversampling);\n var canvas = context.canvas;\n if (canvas.width != width || canvas.height != height) {\n this.oversampling_ = oversampling;\n canvas.width = width;\n canvas.height = height;\n } else {\n if ((this.renderedExtent_ && !equals(imageExtent, this.renderedExtent_)) ||\n this.renderedRevision != sourceRevision) {\n context.clearRect(0, 0, width, height);\n }\n oversampling = this.oversampling_;\n }\n }\n\n this.renderedTiles.length = 0;\n /** @type {Array<number>} */\n var zs = Object.keys(tilesToDrawByZ).map(Number);\n zs.sort(function(a, b) {\n if (a === z) {\n return 1;\n } else if (b === z) {\n return -1;\n } else {\n return a > b ? 1 : a < b ? -1 : 0;\n }\n });\n var currentResolution, currentScale, currentTilePixelSize, currentZ, i, ii;\n var tileExtent, tileGutter, tilesToDraw, w, h;\n for (i = 0, ii = zs.length; i < ii; ++i) {\n currentZ = zs[i];\n currentTilePixelSize = tileSource.getTilePixelSize(currentZ, pixelRatio, projection);\n currentResolution = tileGrid.getResolution(currentZ);\n currentScale = currentResolution / tileResolution;\n tileGutter = tilePixelRatio * tileSource.getGutterForProjection(projection);\n tilesToDraw = tilesToDrawByZ[currentZ];\n for (var tileCoordKey in tilesToDraw) {\n tile = tilesToDraw[tileCoordKey];\n tileExtent = tileGrid.getTileCoordExtent(tile.getTileCoord(), tmpExtent);\n x = (tileExtent[0] - imageExtent[0]) / tileResolution * tilePixelRatio / oversampling;\n y = (imageExtent[3] - tileExtent[3]) / tileResolution * tilePixelRatio / oversampling;\n w = currentTilePixelSize[0] * currentScale / oversampling;\n h = currentTilePixelSize[1] * currentScale / oversampling;\n this.drawTileImage(tile, frameState, layerState, x, y, w, h, tileGutter, z === currentZ);\n this.renderedTiles.push(tile);\n }\n }\n\n this.renderedRevision = sourceRevision;\n this.renderedResolution = tileResolution * pixelRatio / tilePixelRatio * oversampling;\n this.renderedExtent_ = imageExtent;\n }\n\n var scale = this.renderedResolution / viewResolution;\n var transform = composeTransform(this.imageTransform_,\n pixelRatio * size[0] / 2, pixelRatio * size[1] / 2,\n scale, scale,\n 0,\n (this.renderedExtent_[0] - viewCenter[0]) / this.renderedResolution * pixelRatio,\n (viewCenter[1] - this.renderedExtent_[3]) / this.renderedResolution * pixelRatio);\n composeTransform(this.coordinateToCanvasPixelTransform,\n pixelRatio * size[0] / 2 - transform[4], pixelRatio * size[1] / 2 - transform[5],\n pixelRatio / viewResolution, -pixelRatio / viewResolution,\n 0,\n -viewCenter[0], -viewCenter[1]);\n\n\n this.updateUsedTiles(frameState.usedTiles, tileSource, z, tileRange);\n this.manageTilePyramid(frameState, tileSource, tileGrid, pixelRatio,\n projection, extent, z, tileLayer.getPreload());\n this.scheduleExpireCache(frameState, tileSource);\n\n return this.renderedTiles.length > 0;\n };\n\n /**\n * @param {import(\"../../Tile.js\").default} tile Tile.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../layer/Layer.js\").State} layerState Layer 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 */\n CanvasTileLayerRenderer.prototype.drawTileImage = function drawTileImage (tile, frameState, layerState, x, y, w, h, gutter, transition) {\n var image = this.getTileImage(tile);\n if (!image) {\n return;\n }\n var uid = getUid(this);\n var alpha = transition ? tile.getAlpha(uid, frameState.time) : 1;\n var tileLayer = /** @type {import(\"../../layer/Tile.js\").default} */ (this.getLayer());\n var tileSource = /** @type {import(\"../../source/Tile.js\").default} */ (tileLayer.getSource());\n if (alpha === 1 && !tileSource.getOpaque(frameState.viewState.projection)) {\n this.context.clearRect(x, y, w, h);\n }\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,\n image.width - 2 * gutter, image.height - 2 * gutter, x, y, w, h);\n\n if (alphaChanged) {\n this.context.restore();\n }\n if (alpha !== 1) {\n frameState.animate = true;\n } else if (transition) {\n tile.endTransition(uid);\n }\n };\n\n /**\n * @inheritDoc\n */\n CanvasTileLayerRenderer.prototype.getImage = function getImage () {\n var context = this.context;\n return context ? context.canvas : null;\n };\n\n /**\n * @inheritDoc\n */\n CanvasTileLayerRenderer.prototype.getImageTransform = function getImageTransform () {\n return this.imageTransform_;\n };\n\n /**\n * Get the image from a tile.\n * @param {import(\"../../Tile.js\").default} tile Tile.\n * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n * @protected\n */\n CanvasTileLayerRenderer.prototype.getTileImage = function getTileImage (tile) {\n return /** @type {import(\"../../ImageTile.js\").default} */ (tile).getImage();\n };\n\n return CanvasTileLayerRenderer;\n}(IntermediateCanvasRenderer));\n\n\n/**\n * Determine if this renderer handles the provided layer.\n * @param {import(\"../../layer/Layer.js\").default} layer The candidate layer.\n * @return {boolean} The renderer can render the layer.\n */\nCanvasTileLayerRenderer['handles'] = function(layer) {\n return layer.getType() === LayerType.TILE;\n};\n\n\n/**\n * Create a layer renderer.\n * @param {import(\"../Map.js\").default} mapRenderer The map renderer.\n * @param {import(\"../../layer/Layer.js\").default} layer The layer to be rendererd.\n * @return {CanvasTileLayerRenderer} The layer renderer.\n */\nCanvasTileLayerRenderer['create'] = function(mapRenderer, layer) {\n return new CanvasTileLayerRenderer(/** @type {import(\"../../layer/Tile.js\").default} */ (layer));\n};\n\n\n/**\n * @function\n * @return {import(\"../../layer/Tile.js\").default|import(\"../../layer/VectorTile.js\").default}\n */\nCanvasTileLayerRenderer.prototype.getLayer;\n\n\nexport default CanvasTileLayerRenderer;\n\n//# sourceMappingURL=TileLayer.js.map","/**\n * @module ol/render/ReplayGroup\n */\nimport {abstract} from '../util.js';\n\n/**\n * Base class for replay groups.\n */\nvar ReplayGroup = function ReplayGroup () {};\n\nReplayGroup.prototype.getReplay = function getReplay (zIndex, replayType) {\n return abstract();\n};\n\n/**\n * @abstract\n * @return {boolean} Is empty.\n */\nReplayGroup.prototype.isEmpty = function isEmpty () {\n return abstract();\n};\n\n/**\n * @abstract\n * @param {boolean} group Group with previous replay\n * @return {Array<*>} The resulting instruction group\n */\nReplayGroup.prototype.addDeclutter = function addDeclutter (group) {\n return abstract();\n};\n\nexport default ReplayGroup;\n\n//# sourceMappingURL=ReplayGroup.js.map","/**\n * @module ol/render/ReplayType\n */\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\n//# sourceMappingURL=ReplayType.js.map","/**\n * @module ol/geom/flat/length\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 * @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\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\n//# sourceMappingURL=length.js.map","/**\n * @module ol/geom/flat/textpath\n */\nimport {lerp} from '../../math.js';\n\n\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 {function(string):number} measure Measure function returning the\n * width of the character passed as 1st argument.\n * @param {number} startM m along the path where the text starts.\n * @param {number} maxAngle Max angle between adjacent chars in radians.\n * @return {Array<Array<*>>} The result array of null if `maxAngle` was\n * exceeded. Entries of the array are x, y, anchorX, angle, chunk.\n */\nexport function drawTextOnPath(\n flatCoordinates, offset, end, stride, text, measure, startM, maxAngle) {\n var result = [];\n\n // Keep text upright\n var reverse = flatCoordinates[offset] > flatCoordinates[end - stride];\n\n var numChars = text.length;\n\n var x1 = flatCoordinates[offset];\n var y1 = flatCoordinates[offset + 1];\n offset += stride;\n var x2 = flatCoordinates[offset];\n var y2 = flatCoordinates[offset + 1];\n var segmentM = 0;\n var segmentLength = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n\n var chunk = '';\n var chunkLength = 0;\n var data, index, previousAngle;\n for (var i = 0; i < numChars; ++i) {\n index = reverse ? numChars - i - 1 : i;\n var char = text.charAt(index);\n chunk = reverse ? char + chunk : chunk + char;\n var charLength = measure(chunk) - chunkLength;\n chunkLength += charLength;\n var charM = startM + charLength / 2;\n while (offset < end - stride && segmentM + segmentLength < charM) {\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(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n }\n var segmentPos = charM - segmentM;\n var angle = Math.atan2(y2 - y1, x2 - x1);\n if (reverse) {\n angle += angle > 0 ? -Math.PI : Math.PI;\n }\n if (previousAngle !== undefined) {\n var delta = angle - previousAngle;\n delta += (delta > Math.PI) ? -2 * Math.PI : (delta < -Math.PI) ? 2 * Math.PI : 0;\n if (Math.abs(delta) > maxAngle) {\n return null;\n }\n }\n var interpolate = segmentPos / segmentLength;\n var x = lerp(x1, x2, interpolate);\n var y = lerp(y1, y2, interpolate);\n if (previousAngle == angle) {\n if (reverse) {\n data[0] = x;\n data[1] = y;\n data[2] = charLength / 2;\n }\n data[4] = chunk;\n } else {\n chunk = char;\n chunkLength = charLength;\n data = [x, y, charLength / 2, angle, chunk];\n if (reverse) {\n result.unshift(data);\n } else {\n result.push(data);\n }\n previousAngle = angle;\n }\n startM += charLength;\n }\n return result;\n}\n\n//# sourceMappingURL=textpath.js.map","/**\n * @module ol/render/canvas/Instruction\n */\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\n/**\n * @type {Array<Instruction>}\n */\nexport var fillInstruction = [Instruction.FILL];\n\n\n/**\n * @type {Array<Instruction>}\n */\nexport var strokeInstruction = [Instruction.STROKE];\n\n\n/**\n * @type {Array<Instruction>}\n */\nexport var beginPathInstruction = [Instruction.BEGIN_PATH];\n\n\n/**\n * @type {Array<Instruction>}\n */\nexport var closePathInstruction = [Instruction.CLOSE_PATH];\n\n\nexport default Instruction;\n\n//# sourceMappingURL=Instruction.js.map","/**\n * @module ol/render/replay\n */\nimport ReplayType from './ReplayType.js';\n\n\n/**\n * @const\n * @type {Array<ReplayType>}\n */\nexport var ORDER = [\n ReplayType.POLYGON,\n ReplayType.CIRCLE,\n ReplayType.LINE_STRING,\n ReplayType.IMAGE,\n ReplayType.TEXT,\n ReplayType.DEFAULT\n];\n\n/**\n * @const\n * @enum {number}\n */\nexport var TEXT_ALIGN = {};\nTEXT_ALIGN['left'] = 0;\nTEXT_ALIGN['end'] = 0;\nTEXT_ALIGN['center'] = 0.5;\nTEXT_ALIGN['right'] = 1;\nTEXT_ALIGN['start'] = 1;\nTEXT_ALIGN['top'] = 0;\nTEXT_ALIGN['middle'] = 0.5;\nTEXT_ALIGN['hanging'] = 0.2;\nTEXT_ALIGN['alphabetic'] = 0.8;\nTEXT_ALIGN['ideographic'] = 0.8;\nTEXT_ALIGN['bottom'] = 1;\n\n//# sourceMappingURL=replay.js.map","/**\n * @module ol/render/canvas/Replay\n */\nimport {getUid} from '../../util.js';\nimport {equals, reverseSubArray} from '../../array.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {buffer, clone, coordinateRelationship, createEmpty, createOrUpdate,\n createOrUpdateEmpty, extend, extendCoordinate, intersects} from '../../extent.js';\nimport Relationship from '../../extent/Relationship.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport {inflateCoordinates, inflateCoordinatesArray, inflateMultiCoordinatesArray} from '../../geom/flat/inflate.js';\nimport {lineStringLength} from '../../geom/flat/length.js';\nimport {drawTextOnPath} from '../../geom/flat/textpath.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {CANVAS_LINE_DASH} from '../../has.js';\nimport {isEmpty} from '../../obj.js';\nimport VectorContext from '../VectorContext.js';\nimport {drawImage, resetTransform, defaultPadding, defaultFillStyle, defaultStrokeStyle,\n defaultMiterLimit, defaultLineWidth, defaultLineJoin, defaultLineDashOffset,\n defaultLineDash, defaultLineCap} from '../canvas.js';\nimport CanvasInstruction from './Instruction.js';\nimport {TEXT_ALIGN} from '../replay.js';\nimport {\n create as createTransform,\n compose as composeTransform,\n apply as applyTransform,\n setFromArray as transformSetFromArray\n} from '../../transform.js';\n\n\n/**\n * @type {import(\"../../extent.js\").Extent}\n */\nvar tmpExtent = createEmpty();\n\n\n/**\n * @type {!import(\"../../transform.js\").Transform}\n */\nvar tmpTransform = createTransform();\n\n\nvar CanvasReplay = /*@__PURE__*/(function (VectorContext) {\n function CanvasReplay(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {\n VectorContext.call(this);\n\n /**\n * @type {?}\n */\n this.declutterTree = declutterTree;\n\n /**\n * @protected\n * @type {number}\n */\n this.tolerance = tolerance;\n\n /**\n * @protected\n * @const\n * @type {import(\"../../extent.js\").Extent}\n */\n this.maxExtent = maxExtent;\n\n /**\n * @protected\n * @type {boolean}\n */\n this.overlaps = overlaps;\n\n /**\n * @protected\n * @type {number}\n */\n this.pixelRatio = pixelRatio;\n\n /**\n * @protected\n * @type {number}\n */\n this.maxLineWidth = 0;\n\n /**\n * @protected\n * @const\n * @type {number}\n */\n this.resolution = resolution;\n\n /**\n * @private\n * @type {boolean}\n */\n this.alignFill_;\n\n /**\n * @private\n * @type {Array<*>}\n */\n this.beginGeometryInstruction1_ = null;\n\n /**\n * @private\n * @type {Array<*>}\n */\n this.beginGeometryInstruction2_ = null;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.bufferedMaxExtent_ = null;\n\n /**\n * @protected\n * @type {Array<*>}\n */\n this.instructions = [];\n\n /**\n * @protected\n * @type {Array<number>}\n */\n this.coordinates = [];\n\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 /**\n * @private\n * @type {!import(\"../../transform.js\").Transform}\n */\n this.renderedTransform_ = createTransform();\n\n /**\n * @protected\n * @type {Array<*>}\n */\n this.hitDetectionInstructions = [];\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.pixelCoordinates_ = null;\n\n /**\n * @protected\n * @type {import(\"../canvas.js\").FillStrokeState}\n */\n this.state = /** @type {import(\"../canvas.js\").FillStrokeState} */ ({});\n\n /**\n * @private\n * @type {number}\n */\n this.viewRotation_ = 0;\n\n }\n\n if ( VectorContext ) CanvasReplay.__proto__ = VectorContext;\n CanvasReplay.prototype = Object.create( VectorContext && VectorContext.prototype );\n CanvasReplay.prototype.constructor = CanvasReplay;\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 CanvasReplay.prototype.replayTextBackground_ = function replayTextBackground_ (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, /** @type {Array<*>} */ (strokeInstruction));\n context.stroke();\n }\n };\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} image Image.\n * @param {number} anchorX Anchor X.\n * @param {number} anchorY Anchor Y.\n * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroup Declutter group.\n * @param {number} height Height.\n * @param {number} opacity Opacity.\n * @param {number} originX Origin X.\n * @param {number} originY Origin Y.\n * @param {number} rotation Rotation.\n * @param {number} scale Scale.\n * @param {boolean} snapToPixel Snap to pixel.\n * @param {number} width Width.\n * @param {Array<number>} padding Padding.\n * @param {Array<*>} fillInstruction Fill instruction.\n * @param {Array<*>} strokeInstruction Stroke instruction.\n */\n CanvasReplay.prototype.replayImage_ = function replayImage_ (\n context,\n x,\n y,\n image,\n anchorX,\n anchorY,\n declutterGroup,\n height,\n opacity,\n originX,\n originY,\n rotation,\n scale,\n snapToPixel,\n width,\n padding,\n fillInstruction,\n strokeInstruction\n ) {\n var fillStroke = fillInstruction || strokeInstruction;\n anchorX *= scale;\n anchorY *= scale;\n x -= anchorX;\n y -= anchorY;\n\n var w = (width + originX > image.width) ? image.width - originX : width;\n var h = (height + originY > image.height) ? image.height - originY : height;\n var boxW = padding[3] + w * scale + padding[1];\n var boxH = padding[0] + h * scale + padding[2];\n var boxX = x - padding[3];\n var boxY = y - padding[0];\n\n /** @type {import(\"../../coordinate.js\").Coordinate} */\n var p1;\n /** @type {import(\"../../coordinate.js\").Coordinate} */\n var p2;\n /** @type {import(\"../../coordinate.js\").Coordinate} */\n var p3;\n /** @type {import(\"../../coordinate.js\").Coordinate} */\n var p4;\n if (fillStroke || rotation !== 0) {\n p1 = [boxX, boxY];\n p2 = [boxX + boxW, boxY];\n p3 = [boxX + boxW, boxY + boxH];\n p4 = [boxX, boxY + boxH];\n }\n\n var transform = null;\n if (rotation !== 0) {\n var centerX = x + anchorX;\n var centerY = y + anchorY;\n transform = composeTransform(tmpTransform, centerX, centerY, 1, 1, rotation, -centerX, -centerY);\n\n createOrUpdateEmpty(tmpExtent);\n extendCoordinate(tmpExtent, applyTransform(tmpTransform, p1));\n extendCoordinate(tmpExtent, applyTransform(tmpTransform, p2));\n extendCoordinate(tmpExtent, applyTransform(tmpTransform, p3));\n extendCoordinate(tmpExtent, applyTransform(tmpTransform, p4));\n } else {\n createOrUpdate(boxX, boxY, boxX + boxW, boxY + boxH, tmpExtent);\n }\n var canvas = context.canvas;\n var strokePadding = strokeInstruction ? (strokeInstruction[2] * scale / 2) : 0;\n var intersects =\n tmpExtent[0] - strokePadding <= canvas.width && tmpExtent[2] + strokePadding >= 0 &&\n tmpExtent[1] - strokePadding <= canvas.height && tmpExtent[3] + strokePadding >= 0;\n\n if (snapToPixel) {\n x = Math.round(x);\n y = Math.round(y);\n }\n\n if (declutterGroup) {\n if (!intersects && declutterGroup[4] == 1) {\n return;\n }\n extend(declutterGroup, tmpExtent);\n var declutterArgs = intersects ?\n [context, transform ? transform.slice(0) : null, opacity, image, originX, originY, w, h, x, y, scale] :\n null;\n if (declutterArgs && fillStroke) {\n declutterArgs.push(fillInstruction, strokeInstruction, p1, p2, p3, p4);\n }\n declutterGroup.push(declutterArgs);\n } else if (intersects) {\n if (fillStroke) {\n this.replayTextBackground_(context, p1, p2, p3, p4,\n /** @type {Array<*>} */ (fillInstruction),\n /** @type {Array<*>} */ (strokeInstruction));\n }\n drawImage(context, transform, opacity, image, originX, originY, w, h, x, y, scale);\n }\n };\n\n /**\n * @protected\n * @param {Array<number>} dashArray Dash array.\n * @return {Array<number>} Dash array with pixel ratio applied\n */\n CanvasReplay.prototype.applyPixelRatio = function applyPixelRatio (dashArray) {\n var pixelRatio = this.pixelRatio;\n return pixelRatio == 1 ? dashArray : dashArray.map(function(dash) {\n return dash * pixelRatio;\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} closed Last input coordinate equals first.\n * @param {boolean} skipFirst Skip first coordinate.\n * @protected\n * @return {number} My end.\n */\n CanvasReplay.prototype.appendFlatCoordinates = function appendFlatCoordinates (flatCoordinates, offset, end, stride, closed, skipFirst) {\n\n var myEnd = this.coordinates.length;\n var extent = this.getBufferedMaxExtent();\n if (skipFirst) {\n offset += stride;\n }\n var lastCoord = [flatCoordinates[offset], flatCoordinates[offset + 1]];\n var nextCoord = [NaN, NaN];\n var skipped = true;\n\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 this.coordinates[myEnd++] = lastCoord[0];\n this.coordinates[myEnd++] = lastCoord[1];\n }\n this.coordinates[myEnd++] = nextCoord[0];\n this.coordinates[myEnd++] = nextCoord[1];\n skipped = false;\n } else if (nextRel === Relationship.INTERSECTING) {\n this.coordinates[myEnd++] = nextCoord[0];\n this.coordinates[myEnd++] = nextCoord[1];\n skipped = false;\n } else {\n skipped = true;\n }\n lastCoord[0] = nextCoord[0];\n lastCoord[1] = nextCoord[1];\n lastRel = nextRel;\n }\n\n // Last coordinate equals first or only one point to append:\n if ((closed && skipped) || i === offset + stride) {\n this.coordinates[myEnd++] = lastCoord[0];\n this.coordinates[myEnd++] = lastCoord[1];\n }\n return myEnd;\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 {Array<number>} replayEnds Replay ends.\n * @return {number} Offset.\n */\n CanvasReplay.prototype.drawCustomCoordinates_ = function drawCustomCoordinates_ (flatCoordinates, offset, ends, stride, replayEnds) {\n for (var i = 0, ii = ends.length; i < ii; ++i) {\n var end = ends[i];\n var replayEnd = this.appendFlatCoordinates(flatCoordinates, offset, end, stride, false, false);\n replayEnds.push(replayEnd);\n offset = end;\n }\n return offset;\n };\n\n /**\n * @inheritDoc.\n */\n CanvasReplay.prototype.drawCustom = function drawCustom (geometry, feature, renderer) {\n this.beginGeometry(geometry, feature);\n var type = geometry.getType();\n var stride = geometry.getStride();\n var replayBegin = this.coordinates.length;\n var flatCoordinates, replayEnd, replayEnds, replayEndss;\n var offset;\n if (type == GeometryType.MULTI_POLYGON) {\n geometry = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry);\n flatCoordinates = geometry.getOrientedFlatCoordinates();\n replayEndss = [];\n var endss = 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 replayEndss.push(myEnds);\n }\n this.instructions.push([CanvasInstruction.CUSTOM,\n replayBegin, replayEndss, geometry, renderer, inflateMultiCoordinatesArray]);\n } else if (type == GeometryType.POLYGON || type == GeometryType.MULTI_LINE_STRING) {\n replayEnds = [];\n flatCoordinates = (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(),\n stride, replayEnds);\n this.instructions.push([CanvasInstruction.CUSTOM,\n replayBegin, replayEnds, geometry, renderer, inflateCoordinatesArray]);\n } else if (type == GeometryType.LINE_STRING || type == GeometryType.MULTI_POINT) {\n flatCoordinates = geometry.getFlatCoordinates();\n replayEnd = this.appendFlatCoordinates(\n flatCoordinates, 0, flatCoordinates.length, stride, false, false);\n this.instructions.push([CanvasInstruction.CUSTOM,\n replayBegin, replayEnd, geometry, renderer, inflateCoordinates]);\n } else if (type == GeometryType.POINT) {\n flatCoordinates = geometry.getFlatCoordinates();\n this.coordinates.push(flatCoordinates[0], flatCoordinates[1]);\n replayEnd = this.coordinates.length;\n this.instructions.push([CanvasInstruction.CUSTOM,\n replayBegin, replayEnd, geometry, renderer]);\n }\n this.endGeometry(geometry, feature);\n };\n\n /**\n * @protected\n * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n * @param {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} feature Feature.\n */\n CanvasReplay.prototype.beginGeometry = function beginGeometry (geometry, feature) {\n this.beginGeometryInstruction1_ = [CanvasInstruction.BEGIN_GEOMETRY, feature, 0];\n this.instructions.push(this.beginGeometryInstruction1_);\n this.beginGeometryInstruction2_ = [CanvasInstruction.BEGIN_GEOMETRY, feature, 0];\n this.hitDetectionInstructions.push(this.beginGeometryInstruction2_);\n };\n\n /**\n * FIXME empty description for jsdoc\n */\n CanvasReplay.prototype.finish = function finish () {};\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} context Context.\n */\n CanvasReplay.prototype.fill_ = function fill_ (context) {\n if (this.alignFill_) {\n var origin = applyTransform(this.renderedTransform_, [0, 0]);\n var repeatSize = 512 * this.pixelRatio;\n context.translate(origin[0] % repeatSize, origin[1] % repeatSize);\n context.rotate(this.viewRotation_);\n }\n context.fill();\n if (this.alignFill_) {\n context.setTransform.apply(context, resetTransform);\n }\n };\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} context Context.\n * @param {Array<*>} instruction Instruction.\n */\n CanvasReplay.prototype.setStrokeStyle_ = function setStrokeStyle_ (context, instruction) {\n context.strokeStyle = /** @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 (CANVAS_LINE_DASH) {\n context.lineDashOffset = /** @type {number} */ (instruction[7]);\n context.setLineDash(/** @type {Array<number>} */ (instruction[6]));\n }\n };\n\n /**\n * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroup Declutter group.\n * @param {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} feature Feature.\n */\n CanvasReplay.prototype.renderDeclutter_ = function renderDeclutter_ (declutterGroup, feature) {\n if (declutterGroup && declutterGroup.length > 5) {\n var groupCount = declutterGroup[4];\n if (groupCount == 1 || groupCount == declutterGroup.length - 5) {\n /** @type {import(\"../../structs/RBush.js\").Entry} */\n var box = {\n minX: /** @type {number} */ (declutterGroup[0]),\n minY: /** @type {number} */ (declutterGroup[1]),\n maxX: /** @type {number} */ (declutterGroup[2]),\n maxY: /** @type {number} */ (declutterGroup[3]),\n value: feature\n };\n if (!this.declutterTree.collides(box)) {\n this.declutterTree.insert(box);\n for (var j = 5, jj = declutterGroup.length; j < jj; ++j) {\n var declutterData = /** @type {Array} */ (declutterGroup[j]);\n if (declutterData) {\n if (declutterData.length > 11) {\n this.replayTextBackground_(declutterData[0],\n declutterData[13], declutterData[14], declutterData[15], declutterData[16],\n declutterData[11], declutterData[12]);\n }\n drawImage.apply(undefined, declutterData);\n }\n }\n }\n declutterGroup.length = 5;\n createOrUpdateEmpty(declutterGroup);\n }\n }\n };\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Object<string, boolean>} skippedFeaturesHash Ids of features\n * to skip.\n * @param {Array<*>} instructions Instructions array.\n * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T|undefined} featureCallback Feature callback.\n * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Only check features that intersect this\n * extent.\n * @return {T|undefined} Callback result.\n * @template T\n */\n CanvasReplay.prototype.replay_ = function replay_ (\n context,\n transform,\n skippedFeaturesHash,\n instructions,\n snapToPixel,\n featureCallback,\n opt_hitExtent\n ) {\n /** @type {Array<number>} */\n var pixelCoordinates;\n if (this.pixelCoordinates_ && equals(transform, this.renderedTransform_)) {\n pixelCoordinates = this.pixelCoordinates_;\n } else {\n if (!this.pixelCoordinates_) {\n this.pixelCoordinates_ = [];\n }\n pixelCoordinates = transform2D(\n this.coordinates, 0, this.coordinates.length, 2,\n transform, this.pixelCoordinates_);\n transformSetFromArray(this.renderedTransform_, transform);\n }\n var skipFeatures = !isEmpty(skippedFeaturesHash);\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, declutterGroup, image;\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\n var state = /** @type {import(\"../../render.js\").State} */ ({\n context: context,\n pixelRatio: this.pixelRatio,\n resolution: this.resolution,\n rotation: viewRotation\n });\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\").default|import(\"../Feature.js\").default} */ feature;\n var x, y;\n while (i < ii) {\n var instruction = instructions[i];\n var type = /** @type {CanvasInstruction} */ (instruction[0]);\n switch (type) {\n case CanvasInstruction.BEGIN_GEOMETRY:\n feature = /** @type {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} */ (instruction[1]);\n if ((skipFeatures && skippedFeaturesHash[getUid(feature)]) || !feature.getGeometry()) {\n i = /** @type {number} */ (instruction[2]);\n } else if (opt_hitExtent !== undefined && !intersects(\n opt_hitExtent, feature.getGeometry().getExtent())) {\n i = /** @type {number} */ (instruction[2]) + 1;\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 = 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 = /** @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 } 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 = /** @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} */\n (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 declutterGroup = featureCallback ? null : /** @type {import(\"../canvas.js\").DeclutterGroup} */ (instruction[6]);\n var height = /** @type {number} */ (instruction[7]);\n var opacity = /** @type {number} */ (instruction[8]);\n var originX = /** @type {number} */ (instruction[9]);\n var originY = /** @type {number} */ (instruction[10]);\n var rotateWithView = /** @type {boolean} */ (instruction[11]);\n var rotation = /** @type {number} */ (instruction[12]);\n var scale = /** @type {number} */ (instruction[13]);\n var width = /** @type {number} */ (instruction[14]);\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 } else {\n padding = defaultPadding;\n backgroundFill = backgroundStroke = false;\n }\n\n if (rotateWithView) {\n rotation += viewRotation;\n }\n for (; d < dd; d += 2) {\n this.replayImage_(context,\n pixelCoordinates[d], pixelCoordinates[d + 1], image, anchorX, anchorY,\n declutterGroup, height, opacity, originX, originY, rotation, scale,\n snapToPixel, width, padding,\n backgroundFill ? /** @type {Array<*>} */ (lastFillInstruction) : null,\n backgroundStroke ? /** @type {Array<*>} */ (lastStrokeInstruction) : null);\n }\n this.renderDeclutter_(declutterGroup, feature);\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 declutterGroup = featureCallback ? null : /** @type {import(\"../canvas.js\").DeclutterGroup} */ (instruction[4]);\n var overflow = /** @type {number} */ (instruction[5]);\n var fillKey = /** @type {string} */ (instruction[6]);\n var maxAngle = /** @type {number} */ (instruction[7]);\n var measure = /** @type {function(string):number} */ (instruction[8]);\n var offsetY = /** @type {number} */ (instruction[9]);\n var strokeKey = /** @type {string} */ (instruction[10]);\n var strokeWidth = /** @type {number} */ (instruction[11]);\n var text = /** @type {string} */ (instruction[12]);\n var textKey = /** @type {string} */ (instruction[13]);\n var textScale = /** @type {number} */ (instruction[14]);\n\n var pathLength = lineStringLength(pixelCoordinates, begin, end, 2);\n var textLength = measure(text);\n if (overflow || textLength <= pathLength) {\n /** @type {import(\"./TextReplay.js\").default} */\n var textReplay = /** @type {?} */ (this);\n var textAlign = textReplay.textStates[textKey].textAlign;\n var startM = (pathLength - textLength) * TEXT_ALIGN[textAlign];\n var parts = drawTextOnPath(\n pixelCoordinates, begin, end, 2, text, measure, startM, maxAngle);\n if (parts) {\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 = textReplay.getImage(chars, textKey, '', strokeKey);\n anchorX = /** @type {number} */ (part[2]) + strokeWidth;\n anchorY = baseline * label.height + (0.5 - baseline) * 2 * strokeWidth - offsetY;\n this.replayImage_(context,\n /** @type {number} */ (part[0]), /** @type {number} */ (part[1]), label,\n anchorX, anchorY, declutterGroup, label.height, 1, 0, 0,\n /** @type {number} */ (part[3]), textScale, false, label.width,\n defaultPadding, null, null);\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 = textReplay.getImage(chars, textKey, fillKey, '');\n anchorX = /** @type {number} */ (part[2]);\n anchorY = baseline * label.height - offsetY;\n this.replayImage_(context,\n /** @type {number} */ (part[0]), /** @type {number} */ (part[1]), label,\n anchorX, anchorY, declutterGroup, label.height, 1, 0, 0,\n /** @type {number} */ (part[3]), textScale, false, label.width,\n defaultPadding, null, null);\n }\n }\n }\n }\n this.renderDeclutter_(declutterGroup, feature);\n ++i;\n break;\n case CanvasInstruction.END_GEOMETRY:\n if (featureCallback !== undefined) {\n feature = /** @type {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} */ (instruction[1]);\n var result = featureCallback(feature);\n if (result) {\n return result;\n }\n }\n ++i;\n break;\n case CanvasInstruction.FILL:\n if (batchSize) {\n pendingFill++;\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\n if (pendingFill) {\n this.fill_(context);\n pendingFill = 0;\n if (pendingStroke) {\n context.stroke();\n pendingStroke = 0;\n }\n }\n\n context.fillStyle = /** @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 } 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 /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {number} viewRotation View rotation.\n * @param {Object<string, boolean>} skippedFeaturesHash Ids of features\n * to skip.\n * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n */\n CanvasReplay.prototype.replay = function replay (context, transform, viewRotation, skippedFeaturesHash, snapToPixel) {\n this.viewRotation_ = viewRotation;\n this.replay_(context, transform,\n skippedFeaturesHash, this.instructions, snapToPixel, undefined, undefined);\n };\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {number} viewRotation View rotation.\n * @param {Object<string, boolean>} skippedFeaturesHash Ids of features\n * to skip.\n * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T=} opt_featureCallback\n * Feature callback.\n * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Only check features that intersect this\n * extent.\n * @return {T|undefined} Callback result.\n * @template T\n */\n CanvasReplay.prototype.replayHitDetection = function replayHitDetection (\n context,\n transform,\n viewRotation,\n skippedFeaturesHash,\n opt_featureCallback,\n opt_hitExtent\n ) {\n this.viewRotation_ = viewRotation;\n return this.replay_(context, transform, skippedFeaturesHash,\n this.hitDetectionInstructions, true, opt_featureCallback, opt_hitExtent);\n };\n\n /**\n * Reverse the hit detection instructions.\n */\n CanvasReplay.prototype.reverseHitDetectionInstructions = function reverseHitDetectionInstructions () {\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 {CanvasInstruction} */ (instruction[0]);\n if (type == CanvasInstruction.END_GEOMETRY) {\n begin = i;\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 /**\n * @inheritDoc\n */\n CanvasReplay.prototype.setFillStrokeStyle = function setFillStrokeStyle (fillStyle, strokeStyle) {\n var state = this.state;\n if (fillStyle) {\n var fillStyleColor = fillStyle.getColor();\n state.fillStyle = asColorLike(fillStyleColor ?\n fillStyleColor : defaultFillStyle);\n } else {\n state.fillStyle = undefined;\n }\n if (strokeStyle) {\n var strokeStyleColor = strokeStyle.getColor();\n state.strokeStyle = asColorLike(strokeStyleColor ?\n strokeStyleColor : defaultStrokeStyle);\n var strokeStyleLineCap = strokeStyle.getLineCap();\n state.lineCap = strokeStyleLineCap !== undefined ?\n strokeStyleLineCap : defaultLineCap;\n var strokeStyleLineDash = strokeStyle.getLineDash();\n state.lineDash = strokeStyleLineDash ?\n strokeStyleLineDash.slice() : defaultLineDash;\n var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n state.lineDashOffset = strokeStyleLineDashOffset ?\n strokeStyleLineDashOffset : defaultLineDashOffset;\n var strokeStyleLineJoin = strokeStyle.getLineJoin();\n state.lineJoin = strokeStyleLineJoin !== undefined ?\n strokeStyleLineJoin : defaultLineJoin;\n var strokeStyleWidth = strokeStyle.getWidth();\n state.lineWidth = strokeStyleWidth !== undefined ?\n strokeStyleWidth : defaultLineWidth;\n var strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n state.miterLimit = strokeStyleMiterLimit !== undefined ?\n strokeStyleMiterLimit : defaultMiterLimit;\n\n if (state.lineWidth > this.maxLineWidth) {\n this.maxLineWidth = state.lineWidth;\n // invalidate the buffered max extent cache\n this.bufferedMaxExtent_ = null;\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 /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n * @return {Array<*>} Fill instruction.\n */\n CanvasReplay.prototype.createFill = function createFill (state, geometry) {\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 /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n */\n CanvasReplay.prototype.applyStroke = function applyStroke (state) {\n this.instructions.push(this.createStroke(state));\n };\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @return {Array<*>} Stroke instruction.\n */\n CanvasReplay.prototype.createStroke = function createStroke (state) {\n return [\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle, state.lineWidth * this.pixelRatio, state.lineCap,\n state.lineJoin, state.miterLimit,\n this.applyPixelRatio(state.lineDash), state.lineDashOffset * this.pixelRatio\n ];\n };\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @param {function(this:CanvasReplay, import(\"../canvas.js\").FillStrokeState, (import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default)):Array<*>} createFill Create fill.\n * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n */\n CanvasReplay.prototype.updateFillStyle = function updateFillStyle (state, createFill, geometry) {\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, geometry));\n }\n state.currentFillStyle = fillStyle;\n }\n };\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @param {function(this:CanvasReplay, import(\"../canvas.js\").FillStrokeState)} applyStroke Apply stroke.\n */\n CanvasReplay.prototype.updateStrokeStyle = function updateStrokeStyle (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 && !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 /**\n * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n * @param {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} feature Feature.\n */\n CanvasReplay.prototype.endGeometry = function endGeometry (geometry, 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 /**\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 CanvasReplay.prototype.getBufferedMaxExtent = function getBufferedMaxExtent () {\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\n return CanvasReplay;\n}(VectorContext));\n\n\nexport default CanvasReplay;\n\n//# sourceMappingURL=Replay.js.map","/**\n * @module ol/render/canvas/ImageReplay\n */\nimport CanvasInstruction from './Instruction.js';\nimport CanvasReplay from './Replay.js';\n\nvar CanvasImageReplay = /*@__PURE__*/(function (CanvasReplay) {\n function CanvasImageReplay(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {\n CanvasReplay.call(this, tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);\n\n /**\n * @private\n * @type {import(\"../canvas.js\").DeclutterGroup}\n */\n this.declutterGroup_ = null;\n\n /**\n * @private\n * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n */\n this.hitDetectionImage_ = null;\n\n /**\n * @private\n * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n */\n this.image_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.anchorX_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.anchorY_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.height_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.opacity_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.originX_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.originY_ = undefined;\n\n /**\n * @private\n * @type {boolean|undefined}\n */\n this.rotateWithView_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.rotation_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.scale_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.width_ = undefined;\n\n }\n\n if ( CanvasReplay ) CanvasImageReplay.__proto__ = CanvasReplay;\n CanvasImageReplay.prototype = Object.create( CanvasReplay && CanvasReplay.prototype );\n CanvasImageReplay.prototype.constructor = CanvasImageReplay;\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} My end.\n */\n CanvasImageReplay.prototype.drawCoordinates_ = function drawCoordinates_ (flatCoordinates, offset, end, stride) {\n return this.appendFlatCoordinates(flatCoordinates, offset, end, stride, false, false);\n };\n\n /**\n * @inheritDoc\n */\n CanvasImageReplay.prototype.drawPoint = function drawPoint (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.drawCoordinates_(flatCoordinates, 0, flatCoordinates.length, stride);\n this.instructions.push([\n CanvasInstruction.DRAW_IMAGE, myBegin, myEnd, this.image_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_, this.anchorY_, this.declutterGroup_, this.height_, this.opacity_,\n this.originX_, this.originY_, this.rotateWithView_, this.rotation_,\n this.scale_ * this.pixelRatio, this.width_\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.DRAW_IMAGE, myBegin, myEnd, this.hitDetectionImage_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_, this.anchorY_, this.declutterGroup_, this.height_, this.opacity_,\n this.originX_, this.originY_, this.rotateWithView_, this.rotation_,\n this.scale_, this.width_\n ]);\n this.endGeometry(pointGeometry, feature);\n };\n\n /**\n * @inheritDoc\n */\n CanvasImageReplay.prototype.drawMultiPoint = function drawMultiPoint (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.drawCoordinates_(\n flatCoordinates, 0, flatCoordinates.length, stride);\n this.instructions.push([\n CanvasInstruction.DRAW_IMAGE, myBegin, myEnd, this.image_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_, this.anchorY_, this.declutterGroup_, this.height_, this.opacity_,\n this.originX_, this.originY_, this.rotateWithView_, this.rotation_,\n this.scale_ * this.pixelRatio, this.width_\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.DRAW_IMAGE, myBegin, myEnd, this.hitDetectionImage_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_, this.anchorY_, this.declutterGroup_, this.height_, this.opacity_,\n this.originX_, this.originY_, this.rotateWithView_, this.rotation_,\n this.scale_, this.width_\n ]);\n this.endGeometry(multiPointGeometry, feature);\n };\n\n /**\n * @inheritDoc\n */\n CanvasImageReplay.prototype.finish = function finish () {\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.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 };\n\n /**\n * @inheritDoc\n */\n CanvasImageReplay.prototype.setImageStyle = function setImageStyle (imageStyle, declutterGroup) {\n var anchor = imageStyle.getAnchor();\n var size = imageStyle.getSize();\n var hitDetectionImage = imageStyle.getHitDetectionImage(1);\n var image = imageStyle.getImage(1);\n var origin = imageStyle.getOrigin();\n this.anchorX_ = anchor[0];\n this.anchorY_ = anchor[1];\n this.declutterGroup_ = /** @type {import(\"../canvas.js\").DeclutterGroup} */ (declutterGroup);\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.getScale();\n this.width_ = size[0];\n };\n\n return CanvasImageReplay;\n}(CanvasReplay));\n\n\nexport default CanvasImageReplay;\n\n//# sourceMappingURL=ImageReplay.js.map","/**\n * @module ol/render/canvas/LineStringReplay\n */\nimport CanvasInstruction, {strokeInstruction, beginPathInstruction} from './Instruction.js';\nimport CanvasReplay from './Replay.js';\n\nvar CanvasLineStringReplay = /*@__PURE__*/(function (CanvasReplay) {\n function CanvasLineStringReplay(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {\n CanvasReplay.call(this, tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);\n }\n\n if ( CanvasReplay ) CanvasLineStringReplay.__proto__ = CanvasReplay;\n CanvasLineStringReplay.prototype = Object.create( CanvasReplay && CanvasReplay.prototype );\n CanvasLineStringReplay.prototype.constructor = CanvasLineStringReplay;\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 CanvasLineStringReplay.prototype.drawFlatCoordinates_ = function drawFlatCoordinates_ (flatCoordinates, offset, end, stride) {\n var myBegin = this.coordinates.length;\n var myEnd = this.appendFlatCoordinates(\n flatCoordinates, offset, end, stride, false, false);\n var moveToLineToInstruction = [CanvasInstruction.MOVE_TO_LINE_TO, myBegin, myEnd];\n this.instructions.push(moveToLineToInstruction);\n this.hitDetectionInstructions.push(moveToLineToInstruction);\n return end;\n };\n\n /**\n * @inheritDoc\n */\n CanvasLineStringReplay.prototype.drawLineString = function drawLineString (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, state.lineWidth, state.lineCap, state.lineJoin,\n state.miterLimit, state.lineDash, state.lineDashOffset\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(lineStringGeometry, feature);\n };\n\n /**\n * @inheritDoc\n */\n CanvasLineStringReplay.prototype.drawMultiLineString = function drawMultiLineString (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, state.lineWidth, state.lineCap, state.lineJoin,\n state.miterLimit, state.lineDash, 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, ends[i], stride);\n }\n this.hitDetectionInstructions.push(strokeInstruction);\n this.endGeometry(multiLineStringGeometry, feature);\n };\n\n /**\n * @inheritDoc\n */\n CanvasLineStringReplay.prototype.finish = function finish () {\n var state = this.state;\n if (state.lastStroke != undefined && state.lastStroke != this.coordinates.length) {\n this.instructions.push(strokeInstruction);\n }\n this.reverseHitDetectionInstructions();\n this.state = null;\n };\n\n /**\n * @inheritDoc.\n */\n CanvasLineStringReplay.prototype.applyStroke = function applyStroke (state) {\n if (state.lastStroke != undefined && state.lastStroke != this.coordinates.length) {\n this.instructions.push(strokeInstruction);\n state.lastStroke = this.coordinates.length;\n }\n state.lastStroke = 0;\n CanvasReplay.prototype.applyStroke.call(this, state);\n this.instructions.push(beginPathInstruction);\n };\n\n return CanvasLineStringReplay;\n}(CanvasReplay));\n\n\nexport default CanvasLineStringReplay;\n\n//# sourceMappingURL=LineStringReplay.js.map","/**\n * @module ol/render/canvas/PolygonReplay\n */\nimport {asString} from '../../color.js';\nimport {snap} from '../../geom/flat/simplify.js';\nimport {defaultFillStyle} from '../canvas.js';\nimport CanvasInstruction, {\n fillInstruction, strokeInstruction, beginPathInstruction, closePathInstruction\n} from './Instruction.js';\nimport CanvasReplay from './Replay.js';\n\n\nvar CanvasPolygonReplay = /*@__PURE__*/(function (CanvasReplay) {\n function CanvasPolygonReplay(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {\n CanvasReplay.call(this, tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);\n }\n\n if ( CanvasReplay ) CanvasPolygonReplay.__proto__ = CanvasReplay;\n CanvasPolygonReplay.prototype = Object.create( CanvasReplay && CanvasReplay.prototype );\n CanvasPolygonReplay.prototype.constructor = CanvasPolygonReplay;\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 CanvasPolygonReplay.prototype.drawFlatCoordinatess_ = function drawFlatCoordinatess_ (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.appendFlatCoordinates(flatCoordinates, offset, end, stride, true, !stroke);\n var moveToLineToInstruction = [CanvasInstruction.MOVE_TO_LINE_TO, myBegin, myEnd];\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 appendFlatCoordinates 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 /**\n * @inheritDoc\n */\n CanvasPolygonReplay.prototype.drawCircle = function drawCircle (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_(circleGeometry);\n this.beginGeometry(circleGeometry, feature);\n if (state.fillStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_FILL_STYLE,\n asString(defaultFillStyle)\n ]);\n }\n if (state.strokeStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,\n state.miterLimit, state.lineDash, state.lineDashOffset\n ]);\n }\n var flatCoordinates = circleGeometry.getFlatCoordinates();\n var stride = circleGeometry.getStride();\n var myBegin = this.coordinates.length;\n this.appendFlatCoordinates(\n 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 this.hitDetectionInstructions.push(fillInstruction);\n if (state.fillStyle !== undefined) {\n this.instructions.push(fillInstruction);\n }\n if (state.strokeStyle !== undefined) {\n this.instructions.push(strokeInstruction);\n this.hitDetectionInstructions.push(strokeInstruction);\n }\n this.endGeometry(circleGeometry, feature);\n };\n\n /**\n * @inheritDoc\n */\n CanvasPolygonReplay.prototype.drawPolygon = function drawPolygon (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_(polygonGeometry);\n this.beginGeometry(polygonGeometry, feature);\n if (state.fillStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_FILL_STYLE,\n asString(defaultFillStyle)\n ]);\n }\n if (state.strokeStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,\n state.miterLimit, state.lineDash, state.lineDashOffset\n ]);\n }\n var ends = polygonGeometry.getEnds();\n var flatCoordinates = polygonGeometry.getOrientedFlatCoordinates();\n var stride = polygonGeometry.getStride();\n this.drawFlatCoordinatess_(flatCoordinates, 0, ends, stride);\n this.endGeometry(polygonGeometry, feature);\n };\n\n /**\n * @inheritDoc\n */\n CanvasPolygonReplay.prototype.drawMultiPolygon = function drawMultiPolygon (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_(multiPolygonGeometry);\n this.beginGeometry(multiPolygonGeometry, feature);\n if (state.fillStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_FILL_STYLE,\n asString(defaultFillStyle)\n ]);\n }\n if (state.strokeStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,\n state.miterLimit, state.lineDash, 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(multiPolygonGeometry, feature);\n };\n\n /**\n * @inheritDoc\n */\n CanvasPolygonReplay.prototype.finish = function finish () {\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 };\n\n /**\n * @private\n * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n */\n CanvasPolygonReplay.prototype.setFillStrokeStyles_ = function setFillStrokeStyles_ (geometry) {\n var state = this.state;\n var fillStyle = state.fillStyle;\n if (fillStyle !== undefined) {\n this.updateFillStyle(state, this.createFill, geometry);\n }\n if (state.strokeStyle !== undefined) {\n this.updateStrokeStyle(state, this.applyStroke);\n }\n };\n\n return CanvasPolygonReplay;\n}(CanvasReplay));\n\n\nexport default CanvasPolygonReplay;\n\n//# sourceMappingURL=PolygonReplay.js.map","/**\n * @module ol/geom/flat/straightchunk\n */\n\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\n//# sourceMappingURL=straightchunk.js.map","/**\n * @module ol/style/TextPlacement\n */\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\n//# sourceMappingURL=TextPlacement.js.map","/**\n * @module ol/render/canvas/TextReplay\n */\nimport {getUid} from '../../util.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {intersects} from '../../extent.js';\nimport {matchingChunk} from '../../geom/flat/straightchunk.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport {CANVAS_LINE_DASH} from '../../has.js';\nimport {labelCache, measureTextWidth, defaultTextAlign, measureTextHeight, defaultPadding, defaultLineCap, defaultLineDashOffset, defaultLineDash, defaultLineJoin, defaultFillStyle, checkFont, defaultFont, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, defaultTextBaseline} from '../canvas.js';\nimport CanvasInstruction from './Instruction.js';\nimport CanvasReplay from './Replay.js';\nimport {TEXT_ALIGN} from '../replay.js';\nimport TextPlacement from '../../style/TextPlacement.js';\n\nvar CanvasTextReplay = /*@__PURE__*/(function (CanvasReplay) {\n function CanvasTextReplay(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {\n CanvasReplay.call(this, tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);\n\n /**\n * @private\n * @type {import(\"../canvas.js\").DeclutterGroup}\n */\n this.declutterGroup_;\n\n /**\n * @private\n * @type {Array<HTMLCanvasElement>}\n */\n this.labels_ = null;\n\n /**\n * @private\n * @type {string}\n */\n this.text_ = '';\n\n /**\n * @private\n * @type {number}\n */\n this.textOffsetX_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.textOffsetY_ = 0;\n\n /**\n * @private\n * @type {boolean|undefined}\n */\n this.textRotateWithView_ = undefined;\n\n /**\n * @private\n * @type {number}\n */\n this.textRotation_ = 0;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").FillState}\n */\n this.textFillState_ = null;\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").FillState>}\n */\n this.fillStates = {};\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").StrokeState}\n */\n this.textStrokeState_ = null;\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").StrokeState>}\n */\n this.strokeStates = {};\n\n /**\n * @private\n * @type {import(\"../canvas.js\").TextState}\n */\n this.textState_ = /** @type {import(\"../canvas.js\").TextState} */ ({});\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").TextState>}\n */\n this.textStates = {};\n\n /**\n * @private\n * @type {string}\n */\n this.textKey_ = '';\n\n /**\n * @private\n * @type {string}\n */\n this.fillKey_ = '';\n\n /**\n * @private\n * @type {string}\n */\n this.strokeKey_ = '';\n\n /**\n * @private\n * @type {Object<string, Object<string, number>>}\n */\n this.widths_ = {};\n\n labelCache.prune();\n\n }\n\n if ( CanvasReplay ) CanvasTextReplay.__proto__ = CanvasReplay;\n CanvasTextReplay.prototype = Object.create( CanvasReplay && CanvasReplay.prototype );\n CanvasTextReplay.prototype.constructor = CanvasTextReplay;\n\n /**\n * @inheritDoc\n */\n CanvasTextReplay.prototype.drawText = function drawText (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\n var begin = this.coordinates.length;\n\n var geometryType = geometry.getType();\n var flatCoordinates = null;\n var end = 2;\n var stride = 2;\n var i, ii;\n\n if (textState.placement === TextPlacement.LINE) {\n if (!intersects(this.getBufferedMaxExtent(), geometry.getExtent())) {\n return;\n }\n var ends;\n flatCoordinates = geometry.getFlatCoordinates();\n stride = geometry.getStride();\n if (geometryType == GeometryType.LINE_STRING) {\n ends = [flatCoordinates.length];\n } else if (geometryType == GeometryType.MULTI_LINE_STRING) {\n ends = geometry.getEnds();\n } else if (geometryType == GeometryType.POLYGON) {\n ends = geometry.getEnds().slice(0, 1);\n } else if (geometryType == GeometryType.MULTI_POLYGON) {\n var endss = geometry.getEndss();\n ends = [];\n for (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;\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 } else {\n flatEnd = ends[o];\n }\n for (i = flatOffset; i < flatEnd; i += stride) {\n this.coordinates.push(flatCoordinates[i], flatCoordinates[i + 1]);\n }\n end = this.coordinates.length;\n flatOffset = ends[o];\n this.drawChars_(begin, end, this.declutterGroup_);\n begin = end;\n }\n this.endGeometry(geometry, feature);\n\n } else {\n var label = this.getImage(this.text_, this.textKey_, this.fillKey_, this.strokeKey_);\n var width = label.width / this.pixelRatio;\n switch (geometryType) {\n case GeometryType.POINT:\n case GeometryType.MULTI_POINT:\n flatCoordinates = geometry.getFlatCoordinates();\n end = flatCoordinates.length;\n break;\n case GeometryType.LINE_STRING:\n flatCoordinates = /** @type {import(\"../../geom/LineString.js\").default} */ (geometry).getFlatMidpoint();\n break;\n case GeometryType.CIRCLE:\n flatCoordinates = /** @type {import(\"../../geom/Circle.js\").default} */ (geometry).getCenter();\n break;\n case GeometryType.MULTI_LINE_STRING:\n flatCoordinates = /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry).getFlatMidpoints();\n end = flatCoordinates.length;\n break;\n case GeometryType.POLYGON:\n flatCoordinates = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry).getFlatInteriorPoint();\n if (!textState.overflow && flatCoordinates[2] / this.resolution < width) {\n return;\n }\n stride = 3;\n break;\n case GeometryType.MULTI_POLYGON:\n var interiorPoints = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getFlatInteriorPoints();\n flatCoordinates = [];\n for (i = 0, ii = interiorPoints.length; i < ii; i += 3) {\n if (textState.overflow || interiorPoints[i + 2] / this.resolution >= width) {\n flatCoordinates.push(interiorPoints[i], interiorPoints[i + 1]);\n }\n }\n end = flatCoordinates.length;\n if (end == 0) {\n return;\n }\n break;\n default:\n }\n end = this.appendFlatCoordinates(flatCoordinates, 0, end, stride, false, false);\n if (textState.backgroundFill || textState.backgroundStroke) {\n this.setFillStrokeStyle(textState.backgroundFill, textState.backgroundStroke);\n if (textState.backgroundFill) {\n this.updateFillStyle(this.state, this.createFill, geometry);\n this.hitDetectionInstructions.push(this.createFill(this.state, geometry));\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 this.drawTextImage_(label, begin, end);\n this.endGeometry(geometry, feature);\n }\n };\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 {HTMLCanvasElement} Image.\n */\n CanvasTextReplay.prototype.getImage = function getImage (text, textKey, fillKey, strokeKey) {\n var label;\n var key = strokeKey + textKey + text + fillKey + this.pixelRatio;\n\n if (!labelCache.containsKey(key)) {\n var strokeState = strokeKey ? this.strokeStates[strokeKey] || this.textStrokeState_ : null;\n var fillState = fillKey ? this.fillStates[fillKey] || this.textFillState_ : null;\n var textState = this.textStates[textKey] || this.textState_;\n var pixelRatio = this.pixelRatio;\n var scale = textState.scale * pixelRatio;\n var align = TEXT_ALIGN[textState.textAlign || defaultTextAlign];\n var strokeWidth = strokeKey && strokeState.lineWidth ? strokeState.lineWidth : 0;\n\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 context = createCanvasContext2D(\n Math.ceil(renderWidth * scale),\n Math.ceil((height + strokeWidth) * scale));\n label = context.canvas;\n labelCache.set(key, label);\n if (scale != 1) {\n context.scale(scale, scale);\n }\n context.font = textState.font;\n if (strokeKey) {\n context.strokeStyle = strokeState.strokeStyle;\n context.lineWidth = strokeWidth;\n context.lineCap = /** @type {CanvasLineCap} */ (strokeState.lineCap);\n context.lineJoin = /** @type {CanvasLineJoin} */ (strokeState.lineJoin);\n context.miterLimit = strokeState.miterLimit;\n if (CANVAS_LINE_DASH && strokeState.lineDash.length) {\n context.setLineDash(strokeState.lineDash);\n context.lineDashOffset = strokeState.lineDashOffset;\n }\n }\n if (fillKey) {\n context.fillStyle = fillState.fillStyle;\n }\n context.textBaseline = 'middle';\n context.textAlign = 'center';\n var leftRight = (0.5 - align);\n var x = align * label.width / scale + leftRight * strokeWidth;\n var i;\n if (strokeKey) {\n for (i = 0; i < numLines; ++i) {\n context.strokeText(lines[i], x + leftRight * widths[i], 0.5 * (strokeWidth + lineHeight) + i * lineHeight);\n }\n }\n if (fillKey) {\n for (i = 0; i < numLines; ++i) {\n context.fillText(lines[i], x + leftRight * widths[i], 0.5 * (strokeWidth + lineHeight) + i * lineHeight);\n }\n }\n }\n return labelCache.get(key);\n };\n\n /**\n * @private\n * @param {HTMLCanvasElement} label Label.\n * @param {number} begin Begin.\n * @param {number} end End.\n */\n CanvasTextReplay.prototype.drawTextImage_ = function drawTextImage_ (label, begin, end) {\n var textState = this.textState_;\n var strokeState = this.textStrokeState_;\n var pixelRatio = this.pixelRatio;\n var align = TEXT_ALIGN[textState.textAlign || defaultTextAlign];\n var baseline = TEXT_ALIGN[textState.textBaseline];\n var strokeWidth = strokeState && strokeState.lineWidth ? strokeState.lineWidth : 0;\n\n var anchorX = align * label.width / pixelRatio + 2 * (0.5 - align) * strokeWidth;\n var anchorY = baseline * label.height / pixelRatio + 2 * (0.5 - baseline) * strokeWidth;\n this.instructions.push([CanvasInstruction.DRAW_IMAGE, begin, end,\n label, (anchorX - this.textOffsetX_) * pixelRatio, (anchorY - this.textOffsetY_) * pixelRatio,\n this.declutterGroup_, label.height, 1, 0, 0, this.textRotateWithView_, this.textRotation_,\n 1, label.width,\n textState.padding == defaultPadding ?\n defaultPadding : textState.padding.map(function(p) {\n return p * pixelRatio;\n }),\n !!textState.backgroundFill, !!textState.backgroundStroke\n ]);\n this.hitDetectionInstructions.push([CanvasInstruction.DRAW_IMAGE, begin, end,\n label, (anchorX - this.textOffsetX_) * pixelRatio, (anchorY - this.textOffsetY_) * pixelRatio,\n this.declutterGroup_, label.height, 1, 0, 0, this.textRotateWithView_, this.textRotation_,\n 1 / pixelRatio, label.width, textState.padding,\n !!textState.backgroundFill, !!textState.backgroundStroke\n ]);\n };\n\n /**\n * @private\n * @param {number} begin Begin.\n * @param {number} end End.\n * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroup Declutter group.\n */\n CanvasTextReplay.prototype.drawChars_ = function drawChars_ (begin, end, declutterGroup) {\n var strokeState = this.textStrokeState_;\n var textState = this.textState_;\n var fillState = this.textFillState_;\n\n var strokeKey = this.strokeKey_;\n if (strokeState) {\n if (!(strokeKey in this.strokeStates)) {\n this.strokeStates[strokeKey] = /** @type {import(\"../canvas.js\").StrokeState} */ ({\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 (!(this.textKey_ in this.textStates)) {\n this.textStates[this.textKey_] = /** @type {import(\"../canvas.js\").TextState} */ ({\n font: textState.font,\n textAlign: textState.textAlign || defaultTextAlign,\n scale: textState.scale\n });\n }\n var fillKey = this.fillKey_;\n if (fillState) {\n if (!(fillKey in this.fillStates)) {\n this.fillStates[fillKey] = /** @type {import(\"../canvas.js\").FillState} */ ({\n fillStyle: fillState.fillStyle\n });\n }\n }\n\n var pixelRatio = this.pixelRatio;\n var baseline = TEXT_ALIGN[textState.textBaseline];\n\n var offsetY = this.textOffsetY_ * pixelRatio;\n var text = this.text_;\n var font = textState.font;\n var textScale = textState.scale;\n var strokeWidth = strokeState ? strokeState.lineWidth * textScale / 2 : 0;\n var widths = this.widths_[font];\n if (!widths) {\n this.widths_[font] = widths = {};\n }\n this.instructions.push([CanvasInstruction.DRAW_CHARS,\n begin, end, baseline, declutterGroup,\n textState.overflow, fillKey, textState.maxAngle,\n function(text) {\n var width = widths[text];\n if (!width) {\n width = widths[text] = measureTextWidth(font, text);\n }\n return width * textScale * pixelRatio;\n },\n offsetY, strokeKey, strokeWidth * pixelRatio, text, textKey, 1\n ]);\n this.hitDetectionInstructions.push([CanvasInstruction.DRAW_CHARS,\n begin, end, baseline, declutterGroup,\n textState.overflow, fillKey, textState.maxAngle,\n function(text) {\n var width = widths[text];\n if (!width) {\n width = widths[text] = measureTextWidth(font, text);\n }\n return width * textScale;\n },\n offsetY, strokeKey, strokeWidth, text, textKey, 1 / pixelRatio\n ]);\n };\n\n /**\n * @inheritDoc\n */\n CanvasTextReplay.prototype.setTextStyle = function setTextStyle (textStyle, declutterGroup) {\n var textState, fillState, strokeState;\n if (!textStyle) {\n this.text_ = '';\n } else {\n this.declutterGroup_ = /** @type {import(\"../canvas.js\").DeclutterGroup} */ (declutterGroup);\n\n var textFillStyle = textStyle.getFill();\n if (!textFillStyle) {\n fillState = this.textFillState_ = null;\n } else {\n fillState = this.textFillState_;\n if (!fillState) {\n fillState = this.textFillState_ = /** @type {import(\"../canvas.js\").FillState} */ ({});\n }\n fillState.fillStyle = asColorLike(\n textFillStyle.getColor() || defaultFillStyle);\n }\n\n var textStrokeStyle = textStyle.getStroke();\n if (!textStrokeStyle) {\n strokeState = this.textStrokeState_ = null;\n } else {\n strokeState = this.textStrokeState_;\n if (!strokeState) {\n strokeState = this.textStrokeState_ = /** @type {import(\"../canvas.js\").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(\n textStrokeStyle.getColor() || defaultStrokeStyle);\n }\n\n textState = this.textState_;\n var font = textStyle.getFont() || defaultFont;\n checkFont(font);\n var textScale = textStyle.getScale();\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 = 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 : textScale;\n\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_ = textRotateWithView === undefined ? false : textRotateWithView;\n this.textRotation_ = textRotation === undefined ? 0 : textRotation;\n\n this.strokeKey_ = strokeState ?\n (typeof strokeState.strokeStyle == 'string' ? strokeState.strokeStyle : getUid(strokeState.strokeStyle)) +\n strokeState.lineCap + strokeState.lineDashOffset + '|' + strokeState.lineWidth +\n strokeState.lineJoin + strokeState.miterLimit + '[' + strokeState.lineDash.join() + ']' :\n '';\n this.textKey_ = textState.font + textState.scale + (textState.textAlign || '?');\n this.fillKey_ = fillState ?\n (typeof fillState.fillStyle == 'string' ? fillState.fillStyle : ('|' + getUid(fillState.fillStyle))) :\n '';\n }\n };\n\n return CanvasTextReplay;\n}(CanvasReplay));\n\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\nexport default CanvasTextReplay;\n\n//# sourceMappingURL=TextReplay.js.map","/**\n * @module ol/render/canvas/ReplayGroup\n */\n\nimport {numberSafeCompareFunction} from '../../array.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {buffer, createEmpty, extendCoordinate} from '../../extent.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {isEmpty} from '../../obj.js';\nimport ReplayGroup from '../ReplayGroup.js';\nimport ReplayType from '../ReplayType.js';\nimport CanvasReplay from './Replay.js';\nimport CanvasImageReplay from './ImageReplay.js';\nimport CanvasLineStringReplay from './LineStringReplay.js';\nimport CanvasPolygonReplay from './PolygonReplay.js';\nimport CanvasTextReplay from './TextReplay.js';\nimport {ORDER} from '../replay.js';\nimport {create as createTransform, compose as composeTransform} from '../../transform.js';\n\n\n/**\n * @type {Object<ReplayType, typeof CanvasReplay>}\n */\nvar BATCH_CONSTRUCTORS = {\n 'Circle': CanvasPolygonReplay,\n 'Default': CanvasReplay,\n 'Image': CanvasImageReplay,\n 'LineString': CanvasLineStringReplay,\n 'Polygon': CanvasPolygonReplay,\n 'Text': CanvasTextReplay\n};\n\n\nvar CanvasReplayGroup = /*@__PURE__*/(function (ReplayGroup) {\n function CanvasReplayGroup(\n tolerance,\n maxExtent,\n resolution,\n pixelRatio,\n overlaps,\n declutterTree,\n opt_renderBuffer\n ) {\n ReplayGroup.call(this);\n\n /**\n * Declutter tree.\n * @private\n */\n this.declutterTree_ = declutterTree;\n\n /**\n * @type {import(\"../canvas.js\").DeclutterGroup}\n * @private\n */\n this.declutterGroup_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.tolerance_ = tolerance;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.maxExtent_ = maxExtent;\n\n /**\n * @private\n * @type {boolean}\n */\n this.overlaps_ = overlaps;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @private\n * @type {number}\n */\n this.resolution_ = resolution;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.renderBuffer_ = opt_renderBuffer;\n\n /**\n * @private\n * @type {!Object<string, !Object<ReplayType, CanvasReplay>>}\n */\n this.replaysByZIndex_ = {};\n\n /**\n * @private\n * @type {CanvasRenderingContext2D}\n */\n this.hitDetectionContext_ = createCanvasContext2D(1, 1);\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.hitDetectionTransform_ = createTransform();\n }\n\n if ( ReplayGroup ) CanvasReplayGroup.__proto__ = ReplayGroup;\n CanvasReplayGroup.prototype = Object.create( ReplayGroup && ReplayGroup.prototype );\n CanvasReplayGroup.prototype.constructor = CanvasReplayGroup;\n\n /**\n * @inheritDoc\n */\n CanvasReplayGroup.prototype.addDeclutter = function addDeclutter (group) {\n var declutter = null;\n if (this.declutterTree_) {\n if (group) {\n declutter = this.declutterGroup_;\n /** @type {number} */ (declutter[4])++;\n } else {\n declutter = this.declutterGroup_ = createEmpty();\n declutter.push(1);\n }\n }\n return declutter;\n };\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n */\n CanvasReplayGroup.prototype.clip = function clip (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 /**\n * @param {Array<ReplayType>} replays Replays.\n * @return {boolean} Has replays of the provided types.\n */\n CanvasReplayGroup.prototype.hasReplays = function hasReplays (replays) {\n for (var zIndex in this.replaysByZIndex_) {\n var candidates = this.replaysByZIndex_[zIndex];\n for (var i = 0, ii = replays.length; i < ii; ++i) {\n if (replays[i] in candidates) {\n return true;\n }\n }\n }\n return false;\n };\n\n /**\n * FIXME empty description for jsdoc\n */\n CanvasReplayGroup.prototype.finish = function finish () {\n for (var zKey in this.replaysByZIndex_) {\n var replays = this.replaysByZIndex_[zKey];\n for (var replayKey in replays) {\n replays[replayKey].finish();\n }\n }\n };\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 {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T} callback Feature callback.\n * @param {Object<string, import(\"../canvas.js\").DeclutterGroup>} declutterReplays Declutter replays.\n * @return {T|undefined} Callback result.\n * @template T\n */\n CanvasReplayGroup.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (\n coordinate,\n resolution,\n rotation,\n hitTolerance,\n skippedFeaturesHash,\n callback,\n declutterReplays\n ) {\n\n hitTolerance = Math.round(hitTolerance);\n var contextSize = hitTolerance * 2 + 1;\n var transform = composeTransform(this.hitDetectionTransform_,\n hitTolerance + 0.5, hitTolerance + 0.5,\n 1 / resolution, -1 / resolution,\n -rotation,\n -coordinate[0], -coordinate[1]);\n var context = this.hitDetectionContext_;\n\n if (context.canvas.width !== contextSize || context.canvas.height !== contextSize) {\n context.canvas.width = contextSize;\n context.canvas.height = contextSize;\n } else {\n context.clearRect(0, 0, contextSize, contextSize);\n }\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\n var mask = getCircleArray(hitTolerance);\n var declutteredFeatures;\n if (this.declutterTree_) {\n declutteredFeatures = this.declutterTree_.all().map(function(entry) {\n return entry.value;\n });\n }\n\n var replayType;\n\n /**\n * @param {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} feature Feature.\n * @return {?} Callback result.\n */\n function featureCallback(feature) {\n var imageData = context.getImageData(0, 0, contextSize, contextSize).data;\n for (var i = 0; i < contextSize; i++) {\n for (var j = 0; j < contextSize; j++) {\n if (mask[i][j]) {\n if (imageData[(j * contextSize + i) * 4 + 3] > 0) {\n var result = (void 0);\n if (!(declutteredFeatures && (replayType == ReplayType.IMAGE || replayType == ReplayType.TEXT)) ||\n declutteredFeatures.indexOf(feature) !== -1) {\n result = callback(feature);\n }\n if (result) {\n return result;\n } else {\n context.clearRect(0, 0, contextSize, contextSize);\n return undefined;\n }\n }\n }\n }\n }\n }\n\n /** @type {Array<number>} */\n var zs = Object.keys(this.replaysByZIndex_).map(Number);\n zs.sort(numberSafeCompareFunction);\n\n var i, j, replays, replay, result;\n for (i = zs.length - 1; i >= 0; --i) {\n var zIndexKey = zs[i].toString();\n replays = this.replaysByZIndex_[zIndexKey];\n for (j = ORDER.length - 1; j >= 0; --j) {\n replayType = ORDER[j];\n replay = replays[replayType];\n if (replay !== undefined) {\n if (declutterReplays &&\n (replayType == ReplayType.IMAGE || replayType == ReplayType.TEXT)) {\n var declutter = declutterReplays[zIndexKey];\n if (!declutter) {\n declutterReplays[zIndexKey] = [replay, transform.slice(0)];\n } else {\n declutter.push(replay, transform.slice(0));\n }\n } else {\n result = replay.replayHitDetection(context, transform, rotation,\n skippedFeaturesHash, featureCallback, hitExtent);\n if (result) {\n return result;\n }\n }\n }\n }\n }\n return undefined;\n };\n\n /**\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @return {Array<number>} Clip coordinates.\n */\n CanvasReplayGroup.prototype.getClipCoords = function getClipCoords (transform) {\n var maxExtent = this.maxExtent_;\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(\n flatClipCoords, 0, 8, 2, transform, flatClipCoords);\n return flatClipCoords;\n };\n\n /**\n * @inheritDoc\n */\n CanvasReplayGroup.prototype.getReplay = function getReplay (zIndex, replayType) {\n var zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';\n var replays = this.replaysByZIndex_[zIndexKey];\n if (replays === undefined) {\n replays = {};\n this.replaysByZIndex_[zIndexKey] = replays;\n }\n var replay = replays[replayType];\n if (replay === undefined) {\n var Constructor = BATCH_CONSTRUCTORS[replayType];\n replay = new Constructor(this.tolerance_, this.maxExtent_,\n this.resolution_, this.pixelRatio_, this.overlaps_, this.declutterTree_);\n replays[replayType] = replay;\n }\n return replay;\n };\n\n /**\n * @return {Object<string, Object<ReplayType, CanvasReplay>>} Replays.\n */\n CanvasReplayGroup.prototype.getReplays = function getReplays () {\n return this.replaysByZIndex_;\n };\n\n /**\n * @inheritDoc\n */\n CanvasReplayGroup.prototype.isEmpty = function isEmpty$1 () {\n return isEmpty(this.replaysByZIndex_);\n };\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {number} viewRotation View rotation.\n * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n * @param {boolean} snapToPixel Snap point symbols and test to integer pixel.\n * @param {Array<ReplayType>=} opt_replayTypes Ordered replay types to replay.\n * Default is {@link module:ol/render/replay~ORDER}\n * @param {Object<string, import(\"../canvas.js\").DeclutterGroup>=} opt_declutterReplays Declutter replays.\n */\n CanvasReplayGroup.prototype.replay = function replay (\n context,\n transform,\n viewRotation,\n skippedFeaturesHash,\n snapToPixel,\n opt_replayTypes,\n opt_declutterReplays\n ) {\n\n /** @type {Array<number>} */\n var zs = Object.keys(this.replaysByZIndex_).map(Number);\n zs.sort(numberSafeCompareFunction);\n\n // setup clipping so that the parts of over-simplified geometries are not\n // visible outside the current extent when panning\n context.save();\n this.clip(context, transform);\n\n var replayTypes = opt_replayTypes ? opt_replayTypes : ORDER;\n var i, ii, j, jj, replays, replay;\n for (i = 0, ii = zs.length; i < ii; ++i) {\n var zIndexKey = zs[i].toString();\n replays = this.replaysByZIndex_[zIndexKey];\n for (j = 0, jj = replayTypes.length; j < jj; ++j) {\n var replayType = replayTypes[j];\n replay = replays[replayType];\n if (replay !== undefined) {\n if (opt_declutterReplays &&\n (replayType == ReplayType.IMAGE || replayType == ReplayType.TEXT)) {\n var declutter = opt_declutterReplays[zIndexKey];\n if (!declutter) {\n opt_declutterReplays[zIndexKey] = [replay, transform.slice(0)];\n } else {\n declutter.push(replay, transform.slice(0));\n }\n } else {\n replay.replay(context, transform, viewRotation, skippedFeaturesHash, snapToPixel);\n }\n }\n }\n }\n\n context.restore();\n };\n\n return CanvasReplayGroup;\n}(ReplayGroup));\n\n\n/**\n * This cache is used for storing calculated pixel circles for increasing performance.\n * It is a static property to allow each Replaygroup to access it.\n * @type {Object<number, Array<Array<(boolean|undefined)>>>}\n */\nvar circleArrayCache = {\n 0: [[true]]\n};\n\n\n/**\n * This method fills a row in the array from the given coordinate to the\n * middle with `true`.\n * @param {Array<Array<(boolean|undefined)>>} array The array that will be altered.\n * @param {number} x X coordinate.\n * @param {number} y Y coordinate.\n */\nfunction fillCircleArrayRowToMiddle(array, x, y) {\n var i;\n var radius = Math.floor(array.length / 2);\n if (x >= radius) {\n for (i = radius; i < x; i++) {\n array[i][y] = true;\n }\n } else if (x < radius) {\n for (i = x + 1; i < radius; i++) {\n array[i][y] = true;\n }\n }\n}\n\n\n/**\n * This methods creates a circle inside a fitting array. Points inside the\n * circle are marked by true, points on the outside are undefined.\n * It uses the midpoint circle algorithm.\n * A cache is used to increase performance.\n * @param {number} radius Radius.\n * @returns {Array<Array<(boolean|undefined)>>} An array with marked circle points.\n */\nexport function getCircleArray(radius) {\n if (circleArrayCache[radius] !== undefined) {\n return circleArrayCache[radius];\n }\n\n var arraySize = radius * 2 + 1;\n var arr = new Array(arraySize);\n for (var i = 0; i < arraySize; i++) {\n arr[i] = new Array(arraySize);\n }\n\n var x = radius;\n var y = 0;\n var error = 0;\n\n while (x >= y) {\n fillCircleArrayRowToMiddle(arr, radius + x, radius + y);\n fillCircleArrayRowToMiddle(arr, radius + y, radius + x);\n fillCircleArrayRowToMiddle(arr, radius - y, radius + x);\n fillCircleArrayRowToMiddle(arr, radius - x, radius + y);\n fillCircleArrayRowToMiddle(arr, radius - x, radius - y);\n fillCircleArrayRowToMiddle(arr, radius - y, radius - x);\n fillCircleArrayRowToMiddle(arr, radius + y, radius - x);\n fillCircleArrayRowToMiddle(arr, radius + x, radius - y);\n\n y++;\n error += 1 + 2 * y;\n if (2 * (error - x) + 1 > 0) {\n x -= 1;\n error += 1 - 2 * x;\n }\n }\n\n circleArrayCache[radius] = arr;\n return arr;\n}\n\n\n/**\n * @param {!Object<string, Array<*>>} declutterReplays Declutter replays.\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} rotation Rotation.\n * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n */\nexport function replayDeclutter(declutterReplays, context, rotation, snapToPixel) {\n var zs = Object.keys(declutterReplays).map(Number).sort(numberSafeCompareFunction);\n var skippedFeatureUids = {};\n for (var z = 0, zz = zs.length; z < zz; ++z) {\n var replayData = declutterReplays[zs[z].toString()];\n for (var i = 0, ii = replayData.length; i < ii;) {\n var replay = replayData[i++];\n var transform = replayData[i++];\n replay.replay(context, transform, rotation, skippedFeatureUids, snapToPixel);\n }\n }\n}\n\n\nexport default CanvasReplayGroup;\n\n//# sourceMappingURL=ReplayGroup.js.map","/**\n * @module ol/renderer/vector\n */\nimport {getUid} from '../util.js';\nimport ImageState from '../ImageState.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport ReplayType from '../render/ReplayType.js';\n\n\n/**\n * Tolerance for geometry simplification in device pixels.\n * @type {number}\n */\nvar SIMPLIFY_TOLERANCE = 0.5;\n\n\n/**\n * @const\n * @type {Object<import(\"../geom/GeometryType.js\").default,\n * function(import(\"../render/ReplayGroup.js\").default, import(\"../geom/Geometry.js\").default,\n * import(\"../style/Style.js\").default, Object)>}\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\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\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\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\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup Replay 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 */\nfunction renderCircleGeometry(replayGroup, geometry, style, feature) {\n var fillStyle = style.getFill();\n var strokeStyle = style.getStroke();\n if (fillStyle || strokeStyle) {\n var circleReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.CIRCLE);\n circleReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n circleReplay.drawCircle(geometry, feature);\n }\n var textStyle = style.getText();\n if (textStyle) {\n var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));\n textReplay.drawText(geometry, feature);\n }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.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(this: T, import(\"../events/Event.js\").default)} listener Listener function.\n * @param {T} thisArg Value to use as `this` when executing `listener`.\n * @return {boolean} `true` if style is loading.\n * @template T\n */\nexport function renderFeature(replayGroup, feature, style, squaredTolerance, listener, thisArg) {\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, thisArg);\n } else {\n if (imageState == ImageState.IDLE) {\n imageStyle.load();\n }\n imageState = imageStyle.getImageState();\n imageStyle.listenImageChange(listener, thisArg);\n loading = true;\n }\n }\n renderFeatureInternal(replayGroup, feature, style, squaredTolerance);\n\n return loading;\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.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 */\nfunction renderFeatureInternal(replayGroup, feature, style, squaredTolerance) {\n var geometry = style.getGeometryFunction()(feature);\n if (!geometry) {\n return;\n }\n var simplifiedGeometry = geometry.getSimplifiedGeometry(squaredTolerance);\n var renderer = style.getRenderer();\n if (renderer) {\n renderGeometry(replayGroup, simplifiedGeometry, style, feature);\n } else {\n var geometryRenderer = GEOMETRY_RENDERERS[simplifiedGeometry.getType()];\n geometryRenderer(replayGroup, simplifiedGeometry, style, feature);\n }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.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 = /** @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.getReplay(style.getZIndex(), ReplayType.DEFAULT);\n replay.drawCustom(/** @type {import(\"../geom/SimpleGeometry.js\").default} */ (geometry), feature, style.getRenderer());\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.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 */\nfunction renderGeometryCollectionGeometry(replayGroup, geometry, style, feature) {\n var geometries = geometry.getGeometriesArray();\n var i, ii;\n for (i = 0, ii = geometries.length; i < ii; ++i) {\n var geometryRenderer =\n GEOMETRY_RENDERERS[geometries[i].getType()];\n geometryRenderer(replayGroup, geometries[i], style, feature);\n }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup 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 */\nfunction renderLineStringGeometry(replayGroup, geometry, style, feature) {\n var strokeStyle = style.getStroke();\n if (strokeStyle) {\n var lineStringReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.LINE_STRING);\n lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n lineStringReplay.drawLineString(geometry, feature);\n }\n var textStyle = style.getText();\n if (textStyle) {\n var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));\n textReplay.drawText(geometry, feature);\n }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup 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 */\nfunction renderMultiLineStringGeometry(replayGroup, geometry, style, feature) {\n var strokeStyle = style.getStroke();\n if (strokeStyle) {\n var lineStringReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.LINE_STRING);\n lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n lineStringReplay.drawMultiLineString(geometry, feature);\n }\n var textStyle = style.getText();\n if (textStyle) {\n var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));\n textReplay.drawText(geometry, feature);\n }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup 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 */\nfunction renderMultiPolygonGeometry(replayGroup, geometry, style, feature) {\n var fillStyle = style.getFill();\n var strokeStyle = style.getStroke();\n if (strokeStyle || fillStyle) {\n var polygonReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.POLYGON);\n polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n polygonReplay.drawMultiPolygon(geometry, feature);\n }\n var textStyle = style.getText();\n if (textStyle) {\n var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));\n textReplay.drawText(geometry, feature);\n }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup 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 */\nfunction renderPointGeometry(replayGroup, geometry, style, feature) {\n var imageStyle = style.getImage();\n if (imageStyle) {\n if (imageStyle.getImageState() != ImageState.LOADED) {\n return;\n }\n var imageReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.IMAGE);\n imageReplay.setImageStyle(imageStyle, replayGroup.addDeclutter(false));\n imageReplay.drawPoint(geometry, feature);\n }\n var textStyle = style.getText();\n if (textStyle) {\n var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(!!imageStyle));\n textReplay.drawText(geometry, feature);\n }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup 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 */\nfunction renderMultiPointGeometry(replayGroup, geometry, style, feature) {\n var imageStyle = style.getImage();\n if (imageStyle) {\n if (imageStyle.getImageState() != ImageState.LOADED) {\n return;\n }\n var imageReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.IMAGE);\n imageReplay.setImageStyle(imageStyle, replayGroup.addDeclutter(false));\n imageReplay.drawMultiPoint(geometry, feature);\n }\n var textStyle = style.getText();\n if (textStyle) {\n var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(!!imageStyle));\n textReplay.drawText(geometry, feature);\n }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup 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 */\nfunction renderPolygonGeometry(replayGroup, geometry, style, feature) {\n var fillStyle = style.getFill();\n var strokeStyle = style.getStroke();\n if (fillStyle || strokeStyle) {\n var polygonReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.POLYGON);\n polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n polygonReplay.drawPolygon(geometry, feature);\n }\n var textStyle = style.getText();\n if (textStyle) {\n var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));\n textReplay.drawText(geometry, feature);\n }\n}\n\n//# sourceMappingURL=vector.js.map","/**\n * @module ol/renderer/canvas/VectorLayer\n */\nimport {getUid} from '../../util.js';\nimport LayerType from '../../LayerType.js';\nimport ViewHint from '../../ViewHint.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {listen, unlisten} from '../../events.js';\nimport EventType from '../../events/EventType.js';\nimport rbush from 'rbush';\nimport {buffer, createEmpty, containsExtent, getWidth} from '../../extent.js';\nimport RenderEventType from '../../render/EventType.js';\nimport {labelCache, rotateAtOffset} from '../../render/canvas.js';\nimport CanvasReplayGroup from '../../render/canvas/ReplayGroup.js';\nimport CanvasLayerRenderer from './Layer.js';\nimport {defaultOrder as defaultRenderOrder, getTolerance as getRenderTolerance, getSquaredTolerance as getSquaredRenderTolerance, renderFeature} from '../vector.js';\n\n/**\n * @classdesc\n * Canvas renderer for vector layers.\n * @api\n */\nvar CanvasVectorLayerRenderer = /*@__PURE__*/(function (CanvasLayerRenderer) {\n function CanvasVectorLayerRenderer(vectorLayer) {\n\n CanvasLayerRenderer.call(this, vectorLayer);\n\n /**\n * Declutter tree.\n * @private\n */\n this.declutterTree_ = vectorLayer.getDeclutter() ? rbush(9, undefined) : null;\n\n /**\n * @private\n * @type {boolean}\n */\n this.dirty_ = false;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedRevision_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedResolution_ = NaN;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.renderedExtent_ = createEmpty();\n\n /**\n * @private\n * @type {function(import(\"../../Feature.js\").default, import(\"../../Feature.js\").default): number|null}\n */\n this.renderedRenderOrder_ = null;\n\n /**\n * @private\n * @type {import(\"../../render/canvas/ReplayGroup.js\").default}\n */\n this.replayGroup_ = null;\n\n /**\n * A new replay group had to be created by `prepareFrame()`\n * @type {boolean}\n */\n this.replayGroupChanged = true;\n\n /**\n * @type {CanvasRenderingContext2D}\n */\n this.context = createCanvasContext2D();\n\n listen(labelCache, EventType.CLEAR, this.handleFontsChanged_, this);\n\n }\n\n if ( CanvasLayerRenderer ) CanvasVectorLayerRenderer.__proto__ = CanvasLayerRenderer;\n CanvasVectorLayerRenderer.prototype = Object.create( CanvasLayerRenderer && CanvasLayerRenderer.prototype );\n CanvasVectorLayerRenderer.prototype.constructor = CanvasVectorLayerRenderer;\n\n /**\n * @inheritDoc\n */\n CanvasVectorLayerRenderer.prototype.disposeInternal = function disposeInternal () {\n unlisten(labelCache, EventType.CLEAR, this.handleFontsChanged_, this);\n CanvasLayerRenderer.prototype.disposeInternal.call(this);\n };\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n */\n CanvasVectorLayerRenderer.prototype.compose = function compose (context, frameState, layerState) {\n var extent = frameState.extent;\n var pixelRatio = frameState.pixelRatio;\n var skippedFeatureUids = layerState.managed ?\n frameState.skippedFeatureUids : {};\n var viewState = frameState.viewState;\n var projection = viewState.projection;\n var rotation = viewState.rotation;\n var projectionExtent = projection.getExtent();\n var vectorSource = /** @type {import(\"../../source/Vector.js\").default} */ (this.getLayer().getSource());\n\n var transform = this.getTransform(frameState, 0);\n\n // clipped rendering if layer extent is set\n var clipExtent = layerState.extent;\n var clipped = clipExtent !== undefined;\n if (clipped) {\n this.clip(context, frameState, /** @type {import(\"../../extent.js\").Extent} */ (clipExtent));\n }\n var replayGroup = this.replayGroup_;\n if (replayGroup && !replayGroup.isEmpty()) {\n if (this.declutterTree_) {\n this.declutterTree_.clear();\n }\n var layer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n var drawOffsetX = 0;\n var drawOffsetY = 0;\n var replayContext;\n var transparentLayer = layerState.opacity !== 1;\n var hasRenderListeners = layer.hasListener(RenderEventType.RENDER);\n if (transparentLayer || hasRenderListeners) {\n var drawWidth = context.canvas.width;\n var drawHeight = context.canvas.height;\n if (rotation) {\n var drawSize = Math.round(Math.sqrt(drawWidth * drawWidth + drawHeight * drawHeight));\n drawOffsetX = (drawSize - drawWidth) / 2;\n drawOffsetY = (drawSize - drawHeight) / 2;\n drawWidth = drawHeight = drawSize;\n }\n // resize and clear\n this.context.canvas.width = drawWidth;\n this.context.canvas.height = drawHeight;\n replayContext = this.context;\n } else {\n replayContext = context;\n }\n\n var alpha = replayContext.globalAlpha;\n if (!transparentLayer) {\n // for performance reasons, context.save / context.restore is not used\n // to save and restore the transformation matrix and the opacity.\n // see http://jsperf.com/context-save-restore-versus-variable\n replayContext.globalAlpha = layerState.opacity;\n }\n\n if (replayContext != context) {\n replayContext.translate(drawOffsetX, drawOffsetY);\n }\n\n var viewHints = frameState.viewHints;\n var snapToPixel = !(viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]);\n var width = frameState.size[0] * pixelRatio;\n var height = frameState.size[1] * pixelRatio;\n rotateAtOffset(replayContext, -rotation,\n width / 2, height / 2);\n replayGroup.replay(replayContext, transform, rotation, skippedFeatureUids, snapToPixel);\n if (vectorSource.getWrapX() && projection.canWrapX() &&\n !containsExtent(projectionExtent, extent)) {\n var startX = extent[0];\n var worldWidth = getWidth(projectionExtent);\n var world = 0;\n var offsetX;\n while (startX < projectionExtent[0]) {\n --world;\n offsetX = worldWidth * world;\n transform = this.getTransform(frameState, offsetX);\n replayGroup.replay(replayContext, transform, rotation, skippedFeatureUids, snapToPixel);\n startX += worldWidth;\n }\n world = 0;\n startX = extent[2];\n while (startX > projectionExtent[2]) {\n ++world;\n offsetX = worldWidth * world;\n transform = this.getTransform(frameState, offsetX);\n replayGroup.replay(replayContext, transform, rotation, skippedFeatureUids, snapToPixel);\n startX -= worldWidth;\n }\n }\n rotateAtOffset(replayContext, rotation,\n width / 2, height / 2);\n\n if (hasRenderListeners) {\n this.dispatchRenderEvent(replayContext, frameState, transform);\n }\n if (replayContext != context) {\n if (transparentLayer) {\n var mainContextAlpha = context.globalAlpha;\n context.globalAlpha = layerState.opacity;\n context.drawImage(replayContext.canvas, -drawOffsetX, -drawOffsetY);\n context.globalAlpha = mainContextAlpha;\n } else {\n context.drawImage(replayContext.canvas, -drawOffsetX, -drawOffsetY);\n }\n replayContext.translate(-drawOffsetX, -drawOffsetY);\n }\n\n if (!transparentLayer) {\n replayContext.globalAlpha = alpha;\n }\n }\n\n if (clipped) {\n context.restore();\n }\n };\n\n /**\n * @inheritDoc\n */\n CanvasVectorLayerRenderer.prototype.composeFrame = function composeFrame (frameState, layerState, context) {\n var transform = this.getTransform(frameState, 0);\n this.preCompose(context, frameState, transform);\n this.compose(context, frameState, layerState);\n this.postCompose(context, frameState, layerState, transform);\n };\n\n /**\n * @inheritDoc\n */\n CanvasVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (coordinate, frameState, hitTolerance, callback, thisArg) {\n if (!this.replayGroup_) {\n return undefined;\n } else {\n var resolution = frameState.viewState.resolution;\n var rotation = frameState.viewState.rotation;\n var layer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n /** @type {!Object<string, boolean>} */\n var features = {};\n var result = this.replayGroup_.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {},\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @return {?} Callback result.\n */\n function(feature) {\n var key = getUid(feature);\n if (!(key in features)) {\n features[key] = true;\n return callback.call(thisArg, feature, layer);\n }\n }, null);\n return result;\n }\n };\n\n /**\n * @param {import(\"../../events/Event.js\").default} event Event.\n */\n CanvasVectorLayerRenderer.prototype.handleFontsChanged_ = function handleFontsChanged_ (event) {\n var layer = this.getLayer();\n if (layer.getVisible() && this.replayGroup_) {\n layer.changed();\n }\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 handleStyleImageChange_ (event) {\n this.renderIfReadyAndVisible();\n };\n\n /**\n * @inheritDoc\n */\n CanvasVectorLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState) {\n var vectorLayer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n var vectorSource = /** @type {import(\"../../source/Vector.js\").default} */ (vectorLayer.getSource());\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\n if (!this.dirty_ && (!updateWhileAnimating && animating) ||\n (!updateWhileInteracting && interacting)) {\n return true;\n }\n\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\n if (vectorLayerRenderOrder === undefined) {\n vectorLayerRenderOrder = defaultRenderOrder;\n }\n\n var extent = buffer(frameStateExtent,\n vectorLayerRenderBuffer * resolution);\n var projectionExtent = viewState.projection.getExtent();\n\n if (vectorSource.getWrapX() && viewState.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 }\n\n if (!this.dirty_ &&\n this.renderedResolution_ == resolution &&\n this.renderedRevision_ == vectorLayerRevision &&\n this.renderedRenderOrder_ == vectorLayerRenderOrder &&\n containsExtent(this.renderedExtent_, extent)) {\n this.replayGroupChanged = false;\n return true;\n }\n\n this.replayGroup_ = null;\n\n this.dirty_ = false;\n\n var replayGroup = new CanvasReplayGroup(\n getRenderTolerance(resolution, pixelRatio), extent, resolution,\n pixelRatio, vectorSource.getOverlaps(), this.declutterTree_, vectorLayer.getRenderBuffer());\n vectorSource.loadFeatures(extent, resolution, projection);\n /**\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @this {CanvasVectorLayerRenderer}\n */\n var render = 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(\n feature, resolution, pixelRatio, styles, replayGroup);\n this.dirty_ = this.dirty_ || dirty;\n }\n }.bind(this);\n if (vectorLayerRenderOrder) {\n /** @type {Array<import(\"../../Feature.js\").default>} */\n var features = [];\n vectorSource.forEachFeatureInExtent(extent,\n /**\n * @param {import(\"../../Feature.js\").default} feature Feature.\n */\n function(feature) {\n features.push(feature);\n });\n features.sort(vectorLayerRenderOrder);\n for (var i = 0, ii = features.length; i < ii; ++i) {\n render(features[i]);\n }\n } else {\n vectorSource.forEachFeatureInExtent(extent, render);\n }\n replayGroup.finish();\n\n this.renderedResolution_ = resolution;\n this.renderedRevision_ = vectorLayerRevision;\n this.renderedRenderOrder_ = vectorLayerRenderOrder;\n this.renderedExtent_ = extent;\n this.replayGroup_ = replayGroup;\n\n this.replayGroupChanged = true;\n return true;\n };\n\n /**\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\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/ReplayGroup.js\").default} replayGroup Replay group.\n * @return {boolean} `true` if an image is loading.\n */\n CanvasVectorLayerRenderer.prototype.renderFeature = function renderFeature$1 (feature, resolution, pixelRatio, styles, replayGroup) {\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 = renderFeature(\n replayGroup, feature, styles[i],\n getSquaredRenderTolerance(resolution, pixelRatio),\n this.handleStyleImageChange_, this) || loading;\n }\n } else {\n loading = renderFeature(\n replayGroup, feature, styles,\n getSquaredRenderTolerance(resolution, pixelRatio),\n this.handleStyleImageChange_, this);\n }\n return loading;\n };\n\n return CanvasVectorLayerRenderer;\n}(CanvasLayerRenderer));\n\n\n/**\n * Determine if this renderer handles the provided layer.\n * @param {import(\"../../layer/Layer.js\").default} layer The candidate layer.\n * @return {boolean} The renderer can render the layer.\n */\nCanvasVectorLayerRenderer['handles'] = function(layer) {\n return layer.getType() === LayerType.VECTOR;\n};\n\n\n/**\n * Create a layer renderer.\n * @param {import(\"../Map.js\").default} mapRenderer The map renderer.\n * @param {import(\"../../layer/Layer.js\").default} layer The layer to be rendererd.\n * @return {CanvasVectorLayerRenderer} The layer renderer.\n */\nCanvasVectorLayerRenderer['create'] = function(mapRenderer, layer) {\n return new CanvasVectorLayerRenderer(/** @type {import(\"../../layer/Vector.js\").default} */ (layer));\n};\n\n\nexport default CanvasVectorLayerRenderer;\n\n//# sourceMappingURL=VectorLayer.js.map","/**\n * @module ol/layer/VectorTileRenderType\n */\n\n/**\n * @enum {string}\n * Render mode for vector tiles:\n * * `'image'`: 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 * * `'hybrid'`: 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 * * `'vector'`: Vector tiles are rendered as vectors. Most accurate rendering\n * even during animations, but slower performance than the other options.\n * @api\n */\nexport default {\n IMAGE: 'image',\n HYBRID: 'hybrid',\n VECTOR: 'vector'\n};\n\n//# sourceMappingURL=VectorTileRenderType.js.map","/**\n * @module ol/renderer/canvas/VectorTileLayer\n */\nimport {getUid} from '../../util.js';\nimport LayerType from '../../LayerType.js';\nimport TileState from '../../TileState.js';\nimport ViewHint from '../../ViewHint.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {listen, unlisten} from '../../events.js';\nimport EventType from '../../events/EventType.js';\nimport rbush from 'rbush';\nimport {buffer, containsCoordinate, equals, getIntersection, getTopLeft, intersects} from '../../extent.js';\nimport VectorTileRenderType from '../../layer/VectorTileRenderType.js';\nimport {equivalent as equivalentProjection} from '../../proj.js';\nimport Units from '../../proj/Units.js';\nimport ReplayType from '../../render/ReplayType.js';\nimport {labelCache, rotateAtOffset} from '../../render/canvas.js';\nimport CanvasReplayGroup, {replayDeclutter} from '../../render/canvas/ReplayGroup.js';\nimport {ORDER} from '../../render/replay.js';\nimport CanvasTileLayerRenderer from './TileLayer.js';\nimport {getSquaredTolerance as getSquaredRenderTolerance, renderFeature} from '../vector.js';\nimport {\n create as createTransform,\n compose as composeTransform,\n reset as resetTransform,\n scale as scaleTransform,\n translate as translateTransform\n} from '../../transform.js';\n\n\n/**\n * @type {!Object<string, Array<import(\"../../render/ReplayType.js\").default>>}\n */\nvar IMAGE_REPLAYS = {\n 'image': [ReplayType.POLYGON, ReplayType.CIRCLE,\n ReplayType.LINE_STRING, ReplayType.IMAGE, ReplayType.TEXT],\n 'hybrid': [ReplayType.POLYGON, ReplayType.LINE_STRING]\n};\n\n\n/**\n * @type {!Object<string, Array<import(\"../../render/ReplayType.js\").default>>}\n */\nvar VECTOR_REPLAYS = {\n 'image': [ReplayType.DEFAULT],\n 'hybrid': [ReplayType.IMAGE, ReplayType.TEXT, ReplayType.DEFAULT],\n 'vector': ORDER\n};\n\n\n/**\n * @classdesc\n * Canvas renderer for vector tile layers.\n * @api\n */\nvar CanvasVectorTileLayerRenderer = /*@__PURE__*/(function (CanvasTileLayerRenderer) {\n function CanvasVectorTileLayerRenderer(layer) {\n\n CanvasTileLayerRenderer.call(this, layer, true);\n\n /**\n * Declutter tree.\n * @private\n */\n this.declutterTree_ = layer.getDeclutter() ? rbush(9, undefined) : null;\n\n /**\n * @private\n * @type {boolean}\n */\n this.dirty_ = false;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedLayerRevision_;\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.tmpTransform_ = createTransform();\n\n var renderMode = layer.getRenderMode();\n\n // Use lower resolution for pure vector rendering. Closest resolution otherwise.\n this.zDirection = renderMode === VectorTileRenderType.VECTOR ? 1 : 0;\n\n if (renderMode !== VectorTileRenderType.VECTOR) {\n this.context = createCanvasContext2D();\n }\n\n\n listen(labelCache, EventType.CLEAR, this.handleFontsChanged_, this);\n\n }\n\n if ( CanvasTileLayerRenderer ) CanvasVectorTileLayerRenderer.__proto__ = CanvasTileLayerRenderer;\n CanvasVectorTileLayerRenderer.prototype = Object.create( CanvasTileLayerRenderer && CanvasTileLayerRenderer.prototype );\n CanvasVectorTileLayerRenderer.prototype.constructor = CanvasVectorTileLayerRenderer;\n\n /**\n * @inheritDoc\n */\n CanvasVectorTileLayerRenderer.prototype.disposeInternal = function disposeInternal () {\n unlisten(labelCache, EventType.CLEAR, this.handleFontsChanged_, this);\n CanvasTileLayerRenderer.prototype.disposeInternal.call(this);\n };\n\n /**\n * @inheritDoc\n */\n CanvasVectorTileLayerRenderer.prototype.getTile = function getTile (z, x, y, pixelRatio, projection) {\n var tile = CanvasTileLayerRenderer.prototype.getTile.call(this, z, x, y, pixelRatio, projection);\n if (tile.getState() === TileState.LOADED) {\n this.createReplayGroup_(/** @type {import(\"../../VectorImageTile.js\").default} */ (tile), pixelRatio, projection);\n if (this.context) {\n this.renderTileImage_(/** @type {import(\"../../VectorImageTile.js\").default} */ (tile), pixelRatio, projection);\n }\n }\n return tile;\n };\n\n /**\n * @inheritDoc\n */\n CanvasVectorTileLayerRenderer.prototype.getTileImage = function getTileImage (tile) {\n var tileLayer = /** @type {import(\"../../layer/Tile.js\").default} */ (this.getLayer());\n return /** @type {import(\"../../VectorImageTile.js\").default} */ (tile).getImage(tileLayer);\n };\n\n /**\n * @inheritDoc\n */\n CanvasVectorTileLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState) {\n var layer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n var layerRevision = layer.getRevision();\n if (this.renderedLayerRevision_ != layerRevision) {\n this.renderedTiles.length = 0;\n }\n this.renderedLayerRevision_ = layerRevision;\n return CanvasTileLayerRenderer.prototype.prepareFrame.call(this, frameState, layerState);\n };\n\n /**\n * @param {import(\"../../VectorImageTile.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.createReplayGroup_ = function createReplayGroup_ (tile, pixelRatio, projection) {\n var this$1 = this;\n\n var layer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n var revision = layer.getRevision();\n var renderOrder = /** @type {import(\"../../render.js\").OrderFunction} */ (layer.getRenderOrder()) || null;\n\n var replayState = tile.getReplayState(layer);\n if (!replayState.dirty && replayState.renderedRevision == revision &&\n replayState.renderedRenderOrder == renderOrder) {\n return;\n }\n\n var source = /** @type {import(\"../../source/VectorTile.js\").default} */ (layer.getSource());\n var sourceTileGrid = source.getTileGrid();\n var tileGrid = source.getTileGridForProjection(projection);\n var resolution = tileGrid.getResolution(tile.tileCoord[0]);\n var tileExtent = tile.extent;\n\n var loop = function ( t, tt ) {\n var sourceTile = tile.getTile(tile.tileKeys[t]);\n if (sourceTile.getState() != TileState.LOADED) {\n return;\n }\n\n var sourceTileCoord = sourceTile.tileCoord;\n var sourceTileExtent = sourceTileGrid.getTileCoordExtent(sourceTileCoord);\n var sharedExtent = getIntersection(tileExtent, sourceTileExtent);\n var bufferedExtent = equals(sourceTileExtent, sharedExtent) ? null :\n buffer(sharedExtent, layer.getRenderBuffer() * resolution, this$1.tmpExtent);\n var tileProjection = sourceTile.getProjection();\n var reproject = false;\n if (!equivalentProjection(projection, tileProjection)) {\n reproject = true;\n sourceTile.setProjection(projection);\n }\n replayState.dirty = false;\n var replayGroup = new CanvasReplayGroup(0, sharedExtent, resolution,\n pixelRatio, source.getOverlaps(), this$1.declutterTree_, layer.getRenderBuffer());\n var squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);\n\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, replayGroup);\n this.dirty_ = this.dirty_ || dirty;\n replayState.dirty = replayState.dirty || dirty;\n }\n };\n\n var features = sourceTile.getFeatures();\n if (renderOrder && renderOrder !== replayState.renderedRenderOrder) {\n features.sort(renderOrder);\n }\n for (var i = 0, ii = features.length; i < ii; ++i) {\n var feature = features[i];\n if (reproject) {\n if (tileProjection.getUnits() == Units.TILE_PIXELS) {\n // projected tile extent\n tileProjection.setWorldExtent(sourceTileExtent);\n // tile extent in tile pixel space\n tileProjection.setExtent(sourceTile.getExtent());\n }\n feature.getGeometry().transform(tileProjection, projection);\n }\n if (!bufferedExtent || intersects(bufferedExtent, feature.getGeometry().getExtent())) {\n render.call(this$1, feature);\n }\n }\n replayGroup.finish();\n sourceTile.setReplayGroup(layer, tile.tileCoord.toString(), replayGroup);\n };\n\n for (var t = 0, tt = tile.tileKeys.length; t < tt; ++t) loop( t, tt );\n replayState.renderedRevision = revision;\n replayState.renderedRenderOrder = renderOrder;\n };\n\n /**\n * @inheritDoc\n */\n CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (coordinate, frameState, hitTolerance, callback, thisArg) {\n var resolution = frameState.viewState.resolution;\n var rotation = frameState.viewState.rotation;\n hitTolerance = hitTolerance == undefined ? 0 : hitTolerance;\n var layer = this.getLayer();\n /** @type {!Object<string, boolean>} */\n var features = {};\n\n var renderedTiles = /** @type {Array<import(\"../../VectorImageTile.js\").default>} */ (this.renderedTiles);\n\n var bufferedExtent, found;\n var i, ii;\n for (i = 0, ii = renderedTiles.length; i < ii; ++i) {\n var tile = renderedTiles[i];\n bufferedExtent = buffer(tile.extent, hitTolerance * resolution, bufferedExtent);\n if (!containsCoordinate(bufferedExtent, coordinate)) {\n continue;\n }\n for (var t = 0, tt = tile.tileKeys.length; t < tt; ++t) {\n var sourceTile = tile.getTile(tile.tileKeys[t]);\n if (sourceTile.getState() != TileState.LOADED) {\n continue;\n }\n var replayGroup = /** @type {CanvasReplayGroup} */ (sourceTile.getReplayGroup(layer,\n tile.tileCoord.toString()));\n found = found || replayGroup.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {},\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @return {?} Callback result.\n */\n function(feature) {\n var key = getUid(feature);\n if (!(key in features)) {\n features[key] = true;\n return callback.call(thisArg, feature, layer);\n }\n }, null);\n }\n }\n return found;\n };\n\n /**\n * @param {import(\"../../VectorTile.js\").default} tile Tile.\n * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n * @return {import(\"../../transform.js\").Transform} transform Transform.\n * @private\n */\n CanvasVectorTileLayerRenderer.prototype.getReplayTransform_ = function getReplayTransform_ (tile, frameState) {\n var layer = this.getLayer();\n var source = /** @type {import(\"../../source/VectorTile.js\").default} */ (layer.getSource());\n var tileGrid = source.getTileGrid();\n var tileCoord = tile.tileCoord;\n var tileResolution = tileGrid.getResolution(tileCoord[0]);\n var viewState = frameState.viewState;\n var pixelRatio = frameState.pixelRatio;\n var renderResolution = viewState.resolution / pixelRatio;\n var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent);\n var center = viewState.center;\n var origin = getTopLeft(tileExtent);\n var size = frameState.size;\n var offsetX = Math.round(pixelRatio * size[0] / 2);\n var offsetY = Math.round(pixelRatio * size[1] / 2);\n return composeTransform(this.tmpTransform_,\n offsetX, offsetY,\n tileResolution / renderResolution, tileResolution / renderResolution,\n viewState.rotation,\n (origin[0] - center[0]) / tileResolution,\n (center[1] - origin[1]) / tileResolution);\n };\n\n /**\n * @param {import(\"../../events/Event.js\").default} event Event.\n */\n CanvasVectorTileLayerRenderer.prototype.handleFontsChanged_ = function handleFontsChanged_ (event) {\n var layer = this.getLayer();\n if (layer.getVisible() && this.renderedLayerRevision_ !== undefined) {\n layer.changed();\n }\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 handleStyleImageChange_ (event) {\n this.renderIfReadyAndVisible();\n };\n\n /**\n * @inheritDoc\n */\n CanvasVectorTileLayerRenderer.prototype.postCompose = function postCompose (context, frameState, layerState) {\n var layer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n var renderMode = layer.getRenderMode();\n if (renderMode != VectorTileRenderType.IMAGE) {\n var declutterReplays = layer.getDeclutter() ? {} : null;\n var source = /** @type {import(\"../../source/VectorTile.js\").default} */ (layer.getSource());\n var replayTypes = VECTOR_REPLAYS[renderMode];\n var pixelRatio = frameState.pixelRatio;\n var rotation = frameState.viewState.rotation;\n var size = frameState.size;\n var offsetX, offsetY;\n if (rotation) {\n offsetX = Math.round(pixelRatio * size[0] / 2);\n offsetY = Math.round(pixelRatio * size[1] / 2);\n rotateAtOffset(context, -rotation, offsetX, offsetY);\n }\n if (declutterReplays) {\n this.declutterTree_.clear();\n }\n var viewHints = frameState.viewHints;\n var snapToPixel = !(viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]);\n var tiles = this.renderedTiles;\n var tileGrid = source.getTileGridForProjection(frameState.viewState.projection);\n var clips = [];\n var zs = [];\n for (var i = tiles.length - 1; i >= 0; --i) {\n var tile = /** @type {import(\"../../VectorImageTile.js\").default} */ (tiles[i]);\n if (tile.getState() == TileState.ABORT) {\n continue;\n }\n var tileCoord = tile.tileCoord;\n var worldOffset = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent)[0] - tile.extent[0];\n var transform = undefined;\n for (var t = 0, tt = tile.tileKeys.length; t < tt; ++t) {\n var sourceTile = tile.getTile(tile.tileKeys[t]);\n if (sourceTile.getState() != TileState.LOADED) {\n continue;\n }\n var replayGroup = /** @type {CanvasReplayGroup} */ (sourceTile.getReplayGroup(layer, tileCoord.toString()));\n if (!replayGroup || !replayGroup.hasReplays(replayTypes)) {\n // sourceTile was not yet loaded when this.createReplayGroup_() was\n // called, or it has no replays of the types we want to render\n continue;\n }\n if (!transform) {\n transform = this.getTransform(frameState, worldOffset);\n }\n var currentZ = sourceTile.tileCoord[0];\n var currentClip = replayGroup.getClipCoords(transform);\n context.save();\n context.globalAlpha = layerState.opacity;\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 < zs[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 replayGroup.replay(context, transform, rotation, {}, snapToPixel, replayTypes, declutterReplays);\n context.restore();\n clips.push(currentClip);\n zs.push(currentZ);\n }\n }\n if (declutterReplays) {\n replayDeclutter(declutterReplays, context, rotation, snapToPixel);\n }\n if (rotation) {\n rotateAtOffset(context, rotation,\n /** @type {number} */ (offsetX), /** @type {number} */ (offsetY));\n }\n }\n CanvasTileLayerRenderer.prototype.postCompose.call(this, context, frameState, layerState);\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/ReplayGroup.js\").default} replayGroup Replay group.\n * @return {boolean} `true` if an image is loading.\n */\n CanvasVectorTileLayerRenderer.prototype.renderFeature = function renderFeature$1 (feature, squaredTolerance, styles, replayGroup) {\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 = renderFeature(\n replayGroup, feature, styles[i], squaredTolerance,\n this.handleStyleImageChange_, this) || loading;\n }\n } else {\n loading = renderFeature(\n replayGroup, feature, styles, squaredTolerance,\n this.handleStyleImageChange_, this);\n }\n return loading;\n };\n\n /**\n * @param {import(\"../../VectorImageTile.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.renderTileImage_ = function renderTileImage_ (tile, pixelRatio, projection) {\n var layer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n var replayState = tile.getReplayState(layer);\n var revision = layer.getRevision();\n var replays = IMAGE_REPLAYS[layer.getRenderMode()];\n if (replays && replayState.renderedTileRevision !== revision) {\n replayState.renderedTileRevision = revision;\n var tileCoord = tile.wrappedTileCoord;\n var z = tileCoord[0];\n var source = /** @type {import(\"../../source/VectorTile.js\").default} */ (layer.getSource());\n var tileGrid = source.getTileGridForProjection(projection);\n var resolution = tileGrid.getResolution(z);\n var context = tile.getContext(layer);\n var size = source.getTilePixelSize(z, pixelRatio, projection);\n context.canvas.width = size[0];\n context.canvas.height = size[1];\n var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent);\n for (var i = 0, ii = tile.tileKeys.length; i < ii; ++i) {\n var sourceTile = tile.getTile(tile.tileKeys[i]);\n if (sourceTile.getState() != TileState.LOADED) {\n continue;\n }\n var pixelScale = pixelRatio / resolution;\n var transform = resetTransform(this.tmpTransform_);\n scaleTransform(transform, pixelScale, -pixelScale);\n translateTransform(transform, -tileExtent[0], -tileExtent[3]);\n var replayGroup = /** @type {CanvasReplayGroup} */ (sourceTile.getReplayGroup(layer,\n tile.tileCoord.toString()));\n replayGroup.replay(context, transform, 0, {}, true, replays);\n }\n }\n };\n\n return CanvasVectorTileLayerRenderer;\n}(CanvasTileLayerRenderer));\n\n\n/**\n * Determine if this renderer handles the provided layer.\n * @param {import(\"../../layer/Layer.js\").default} layer The candidate layer.\n * @return {boolean} The renderer can render the layer.\n */\nCanvasVectorTileLayerRenderer['handles'] = function(layer) {\n return layer.getType() === LayerType.VECTOR_TILE;\n};\n\n\n/**\n * Create a layer renderer.\n * @param {import(\"../Map.js\").default} mapRenderer The map renderer.\n * @param {import(\"../../layer/Layer.js\").default} layer The layer to be rendererd.\n * @return {CanvasVectorTileLayerRenderer} The layer renderer.\n */\nCanvasVectorTileLayerRenderer['create'] = function(mapRenderer, layer) {\n return new CanvasVectorTileLayerRenderer(/** @type {import(\"../../layer/VectorTile.js\").default} */ (layer));\n};\n\n\nexport default CanvasVectorTileLayerRenderer;\n\n//# sourceMappingURL=VectorTileLayer.js.map","/**\n * @module ol/Map\n */\nimport PluggableMap from './PluggableMap.js';\nimport {defaults as defaultControls} from './control/util.js';\nimport {defaults as defaultInteractions} from './interaction.js';\nimport {assign} from './obj.js';\nimport CanvasImageLayerRenderer from './renderer/canvas/ImageLayer.js';\nimport CanvasMapRenderer from './renderer/canvas/Map.js';\nimport CanvasTileLayerRenderer from './renderer/canvas/TileLayer.js';\nimport CanvasVectorLayerRenderer from './renderer/canvas/VectorLayer.js';\nimport CanvasVectorTileLayerRenderer from './renderer/canvas/VectorTileLayer.js';\n\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 * @fires import(\"./MapBrowserEvent.js\").MapBrowserEvent\n * @fires import(\"./MapEvent.js\").MapEvent\n * @fires module:ol/render/Event~RenderEvent#postcompose\n * @fires module:ol/render/Event~RenderEvent#precompose\n * @api\n */\nvar Map = /*@__PURE__*/(function (PluggableMap) {\n function Map(options) {\n options = assign({}, options);\n if (!options.controls) {\n options.controls = defaultControls();\n }\n if (!options.interactions) {\n options.interactions = defaultInteractions();\n }\n\n PluggableMap.call(this, options);\n }\n\n if ( PluggableMap ) Map.__proto__ = PluggableMap;\n Map.prototype = Object.create( PluggableMap && PluggableMap.prototype );\n Map.prototype.constructor = Map;\n\n Map.prototype.createRenderer = function createRenderer () {\n var renderer = new CanvasMapRenderer(this);\n renderer.registerLayerRenderers([\n CanvasImageLayerRenderer,\n CanvasTileLayerRenderer,\n CanvasVectorLayerRenderer,\n CanvasVectorTileLayerRenderer\n ]);\n return renderer;\n };\n\n return Map;\n}(PluggableMap));\n\n\nexport default Map;\n\n//# sourceMappingURL=Map.js.map","/**\n * @module ol/layer/TileProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n PRELOAD: 'preload',\n USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError'\n};\n\n//# sourceMappingURL=TileProperty.js.map","/**\n * @module ol/layer/Tile\n */\nimport LayerType from '../LayerType.js';\nimport Layer from './Layer.js';\nimport TileProperty from './TileProperty.js';\nimport {assign} from '../obj.js';\n\n\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} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {import(\"../source/Tile.js\").default} [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 module:ol/Map#addLayer}.\n * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n */\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 * @api\n */\nvar TileLayer = /*@__PURE__*/(function (Layer) {\n function TileLayer(opt_options) {\n var options = opt_options ? opt_options : {};\n\n var baseOptions = assign({}, options);\n\n delete baseOptions.preload;\n delete baseOptions.useInterimTilesOnError;\n Layer.call(this, baseOptions);\n\n this.setPreload(options.preload !== undefined ? options.preload : 0);\n this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined ?\n options.useInterimTilesOnError : true);\n\n /**\n * The layer type.\n * @protected\n * @type {import(\"../LayerType.js\").default}\n */\n this.type = LayerType.TILE;\n\n }\n\n if ( Layer ) TileLayer.__proto__ = Layer;\n TileLayer.prototype = Object.create( Layer && Layer.prototype );\n TileLayer.prototype.constructor = TileLayer;\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 TileLayer.prototype.getPreload = function getPreload () {\n return /** @type {number} */ (this.get(TileProperty.PRELOAD));\n };\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 TileLayer.prototype.setPreload = function setPreload (preload) {\n this.set(TileProperty.PRELOAD, preload);\n };\n\n /**\n * Whether we use interim tiles on error.\n * @return {boolean} Use interim tiles on error.\n * @observable\n * @api\n */\n TileLayer.prototype.getUseInterimTilesOnError = function getUseInterimTilesOnError () {\n return /** @type {boolean} */ (this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR));\n };\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 TileLayer.prototype.setUseInterimTilesOnError = function setUseInterimTilesOnError (useInterimTilesOnError) {\n this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n };\n\n return TileLayer;\n}(Layer));\n\n\n/**\n * Return the associated {@link module:ol/source/Tile tilesource} of the layer.\n * @function\n * @return {import(\"../source/Tile.js\").default} Source.\n * @api\n */\nTileLayer.prototype.getSource;\n\n\nexport default TileLayer;\n\n//# sourceMappingURL=Tile.js.map","/**\n * @module ol/Tile\n */\nimport TileState from './TileState.js';\nimport {easeIn} from './easing.js';\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\n\n\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)} LoadFunction\n * @api\n */\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\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\n/**\n * @classdesc\n * Base class for tiles.\n *\n * @abstract\n */\nvar Tile = /*@__PURE__*/(function (EventTarget) {\n function Tile(tileCoord, state, opt_options) {\n EventTarget.call(this);\n\n var options = opt_options ? opt_options : {};\n\n /**\n * @type {import(\"./tilecoord.js\").TileCoord}\n */\n this.tileCoord = tileCoord;\n\n /**\n * @protected\n * @type {TileState}\n */\n this.state = state;\n\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 /**\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 /**\n * The duration for the opacity transition.\n * @type {number}\n */\n this.transition_ = options.transition === undefined ? 250 : options.transition;\n\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\n }\n\n if ( EventTarget ) Tile.__proto__ = EventTarget;\n Tile.prototype = Object.create( EventTarget && EventTarget.prototype );\n Tile.prototype.constructor = Tile;\n\n /**\n * @protected\n */\n Tile.prototype.changed = function changed () {\n this.dispatchEvent(EventType.CHANGE);\n };\n\n /**\n * @return {string} Key.\n */\n Tile.prototype.getKey = function getKey () {\n return this.key + '/' + this.tileCoord;\n };\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 getInterimTile () {\n if (!this.interimTile) {\n //empty chain\n return this;\n }\n var tile = this.interimTile;\n\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 return tile;\n }\n tile = tile.interimTile;\n } while (tile);\n\n // we can not find a better tile\n return this;\n };\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 refreshInterimChain () {\n if (!this.interimTile) {\n return;\n }\n\n var tile = this.interimTile;\n var prev = /** @type {Tile} */ (this);\n\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 } 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 } 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 } else {\n prev = tile;\n }\n tile = prev.interimTile;\n } while (tile);\n };\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 getTileCoord () {\n return this.tileCoord;\n };\n\n /**\n * @return {TileState} State.\n */\n Tile.prototype.getState = function getState () {\n return this.state;\n };\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 {TileState} state State.\n * @api\n */\n Tile.prototype.setState = function setState (state) {\n this.state = state;\n this.changed();\n };\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 load () {};\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 getAlpha (id, time) {\n if (!this.transition_) {\n return 1;\n }\n\n var start = this.transitionStarts_[id];\n if (!start) {\n start = time;\n this.transitionStarts_[id] = start;\n } else if (start === -1) {\n return 1;\n }\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 /**\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 inTransition (id) {\n if (!this.transition_) {\n return false;\n }\n return this.transitionStarts_[id] !== -1;\n };\n\n /**\n * Mark a transition as complete.\n * @param {string} id An id for the renderer.\n */\n Tile.prototype.endTransition = function endTransition (id) {\n if (this.transition_) {\n this.transitionStarts_[id] = -1;\n }\n };\n\n return Tile;\n}(EventTarget));\n\n\nexport default Tile;\n\n//# sourceMappingURL=Tile.js.map","/**\n * @module ol/ImageTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nimport {createCanvasContext2D} from './dom.js';\nimport {listenOnce, unlistenByKey} from './events.js';\nimport EventType from './events/EventType.js';\n\n\nvar ImageTile = /*@__PURE__*/(function (Tile) {\n function ImageTile(tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) {\n\n Tile.call(this, tileCoord, state, opt_options);\n\n /**\n * @private\n * @type {?string}\n */\n this.crossOrigin_ = crossOrigin;\n\n /**\n * Image URI\n *\n * @private\n * @type {string}\n */\n this.src_ = src;\n\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 /**\n * @private\n * @type {Array<import(\"./events.js\").EventsKey>}\n */\n this.imageListenerKeys_ = null;\n\n /**\n * @private\n * @type {import(\"./Tile.js\").LoadFunction}\n */\n this.tileLoadFunction_ = tileLoadFunction;\n\n }\n\n if ( Tile ) ImageTile.__proto__ = Tile;\n ImageTile.prototype = Object.create( Tile && Tile.prototype );\n ImageTile.prototype.constructor = ImageTile;\n\n /**\n * @inheritDoc\n */\n ImageTile.prototype.disposeInternal = function disposeInternal () {\n if (this.state == TileState.LOADING) {\n this.unlistenImage_();\n this.image_ = getBlankImage();\n }\n if (this.interimTile) {\n this.interimTile.dispose();\n }\n this.state = TileState.ABORT;\n this.changed();\n Tile.prototype.disposeInternal.call(this);\n };\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 getImage () {\n return this.image_;\n };\n\n /**\n * @inheritDoc\n */\n ImageTile.prototype.getKey = function getKey () {\n return this.src_;\n };\n\n /**\n * Tracks loading or read errors.\n *\n * @private\n */\n ImageTile.prototype.handleImageError_ = function handleImageError_ () {\n this.state = TileState.ERROR;\n this.unlistenImage_();\n this.image_ = getBlankImage();\n this.changed();\n };\n\n /**\n * Tracks successful image load.\n *\n * @private\n */\n ImageTile.prototype.handleImageLoad_ = function handleImageLoad_ () {\n var image = /** @type {HTMLImageElement} */ (this.image_);\n if (image.naturalWidth && image.naturalHeight) {\n this.state = TileState.LOADED;\n } else {\n this.state = TileState.EMPTY;\n }\n this.unlistenImage_();\n this.changed();\n };\n\n /**\n * @inheritDoc\n * @api\n */\n ImageTile.prototype.load = function load () {\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.imageListenerKeys_ = [\n listenOnce(this.image_, EventType.ERROR,\n this.handleImageError_, this),\n listenOnce(this.image_, EventType.LOAD,\n this.handleImageLoad_, this)\n ];\n this.tileLoadFunction_(this, this.src_);\n }\n };\n\n /**\n * Discards event handlers which listen for load completion or errors.\n *\n * @private\n */\n ImageTile.prototype.unlistenImage_ = function unlistenImage_ () {\n this.imageListenerKeys_.forEach(unlistenByKey);\n this.imageListenerKeys_ = null;\n };\n\n return ImageTile;\n}(Tile));\n\n\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}\n\nexport default ImageTile;\n\n//# sourceMappingURL=ImageTile.js.map","/**\n * @module ol/tilecoord\n */\n\n\n/**\n * An array of three numbers representing the location of a tile in a tile\n * grid. The order is `z`, `x`, and `y`. `z` is the zoom level.\n * @typedef {Array<number>} TileCoord\n * @api\n */\n\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 } else {\n return [z, x, y];\n }\n}\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\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\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\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\n/**\n * @param {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\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\n if (tileGrid.getMinZoom() > z || z > tileGrid.getMaxZoom()) {\n return false;\n }\n var extent = tileGrid.getExtent();\n var tileRange;\n if (!extent) {\n tileRange = tileGrid.getFullTileRange(z);\n } else {\n tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n }\n if (!tileRange) {\n return true;\n } else {\n return tileRange.containsXY(x, y);\n }\n}\n\n//# sourceMappingURL=tilecoord.js.map","/**\n * @module ol/TileCache\n */\nimport LRUCache from './structs/LRUCache.js';\nimport {fromKey, getKey} from './tilecoord.js';\n\nvar TileCache = /*@__PURE__*/(function (LRUCache) {\n function TileCache(opt_highWaterMark) {\n\n LRUCache.call(this, opt_highWaterMark);\n\n }\n\n if ( LRUCache ) TileCache.__proto__ = LRUCache;\n TileCache.prototype = Object.create( LRUCache && LRUCache.prototype );\n TileCache.prototype.constructor = TileCache;\n\n /**\n * @param {!Object<string, import(\"./TileRange.js\").default>} usedTiles Used tiles.\n */\n TileCache.prototype.expireCache = function expireCache (usedTiles) {\n while (this.canExpireCache()) {\n var tile = this.peekLast();\n var zKey = tile.tileCoord[0].toString();\n if (zKey in usedTiles && usedTiles[zKey].contains(tile.tileCoord)) {\n break;\n } else {\n this.pop().dispose();\n }\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 pruneExceptNewestZ () {\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.dispose();\n }\n }, this);\n };\n\n return TileCache;\n}(LRUCache));\n\n\nexport default TileCache;\n\n//# sourceMappingURL=TileCache.js.map","/**\n * @module ol/reproj\n */\nimport {createCanvasContext2D} from './dom.js';\nimport {containsCoordinate, createEmpty, extend, getHeight, getTopLeft, getWidth} from './extent.js';\nimport {solveLinearSystem} from './math.js';\nimport {getPointResolution, transform} from './proj.js';\n\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,\n targetCenter, targetResolution) {\n\n var sourceCenter = transform(targetCenter, targetProj, sourceProj);\n\n // calculate the ideal resolution of the source data\n var sourceResolution = getPointResolution(targetProj, targetResolution, targetCenter);\n\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\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\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\n return sourceResolution;\n}\n\n\n/**\n * Enlarge the clipping triangle point by 1 pixel to ensure the edges overlap\n * in order to mask gaps caused by antialiasing.\n *\n * @param {number} centroidX Centroid of the triangle (x coordinate in pixels).\n * @param {number} centroidY Centroid of the triangle (y coordinate in pixels).\n * @param {number} x X coordinate of the point (in pixels).\n * @param {number} y Y coordinate of the point (in pixels).\n * @return {import(\"./coordinate.js\").Coordinate} New point 1 px farther from the centroid.\n */\nfunction enlargeClipPoint(centroidX, centroidY, x, y) {\n var dX = x - centroidX;\n var dY = y - centroidY;\n var distance = Math.sqrt(dX * dX + dY * dY);\n return [Math.round(x + dX / distance), Math.round(y + dY / distance)];\n}\n\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\n * Calculated triangulation.\n * @param {Array<{extent: import(\"./extent.js\").Extent,\n * image: (HTMLCanvasElement|HTMLImageElement|HTMLVideoElement)}>} sources\n * Array of sources.\n * @param {number} gutter Gutter of the sources.\n * @param {boolean=} opt_renderEdges Render reprojection edges.\n * @return {HTMLCanvasElement} Canvas with reprojected data.\n */\nexport function render(width, height, pixelRatio,\n sourceResolution, sourceExtent, targetResolution, targetExtent,\n triangulation, sources, gutter, opt_renderEdges) {\n\n var context = createCanvasContext2D(Math.round(pixelRatio * width),\n Math.round(pixelRatio * height));\n\n if (sources.length === 0) {\n return context.canvas;\n }\n\n context.scale(pixelRatio, pixelRatio);\n\n var sourceDataExtent = createEmpty();\n sources.forEach(function(src, i, arr) {\n extend(sourceDataExtent, src.extent);\n });\n\n var canvasWidthInUnits = getWidth(sourceDataExtent);\n var canvasHeightInUnits = getHeight(sourceDataExtent);\n var stitchContext = createCanvasContext2D(\n Math.round(pixelRatio * canvasWidthInUnits / sourceResolution),\n Math.round(pixelRatio * canvasHeightInUnits / sourceResolution));\n\n var stitchScale = pixelRatio / sourceResolution;\n\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\n stitchContext.drawImage(\n src.image,\n gutter, gutter,\n src.image.width - 2 * gutter, src.image.height - 2 * gutter,\n xPos * stitchScale, yPos * stitchScale,\n srcWidth * stitchScale, srcHeight * stitchScale);\n });\n\n var targetTopLeft = getTopLeft(targetExtent);\n\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 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\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\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\n context.save();\n context.beginPath();\n var centroidX = (u0 + u1 + u2) / 3;\n var centroidY = (v0 + v1 + v2) / 3;\n var p0 = enlargeClipPoint(centroidX, centroidY, u0, v0);\n var p1 = enlargeClipPoint(centroidX, centroidY, u1, v1);\n var p2 = enlargeClipPoint(centroidX, centroidY, u2, v2);\n\n context.moveTo(p1[0], p1[1]);\n context.lineTo(p0[0], p0[1]);\n context.lineTo(p2[0], p2[1]);\n context.clip();\n\n context.transform(\n affineCoefs[0], affineCoefs[2], affineCoefs[1], affineCoefs[3], u0, v0);\n\n context.translate(sourceDataExtent[0] - sourceNumericalShiftX,\n sourceDataExtent[3] - sourceNumericalShiftY);\n\n context.scale(sourceResolution / pixelRatio,\n -sourceResolution / pixelRatio);\n\n context.drawImage(stitchContext.canvas, 0, 0);\n context.restore();\n });\n\n if (opt_renderEdges) {\n context.save();\n\n context.strokeStyle = 'black';\n context.lineWidth = 1;\n\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\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\n context.restore();\n }\n return context.canvas;\n}\n\n//# sourceMappingURL=reproj.js.map","/**\n * @module ol/reproj/Triangulation\n */\nimport {boundingExtent, createEmpty, extendCoordinate, getBottomLeft, getBottomRight,\n getTopLeft, getTopRight, getWidth, intersects} from '../extent.js';\nimport {modulo} from '../math.js';\nimport {getTransform} from '../proj.js';\n\n\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\n * @property {Array<import(\"../coordinate.js\").Coordinate>} target\n */\n\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\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\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 = function Triangulation(sourceProj, targetProj, targetExtent, maxSourceExtent, errorThreshold) {\n\n /**\n * @type {import(\"../proj/Projection.js\").default}\n * @private\n */\n this.sourceProj_ = sourceProj;\n\n /**\n * @type {import(\"../proj/Projection.js\").default}\n * @private\n */\n this.targetProj_ = targetProj;\n\n /** @type {!Object<string, import(\"../coordinate.js\").Coordinate>} */\n var transformInvCache = {};\n var transformInv = getTransform(this.targetProj_, this.sourceProj_);\n\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 /**\n * @type {import(\"../extent.js\").Extent}\n * @private\n */\n this.maxSourceExtent_ = maxSourceExtent;\n\n /**\n * @type {number}\n * @private\n */\n this.errorThresholdSquared_ = errorThreshold * errorThreshold;\n\n /**\n * @type {Array<Triangle>}\n * @private\n */\n this.triangles_ = [];\n\n /**\n * Indicates that the triangulation crosses edge of the source projection.\n * @type {boolean}\n * @private\n */\n this.wrapsXInSource_ = false;\n\n /**\n * @type {boolean}\n * @private\n */\n this.canWrapXInSource_ = this.sourceProj_.canWrapX() &&\n !!maxSourceExtent &&\n !!this.sourceProj_.getExtent() &&\n (getWidth(maxSourceExtent) == getWidth(this.sourceProj_.getExtent()));\n\n /**\n * @type {?number}\n * @private\n */\n this.sourceWorldWidth_ = this.sourceProj_.getExtent() ?\n getWidth(this.sourceProj_.getExtent()) : null;\n\n /**\n * @type {?number}\n * @private\n */\n this.targetWorldWidth_ = this.targetProj_.getExtent() ?\n getWidth(this.targetProj_.getExtent()) : null;\n\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 this.addQuad_(\n destinationTopLeft, destinationTopRight,\n destinationBottomRight, destinationBottomLeft,\n sourceTopLeft, sourceTopRight, sourceBottomRight, sourceBottomLeft,\n MAX_SUBDIVISION);\n\n if (this.wrapsXInSource_) {\n var leftBound = Infinity;\n this.triangles_.forEach(function(triangle, i, arr) {\n leftBound = Math.min(leftBound,\n triangle.source[0][0], triangle.source[1][0], triangle.source[2][0]);\n });\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],\n triangle.source[2][0]) - leftBound > this.sourceWorldWidth_ / 2) {\n var newTriangle = [[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 if ((newTriangle[0][0] - leftBound) > this.sourceWorldWidth_ / 2) {\n newTriangle[0][0] -= this.sourceWorldWidth_;\n }\n if ((newTriangle[1][0] - leftBound) > this.sourceWorldWidth_ / 2) {\n newTriangle[1][0] -= this.sourceWorldWidth_;\n }\n if ((newTriangle[2][0] - leftBound) > this.sourceWorldWidth_ / 2) {\n newTriangle[2][0] -= this.sourceWorldWidth_;\n }\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(\n newTriangle[0][0], newTriangle[1][0], newTriangle[2][0]);\n var maxX = Math.max(\n 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\n transformInvCache = {};\n};\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 */\nTriangulation.prototype.addTriangle_ = function addTriangle_ (a, b, c, aSrc, bSrc, cSrc) {\n this.triangles_.push({\n source: [aSrc, bSrc, cSrc],\n target: [a, b, c]\n });\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 */\nTriangulation.prototype.addQuad_ = function addQuad_ (a, b, c, d, aSrc, bSrc, cSrc, dSrc, maxSubdivision) {\n\n var sourceQuadExtent = boundingExtent([aSrc, bSrc, cSrc, dSrc]);\n var sourceCoverageX = this.sourceWorldWidth_ ?\n getWidth(sourceQuadExtent) / this.sourceWorldWidth_ : null;\n var sourceWorldWidth = /** @type {number} */ (this.sourceWorldWidth_);\n\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 && sourceCoverageX < 1;\n\n var needsSubdivision = false;\n\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 = targetCoverageX > MAX_TRIANGLE_WIDTH ||\n needsSubdivision;\n }\n if (!wrapsX && this.sourceProj_.isGlobal() && sourceCoverageX) {\n needsSubdivision = sourceCoverageX > MAX_TRIANGLE_WIDTH ||\n needsSubdivision;\n }\n }\n\n if (!needsSubdivision && this.maxSourceExtent_) {\n if (!intersects(sourceQuadExtent, this.maxSourceExtent_)) {\n // whole quad outside source projection extent -> ignore\n return;\n }\n }\n\n if (!needsSubdivision) {\n if (!isFinite(aSrc[0]) || !isFinite(aSrc[1]) ||\n !isFinite(bSrc[0]) || !isFinite(bSrc[1]) ||\n !isFinite(cSrc[0]) || !isFinite(cSrc[1]) ||\n !isFinite(dSrc[0]) || !isFinite(dSrc[1])) {\n if (maxSubdivision > 0) {\n needsSubdivision = true;\n } else {\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\n var dx;\n if (wrapsX) {\n var centerSrcEstimX =\n (modulo(aSrc[0], sourceWorldWidth) +\n modulo(cSrc[0], sourceWorldWidth)) / 2;\n dx = centerSrcEstimX -\n modulo(centerSrc[0], sourceWorldWidth);\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\n this.addQuad_(\n a, b, bc, da, aSrc, bSrc, bcSrc, daSrc, maxSubdivision - 1);\n this.addQuad_(\n da, bc, c, d, daSrc, bcSrc, cSrc, dSrc, maxSubdivision - 1);\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\n this.addQuad_(\n a, ab, cd, d, aSrc, abSrc, cdSrc, dSrc, maxSubdivision - 1);\n this.addQuad_(\n ab, b, c, cd, abSrc, bSrc, cSrc, cdSrc, maxSubdivision - 1);\n }\n return;\n }\n }\n\n if (wrapsX) {\n if (!this.canWrapXInSource_) {\n return;\n }\n this.wrapsXInSource_ = true;\n }\n\n this.addTriangle_(a, c, d, aSrc, cSrc, dSrc);\n this.addTriangle_(a, b, c, aSrc, bSrc, cSrc);\n};\n\n/**\n * Calculates extent of the 'source' coordinates from all the triangles.\n *\n * @return {import(\"../extent.js\").Extent} Calculated extent.\n */\nTriangulation.prototype.calculateSourceExtent = function calculateSourceExtent () {\n var extent = createEmpty();\n\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\n return extent;\n};\n\n/**\n * @return {Array<Triangle>} Array of the calculated triangles.\n */\nTriangulation.prototype.getTriangles = function getTriangles () {\n return this.triangles_;\n};\n\nexport default Triangulation;\n\n//# sourceMappingURL=Triangulation.js.map","/**\n * @module ol/reproj/Tile\n */\nimport {ERROR_THRESHOLD} from './common.js';\n\nimport Tile from '../Tile.js';\nimport TileState from '../TileState.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {getArea, getCenter, getIntersection} from '../extent.js';\nimport {clamp} from '../math.js';\nimport {calculateSourceResolution, render as renderReprojected} from '../reproj.js';\nimport Triangulation from './Triangulation.js';\n\n\n/**\n * @typedef {function(number, number, number, number) : import(\"../Tile.js\").default} FunctionType\n */\n\n\n/**\n * @classdesc\n * Class encapsulating single reprojected tile.\n * See {@link module:ol/source/TileImage~TileImage}.\n *\n */\nvar ReprojTile = /*@__PURE__*/(function (Tile) {\n function ReprojTile(\n sourceProj,\n sourceTileGrid,\n targetProj,\n targetTileGrid,\n tileCoord,\n wrappedTileCoord,\n pixelRatio,\n gutter,\n getTileFunction,\n opt_errorThreshold,\n opt_renderEdges\n ) {\n Tile.call(this, tileCoord, TileState.IDLE);\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderEdges_ = opt_renderEdges !== undefined ? opt_renderEdges : false;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @private\n * @type {number}\n */\n this.gutter_ = gutter;\n\n /**\n * @private\n * @type {HTMLCanvasElement}\n */\n this.canvas_ = null;\n\n /**\n * @private\n * @type {import(\"../tilegrid/TileGrid.js\").default}\n */\n this.sourceTileGrid_ = sourceTileGrid;\n\n /**\n * @private\n * @type {import(\"../tilegrid/TileGrid.js\").default}\n */\n this.targetTileGrid_ = targetTileGrid;\n\n /**\n * @private\n * @type {import(\"../tilecoord.js\").TileCoord}\n */\n this.wrappedTileCoord_ = wrappedTileCoord ? wrappedTileCoord : tileCoord;\n\n /**\n * @private\n * @type {!Array<import(\"../Tile.js\").default>}\n */\n this.sourceTiles_ = [];\n\n /**\n * @private\n * @type {Array<import(\"../events.js\").EventsKey>}\n */\n this.sourcesListenerKeys_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.sourceZ_ = 0;\n\n var targetExtent = targetTileGrid.getTileCoordExtent(this.wrappedTileCoord_);\n var maxTargetExtent = this.targetTileGrid_.getExtent();\n var maxSourceExtent = this.sourceTileGrid_.getExtent();\n\n var limitedTargetExtent = maxTargetExtent ?\n getIntersection(targetExtent, maxTargetExtent) : targetExtent;\n\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;\n }\n\n var sourceProjExtent = sourceProj.getExtent();\n if (sourceProjExtent) {\n if (!maxSourceExtent) {\n maxSourceExtent = sourceProjExtent;\n } else {\n maxSourceExtent = getIntersection(maxSourceExtent, sourceProjExtent);\n }\n }\n\n var targetResolution = targetTileGrid.getResolution(\n this.wrappedTileCoord_[0]);\n\n var targetCenter = getCenter(limitedTargetExtent);\n var sourceResolution = calculateSourceResolution(\n sourceProj, targetProj, targetCenter, targetResolution);\n\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;\n }\n\n var errorThresholdInPixels = opt_errorThreshold !== undefined ?\n opt_errorThreshold : ERROR_THRESHOLD;\n\n /**\n * @private\n * @type {!import(\"./Triangulation.js\").default}\n */\n this.triangulation_ = new Triangulation(\n sourceProj, targetProj, limitedTargetExtent, maxSourceExtent,\n sourceResolution * errorThresholdInPixels);\n\n if (this.triangulation_.getTriangles().length === 0) {\n // no valid triangles -> EMPTY\n this.state = TileState.EMPTY;\n return;\n }\n\n this.sourceZ_ = sourceTileGrid.getZForResolution(sourceResolution);\n var sourceExtent = this.triangulation_.calculateSourceExtent();\n\n if (maxSourceExtent) {\n if (sourceProj.canWrapX()) {\n sourceExtent[1] = clamp(\n sourceExtent[1], maxSourceExtent[1], maxSourceExtent[3]);\n sourceExtent[3] = clamp(\n sourceExtent[3], maxSourceExtent[1], maxSourceExtent[3]);\n } else {\n sourceExtent = getIntersection(sourceExtent, maxSourceExtent);\n }\n }\n\n if (!getArea(sourceExtent)) {\n this.state = TileState.EMPTY;\n } else {\n var sourceRange = sourceTileGrid.getTileRangeForExtentAndZ(\n sourceExtent, this.sourceZ_);\n\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\n if (this.sourceTiles_.length === 0) {\n this.state = TileState.EMPTY;\n }\n }\n }\n\n if ( Tile ) ReprojTile.__proto__ = Tile;\n ReprojTile.prototype = Object.create( Tile && Tile.prototype );\n ReprojTile.prototype.constructor = ReprojTile;\n\n /**\n * @inheritDoc\n */\n ReprojTile.prototype.disposeInternal = function disposeInternal () {\n if (this.state == TileState.LOADING) {\n this.unlistenSources_();\n }\n Tile.prototype.disposeInternal.call(this);\n };\n\n /**\n * Get the HTML Canvas element for this tile.\n * @return {HTMLCanvasElement} Canvas.\n */\n ReprojTile.prototype.getImage = function getImage () {\n return this.canvas_;\n };\n\n /**\n * @private\n */\n ReprojTile.prototype.reproject_ = function reproject_ () {\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\n if (sources.length === 0) {\n this.state = TileState.ERROR;\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\n var targetExtent = this.targetTileGrid_.getTileCoordExtent(\n this.wrappedTileCoord_);\n this.canvas_ = renderReprojected(width, height, this.pixelRatio_,\n sourceResolution, this.sourceTileGrid_.getExtent(),\n targetResolution, targetExtent, this.triangulation_, sources,\n this.gutter_, this.renderEdges_);\n\n this.state = TileState.LOADED;\n }\n this.changed();\n };\n\n /**\n * @inheritDoc\n */\n ReprojTile.prototype.load = function load () {\n if (this.state == TileState.IDLE) {\n this.state = TileState.LOADING;\n this.changed();\n\n var leftToLoad = 0;\n\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++;\n\n var sourceListenKey = listen(tile, EventType.CHANGE,\n function(e) {\n var state = tile.getState();\n if (state == TileState.LOADED ||\n state == TileState.ERROR ||\n state == TileState.EMPTY) {\n unlistenByKey(sourceListenKey);\n leftToLoad--;\n if (leftToLoad === 0) {\n this.unlistenSources_();\n this.reproject_();\n }\n }\n }, this);\n this.sourcesListenerKeys_.push(sourceListenKey);\n }\n }.bind(this));\n\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 if (leftToLoad === 0) {\n setTimeout(this.reproject_.bind(this), 0);\n }\n }\n };\n\n /**\n * @private\n */\n ReprojTile.prototype.unlistenSources_ = function unlistenSources_ () {\n this.sourcesListenerKeys_.forEach(unlistenByKey);\n this.sourcesListenerKeys_ = null;\n };\n\n return ReprojTile;\n}(Tile));\n\n\nexport default ReprojTile;\n\n//# sourceMappingURL=Tile.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\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 } else {\n return template.replace(zRegEx, tileCoord[0].toString())\n .replace(xRegEx, tileCoord[1].toString())\n .replace(yRegEx, function() {\n var y = -tileCoord[2] - 1;\n return y.toString();\n })\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];\n return y.toString();\n });\n }\n }\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\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 } 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\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\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;\n for (charCode = startCharCode; charCode <= stopCharCode; ++charCode) {\n urls.push(url.replace(match[0], String.fromCharCode(charCode)));\n }\n return urls;\n }\n match = match = /\\{(\\d+)-(\\d+)\\}/.exec(url);\n if (match) {\n // number range\n var stop = parseInt(match[2], 10);\n for (var i = parseInt(match[1], 10); i <= stop; i++) {\n urls.push(url.replace(match[0], i.toString()));\n }\n return urls;\n }\n urls.push(url);\n return urls;\n}\n\n//# sourceMappingURL=tileurlfunction.js.map","/**\n * @module ol/source/Source\n */\nimport {abstract} from '../util.js';\nimport BaseObject from '../Object.js';\nimport {get as getProjection} from '../proj.js';\nimport SourceState from './State.js';\n\n\n/**\n * A function that returns a string or an array of strings representing source\n * attributions.\n *\n * @typedef {function(import(\"../PluggableMap.js\").FrameState): (string|Array<string>)} Attribution\n */\n\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\n/**\n * @typedef {Object} Options\n * @property {AttributionLike} [attributions]\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {import(\"../proj.js\").ProjectionLike} projection\n * @property {SourceState} [state='ready']\n * @property {boolean} [wrapX=false]\n */\n\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 = /*@__PURE__*/(function (BaseObject) {\n function Source(options) {\n\n BaseObject.call(this);\n\n /**\n * @private\n * @type {import(\"../proj/Projection.js\").default}\n */\n this.projection_ = getProjection(options.projection);\n\n /**\n * @private\n * @type {?Attribution}\n */\n this.attributions_ = adaptAttributions(options.attributions);\n\n /**\n * @private\n * @type {boolean}\n */\n this.attributionsCollapsible_ = options.attributionsCollapsible !== undefined ?\n options.attributionsCollapsible : true;\n\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 /**\n * @private\n * @type {SourceState}\n */\n this.state_ = options.state !== undefined ?\n options.state : SourceState.READY;\n\n /**\n * @private\n * @type {boolean}\n */\n this.wrapX_ = options.wrapX !== undefined ? options.wrapX : false;\n\n }\n\n if ( BaseObject ) Source.__proto__ = BaseObject;\n Source.prototype = Object.create( BaseObject && BaseObject.prototype );\n Source.prototype.constructor = Source;\n\n /**\n * Get the attribution function for the source.\n * @return {?Attribution} Attribution function.\n */\n Source.prototype.getAttributions = function getAttributions () {\n return this.attributions_;\n };\n\n /**\n * @return {boolean} Aattributions are collapsible.\n */\n Source.prototype.getAttributionsCollapsible = function getAttributionsCollapsible () {\n return this.attributionsCollapsible_;\n };\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 getProjection () {\n return this.projection_;\n };\n\n /**\n * @abstract\n * @return {Array<number>|undefined} Resolutions.\n */\n Source.prototype.getResolutions = function getResolutions () {\n return abstract();\n };\n\n /**\n * Get the state of the source, see {@link module:ol/source/State~State} for possible states.\n * @return {SourceState} State.\n * @api\n */\n Source.prototype.getState = function getState () {\n return this.state_;\n };\n\n /**\n * @return {boolean|undefined} Wrap X.\n */\n Source.prototype.getWrapX = function getWrapX () {\n return this.wrapX_;\n };\n\n /**\n * Refreshes the source and finally dispatches a 'change' event.\n * @api\n */\n Source.prototype.refresh = function refresh () {\n this.changed();\n };\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 setAttributions (attributions) {\n this.attributions_ = adaptAttributions(attributions);\n this.changed();\n };\n\n /**\n * Set the state of the source.\n * @param {SourceState} state State.\n * @protected\n */\n Source.prototype.setState = function setState (state) {\n this.state_ = state;\n this.changed();\n };\n\n return Source;\n}(BaseObject));\n\n\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\n if (typeof attributionLike === 'function') {\n return attributionLike;\n }\n\n return function(frameState) {\n return [attributionLike];\n };\n}\n\n\nexport default Source;\n\n//# sourceMappingURL=Source.js.map","/**\n * @module ol/tilegrid/TileGrid\n */\nimport {DEFAULT_TILE_SIZE} from './common.js';\nimport {assert} from '../asserts.js';\nimport TileRange, {createOrUpdate as createOrUpdateTileRange} from '../TileRange.js';\nimport {isSorted, linearFindNearest} from '../array.js';\nimport {createOrUpdate, getTopLeft} from '../extent.js';\nimport {clamp} from '../math.js';\nimport {toSize} from '../size.js';\nimport {createOrUpdate as createOrUpdateTileCoord} from '../tilecoord.js';\n\n\n/**\n * @private\n * @type {import(\"../tilecoord.js\").TileCoord}\n */\nvar tmpTileCoord = [0, 0, 0];\n\n\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 upwards. 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 upwards. 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] Sizes.\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\n/**\n * @classdesc\n * Base class for setting the grid pattern for sources accessing tiled-image\n * servers.\n * @api\n */\nvar TileGrid = function TileGrid(options) {\n\n /**\n * @protected\n * @type {number}\n */\n this.minZoom = options.minZoom !== undefined ? options.minZoom : 0;\n\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\n\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 } else {\n if (this.resolutions_[i] / this.resolutions_[i + 1] !== zoomFactor) {\n zoomFactor = undefined;\n break;\n }\n }\n }\n }\n\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.zoomFactor_ = zoomFactor;\n\n\n /**\n * @protected\n * @type {number}\n */\n this.maxZoom = this.resolutions_.length - 1;\n\n /**\n * @private\n * @type {import(\"../coordinate.js\").Coordinate}\n */\n this.origin_ = options.origin !== undefined ? options.origin : null;\n\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,\n 20); // Number of `origins` and `resolutions` must be equal\n }\n\n var extent = options.extent;\n\n if (extent !== undefined &&\n !this.origin_ && !this.origins_) {\n this.origin_ = getTopLeft(extent);\n }\n\n assert(\n (!this.origin_ && this.origins_) || (this.origin_ && !this.origins_),\n 18); // Either `origin` or `origins` must be configured, never both\n\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,\n 19); // Number of `tileSizes` and `resolutions` must be equal\n }\n\n /**\n * @private\n * @type {number|import(\"../size.js\").Size}\n */\n this.tileSize_ = options.tileSize !== undefined ?\n options.tileSize :\n !this.tileSizes_ ? DEFAULT_TILE_SIZE : null;\n assert(\n (!this.tileSize_ && this.tileSizes_) ||\n (this.tileSize_ && !this.tileSizes_),\n 22); // Either `tileSize` or `tileSizes` must be configured, never both\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent}\n */\n this.extent_ = extent !== undefined ? extent : null;\n\n\n /**\n * @private\n * @type {Array<import(\"../TileRange.js\").default>}\n */\n this.fullTileRanges_ = null;\n\n /**\n * @private\n * @type {import(\"../size.js\").Size}\n */\n this.tmpSize_ = [0, 0];\n\n if (options.sizes !== undefined) {\n this.fullTileRanges_ = options.sizes.map(function(size, z) {\n var tileRange = new TileRange(\n Math.min(0, size[0]), Math.max(size[0] - 1, -1),\n Math.min(0, size[1]), Math.max(size[1] - 1, -1));\n return tileRange;\n }, this);\n } else if (extent) {\n this.calculateTileRanges_(extent);\n }\n\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)} callback Function called with each tile coordinate.\n * @api\n */\nTileGrid.prototype.forEachTileCoord = function forEachTileCoord (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/**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {function(this: T, number, import(\"../TileRange.js\").default): boolean} callback Callback.\n * @param {T=} opt_this The object to use as `this` in `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 * @template T\n */\nTileGrid.prototype.forEachTileCoordParentTileRange = function forEachTileCoordParentTileRange (tileCoord, callback, opt_this, 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 } 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 } else {\n tileRange = this.getTileRangeForExtentAndZ(tileCoordExtent, z, opt_tileRange);\n }\n if (callback.call(opt_this, z, tileRange)) {\n return true;\n }\n --z;\n }\n return false;\n};\n\n/**\n * Get the extent for this tile grid, if it was configured.\n * @return {import(\"../extent.js\").Extent} Extent.\n */\nTileGrid.prototype.getExtent = function getExtent () {\n return this.extent_;\n};\n\n/**\n * Get the maximum zoom level for the grid.\n * @return {number} Max zoom.\n * @api\n */\nTileGrid.prototype.getMaxZoom = function getMaxZoom () {\n return this.maxZoom;\n};\n\n/**\n * Get the minimum zoom level for the grid.\n * @return {number} Min zoom.\n * @api\n */\nTileGrid.prototype.getMinZoom = function getMinZoom () {\n return this.minZoom;\n};\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 */\nTileGrid.prototype.getOrigin = function getOrigin (z) {\n if (this.origin_) {\n return this.origin_;\n } else {\n return this.origins_[z];\n }\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 */\nTileGrid.prototype.getResolution = function getResolution (z) {\n return this.resolutions_[z];\n};\n\n/**\n * Get the list of resolutions for the tile grid.\n * @return {Array<number>} Resolutions.\n * @api\n */\nTileGrid.prototype.getResolutions = function getResolutions () {\n return this.resolutions_;\n};\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 */\nTileGrid.prototype.getTileCoordChildTileRange = function getTileCoordChildTileRange (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);\n return this.getTileRangeForExtentAndZ(\n tileCoordExtent, tileCoord[0] + 1, opt_tileRange);\n }\n return null;\n};\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 */\nTileGrid.prototype.getTileRangeExtent = function getTileRangeExtent (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/**\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 */\nTileGrid.prototype.getTileRangeForExtentAndZ = function getTileRangeForExtentAndZ (extent, z, opt_tileRange) {\n var tileCoord = tmpTileCoord;\n this.getTileCoordForXYAndZ_(extent[0], extent[1], z, false, tileCoord);\n var minX = tileCoord[1];\n var minY = tileCoord[2];\n this.getTileCoordForXYAndZ_(extent[2], extent[3], z, true, tileCoord);\n return createOrUpdateTileRange(minX, tileCoord[1], minY, tileCoord[2], opt_tileRange);\n};\n\n/**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @return {import(\"../coordinate.js\").Coordinate} Tile center.\n */\nTileGrid.prototype.getTileCoordCenter = function getTileCoordCenter (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/**\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 */\nTileGrid.prototype.getTileCoordExtent = function getTileCoordExtent (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] * 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/**\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 */\nTileGrid.prototype.getTileCoordForCoordAndResolution = function getTileCoordForCoordAndResolution (coordinate, resolution, opt_tileCoord) {\n return this.getTileCoordForXYAndResolution_(\n coordinate[0], coordinate[1], resolution, false, opt_tileCoord);\n};\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 */\nTileGrid.prototype.getTileCoordForXYAndResolution_ = function getTileCoordForXYAndResolution_ (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\n var adjustX = reverseIntersectionPolicy ? 0.5 : 0;\n var adjustY = reverseIntersectionPolicy ? 0 : 0.5;\n var xFromOrigin = Math.floor((x - origin[0]) / resolution + adjustX);\n var yFromOrigin = Math.floor((y - origin[1]) / resolution + adjustY);\n var tileCoordX = scale * xFromOrigin / tileSize[0];\n var tileCoordY = scale * yFromOrigin / tileSize[1];\n\n if (reverseIntersectionPolicy) {\n tileCoordX = Math.ceil(tileCoordX) - 1;\n tileCoordY = Math.ceil(tileCoordY) - 1;\n } else {\n tileCoordX = Math.floor(tileCoordX);\n tileCoordY = Math.floor(tileCoordY);\n }\n\n return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);\n};\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 */\nTileGrid.prototype.getTileCoordForXYAndZ_ = function getTileCoordForXYAndZ_ (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\n var adjustX = reverseIntersectionPolicy ? 0.5 : 0;\n var adjustY = reverseIntersectionPolicy ? 0 : 0.5;\n var xFromOrigin = Math.floor((x - origin[0]) / resolution + adjustX);\n var yFromOrigin = Math.floor((y - origin[1]) / resolution + adjustY);\n var tileCoordX = xFromOrigin / tileSize[0];\n var tileCoordY = yFromOrigin / tileSize[1];\n\n if (reverseIntersectionPolicy) {\n tileCoordX = Math.ceil(tileCoordX) - 1;\n tileCoordY = Math.ceil(tileCoordY) - 1;\n } else {\n tileCoordX = Math.floor(tileCoordX);\n tileCoordY = Math.floor(tileCoordY);\n }\n\n return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);\n};\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 */\nTileGrid.prototype.getTileCoordForCoordAndZ = function getTileCoordForCoordAndZ (coordinate, z, opt_tileCoord) {\n return this.getTileCoordForXYAndZ_(\n coordinate[0], coordinate[1], z, false, opt_tileCoord);\n};\n\n/**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @return {number} Tile resolution.\n */\nTileGrid.prototype.getTileCoordResolution = function getTileCoordResolution (tileCoord) {\n return this.resolutions_[tileCoord[0]];\n};\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 */\nTileGrid.prototype.getTileSize = function getTileSize (z) {\n if (this.tileSize_) {\n return this.tileSize_;\n } else {\n return this.tileSizes_[z];\n }\n};\n\n/**\n * @param {number} z Zoom level.\n * @return {import(\"../TileRange.js\").default} Extent tile range for the specified zoom level.\n */\nTileGrid.prototype.getFullTileRange = function getFullTileRange (z) {\n if (!this.fullTileRanges_) {\n return null;\n } else {\n return this.fullTileRanges_[z];\n }\n};\n\n/**\n * @param {number} resolution Resolution.\n * @param {number=} opt_direction If 0, the nearest resolution will be used.\n * If 1, the nearest lower resolution will be used. If -1, the nearest\n * higher resolution will be used. Default is 0.\n * @return {number} Z.\n * @api\n */\nTileGrid.prototype.getZForResolution = function getZForResolution (resolution, opt_direction) {\n var z = linearFindNearest(this.resolutions_, resolution, opt_direction || 0);\n return clamp(z, this.minZoom, this.maxZoom);\n};\n\n/**\n * @param {!import(\"../extent.js\").Extent} extent Extent for this tile grid.\n * @private\n */\nTileGrid.prototype.calculateTileRanges_ = function calculateTileRanges_ (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\n\nexport default TileGrid;\n\n//# sourceMappingURL=TileGrid.js.map","/**\n * @module ol/tilegrid\n */\nimport {DEFAULT_MAX_ZOOM, DEFAULT_TILE_SIZE} from './tilegrid/common.js';\nimport {toSize} from './size.js';\nimport {containsCoordinate, createOrUpdate, getCorner, getHeight, getWidth} from './extent.js';\nimport Corner from './extent/Corner.js';\nimport {get as getProjection, METERS_PER_UNIT} from './proj.js';\nimport Units from './proj/Units.js';\nimport TileGrid from './tilegrid/TileGrid.js';\n\n\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\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 } else {\n return tileCoord;\n }\n}\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 {Corner=} 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\n var resolutions = resolutionsFromExtent(extent, opt_maxZoom, opt_tileSize);\n\n return new TileGrid({\n extent: extent,\n origin: getCorner(extent, corner),\n resolutions: resolutions,\n tileSize: opt_tileSize\n });\n}\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. The zero level of the grid is defined by the resolution at which one tile fits in the\n * provided extent. If not provided, the extent of the EPSG:3857 projection is used.\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\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 /** @type {XYZOptions} */\n var xyzOptions = opt_options || {};\n\n var extent = xyzOptions.extent || getProjection('EPSG:3857').getExtent();\n\n /** @type {import(\"./tilegrid/TileGrid.js\").Options} */\n var gridOptions = {\n extent: extent,\n minZoom: xyzOptions.minZoom,\n tileSize: xyzOptions.tileSize,\n resolutions: resolutionsFromExtent(\n extent,\n xyzOptions.maxZoom,\n xyzOptions.tileSize\n )\n };\n return new TileGrid(gridOptions);\n}\n\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 * @return {!Array<number>} Resolutions array.\n */\nfunction resolutionsFromExtent(extent, opt_maxZoom, opt_tileSize) {\n var maxZoom = opt_maxZoom !== undefined ?\n opt_maxZoom : DEFAULT_MAX_ZOOM;\n\n var height = getHeight(extent);\n var width = getWidth(extent);\n\n var tileSize = toSize(opt_tileSize !== undefined ?\n opt_tileSize : DEFAULT_TILE_SIZE);\n var maxResolution = Math.max(\n width / tileSize[0], height / tileSize[1]);\n\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\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 {Corner=} 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\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\n//# sourceMappingURL=tilegrid.js.map","/**\n * @module ol/source/Tile\n */\nimport {abstract} from '../util.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport Event from '../events/Event.js';\nimport {equivalent} from '../proj.js';\nimport {toSize, scale as scaleSize} from '../size.js';\nimport Source from './Source.js';\nimport {getKeyZXY, withinExtentAndZ} from '../tilecoord.js';\nimport {wrapX, getForProjection as getTileGridForProjection} from '../tilegrid.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions]\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize]\n * @property {boolean} [opaque]\n * @property {number} [tilePixelRatio]\n * @property {import(\"../proj.js\").ProjectionLike} [projection]\n * @property {import(\"./State.js\").default} [state]\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid]\n * @property {boolean} [wrapX=true]\n * @property {number} [transition]\n * @property {string} [key]\n */\n\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 = /*@__PURE__*/(function (Source) {\n function TileSource(options) {\n\n Source.call(this, {\n attributions: options.attributions,\n attributionsCollapsible: options.attributionsCollapsible,\n projection: options.projection,\n state: options.state,\n wrapX: options.wrapX\n });\n\n /**\n * @private\n * @type {boolean}\n */\n this.opaque_ = options.opaque !== undefined ? options.opaque : false;\n\n /**\n * @private\n * @type {number}\n */\n this.tilePixelRatio_ = options.tilePixelRatio !== undefined ?\n options.tilePixelRatio : 1;\n\n /**\n * @protected\n * @type {import(\"../tilegrid/TileGrid.js\").default}\n */\n this.tileGrid = options.tileGrid !== undefined ? options.tileGrid : null;\n\n /**\n * @protected\n * @type {import(\"../TileCache.js\").default}\n */\n this.tileCache = new TileCache(options.cacheSize);\n\n /**\n * @protected\n * @type {import(\"../size.js\").Size}\n */\n this.tmpSize = [0, 0];\n\n /**\n * @private\n * @type {string}\n */\n this.key_ = options.key || '';\n\n /**\n * @protected\n * @type {import(\"../Tile.js\").Options}\n */\n this.tileOptions = {transition: options.transition};\n\n }\n\n if ( Source ) TileSource.__proto__ = Source;\n TileSource.prototype = Object.create( Source && Source.prototype );\n TileSource.prototype.constructor = TileSource;\n\n /**\n * @return {boolean} Can expire cache.\n */\n TileSource.prototype.canExpireCache = function canExpireCache () {\n return this.tileCache.canExpireCache();\n };\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @param {!Object<string, import(\"../TileRange.js\").default>} usedTiles Used tiles.\n */\n TileSource.prototype.expireCache = function expireCache (projection, usedTiles) {\n var tileCache = this.getTileCacheForProjection(projection);\n if (tileCache) {\n tileCache.expireCache(usedTiles);\n }\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 forEachLoadedTile (projection, z, tileRange, callback) {\n var tileCache = this.getTileCacheForProjection(projection);\n if (!tileCache) {\n return false;\n }\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 /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {number} Gutter.\n */\n TileSource.prototype.getGutterForProjection = function getGutterForProjection (projection) {\n return 0;\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 * @protected\n */\n TileSource.prototype.getKey = function getKey () {\n return this.key_;\n };\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 setKey (key) {\n if (this.key_ !== key) {\n this.key_ = key;\n this.changed();\n }\n };\n\n /**\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n * @return {boolean} Opaque.\n */\n TileSource.prototype.getOpaque = function getOpaque (projection) {\n return this.opaque_;\n };\n\n /**\n * @inheritDoc\n */\n TileSource.prototype.getResolutions = function getResolutions () {\n return this.tileGrid.getResolutions();\n };\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 getTile (z, x, y, pixelRatio, projection) {\n return abstract();\n };\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 getTileGrid () {\n return this.tileGrid;\n };\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 getTileGridForProjection$1 (projection) {\n if (!this.tileGrid) {\n return getTileGridForProjection(projection);\n } else {\n return this.tileGrid;\n }\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 getTileCacheForProjection (projection) {\n var thisProj = this.getProjection();\n if (thisProj && !equivalent(thisProj, projection)) {\n return null;\n } else {\n return this.tileCache;\n }\n };\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 getTilePixelRatio (pixelRatio) {\n return this.tilePixelRatio_;\n };\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 getTilePixelSize (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 } else {\n return scaleSize(tileSize, tilePixelRatio, this.tmpSize);\n }\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 getTileCoordForTileUrlFunction (tileCoord, opt_projection) {\n var projection = opt_projection !== undefined ?\n 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 /**\n * @inheritDoc\n */\n TileSource.prototype.refresh = function refresh () {\n this.tileCache.clear();\n this.changed();\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 useTile (z, x, y, projection) {};\n\n return TileSource;\n}(Source));\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Tile~TileSource} instances are instances of this\n * type.\n */\nexport var TileSourceEvent = /*@__PURE__*/(function (Event) {\n function TileSourceEvent(type, tile) {\n\n Event.call(this, type);\n\n /**\n * The tile related to the event.\n * @type {import(\"../Tile.js\").default}\n * @api\n */\n this.tile = tile;\n\n }\n\n if ( Event ) TileSourceEvent.__proto__ = Event;\n TileSourceEvent.prototype = Object.create( Event && Event.prototype );\n TileSourceEvent.prototype.constructor = TileSourceEvent;\n\n return TileSourceEvent;\n}(Event));\n\nexport default TileSource;\n\n//# sourceMappingURL=Tile.js.map","/**\n * @module ol/source/TileEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n\n /**\n * Triggered when a tile starts loading.\n * @event module:ol/source/Tile.TileSourceEvent#tileloadstart\n * @api\n */\n TILELOADSTART: 'tileloadstart',\n\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 /**\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\n//# sourceMappingURL=TileEventType.js.map","/**\n * @module ol/source/UrlTile\n */\nimport {getUid} from '../util.js';\nimport TileState from '../TileState.js';\nimport {expandUrl, createFromTemplates, nullTileUrlFunction} from '../tileurlfunction.js';\nimport TileSource, {TileSourceEvent} from './Tile.js';\nimport TileEventType from './TileEventType.js';\nimport {getKeyZXY} from '../tilecoord.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions]\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize]\n * @property {boolean} [opaque]\n * @property {import(\"../proj.js\").ProjectionLike} [projection]\n * @property {import(\"./State.js\").default} [state]\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid]\n * @property {import(\"../Tile.js\").LoadFunction} tileLoadFunction\n * @property {number} [tilePixelRatio]\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction]\n * @property {string} [url]\n * @property {Array<string>} [urls]\n * @property {boolean} [wrapX=true]\n * @property {number} [transition]\n * @property {string} [key]\n */\n\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 = /*@__PURE__*/(function (TileSource) {\n function UrlTile(options) {\n\n TileSource.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 });\n\n /**\n * @private\n * @type {boolean}\n */\n this.generateTileUrlFunction_ = !options.tileUrlFunction;\n\n /**\n * @protected\n * @type {import(\"../Tile.js\").LoadFunction}\n */\n this.tileLoadFunction = options.tileLoadFunction;\n\n /**\n * @protected\n * @type {import(\"../Tile.js\").UrlFunction}\n */\n this.tileUrlFunction = options.tileUrlFunction ? options.tileUrlFunction.bind(this) : nullTileUrlFunction;\n\n /**\n * @protected\n * @type {!Array<string>|null}\n */\n this.urls = null;\n\n if (options.urls) {\n this.setUrls(options.urls);\n } else if (options.url) {\n this.setUrl(options.url);\n }\n\n if (options.tileUrlFunction) {\n this.setTileUrlFunction(options.tileUrlFunction, this.key_);\n }\n\n /**\n * @private\n * @type {!Object<string, boolean>}\n */\n this.tileLoadingKeys_ = {};\n\n }\n\n if ( TileSource ) UrlTile.__proto__ = TileSource;\n UrlTile.prototype = Object.create( TileSource && TileSource.prototype );\n UrlTile.prototype.constructor = UrlTile;\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 getTileLoadFunction () {\n return this.tileLoadFunction;\n };\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 getTileUrlFunction () {\n return this.tileUrlFunction;\n };\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 getUrls () {\n return this.urls;\n };\n\n /**\n * Handle tile change events.\n * @param {import(\"../events/Event.js\").default} event Event.\n * @protected\n */\n UrlTile.prototype.handleTileChange = function handleTileChange (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 } else if (uid in this.tileLoadingKeys_) {\n delete this.tileLoadingKeys_[uid];\n type = tileState == TileState.ERROR ? TileEventType.TILELOADERROR :\n (tileState == TileState.LOADED || tileState == TileState.ABORT) ?\n TileEventType.TILELOADEND : undefined;\n }\n if (type != undefined) {\n this.dispatchEvent(new TileSourceEvent(type, tile));\n }\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 setTileLoadFunction (tileLoadFunction) {\n this.tileCache.clear();\n this.tileLoadFunction = tileLoadFunction;\n this.changed();\n };\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 setTileUrlFunction (tileUrlFunction, key) {\n this.tileUrlFunction = tileUrlFunction;\n this.tileCache.pruneExceptNewestZ();\n if (typeof key !== 'undefined') {\n this.setKey(key);\n } else {\n this.changed();\n }\n };\n\n /**\n * Set the URL to use for requests.\n * @param {string} url URL.\n * @api\n */\n UrlTile.prototype.setUrl = function setUrl (url) {\n var urls = this.urls = expandUrl(url);\n this.setUrls(urls);\n };\n\n /**\n * Set the URLs to use for requests.\n * @param {Array<string>} urls URLs.\n * @api\n */\n UrlTile.prototype.setUrls = function setUrls (urls) {\n this.urls = urls;\n var key = urls.join('\\n');\n if (this.generateTileUrlFunction_) {\n this.setTileUrlFunction(createFromTemplates(urls, this.tileGrid), key);\n } else {\n this.setKey(key);\n }\n };\n\n /**\n * @inheritDoc\n */\n UrlTile.prototype.useTile = function useTile (z, x, y) {\n var tileCoordKey = getKeyZXY(z, x, y);\n if (this.tileCache.containsKey(tileCoordKey)) {\n this.tileCache.get(tileCoordKey);\n }\n };\n\n return UrlTile;\n}(TileSource));\n\n\nexport default UrlTile;\n\n//# sourceMappingURL=UrlTile.js.map","/**\n * @module ol/source/TileImage\n */\nimport {ENABLE_RASTER_REPROJECTION} from '../reproj/common.js';\nimport {getUid} from '../util.js';\nimport ImageTile from '../ImageTile.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {equivalent, get as getProjection} from '../proj.js';\nimport ReprojTile from '../reproj/Tile.js';\nimport UrlTile from './UrlTile.js';\nimport {getKey, getKeyZXY} from '../tilecoord.js';\nimport {getForProjection as getTileGridForProjection} from '../tilegrid.js';\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=2048] Cache size.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to\n * access pixel data with the Canvas renderer. See\n * https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [opaque=true] Whether the layer is opaque.\n * @property {import(\"../proj.js\").ProjectionLike} projection 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 */\n\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 = /*@__PURE__*/(function (UrlTile) {\n function TileImage(options) {\n\n UrlTile.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 : 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 });\n\n /**\n * @protected\n * @type {?string}\n */\n this.crossOrigin =\n options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n /**\n * @protected\n * @type {typeof ImageTile}\n */\n this.tileClass = options.tileClass !== undefined ?\n options.tileClass : ImageTile;\n\n /**\n * @protected\n * @type {!Object<string, TileCache>}\n */\n this.tileCacheForProjection = {};\n\n /**\n * @protected\n * @type {!Object<string, import(\"../tilegrid/TileGrid.js\").default>}\n */\n this.tileGridForProjection = {};\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.reprojectionErrorThreshold_ = options.reprojectionErrorThreshold;\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderReprojectionEdges_ = false;\n }\n\n if ( UrlTile ) TileImage.__proto__ = UrlTile;\n TileImage.prototype = Object.create( UrlTile && UrlTile.prototype );\n TileImage.prototype.constructor = TileImage;\n\n /**\n * @inheritDoc\n */\n TileImage.prototype.canExpireCache = function canExpireCache () {\n if (!ENABLE_RASTER_REPROJECTION) {\n return UrlTile.prototype.canExpireCache.call(this);\n }\n if (this.tileCache.canExpireCache()) {\n return true;\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 /**\n * @inheritDoc\n */\n TileImage.prototype.expireCache = function expireCache (projection, usedTiles) {\n if (!ENABLE_RASTER_REPROJECTION) {\n UrlTile.prototype.expireCache.call(this, projection, usedTiles);\n return;\n }\n var usedTileCache = this.getTileCacheForProjection(projection);\n\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 /**\n * @inheritDoc\n */\n TileImage.prototype.getGutterForProjection = function getGutterForProjection (projection) {\n if (ENABLE_RASTER_REPROJECTION &&\n this.getProjection() && projection && !equivalent(this.getProjection(), projection)) {\n return 0;\n } else {\n return this.getGutter();\n }\n };\n\n /**\n * @return {number} Gutter.\n */\n TileImage.prototype.getGutter = function getGutter () {\n return 0;\n };\n\n /**\n * @inheritDoc\n */\n TileImage.prototype.getOpaque = function getOpaque (projection) {\n if (ENABLE_RASTER_REPROJECTION &&\n this.getProjection() && projection && !equivalent(this.getProjection(), projection)) {\n return false;\n } else {\n return UrlTile.prototype.getOpaque.call(this, projection);\n }\n };\n\n /**\n * @inheritDoc\n */\n TileImage.prototype.getTileGridForProjection = function getTileGridForProjection$1 (projection) {\n if (!ENABLE_RASTER_REPROJECTION) {\n return UrlTile.prototype.getTileGridForProjection.call(this, projection);\n }\n var thisProj = this.getProjection();\n if (this.tileGrid && (!thisProj || equivalent(thisProj, projection))) {\n return this.tileGrid;\n } else {\n var projKey = getUid(projection);\n if (!(projKey in this.tileGridForProjection)) {\n this.tileGridForProjection[projKey] = getTileGridForProjection(projection);\n }\n return (\n /** @type {!import(\"../tilegrid/TileGrid.js\").default} */ (this.tileGridForProjection[projKey])\n );\n }\n };\n\n /**\n * @inheritDoc\n */\n TileImage.prototype.getTileCacheForProjection = function getTileCacheForProjection (projection) {\n if (!ENABLE_RASTER_REPROJECTION) {\n return UrlTile.prototype.getTileCacheForProjection.call(this, projection);\n }\n var thisProj = this.getProjection(); if (!thisProj || equivalent(thisProj, projection)) {\n return this.tileCache;\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 /**\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 createTile_ (z, x, y, pixelRatio, projection, key) {\n var tileCoord = [z, x, y];\n var urlTileCoord = this.getTileCoordForTileUrlFunction(\n tileCoord, projection);\n var tileUrl = urlTileCoord ?\n this.tileUrlFunction(urlTileCoord, pixelRatio, projection) : undefined;\n var tile = new this.tileClass(\n tileCoord,\n tileUrl !== undefined ? TileState.IDLE : TileState.EMPTY,\n tileUrl !== undefined ? tileUrl : '',\n this.crossOrigin,\n this.tileLoadFunction,\n this.tileOptions);\n tile.key = key;\n listen(tile, EventType.CHANGE,\n this.handleTileChange, this);\n return tile;\n };\n\n /**\n * @inheritDoc\n */\n TileImage.prototype.getTile = function getTile (z, x, y, pixelRatio, projection) {\n var sourceProjection = /** @type {!import(\"../proj/Projection.js\").default} */ (this.getProjection());\n if (!ENABLE_RASTER_REPROJECTION ||\n !sourceProjection || !projection || equivalent(sourceProjection, projection)) {\n return this.getTileInternal(z, x, y, pixelRatio, sourceProjection || projection);\n } else {\n var cache = this.getTileCacheForProjection(projection);\n var tileCoord = [z, x, y];\n var tile;\n var tileCoordKey = getKey(tileCoord);\n if (cache.containsKey(tileCoordKey)) {\n tile = /** @type {!import(\"../Tile.js\").default} */ (cache.get(tileCoordKey));\n }\n var key = this.getKey();\n if (tile && tile.key == key) {\n return tile;\n } else {\n var sourceTileGrid = this.getTileGridForProjection(sourceProjection);\n var targetTileGrid = this.getTileGridForProjection(projection);\n var wrappedTileCoord =\n this.getTileCoordForTileUrlFunction(tileCoord, projection);\n var newTile = new ReprojTile(\n sourceProjection, sourceTileGrid,\n projection, targetTileGrid,\n tileCoord, wrappedTileCoord, this.getTilePixelRatio(pixelRatio),\n this.getGutter(),\n function(z, x, y, pixelRatio) {\n return this.getTileInternal(z, x, y, pixelRatio, sourceProjection);\n }.bind(this), this.reprojectionErrorThreshold_,\n this.renderReprojectionEdges_);\n newTile.key = key;\n\n if (tile) {\n newTile.interimTile = tile;\n newTile.refreshInterimChain();\n cache.replace(tileCoordKey, newTile);\n } else {\n cache.set(tileCoordKey, newTile);\n }\n return newTile;\n }\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 getTileInternal (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 } 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\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 } else {\n tile.interimTile = interimTile;\n }\n tile.refreshInterimChain();\n this.tileCache.replace(tileCoordKey, tile);\n }\n }\n return tile;\n };\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 setRenderReprojectionEdges (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 /**\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 setTileGridForProjection (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\n return TileImage;\n}(UrlTile));\n\n\n/**\n * @param {ImageTile} imageTile Image tile.\n * @param {string} src Source.\n */\nfunction defaultTileLoadFunction(imageTile, src) {\n /** @type {HTMLImageElement|HTMLVideoElement} */ (imageTile.getImage()).src = src;\n}\n\nexport default TileImage;\n\n//# sourceMappingURL=TileImage.js.map","/**\n * @module ol/source/XYZ\n */\n\nimport TileImage from './TileImage.js';\nimport {createXYZ, extentFromProjection} from '../tilegrid.js';\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=2048] Cache size.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to\n * access pixel data with the Canvas renderer. See\n * https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [opaque=true] 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=18] Optional max zoom level.\n * @property {number} [minZoom=0] Optional min zoom level.\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 * @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] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\n\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 * {@link module:ol/source/TileImage} can be used with a `tileUrlFunction`\n * such as:\n *\n * tileUrlFunction: function(coordinate) {\n * return 'http://mapserver.com/' + coordinate[0] + '/' +\n * coordinate[1] + '/' + coordinate[2] + '.png';\n * }\n *\n * @api\n */\nvar XYZ = /*@__PURE__*/(function (TileImage) {\n function XYZ(opt_options) {\n var options = opt_options || {};\n var projection = options.projection !== undefined ?\n options.projection : 'EPSG:3857';\n\n var tileGrid = options.tileGrid !== undefined ? options.tileGrid :\n createXYZ({\n extent: extentFromProjection(projection),\n maxZoom: options.maxZoom,\n minZoom: options.minZoom,\n tileSize: options.tileSize\n });\n\n TileImage.call(this, {\n attributions: options.attributions,\n cacheSize: options.cacheSize,\n crossOrigin: options.crossOrigin,\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 });\n\n }\n\n if ( TileImage ) XYZ.__proto__ = TileImage;\n XYZ.prototype = Object.create( TileImage && TileImage.prototype );\n XYZ.prototype.constructor = XYZ;\n\n return XYZ;\n}(TileImage));\n\nexport default XYZ;\n\n//# sourceMappingURL=XYZ.js.map","/**\n * @module ol/source/OSM\n */\n\nimport XYZ from './XYZ.js';\n\n\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\">OpenStreetMap</a> ' +\n 'contributors.';\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize=2048] Cache size.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that\n * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to\n * access pixel data with the Canvas renderer. See\n * https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {number} [maxZoom=19] Max zoom.\n * @property {boolean} [opaque=true] Whether the layer is opaque.\n * @property {number} [reprojectionErrorThreshold=1.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 {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 */\n\n\n/**\n * @classdesc\n * Layer source for the OpenStreetMap tile server.\n * @api\n */\nvar OSM = /*@__PURE__*/(function (XYZ) {\n function OSM(opt_options) {\n\n var options = opt_options || {};\n\n var attributions;\n if (options.attributions !== undefined) {\n attributions = options.attributions;\n } else {\n attributions = [ATTRIBUTION];\n }\n\n var crossOrigin = options.crossOrigin !== undefined ?\n options.crossOrigin : 'anonymous';\n\n var url = options.url !== undefined ?\n options.url : 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png';\n\n XYZ.call(this, {\n attributions: attributions,\n cacheSize: options.cacheSize,\n crossOrigin: crossOrigin,\n opaque: options.opaque !== undefined ? options.opaque : true,\n maxZoom: options.maxZoom !== undefined ? options.maxZoom : 19,\n reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n tileLoadFunction: options.tileLoadFunction,\n url: url,\n wrapX: options.wrapX,\n attributionsCollapsible: false\n });\n\n }\n\n if ( XYZ ) OSM.__proto__ = XYZ;\n OSM.prototype = Object.create( XYZ && XYZ.prototype );\n OSM.prototype.constructor = OSM;\n\n return OSM;\n}(XYZ));\n\nexport default OSM;\n\n//# sourceMappingURL=OSM.js.map","import {Map, View} from 'ol';\nimport TileLayer from 'ol/layer/Tile';\nimport OSM from 'ol/source/OSM.js'\n\nnew Map({\n target: 'map',\n layers: [\n new TileLayer({\n source: OSM()\n })\n ],\n view: new View({\n center: [0, 0],\n zoom: 2\n })\n});\n"],"sourceRoot":""}